@dcl/shop 0.1.0-30846189899.commit-4a8ddfb → 0.1.0-30897342413.commit-036e931
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_assets/{Activity--xIML69z.js → Activity-DUBRQnWV.js} +1 -1
- package/_assets/{AnimatedBackground-COxl8338.js → AnimatedBackground-CmAZhAYA.js} +1 -1
- package/_assets/Assets-NRrjcYA5.js +800 -0
- package/_assets/{Assets.styles-C4uc13ku.js → Assets.styles-3wC-xeWp.js} +1 -1
- package/_assets/{Authorizations-BNvzVxCi.js → Authorizations-aNMRQo6Q.js} +1 -1
- package/_assets/{Cart-0pIyJIoa.js → Cart-zIOhAh9c.js} +2 -2
- package/_assets/{CircularProgress-BtTBZv-J.js → CircularProgress-LjKPNQUw.js} +1 -1
- package/_assets/{Collection-CoFyHo3H.js → Collection-C46Ze7ov.js} +1 -1
- package/_assets/{CollectionCarousel-D_-sxfGs.js → CollectionCarousel-B71TAj46.js} +1 -1
- package/_assets/{Creator-Bz_W5s1y.js → Creator-D7kFPPn9.js} +1 -1
- package/_assets/{ErrorNotice-Cx0COdAr.js → ErrorNotice-DNbl0Lx6.js} +1 -1
- package/_assets/{ExchangeController-DmhQDrPJ.js → ExchangeController-B1JcnenY.js} +1 -1
- package/_assets/{GetCredits-DoV0Rnfd.js → GetCredits-BLKTlUHn.js} +1 -1
- package/_assets/{HelpersUtil-CPZu5R17.js → HelpersUtil-B004FVhm.js} +1 -1
- package/_assets/{ImportListings-ev2izkxg.js → ImportListings-CyzEyfcm.js} +1 -1
- package/_assets/{ItemDetail-C2cicWV9.js → ItemDetail-apY0RKkT.js} +3 -3
- package/_assets/{LoadMore-ConDrtOT.js → LoadMore-CvF1ryR6.js} +1 -1
- package/_assets/{MenuList-DlDqrk3u.js → MenuList-BmbNiqyv.js} +1 -1
- package/_assets/{MyAssets-DkOhTUsa.js → MyAssets-ClsL7CoM.js} +1 -1
- package/_assets/{MyFavorites-Ckuq227S.js → MyFavorites-VWLNpe0r.js} +1 -1
- package/_assets/{NotFound-B9xruk4f.js → NotFound-DQHwDF1N.js} +1 -1
- package/_assets/{NotificationsBell-CtRATM4e.js → NotificationsBell-C5ky0lqZ.js} +1 -1
- package/_assets/{StoreSettings-CjoFpkP5.js → StoreSettings-CgbxKhUS.js} +1 -1
- package/_assets/{Success-BacGrGKk.js → Success-C_SNXVeS.js} +1 -1
- package/_assets/{SwapController-BHGG_Epq.js → SwapController-DjUyjCYK.js} +1 -1
- package/_assets/{Tooltip-DWPneKP_.js → Tooltip-VDc8mbHU.js} +1 -1
- package/_assets/{TradeService-Cgcgxq0A.js → TradeService-T7Ac3zPB.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-w-RSM5AL.js → W3MFrameProviderSingleton-BGLSOpiV.js} +3 -3
- package/_assets/{WebCryptoP256-CLVtgMXf.js → WebCryptoP256-D7qVD_y0.js} +1 -1
- package/_assets/{authorizations-epxR5pjl.js → authorizations-BTC_bFln.js} +1 -1
- package/_assets/{basic-BgrqP-TA.js → basic-8iVIK2Fo.js} +1 -1
- package/_assets/{biconomy-Bv1UCxcF.js → biconomy-BreMnkVT.js} +1 -1
- package/_assets/{browseLayout.styles-ChD_QYf4.js → browseLayout.styles-De0FGl5x.js} +1 -1
- package/_assets/{builder-BY1-lATK.js → builder-C4njBf3q.js} +1 -1
- package/_assets/{buy-gasless-CwH-UbWq.js → buy-gasless-aqj0tOF3.js} +1 -1
- package/_assets/{buy-BI5VTk92.js → buy-myGa3uAa.js} +1 -1
- package/_assets/{categories-CeBHtq1-.js → categories-A3Tq54j-.js} +1 -1
- package/_assets/{ccip-DILsZUfP.js → ccip-BeYige_y.js} +1 -1
- package/_assets/{ccip-Bm7ioRrH.js → ccip-NXlbV8_q.js} +1 -1
- package/_assets/{clsx-BcR9gED7.js → clsx-BETN9X51.js} +1 -1
- package/_assets/{controller-D3R-xyiE.js → controller-DL4fylV8.js} +2 -2
- package/_assets/{core-Ce4ORvRb.js → core-D8ptIKw3.js} +4 -4
- package/_assets/{createSvgIcon-CIqvD8A3.js → createSvgIcon-sbUQV66i.js} +1 -1
- package/_assets/{custom-J02AwXNB.js → custom-BgXN6B3q.js} +1 -1
- package/_assets/{data-capture-98wGTR7Y.js → data-capture-C-JR2KzF.js} +1 -1
- package/_assets/{email-AkcBNJmx.js → email-DpFveLJ0.js} +1 -1
- package/_assets/{embedded-wallet-C1FwO5au.js → embedded-wallet-C2gUO5wT.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-Bk3DOklv.js → emotion-styled.browser.esm-DH8Xabrh.js} +1 -1
- package/_assets/{engine-CpeXNQNG.js → engine-5oCjjcrK.js} +1 -1
- package/_assets/{errors-CQ3rltSg.js → errors-DqL59l4z.js} +1 -1
- package/_assets/{estimate-l1-fee-D4EobY0t.js → estimate-l1-fee-BujsJkmp.js} +1 -1
- package/_assets/{execute-CoTzdWPI.js → execute-BvpVcytD.js} +2 -2
- package/_assets/{features-BwG-URCN.js → features-hynqqeoJ.js} +1 -1
- package/_assets/{fetchTokenMetadata-BkvrDuzW.js → fetchTokenMetadata-BnJnLsZ6.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-DBSebSs5.js → get-ecosystem-wallet-info-DQdOd1yi.js} +1 -1
- package/_assets/{getBalance-W1kDcffZ.js → getBalance-x0HlsVC8.js} +1 -1
- package/_assets/{getNFT-BgKBStfZ.js → getNFT-BmIGxF2X.js} +1 -1
- package/_assets/{getNFT-B5NiXJ-r.js → getNFT-U6fW1c3o.js} +1 -1
- package/_assets/{getThemeProps-D9MV0ore.js → getThemeProps-BzsYMuYq.js} +1 -1
- package/_assets/{grid.styles-BdBYqxJR.js → grid.styles-B36wgJRU.js} +1 -1
- package/_assets/{hashTypedData-BxxK8aGQ.js → hashTypedData-BtyGAAso.js} +1 -1
- package/_assets/{hashTypedData-Cm-awrYD.js → hashTypedData-D5cKiuOe.js} +1 -1
- package/_assets/{import-B25CKzlS.js → import-Da0nCdcK.js} +1 -1
- package/_assets/{in-app-NAdj5lCP.js → in-app-tkTqoTeW.js} +1 -1
- package/_assets/{in-app-wallet-calls-CpzGycsr.js → in-app-wallet-calls-Dyb8JyC6.js} +1 -1
- package/_assets/{index-DKk1pc3n.js → index--n_fMjyX.js} +1 -1
- package/_assets/{index-BKSkru-M.js → index-8AINMf2V.js} +1 -1
- package/_assets/{index-wz8PBj21.js → index-B-ELrI2-.js} +1 -1
- package/_assets/{index-C1yjSclR.js → index-B6RSvfuU.js} +1 -1
- package/_assets/{index-D16mzzVn.js → index-BCMTVfZb.js} +1 -1
- package/_assets/{index-BKICMIZT.js → index-BGOR7uqp.js} +1 -1
- package/_assets/{index-C3O2judC.js → index-BJaBIZon.js} +2 -2
- package/_assets/{index-6hzc-GnS.js → index-BJhXMkl3.js} +2 -2
- package/_assets/{index-CZuVkoLd.js → index-BNnslvoC.js} +1 -1
- package/_assets/{index-CA1pdiTI.js → index-BSfKLWot.js} +1 -1
- package/_assets/{index-9v3H5hPY.js → index-BX7nt43X.js} +1 -1
- package/_assets/{index-EiC_Szof.js → index-B_EmM_OX.js} +1 -1
- package/_assets/{index-CTdrJ4oL.js → index-BarS2mgL.js} +1 -1
- package/_assets/{index-ChmcTLu_.js → index-Beqa_Gje.js} +1 -1
- package/_assets/{index-HY0POgHw.js → index-Bg9_Rb37.js} +1 -1
- package/_assets/{index-CFIryEo0.js → index-BnaX4TbU.js} +1 -1
- package/_assets/{index-DwQ9zfke.js → index-BrAm6VBC.js} +1 -1
- package/_assets/{index-D8iklv7s.js → index-ByCGiKUv.js} +1 -1
- package/_assets/{index-B9MT_MB9.js → index-C184oxsV.js} +1 -1
- package/_assets/{index-FuqC8LCi.js → index-C3EyLY1t.js} +1 -1
- package/_assets/{index-DpTSanxf.js → index-C7Dd_OFn.js} +1 -1
- package/_assets/{index-NyoHQ3Hg.js → index-CCOhxr4Y.js} +3 -3
- package/_assets/{index-BLbPcDXT.js → index-CPOONJNk.js} +1 -1
- package/_assets/{index-C532fyTR.js → index-CZuEgdES.js} +1 -1
- package/_assets/{index-CS5vL3nz.js → index-Cd7uOoEN.js} +1 -1
- package/_assets/{index-Dy2g978X.js → index-CnNlT6GN.js} +1 -1
- package/_assets/{index-BHI32oX_.js → index-D05mgWf9.js} +1 -1
- package/_assets/{index-BKc1lwsO.js → index-D8MKf1c9.js} +1 -1
- package/_assets/{index-Dz1OuWp5.js → index-DCH4Sk36.js} +1 -1
- package/_assets/{index-DKPPTRpY.js → index-DFUj2qC_.js} +1 -1
- package/_assets/{index-kSY8zCTD.js → index-DI_IjAcF.js} +11 -11
- package/_assets/{index-BQ9B8U3w.js → index-D_k1yIWZ.js} +1 -1
- package/_assets/{index-DrnGHRKJ.js → index-Dc05m3c2.js} +1 -1
- package/_assets/{index-DPLsz-9z.js → index-DeajtqZQ.js} +1 -1
- package/_assets/{index-CjYcxJyk.js → index-Dent5zap.js} +1 -1
- package/_assets/{index-CF64rl6y.js → index-DfFeZ6Vp.js} +1 -1
- package/_assets/{index-CHT5h1YD.js → index-DheZlekn.js} +3 -3
- package/_assets/{index-DgX6c0uG.js → index-DxM-to32.js} +3 -3
- package/_assets/{index-BVrE4quq.js → index-DxM-zc2w.js} +1 -1
- package/_assets/{index-BxqE_v_k.js → index-Dya8ahcx.js} +1 -1
- package/_assets/{index-Du4gkBvR.js → index-FsUhf4jJ.js} +1 -1
- package/_assets/{index-BtwgxwHq.js → index-HLQrRyOg.js} +1 -1
- package/_assets/{index-CQUKp9s3.js → index-Nj11N1Vp.js} +1 -1
- package/_assets/{index-DC1fq39A.js → index-Sc6q1Ecn.js} +1 -1
- package/_assets/{index-DRU29mYR.js → index-UHqRfL2i.js} +1 -1
- package/_assets/{index-AqK03-LB.js → index-VL-eJTDX.js} +1 -1
- package/_assets/{index-BDNkhDJO.js → index-VOzIxfGw.js} +1 -1
- package/_assets/{index-CVd-CvyB.js → index-hdy1vdaF.js} +1 -1
- package/_assets/{index-B0tCillH.js → index-mSffj-0T.js} +2 -2
- package/_assets/{index-B6PcqfHB.js → index-rT-FK12h.js} +1 -1
- package/_assets/{index-K3GpFcMv.js → index-uIjOgtMi.js} +1 -1
- package/_assets/{index.es-BBVPisv6.js → index.es-Ca2F0FMx.js} +4 -4
- package/_assets/{index.es-Da5RZk4t.js → index.es-DIF91egA.js} +1 -1
- package/_assets/{index.es-DiRhFFGQ.js → index.es-creG5doh.js} +1 -1
- package/_assets/{localBatchGatewayRequest-C-p2tm05.js → localBatchGatewayRequest-DsmOioor.js} +1 -1
- package/_assets/{mana-convert-D1hsZ2E6.js → mana-convert-CTsfw0Op.js} +1 -1
- package/_assets/{mana-rate-Bnci-S8V.js → mana-rate-BxYQ9xUU.js} +1 -1
- package/_assets/{networks-BJU6f_cY.js → networks-cAv5X6o3.js} +1 -1
- package/_assets/{onramp-Bzzm06hv.js → onramp-g7sfARS-.js} +1 -1
- package/_assets/{openzeppelin-DFiLpFgH.js → openzeppelin-BCr3n-Wo.js} +1 -1
- package/_assets/{parseNft-CCbTEGwV.js → parseNft-BhL_ChhV.js} +2 -2
- package/_assets/{parseSignature-DD99BMNb.js → parseSignature--tz_iwev.js} +3 -3
- package/_assets/{parseSignature-BOSKOro2.js → parseSignature-DvfiZIZV.js} +1 -1
- package/_assets/{passkeys-92GO4_AS.js → passkeys-Bvs56mq5.js} +1 -1
- package/_assets/{pay-with-exchange-DX-xSLr7.js → pay-with-exchange-XkI8_OCE.js} +1 -1
- package/_assets/{qr-overlay-eh8MTm5X.js → qr-overlay-Bk2XZPWy.js} +1 -1
- package/_assets/{receive-gG18LKlB.js → receive-BMeT0Lz-.js} +1 -1
- package/_assets/{resolveImplementation-D1geF9pd.js → resolveImplementation-Bx83F7NY.js} +1 -1
- package/_assets/{rpc-BrRB7NAj.js → rpc-DbNw9jL1.js} +1 -1
- package/_assets/{secp256k1-BG1vt8D2.js → secp256k1-BEusWpwQ.js} +1 -1
- package/_assets/{secp256k1-C_5KB_ss.js → secp256k1-gVzAYZdt.js} +1 -1
- package/_assets/{secp256k1-DX1MiMfj.js → secp256k1-k_sy808b.js} +1 -1
- package/_assets/{send-HdWX4Vf8.js → send-CXMx0Ee3.js} +1 -1
- package/_assets/{send-batch-transaction--UYo-MfS.js → send-batch-transaction-CDuCIKM-.js} +1 -1
- package/_assets/{send-eip712-transaction-ylAy9C9V.js → send-eip712-transaction-BeDgEcMv.js} +2 -2
- package/_assets/{send-gasless-transaction-D8jV3JY1.js → send-gasless-transaction-B3NobiIc.js} +2 -2
- package/_assets/{send-transaction-A8da-F-0.js → send-transaction-SAvzY1Zv.js} +2 -2
- package/_assets/{sendMetaTransaction-DwwWcytG.js → sendMetaTransaction-BLHMOdHq.js} +1 -1
- package/_assets/{sendRawTransaction-CRteP_VF.js → sendRawTransaction-DEpVlnFQ.js} +3 -3
- package/_assets/{serializeTransaction-CP2suneH.js → serializeTransaction-BeikLUOw.js} +1 -1
- package/_assets/{session-proposal-BEwyn_1a.js → session-proposal-CXFPx6Nc.js} +1 -1
- package/_assets/{session-request-D98_vJeF.js → session-request-yTpVxJp5.js} +2 -2
- package/_assets/{signing-ByWEzda7.js → signing-ClnsTXrn.js} +3 -3
- package/_assets/{socials-Dw9x9jIa.js → socials-vhiZxWBx.js} +1 -1
- package/_assets/{swaps-Cg4ubSW8.js → swaps-BYey02hd.js} +1 -1
- package/_assets/{thirdweb-B5eOPxT2.js → thirdweb-M2_jjUS_.js} +3 -3
- package/_assets/{to-serializable-transaction-Bug9hdHL.js → to-serializable-transaction-BTD2tsYD.js} +2 -2
- package/_assets/{trade-encoding-D1HYs4M1.js → trade-encoding-BVlmzFE-.js} +1 -1
- package/_assets/{transactionReceipt-BCGTxm9P.js → transactionReceipt-OZUBm-CR.js} +1 -1
- package/_assets/{transactions-BjCUlQJE.js → transactions-CHSrtQ-4.js} +1 -1
- package/_assets/{useCreditPacks-DGRmK8hf.js → useCreditPacks-DkU8BJEb.js} +1 -1
- package/_assets/{useInfiniteGrid-CY-Kev2J.js → useInfiniteGrid-NfDPHWXi.js} +1 -1
- package/_assets/useManaRate-BV_Xzv0_.js +1 -0
- package/_assets/{useSecondarySales-CiIhx9_Z.js → useSecondarySales-Caon2E63.js} +1 -1
- package/_assets/{useStore-DUeF63tD.js → useStore-TorFHABK.js} +1 -1
- package/_assets/{useTheme-Cvhw021z.js → useTheme-D346drKA.js} +1 -1
- package/_assets/{verifyHash-C9OKo_wr.js → verifyHash-C_z3J9Yf.js} +1 -1
- package/_assets/{w3m-modal-Du_9ZBUK.js → w3m-modal-BCtgJ1Ma.js} +1 -1
- package/_assets/{w3m-modal-CPyeblNY.js → w3m-modal-DyyYMui-.js} +1 -1
- package/_assets/{wait-for-tx-receipt-DpR9zAvK.js → wait-for-tx-receipt-SA_Mo0zv.js} +1 -1
- package/_assets/{wallets-BrL616p3.js → wallets-CiVaPBHB.js} +5 -5
- package/_assets/{web-connector-RgfFD4s5.js → web-connector-Cc9dNw1Y.js} +3 -3
- package/_assets/{writeContract-BndPP9zt.js → writeContract-BSMHcTCt.js} +1 -1
- package/_assets/{zoraTestnet-Dfh7-p3m.js → zoraTestnet-CftGmIvi.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Assets-DeYwJmco.js +0 -787
- package/_assets/useManaRate-CXdHjXW7.js +0 -1
|
@@ -1,787 +0,0 @@
|
|
|
1
|
-
import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,av as Ke,aw as Ze,d as Je,s as n,t,n as Ie,al as Qe,D as Xe,K as Ae,y as Ye,e as s,I as _,z as W,aT as he,aj as et,ar as J,az as tt,ay as nt,m as Ne,o as st,S as fe,A as O,aU as ot,aV as it}from"./index-kSY8zCTD.js";import{u as rt}from"./useSecondarySales-CiIhx9_Z.js";import{a as at,m as Me}from"./mana-convert-D1hsZ2E6.js";import{u as Pe}from"./useManaRate-CXdHjXW7.js";import{g as lt,h as ct,i as dt,j as pt,k as xt,C as ht,l as ft,o as mt,m as ut,n as gt,M as bt,p as yt,E as wt,q as jt,r as vt,s as $t,t as Ct,u as kt,v as St}from"./Assets.styles-C4uc13ku.js";import{c as me,R as Et,F as _t,S as Tt}from"./categories-CeBHtq1-.js";import{L as Rt}from"./LoadMore-ConDrtOT.js";import{u as zt}from"./useInfiniteGrid-CY-Kev2J.js";import{E as It}from"./ErrorNotice-Cx0COdAr.js";import{d as At}from"./dcl-schemas-BICTSpB5.js";import{s as Nt,G as Mt,w as Pt,S as Wt}from"./buy-gasless-CwH-UbWq.js";import{s as Bt}from"./buy-BI5VTk92.js";import{i as Ft}from"./trade-encoding-D1HYs4M1.js";import{r as Lt}from"./mana-rate-Bnci-S8V.js";import{f as Ut}from"./errors-CQ3rltSg.js";import{J as Ht,C as Ot,B as ee}from"./ethers-CXBJm_wN.js";import{n as Dt}from"./Tooltip-DWPneKP_.js";import{G as Gt}from"./grid.styles-BdBYqxJR.js";import"./sentry-B35L1FdR.js";import"./intl-CBcMB1D2.js";import"./authorizations-epxR5pjl.js";import"./sendMetaTransaction-DwwWcytG.js";function D(o){const i=o.source??"item",l=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${l}`}const F="100000000000000000000",We=2,Q=15,qt=/^[a-zA-Z0-9]+$/;function ue(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:qt.test(i)?i.length<We?{ok:!1,reason:"too-short"}:i.length>Q?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Vt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,Q)}const Kt=["function available(string _subdomain) view returns (bool)"],ge={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Zt(){return B.chainId===Number(At.ChainId.MATIC_MAINNET)?ge.mainnet:ge.sepolia}async function Jt(o,i={}){var p;const{rpc:l,address:x}=Zt(),c=new Ht(l),d=new Ot(x,Kt,c);console.info(`[names] availability check → DCLRegistrar(${x}).available("${o}") on ${l}`);const h=await d.available(o);if((p=i.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${h}`),h?"available":"taken"}const Qt="https://app.across.to/api";class Be extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Xt(o){return at(F,o)}async function Yt(o,i,l={}){var p;const x=l.chainId??B.chainId,c=l.provider??"across",d=`${B.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${x}&provider=${c}`,h=await Je(d,{method:"GET",identity:o,metadata:{}});if(!h.ok){let a;try{a=(p=await h.json())==null?void 0:p.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Be:new Error(`fetchNameCreditRoute ${h.status}`)}return h.json()}function en(o,i){const l=ee.from(o.availableAmount),c=ee.from(F).sub(l);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Ft(o.id)}],creditsSignatures:[o.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:c.isNegative()?"0":c.toString(),maxCreditedValue:F}}async function tn(o,i={}){const l=Qt,x=i.intervalMs??1e4,c=i.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let h=0;h<c;h++){try{const p=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${o}`);if(p.ok){const a=await p.json(),u=(a.status??"pending").toLowerCase(),b=a.fillTx??a.fillTxnRef??null,w=a.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:b,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:b,actionsSucceeded:w}}}catch{}h<c-1&&await new Promise(p=>setTimeout(p,x))}return d}async function nn(o){const{name:i,identity:l,signer:x}=o,c=o.chainId??B.chainId,d=o.provider??"across",h=(o.beneficiary??await x.getAddress()).toLowerCase();let p=null,a=!1;console.info("[names] register start",{name:i,buyer:h,chainId:c,provider:d});try{const u=await Lt(c),b=Xt(u);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:u});const w=await Yt(l,i,{chainId:c,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Ke(l,b);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),ee.from(j.maxCreditedValue).lt(F))throw new Error("Credit under-sized for the name price");const $=en(j.credit,w);let f;try{f=await Nt({chainId:c,buyer:h,signer:x,args:$})}catch(y){if(!(y instanceof Mt))throw y;f=await Bt(c,$,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Pt(f),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const y=await tn(f,o.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:f};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:i,buyer:h,originConfirmed:a}),u instanceof Wt)return{status:"pending",originTxHash:u.txHash};if(p&&!a&&await Ze(l,[p]).catch(()=>{}),u instanceof Be)throw u;const b=new Error(Ut(u,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=u,b}}const sn=n.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
|
-
`,on=n.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
|
-
`,be=n.div`
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: flex-start;
|
|
26
|
-
justify-content: space-between;
|
|
27
|
-
gap: 12px;
|
|
28
|
-
`,ye=n.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
|
-
`,we=n.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
|
-
`,je=n.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
|
-
`,ve=n.hr`
|
|
73
|
-
border: 0;
|
|
74
|
-
border-top: 1px solid ${t.colors.line};
|
|
75
|
-
margin: 16px 0;
|
|
76
|
-
`,$e=n.div`
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
gap: 16px;
|
|
80
|
-
`,Ce=n.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
|
-
`,ke=n.div`
|
|
95
|
-
flex: 1;
|
|
96
|
-
min-width: 0;
|
|
97
|
-
`,Se=n.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
|
-
`,Ee=n.div`
|
|
112
|
-
font-family: ${t.font.sans};
|
|
113
|
-
font-size: 14px;
|
|
114
|
-
color: ${t.colors.muted2};
|
|
115
|
-
`,_e=n.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
|
-
`,rn=n.div`
|
|
131
|
-
margin-top: 16px;
|
|
132
|
-
padding: 16px;
|
|
133
|
-
border-radius: 12px;
|
|
134
|
-
background: #f2e7fc;
|
|
135
|
-
`,an=n.div`
|
|
136
|
-
font-family: ${t.font.sans};
|
|
137
|
-
font-weight: 700;
|
|
138
|
-
font-size: 16px;
|
|
139
|
-
color: ${t.colors.text};
|
|
140
|
-
`,ln=n.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
|
-
`,cn=n.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
|
-
`,dn=n.span`
|
|
165
|
-
flex: none;
|
|
166
|
-
font-family: ${t.font.sans};
|
|
167
|
-
font-size: 18px;
|
|
168
|
-
color: ${t.colors.muted2};
|
|
169
|
-
`,pn=n.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
|
-
`,xn=n.span`
|
|
185
|
-
flex: none;
|
|
186
|
-
font-family: ${t.font.sans};
|
|
187
|
-
font-size: 16px;
|
|
188
|
-
color: ${t.colors.muted2};
|
|
189
|
-
`,Te=n.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
|
-
`,hn=n.div`
|
|
217
|
-
display: flex;
|
|
218
|
-
flex-direction: column;
|
|
219
|
-
align-items: flex-start;
|
|
220
|
-
gap: 20px;
|
|
221
|
-
padding: 32px 0 8px;
|
|
222
|
-
`,fn=n.img`
|
|
223
|
-
align-self: center;
|
|
224
|
-
width: 56px;
|
|
225
|
-
height: 56px;
|
|
226
|
-
`,mn=n.div`
|
|
227
|
-
font-family: ${t.font.sans};
|
|
228
|
-
font-weight: 700;
|
|
229
|
-
font-size: 18px;
|
|
230
|
-
color: ${t.colors.text};
|
|
231
|
-
`,un=n.div`
|
|
232
|
-
display: flex;
|
|
233
|
-
align-items: center;
|
|
234
|
-
gap: 12px;
|
|
235
|
-
width: 100%;
|
|
236
|
-
`,gn=n.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
|
-
`,bn=n.span`
|
|
261
|
-
flex: none;
|
|
262
|
-
font-family: ${t.font.sans};
|
|
263
|
-
font-size: 14px;
|
|
264
|
-
color: ${t.colors.muted};
|
|
265
|
-
`,yn=n.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
|
-
`,wn=n.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
|
-
`,jn=n.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
|
-
`,vn=n.div`
|
|
298
|
-
display: flex;
|
|
299
|
-
gap: 16px;
|
|
300
|
-
margin-top: 20px;
|
|
301
|
-
|
|
302
|
-
${t.media.maxWidth("mobile")} {
|
|
303
|
-
flex-direction: column;
|
|
304
|
-
}
|
|
305
|
-
`,$n=n.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
|
-
`,Cn=n.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
|
-
`,kn=n.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
|
-
`;function Sn({name:o,priceCredits:i,onClose:l}){const{session:x}=Ie(),{data:c,isError:d}=Qe(x),h=Xe(),p=ze(),[a,u]=m.useState("confirm"),[b,w]=m.useState(""),[j,$]=m.useState(null),f=m.useRef(!1),y=b.trim().toLowerCase()===o.toLowerCase(),v=a==="completing",k=i!=null?Ae(i):"—";m.useEffect(()=>{const g=T=>{T.key==="Escape"&&!v&&l()};document.addEventListener("keydown",g);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=I}},[v,l]);async function C(){if(!(!x||!y||f.current)){f.current=!0,u("completing"),$(null);try{await nn({name:o,identity:x.identity,signer:x.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null}),h.invalidateQueries({queryKey:["usd-balance"]}),h.invalidateQueries({queryKey:["my-assets"]}),u("success")}catch(g){J(nt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:tt(g),purchase_type:"name"}),$((g==null?void 0:g.message)||s("names.errorGeneric")),u("error")}finally{f.current=!1}}}const z=a!=="success",E=Ye(x==null?void 0:x.providerType);return e.jsx(sn,{onClick:v?void 0:l,role:"presentation",children:e.jsxs(on,{role:"dialog","aria-modal":"true","aria-label":s("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[z&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:a==="error"?s("names.errorTitle"):s("names.buyTitle")}),e.jsx(we,{onClick:l,disabled:v,"aria-label":s("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(_e,{children:[e.jsx(W,{}),k]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(kn,{children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Te,{onClick:()=>u("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(rn,{children:[e.jsx(an,{children:s("names.confirmTitle")}),e.jsx(ln,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${En(o)}</b>`})}}),e.jsxs(cn,{children:[e.jsx(dn,{"aria-hidden":!0,children:"@"}),e.jsx(pn,{value:b,onChange:g=>w(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(b.length,8)}ch`}}),e.jsx(xn,{children:".dcl.eth"})]})]}),e.jsx(Te,{onClick:()=>void C(),disabled:!y||!x,children:s("names.buyCta")})]})]}),a==="completing"&&e.jsxs(hn,{children:[e.jsx(fn,{src:et,alt:"",width:56,height:56}),e.jsx(mn,{children:E?s("names.confirming"):s("names.completing")}),e.jsxs(un,{children:[e.jsx(gn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(bn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:s("names.successHeaderTitle")}),e.jsx(we,{onClick:l,"aria-label":s("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx(_,{name:"check"})}),e.jsxs(jn,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs($e,{style:{marginTop:20},children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(_e,{children:[e.jsx(W,{}),k]})]}),e.jsxs(vn,{children:[e.jsx($n,{onClick:()=>{l(),p("/my-assets")},children:s("names.myItems")}),e.jsx(Cn,{href:B.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function En(o){return o.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const _n="https://cdn.decentraland.org/@dcl/shop/0.1.0-30846189899.commit-4a8ddfb/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30846189899.commit-4a8ddfb/_assets/world-B-9aPlxu.webp",Rn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30846189899.commit-4a8ddfb/_assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30846189899.commit-4a8ddfb/_assets/governance-DnazlIjy.webp",In=n.div`
|
|
370
|
-
width: 100%;
|
|
371
|
-
min-width: 0;
|
|
372
|
-
`,An=n.nav`
|
|
373
|
-
display: flex;
|
|
374
|
-
align-items: center;
|
|
375
|
-
gap: 6px;
|
|
376
|
-
margin: 4px 0 16px;
|
|
377
|
-
font-family: ${t.font.sans};
|
|
378
|
-
font-size: 12px;
|
|
379
|
-
line-height: 1;
|
|
380
|
-
color: ${t.colors.muted};
|
|
381
|
-
`,Nn=n.button`
|
|
382
|
-
border: 0;
|
|
383
|
-
background: none;
|
|
384
|
-
padding: 0;
|
|
385
|
-
cursor: pointer;
|
|
386
|
-
font: inherit;
|
|
387
|
-
color: ${t.colors.muted};
|
|
388
|
-
|
|
389
|
-
&:hover {
|
|
390
|
-
text-decoration: underline;
|
|
391
|
-
}
|
|
392
|
-
&:focus-visible {
|
|
393
|
-
outline: 2px solid ${t.colors.accent};
|
|
394
|
-
outline-offset: 2px;
|
|
395
|
-
}
|
|
396
|
-
`,Mn=n.span`
|
|
397
|
-
font-weight: 700;
|
|
398
|
-
color: ${t.colors.muted};
|
|
399
|
-
`,Pn=n.div`
|
|
400
|
-
display: flex;
|
|
401
|
-
flex-direction: column;
|
|
402
|
-
gap: 48px;
|
|
403
|
-
padding-bottom: 48px;
|
|
404
|
-
background: #ecdbfd;
|
|
405
|
-
border-radius: ${t.radius.banner};
|
|
406
|
-
overflow: hidden;
|
|
407
|
-
|
|
408
|
-
${t.media.maxWidth("mobile")} {
|
|
409
|
-
gap: 32px;
|
|
410
|
-
padding-bottom: 32px;
|
|
411
|
-
}
|
|
412
|
-
`,Wn=n.div`
|
|
413
|
-
position: relative;
|
|
414
|
-
border-radius: ${t.radius.banner};
|
|
415
|
-
overflow: hidden;
|
|
416
|
-
padding: 88px 48px;
|
|
417
|
-
display: flex;
|
|
418
|
-
flex-direction: column;
|
|
419
|
-
align-items: center;
|
|
420
|
-
gap: 48px;
|
|
421
|
-
text-align: center;
|
|
422
|
-
background: radial-gradient(120% 95% at 50% 118%, #d13bd6 0%, #a026b0 28%, #6a1b9c 58%, #4a1173 100%);
|
|
423
|
-
|
|
424
|
-
${t.media.maxWidth("mobile")} {
|
|
425
|
-
padding: 40px 20px;
|
|
426
|
-
gap: 28px;
|
|
427
|
-
}
|
|
428
|
-
`,Bn=n.div`
|
|
429
|
-
display: flex;
|
|
430
|
-
flex-direction: column;
|
|
431
|
-
align-items: center;
|
|
432
|
-
gap: 12px;
|
|
433
|
-
`,Fn=n.h1`
|
|
434
|
-
margin: 0;
|
|
435
|
-
font-family: ${t.font.sans};
|
|
436
|
-
font-weight: 600;
|
|
437
|
-
font-size: 40px;
|
|
438
|
-
line-height: 1.167;
|
|
439
|
-
color: ${t.colors.white};
|
|
440
|
-
|
|
441
|
-
${t.media.maxWidth("mobile")} {
|
|
442
|
-
font-size: 26px;
|
|
443
|
-
}
|
|
444
|
-
`,Ln=n.p`
|
|
445
|
-
margin: 0;
|
|
446
|
-
max-width: 760px;
|
|
447
|
-
font-family: ${t.font.sans};
|
|
448
|
-
font-weight: 500;
|
|
449
|
-
font-size: 24px;
|
|
450
|
-
line-height: 1.334;
|
|
451
|
-
color: #ecebed;
|
|
452
|
-
|
|
453
|
-
${t.media.maxWidth("mobile")} {
|
|
454
|
-
font-size: 16px;
|
|
455
|
-
}
|
|
456
|
-
`,Un=n.div`
|
|
457
|
-
width: min(785px, 100%);
|
|
458
|
-
display: flex;
|
|
459
|
-
flex-direction: column;
|
|
460
|
-
gap: 12px;
|
|
461
|
-
`,Hn=n.div`
|
|
462
|
-
position: relative;
|
|
463
|
-
`,On=n("div",Dt("invalid"))`
|
|
464
|
-
display: flex;
|
|
465
|
-
align-items: center;
|
|
466
|
-
gap: 8px;
|
|
467
|
-
padding: 8px 8px 8px 16px;
|
|
468
|
-
background: ${t.colors.softWhite};
|
|
469
|
-
border: 1.5px solid ${({invalid:o})=>o?t.colors.dclRed:t.colors.line};
|
|
470
|
-
border-radius: 20px;
|
|
471
|
-
|
|
472
|
-
&:focus-within {
|
|
473
|
-
border-color: ${({invalid:o})=>o?t.colors.dclRed:t.colors.magenta};
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
${t.media.maxWidth("mobile")} {
|
|
477
|
-
border-radius: 16px;
|
|
478
|
-
}
|
|
479
|
-
`,Dn=n.span`
|
|
480
|
-
position: absolute;
|
|
481
|
-
left: -9999px;
|
|
482
|
-
top: 0;
|
|
483
|
-
visibility: hidden;
|
|
484
|
-
pointer-events: none;
|
|
485
|
-
white-space: pre;
|
|
486
|
-
font-family: ${t.font.sans};
|
|
487
|
-
font-size: 20px;
|
|
488
|
-
font-weight: 600;
|
|
489
|
-
line-height: 1.6;
|
|
490
|
-
|
|
491
|
-
${t.media.maxWidth("mobile")} {
|
|
492
|
-
font-size: 16px;
|
|
493
|
-
}
|
|
494
|
-
`,Gn=n.div`
|
|
495
|
-
position: absolute;
|
|
496
|
-
top: calc(100% + 8px);
|
|
497
|
-
left: 0;
|
|
498
|
-
right: 0;
|
|
499
|
-
z-index: 2;
|
|
500
|
-
display: flex;
|
|
501
|
-
align-items: center;
|
|
502
|
-
gap: 8px;
|
|
503
|
-
padding: 8px 12px;
|
|
504
|
-
border-radius: 8px;
|
|
505
|
-
background: #ffcdd4;
|
|
506
|
-
color: #ec303a;
|
|
507
|
-
font-family: ${t.font.sans};
|
|
508
|
-
font-size: 14px;
|
|
509
|
-
font-weight: 500;
|
|
510
|
-
line-height: 1.2;
|
|
511
|
-
text-align: left;
|
|
512
|
-
|
|
513
|
-
${t.media.maxWidth("mobile")} {
|
|
514
|
-
position: static;
|
|
515
|
-
margin-top: 8px;
|
|
516
|
-
align-items: flex-start;
|
|
517
|
-
flex-wrap: wrap;
|
|
518
|
-
}
|
|
519
|
-
`,qn=n.a`
|
|
520
|
-
display: inline-flex;
|
|
521
|
-
align-items: center;
|
|
522
|
-
gap: 2px;
|
|
523
|
-
margin-left: auto;
|
|
524
|
-
color: #ec303a;
|
|
525
|
-
font-weight: 600;
|
|
526
|
-
text-decoration: underline;
|
|
527
|
-
text-transform: uppercase;
|
|
528
|
-
white-space: nowrap;
|
|
529
|
-
|
|
530
|
-
${t.media.maxWidth("mobile")} {
|
|
531
|
-
margin-left: 0;
|
|
532
|
-
}
|
|
533
|
-
`,Vn=n.label`
|
|
534
|
-
flex: 1;
|
|
535
|
-
min-width: 0;
|
|
536
|
-
display: flex;
|
|
537
|
-
align-items: center;
|
|
538
|
-
gap: 0;
|
|
539
|
-
cursor: text;
|
|
540
|
-
overflow: hidden;
|
|
541
|
-
`,Kn=n.span`
|
|
542
|
-
flex: none;
|
|
543
|
-
margin-right: 8px;
|
|
544
|
-
font-family: ${t.font.sans};
|
|
545
|
-
font-size: 26px;
|
|
546
|
-
font-weight: 500;
|
|
547
|
-
line-height: 1;
|
|
548
|
-
color: ${t.colors.muted2};
|
|
549
|
-
|
|
550
|
-
${t.media.maxWidth("mobile")} {
|
|
551
|
-
font-size: 20px;
|
|
552
|
-
}
|
|
553
|
-
`,Zn=n.input`
|
|
554
|
-
flex: 0 1 auto;
|
|
555
|
-
min-width: 0;
|
|
556
|
-
max-width: 100%;
|
|
557
|
-
border: 0;
|
|
558
|
-
outline: none;
|
|
559
|
-
background: transparent;
|
|
560
|
-
font-family: ${t.font.sans};
|
|
561
|
-
font-size: 20px;
|
|
562
|
-
font-weight: 600;
|
|
563
|
-
line-height: 1.6;
|
|
564
|
-
color: ${t.colors.text};
|
|
565
|
-
padding: 0;
|
|
566
|
-
|
|
567
|
-
&::placeholder {
|
|
568
|
-
color: ${t.colors.muted1};
|
|
569
|
-
font-weight: 400;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
${t.media.maxWidth("mobile")} {
|
|
573
|
-
font-size: 16px;
|
|
574
|
-
}
|
|
575
|
-
`,Jn=n.span`
|
|
576
|
-
flex: none;
|
|
577
|
-
margin-left: 2px;
|
|
578
|
-
font-family: ${t.font.sans};
|
|
579
|
-
font-size: 20px;
|
|
580
|
-
font-weight: 400;
|
|
581
|
-
line-height: 1.6;
|
|
582
|
-
color: ${t.colors.muted1};
|
|
583
|
-
|
|
584
|
-
${t.media.maxWidth("mobile")} {
|
|
585
|
-
font-size: 16px;
|
|
586
|
-
}
|
|
587
|
-
`,Qn=n.span`
|
|
588
|
-
flex: none;
|
|
589
|
-
font-family: ${t.font.sans};
|
|
590
|
-
font-size: 13px;
|
|
591
|
-
color: ${t.colors.muted2};
|
|
592
|
-
white-space: nowrap;
|
|
593
|
-
`,Fe=n.button`
|
|
594
|
-
flex: none;
|
|
595
|
-
display: inline-flex;
|
|
596
|
-
align-items: center;
|
|
597
|
-
justify-content: center;
|
|
598
|
-
gap: 8px;
|
|
599
|
-
height: 52px;
|
|
600
|
-
padding: 0 24px;
|
|
601
|
-
border: 0;
|
|
602
|
-
border-radius: 12px;
|
|
603
|
-
cursor: pointer;
|
|
604
|
-
background: ${t.gradients.cerise};
|
|
605
|
-
color: ${t.colors.softWhite};
|
|
606
|
-
font-family: ${t.font.sans};
|
|
607
|
-
font-weight: 600;
|
|
608
|
-
font-size: 15px;
|
|
609
|
-
letter-spacing: 0.46px;
|
|
610
|
-
line-height: 24px;
|
|
611
|
-
text-transform: uppercase;
|
|
612
|
-
|
|
613
|
-
&:hover:not(:disabled) {
|
|
614
|
-
filter: brightness(1.05);
|
|
615
|
-
}
|
|
616
|
-
&:focus-visible {
|
|
617
|
-
outline: 2px solid ${t.colors.white};
|
|
618
|
-
outline-offset: 2px;
|
|
619
|
-
}
|
|
620
|
-
&:disabled {
|
|
621
|
-
cursor: not-allowed;
|
|
622
|
-
background: #e7c8e9;
|
|
623
|
-
color: #fbe9fb;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
${t.media.maxWidth("mobile")} {
|
|
627
|
-
display: none;
|
|
628
|
-
}
|
|
629
|
-
`,Xn=n(Fe)`
|
|
630
|
-
display: none;
|
|
631
|
-
|
|
632
|
-
${t.media.maxWidth("mobile")} {
|
|
633
|
-
display: inline-flex;
|
|
634
|
-
width: 100%;
|
|
635
|
-
height: 48px;
|
|
636
|
-
border-radius: 12px;
|
|
637
|
-
}
|
|
638
|
-
`,Yn=n.span`
|
|
639
|
-
display: inline-flex;
|
|
640
|
-
align-items: center;
|
|
641
|
-
gap: 4px;
|
|
642
|
-
font-weight: 600;
|
|
643
|
-
|
|
644
|
-
.ico {
|
|
645
|
-
width: 16px;
|
|
646
|
-
height: 16px;
|
|
647
|
-
}
|
|
648
|
-
`,X=n.div`
|
|
649
|
-
display: flex;
|
|
650
|
-
align-items: center;
|
|
651
|
-
gap: 8px;
|
|
652
|
-
padding: 8px 14px;
|
|
653
|
-
border-radius: 8px;
|
|
654
|
-
font-family: ${t.font.sans};
|
|
655
|
-
font-size: 13px;
|
|
656
|
-
font-weight: 500;
|
|
657
|
-
text-align: left;
|
|
658
|
-
|
|
659
|
-
background: ${({tone:o})=>o==="error"?"rgba(255, 45, 85, 0.12)":o==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
|
|
660
|
-
color: ${({tone:o})=>o==="error"?t.colors.dclRed:o==="ok"?"#0f7a4f":"#ecebed"};
|
|
661
|
-
|
|
662
|
-
.ico {
|
|
663
|
-
width: 16px;
|
|
664
|
-
height: 16px;
|
|
665
|
-
flex: none;
|
|
666
|
-
}
|
|
667
|
-
`,es=n.section`
|
|
668
|
-
display: flex;
|
|
669
|
-
flex-direction: column;
|
|
670
|
-
gap: 48px;
|
|
671
|
-
padding: 0 48px;
|
|
672
|
-
|
|
673
|
-
${t.media.maxWidth("mobile")} {
|
|
674
|
-
gap: 32px;
|
|
675
|
-
padding: 0 20px;
|
|
676
|
-
}
|
|
677
|
-
`,ts=n.div`
|
|
678
|
-
display: flex;
|
|
679
|
-
flex-direction: column;
|
|
680
|
-
align-items: center;
|
|
681
|
-
gap: 24px;
|
|
682
|
-
`,ns=n.h2`
|
|
683
|
-
margin: 0;
|
|
684
|
-
text-align: center;
|
|
685
|
-
font-family: ${t.font.sans};
|
|
686
|
-
font-weight: 600;
|
|
687
|
-
font-size: 32px;
|
|
688
|
-
line-height: 1.167;
|
|
689
|
-
color: ${t.colors.text2};
|
|
690
|
-
|
|
691
|
-
${t.media.maxWidth("mobile")} {
|
|
692
|
-
font-size: 22px;
|
|
693
|
-
}
|
|
694
|
-
`,ss=n.p`
|
|
695
|
-
margin: 0;
|
|
696
|
-
max-width: 907px;
|
|
697
|
-
text-align: center;
|
|
698
|
-
font-family: ${t.font.sans};
|
|
699
|
-
font-weight: 400;
|
|
700
|
-
font-size: 20px;
|
|
701
|
-
line-height: 1.57;
|
|
702
|
-
color: ${t.colors.text};
|
|
703
|
-
|
|
704
|
-
${t.media.maxWidth("mobile")} {
|
|
705
|
-
font-size: 16px;
|
|
706
|
-
}
|
|
707
|
-
`,os=n.div`
|
|
708
|
-
display: grid;
|
|
709
|
-
grid-template-columns: repeat(4, 1fr);
|
|
710
|
-
gap: 24px;
|
|
711
|
-
align-items: stretch;
|
|
712
|
-
|
|
713
|
-
${t.media.maxWidth("lg")} {
|
|
714
|
-
grid-template-columns: repeat(2, 1fr);
|
|
715
|
-
}
|
|
716
|
-
${t.media.maxWidth("mobile")} {
|
|
717
|
-
grid-template-columns: 1fr;
|
|
718
|
-
}
|
|
719
|
-
`,G=n.article`
|
|
720
|
-
min-width: 0;
|
|
721
|
-
display: flex;
|
|
722
|
-
flex-direction: column;
|
|
723
|
-
background: ${t.colors.white};
|
|
724
|
-
border: 0.25px solid ${t.colors.muted2};
|
|
725
|
-
border-radius: ${t.radius.card};
|
|
726
|
-
overflow: hidden;
|
|
727
|
-
`,q=n.img`
|
|
728
|
-
display: block;
|
|
729
|
-
width: 100%;
|
|
730
|
-
aspect-ratio: 388 / 235;
|
|
731
|
-
object-fit: cover;
|
|
732
|
-
`,V=n.div`
|
|
733
|
-
flex: 1;
|
|
734
|
-
display: flex;
|
|
735
|
-
flex-direction: column;
|
|
736
|
-
gap: 6px;
|
|
737
|
-
padding: 12px 16px;
|
|
738
|
-
`,K=n.h3`
|
|
739
|
-
margin: 0;
|
|
740
|
-
font-family: ${t.font.sans};
|
|
741
|
-
font-weight: 700;
|
|
742
|
-
font-size: 20px;
|
|
743
|
-
line-height: 1.57;
|
|
744
|
-
text-transform: uppercase;
|
|
745
|
-
color: ${t.colors.text};
|
|
746
|
-
`,Z=n.p`
|
|
747
|
-
margin: 0;
|
|
748
|
-
font-family: ${t.font.sans};
|
|
749
|
-
font-weight: 400;
|
|
750
|
-
font-size: 14px;
|
|
751
|
-
line-height: 1.57;
|
|
752
|
-
color: ${t.colors.text};
|
|
753
|
-
`,is=n.span`
|
|
754
|
-
font-weight: 600;
|
|
755
|
-
color: ${t.colors.accent};
|
|
756
|
-
`,Re=n.a`
|
|
757
|
-
display: inline-flex;
|
|
758
|
-
align-items: center;
|
|
759
|
-
gap: 2px;
|
|
760
|
-
margin-top: auto;
|
|
761
|
-
font-family: ${t.font.sans};
|
|
762
|
-
font-weight: 500;
|
|
763
|
-
font-size: 14px;
|
|
764
|
-
line-height: 30px;
|
|
765
|
-
color: ${t.colors.accent};
|
|
766
|
-
text-decoration: underline;
|
|
767
|
-
|
|
768
|
-
&:focus-visible {
|
|
769
|
-
outline: 2px solid ${t.colors.accent};
|
|
770
|
-
outline-offset: 2px;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
.ico {
|
|
774
|
-
width: 13px;
|
|
775
|
-
height: 13px;
|
|
776
|
-
}
|
|
777
|
-
`,rs=n.span`
|
|
778
|
-
position: absolute;
|
|
779
|
-
width: 1px;
|
|
780
|
-
height: 1px;
|
|
781
|
-
padding: 0;
|
|
782
|
-
margin: -1px;
|
|
783
|
-
overflow: hidden;
|
|
784
|
-
clip: rect(0, 0, 0, 0);
|
|
785
|
-
white-space: nowrap;
|
|
786
|
-
border: 0;
|
|
787
|
-
`,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(o){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(o)}`}function ds({onBack:o}){Ne({title:s("seo.names.title"),description:s("seo.names.description")});const{session:i,signIn:l}=Ie(),{data:x}=Pe(),c=x?Me(F,x):null,[d,h]=m.useState(""),[p,a]=m.useState("idle"),[u,b]=m.useState(!1),w=m.useRef(null),[j,$]=m.useState(void 0);m.useLayoutEffect(()=>{w.current&&$(w.current.offsetWidth)},[d]),m.useEffect(()=>{if(!ue(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const z=new AbortController,E=setTimeout(()=>{(async()=>{try{const g=await Jt(d,{signal:z.signal});a(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(E),z.abort()}},[d]);const f=ue(d),y=f.ok&&(p==="available"||p==="error");function v(){if(y){if(!i){l();return}b(!0)}}const k=e.jsxs(e.Fragment,{children:[s("names.claim"),c!=null?e.jsxs(Yn,{children:[e.jsx(W,{}),Ae(c)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":s("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:o,children:s("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Mn,{children:s("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsx(Fn,{children:s("names.heroTitle")}),e.jsx(Ln,{children:s("names.heroSubtitle")})]}),e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsxs(On,{invalid:p==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Zn,{value:d,onChange:C=>h(Vt(C.target.value)),placeholder:s("names.inputPlaceholder"),"aria-label":s("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:Q,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Dn,{ref:w,"aria-hidden":!0,children:d||s("names.inputPlaceholder")}),e.jsx(Jn,{children:s("names.suffix")})]}),d.length>0?e.jsxs(Qn,{"aria-hidden":!0,children:[d.length,"/",Q]}):null,e.jsx(Fe,{onClick:v,disabled:!y,"data-testid":"names-claim",children:k})]}),p==="taken"?e.jsxs(Gn,{role:"status","data-testid":"names-taken",children:[e.jsx(_,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:s("names.taken")}),e.jsxs(qn,{href:cs(d),target:"_blank",rel:"noopener noreferrer",children:[s("names.takenMakeOffer"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Xn,{onClick:v,disabled:!y,children:k}),p==="checking"?e.jsx(X,{tone:"muted",role:"status","data-testid":"names-checking",children:s("names.checking")}):p==="error"?e.jsx(X,{tone:"muted",role:"status",children:s("names.checkError")}):p==="invalid"&&!f.ok&&f.reason==="too-short"?e.jsx(X,{tone:"muted",role:"status",children:s("names.tooShort",{min:We})}):null,e.jsx(rs,{role:"status","aria-live":"polite",children:p==="available"?s("names.available",{name:d}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:s("names.whyTitle")}),e.jsx(ss,{children:s("names.whyIntro")})]}),e.jsxs(os,{children:[e.jsxs(G,{children:[e.jsx(q,{src:_n,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:s("names.why1Title")}),e.jsx(Z,{children:s("names.why1")})]})]}),e.jsxs(G,{children:[e.jsx(q,{src:Tn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:s("names.why2Title")}),e.jsxs(Z,{children:[s("names.why2")," ",e.jsx(is,{children:s("names.why2Address")})]}),e.jsxs(Re,{href:as,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(G,{children:[e.jsx(q,{src:Rn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:s("names.why3Title")}),e.jsx(Z,{children:s("names.why3")})]})]}),e.jsxs(G,{children:[e.jsx(q,{src:zn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:s("names.why4Title")}),e.jsx(Z,{children:s("names.why4")}),e.jsxs(Re,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(Sn,{name:d,priceCredits:c,onClose:()=>b(!1)}):null]})}const ps="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",Y=48;function Ms(){const[o]=Ve(),i=ze(),l=(o.get("q")??"").trim().toLowerCase(),x=(o.get("q")??"").trim();Ne({title:x?s("seo.collectibles.searchTitle",{query:x}):s("seo.collectibles.title"),description:s("seo.collectibles.description")});const[c,d]=m.useState("wearable"),[h,p]=m.useState(null),[a,u]=m.useState([]),[b,w]=m.useState(""),[j,$]=m.useState(""),[f,y]=m.useState("on_sale"),[v,k]=m.useState(!1),[C,z]=m.useState("newest"),[E,g]=m.useState(!1);m.useEffect(()=>{if(!E)return;const r=N=>{N.key==="Escape"&&g(!1)};document.addEventListener("keydown",r);const S=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=S}},[E]);const I=f==="on_sale",T=b&&!Number.isNaN(Number(b))?Number(b):void 0,M=j&&!Number.isNaN(Number(j))?Number(j):void 0,Le=rt(),te=h?Tt[h]:void 0,ne=(me.find(r=>r.key===C)??me[0]).server,se={category:c,rarities:a.length?a:void 0,wearableCategories:te,minPriceCredits:T,maxPriceCredits:M,search:l||void 0,sortBy:ne,isSmart:v||void 0,onSale:!0,listingType:Le?void 0:"primary"},oe={category:c,rarities:a.length?a:void 0,wearableCategories:te,search:l||void 0,sortBy:ne,isWearableSmart:v||void 0,isOnSale:f==="not_for_sale"?!1:void 0},{items:L,total:ie,isLoading:R,isPlaceholderData:A,error:re,hasNextPage:Ue,isFetchingNextPage:ae,fetchNextPage:He}=zt(I?["shop-items",se]:["catalog-items",oe],r=>I?ot({...se,first:Y,skip:r}):it({...oe,first:Y,skip:r}),{enabled:c!=="names"}),U=ie,le=R||A,Oe=R?15:Math.min(Math.max(L.length,1),Y),{data:ce,isError:De}=Pe(),Ge=r=>ce&&r.manaWei?Me(r.manaWei,ce):null,de=m.useRef(null);m.useEffect(()=>{R||A||!l||de.current===l||(de.current=l,J("Shop Searched",{query:l,result_count:U}))},[l,R,A,U]);const H=m.useRef("__init__");m.useEffect(()=>{if(R||A)return;const r=JSON.stringify({category:c,subCategory:h,rarities:a,min:T,max:M,sort:C,status:f,smart:v});if(H.current==="__init__"||H.current===r){H.current=r;return}H.current=r,J("Shop Applied Filter",{filters:{category:c,sub_category:h,rarities:a,min_price_credits:T??null,max_price_credits:M??null,status:f,smart:v,sort:C},result_count:U})},[c,h,a,T,M,C,f,v,R,A,U]);function pe(r){d(r),p(null)}function xe(r){u(S=>S.includes(r)?S.filter(N=>N!==r):[...S,r])}function qe(){d("wearable"),p(null),u([]),w(""),$(""),y("on_sale"),k(!1)}const P=[];(T!=null||M!=null)&&P.push({key:"price",label:s("filter.price"),onRemove:()=>{w(""),$("")}});for(const r of Et)a.includes(r)&&P.push({key:`rarity-${r}`,label:st(r),onRemove:()=>xe(r)});return v&&P.push({key:"smart",label:s("filter.smart"),onRemove:()=>k(!1)}),f!=="on_sale"&&P.push({key:"status",label:f==="all"?s("filter.statusAll"):s("filter.notForSale"),onRemove:()=>y("on_sale")}),e.jsxs(lt,{"data-testid":"browse",children:[c!=="names"&&e.jsxs(e.Fragment,{children:[E?e.jsx(ct,{onClick:()=>g(!1),"aria-hidden":!0}):null,e.jsxs(dt,{"data-open":E||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(pt,{children:[e.jsx(xt,{children:s("assets.filters")}),e.jsx(ht,{onClick:()=>g(!1),"aria-label":s("assets.closeFilters"),children:"✕"})]}),e.jsx(ft,{children:e.jsx(mt,{category:c,subCategory:h,onCategory:pe,onSub:p,priceMin:b,priceMax:j,onPriceMin:w,onPriceMax:$,rarities:a,onToggleRarity:xe,status:f,onStatus:y,smart:v,onSmart:k})}),e.jsx(ut,{children:e.jsx(gt,{type:"button",onClick:()=>g(!1),children:s("assets.showItems")})})]})]}),e.jsx(bt,{children:c==="names"?e.jsx(ds,{onBack:()=>pe("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(_t,{sort:C,onSort:z,total:ie,loading:R||A,query:l,onOpenFilters:()=>g(!0),chips:P,onClearChips:qe}),De&&I&&L.some(r=>r.source==="legacy")?e.jsx(yt,{"data-variant":"warn",children:s("assets.marketUnavailable")}):null,re?e.jsx(It,{message:s("assets.loadError"),testId:"browse-error"}):null,!le&&L.length===0&&!re?e.jsxs(wt,{"data-testid":"browse-empty",children:[e.jsx(jt,{src:ps,alt:""}),e.jsxs(vt,{children:[e.jsx($t,{children:s("assets.empty.title")}),e.jsx(Ct,{children:x?e.jsxs(e.Fragment,{children:[s("assets.empty.searchBefore"),e.jsx("b",{children:x}),s("assets.empty.searchAfter")]}):s("assets.empty.filters")})]}),e.jsx(kt,{children:e.jsx(St,{type:"button",onClick:()=>i("/overview"),children:s("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Gt,{"data-testid":"grid",children:le?e.jsx(fe,{count:Oe}):e.jsxs(e.Fragment,{children:[L.map(r=>{if(!I)return e.jsx(O,{item:r,mode:"view"},D(r));const S=r;if(S.source!=="legacy")return e.jsx(O,{item:r},D(r));const N=Ge(S);return N==null?e.jsx(O,{item:r,mode:"view"},D(r)):e.jsx(O,{item:{...S,priceCredits:N}},D(r))}),ae?e.jsx(fe,{count:6}):null]})}),e.jsx(Rt,{hasNextPage:Ue,isFetching:ae,onLoadMore:()=>void He()})]})]})})]})}export{Ms as Assets};
|