@dcl/shop 0.1.0-30612955316.commit-0d9b744 → 0.1.0-30633401379.commit-5cd1c31
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-BHKoZZp5.js +291 -0
- package/assets/{AnimatedBackground-DTgtqP8R.js → AnimatedBackground-BlD5oHcR.js} +2 -2
- package/assets/{Assets-B9KXwYG0.js → Assets-DUKvbfgo.js} +7 -7
- package/assets/{Assets.styles-Dm_MgfhY.js → Assets.styles-BLCNmjO6.js} +1 -1
- package/assets/{Authorizations--gatNHIW.js → Authorizations-6n5FWz0U.js} +1 -1
- package/assets/Cart-D7ktjzZK.js +695 -0
- package/assets/{CircularProgress-BRaMu2HF.js → CircularProgress-CMZVAt1l.js} +1 -1
- package/assets/{Collection-BIR5xrVe.js → Collection-CQps3SAa.js} +1 -1
- package/assets/{CollectionCarousel-oh8d08gi.js → CollectionCarousel-CrTrsXB-.js} +1 -1
- package/assets/{Creator-jKJMNfvf.js → Creator-DeBO0_hP.js} +2 -2
- package/assets/{ErrorNotice-C2qBxBzo.js → ErrorNotice-DwhdhAu6.js} +1 -1
- package/assets/{ExchangeController-BJ20Rri0.js → ExchangeController-DFaPYxag.js} +1 -1
- package/assets/{GetCredits-DWkdHCSk.js → GetCredits-CH0SxGoe.js} +8 -8
- package/assets/{HelpersUtil-Bc_-rYa4.js → HelpersUtil-CGxvruiS.js} +1 -1
- package/assets/{ImportListings-C61E-WD4.js → ImportListings-D3Q-MYHt.js} +8 -8
- package/assets/{ItemDetail-BFNeFxLh.js → ItemDetail-grsXVByw.js} +3 -3
- package/assets/{LoadMore-BI2cyij4.js → LoadMore-CVBNO6CV.js} +1 -1
- package/assets/{MenuList-CsoSKANx.js → MenuList-D5vC383J.js} +1 -1
- package/assets/{MyAssets-B8jlwAvA.js → MyAssets-B4-suVif.js} +1 -1
- package/assets/{MyFavorites-B6kCgq1h.js → MyFavorites-rQde9LEq.js} +1 -1
- package/assets/{NotFound-CWtlpg63.js → NotFound-CICAlcY2.js} +1 -1
- package/assets/{NotificationsBell-wPKuEs_b.js → NotificationsBell-BcUtKYE_.js} +1 -1
- package/assets/{StoreSettings-BW2EY9gn.js → StoreSettings-D-p-KMUm.js} +1 -1
- package/assets/Success-CKUShs2s.js +276 -0
- package/assets/{SwapController-DHr7xvAI.js → SwapController-BqpEkXCy.js} +1 -1
- package/assets/{Tooltip-DFmfpHxa.js → Tooltip-v8d4_GhH.js} +1 -1
- package/assets/{TradeService-BxS-ssTi.js → TradeService-CMvEMasH.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-D3RatyJZ.js → W3MFrameProviderSingleton-MrB8u6EW.js} +3 -3
- package/assets/{WebCryptoP256-DLlMYv1t.js → WebCryptoP256-CP0xBKi2.js} +1 -1
- package/assets/{authorizations-BrAVsIY_.js → authorizations-uQp0Tner.js} +1 -1
- package/assets/{basic-B1iPuZqz.js → basic-B_OSMlWi.js} +1 -1
- package/assets/{biconomy-CReC5_o1.js → biconomy-DrNdbDOV.js} +1 -1
- package/assets/{browseLayout.styles-Ck-h2OX5.js → browseLayout.styles-B5gAAnD7.js} +5 -5
- package/assets/{builder-BW_vsdgs.js → builder-BH8bW8w3.js} +1 -1
- package/assets/buy-DI2htlf2.js +1 -0
- package/assets/{buy-gasless-DoEdxK3L.js → buy-gasless-D3ucK012.js} +1 -1
- package/assets/{categories-P1zgLmzy.js → categories-CUWn-vWY.js} +1 -1
- package/assets/{ccip-BHjcKqJV.js → ccip-D4QJIvrM.js} +1 -1
- package/assets/{ccip-CZBbVQi3.js → ccip-zHeTh1U3.js} +1 -1
- package/assets/{clsx-DhFqZi_3.js → clsx-C78Se7VZ.js} +2 -2
- package/assets/{controller-DGy85CgR.js → controller-BICwQmay.js} +2 -2
- package/assets/{core-Db5S1VHS.js → core-BpePoapT.js} +4 -4
- package/assets/{createSvgIcon-DLpGC0um.js → createSvgIcon-D6bh0MrS.js} +3 -3
- package/assets/{custom-ClweN61f.js → custom-DIlU15wg.js} +1 -1
- package/assets/{data-capture-z84EsTtU.js → data-capture-DF5W_J8T.js} +1 -1
- package/assets/{email-CcLkWyvu.js → email-CLMX01kZ.js} +1 -1
- package/assets/{embedded-wallet-COy2jXd-.js → embedded-wallet-CbYQTubx.js} +1 -1
- package/assets/{emotion-styled.browser.esm-Bl0xNQms.js → emotion-styled.browser.esm-uimCutsp.js} +1 -1
- package/assets/{engine-D5VFTt2U.js → engine-Bobn5NnI.js} +1 -1
- package/assets/{errors-D660SWgT.js → errors-BHapDldI.js} +1 -1
- package/assets/{estimate-l1-fee-D0AZXU9d.js → estimate-l1-fee-Zo4D8zNV.js} +1 -1
- package/assets/{execute-B7xe5F3I.js → execute-B3koRsQT.js} +2 -2
- package/assets/{features-CDbo6Rgb.js → features-29eUittk.js} +1 -1
- package/assets/{fetchTokenMetadata-CTdt9CEd.js → fetchTokenMetadata-BVVFFsly.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-DSZkSx4X.js → get-ecosystem-wallet-info-Fbs6oNmw.js} +1 -1
- package/assets/{getBalance-BDX5XOeM.js → getBalance-BynOYuPH.js} +1 -1
- package/assets/{getNFT-CVs2H6Tl.js → getNFT-C7BU-05F.js} +1 -1
- package/assets/{getNFT-DINbSeyy.js → getNFT-CHPhy1te.js} +1 -1
- package/assets/{getThemeProps-CGtqDWEq.js → getThemeProps-BCb3jyqf.js} +1 -1
- package/assets/{grid.styles-D4B-EHGj.js → grid.styles-CFlLjGWA.js} +1 -1
- package/assets/{hashTypedData-Dz79Rf5q.js → hashTypedData-BmEKHoZL.js} +1 -1
- package/assets/{hashTypedData-B7lV4LZj.js → hashTypedData-CixGH523.js} +1 -1
- package/assets/{import-DSm0v4af.js → import-xE4hDmDm.js} +1 -1
- package/assets/{in-app-C5pWpM6r.js → in-app-BcKmOV8m.js} +1 -1
- package/assets/{in-app-wallet-calls-DXx7lWeR.js → in-app-wallet-calls-BI1PaW_x.js} +1 -1
- package/assets/{index-ODLNljC7.js → index-9WfG_CLW.js} +1 -1
- package/assets/{index-CJgXTNhS.js → index-ASq7s2Iv.js} +2 -2
- package/assets/{index-BobbFiKW.js → index-B0eTctvC.js} +1 -1
- package/assets/{index-D7R57an8.js → index-B439DG-9.js} +2 -2
- package/assets/{index-BZocXWA4.js → index-BAORCNZn.js} +1 -1
- package/assets/{index-G1xB9dvf.js → index-BFzvJeyM.js} +1 -1
- package/assets/{index-Cl-v7TvL.js → index-BHVh9ZD-.js} +1 -1
- package/assets/{index-yJi2QIJf.js → index-BMIuNfCB.js} +252 -252
- package/assets/{index-CZTqkynu.js → index-BTOrBWcS.js} +1 -1
- package/assets/{index-b_a6Xe2g.js → index-BUo3wAlN.js} +3 -3
- package/assets/{index-1koyBXBc.js → index-Bb9TuCMN.js} +1 -1
- package/assets/{index-B81PeozV.js → index-BdDw5syJ.js} +1 -1
- package/assets/{index-xZ3i_Adn.js → index-Bdx6vg6T.js} +1 -1
- package/assets/{index-tdQJ2A6x.js → index-Bler0kM4.js} +1 -1
- package/assets/{index-3ZTohoUZ.js → index-C7EZCMfv.js} +1 -1
- package/assets/{index-BBkUTtNV.js → index-CG3EVA6i.js} +2 -2
- package/assets/{index-P_XHlb3T.js → index-CP0MJS3n.js} +1 -1
- package/assets/{index-frQRdZ2q.js → index-CSzz0-yL.js} +1 -1
- package/assets/{index-BFSsZJPW.js → index-CY9EBgzo.js} +1 -1
- package/assets/{index-DiOmLLPI.js → index-CgOcSf2Q.js} +1 -1
- package/assets/{index-CdsKR_zs.js → index-CkfB4xYf.js} +1 -1
- package/assets/{index-CZ1tNVf6.js → index-CpKxcKSt.js} +1 -1
- package/assets/{index-B8zb5Fyq.js → index-CsCFxm9l.js} +1 -1
- package/assets/{index-DZg10nMY.js → index-CugdcJ5p.js} +1 -1
- package/assets/{index-gKwUmrp3.js → index-CvuWb2er.js} +1 -1
- package/assets/{index-BgoikptS.js → index-D-jdrajA.js} +1 -1
- package/assets/{index-DfTLbDYm.js → index-D6z3Iok7.js} +1 -1
- package/assets/{index-DQ2sE8uD.js → index-DA1IdQid.js} +1 -1
- package/assets/{index-DMjEzVVJ.js → index-DCUYsq3Z.js} +1 -1
- package/assets/{index-1c_qW8yi.js → index-DI-G5L8D.js} +1 -1
- package/assets/{index-C0LSKXhw.js → index-DJGQazF5.js} +1 -1
- package/assets/{index-C0odNd_G.js → index-DNLfbOQJ.js} +1 -1
- package/assets/{index-CuPPMOVj.js → index-DfVobYmm.js} +1 -1
- package/assets/{index-C-C5pEJc.js → index-DmnyvmGd.js} +1 -1
- package/assets/{index-CpqhaC2H.js → index-DpjOr79p.js} +1 -1
- package/assets/{index-DjbRx8bI.js → index-DzCJVhsv.js} +1 -1
- package/assets/{index-CXntdDwE.js → index-Eco3bQ72.js} +2 -2
- package/assets/{index-CwVjvkdk.js → index-FvB9JTSh.js} +1 -1
- package/assets/{index-DU8_EWWx.js → index-H02HAhZo.js} +1 -1
- package/assets/{index-CzByZQWv.js → index-LL0BV6rh.js} +1 -1
- package/assets/{index-CLBmEx6A.js → index-MsJgZMgr.js} +3 -3
- package/assets/{index-Dr4K4hFL.js → index-R3pS6x6y.js} +3 -3
- package/assets/{index-CX5Ekh69.js → index-dXYc2QRl.js} +1 -1
- package/assets/{index-CkBDyoGg.js → index-hwCoxi9L.js} +1 -1
- package/assets/{index-BJ-25Q5l.js → index-ldblNYIT.js} +1 -1
- package/assets/{index-CbITlqFn.js → index-n-ShiY2h.js} +1 -1
- package/assets/{index-DIR4uPmO.js → index-oFYHMIzO.js} +1 -1
- package/assets/{index-Cw6mXTIQ.js → index-rFh28dtY.js} +1 -1
- package/assets/{index-CKEG3W2m.js → index-wfubccp5.js} +1 -1
- package/assets/{index-Dw4Gh8Hk.js → index-wnx7vlu-.js} +2 -2
- package/assets/{index-NPIY1Vbs.js → index-xk15qzPN.js} +1 -1
- package/assets/{index.es-CdLNKigl.js → index.es-BEVmNmLD.js} +4 -4
- package/assets/{index.es-CZz1nBev.js → index.es-BPA6fTzR.js} +1 -1
- package/assets/{index.es-CeoIh9-h.js → index.es-BW6RduBG.js} +1 -1
- package/assets/{localBatchGatewayRequest-Dbz593U8.js → localBatchGatewayRequest-C2eNLm--.js} +1 -1
- package/assets/{mana-convert-DTic_WF4.js → mana-convert-C341n1xm.js} +1 -1
- package/assets/{mana-rate-DTd_zYK_.js → mana-rate-BAPBwbaG.js} +1 -1
- package/assets/{networks-D-WgnPJO.js → networks-gEGHz8eL.js} +1 -1
- package/assets/{onramp-CxZE_awn.js → onramp-DHcILVIp.js} +1 -1
- package/assets/{openzeppelin-BicG6fZ-.js → openzeppelin-BvSgRich.js} +1 -1
- package/assets/{parseNft-crNNmDcM.js → parseNft-DrAu-xVe.js} +2 -2
- package/assets/{parseSignature-xro4_AeM.js → parseSignature--WNVOXAe.js} +3 -3
- package/assets/{parseSignature-TUf4MZpE.js → parseSignature-BlmIeeL7.js} +1 -1
- package/assets/{passkeys-DlsWo5hj.js → passkeys-BD41PpMD.js} +1 -1
- package/assets/{pay-with-exchange-uJFVzJz2.js → pay-with-exchange-DCmtfnr1.js} +1 -1
- package/assets/{qr-overlay-D1DRCZeg.js → qr-overlay-DYViFXBB.js} +1 -1
- package/assets/{receive-jEtfcBkz.js → receive-LPMbYHZa.js} +1 -1
- package/assets/{resolveImplementation-Dfr_x2D4.js → resolveImplementation-CdVPuboc.js} +1 -1
- package/assets/{rpc-HxGwRhjl.js → rpc-D2C2velX.js} +1 -1
- package/assets/{secp256k1-BeCdbOwL.js → secp256k1-DLPIWcy9.js} +1 -1
- package/assets/{secp256k1-Bmo0zLoN.js → secp256k1-DtCfsIY0.js} +1 -1
- package/assets/{secp256k1-CPsxfMTn.js → secp256k1-KqMjq-B-.js} +1 -1
- package/assets/{send-SCYWhWgO.js → send-BYANl3m1.js} +1 -1
- package/assets/{send-batch-transaction-ClJpcx_r.js → send-batch-transaction-BHqPVqqQ.js} +1 -1
- package/assets/{send-eip712-transaction-DCKQGfPC.js → send-eip712-transaction-D3zsFnZJ.js} +2 -2
- package/assets/{send-gasless-transaction-C6PqTuT4.js → send-gasless-transaction-Db4a0n6K.js} +2 -2
- package/assets/{send-transaction-DCRA_QBx.js → send-transaction-0fPTuVE4.js} +2 -2
- package/assets/{sendMetaTransaction-BOtIj1YL.js → sendMetaTransaction-DAsHliEn.js} +1 -1
- package/assets/{sendRawTransaction-BkrUK6tH.js → sendRawTransaction-B5IMe5Y5.js} +3 -3
- package/assets/{serializeTransaction-bVNzq6Wv.js → serializeTransaction-BT9LeH0D.js} +1 -1
- package/assets/{session-proposal-BwFRVt7g.js → session-proposal-plO_EjqI.js} +1 -1
- package/assets/{session-request-4TbdsxSC.js → session-request-DTauixOT.js} +2 -2
- package/assets/{signing-BxAbixw6.js → signing-BKT41maQ.js} +3 -3
- package/assets/{socials-B5zVEegD.js → socials-BPcwRKMp.js} +1 -1
- package/assets/{swaps-DQ1LcBTU.js → swaps-DddX0hWZ.js} +1 -1
- package/assets/{thirdweb-r2nvH1Ph.js → thirdweb-DI1D_9ce.js} +3 -3
- package/assets/{to-serializable-transaction-DMc2E6fk.js → to-serializable-transaction-BZX746C8.js} +2 -2
- package/assets/trade-encoding-CK5EArKF.js +1 -0
- package/assets/{transactionReceipt-DFdTIN3F.js → transactionReceipt-2D5Q3zvv.js} +1 -1
- package/assets/{transactions-DnRd57Kk.js → transactions-DtbDwrsO.js} +1 -1
- package/assets/useCreditPacks-Dw0jIjQE.js +1 -0
- package/assets/{useInfiniteGrid-CDkGdzFf.js → useInfiniteGrid-Xjfvrq_T.js} +1 -1
- package/assets/useManaRate-BEVwu7Q9.js +1 -0
- package/assets/{useSecondarySales-BLnZD7gi.js → useSecondarySales-bajhgse5.js} +1 -1
- package/assets/{useStore-Dt337zVA.js → useStore-CIqjcPjh.js} +1 -1
- package/assets/{useTheme-DlRIY8zD.js → useTheme-DVSXpYGO.js} +1 -1
- package/assets/{verifyHash-D8nhWUT9.js → verifyHash-DmL5gbPk.js} +1 -1
- package/assets/{w3m-modal-Z-IBP9yL.js → w3m-modal-B2N-eyv6.js} +1 -1
- package/assets/{w3m-modal-D1mPkWGM.js → w3m-modal-CfZXCvPG.js} +1 -1
- package/assets/{wait-for-tx-receipt-8bgpdxSo.js → wait-for-tx-receipt-BEDrW5cD.js} +1 -1
- package/assets/{wallets-BTh4qQ9L.js → wallets-DQk0dtw_.js} +5 -5
- package/assets/{web-connector-DXtL7d_s.js → web-connector-2N1NjIJ4.js} +3 -3
- package/assets/{writeContract-B7vnLdJy.js → writeContract-BZemjhP4.js} +1 -1
- package/assets/{zoraTestnet-kFdaoH4G.js → zoraTestnet-BK5x9nJO.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Activity-BF3WNwMh.js +0 -291
- package/assets/Cart-Cs0FD0IN.js +0 -695
- package/assets/Success-CTKJzQjE.js +0 -276
- package/assets/buy-DLi3_94e.js +0 -1
- package/assets/trade-encoding-BFXwI1r3.js +0 -1
- package/assets/useCreditPacks-DnQLmQo7.js +0 -1
- package/assets/useManaRate-DwO6H8fK.js +0 -1
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import{r as j,j as e,L as J,d as dt}from"./react-vyZjIDcS.js";import{aJ as lt,s as l,t as o,x as ut,B as ht,m as xt,e as d,n as mt,u as v,I as f,aK as G,aL as K,aM as pt,z as k,aN as gt,ap as T,D as Q,J as ft,aO as yt,aP as C}from"./index-BMIuNfCB.js";import{m as bt}from"./mana-convert-C341n1xm.js";import{u as jt}from"./useManaRate-BEVwu7Q9.js";import{L as vt}from"./LoadMore-CVBNO6CV.js";import{u as y}from"./useInfiniteGrid-Xjfvrq_T.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./mana-rate-BAPBwbaG.js";const kt=15e3;function It(t,n){return t.txHash&&n.txHash?t.txHash===n.txHash:t.txHash||n.txHash?!1:t.status===n.status&&Math.abs(t.createdAt-n.createdAt)<=kt}function At(t){const n=[...t].sort((i,a)=>a.createdAt-i.createdAt),s=[];for(const i of n){const a=s[s.length-1];a&&It(a[a.length-1],i)?a.push(i):s.push([i])}return s.map(i=>{var a;return{id:((a=i.find(c=>c.txHash))==null?void 0:a.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,h)=>c+h.credits,0),lines:i}})}function wt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function $t(t){const n=[],s=new Map;for(const i of t){const a=wt(i);if(!a){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=s.get(a);if(c){c.quantity+=1,c.credits+=i.credits;continue}const h={key:a,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};s.set(a,h),n.push(h)}return n}function Pt(t,n){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:n?bt(t.manaWei,n):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Lt(t){const s=At(t.purchases.filter(r=>r.status!=="EXPIRED")).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),i=t.sales.map(r=>{const x=Pt(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),a=(t.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(t.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...i,...a,...h].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Nt(t,n){return n==="all"?t:n==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const X=t=>t.trim().toLowerCase();function Et(t){const n=new Map;for(const s of t??[]){const i=X(s.txHash??"");if(!i)continue;const a=n.get(i);a?a.push(s):n.set(i,[s])}return n}function Tt(t,n,s=Date.now()){const i=n.txHash?t.get(X(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const a=i.length===1?Ct(i[0].netCents):null,c=i.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:a};const h=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:a,availableAt:h}}function Ct(t){return lt(t)}const Ft="https://cdn.decentraland.org/@dcl/shop/0.1.0-30633401379.commit-5cd1c31/assets/credits-product-vs4Q6u6l.svg",F=ut`
|
|
2
|
+
0% { background-position: 200% 0; }
|
|
3
|
+
100% { background-position: -200% 0; }
|
|
4
|
+
`,St=l.section`
|
|
5
|
+
width: 100%;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
min-height: 60vh;
|
|
8
|
+
/* Centre the whole column — heading, tabs and cards as ONE block — so the feed isn't parked against
|
|
9
|
+
the left edge of a wide page. Centring only the list would leave the heading orphaned from it. */
|
|
10
|
+
max-width: 760px;
|
|
11
|
+
margin-inline: auto;
|
|
12
|
+
`,Mt=l.div`
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: baseline;
|
|
15
|
+
gap: 12px;
|
|
16
|
+
margin-bottom: 20px;
|
|
17
|
+
`,Dt=l.h1`
|
|
18
|
+
font-family: ${o.font.sans};
|
|
19
|
+
margin: 0;
|
|
20
|
+
`;l.span`
|
|
21
|
+
color: ${o.colors.muted};
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
`;const Ht=l.div`
|
|
24
|
+
display: flex;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
margin-bottom: 20px;
|
|
27
|
+
flex-wrap: wrap;
|
|
28
|
+
`,zt=l.button`
|
|
29
|
+
appearance: none;
|
|
30
|
+
border: 1px solid ${o.colors.line};
|
|
31
|
+
background: ${o.colors.white};
|
|
32
|
+
color: ${o.colors.text};
|
|
33
|
+
font-family: ${o.font.sans};
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
padding: 8px 16px;
|
|
37
|
+
min-height: 40px;
|
|
38
|
+
border-radius: ${o.radius.pill};
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
transition:
|
|
41
|
+
background 0.15s,
|
|
42
|
+
border-color 0.15s,
|
|
43
|
+
color 0.15s;
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
background: ${o.colors.media};
|
|
47
|
+
}
|
|
48
|
+
&:focus-visible {
|
|
49
|
+
outline: 2px solid ${o.colors.accent};
|
|
50
|
+
outline-offset: 2px;
|
|
51
|
+
}
|
|
52
|
+
&[data-active='true'] {
|
|
53
|
+
background: ${o.colors.accent};
|
|
54
|
+
border-color: ${o.colors.accent};
|
|
55
|
+
color: ${o.colors.white};
|
|
56
|
+
}
|
|
57
|
+
`,U=l.div`
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: 16px;
|
|
61
|
+
`,I=l.div`
|
|
62
|
+
background: ${o.colors.white};
|
|
63
|
+
border: 1px solid ${o.colors.line};
|
|
64
|
+
border-radius: 16px;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
`,A=l.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
gap: 12px;
|
|
71
|
+
padding: 14px 18px;
|
|
72
|
+
background: ${o.colors.softWhite};
|
|
73
|
+
border-bottom: 1px solid ${o.colors.line};
|
|
74
|
+
|
|
75
|
+
${o.media.maxWidth("mobile")} {
|
|
76
|
+
flex-wrap: wrap;
|
|
77
|
+
}
|
|
78
|
+
`,w=l.div`
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
gap: 2px;
|
|
82
|
+
min-width: 0;
|
|
83
|
+
`,$=l.span`
|
|
84
|
+
font-weight: 700;
|
|
85
|
+
color: ${o.colors.text};
|
|
86
|
+
`,P=l.span`
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
color: ${o.colors.muted};
|
|
89
|
+
`,L=l.div`
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 14px;
|
|
93
|
+
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
94
|
+
leading thumbnail, giving the head three children instead of two). */
|
|
95
|
+
margin-left: auto;
|
|
96
|
+
`,Ot=l.div`
|
|
97
|
+
flex: 0 0 auto;
|
|
98
|
+
width: 52px;
|
|
99
|
+
height: 52px;
|
|
100
|
+
border-radius: 10px;
|
|
101
|
+
background: ${o.colors.media};
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
|
|
106
|
+
img {
|
|
107
|
+
width: 30px;
|
|
108
|
+
height: 30px;
|
|
109
|
+
display: block;
|
|
110
|
+
}
|
|
111
|
+
`,N=l.span`
|
|
112
|
+
font-size: 11px;
|
|
113
|
+
font-weight: 700;
|
|
114
|
+
text-transform: uppercase;
|
|
115
|
+
letter-spacing: 0.03em;
|
|
116
|
+
padding: 4px 10px;
|
|
117
|
+
border-radius: ${o.radius.pill};
|
|
118
|
+
white-space: nowrap;
|
|
119
|
+
|
|
120
|
+
&[data-status='SETTLED'] {
|
|
121
|
+
background: rgba(30, 166, 114, 0.14);
|
|
122
|
+
color: ${o.colors.okStrong};
|
|
123
|
+
}
|
|
124
|
+
&[data-status='PENDING'] {
|
|
125
|
+
background: rgba(245, 166, 35, 0.16);
|
|
126
|
+
color: #b5790a;
|
|
127
|
+
}
|
|
128
|
+
&[data-status='SOLD'] {
|
|
129
|
+
background: rgba(103, 58, 183, 0.14);
|
|
130
|
+
color: ${o.colors.accent};
|
|
131
|
+
}
|
|
132
|
+
&[data-status='FAILED'] {
|
|
133
|
+
background: rgba(214, 61, 61, 0.14);
|
|
134
|
+
color: #b02a2a;
|
|
135
|
+
}
|
|
136
|
+
`,m=l.div`
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 5px;
|
|
140
|
+
font-weight: 800;
|
|
141
|
+
color: ${o.colors.text};
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
|
|
144
|
+
.ccy-mark {
|
|
145
|
+
width: 16px;
|
|
146
|
+
height: 16px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Money received (a sale) reads as income in the shop's success green.
|
|
150
|
+
&[data-kind='income'] {
|
|
151
|
+
color: ${o.colors.okStrong};
|
|
152
|
+
}
|
|
153
|
+
`,Z=l.img`
|
|
154
|
+
width: 16px;
|
|
155
|
+
height: 16px;
|
|
156
|
+
vertical-align: -0.15em;
|
|
157
|
+
`,qt=l.span`
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
`,Wt=l.span`
|
|
162
|
+
position: fixed;
|
|
163
|
+
transform: translateX(-50%);
|
|
164
|
+
padding: 6px 8px;
|
|
165
|
+
border-radius: 6px;
|
|
166
|
+
background: #16141a;
|
|
167
|
+
color: ${o.colors.white};
|
|
168
|
+
font-size: 12px;
|
|
169
|
+
font-weight: 600;
|
|
170
|
+
line-height: 1;
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
173
|
+
pointer-events: none;
|
|
174
|
+
z-index: 9999;
|
|
175
|
+
`,S=l.div`
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
`,E=l.div`
|
|
179
|
+
display: grid;
|
|
180
|
+
grid-template-columns: 52px 1fr auto;
|
|
181
|
+
align-items: center;
|
|
182
|
+
gap: 14px;
|
|
183
|
+
padding: 12px 18px;
|
|
184
|
+
text-decoration: none;
|
|
185
|
+
color: inherit;
|
|
186
|
+
|
|
187
|
+
& + & {
|
|
188
|
+
border-top: 1px solid ${o.colors.line};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&[data-link='true'] {
|
|
192
|
+
transition: background 0.15s;
|
|
193
|
+
}
|
|
194
|
+
&[data-link='true']:hover {
|
|
195
|
+
background: ${o.colors.media};
|
|
196
|
+
}
|
|
197
|
+
&[data-link='true']:focus-visible {
|
|
198
|
+
outline: 2px solid ${o.colors.accent};
|
|
199
|
+
outline-offset: -2px;
|
|
200
|
+
}
|
|
201
|
+
`,M=l.div`
|
|
202
|
+
width: 52px;
|
|
203
|
+
height: 52px;
|
|
204
|
+
border-radius: 10px;
|
|
205
|
+
background: ${o.colors.media};
|
|
206
|
+
overflow: hidden;
|
|
207
|
+
display: flex;
|
|
208
|
+
align-items: center;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
color: ${o.colors.muted2};
|
|
211
|
+
|
|
212
|
+
img {
|
|
213
|
+
width: 100%;
|
|
214
|
+
height: 100%;
|
|
215
|
+
object-fit: contain;
|
|
216
|
+
}
|
|
217
|
+
`,D=l.div`
|
|
218
|
+
width: 52px;
|
|
219
|
+
height: 52px;
|
|
220
|
+
border-radius: 10px;
|
|
221
|
+
background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
|
|
222
|
+
background-size: 200% 100%;
|
|
223
|
+
animation: ${F} 1.3s infinite linear;
|
|
224
|
+
|
|
225
|
+
@media (prefers-reduced-motion: reduce) {
|
|
226
|
+
animation: none;
|
|
227
|
+
}
|
|
228
|
+
`,H=l.div`
|
|
229
|
+
min-width: 0;
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
gap: 2px;
|
|
233
|
+
`,z=l.span`
|
|
234
|
+
font-weight: 700;
|
|
235
|
+
white-space: nowrap;
|
|
236
|
+
overflow: hidden;
|
|
237
|
+
text-overflow: ellipsis;
|
|
238
|
+
`,O=l.span`
|
|
239
|
+
display: inline-block;
|
|
240
|
+
width: 140px;
|
|
241
|
+
max-width: 60%;
|
|
242
|
+
height: 12px;
|
|
243
|
+
border-radius: 6px;
|
|
244
|
+
background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
|
|
245
|
+
background-size: 200% 100%;
|
|
246
|
+
animation: ${F} 1.3s infinite linear;
|
|
247
|
+
|
|
248
|
+
@media (prefers-reduced-motion: reduce) {
|
|
249
|
+
animation: none;
|
|
250
|
+
}
|
|
251
|
+
`,q=l.span`
|
|
252
|
+
font-size: 13px;
|
|
253
|
+
color: ${o.colors.muted};
|
|
254
|
+
`,Bt=l.div`
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
gap: 4px;
|
|
258
|
+
font-weight: 700;
|
|
259
|
+
color: ${o.colors.text};
|
|
260
|
+
white-space: nowrap;
|
|
261
|
+
|
|
262
|
+
.ccy-mark {
|
|
263
|
+
width: 14px;
|
|
264
|
+
height: 14px;
|
|
265
|
+
}
|
|
266
|
+
`,_=l.div`
|
|
267
|
+
height: 132px;
|
|
268
|
+
border-radius: 16px;
|
|
269
|
+
border: 1px solid transparent;
|
|
270
|
+
background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
|
|
271
|
+
background-size: 200% 100%;
|
|
272
|
+
animation: ${F} 1.3s infinite linear;
|
|
273
|
+
|
|
274
|
+
@media (prefers-reduced-motion: reduce) {
|
|
275
|
+
animation: none;
|
|
276
|
+
}
|
|
277
|
+
`,V=l.div`
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-direction: column;
|
|
280
|
+
align-items: center;
|
|
281
|
+
gap: 8px;
|
|
282
|
+
text-align: center;
|
|
283
|
+
padding: 90px 20px;
|
|
284
|
+
min-height: 50vh;
|
|
285
|
+
`,Y=l.p`
|
|
286
|
+
font-size: 22px;
|
|
287
|
+
font-weight: 700;
|
|
288
|
+
margin: 6px 0 0;
|
|
289
|
+
`,Rt=l(ht)`
|
|
290
|
+
margin-top: 12px;
|
|
291
|
+
`,W=E.withComponent(J),b=24,Gt=["all","purchases","sales"];function g(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const n=j.useRef(null),[s,i]=j.useState(null),a=()=>{var h;const c=(h=n.current)==null?void 0:h.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(qt,{ref:n,tabIndex:0,onMouseEnter:a,onMouseLeave:()=>i(null),onFocus:a,onBlur:()=>i(null),children:[t,s?dt.createPortal(e.jsx(Wt,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Kt({item:t}){const n=!!t.contractAddress&&!!t.itemId,s=!!t.tradeId||n,{data:i,isLoading:a}=v({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?yt(t.tradeId):C(t.contractAddress,{itemId:t.itemId}),enabled:s,staleTime:5*6e4}),c=s&&a,h=(i==null?void 0:i.name)??d("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",x=T({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,p=e.jsxs(e.Fragment,{children:[c?e.jsx(D,{}):e.jsx(M,{children:r?e.jsx("img",{src:r,alt:h}):e.jsx(f,{name:"cart",size:20})}),e.jsxs(H,{children:[c?e.jsx(O,{}):e.jsx(z,{title:h,children:h}),t.quantity>1?e.jsx(q,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(Bt,{children:[e.jsx(k,{className:"ccy-mark"})," ",t.credits]})]});return x?e.jsx(W,{to:x,"data-link":"true",children:p}):e.jsx(E,{children:p})}function Ut({order:t}){const n=$t(t.lines),s=n.reduce((i,a)=>i+a.quantity,0);return e.jsxs(I,{"data-testid":"purchase-order",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsxs(P,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(m,{children:[e.jsx(k,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(S,{children:n.map(i=>e.jsx(Kt,{item:i},i.key))})]})}function _t({sale:t}){const{data:n,isLoading:s}=v({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>C(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??d("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",c=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(D,{}):e.jsx(M,{children:a?e.jsx("img",{src:a,alt:i}):e.jsx(f,{name:"offer",size:20})}),e.jsxs(H,{children:[s?e.jsx(O,{}):e.jsx(z,{title:i,children:i}),e.jsx(q,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(I,{"data-testid":"activity-mana-purchase",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsx(P,{children:d("activity.paidWithMana")})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(m,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:Q,alt:"MANA"})})]})]})]}),e.jsx(S,{children:c?e.jsx(W,{to:c,"data-link":"true",children:h}):e.jsx(E,{children:h})})]})}function Jt({sale:t,payout:n}){const{data:s,isLoading:i}=v({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>C(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(s==null?void 0:s.name)??d("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",h=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[i?e.jsx(D,{}):e.jsx(M,{children:c?e.jsx("img",{src:c,alt:a}):e.jsx(f,{name:"offer",size:20})}),e.jsxs(H,{children:[i?e.jsx(O,{}):e.jsx(z,{title:a,children:a}),e.jsxs(q,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),n.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:g(n.availableAt)})}`:""]})]})]});return e.jsxs(I,{"data-testid":"activity-sale",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsx(P,{children:d("activity.saleLabel")})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),n.kind==="direct"?e.jsxs(m,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:Q,alt:"MANA"})})]}):n.credits!==null?e.jsxs(m,{"data-kind":"income",children:[e.jsx(k,{className:"ccy-mark"})," +",ft(n.credits)]}):e.jsx(m,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(S,{children:h?e.jsx(W,{to:h,"data-link":"true",children:r}):e.jsx(E,{children:r})})]})}function Qt({order:t}){const n=`$${(t.usdCents/100).toFixed(2)}`,s=gt(t.status),i=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(I,{"data-testid":"credit-order",children:e.jsxs(A,{children:[e.jsx(Ot,{children:e.jsx("img",{src:Ft,alt:"","aria-hidden":!0})}),e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsxs(P,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:n})]})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":s,children:i}),e.jsxs(m,{"data-kind":"income",children:["+",e.jsx(k,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Xt({filter:t}){const n={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(V,{children:[e.jsx(f,{name:n.icon,size:40,color:o.colors.muted2}),e.jsx(Y,{children:n.title}),e.jsx("p",{className:"muted",children:n.body}),t!=="sales"?e.jsx(Rt,{as:J,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function ce(){xt({title:d("nav.activity"),noindex:!0});const{session:t}=mt(),[n,s]=j.useState("all"),i=!!t&&n!=="sales",a=!!t&&n!=="purchases",c=y(["purchases",t==null?void 0:t.address],u=>pt(t.address,t.identity,{first:b,skip:u}),{enabled:i}),h=y(["sales",t==null?void 0:t.address],u=>G(t.address,{role:"seller",first:b,skip:u}),{enabled:a}),r=y(["credit-orders",t==null?void 0:t.address],u=>K(t.address,t.identity,{first:b,skip:u}),{enabled:i}),x=y(["mana-purchases",t==null?void 0:t.address],u=>G(t.address,{role:"buyer",first:b,skip:u}),{enabled:i}),{data:p}=v({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>K(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:a,staleTime:6e4}),nt=j.useMemo(()=>Et(p),[p]),{data:st}=jt(a);if(!t)return e.jsxs(V,{children:[e.jsx(f,{name:"clock",size:40,color:o.colors.muted2}),e.jsx(Y,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const B=Nt(Lt({purchases:i?c.items:[],sales:a?h.items:[],creditOrders:i?r.items:[],manaPurchases:i?x.items:[],rate:st}),n),at=i&&(c.isLoading||r.isLoading||x.isLoading)||a&&h.isLoading,R=i&&(c.isFetchingNextPage||r.isFetchingNextPage||x.isFetchingNextPage)||a&&h.isFetchingNextPage,rt=i&&(c.hasNextPage||r.hasNextPage||x.hasNextPage)||a&&h.hasNextPage;function ot(){i&&c.hasNextPage&&c.fetchNextPage(),i&&r.hasNextPage&&r.fetchNextPage(),i&&x.hasNextPage&&x.fetchNextPage(),a&&h.hasNextPage&&h.fetchNextPage()}return e.jsxs(St,{children:[e.jsx(Mt,{children:e.jsx(Dt,{children:d("nav.activity")})}),e.jsx(Ht,{role:"tablist","aria-label":d("nav.activity"),children:Gt.map(u=>e.jsx(zt,{type:"button",role:"tab","aria-selected":n===u,"data-active":n===u,"data-testid":`activity-filter-${u}`,onClick:()=>s(u),children:d(`activity.filter.${u}`)},u))}),at?e.jsx(U,{children:Array.from({length:5}).map((u,ct)=>e.jsx(_,{},ct))}):B.length===0?e.jsx(Xt,{filter:n}):e.jsxs(e.Fragment,{children:[e.jsxs(U,{children:[B.map(u=>u.kind==="purchase"?e.jsx(Ut,{order:u.order},u.id):u.kind==="credit"?e.jsx(Qt,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(_t,{sale:u.sale},u.id):e.jsx(Jt,{sale:u.sale,payout:Tt(nt,u.sale)},u.id)),R?e.jsx(_,{}):null]}),e.jsx(vt,{hasNextPage:rt,isFetching:R,onLoadMore:ot})]})]})}export{ce as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-vyZjIDcS.js";import{s as u}from"./index-
|
|
1
|
+
import{r as l,j as v}from"./react-vyZjIDcS.js";import{s as u}from"./index-BMIuNfCB.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30633401379.commit-5cd1c31/assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.1.0-30633401379.commit-5cd1c31/assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -94,4 +94,4 @@ void main() {
|
|
|
94
94
|
inset: 0;
|
|
95
95
|
width: 100%;
|
|
96
96
|
height: 100%;
|
|
97
|
-
`;function G(){const t=l.useRef(null),n=l.useRef(0);return l.useEffect(()=>{var x;const r=t.current;if(!r||(x=window.matchMedia)!=null&&x.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=p(e,e.VERTEX_SHADER,U),
|
|
97
|
+
`;function G(){const t=l.useRef(null),n=l.useRef(0);return l.useEffect(()=>{var x;const r=t.current;if(!r||(x=window.matchMedia)!=null&&x.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=p(e,e.VERTEX_SHADER,U),c=p(e,e.FRAGMENT_SHADER,P);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const a=D(e,o,c);if(!a){e.deleteShader(o),e.deleteShader(c);return}const m=e.getAttribLocation(a,"a_position"),R=e.getUniformLocation(a,"u_time"),y=e.getUniformLocation(a,"u_resolution"),_=e.getUniformLocation(a,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let d=!1;const f=L(e,b,()=>d),w=()=>{const i=window.devicePixelRatio||1,E=r.clientWidth*i,g=r.clientHeight*i;(r.width!==E||r.height!==g)&&(r.width=E,r.height=g)},A=performance.now()/1e3,h=()=>{w(),e.viewport(0,0,r.width,r.height),e.useProgram(a),e.uniform1f(R,performance.now()/1e3-A),e.uniform2f(y,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,f),e.uniform1i(_,0),e.enableVertexAttribArray(m),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(m,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),n.current=requestAnimationFrame(h)},T=i=>{i.preventDefault(),cancelAnimationFrame(n.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(h),()=>{d=!0,cancelAnimationFrame(n.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(a),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(f)}},[]),v.jsxs(B,{"aria-hidden":!0,children:[v.jsx(F,{style:{backgroundImage:`url(${S})`}}),v.jsx(I,{ref:t})]})}export{G as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,
|
|
1
|
+
import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,av as Ze,aw as Je,d as Ke,s as n,t,n as Ie,al as Qe,E as Xe,J as Ae,y as Ye,e as s,I as T,z as W,aS as he,aj as et,ar as K,az as tt,ay as nt,m as Ne,o as st,S as fe,A as O,aT as ot,aU as it}from"./index-BMIuNfCB.js";import{u as rt}from"./useSecondarySales-bajhgse5.js";import{a as at,m as Me}from"./mana-convert-C341n1xm.js";import{u as Pe}from"./useManaRate-BEVwu7Q9.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-BLCNmjO6.js";import{c as me,R as Et,F as Tt,S as Rt}from"./categories-CUWn-vWY.js";import{L as _t}from"./LoadMore-CVBNO6CV.js";import{u as zt}from"./useInfiniteGrid-Xjfvrq_T.js";import{E as It}from"./ErrorNotice-DwhdhAu6.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-D3ucK012.js";import{s as Bt}from"./buy-DI2htlf2.js";import{i as Ft}from"./trade-encoding-CK5EArKF.js";import{r as Lt}from"./mana-rate-BAPBwbaG.js";import{f as Ut}from"./errors-BHapDldI.js";import{J as Ht,C as Ot,B as ee}from"./ethers-CXBJm_wN.js";import{n as Gt}from"./Tooltip-v8d4_GhH.js";import{G as Dt}from"./grid.styles-CFlLjGWA.js";import"./sentry-B35L1FdR.js";import"./intl-CBcMB1D2.js";import"./authorizations-uQp0Tner.js";import"./sendMetaTransaction-DAsHliEn.js";function G(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 Zt=["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 Jt(){return B.chainId===Number(At.ChainId.MATIC_MAINNET)?ge.mainnet:ge.sepolia}async function Kt(o,i={}){var p;const{rpc:l,address:x}=Jt(),c=new Ht(l),d=new Ot(x,Zt,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 Ke(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 Ze(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 Je(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
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -112,7 +112,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,au
|
|
|
112
112
|
font-family: ${t.font.sans};
|
|
113
113
|
font-size: 14px;
|
|
114
114
|
color: ${t.colors.muted2};
|
|
115
|
-
`,
|
|
115
|
+
`,Te=n.div`
|
|
116
116
|
flex: none;
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
@@ -186,7 +186,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,au
|
|
|
186
186
|
font-family: ${t.font.sans};
|
|
187
187
|
font-size: 16px;
|
|
188
188
|
color: ${t.colors.muted2};
|
|
189
|
-
`,
|
|
189
|
+
`,Re=n.button`
|
|
190
190
|
margin-top: 16px;
|
|
191
191
|
width: 100%;
|
|
192
192
|
height: 52px;
|
|
@@ -366,7 +366,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,au
|
|
|
366
366
|
flex: none;
|
|
367
367
|
color: ${t.colors.dclRed};
|
|
368
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=
|
|
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=R=>{R.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}),K("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){K(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(T,{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(Te,{children:[e.jsx(W,{}),k]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(kn,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Re,{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(Re,{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(T,{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(T,{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(Te,{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 Tn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30633401379.commit-5cd1c31/assets/identity-B4DXDuJP.webp",Rn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30633401379.commit-5cd1c31/assets/world-B-9aPlxu.webp",_n="https://cdn.decentraland.org/@dcl/shop/0.1.0-30633401379.commit-5cd1c31/assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30633401379.commit-5cd1c31/assets/governance-DnazlIjy.webp",In=n.div`
|
|
370
370
|
width: 100%;
|
|
371
371
|
min-width: 0;
|
|
372
372
|
`,An=n.nav`
|
|
@@ -453,12 +453,12 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,au
|
|
|
453
453
|
${t.media.maxWidth("mobile")} {
|
|
454
454
|
font-size: 16px;
|
|
455
455
|
}
|
|
456
|
-
`,
|
|
456
|
+
`,Un=n.div`
|
|
457
457
|
width: min(785px, 100%);
|
|
458
458
|
display: flex;
|
|
459
459
|
flex-direction: column;
|
|
460
460
|
gap: 12px;
|
|
461
|
-
`,
|
|
461
|
+
`,Hn=n.div`
|
|
462
462
|
position: relative;
|
|
463
463
|
`,On=n("div",Gt("invalid"))`
|
|
464
464
|
display: flex;
|
|
@@ -784,4 +784,4 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,au
|
|
|
784
784
|
clip: rect(0, 0, 0, 0);
|
|
785
785
|
white-space: nowrap;
|
|
786
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 Kt(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(Hn,{children:[e.jsxs(Un,{children:[e.jsxs(On,{invalid:p==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Zn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{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(Gn,{ref:w,"aria-hidden":!0,children:d||s("names.inputPlaceholder")}),e.jsx(Kn,{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(Dn,{role:"status","data-testid":"names-taken",children:[e.jsx(R,{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(R,{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(D,{children:[e.jsx(q,{src:Rn,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why1Title")}),e.jsx(J,{children:s("names.why1")})]})]}),e.jsxs(D,{children:[e.jsx(q,{src:Tn,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why2Title")}),e.jsxs(J,{children:[s("names.why2")," ",e.jsx(is,{children:s("names.why2Address")})]}),e.jsxs(_e,{href:as,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(D,{children:[e.jsx(q,{src:_n,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why3Title")}),e.jsx(J,{children:s("names.why3")})]})]}),e.jsxs(D,{children:[e.jsx(q,{src:zn,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why4Title")}),e.jsx(J,{children:s("names.why4")}),e.jsxs(_e,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(R,{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:_,isPlaceholderData:A,error:re,hasNextPage:He,isFetchingNextPage:ae,fetchNextPage:Ue}=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"}),H=ie,le=_||A,Oe=_?15:Math.min(Math.max(L.length,1),Y),{data:ce,isError:Ge}=Pe(),De=r=>ce&&r.manaWei?Me(r.manaWei,ce):null,de=m.useRef(null);m.useEffect(()=>{_||A||!l||de.current===l||(de.current=l,K("Shop Searched",{query:l,result_count:H}))},[l,_,A,H]);const U=m.useRef("__init__");m.useEffect(()=>{if(_||A)return;const r=JSON.stringify({category:c,subCategory:h,rarities:a,min:T,max:M,sort:C,status:f,smart:v});if(U.current==="__init__"||U.current===r){U.current=r;return}U.current=r,K("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:H})},[c,h,a,T,M,C,f,v,_,A,H]);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(Rt,{sort:C,onSort:z,total:ie,loading:_||A,query:l,onOpenFilters:()=>g(!0),chips:P,onClearChips:qe}),Ge&&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(Dt,{"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"},G(r));const S=r;if(S.source!=="legacy")return e.jsx(O,{item:r},G(r));const N=De(S);return N==null?e.jsx(O,{item:r,mode:"view"},G(r)):e.jsx(O,{item:{...S,priceCredits:N}},G(r))}),ae?e.jsx(fe,{count:6}):null]})}),e.jsx(_t,{hasNextPage:He,isFetching:ae,onLoadMore:()=>void Ue()})]})]})})]})}export{Ms as Assets};
|
|
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 Kt(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(Zn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{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(Gn,{ref:w,"aria-hidden":!0,children:d||s("names.inputPlaceholder")}),e.jsx(Kn,{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(Dn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{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(T,{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(D,{children:[e.jsx(q,{src:Tn,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why1Title")}),e.jsx(J,{children:s("names.why1")})]})]}),e.jsxs(D,{children:[e.jsx(q,{src:Rn,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why2Title")}),e.jsxs(J,{children:[s("names.why2")," ",e.jsx(is,{children:s("names.why2Address")})]}),e.jsxs(_e,{href:as,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(D,{children:[e.jsx(q,{src:_n,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why3Title")}),e.jsx(J,{children:s("names.why3")})]})]}),e.jsxs(D,{children:[e.jsx(q,{src:zn,alt:""}),e.jsxs(V,{children:[e.jsx(Z,{children:s("names.why4Title")}),e.jsx(J,{children:s("names.why4")}),e.jsxs(_e,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(T,{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",R=b&&!Number.isNaN(Number(b))?Number(b):void 0,M=j&&!Number.isNaN(Number(j))?Number(j):void 0,Le=rt(),te=h?Rt[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:R,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:_,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=_||A,Oe=_?15:Math.min(Math.max(L.length,1),Y),{data:ce,isError:Ge}=Pe(),De=r=>ce&&r.manaWei?Me(r.manaWei,ce):null,de=m.useRef(null);m.useEffect(()=>{_||A||!l||de.current===l||(de.current=l,K("Shop Searched",{query:l,result_count:U}))},[l,_,A,U]);const H=m.useRef("__init__");m.useEffect(()=>{if(_||A)return;const r=JSON.stringify({category:c,subCategory:h,rarities:a,min:R,max:M,sort:C,status:f,smart:v});if(H.current==="__init__"||H.current===r){H.current=r;return}H.current=r,K("Shop Applied Filter",{filters:{category:c,sub_category:h,rarities:a,min_price_credits:R??null,max_price_credits:M??null,status:f,smart:v,sort:C},result_count:U})},[c,h,a,R,M,C,f,v,_,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=[];(R!=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(Tt,{sort:C,onSort:z,total:ie,loading:_||A,query:l,onOpenFilters:()=>g(!0),chips:P,onClearChips:qe}),Ge&&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(Dt,{"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"},G(r));const S=r;if(S.source!=="legacy")return e.jsx(O,{item:r},G(r));const N=De(S);return N==null?e.jsx(O,{item:r,mode:"view"},G(r)):e.jsx(O,{item:{...S,priceCredits:N}},G(r))}),ae?e.jsx(fe,{count:6}):null]})}),e.jsx(_t,{hasNextPage:Ue,isFetching:ae,onLoadMore:()=>void He()})]})]})})]})}export{Ms as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-vyZjIDcS.js";import{R as C,a as oe,C as ie,b as ne}from"./categories-
|
|
1
|
+
import{r as $,j as t}from"./react-vyZjIDcS.js";import{R as C,a as oe,C as ie,b as ne}from"./categories-CUWn-vWY.js";import{n as c,T as se}from"./Tooltip-v8d4_GhH.js";import{t as e,s as o,I as g,e as s,o as ae,h as v}from"./index-BMIuNfCB.js";const re=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,L as R,r as M}from"./react-vyZjIDcS.js";import{s as a,B as N,t as o,x as I,m as F,e,n as B,y as W,I as f,z as G,D as K,u as w,E as P,c as Q,F as k,l as H,q as $}from"./index-
|
|
1
|
+
import{j as t,L as R,r as M}from"./react-vyZjIDcS.js";import{s as a,B as N,t as o,x as I,m as F,e,n as B,y as W,I as f,z as G,D as K,u as w,E as P,c as Q,F as k,l as H,q as $}from"./index-BMIuNfCB.js";import{a as O,b as _,c as X,d as J,s as U,f as V}from"./authorizations-uQp0Tner.js";import{a as Y}from"./builder-BH8bW8w3.js";import{f as Z}from"./errors-BHapDldI.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DAsHliEn.js";const tt=I`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,it=I`
|
|
4
4
|
to { background-position: -200% 0; }
|