@dcl/shop 0.10.1-31042990976.commit-7edc9b6 → 1.0.0
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-CJO4ONwi.js +371 -0
- package/_assets/AnimatedBackground-CHiOSgJ6.js +97 -0
- package/_assets/{Assets-BzPVRWYe.js → Assets-1KVsmH01.js} +8 -8
- package/_assets/{Assets.styles-D4-S4NWG.js → Assets.styles-BUHnZ7Nb.js} +140 -132
- package/_assets/{Authorizations-gGXOHHeT.js → Authorizations-BGlyC4dr.js} +28 -26
- package/_assets/Cart-afrKtZvj.js +707 -0
- package/_assets/{CircularProgress-DNShuaaC.js → CircularProgress-K7JjSpPZ.js} +1 -1
- package/_assets/{Collection-CI_bqtk6.js → Collection-B0G71rJV.js} +19 -19
- package/_assets/CollectionCarousel-B4hzcKRb.js +816 -0
- package/_assets/{Confetti-DkcOmptO.js → Confetti-BBhDY6Q2.js} +1 -1
- package/_assets/{Creator-CFf63R4B.js → Creator-CYC3eVKx.js} +7 -7
- package/_assets/{ErrorNotice-C_rQ_hZp.js → ErrorNotice-CnPcFEw_.js} +1 -1
- package/_assets/{ExchangeController-BPF_kkCP.js → ExchangeController-BAefeOHy.js} +1 -1
- package/_assets/{Faq--E1fBOzk.js → Faq-D03YByjo.js} +20 -14
- package/_assets/{GetCredits-C2rjzPBY.js → GetCredits-Cyw0rRMV.js} +114 -80
- package/_assets/{Grow-CyHu9l8s.js → Grow-CPwRVF9g.js} +1 -1
- package/_assets/{HelpersUtil-Bh7qiwp_.js → HelpersUtil-DJC0aWJi.js} +1 -1
- package/_assets/{ItemDetail-CtR1YHPh.js → ItemDetail-DSuMCjR9.js} +510 -480
- package/_assets/LazyEmoteControls-D-xqLU4A.js +2 -0
- package/_assets/{LoadMore-BQIcG-2Y.js → LoadMore-CMAFsns3.js} +1 -1
- package/_assets/ManaPricingBanner.styles-Bb7BS6EM.js +93 -0
- package/_assets/{MyAssets-Dk_4queh.js → MyAssets-C5lGRPqP.js} +33 -33
- package/_assets/{MyFavorites-yuyxKJv4.js → MyFavorites-C1t1o6Li.js} +12 -11
- package/_assets/{NotFound-rquTctww.js → NotFound-Bdi_fN5j.js} +1 -1
- package/_assets/{NotificationsBell-CFCmzqHj.js → NotificationsBell-BQk3EV9b.js} +1 -1
- package/_assets/{OutfitDetail-BFc4wS6X.js → OutfitDetail-D3Mwl6KR.js} +4 -4
- package/_assets/{OutfitPreview-C214293j.js → OutfitPreview-BpWwkAro.js} +2 -2
- package/_assets/{OutfitStudio-OOy9Y3VP.js → OutfitStudio-BL7OYD9h.js} +1 -1
- package/_assets/{StoreSettings-BpkjL6md.js → StoreSettings-BNhzJJib.js} +1 -1
- package/_assets/{Success-BXjczKuA.js → Success-Cnu7oCbI.js} +1 -1
- package/_assets/{SwapController-CA7wAH0n.js → SwapController-BD23YCPw.js} +1 -1
- package/_assets/{Tooltip-BoJS18Z3.js → Tooltip-tAvMrdFp.js} +1 -1
- package/_assets/{TradeService-DsmKoPxy.js → TradeService-a2JgoWq2.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-DKeivVWe.js → W3MFrameProviderSingleton-CPDmjNiA.js} +3 -3
- package/_assets/{WebCryptoP256-CJPdW9Ug.js → WebCryptoP256-DIEJtB0I.js} +1 -1
- package/_assets/{authorizations-2Xd-ft_C.js → authorizations-HgwrWkaa.js} +1 -1
- package/_assets/{basic-CpO7N7NV.js → basic-B3qEjJvY.js} +1 -1
- package/_assets/{biconomy-HF5uwOUc.js → biconomy-CzcDC8vB.js} +1 -1
- package/_assets/{builder-uBBMnbtK.js → builder-TZGldT6a.js} +1 -1
- package/_assets/{buy-CgUGATyG.js → buy-CuFubBZY.js} +1 -1
- package/_assets/{buy-gasless-CVTH5KGZ.js → buy-gasless-DO6cBuJ3.js} +1 -1
- package/_assets/{categories-yTyOCTA2.js → categories-B3DJZe02.js} +54 -54
- package/_assets/{ccip-Bq1h60c1.js → ccip-CB03B_MW.js} +1 -1
- package/_assets/{ccip-BjT8ndU2.js → ccip-VI2-jJnV.js} +1 -1
- package/_assets/collectionPage.styles-DXfFyRiH.js +49 -0
- package/_assets/{controller-CBtSaaQD.js → controller-CEo6ipG_.js} +2 -2
- package/_assets/{core-CIuOeePP.js → core-DmqfUS4f.js} +4 -4
- package/_assets/{createSvgIcon-Dax4uwaL.js → createSvgIcon-WfOAVB94.js} +4 -4
- package/_assets/{custom-CYUokIbm.js → custom-bIxIBqCn.js} +1 -1
- package/_assets/{data-capture-6P55-IaB.js → data-capture-Dtaj6ehs.js} +1 -1
- package/_assets/disposePreview-5vjiqVZ0.js +1 -0
- package/_assets/{email-nYmfz15C.js → email-DBXWS-p0.js} +1 -1
- package/_assets/{embedded-wallet-D_e_UWzV.js → embedded-wallet-DqlpsZRk.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-s1GWUoDX.js → emotion-styled.browser.esm-pOAX0dMa.js} +1 -1
- package/_assets/{engine-CpLQoIqI.js → engine-gP8vp-2g.js} +1 -1
- package/_assets/{errors-hu6Xw0D2.js → errors-WNvNILsF.js} +1 -1
- package/_assets/{estimate-l1-fee-CLRDa6fI.js → estimate-l1-fee-X1cvAsdL.js} +1 -1
- package/_assets/{execute-DqPg9Ksw.js → execute-V2l_cDAW.js} +2 -2
- package/_assets/{features-BtrrmffG.js → features-CFR_-yBt.js} +1 -1
- package/_assets/{fetchTokenMetadata-DFJ36WnI.js → fetchTokenMetadata-Do5GLuIQ.js} +2 -2
- package/_assets/{field.styles-XpeJ0COA.js → field.styles-ciG_OcBi.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-DlCx83R8.js → get-ecosystem-wallet-info-CyDTxLgQ.js} +1 -1
- package/_assets/{getBalance-B5ocM9g2.js → getBalance-7wKu8RUe.js} +1 -1
- package/_assets/{getNFT-oiyevCuO.js → getNFT-BbpUiMXR.js} +1 -1
- package/_assets/{getNFT-DBaH5cpy.js → getNFT-DecLUThv.js} +1 -1
- package/_assets/{grid.styles-Dpb8Greh.js → grid.styles-Caahz6PS.js} +1 -1
- package/_assets/{hashTypedData-CeLfcFPQ.js → hashTypedData-C9kgxiiE.js} +1 -1
- package/_assets/{hashTypedData-NanWeJ-D.js → hashTypedData-Ca524zaX.js} +1 -1
- package/_assets/hero-credits-mobile-C9Muog4T.webp +0 -0
- package/_assets/{in-app-DfEVZ7ts.js → in-app-B-disnkm.js} +1 -1
- package/_assets/{in-app-wallet-calls-CaankqgP.js → in-app-wallet-calls-3yighozE.js} +1 -1
- package/_assets/{index-De-xiANX.js → index--1pBMb8n.js} +1 -1
- package/_assets/{index-BNnBkkJr.js → index-2-BWsekC.js} +1 -1
- package/_assets/{index-DxUWfPTE.js → index-8xcbpK09.js} +1 -1
- package/_assets/{index-Dyf04oQ8.js → index-B6l73M7K.js} +1 -1
- package/_assets/{index-BJ6fvgAM.js → index-BBX5Tona.js} +1 -1
- package/_assets/{index-_l18b6D8.js → index-BLCTVSaC.js} +1 -1
- package/_assets/{index-CYd-9A8i.js → index-BMFVFrWl.js} +3 -3
- package/_assets/{index-CaH_IfZ9.js → index-BQB7qYN1.js} +1 -1
- package/_assets/index-BYP7oMPZ.css +1 -0
- package/_assets/{index-BMGdvlP9.js → index-Bd7SNoIN.js} +2 -2
- package/_assets/{index-OiVd03k_.js → index-BdQllJHM.js} +1 -1
- package/_assets/{index-Cbb2oZ2Y.js → index-BjEDpwxR.js} +1 -1
- package/_assets/{index-B4WRMX84.js → index-BrU_i04f.js} +1 -1
- package/_assets/{index-BGSoCmOn.js → index-BuImQh6o.js} +1 -1
- package/_assets/{index-COqbI5lZ.js → index-C3MGLBUO.js} +1 -1
- package/_assets/index-C616xNgB.js +3699 -0
- package/_assets/{index-DI0-gUeO.js → index-CAl290ro.js} +1 -1
- package/_assets/{index-BPoXI4qO.js → index-CEDBhmGn.js} +1 -1
- package/_assets/{index-C8Cm7Ukd.js → index-CEnhHz30.js} +1 -1
- package/_assets/{index-BC1n3NBn.js → index-CFziwAGz.js} +1 -1
- package/_assets/{index-DJxot5zE.js → index-CGcb9Mz3.js} +1 -1
- package/_assets/{index-DxD-NQZ2.js → index-CKkE-eRE.js} +1 -1
- package/_assets/{index-cpjoojGa.js → index-CONyzZZC.js} +3 -3
- package/_assets/{index-BHzYL11-.js → index-CO_xP_3N.js} +1 -1
- package/_assets/{index-BqVSjccZ.js → index-CUAEZ5zJ.js} +1 -1
- package/_assets/index-CZBUgvRB.js +1 -0
- package/_assets/{index-BXdpk7Oq.js → index-CdFrv2eV.js} +1 -1
- package/_assets/{index-zPBk9zxn.js → index-CjhGjrdW.js} +1 -1
- package/_assets/{index-w9D58X3R.js → index-CmlH9TBP.js} +1 -1
- package/_assets/{index-enm6a-Yh.js → index-CyITvpDL.js} +1 -1
- package/_assets/{index-UiKz3U--.js → index-D58OkhU1.js} +1 -1
- package/_assets/{index-BKYIrw8q.js → index-D9iAFl4E.js} +1 -1
- package/_assets/{index-CWMeoaW8.js → index-DCAUOF_r.js} +1 -1
- package/_assets/{index-B-kvIPu1.js → index-DCMLwiSR.js} +1 -1
- package/_assets/{index-CPOch-_L.js → index-DEw1jYQT.js} +1 -1
- package/_assets/{index-Bry4nBQ3.js → index-DJOlt1Iv.js} +1 -1
- package/_assets/{index-Bu9Qy6np.js → index-DKghJgJj.js} +1 -1
- package/_assets/{index-CaRe7gid.js → index-DNvcQt0s.js} +3 -3
- package/_assets/{index-jzVm2M_d.js → index-DRI1gQSo.js} +1 -1
- package/_assets/{index-gR7VkXwX.js → index-DUmo7598.js} +3 -3
- package/_assets/{index-BccvdHMd.js → index-Dag4zALf.js} +1 -1
- package/_assets/index-DsH_mBtT.js +622 -0
- package/_assets/{index-BntzHAg5.js → index-DvjyzmjB.js} +1 -1
- package/_assets/{index-T6PQTPj1.js → index-DxB85HDB.js} +1 -1
- package/_assets/{index-ChhX0J8g.js → index-Eip3e8N8.js} +1 -1
- package/_assets/{index-CQMg581G.js → index-Gw3Mauv_.js} +1 -1
- package/_assets/{index-CkvT2_Qp.js → index-JuH5W7YS.js} +2 -2
- package/_assets/{index-D9avTVnT.js → index-N5sgh9IC.js} +1 -1
- package/_assets/{index-CIJje8vF.js → index-o0b8cjRQ.js} +1 -1
- package/_assets/{index-Deo0xkWr.js → index-p0fxtTsZ.js} +2 -2
- package/_assets/{index-FaWeourd.js → index-p4Ph7ugv.js} +1 -1
- package/_assets/{index-B0jVlmk0.js → index-tCYP1O3W.js} +1 -1
- package/_assets/{index-BZQS2qMR.js → index-yiECqJCb.js} +1 -1
- package/_assets/{index.es-DZrZt1nk.js → index.es-C5PJ78RX.js} +1 -1
- package/_assets/{index.es-COh1P5q0.js → index.es-D73EniUm.js} +1 -1
- package/_assets/{index.es-DKfCNVgZ.js → index.es-DF_hlZIu.js} +4 -4
- package/_assets/{localBatchGatewayRequest-BI4PJuWG.js → localBatchGatewayRequest-DvkdRgNo.js} +1 -1
- package/_assets/{networks-Blxn8DDe.js → networks-7b-i0dnd.js} +1 -1
- package/_assets/{onramp-Dy-wl2-G.js → onramp-CoF8bFaS.js} +1 -1
- package/_assets/{openzeppelin-BMYbmCTg.js → openzeppelin-DcsEW8tQ.js} +1 -1
- package/_assets/{parseNft-C3NZ6wub.js → parseNft-CNJ2CwyE.js} +2 -2
- package/_assets/{parseSignature-DYiE9TKW.js → parseSignature-D0-1k6Yx.js} +1 -1
- package/_assets/{parseSignature-C_OIotiZ.js → parseSignature-whU_pkfu.js} +3 -3
- package/_assets/{passkeys-B1XwJZLc.js → passkeys-SqHHDvyI.js} +1 -1
- package/_assets/{pay-with-exchange-CNHEYWhj.js → pay-with-exchange-Cvr7dd94.js} +1 -1
- package/_assets/promo-best-rated-emotes-C6kNvB-a.png +0 -0
- package/_assets/promo-week-selected-outfits-BBmkZYZx.png +0 -0
- package/_assets/{qr-overlay-xYKFPsA7.js → qr-overlay-HlBTd234.js} +1 -1
- package/_assets/{receive-CZ46hzUV.js → receive-HPltMi_i.js} +1 -1
- package/_assets/{resolveImplementation-CjcXKJyr.js → resolveImplementation-CM1yFlGf.js} +1 -1
- package/_assets/{rpc-CcyaVsGv.js → rpc-CPS_djFB.js} +1 -1
- package/_assets/{secp256k1-CKJqWWFY.js → secp256k1-CQmdb_AD.js} +1 -1
- package/_assets/{secp256k1-CtAF_8et.js → secp256k1-ChRNiO68.js} +1 -1
- package/_assets/{secp256k1-ZiNVKyYC.js → secp256k1-DUTfCpIK.js} +1 -1
- package/_assets/{send-batch-transaction-BjDzAjfB.js → send-batch-transaction-Vn4JOFM5.js} +1 -1
- package/_assets/{send-eip712-transaction-C_cuPsBN.js → send-eip712-transaction-Qvibiwhe.js} +2 -2
- package/_assets/{send-gasless-transaction-nJMNrEi5.js → send-gasless-transaction-DQLcvFHt.js} +2 -2
- package/_assets/{send-transaction-DlrF4JVI.js → send-transaction-CZ0kapdy.js} +2 -2
- package/_assets/{send-C3JUT-Wt.js → send-zy_Vr6BQ.js} +1 -1
- package/_assets/{sendMetaTransaction-CYTRgQS4.js → sendMetaTransaction-Ba_-1nOk.js} +1 -1
- package/_assets/{sendRawTransaction-CrjHCLLH.js → sendRawTransaction-BUz1EYd8.js} +3 -3
- package/_assets/{serializeTransaction-DCwr_uqm.js → serializeTransaction-B8qCVIIu.js} +1 -1
- package/_assets/{session-proposal-Cr_4TYaU.js → session-proposal-BqO43SKO.js} +1 -1
- package/_assets/{session-request-VECe4LIn.js → session-request-DbQI-hjo.js} +2 -2
- package/_assets/{signing-DsQKDYvj.js → signing-CVGndCRE.js} +3 -3
- package/_assets/{skeleton.styles-B5haYcet.js → skeleton.styles-K9f1Sxf1.js} +1 -1
- package/_assets/{socials-B80b3Xbl.js → socials-CNOGl_eO.js} +1 -1
- package/_assets/{styled-qF6AFIDl.js → styled-CljNQW-J.js} +1 -1
- package/_assets/{swaps-9KfTzTvK.js → swaps-D5haogfk.js} +1 -1
- package/_assets/{thirdweb-C31f21KI.js → thirdweb-CC2bk-Up.js} +3 -3
- package/_assets/{to-serializable-transaction-DRO125BM.js → to-serializable-transaction-BB0M9pw8.js} +2 -2
- package/_assets/{transactionReceipt-D2IEagp9.js → transactionReceipt-puJsrtjz.js} +1 -1
- package/_assets/{transactions-COJcFMl1.js → transactions-BnYHwdat.js} +1 -1
- package/_assets/{useCreditPacks-UUgawD-U.js → useCreditPacks-xyyhS_80.js} +1 -1
- package/_assets/{useImportable-DdzyhNKj.js → useImportable-Bh7jH6e9.js} +1 -1
- package/_assets/{useInfiniteGrid-CWAXtPPS.js → useInfiniteGrid-CV4TXaLn.js} +1 -1
- package/_assets/{useTheme-nSt_zjh9.js → useTheme-Czw2-J4G.js} +1 -1
- package/_assets/{verifyHash-3joPxTRt.js → verifyHash-CAYWYGEG.js} +1 -1
- package/_assets/{w3m-modal-fllBGzZL.js → w3m-modal-DtofW43q.js} +1 -1
- package/_assets/{w3m-modal-BdMUp7-V.js → w3m-modal-Fr29zvJe.js} +1 -1
- package/_assets/{wait-for-tx-receipt-DLk5rirA.js → wait-for-tx-receipt-mfzWqQ40.js} +1 -1
- package/_assets/{wallets-p_5_3A7U.js → wallets-DT2LKaVF.js} +5 -5
- package/_assets/{web-connector-B1ItZy3i.js → web-connector-4TZSYYzx.js} +3 -3
- package/_assets/{writeContract-_6f7I-3C.js → writeContract-CEQ0n4-z.js} +1 -1
- package/_assets/{zoraTestnet-BegtFmVb.js → zoraTestnet-Cd1Th5ww.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-Cx-gKp62.js +0 -381
- package/_assets/AnimatedBackground-yDvJglBx.js +0 -97
- package/_assets/Cart-C4zUzYSx.js +0 -669
- package/_assets/CollectionCarousel-BAwS8rTZ.js +0 -804
- package/_assets/LazyEmoteControls-BUp4tFZX.js +0 -2
- package/_assets/ManaPricingBanner.styles-Dj_122X4.js +0 -74
- package/_assets/collectionPage.styles-BOOK4JE1.js +0 -48
- package/_assets/disposePreview-C6zVmkpS.js +0 -1
- package/_assets/index-BL2RPpVH.js +0 -3390
- package/_assets/index-C3zA3tgr.js +0 -519
- package/_assets/index-D-NhBWWr.css +0 -1
- package/_assets/index-sW8OdK66.js +0 -1
- package/_assets/packs-backdrop-BcXiUPeP.webp +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-B3DJZe02.js";import{c as W,r as tt,bn as nt,bo as st,aD as rt,a as it,s,t,o as Me,bd as ot,A as at,L as fe,b as n,y as lt,I as _,z as A,b_ as Y,bc as ct,$ as Q,bs as dt,br as pt,x as Ne,ap as Pe,n as We,q as ht,an as xt,ar as Se,as as D,aH as ft,bL as mt}from"./index-C616xNgB.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 _t,v as Tt,p as Rt,q as zt,r as It,s as At,t as Mt}from"./Assets.styles-BUHnZ7Nb.js";import{L as Nt}from"./LoadMore-CMAFsns3.js";import{u as Pt}from"./useInfiniteGrid-CV4TXaLn.js";import{E as Wt}from"./ErrorNotice-CnPcFEw_.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-DO6cBuJ3.js";import{s as Ot,k as Dt}from"./buy-CuFubBZY.js";import{f as Gt}from"./errors-WNvNILsF.js";import{J as qt,C as Vt,B as me}from"./ethers-BDpbhgX6.js";import{n as Zt}from"./Tooltip-tAvMrdFp.js";import{G as Kt}from"./grid.styles-Caahz6PS.js";import"./skeleton.styles-K9f1Sxf1.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-HgwrWkaa.js";import"./sendMetaTransaction-Ba_-1nOk.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)"],_e={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)?_e.mainnet:_e.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
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -161,12 +161,12 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
161
161
|
&:focus-within {
|
|
162
162
|
border-color: ${t.colors.magenta};
|
|
163
163
|
}
|
|
164
|
-
`,
|
|
164
|
+
`,fn=s.span`
|
|
165
165
|
flex: none;
|
|
166
166
|
font-family: ${t.font.sans};
|
|
167
167
|
font-size: 18px;
|
|
168
168
|
color: ${t.colors.muted2};
|
|
169
|
-
`,
|
|
169
|
+
`,mn=s.input`
|
|
170
170
|
flex: 0 1 auto;
|
|
171
171
|
min-width: 0;
|
|
172
172
|
border: 0;
|
|
@@ -186,7 +186,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
186
186
|
font-family: ${t.font.sans};
|
|
187
187
|
font-size: 16px;
|
|
188
188
|
color: ${t.colors.muted2};
|
|
189
|
-
`,
|
|
189
|
+
`,Te=s.button`
|
|
190
190
|
margin-top: 16px;
|
|
191
191
|
width: 100%;
|
|
192
192
|
height: 52px;
|
|
@@ -379,7 +379,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
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,
|
|
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 T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=T}},[$,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",z=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(_,{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(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(Te,{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>@${_n(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(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(Te,{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:z?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(_,{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(_,{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(ze,{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(_,{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(_,{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(ze,{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 _n(r){return r.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const Tn="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/identity-B4DXDuJP.webp",Rn="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/governance-DnazlIjy.webp",An=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,Mn=s.nav`
|
|
@@ -473,7 +473,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
473
473
|
gap: 12px;
|
|
474
474
|
`,On=s.div`
|
|
475
475
|
position: relative;
|
|
476
|
-
`,
|
|
476
|
+
`,Dn=s("div",Zt("invalid"))`
|
|
477
477
|
display: flex;
|
|
478
478
|
align-items: center;
|
|
479
479
|
gap: 8px;
|
|
@@ -489,7 +489,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
489
489
|
${t.media.maxWidth("mobile")} {
|
|
490
490
|
border-radius: 16px;
|
|
491
491
|
}
|
|
492
|
-
`,
|
|
492
|
+
`,Gn=s.span`
|
|
493
493
|
position: absolute;
|
|
494
494
|
left: -9999px;
|
|
495
495
|
top: 0;
|
|
@@ -798,4 +798,4 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
798
798
|
clip: rect(0, 0, 0, 0);
|
|
799
799
|
white-space: nowrap;
|
|
800
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"),[m,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 f=Ee(d),b=f.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,{}),me(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(Gn,{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(Dn,{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"&&!f.ok&&f.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(Ie,{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:zn,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:In,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(J,{children:n("names.why4")}),e.jsxs(Ie,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),m?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:m,priceMax:g,smart:u,sort:v}=d,j=d.category,f=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 I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=I}},[b]);const C=f==="on_sale",k=m&&!Number.isNaN(Number(m))?Number(m):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:f==="not_for_sale"?!1:void 0},{items:z,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?mt({...F,first:xe,skip:i}):ft({...L,first:xe,skip:i}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:Ge}=Pe(),De=i=>ye&&i.manaWei?We(i.manaWei,ye):null,qe=C&&Ge&&z.some(i=>i.source==="legacy"),we=_||R||qe,Ve=_?15:Math.min(Math.max(z.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:f,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:f,smart:u,sort:v},result_count:U})},[j,c,a,k,E,v,f,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(I=>I!==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})}),f!=="on_sale"&&P.push({key:"status",label:f==="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:m,priceMax:g,onPriceMin:i=>p({priceMin:i}),onPriceMax:i=>p({priceMax:i}),rarities:a,onToggleRarity:Ce,status:f,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&&z.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&&z.length===0&&!ge?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:hs,alt:""}),e.jsxs(Rt,{children:[e.jsx(zt,{children:n("assets.empty.title")}),e.jsx(It,{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:[z.map(i=>{if(!C)return e.jsx(G,{item:i,mode:"view"},D(i));const I=i;if(I.source!=="legacy")return e.jsx(G,{item:i},D(i));const O=De(I);return O==null?e.jsx(G,{item:i,mode:"view"},D(i)):e.jsx(G,{item:{...I,priceCredits:O}},D(i))}),be?e.jsx(Se,{count:6}):null]})}),e.jsx(Nt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Ms as Assets};
|
|
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(_,{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(_,{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:Tn,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(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,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:In,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(J,{children:n("names.why4")}),e.jsxs(Ie,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{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 I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=I}},[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:z,total:y,isLoading:T,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&&z.some(i=>i.source==="legacy"),we=T||R||qe,Ve=T?15:Math.min(Math.max(z.length,1),xe),je=w.useRef(null);w.useEffect(()=>{T||R||!l||je.current===l||(je.current=l,Q("Shop Searched",{query:l,result_count:U}))},[l,T,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(T||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,T,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(I=>I!==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:T||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.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&&z.length===0&&!ge?e.jsxs(_t,{"data-testid":"browse-empty",children:[e.jsx(Tt,{src:hs,alt:""}),e.jsxs(Rt,{children:[e.jsx(zt,{children:n("assets.empty.title")}),e.jsx(It,{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:[z.map(i=>{if(!C)return e.jsx(D,{item:i,mode:"view"},G(i));const I=i;if(I.source!=="legacy")return e.jsx(D,{item:i},G(i));const O=Ge(I);return O==null?e.jsx(D,{item:i,mode:"view"},G(i)):e.jsx(D,{item:{...I,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};
|