@dcl/shop 1.0.2-31055297774.commit-b808071 → 1.0.2-31061952187.commit-8d8b09e
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-BGVAnqbp.js → Activity-D_fQdZon.js} +8 -8
- package/_assets/{AnimatedBackground-BacIzfr9.js → AnimatedBackground-C9W4RBcZ.js} +1 -1
- package/_assets/{Assets-Bs3sIn09.js → Assets-CvZql_4R.js} +10 -9
- package/_assets/{Assets.styles-CkO8eYMZ.js → Assets.styles-BBWJCcMx.js} +1 -1
- package/_assets/Authorizations-DVwQ95Ww.js +191 -0
- package/_assets/{Cart-CfbLgf8G.js → Cart-CBLHJRVj.js} +6 -6
- package/_assets/{CircularProgress-1YXgiQtT.js → CircularProgress-D09608yv.js} +1 -1
- package/_assets/{Collection-DKA_h7HO.js → Collection-DllncUVv.js} +10 -10
- package/_assets/{CollectionCarousel-COMBJtj4.js → CollectionCarousel-B9HmGuVb.js} +6 -6
- package/_assets/{Confetti-BSUE6v15.js → Confetti-Dl6FT7nL.js} +1 -1
- package/_assets/{Creator-Chfg4XCW.js → Creator-BreBnKPX.js} +5 -5
- package/_assets/{ErrorNotice-aOead5te.js → ErrorNotice-OUNK486K.js} +1 -1
- package/_assets/{ExchangeController-D9wO5y3j.js → ExchangeController-Cp3qbfAM.js} +1 -1
- package/_assets/{Faq-BUcIgNDP.js → Faq-DXtTtsuA.js} +1 -1
- package/_assets/{GetCredits-BLECOB-N.js → GetCredits-BhRNCaTG.js} +10 -10
- package/_assets/{Grow-zqUJtnL7.js → Grow-DXdR0gI9.js} +1 -1
- package/_assets/{HelpersUtil-BrmwLkkp.js → HelpersUtil-rQp5uDAx.js} +1 -1
- package/_assets/{ItemDetail-B2vKg-9Z.js → ItemDetail-clRbfaLQ.js} +241 -236
- package/_assets/LazyEmoteControls-B7UYn8xk.js +2 -0
- package/_assets/{LoadMore-Cy9OoEJz.js → LoadMore-jSNRJiwZ.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-B9-hTa3D.js → ManaPricingBanner.styles-vDUAKLLe.js} +1 -1
- package/_assets/{MyAssets-CHgc1ZcI.js → MyAssets-CsWhc-qa.js} +4 -4
- package/_assets/{MyFavorites-DWo1mliw.js → MyFavorites-BLrz2vwY.js} +1 -1
- package/_assets/NotFound-DP4nosOd.js +17 -0
- package/_assets/{NotificationsBell-Cg5PqU4H.js → NotificationsBell-ARziPv8W.js} +1 -1
- package/_assets/OutfitDetail-CLmuEgB3.js +374 -0
- package/_assets/{OutfitPreview-IPt5zFQ2.js → OutfitPreview-PWdXvCaE.js} +2 -2
- package/_assets/OutfitStudio-Cx3Xm6ff.js +556 -0
- package/_assets/StoreSettings-BQtEgWRm.js +243 -0
- package/_assets/{Success-B_ZedKxN.js → Success-BWfI3_Mu.js} +1 -1
- package/_assets/{SwapController-DEl6q4-5.js → SwapController-Bf58lQ6b.js} +1 -1
- package/_assets/{Tooltip-CfAbMWhJ.js → Tooltip-BDmKiALz.js} +1 -1
- package/_assets/{TradeService-DCGCUpYo.js → TradeService-Yecm1OxI.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-BEUP6hLZ.js → W3MFrameProviderSingleton-BQyeyr-U.js} +3 -3
- package/_assets/{WebCryptoP256-2ShtCeVF.js → WebCryptoP256-Ou_F2OJp.js} +1 -1
- package/_assets/{authorizations-B17B7Njo.js → authorizations-B3AvOvOm.js} +1 -1
- package/_assets/{basic-Dr3bEQfu.js → basic-DTDRwam-.js} +1 -1
- package/_assets/{biconomy-3Y8X7VlC.js → biconomy-DaLi1O64.js} +1 -1
- package/_assets/{builder-jjuFCu3k.js → builder-DxumJmKw.js} +1 -1
- package/_assets/{buy-wdud8pnf.js → buy-BHkfYJLe.js} +1 -1
- package/_assets/{buy-gasless-DoSh-tFa.js → buy-gasless-BfTEWjT9.js} +1 -1
- package/_assets/{categories-DGIg36Oc.js → categories-D23W_J-A.js} +1 -1
- package/_assets/{ccip-BKrghWQj.js → ccip-DGVhZCZ4.js} +1 -1
- package/_assets/{ccip-CXCfMVYe.js → ccip-qhHiv1gU.js} +1 -1
- package/_assets/{collectionPage.styles-DwFPJPce.js → collectionPage.styles-CoEdrsfq.js} +3 -3
- package/_assets/{controller-DdgkWKgL.js → controller-DGtmLk4f.js} +2 -2
- package/_assets/{core-C8S2mN1s.js → core-BAqS3vu7.js} +4 -4
- package/_assets/{createSvgIcon-Cg8ZliIm.js → createSvgIcon-Bm9nxGqG.js} +2 -2
- package/_assets/{custom-X9wHG9wg.js → custom-MaGTnz7S.js} +1 -1
- package/_assets/{data-capture-BgPNXS18.js → data-capture-5Vi1cyBa.js} +1 -1
- package/_assets/{email-BGdZRw8p.js → email-BG6hRXMo.js} +1 -1
- package/_assets/{embedded-wallet-CqIU9APg.js → embedded-wallet-CfnknCH8.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-DZbIWeAZ.js → emotion-styled.browser.esm-CoxAZUrJ.js} +1 -1
- package/_assets/{engine-CBG8_pF-.js → engine-nQGCV50K.js} +1 -1
- package/_assets/{errors-BruxKfZB.js → errors-DZ_QWsza.js} +1 -1
- package/_assets/{estimate-l1-fee-k3exg7PR.js → estimate-l1-fee-CVpJ9ym5.js} +1 -1
- package/_assets/{execute-RjH3kC63.js → execute-DFvUDrLY.js} +2 -2
- package/_assets/{features-BnDZm8if.js → features-BXUedULM.js} +1 -1
- package/_assets/{fetchTokenMetadata-CdUuHqIj.js → fetchTokenMetadata-CkQcnzmO.js} +2 -2
- package/_assets/{field.styles-l0zobCFG.js → field.styles-PE4ZasC2.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-DALoL3Hc.js → get-ecosystem-wallet-info-CRLH8I6C.js} +1 -1
- package/_assets/{getBalance-CefhuKko.js → getBalance-CiV48JsZ.js} +1 -1
- package/_assets/{getNFT-D-L5zgdP.js → getNFT-C3ucNb89.js} +1 -1
- package/_assets/{getNFT-nev9rcin.js → getNFT-CV3N9TTA.js} +1 -1
- package/_assets/{grid.styles-DhFwhKRo.js → grid.styles-hOZTJ80g.js} +1 -1
- package/_assets/{hashTypedData-BEKwcmlS.js → hashTypedData-BtF2J233.js} +1 -1
- package/_assets/{hashTypedData-li6aoa3o.js → hashTypedData-gTABcRB5.js} +1 -1
- package/_assets/{in-app-DUJu2O6v.js → in-app-CSDr4Blb.js} +1 -1
- package/_assets/{in-app-wallet-calls-C9Jxi05O.js → in-app-wallet-calls-Crivl9zc.js} +1 -1
- package/_assets/{index-CvPkDtGf.js → index-1oceTWwb.js} +3 -3
- package/_assets/{index-1--tLqz8.js → index-9_4ZEs3N.js} +1 -1
- package/_assets/{index-Dd4KtrAw.js → index-9x1mGBeU.js} +1 -1
- package/_assets/{index-CE124P9G.js → index-BBbwMaBz.js} +1 -1
- package/_assets/{index-d570G5B7.js → index-BNBzDf6z.js} +1 -1
- package/_assets/{index-dr6fXYBx.js → index-BTDIKmoC.js} +1 -1
- package/_assets/{index-CV1_E3wb.js → index-Bg_gOSx_.js} +1 -1
- package/_assets/{index-DU9MjygG.js → index-BniGBCAO.js} +1 -1
- package/_assets/{index-Dar3bPlr.js → index-Bs4LvV4K.js} +2 -2
- package/_assets/{index-ChBwA1h2.js → index-C0pcaEQl.js} +1 -1
- package/_assets/{index-CpjzOH1b.js → index-C23D_vyT.js} +1 -1
- package/_assets/{index-vQ65olfe.js → index-C5Evg5sh.js} +1 -1
- package/_assets/{index-3PUZ8U0R.js → index-C7hpB9s1.js} +3 -3
- package/_assets/{index-BAyG95nG.js → index-CGBg3yUz.js} +11 -11
- package/_assets/{index-DAnXL5-b.js → index-CHf7lsmp.js} +1 -1
- package/_assets/{index-CkF3QZy9.js → index-CHolIX6U.js} +1 -1
- package/_assets/{index-CTfBCyyR.js → index-CKUuopSw.js} +319 -315
- package/_assets/{index-CVqec2h5.js → index-CS27am7J.js} +1 -1
- package/_assets/{index-CFEHIoaL.js → index-Cf-gi-Qq.js} +1 -1
- package/_assets/{index-BwjISY1Q.js → index-CkGO7qOd.js} +1 -1
- package/_assets/{index-DecRfVMx.js → index-ClUPCoEW.js} +1 -1
- package/_assets/{index-DjqUHVKK.js → index-CmY0V0eX.js} +1 -1
- package/_assets/{index-syneNMGM.js → index-CvwosU6Y.js} +1 -1
- package/_assets/{index-5uftLGuI.js → index-CwRTjZPC.js} +3 -3
- package/_assets/{index-n49vue3k.js → index-CyRHowbs.js} +1 -1
- package/_assets/{index-JG0FDNiP.js → index-D5eMvKb_.js} +1 -1
- package/_assets/{index-BfqVu35d.js → index-D769FdFr.js} +1 -1
- package/_assets/{index-1wf8L6YU.js → index-D7LYoLo4.js} +1 -1
- package/_assets/{index-HaAGk4bQ.js → index-DKHMu0o3.js} +1 -1
- package/_assets/{index-AKUvJK7K.js → index-DKdQUEzy.js} +1 -1
- package/_assets/{index-Ctoo8CLR.js → index-DLFQdlEW.js} +1 -1
- package/_assets/{index-DrWim4p_.js → index-DSuiX4WG.js} +1 -1
- package/_assets/{index-DDLK5XSq.js → index-DXRL-4ld.js} +1 -1
- package/_assets/{index-1nKs4-Ix.js → index-DY1xBku2.js} +1 -1
- package/_assets/{index-z7leYudl.js → index-DdmULNRk.js} +2 -2
- package/_assets/{index-Bl-qZqD6.js → index-DgOiZShm.js} +1 -1
- package/_assets/{index-C2_mL_dX.js → index-Dh85kccn.js} +1 -1
- package/_assets/{index-WSwhnTRZ.js → index-DjTNPtj2.js} +1 -1
- package/_assets/{index-DXWzE47h.js → index-DkV5TYom.js} +1 -1
- package/_assets/{index-BlmfBcG1.js → index-DnJJn52L.js} +1 -1
- package/_assets/{index-Xuxrb8Q0.js → index-DoGz07sk.js} +1 -1
- package/_assets/{index-B2O7gZoQ.js → index-Dp2641E3.js} +1 -1
- package/_assets/{index-DWiRe-sp.js → index-DwX-9Zo4.js} +1 -1
- package/_assets/{index-3_UdO-zA.js → index-EKmmXx1j.js} +1 -1
- package/_assets/{index-DbrCcWJ3.js → index-HAEoS9R6.js} +1 -1
- package/_assets/{index-BXykQ7Kr.js → index-ItjVcw1b.js} +1 -1
- package/_assets/{index-zDqeLkyG.js → index-KWEbYeSY.js} +1 -1
- package/_assets/{index-C7AFAxAx.js → index-S0X-BG2b.js} +1 -1
- package/_assets/{index-BOgrc04A.js → index-UyXkCiLs.js} +1 -1
- package/_assets/{index-BBNLswz5.js → index-hKv-BpxY.js} +1 -1
- package/_assets/{index-DoVK9CTx.js → index-qGMuaBIs.js} +1 -1
- package/_assets/{index-D-wVNkf3.js → index-wRmEiTlP.js} +2 -2
- package/_assets/{index.es-CE2sG7i4.js → index.es-DnMGDxtr.js} +1 -1
- package/_assets/{index.es-DbgkC7jp.js → index.es-g_bB-nFv.js} +1 -1
- package/_assets/{index.es-yWYRmppU.js → index.es-wpL2Ycto.js} +4 -4
- package/_assets/{localBatchGatewayRequest-VK-lqBeb.js → localBatchGatewayRequest-DtELSHiE.js} +1 -1
- package/_assets/{networks-DlOv_Jl5.js → networks-ZmRqsvV6.js} +1 -1
- package/_assets/{onramp-15oxC79b.js → onramp-Bffl3qa3.js} +1 -1
- package/_assets/{openzeppelin-BpuVaBDh.js → openzeppelin-BmH-LNci.js} +1 -1
- package/_assets/{parseNft-D06uX5gG.js → parseNft-PSjb4qKi.js} +2 -2
- package/_assets/{parseSignature-CnSs3XPr.js → parseSignature-D947kFfv.js} +3 -3
- package/_assets/{parseSignature-DGgCDYUH.js → parseSignature-IigTmAp7.js} +1 -1
- package/_assets/{passkeys-B8jZMST_.js → passkeys-BsJVcpuM.js} +1 -1
- package/_assets/{pay-with-exchange-DzV0qz9m.js → pay-with-exchange-CU_HZd9F.js} +1 -1
- package/_assets/{qr-overlay-FhG6DCeK.js → qr-overlay-EMShc5uE.js} +1 -1
- package/_assets/{receive-Bf8iJtVw.js → receive-CO6WElZa.js} +1 -1
- package/_assets/{resolveImplementation-DdV3P3Xk.js → resolveImplementation-CUngPhAv.js} +1 -1
- package/_assets/{rpc-BZX60R_2.js → rpc-BqH_VMy9.js} +1 -1
- package/_assets/{secp256k1-ChfCRMNj.js → secp256k1-CTsmRKJj.js} +1 -1
- package/_assets/{secp256k1-BLNizqyz.js → secp256k1-D7kpLshE.js} +1 -1
- package/_assets/{secp256k1-BpFoXgJs.js → secp256k1-DneM3aYG.js} +1 -1
- package/_assets/{send-CE26RsoC.js → send-DnwW2LgN.js} +1 -1
- package/_assets/{send-batch-transaction-CdcLTVn2.js → send-batch-transaction-BgJnfEM8.js} +1 -1
- package/_assets/{send-eip712-transaction-DFbUyBnM.js → send-eip712-transaction-Cw3ykz5y.js} +2 -2
- package/_assets/{send-gasless-transaction-IULoS1Vn.js → send-gasless-transaction-BjGhnCwR.js} +2 -2
- package/_assets/{send-transaction-vCrIjEYg.js → send-transaction-COKVeGfk.js} +2 -2
- package/_assets/{sendMetaTransaction-C5CWJOs0.js → sendMetaTransaction-Bp3kwdLJ.js} +1 -1
- package/_assets/{sendRawTransaction-BnXA-t5g.js → sendRawTransaction-eVli2oE3.js} +3 -3
- package/_assets/{serializeTransaction-BuP136Wz.js → serializeTransaction-CIM9i_-w.js} +1 -1
- package/_assets/{session-proposal-CnATfxsE.js → session-proposal-KGl_Ah2b.js} +1 -1
- package/_assets/{session-request-PJjSNFhP.js → session-request-VAEXTksW.js} +2 -2
- package/_assets/{signing-DVSxcG9z.js → signing-Cgx49_1X.js} +3 -3
- package/_assets/{skeleton.styles-CLtTv572.js → skeleton.styles-BXNXDWEi.js} +1 -1
- package/_assets/{socials-Bf2bVkOp.js → socials-oKAOeF-k.js} +1 -1
- package/_assets/{styled-DUDTxrNz.js → styled-pD_2hanx.js} +1 -1
- package/_assets/{swaps-CfzGwDGN.js → swaps-BcAY_D99.js} +1 -1
- package/_assets/{thirdweb-fPfEaf4k.js → thirdweb-ChAqWFCO.js} +3 -3
- package/_assets/{to-serializable-transaction-DXr6jbkS.js → to-serializable-transaction-D9qGbcrS.js} +2 -2
- package/_assets/{transactionReceipt-eQP54mTE.js → transactionReceipt-BMw52z-f.js} +1 -1
- package/_assets/{transactions-CGh5C6RL.js → transactions-CeENvGIt.js} +1 -1
- package/_assets/{useCreditPacks-CasKnCD5.js → useCreditPacks-BcavayJ3.js} +1 -1
- package/_assets/{useImportable-SR1m5Hwh.js → useImportable-CqnIvzif.js} +1 -1
- package/_assets/{useInfiniteGrid-Cy1tipbK.js → useInfiniteGrid-BjEQAabI.js} +1 -1
- package/_assets/{useTheme-BvkrK9YA.js → useTheme-BnnteKI4.js} +1 -1
- package/_assets/{verifyHash-Bi_3pzoI.js → verifyHash-CuRmy06R.js} +1 -1
- package/_assets/{w3m-modal-DAkUUjAI.js → w3m-modal-BvOCJx7k.js} +1 -1
- package/_assets/{w3m-modal-D57uPD-0.js → w3m-modal-CkBFH4cA.js} +1 -1
- package/_assets/{wait-for-tx-receipt-ByVNtVUa.js → wait-for-tx-receipt-B2KaPYJT.js} +1 -1
- package/_assets/{wallets-DHJBT8N-.js → wallets-CpXU08d2.js} +5 -5
- package/_assets/{web-connector-zzH3rfgh.js → web-connector-BHRkWbB9.js} +3 -3
- package/_assets/{writeContract-BeuidFa5.js → writeContract-DNDGvg0r.js} +1 -1
- package/_assets/{zoraTestnet-D4oN56a_.js → zoraTestnet-CCn01jlp.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Authorizations-CLC0gP2S.js +0 -188
- package/_assets/LazyEmoteControls-DnvyzyyY.js +0 -2
- package/_assets/NotFound-CIGIbTGI.js +0 -13
- package/_assets/OutfitDetail-DF87HN6H.js +0 -334
- package/_assets/OutfitStudio-DHyzlXbm.js +0 -537
- package/_assets/StoreSettings-SFcLGWm7.js +0 -239
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{n as It,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-CGBg3yUz.js","_assets/react-BYHuwl8r.js","_assets/index-CKUuopSw.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-BDpbhgX6.js","_assets/intl-CBcMB1D2.js","_assets/index-BYP7oMPZ.css","_assets/useImportable-CqnIvzif.js","_assets/buy-BHkfYJLe.js","_assets/authorizations-B3AvOvOm.js","_assets/sendMetaTransaction-Bp3kwdLJ.js","_assets/ManaPricingBanner.styles-vDUAKLLe.js","_assets/Faq-DXtTtsuA.js","_assets/field.styles-PE4ZasC2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as It,bN as At,o as O,v as A,bO as $t,t as s,s as l,w as Lt,B as Et,x as Pt,b as c,an as Nt,I as $,bP as et,bQ as it,bR as Tt,_ as St,z as P,bS as Ct,A as Ft,bh as q,L as Dt,bT as Mt,E as Ht,bU as Rt,bV as _}from"./index-CKUuopSw.js";import{r as g,u as zt,j as e,L as rt,e as Ot}from"./react-BYHuwl8r.js";import{u as qt}from"./useImportable-CqnIvzif.js";import{L as _t}from"./LoadMore-jSNRJiwZ.js";import{u as L}from"./useInfiniteGrid-BjEQAabI.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-BHkfYJLe.js";import"./authorizations-B3AvOvOm.js";import"./sendMetaTransaction-Bp3kwdLJ.js";const Wt=15e3;function Gt(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)<=Wt}function Bt(t){const n=[...t].sort((i,r)=>r.createdAt-i.createdAt),a=[];for(const i of n){const r=a[a.length-1];r&&Gt(r[r.length-1],i)?r.push(i):a.push([i])}return a.map(i=>{var r;return{id:((r=i.find(o=>o.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(o=>o.createdAt)),status:Kt(i),totalCredits:i.reduce((o,h)=>o+h.credits,0),lines:i}})}function Kt(t){return t.some(n=>n.status==="PENDING")?"PENDING":t.some(n=>n.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ut(t){return t==="SETTLED"?"SETTLED":t==="EXPIRED"?"FAILED":"PENDING"}function Qt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function Vt(t){const n=[],a=new Map;for(const i of t){const r=Qt(i);if(!r){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const o=a.get(r);if(o){o.quantity+=1,o.credits+=i.credits;continue}const h={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};a.set(r,h),n.push(h)}return n}function Xt(t,n){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:n?It(t.manaWei,n):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Yt(t){return t.status!=="EXPIRED"||!!t.submittedTxHash}function Zt(t){const a=Bt(t.purchases.filter(Yt)).map(d=>({kind:"purchase",id:`purchase:${d.id}`,createdAt:d.createdAt,order:d})),i=t.sales.map(d=>{const x=Xt(d,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(t.creditOrders??[]).filter(d=>d.status!=="failed"&&d.status!=="abandoned").map(d=>({kind:"credit",id:`credit:${d.id}`,createdAt:d.createdAt,order:d})),o=new Set(t.purchases.filter(d=>d.txHash).map(d=>d.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(d=>!o.has(d.txHash.toLowerCase())).map(d=>({kind:"mana-purchase",id:`mana-purchase:${d.id}`,createdAt:d.createdAt,sale:d}));return[...a,...i,...r,...h].sort((d,x)=>x.createdAt-d.createdAt||(d.id<x.id?-1:1))}function Jt(t,n){return n==="all"?t:n==="sales"?t.filter(a=>a.kind==="sale"):t.filter(a=>a.kind==="purchase"||a.kind==="credit"||a.kind==="mana-purchase")}const ct=t=>t.trim().toLowerCase();function te(t){const n=new Map;for(const a of t??[]){const i=ct(a.txHash??"");if(!i)continue;const r=n.get(i);r?r.push(a):n.set(i,[a])}return n}function ee(t,n,a=Date.now()){const i=n.txHash?t.get(ct(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?ie(i[0].netCents):null,o=i.filter(d=>!d.available&&d.availableAt>a);if(o.length===0)return{kind:"credited",credits:r};const h=o.reduce((d,x)=>Math.max(d,x.availableAt),0);return{kind:"pending",credits:r,availableAt:h}}function ie(t){return At(t)}function ne(){const t=O(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:n,isLoading:a}=A({queryKey:["listing-count",t],queryFn:()=>$t({creator:t,onSale:!0,first:1}),enabled:!!t,staleTime:5*6e4});return{count:n==null?void 0:n.total,isLoading:a}}const se="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/credits-product-vs4Q6u6l.svg",W=Lt`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,ae=l.section`
|
|
@@ -107,12 +107,12 @@ import{n as It,bO as At,o as O,v as A,bP as $t,t as s,s as l,w as Lt,B as Et,x a
|
|
|
107
107
|
display: flex;
|
|
108
108
|
flex-direction: column;
|
|
109
109
|
gap: 16px;
|
|
110
|
-
`,
|
|
110
|
+
`,N=l.div`
|
|
111
111
|
background: ${s.colors.white};
|
|
112
112
|
border: 1px solid ${s.colors.line};
|
|
113
113
|
border-radius: 16px;
|
|
114
114
|
overflow: hidden;
|
|
115
|
-
`,
|
|
115
|
+
`,T=l.div`
|
|
116
116
|
display: flex;
|
|
117
117
|
align-items: center;
|
|
118
118
|
justify-content: space-between;
|
|
@@ -303,7 +303,7 @@ import{n as It,bO as At,o as O,v as A,bP as $t,t as s,s as l,w as Lt,B as Et,x a
|
|
|
303
303
|
border-radius: 10px;
|
|
304
304
|
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
305
305
|
background-size: 200% 100%;
|
|
306
|
-
animation: ${
|
|
306
|
+
animation: ${W} 1.3s infinite linear;
|
|
307
307
|
|
|
308
308
|
@media (prefers-reduced-motion: reduce) {
|
|
309
309
|
animation: none;
|
|
@@ -326,7 +326,7 @@ import{n as It,bO as At,o as O,v as A,bP as $t,t as s,s as l,w as Lt,B as Et,x a
|
|
|
326
326
|
border-radius: 6px;
|
|
327
327
|
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
328
328
|
background-size: 200% 100%;
|
|
329
|
-
animation: ${
|
|
329
|
+
animation: ${W} 1.3s infinite linear;
|
|
330
330
|
|
|
331
331
|
@media (prefers-reduced-motion: reduce) {
|
|
332
332
|
animation: none;
|
|
@@ -352,7 +352,7 @@ import{n as It,bO as At,o as O,v as A,bP as $t,t as s,s as l,w as Lt,B as Et,x a
|
|
|
352
352
|
border: 1px solid transparent;
|
|
353
353
|
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
354
354
|
background-size: 200% 100%;
|
|
355
|
-
animation: ${
|
|
355
|
+
animation: ${W} 1.3s infinite linear;
|
|
356
356
|
|
|
357
357
|
@media (prefers-reduced-motion: reduce) {
|
|
358
358
|
animation: none;
|
|
@@ -375,4 +375,4 @@ import{n as It,bO as At,o as O,v as A,bP as $t,t as s,s as l,w as Lt,B as Et,x a
|
|
|
375
375
|
color: ${s.colors.softWhite};
|
|
376
376
|
`,be=l(Et)`
|
|
377
377
|
margin-top: 12px;
|
|
378
|
-
`,Y=H.withComponent(rt),ye=g.lazy(()=>St(()=>import("./index-
|
|
378
|
+
`,Y=H.withComponent(rt),ye=g.lazy(()=>St(()=>import("./index-CGBg3yUz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(t=>({default:t.ImportListings}))),E=24,ve=["all","purchases","sales"],R="section",at="listings",z="view",je="migrate";function I(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function mt(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function gt({children:t}){const n=g.useRef(null),[a,i]=g.useState(null),r=()=>{var h;const o=(h=n.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return e.jsxs(xe,{ref:n,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[t,a?Ot.createPortal(e.jsx(me,{style:{top:a.top,left:a.left},role:"tooltip",children:c("activity.polygonMana")}),document.body):null]})}function ke({item:t}){const n=!!t.contractAddress&&!!t.itemId,a=!!t.tradeId||n,{data:i,isLoading:r}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?Rt(t.tradeId):_(t.contractAddress,{itemId:t.itemId}),enabled:a,staleTime:5*6e4}),o=a&&r,h=(i==null?void 0:i.name)??c("activity.itemFallback"),d=(i==null?void 0:i.thumbnail)??"",x=q({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=e.jsxs(e.Fragment,{children:[o?e.jsx(K,{}):e.jsx(B,{children:d?e.jsx("img",{src:d,alt:h}):e.jsx($,{name:"cart",size:20})}),e.jsxs(U,{children:[o?e.jsx(V,{}):e.jsx(Q,{title:h,children:h}),t.quantity>1?e.jsx(X,{children:c("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(fe,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return x?e.jsx(Y,{to:x,"data-link":"true",children:f}):e.jsx(H,{children:f})}function we({order:t}){const n=Vt(t.lines),a=n.reduce((o,h)=>o+h.quantity,0),i=Ut(t.status),r=i==="SETTLED"?c("activity.completed"):i==="FAILED"?c("activity.failed"):c("activity.processing");return e.jsxs(N,{"data-testid":"purchase-order",children:[e.jsxs(T,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:a})]})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":i,children:r}),e.jsxs(k,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),i==="FAILED"?e.jsx(ge,{children:c("activity.purchaseFailedNote")}):null,e.jsx(G,{children:n.map(o=>e.jsx(ke,{item:o},o.key))})]})}function Ie({sale:t}){const{data:n,isLoading:a}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>_(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??c("activity.itemFallback"),r=(n==null?void 0:n.thumbnail)??"",o=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[a?e.jsx(K,{}):e.jsx(B,{children:r?e.jsx("img",{src:r,alt:i}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[a?e.jsx(V,{}):e.jsx(Q,{title:i,children:i}),e.jsx(X,{children:c("activity.boughtFrom",{account:xt(t.seller)})})]})]});return e.jsxs(N,{"data-testid":"activity-mana-purchase",children:[e.jsxs(T,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.paidWithMana")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":"SETTLED",children:c("activity.completed")}),e.jsxs(k,{children:[mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]})]})]}),e.jsx(G,{children:o?e.jsx(Y,{to:o,"data-link":"true",children:h}):e.jsx(H,{children:h})})]})}function Ae({sale:t,payout:n}){const{data:a,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>_(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),r=(a==null?void 0:a.name)??c("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,d=e.jsxs(e.Fragment,{children:[i?e.jsx(K,{}):e.jsx(B,{children:o?e.jsx("img",{src:o,alt:r}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[i?e.jsx(V,{}):e.jsx(Q,{title:r,children:r}),e.jsxs(X,{children:[c("activity.soldTo",{account:xt(t.counterparty)}),n.kind==="pending"?` · ${c("activity.payoutPendingOn",{date:I(n.availableAt)})}`:""]})]})]});return e.jsxs(N,{"data-testid":"activity-sale",children:[e.jsxs(T,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.saleLabel")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?c("activity.payoutPending"):c("activity.sold")}),n.kind==="direct"?e.jsxs(k,{"data-kind":"income",children:["+",mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]}):n.credits!==null?e.jsxs(k,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",Dt(n.credits)]}):e.jsx(k,{"data-kind":"income",children:c("activity.payoutCredited")})]})]}),e.jsx(G,{children:h?e.jsx(Y,{to:h,"data-link":"true",children:d}):e.jsx(H,{children:d})})]})}function $e({order:t}){const n=`$${(t.usdCents/100).toFixed(2)}`,a=Ct(t.status),i=a==="SETTLED"?c("activity.completed"):a==="FAILED"?c("activity.failed"):a==="UNFINISHED"?c("activity.unfinished"):c("activity.processing"),r=O(p=>p.session),o=Ft(),[h,d]=g.useState(!1),x=t.status==="initiated"&&!!r;async function f(){if(!(!r||h)){d(!0);try{const p=await Mt(t.id,r.identity);if(p){window.location.href=p;return}Ht.info(c("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})}finally{d(!1)}}}return e.jsx(N,{"data-testid":"credit-order",children:e.jsxs(T,{children:[e.jsx(he,{children:e.jsx("img",{src:se,alt:"","aria-hidden":!0})}),e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.creditPurchaseLabel")," · ",c("activity.creditPaid",{usd:n})]})]}),e.jsxs(D,{children:[x?e.jsx(pe,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?c("activity.resuming"):c("activity.resume")}):null,e.jsx(M,{"data-status":a,children:i}),e.jsxs(k,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Le({filter:t}){const n={all:{icon:"clock",title:c("activity.emptyAllTitle"),body:c("activity.emptyAllBody")},purchases:{icon:"cart",title:c("activity.emptyPurchasesTitle"),body:c("activity.emptyPurchasesBody")},sales:{icon:"offer",title:c("activity.emptySalesTitle"),body:c("activity.emptySalesBody")}}[t];return e.jsxs(ut,{children:[e.jsx($,{name:n.icon,size:40,color:s.colors.muted2}),e.jsx(ht,{children:n.title}),e.jsx(pt,{children:n.body}),t!=="sales"?e.jsx(be,{as:rt,to:"/items",variant:"white",children:c("notFound.cta")}):null]})}function qe(){const{session:t}=O(),[n,a]=g.useState("all"),[i,r]=zt(),o=i.get(R)===at||i.get(z)===je;Pt({title:o?c("seo.import.title"):c("nav.activity"),noindex:!0});const{count:h}=qt(),{count:d}=ne(),f=h!==void 0&&d!==void 0&&(h>0||d>0||o),p=!!t&&!o&&n!=="sales",m=!!t&&!o&&n!=="purchases",b=L(["purchases",t==null?void 0:t.address],u=>Tt(t.address,t.identity,{first:E,skip:u}),{enabled:p}),y=L(["sales",t==null?void 0:t.address],u=>et(t.address,{role:"seller",first:E,skip:u}),{enabled:m}),v=L(["credit-orders",t==null?void 0:t.address],u=>it(t.address,t.identity,{first:E,skip:u}),{enabled:p}),j=L(["mana-purchases",t==null?void 0:t.address],u=>et(t.address,{role:"buyer",first:E,skip:u}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>it(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:m,staleTime:6e4}),ft=g.useMemo(()=>te(Z),[Z]),{data:bt}=Nt(m);if(!t)return e.jsxs(ut,{children:[e.jsx($,{name:"clock",size:40,color:s.colors.muted2}),e.jsx(ht,{children:c("activity.signInTitle")}),e.jsx(pt,{children:c("activity.signInBody")})]});const J=Jt(Zt({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:bt}),n),yt=p&&(b.isLoading||v.isLoading||j.isLoading)||m&&y.isLoading,tt=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||m&&y.isFetchingNextPage,vt=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||m&&y.hasNextPage;function jt(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function kt(u){if(a(u),!o)return;const w=new URLSearchParams(i);w.delete(R),w.delete(z),r(w,{replace:!0})}function wt(){const u=new URLSearchParams(i);u.set(R,at),u.delete(z),r(u,{replace:!0})}return e.jsxs(ae,{children:[e.jsx(re,{children:e.jsx(oe,{children:c("nav.activity")})}),e.jsxs(ce,{role:"tablist","aria-label":c("nav.activity"),children:[ve.map(u=>e.jsx(dt,{type:"button",role:"tab","aria-selected":!o&&n===u,"data-active":!o&&n===u,"data-testid":`activity-filter-${u}`,onClick:()=>kt(u),children:c(`activity.filter.${u}`)},u)),f?e.jsxs(de,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?c("activity.migrate.chipAria",{count:h}):void 0,onClick:wt,children:[c("activity.migrate.chip"),h?e.jsx(le,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?e.jsx(g.Suspense,{fallback:e.jsx(ue,{"aria-busy":"true"}),children:e.jsx(ye,{})}):yt?e.jsx(nt,{children:Array.from({length:5}).map((u,w)=>e.jsx(st,{},w))}):J.length===0?e.jsx(Le,{filter:n}):e.jsxs(e.Fragment,{children:[e.jsxs(nt,{children:[J.map(u=>u.kind==="purchase"?e.jsx(we,{order:u.order},u.id):u.kind==="credit"?e.jsx($e,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ie,{sale:u.sale},u.id):e.jsx(Ae,{sale:u.sale,payout:ee(ft,u.sale)},u.id)),tt?e.jsx(st,{}):null]}),e.jsx(_t,{hasNextPage:vt,isFetching:tt,onLoadMore:jt})]})]})}export{qe as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-
|
|
1
|
+
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-CKUuopSw.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const P="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/custom-welcome-background-BxlFQma9.webp",L="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/DCL_LogoPattern-BryBPc3d.png",D=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}from"./useUrlFilters-DH-gxdfV.js";import{u as Je,S as $e,R as Xe,F as Ye,e as et}from"./categories-
|
|
1
|
+
import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}from"./useUrlFilters-DH-gxdfV.js";import{u as Je,S as $e,R as Xe,F as Ye,e as et}from"./categories-D23W_J-A.js";import{c as L,r as tt,bm as nt,bn as st,aA as it,a as ot,s,t,o as Ie,bc as rt,A as at,L as xe,b as n,y as lt,I as E,z as F,c0 as Y,bb as ct,Z as J,br as dt,bq as pt,x as Ae,an as Ne,n as Le,q as ht,ac as xt,ap as ke,aq as G,aG as ft,bL as mt}from"./index-CKUuopSw.js";import{g as ut,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as Ct,m as $t,n as kt,M as St,u as Tt,E as Et,v as _t,p as Rt,q as Mt,r as zt,s as Ft,t as It}from"./Assets.styles-BBWJCcMx.js";import{L as At}from"./LoadMore-jSNRJiwZ.js";import{u as Nt}from"./useInfiniteGrid-BjEQAabI.js";import{E as Lt}from"./ErrorNotice-OUNK486K.js";import{d as Wt}from"./dcl-schemas-CmtP3U6y.js";import{s as Pt,G as Bt,w as Ht,S as Ut}from"./buy-gasless-BfTEWjT9.js";import{s as Ot,k as Gt}from"./buy-BHkfYJLe.js";import{f as Dt}from"./errors-DZ_QWsza.js";import{J as qt,C as Zt,B as fe}from"./ethers-BDpbhgX6.js";import{n as Vt}from"./Tooltip-BDmKiALz.js";import{G as Kt}from"./grid.styles-hOZTJ80g.js";import"./skeleton.styles-BXNXDWEi.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-B3AvOvOm.js";import"./sendMetaTransaction-Bp3kwdLJ.js";function D(i){const r=i.source??"item",l=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${r}:${l}`}const W="100000000000000000000",We=2,X=15,Qt=/^[a-zA-Z0-9]+$/;function Se(i){const r=i.trim();return r.length===0?{ok:!1,reason:"empty"}:Qt.test(r)?r.length<We?{ok:!1,reason:"too-short"}:r.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Jt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Xt=["function available(string _subdomain) view returns (bool)"],Te={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return L.chainId===Number(Wt.ChainId.MATIC_MAINNET)?Te.mainnet:Te.sepolia}async function en(i,r={}){var c;const{rpc:l,address:x}=Yt(),h=new qt(l),d=new Zt(x,Xt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${i}") on ${l}`);const p=await d.available(i);if((c=r.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${p}`),p?"available":"taken"}const tn="https://app.across.to/api";class me extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return it(W,i)}async function sn(i,r,l={}){var c;const x=l.chainId??L.chainId,h=l.provider??"across",d=`${L.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${x}&provider=${h}`,p=await ot(d,{method:"GET",identity:i,metadata:{}});if(!p.ok){let a;try{a=(c=await p.json())==null?void 0:c.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new me:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function on(i,r){const l=fe.from(i.availableAmount),h=fe.from(W).sub(l);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:W}}async function rn(i,r={}){const l=tn,x=r.intervalMs??1e4,h=r.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const c=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${i}`);if(c.ok){const a=await c.json(),f=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(f==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(f==="refunded"||f==="expired")return{status:f,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(c=>setTimeout(c,x))}return d}async function an(i){const{name:r,identity:l,signer:x}=i,h=i.chainId??L.chainId,d=i.provider??"across",p=(i.beneficiary??await x.getAddress()).toLowerCase();let c=null,a=!1;console.info("[names] register start",{name:r,buyer:p,chainId:h,provider:d});try{const f=await tt(h),g=nn(f);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:f});const u=await sn(l,r,{chainId:h,provider:d});console.info("[names] step 2/6 route fetched",{target:u.externalCall.target,selector:u.externalCall.selector,provider:u.provider,quoteId:u.quoteId});const v=await nt(l,g);if(c=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),fe.from(v.maxCreditedValue).lt(W))throw new Error("Credit under-sized for the name price");const j=on(v.credit,u);let m;try{m=await Pt({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Bt))throw b;m=await Ot(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Ht(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await rn(m,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:m};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:m,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:m}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:r,buyer:p,originConfirmed:a}),f instanceof Ut)return{status:"pending",originTxHash:f.txHash};if(c&&!a&&await st(l,[c]).catch(()=>{}),f instanceof me)throw f;const g=new Error(Dt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const ln="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",cn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/name-verified-oGwQ3ntb.svg",dn="#34fee6",pn=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -422,7 +422,7 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
422
422
|
color: ${t.colors.accent};
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
`;function In({name:i,priceCredits:r,onClose:l}){const{session:x}=Ie(),{data:h,isError:d}=rt(x),p=at(),c=Fe(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),C=a==="completing",$=r!=null?xe(r):"—",k=r==null,T=h==null?void 0:h.credits,I=r!=null&&T!=null?r-T:0,S=I>0,A=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:xe(I)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!C&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[C,l]);async function
|
|
425
|
+
`;function In({name:i,priceCredits:r,onClose:l}){const{session:x}=Ie(),{data:h,isError:d}=rt(x),p=at(),c=Fe(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),C=a==="completing",$=r!=null?xe(r):"—",k=r==null,T=h==null?void 0:h.credits,I=r!=null&&T!=null?r-T:0,S=I>0,A=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:xe(I)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!C&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[C,l]);async function P(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await an({name:i,identity:x.identity,signer:x.signer});J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){J(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof me?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const B=a!=="success"&&a!=="pending",M=lt(x==null?void 0:x.providerType);return e.jsx(pn,{onClick:C?void 0:l,role:"presentation",children:e.jsxs(hn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[B&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:C,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(Ee,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(_e,{onClick:()=>f("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n("names.confirmTitle")}),e.jsx(yn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${An(i)}</b>`})}}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:"@"}),e.jsx(vn,{value:g,onChange:y=>u(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(Cn,{children:".dcl.eth"})]})]}),A?e.jsxs(de,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:A})]}):null,e.jsx(_e,{onClick:()=>void P(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs($n,{children:[e.jsx(kn,{src:ct,alt:"",width:56,height:56}),e.jsx(Sn,{children:M?n("names.confirming"):n("names.completing")}),e.jsxs(Tn,{children:[e.jsx(En,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(_n,{children:"1/1"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{}),e.jsxs(de,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(oe,{style:{marginTop:20},children:[e.jsx(Ee,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),e.jsx(Re,{children:e.jsx(Me,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{}),e.jsxs(Rn,{children:[e.jsx(Mn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(zn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(oe,{style:{marginTop:20},children:[e.jsxs(xn,{"data-testid":"name-success-tile",children:[e.jsx(fn,{src:ln,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(mn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(un,{src:cn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),e.jsxs(Re,{children:[e.jsx(Me,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Fn,{href:L.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function An(i){return i.replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/identity-B4DXDuJP.webp",Ln="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/world-B-9aPlxu.webp",Wn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/invite-BfwIhP2C.webp",Pn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/governance-DnazlIjy.webp",Bn=s.div`
|
|
426
426
|
width: 100%;
|
|
427
427
|
min-width: 0;
|
|
428
428
|
`,Hn=s.nav`
|
|
@@ -433,25 +433,26 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
433
433
|
font-family: ${t.font.sans};
|
|
434
434
|
font-size: 12px;
|
|
435
435
|
line-height: 1;
|
|
436
|
-
color: ${t.colors.
|
|
436
|
+
color: ${t.colors.gray4};
|
|
437
437
|
`,Un=s.button`
|
|
438
438
|
border: 0;
|
|
439
439
|
background: none;
|
|
440
440
|
padding: 0;
|
|
441
441
|
cursor: pointer;
|
|
442
442
|
font: inherit;
|
|
443
|
-
color: ${t.colors.
|
|
443
|
+
color: ${t.colors.gray4};
|
|
444
444
|
|
|
445
445
|
&:hover {
|
|
446
|
+
color: ${t.colors.white};
|
|
446
447
|
text-decoration: underline;
|
|
447
448
|
}
|
|
448
449
|
&:focus-visible {
|
|
449
|
-
outline: 2px solid ${t.colors.
|
|
450
|
+
outline: 2px solid ${t.colors.white};
|
|
450
451
|
outline-offset: 2px;
|
|
451
452
|
}
|
|
452
453
|
`,On=s.span`
|
|
453
454
|
font-weight: 700;
|
|
454
|
-
color: ${t.colors.
|
|
455
|
+
color: ${t.colors.softWhite};
|
|
455
456
|
`,Gn=s.div`
|
|
456
457
|
display: flex;
|
|
457
458
|
flex-direction: column;
|
|
@@ -649,7 +650,7 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
649
650
|
font-size: 13px;
|
|
650
651
|
color: ${t.colors.muted2};
|
|
651
652
|
white-space: nowrap;
|
|
652
|
-
`,
|
|
653
|
+
`,Pe=s.button`
|
|
653
654
|
flex: none;
|
|
654
655
|
display: inline-flex;
|
|
655
656
|
align-items: center;
|
|
@@ -685,7 +686,7 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
685
686
|
${t.media.maxWidth("mobile")} {
|
|
686
687
|
display: none;
|
|
687
688
|
}
|
|
688
|
-
`,rs=s(
|
|
689
|
+
`,rs=s(Pe)`
|
|
689
690
|
display: none;
|
|
690
691
|
|
|
691
692
|
${t.media.maxWidth("mobile")} {
|
|
@@ -862,4 +863,4 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
862
863
|
clip: rect(0, 0, 0, 0);
|
|
863
864
|
white-space: nowrap;
|
|
864
865
|
border: 0;
|
|
865
|
-
`,us="https://docs.decentraland.org/creator/worlds/about/",gs="https://governance.decentraland.org";function bs(i){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ys({onBack:i}){Ae({title:n("seo.names.title"),description:n("seo.names.description")});const{session:r,signIn:l}=Ie(),{data:x}=Ne(),h=x?Le(P,x):null,[d,p]=w.useState(""),[c,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[d]),w.useEffect(()=>{if(!Se(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const T=new AbortController,I=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:T.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(I),T.abort()}},[d]);const m=Se(d),b=m.ok&&(c==="available"||c==="error");function C(){if(b){if(!r){l();return}g(!0)}}const $=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(as,{children:[e.jsx(F,{}),xe(h)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Hn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Un,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(On,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Gn,{children:[e.jsxs(Dn,{children:[e.jsxs(qn,{children:[e.jsx(Zn,{children:n("names.heroTitle")}),e.jsx(Vn,{children:n("names.heroSubtitle")})]}),e.jsxs(Kn,{children:[e.jsxs(Qn,{"data-testid":"names-input-wrap",children:[e.jsxs(Jn,{invalid:c==="taken",children:[e.jsxs(ts,{children:[e.jsx(ns,{"aria-hidden":!0,children:"@"}),e.jsx(ss,{value:d,onChange:k=>p(Jt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Xn,{ref:u,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(is,{children:n("names.suffix")})]}),d.length>0?e.jsxs(os,{"aria-hidden":!0,children:[d.length,"/",X]}):null,e.jsx(We,{onClick:C,disabled:!b,"data-testid":"names-claim",children:$})]}),c==="taken"?e.jsxs(Yn,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(es,{href:bs(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(pe,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.tooShort",{min:Pe})}):null]}),e.jsx(rs,{onClick:C,disabled:!b,children:$}),e.jsx(ms,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(cs,{children:[e.jsxs(ds,{children:[e.jsx(ps,{children:n("names.whyTitle")}),e.jsx(hs,{children:n("names.whyIntro")})]}),e.jsxs(xs,{children:[e.jsxs(q,{children:[e.jsx(Z,{src:Nn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(Q,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Ln,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(Q,{children:[n("names.why2")," ",e.jsx(fs,{children:n("names.why2Address")})]}),e.jsxs(ze,{href:us,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Pn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(Q,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Wn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(Q,{children:n("names.why4")}),e.jsxs(ze,{href:gs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(In,{name:d,priceCredits:h,onClose:()=>g(!1)}):null]})}const ws="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",he=48,js=["all","on_sale","not_for_sale"];function Us(){const[i]=Ke(),r=Fe(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.get("q")??"").trim();Ae({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[d,p]=Qe(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=js.includes(d.status)?d.status:"on_sale";Je(`${j}:${c??""}`);const[b,C]=w.useState(!1);w.useEffect(()=>{if(!b)return;const o=O=>{O.key==="Escape"&&C(!1)};document.addEventListener("keydown",o);const z=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=z}},[b]);const $=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,T=g&&!Number.isNaN(Number(g))?Number(g):void 0,I=ht(),S=c?et[c]:void 0,A=($e.find(o=>o.key===v)??$e[0]).server,W={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:T,search:l||void 0,sortBy:A,isSmart:u||void 0,onSale:!0,listingType:I?void 0:"primary"},B={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:A,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:M,total:y,isLoading:_,isPlaceholderData:R,error:ue,hasNextPage:Be,isFetchingNextPage:ge,isFetchNextPageError:He,fetchNextPage:Ue}=Nt($?["shop-items",W]:["catalog-items",B],o=>$?ft({...W,first:he,skip:o}):mt({...B,first:he,skip:o}),{enabled:j!=="names"}),H=y,{data:be,isError:Oe,isPending:Ge}=Ne(),De=o=>be&&o.manaWei?Le(o.manaWei,be):null,qe=$&&Ge&&M.some(o=>o.source==="legacy"),ye=_||R||qe,Ze=_?15:Math.min(Math.max(M.length,1),he),we=w.useRef(null);w.useEffect(()=>{_||R||!l||we.current===l||(we.current=l,J("Shop Searched",{query:l,result_count:H}))},[l,_,R,H]);const U=w.useRef("__init__");w.useEffect(()=>{if(_||R)return;const o=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:T,sort:v,status:m,smart:u});if(U.current==="__init__"||U.current===o){U.current=o;return}U.current=o,J("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:T??null,status:m,smart:u,sort:v},result_count:H})},[j,c,a,k,T,v,m,u,_,R,H]);function je(o){p({category:o,subCategory:null})}function ve(o){p({status:o})}function Ce(o){p({rarities:a.includes(o)?a.filter(z=>z!==o):[...a,o]})}function Ve(){p(h)}const N=[];(k!=null||T!=null)&&N.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const o of Xe)a.includes(o)&&N.push({key:`rarity-${o}`,label:xt(o),onRemove:()=>Ce(o)});return u&&N.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&N.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>ve("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>C(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>C(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:j,subCategory:c,onCategory:je,onSub:o=>p({subCategory:o}),priceMin:f,priceMax:g,onPriceMin:o=>p({priceMin:o}),onPriceMax:o=>p({priceMax:o}),rarities:a,onToggleRarity:Ce,status:m,onStatus:ve,smart:u,onSmart:o=>p({smart:o})})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>C(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ys,{onBack:()=>je("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:o=>p({sort:o}),total:y,loading:_||R,query:l,onOpenFilters:()=>C(!0),chips:N,onClearChips:Ve}),Oe&&$&&M.some(o=>o.source==="legacy")?e.jsx(Tt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ue?e.jsx(Lt,{message:n("assets.loadError"),testId:"browse-error"}):null,!ye&&M.length===0&&!ue?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:ws,alt:""}),e.jsxs(Rt,{children:[e.jsx(Mt,{children:n("assets.empty.title")}),e.jsx(zt,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Ft,{children:e.jsx(It,{type:"button",onClick:()=>r("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:ye?e.jsx(ke,{count:Ze}):e.jsxs(e.Fragment,{children:[M.map(o=>{if(!$)return e.jsx(G,{item:o,mode:"view"},D(o));const z=o;if(z.source!=="legacy")return e.jsx(G,{item:o},D(o));const O=De(z);return O==null?e.jsx(G,{item:o,mode:"view"},D(o)):e.jsx(G,{item:{...z,priceCredits:O}},D(o))}),ge?e.jsx(ke,{count:6}):null]})}),e.jsx(At,{hasNextPage:Be,isFetching:ge,isError:He,onLoadMore:()=>void Ue()})]})]})})]})}export{Us as Assets};
|
|
866
|
+
`,us="https://docs.decentraland.org/creator/worlds/about/",gs="https://governance.decentraland.org";function bs(i){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ys({onBack:i}){Ae({title:n("seo.names.title"),description:n("seo.names.description")});const{session:r,signIn:l}=Ie(),{data:x}=Ne(),h=x?Le(W,x):null,[d,p]=w.useState(""),[c,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[d]),w.useEffect(()=>{if(!Se(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const T=new AbortController,I=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:T.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(I),T.abort()}},[d]);const m=Se(d),b=m.ok&&(c==="available"||c==="error");function C(){if(b){if(!r){l();return}g(!0)}}const $=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(as,{children:[e.jsx(F,{}),xe(h)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Hn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Un,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(On,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Gn,{children:[e.jsxs(Dn,{children:[e.jsxs(qn,{children:[e.jsx(Zn,{children:n("names.heroTitle")}),e.jsx(Vn,{children:n("names.heroSubtitle")})]}),e.jsxs(Kn,{children:[e.jsxs(Qn,{"data-testid":"names-input-wrap",children:[e.jsxs(Jn,{invalid:c==="taken",children:[e.jsxs(ts,{children:[e.jsx(ns,{"aria-hidden":!0,children:"@"}),e.jsx(ss,{value:d,onChange:k=>p(Jt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Xn,{ref:u,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(is,{children:n("names.suffix")})]}),d.length>0?e.jsxs(os,{"aria-hidden":!0,children:[d.length,"/",X]}):null,e.jsx(Pe,{onClick:C,disabled:!b,"data-testid":"names-claim",children:$})]}),c==="taken"?e.jsxs(Yn,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(es,{href:bs(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(pe,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.tooShort",{min:We})}):null]}),e.jsx(rs,{onClick:C,disabled:!b,children:$}),e.jsx(ms,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(cs,{children:[e.jsxs(ds,{children:[e.jsx(ps,{children:n("names.whyTitle")}),e.jsx(hs,{children:n("names.whyIntro")})]}),e.jsxs(xs,{children:[e.jsxs(q,{children:[e.jsx(Z,{src:Nn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(Q,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Ln,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(Q,{children:[n("names.why2")," ",e.jsx(fs,{children:n("names.why2Address")})]}),e.jsxs(ze,{href:us,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Wn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(Q,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Pn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(Q,{children:n("names.why4")}),e.jsxs(ze,{href:gs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(In,{name:d,priceCredits:h,onClose:()=>g(!1)}):null]})}const ws="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",he=48,js=["all","on_sale","not_for_sale"];function Us(){const[i]=Ke(),r=Fe(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.get("q")??"").trim();Ae({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[d,p]=Qe(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=js.includes(d.status)?d.status:"on_sale";Je(`${j}:${c??""}`);const[b,C]=w.useState(!1);w.useEffect(()=>{if(!b)return;const o=O=>{O.key==="Escape"&&C(!1)};document.addEventListener("keydown",o);const z=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=z}},[b]);const $=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,T=g&&!Number.isNaN(Number(g))?Number(g):void 0,I=ht(),S=c?et[c]:void 0,A=($e.find(o=>o.key===v)??$e[0]).server,P={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:T,search:l||void 0,sortBy:A,isSmart:u||void 0,onSale:!0,listingType:I?void 0:"primary"},B={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:A,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:M,total:y,isLoading:_,isPlaceholderData:R,error:ue,hasNextPage:Be,isFetchingNextPage:ge,isFetchNextPageError:He,fetchNextPage:Ue}=Nt($?["shop-items",P]:["catalog-items",B],o=>$?ft({...P,first:he,skip:o}):mt({...B,first:he,skip:o}),{enabled:j!=="names"}),H=y,{data:be,isError:Oe,isPending:Ge}=Ne(),De=o=>be&&o.manaWei?Le(o.manaWei,be):null,qe=$&&Ge&&M.some(o=>o.source==="legacy"),ye=_||R||qe,Ze=_?15:Math.min(Math.max(M.length,1),he),we=w.useRef(null);w.useEffect(()=>{_||R||!l||we.current===l||(we.current=l,J("Shop Searched",{query:l,result_count:H}))},[l,_,R,H]);const U=w.useRef("__init__");w.useEffect(()=>{if(_||R)return;const o=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:T,sort:v,status:m,smart:u});if(U.current==="__init__"||U.current===o){U.current=o;return}U.current=o,J("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:T??null,status:m,smart:u,sort:v},result_count:H})},[j,c,a,k,T,v,m,u,_,R,H]);function je(o){p({category:o,subCategory:null})}function ve(o){p({status:o})}function Ce(o){p({rarities:a.includes(o)?a.filter(z=>z!==o):[...a,o]})}function Ve(){p(h)}const N=[];(k!=null||T!=null)&&N.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const o of Xe)a.includes(o)&&N.push({key:`rarity-${o}`,label:xt(o),onRemove:()=>Ce(o)});return u&&N.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&N.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>ve("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>C(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>C(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:j,subCategory:c,onCategory:je,onSub:o=>p({subCategory:o}),priceMin:f,priceMax:g,onPriceMin:o=>p({priceMin:o}),onPriceMax:o=>p({priceMax:o}),rarities:a,onToggleRarity:Ce,status:m,onStatus:ve,smart:u,onSmart:o=>p({smart:o})})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>C(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ys,{onBack:()=>je("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:o=>p({sort:o}),total:y,loading:_||R,query:l,onOpenFilters:()=>C(!0),chips:N,onClearChips:Ve}),Oe&&$&&M.some(o=>o.source==="legacy")?e.jsx(Tt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ue?e.jsx(Lt,{message:n("assets.loadError"),testId:"browse-error"}):null,!ye&&M.length===0&&!ue?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:ws,alt:""}),e.jsxs(Rt,{children:[e.jsx(Mt,{children:n("assets.empty.title")}),e.jsx(zt,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Ft,{children:e.jsx(It,{type:"button",onClick:()=>r("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:ye?e.jsx(ke,{count:Ze}):e.jsxs(e.Fragment,{children:[M.map(o=>{if(!$)return e.jsx(G,{item:o,mode:"view"},D(o));const z=o;if(z.source!=="legacy")return e.jsx(G,{item:o},D(o));const O=De(z);return O==null?e.jsx(G,{item:o,mode:"view"},D(o)):e.jsx(G,{item:{...z,priceCredits:O}},D(o))}),ge?e.jsx(ke,{count:6}):null]})}),e.jsx(At,{hasNextPage:Be,isFetching:ge,isError:He,onLoadMore:()=>void Ue()})]})]})})]})}export{Us as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as w,j as i}from"./react-BYHuwl8r.js";import{C as _,R as T,a as le,b as de}from"./categories-
|
|
1
|
+
import{r as w,j as i}from"./react-BYHuwl8r.js";import{C as _,R as T,a as le,b as de}from"./categories-D23W_J-A.js";import{n as d,T as ce}from"./Tooltip-BDmKiALz.js";import{s as t,t as e,I as k,b as a,ac as E,C as F}from"./index-CKUuopSw.js";const pe=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{t as o,s as n,B as G,w as N,x as P,b as e,o as B,y as O,I as z,z as K,v as w,A as H,c as Q,D as X,E as A,F as Z,G as J,H as E}from"./index-CKUuopSw.js";import{c as U,d as V,b as Y,e as tt,s as it,a as et}from"./authorizations-B3AvOvOm.js";import{f as ot}from"./builder-DxumJmKw.js";import{m as at}from"./mana-matic-C4e1sNO3.js";import{f as nt}from"./errors-DZ_QWsza.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Bp3kwdLJ.js";const st=N`
|
|
2
|
+
to { transform: rotate(360deg); }
|
|
3
|
+
`,rt=N`
|
|
4
|
+
to { background-position: -200% 0; }
|
|
5
|
+
`,ct=n.section`
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
/* Centre heading, intro and rows as ONE block, so the list isn't parked against the left edge of a
|
|
9
|
+
wide page (same treatment as the Activity feed). */
|
|
10
|
+
max-width: 760px;
|
|
11
|
+
margin-inline: auto;
|
|
12
|
+
`,lt=n.div`
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 6px;
|
|
16
|
+
margin-bottom: 24px;
|
|
17
|
+
`,dt=n.h1`
|
|
18
|
+
font-family: ${o.font.sans};
|
|
19
|
+
margin: 0;
|
|
20
|
+
color: ${o.colors.softWhite};
|
|
21
|
+
`,ut=n.p`
|
|
22
|
+
color: ${o.colors.gray4};
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
margin: 0;
|
|
25
|
+
max-width: 60ch;
|
|
26
|
+
`,k=n.div`
|
|
27
|
+
margin-bottom: 28px;
|
|
28
|
+
`,$=n.h2`
|
|
29
|
+
font-family: ${o.font.sans};
|
|
30
|
+
font-size: 15px;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
color: ${o.colors.softWhite};
|
|
33
|
+
margin: 0 0 10px;
|
|
34
|
+
`,x=n.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 12px;
|
|
38
|
+
`,ht=n.div`
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-template-columns: 44px 1fr auto;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: 14px;
|
|
43
|
+
padding: 14px 18px;
|
|
44
|
+
background: ${o.colors.white};
|
|
45
|
+
border: 1px solid ${o.colors.line};
|
|
46
|
+
border-radius: 16px;
|
|
47
|
+
|
|
48
|
+
${o.media.maxWidth("mobile")} {
|
|
49
|
+
grid-template-columns: 44px 1fr;
|
|
50
|
+
grid-row-gap: 10px;
|
|
51
|
+
}
|
|
52
|
+
`,T=n.div`
|
|
53
|
+
height: 74px;
|
|
54
|
+
border-radius: 16px;
|
|
55
|
+
background: linear-gradient(100deg, #efeef2 30%, #e2e0e7 50%, #efeef2 70%);
|
|
56
|
+
background-size: 200% 100%;
|
|
57
|
+
animation: ${rt} 1.4s infinite linear;
|
|
58
|
+
|
|
59
|
+
@media (prefers-reduced-motion: reduce) {
|
|
60
|
+
animation: none;
|
|
61
|
+
}
|
|
62
|
+
`,pt=n.img`
|
|
63
|
+
width: 22px !important;
|
|
64
|
+
height: 22px !important;
|
|
65
|
+
object-fit: contain;
|
|
66
|
+
`,mt=n.div`
|
|
67
|
+
width: 44px;
|
|
68
|
+
height: 44px;
|
|
69
|
+
border-radius: 10px;
|
|
70
|
+
background: ${o.colors.media};
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
color: ${o.colors.muted2};
|
|
76
|
+
|
|
77
|
+
img {
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
object-fit: contain;
|
|
81
|
+
}
|
|
82
|
+
`,gt=n.div`
|
|
83
|
+
min-width: 0;
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
gap: 3px;
|
|
87
|
+
`,xt=n.span`
|
|
88
|
+
font-weight: 700;
|
|
89
|
+
color: ${o.colors.text};
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
text-overflow: ellipsis;
|
|
93
|
+
`,ft=n.span`
|
|
94
|
+
font-size: 13px;
|
|
95
|
+
color: ${o.colors.muted};
|
|
96
|
+
`,yt=n.span`
|
|
97
|
+
font-size: 12px;
|
|
98
|
+
font-weight: 700;
|
|
99
|
+
color: ${o.colors.muted2};
|
|
100
|
+
|
|
101
|
+
&[data-active='true'] {
|
|
102
|
+
color: ${o.colors.okStrong};
|
|
103
|
+
}
|
|
104
|
+
`,bt=n.div`
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
gap: 10px;
|
|
108
|
+
justify-self: end;
|
|
109
|
+
|
|
110
|
+
${o.media.maxWidth("mobile")} {
|
|
111
|
+
grid-column: 1 / -1;
|
|
112
|
+
justify-self: start;
|
|
113
|
+
}
|
|
114
|
+
`,zt=n.button`
|
|
115
|
+
position: relative;
|
|
116
|
+
width: 46px;
|
|
117
|
+
height: 26px;
|
|
118
|
+
flex: 0 0 auto;
|
|
119
|
+
border-radius: ${o.radius.pill};
|
|
120
|
+
border: none;
|
|
121
|
+
background: ${o.colors.gray4};
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
transition: background 0.15s;
|
|
124
|
+
padding: 0;
|
|
125
|
+
|
|
126
|
+
&::after {
|
|
127
|
+
content: '';
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 3px;
|
|
130
|
+
left: 3px;
|
|
131
|
+
width: 20px;
|
|
132
|
+
height: 20px;
|
|
133
|
+
border-radius: 50%;
|
|
134
|
+
background: ${o.colors.white};
|
|
135
|
+
transition: transform 0.15s;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-active='true'] {
|
|
139
|
+
background: ${o.colors.accent};
|
|
140
|
+
}
|
|
141
|
+
&[data-active='true']::after {
|
|
142
|
+
transform: translateX(20px);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:disabled {
|
|
146
|
+
cursor: default;
|
|
147
|
+
opacity: 0.6;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:focus-visible {
|
|
151
|
+
outline: 2px solid ${o.colors.accent};
|
|
152
|
+
outline-offset: 2px;
|
|
153
|
+
}
|
|
154
|
+
`,jt=n.span`
|
|
155
|
+
width: 16px;
|
|
156
|
+
height: 16px;
|
|
157
|
+
border-radius: 50%;
|
|
158
|
+
border: 2px solid ${o.colors.gray4};
|
|
159
|
+
border-top-color: ${o.colors.accent};
|
|
160
|
+
animation: ${st} 0.7s linear infinite;
|
|
161
|
+
|
|
162
|
+
@media (prefers-reduced-motion: reduce) {
|
|
163
|
+
animation: none;
|
|
164
|
+
}
|
|
165
|
+
`,I=n.p`
|
|
166
|
+
color: ${o.colors.gray4};
|
|
167
|
+
font-size: 14px;
|
|
168
|
+
margin: 0;
|
|
169
|
+
`,wt=n.p`
|
|
170
|
+
color: ${o.colors.muted};
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
margin: 0 0 12px;
|
|
173
|
+
`,S=n.div`
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: 8px;
|
|
178
|
+
text-align: center;
|
|
179
|
+
padding: 90px 20px;
|
|
180
|
+
min-height: 50vh;
|
|
181
|
+
color: ${o.colors.softWhite};
|
|
182
|
+
`,L=n.p`
|
|
183
|
+
font-size: 22px;
|
|
184
|
+
font-weight: 700;
|
|
185
|
+
margin: 6px 0 0;
|
|
186
|
+
`,M=n.p`
|
|
187
|
+
margin: 0;
|
|
188
|
+
color: ${o.colors.gray4};
|
|
189
|
+
`,D=n(G)`
|
|
190
|
+
margin-top: 12px;
|
|
191
|
+
`;function j({descriptor:t,owner:s,signer:r,name:a,description:c,image:l,icon:p}){const v=H(),[h,y]=F.useState(!1),{data:u,isLoading:m,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>et(t,s),staleTime:3e4});async function g(){if(h||m)return;const b=!u;y(!0);try{await it({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?e("authorizations.toastActivated",{name:a}):e("authorizations.toastDeactivated",{name:a}))}catch(C){Z(C,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(nt(C,e("authorizations.errorGeneric")))}finally{y(!1)}}const q=m?e("authorizations.checking"):u?e("authorizations.active"):e("authorizations.inactive");return i.jsxs(ht,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[i.jsx(mt,{children:l?i.jsx("img",{src:l,alt:""}):p}),i.jsxs(gt,{children:[i.jsx(xt,{title:a,children:a}),i.jsx(ft,{children:c})]}),i.jsxs(bt,{children:[i.jsx(yt,{"data-active":!!u,children:q}),h?i.jsx(jt,{"aria-label":e("authorizations.working")}):i.jsx(zt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?e("authorizations.deactivateAria",{name:a}):e("authorizations.activateAria",{name:a}),disabled:m,onClick:()=>void g()})]})]})}const f=500,W=10,vt=f*W;async function R(t,s){const r=await E(t,{category:s,first:f}),a=Math.min(Math.ceil(r.total/f),W),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(l,p)=>E(t,{category:s,first:f,skip:(p+1)*f})));return{assets:[...r.assets,...c.flatMap(l=>l.assets)],truncated:r.total>vt}}function kt(t){return w({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([R(t,"wearable"),R(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function $t(t){return w({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:J})}function Ct(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=X(t);return a===t?e("authorizations.collectionFallback"):a}function At(t,s){return w({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await ot(t,s),a=new Map;for(const c of r){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return[...a.values()]}})}function _t(){P({title:e("authorizations.title"),noindex:!0});const{session:t,signIn:s}=B(),r=Q.chainId,a=O(t==null?void 0:t.providerType),{data:c,isLoading:l}=kt(a?t==null?void 0:t.address:void 0),{data:p,isLoading:v}=$t(!!a&&!!(t!=null&&t.address)),{data:h,isLoading:y}=At(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return i.jsxs(S,{children:[i.jsx(z,{name:"info",size:40,color:o.colors.muted2}),i.jsx(L,{children:e("authorizations.signInTitle")}),i.jsx(M,{children:e("authorizations.signInBody")}),i.jsx(D,{variant:"white",onClick:()=>s(),children:e("storeSettings.signIn")})]});if(!a)return i.jsxs(S,{children:[i.jsx(z,{name:"check",size:40,color:o.colors.ok}),i.jsx(L,{children:e("authorizations.managedTitle")}),i.jsx(M,{children:e("authorizations.managedBody")}),i.jsx(D,{as:_,to:"/items",variant:"white",children:e("authorizations.managedCta")})]});const u=U(r),m=V(r);return i.jsxs(ct,{children:[i.jsxs(lt,{children:[i.jsx(dt,{children:e("authorizations.title")}),i.jsx(ut,{children:e("authorizations.intro")})]}),i.jsxs(k,{children:[i.jsx($,{children:e("authorizations.buyingTitle")}),i.jsxs(x,{children:[i.jsx(j,{descriptor:u,owner:t.address,signer:t.signer,name:e("authorizations.creditsName"),description:e("authorizations.creditsDesc"),icon:i.jsx(K,{className:"ccy-mark"})}),i.jsx(j,{descriptor:m,owner:t.address,signer:t.signer,name:e("authorizations.manaName"),description:e("authorizations.manaDesc"),icon:i.jsx(pt,{src:at,alt:"","aria-hidden":!0})})]})]}),i.jsxs(k,{children:[i.jsx($,{children:e("authorizations.sellingTitle")}),c!=null&&c.truncated?i.jsx(wt,{"data-testid":"authorizations-selling-truncated",children:e("authorizations.sellingTruncated",{count:c.scanned})}):null,l||v?i.jsx(x,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((d,g)=>i.jsx(T,{"aria-hidden":!0},g))}):c&&c.collections.length>0?i.jsx(x,{children:c.collections.map(d=>i.jsx(j,{descriptor:Y(d.contractAddress,r),owner:t.address,signer:t.signer,name:Ct(d.contractAddress,p),description:e("authorizations.sellingDesc"),image:d.image,icon:i.jsx(z,{name:"pen",size:18})},d.contractAddress))}):i.jsx(I,{children:e("authorizations.sellingEmpty")})]}),i.jsxs(k,{children:[i.jsx($,{children:e("authorizations.mintingTitle")}),y?i.jsx(x,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((d,g)=>i.jsx(T,{"aria-hidden":!0},g))}):h&&h.length>0?i.jsx(x,{children:h.map(d=>i.jsx(j,{descriptor:tt(d.contractAddress,r),owner:t.address,signer:t.signer,name:d.name||e("authorizations.collectionFallback"),description:e("authorizations.mintingDesc"),icon:i.jsx(z,{name:"pen",size:18})},d.contractAddress))}):i.jsx(I,{children:e("authorizations.mintingEmpty")})]})]})}export{_t as Authorizations};
|