@dcl/shop 0.8.1-31011914733.commit-0303b0f → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_assets/{Activity-DGqf6vtH.js → Activity-ChFWLt2k.js} +9 -9
- package/_assets/{AnimatedBackground-DYvwYlNX.js → AnimatedBackground-CgqvFCZP.js} +1 -1
- package/_assets/{Assets-BIhyhEpJ.js → Assets-Bhh3K7eo.js} +21 -21
- package/_assets/{Assets.styles-BEwmRTV4.js → Assets.styles-DwvAA7Fx.js} +15 -15
- package/_assets/{Authorizations-CgtzIHfa.js → Authorizations-BYvz0lRD.js} +1 -1
- package/_assets/{Cart-k3bkiglX.js → Cart-DAXjBdJW.js} +2 -2
- package/_assets/{CircularProgress-B7QTjxqg.js → CircularProgress-DWAcbKVy.js} +1 -1
- package/_assets/{Collection-CIBOTqpS.js → Collection-DhzN8qEX.js} +2 -2
- package/_assets/{CollectionCarousel-aBELR_tf.js → CollectionCarousel-DoFMOPnJ.js} +21 -21
- package/_assets/{Creator-DXbJoM5n.js → Creator-ffFVB812.js} +6 -6
- package/_assets/{ErrorNotice-8bHn1hfP.js → ErrorNotice-CD3QThL8.js} +1 -1
- package/_assets/{ExchangeController-BV3dQlup.js → ExchangeController-8WzQHcYP.js} +1 -1
- package/_assets/{Faq-DNu30-Jv.js → Faq-Bxgy5XAq.js} +1 -1
- package/_assets/{GetCredits-9vsaKO2k.js → GetCredits-BikyjTuD.js} +11 -11
- package/_assets/{Grow-OxzXVVhg.js → Grow-B_PKoaeX.js} +1 -1
- package/_assets/{HelpersUtil-NjrztWi6.js → HelpersUtil-TiNOVD81.js} +1 -1
- package/_assets/{ItemDetail-tYnpUH4x.js → ItemDetail-Cz_1bxfd.js} +1 -1
- package/_assets/LazyEmoteControls-YqpacGjJ.js +2 -0
- package/_assets/{LoadMore-CwQ5CTJq.js → LoadMore-D3-F6XWb.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-Bc06axQv.js → ManaPricingBanner.styles-BBwxQBv1.js} +3 -3
- package/_assets/{MyAssets-B0Mjtokt.js → MyAssets-sQM2Pl5T.js} +1 -1
- package/_assets/{MyFavorites-Cw_mmcDj.js → MyFavorites-CTeRjr79.js} +1 -1
- package/_assets/{NotFound-An1qy2HJ.js → NotFound-BPPWf_VH.js} +1 -1
- package/_assets/{NotificationsBell-DQLaaXFc.js → NotificationsBell-B3llSjmx.js} +1 -1
- package/_assets/{OutfitDetail-BsbdpKHB.js → OutfitDetail-CIf5JfoP.js} +1 -1
- package/_assets/{OutfitPreview-zqj27b-1.js → OutfitPreview-Dsyy7b3g.js} +1 -1
- package/_assets/{OutfitStudio-BF3ZInz5.js → OutfitStudio-DP0te92W.js} +1 -1
- package/_assets/{StoreSettings-Dsw9PcCY.js → StoreSettings-CC7mEGPS.js} +1 -1
- package/_assets/{Success-DzSr1ZKs.js → Success-DlelWtIG.js} +1 -1
- package/_assets/{SwapController-c0ZMV7-y.js → SwapController-B5KKcuAl.js} +1 -1
- package/_assets/{Tooltip-AFYoHds5.js → Tooltip-BE30N5-7.js} +1 -1
- package/_assets/{TradeService-K7nSBrHI.js → TradeService-BoB_gVPn.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-BvhBpuKR.js → W3MFrameProviderSingleton-DIMdAQZt.js} +3 -3
- package/_assets/{WebCryptoP256-uR3swvrR.js → WebCryptoP256-LtmPnNr1.js} +1 -1
- package/_assets/{authorizations-D4wI085M.js → authorizations-D50ifPOO.js} +1 -1
- package/_assets/{basic-BPisXakk.js → basic-DW06A0op.js} +1 -1
- package/_assets/{biconomy-CvHs_GN7.js → biconomy-B6nO3Zkg.js} +1 -1
- package/_assets/{builder-CkJrDc5k.js → builder-Bo-EM0RQ.js} +1 -1
- package/_assets/{buy-BeDHfPC-.js → buy-P_iceS6H.js} +1 -1
- package/_assets/{buy-gasless-DINFD15F.js → buy-gasless-CJuE25uZ.js} +1 -1
- package/_assets/{categories-kKk2jGpz.js → categories-Dp28MR0O.js} +1 -1
- package/_assets/{ccip-Umb7T-xD.js → ccip-Bc6U1KND.js} +1 -1
- package/_assets/{ccip-74NajMIb.js → ccip-BwaWeiLm.js} +1 -1
- package/_assets/{collectionPage.styles-tZrmrhPT.js → collectionPage.styles-CmHnGfxY.js} +2 -2
- package/_assets/{controller-DGdZ6Mn-.js → controller-CWm3gowZ.js} +2 -2
- package/_assets/{core-CNlDVTsP.js → core-BWhmsygd.js} +4 -4
- package/_assets/{createSvgIcon-Ce14xVZm.js → createSvgIcon-b1stkBYH.js} +1 -1
- package/_assets/{custom-Dv8Lo1kL.js → custom-DRBIOTbP.js} +1 -1
- package/_assets/{data-capture-5ClKTSe8.js → data-capture-CT-lqFOV.js} +1 -1
- package/_assets/{email-CiIvohkt.js → email-CR6obY4d.js} +1 -1
- package/_assets/{embedded-wallet-Cv54Jked.js → embedded-wallet-DVRatI7f.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-BDjD0BzD.js → emotion-styled.browser.esm-B6pcOIbM.js} +1 -1
- package/_assets/{engine-BSj9q-aH.js → engine-CE3TrAwc.js} +1 -1
- package/_assets/{errors-COaDYYX2.js → errors-CUmo51Xe.js} +1 -1
- package/_assets/{estimate-l1-fee-6I-Z51za.js → estimate-l1-fee-BHbXIM2m.js} +1 -1
- package/_assets/{execute-B6hfBxSa.js → execute-CrlI-ZoX.js} +2 -2
- package/_assets/{features-BJpZyJij.js → features-DHFgAFMQ.js} +1 -1
- package/_assets/{fetchTokenMetadata-ARrwD89L.js → fetchTokenMetadata-B1AQEAsF.js} +2 -2
- package/_assets/{field.styles-BjYlzCrg.js → field.styles-CHc5xfgz.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-9HmWzdfL.js → get-ecosystem-wallet-info-DfHFnl32.js} +1 -1
- package/_assets/{getBalance-32RCC6W6.js → getBalance-BnbAmEdr.js} +1 -1
- package/_assets/{getNFT-Bdzdl0tm.js → getNFT-0CpAOl-E.js} +1 -1
- package/_assets/{getNFT-Bvh35NBt.js → getNFT-D2PaeZsW.js} +1 -1
- package/_assets/{grid.styles-C5FdGoZt.js → grid.styles-CrucuXuJ.js} +1 -1
- package/_assets/{hashTypedData-C1J-Yu5X.js → hashTypedData-B8k-gScw.js} +1 -1
- package/_assets/{hashTypedData-Cd2jo0fu.js → hashTypedData-BCvEU0S5.js} +1 -1
- package/_assets/{in-app-B12bHXEw.js → in-app-CcIH4HM6.js} +1 -1
- package/_assets/{in-app-wallet-calls-C6NnLiF5.js → in-app-wallet-calls-CnOcHJ01.js} +1 -1
- package/_assets/{index-CVHBMZma.js → index--VgcQeCR.js} +63 -63
- package/_assets/{index-D1hB2lFW.js → index-3M42GOPZ.js} +1 -1
- package/_assets/{index-s_bfhZ6F.js → index-6vhSQR2z.js} +1 -1
- package/_assets/{index-D2_T8MLY.js → index-8B-Wb5Gs.js} +1 -1
- package/_assets/{index-BFBo1N5P.js → index-B7wTH-DB.js} +1 -1
- package/_assets/{index--Ye27Vx_.js → index-B8PhacFo.js} +1 -1
- package/_assets/{index-Fivnn7mf.js → index-B8vVRjFK.js} +1 -1
- package/_assets/{index-CpJZJukx.js → index-BCuH5vDs.js} +2 -2
- package/_assets/{index-BngbLeyt.js → index-BFOZ3aLa.js} +2 -2
- package/_assets/{index-CxfuGaDv.js → index-BI4j8w-k.js} +1 -1
- package/_assets/{index-BHNHvbUP.js → index-BWcbRKsN.js} +1 -1
- package/_assets/{index-dixEk7jd.js → index-BWnP3oRT.js} +1 -1
- package/_assets/{index-CMpfBNnD.js → index-BX10o-2b.js} +1 -1
- package/_assets/{index-Do3GSrTN.js → index-B_tbfHPr.js} +3 -3
- package/_assets/{index-DpSVgnb5.js → index-Bge5LXXj.js} +1 -1
- package/_assets/{index-DM4ZKIDP.js → index-C05a-Cz3.js} +1 -1
- package/_assets/{index-DIELA4su.js → index-C3ey0KMz.js} +1 -1
- package/_assets/{index-0XvBS5zv.js → index-C49WimIh.js} +1 -1
- package/_assets/{index-BQE4xPAY.js → index-C8Wp6BQ6.js} +1 -1
- package/_assets/{index-B0AXM_VY.js → index-CBH551Gx.js} +1 -1
- package/_assets/{index-C3FbBJ0B.js → index-CONd_BVx.js} +1 -1
- package/_assets/{index-CsM5PUdn.js → index-CTub7-Ub.js} +2 -2
- package/_assets/{index-CN92MtoS.js → index-CUwEs_3M.js} +1 -1
- package/_assets/{index-B984MHyM.js → index-CXSMynFH.js} +1 -1
- package/_assets/index-CaGVgZr4.js +3390 -0
- package/_assets/{index-CWqCDmmG.js → index-CcANwB8y.js} +1 -1
- package/_assets/{index-B01yzeQ8.js → index-Cxo1Qt__.js} +1 -1
- package/_assets/{index-Dyrrv-jJ.js → index-D-zwysSB.js} +1 -1
- package/_assets/{index-DX4C1Af8.js → index-D1rVnf7n.js} +1 -1
- package/_assets/{index-KoOOqA3z.js → index-D4jb9JvP.js} +1 -1
- package/_assets/{index-CK9g-jse.js → index-DACSd1Ih.js} +1 -1
- package/_assets/{index-C4hDSOGl.js → index-DU5Y-mU3.js} +1 -1
- package/_assets/{index-DygpMJS7.js → index-DWGvhYgt.js} +3 -3
- package/_assets/{index-Bl9A4aCY.js → index-DWpkVsfu.js} +1 -1
- package/_assets/{index-Bbo2skmn.js → index-DXpDmLZT.js} +1 -1
- package/_assets/{index-CC-AzsUH.js → index-DXvaEQEd.js} +1 -1
- package/_assets/{index-Cx6dOZTN.js → index-DcoiEdkj.js} +3 -3
- package/_assets/{index-CJlYjYNZ.js → index-DhS5vBsK.js} +1 -1
- package/_assets/{index-BRh_MAtG.js → index-Dr_tDOG_.js} +1 -1
- package/_assets/{index-xl5neHLR.js → index-GIH-0f2z.js} +1 -1
- package/_assets/{index-Y8dCmAYo.js → index-N9ZM65Qw.js} +1 -1
- package/_assets/{index-CEmq93Ky.js → index-RLkC6q3l.js} +1 -1
- package/_assets/{index-BrlzlDYY.js → index-V3x8m1-s.js} +1 -1
- package/_assets/{index-BXgz5CqZ.js → index-YNiHVcjG.js} +1 -1
- package/_assets/{index-aXb_PvXT.js → index-YSlX9Bkm.js} +1 -1
- package/_assets/{index-f74S-M7s.js → index-dIsHoFgJ.js} +1 -1
- package/_assets/{index-D4N_qlW4.js → index-oJ0V0naw.js} +1 -1
- package/_assets/{index-B9aOPYnq.js → index-qJ1SpPme.js} +2 -2
- package/_assets/{index-srBAWpfF.js → index-qLM4Jgop.js} +1 -1
- package/_assets/{index-9Q-G51o6.js → index-wOCAFvTe.js} +1 -1
- package/_assets/{index-CO7GzJir.js → index-xwkEolrS.js} +1 -1
- package/_assets/{index-BhKN5EIF.js → index-yM8zB6af.js} +1 -1
- package/_assets/{index.es-B_wTHOdN.js → index.es-B28PvdoO.js} +1 -1
- package/_assets/{index.es-sJaJm3UW.js → index.es-DQCMyrCJ.js} +1 -1
- package/_assets/{index.es-BzqwSDFf.js → index.es-S9JJTmrE.js} +4 -4
- package/_assets/{localBatchGatewayRequest-Ca5n5qCv.js → localBatchGatewayRequest-Pb3BP9CQ.js} +1 -1
- package/_assets/{networks-iVGk0JJM.js → networks-BmSU0xcf.js} +1 -1
- package/_assets/{onramp-C4kGKm8k.js → onramp-DfnXxsOV.js} +1 -1
- package/_assets/{openzeppelin-Cq0U5Yj-.js → openzeppelin-oZ__TBbl.js} +1 -1
- package/_assets/{parseNft-DxFyV4vL.js → parseNft-BPR5bkzt.js} +2 -2
- package/_assets/{parseSignature-CGjLk_wy.js → parseSignature-C2f1qwgR.js} +3 -3
- package/_assets/{parseSignature-COtTJutO.js → parseSignature-Eoge2CGI.js} +1 -1
- package/_assets/{passkeys-DaKZKc5X.js → passkeys-BF0IbJwr.js} +1 -1
- package/_assets/{pay-with-exchange-C9uv-ieY.js → pay-with-exchange-DOwnXfO2.js} +1 -1
- package/_assets/{qr-overlay-CQQySlBn.js → qr-overlay-nSSLmPST.js} +1 -1
- package/_assets/{receive-BBhp5SjJ.js → receive-sixNVM8i.js} +1 -1
- package/_assets/{resolveImplementation-BhoUOPQQ.js → resolveImplementation-DkMJJDI-.js} +1 -1
- package/_assets/{rpc-DTh3KIva.js → rpc-BrCTz5Qm.js} +1 -1
- package/_assets/{secp256k1-DbjmQrSL.js → secp256k1-BdUoxiXs.js} +1 -1
- package/_assets/{secp256k1-D3oKlH7Y.js → secp256k1-C16_XTC1.js} +1 -1
- package/_assets/{secp256k1-DDJ2_Bsx.js → secp256k1-CR7oQoP9.js} +1 -1
- package/_assets/{send-B38BS5L-.js → send-CtHTa-Zr.js} +1 -1
- package/_assets/{send-batch-transaction-CKNSzTrU.js → send-batch-transaction-Cs3B1O70.js} +1 -1
- package/_assets/{send-eip712-transaction-CQkqFshV.js → send-eip712-transaction-DIkXnwtQ.js} +2 -2
- package/_assets/{send-gasless-transaction-0E-pHV_D.js → send-gasless-transaction-Cse8VKrG.js} +2 -2
- package/_assets/{send-transaction-DUvtCNaC.js → send-transaction-BvF4P9KI.js} +2 -2
- package/_assets/{sendMetaTransaction-BUU2XPaW.js → sendMetaTransaction-DkiH6liR.js} +1 -1
- package/_assets/{sendRawTransaction-DSl2j5Tv.js → sendRawTransaction-C-jKwFfH.js} +3 -3
- package/_assets/{serializeTransaction-GOaI2-vB.js → serializeTransaction-BuSbsw2P.js} +1 -1
- package/_assets/{session-proposal-B31UMpQa.js → session-proposal-kYbIH83K.js} +1 -1
- package/_assets/{session-request-CXbKG_CB.js → session-request-BI_hmJVZ.js} +2 -2
- package/_assets/{signing-Bzt09eMi.js → signing-C3dpYGa5.js} +3 -3
- package/_assets/{socials-CNNRzT2N.js → socials-BOiLEX6l.js} +1 -1
- package/_assets/{styled-f0hxr1BX.js → styled-DINE9MQ0.js} +1 -1
- package/_assets/{swaps-Dm6opnzM.js → swaps-CECeDvBd.js} +1 -1
- package/_assets/{thirdweb-BsryIfzq.js → thirdweb-D2iyq9jE.js} +3 -3
- package/_assets/{to-serializable-transaction-CspH4HXW.js → to-serializable-transaction-DwQmyJRI.js} +2 -2
- package/_assets/{transactionReceipt-LkdfOGrW.js → transactionReceipt-B0Yyuulc.js} +1 -1
- package/_assets/{transactions-CHt9afcL.js → transactions-CVa0yXiE.js} +1 -1
- package/_assets/{useCreditPacks-DW-oKsgc.js → useCreditPacks-j0KzNBHB.js} +1 -1
- package/_assets/{useImportable-4rP-UQqs.js → useImportable-DZHzdDAY.js} +1 -1
- package/_assets/{useInfiniteGrid-Cjl-Omaq.js → useInfiniteGrid-DguU-cIJ.js} +1 -1
- package/_assets/{useTheme-Dh6eiJOj.js → useTheme-Cs4_ikeG.js} +1 -1
- package/_assets/{verifyHash--XBApVq4.js → verifyHash-BQDUL2qR.js} +1 -1
- package/_assets/{w3m-modal-dINBeQa2.js → w3m-modal-75q9wyXn.js} +1 -1
- package/_assets/{w3m-modal-cc9RBS7W.js → w3m-modal-CdAFLwAH.js} +1 -1
- package/_assets/{wait-for-tx-receipt-CW92WmOA.js → wait-for-tx-receipt-BcAkEAve.js} +1 -1
- package/_assets/{wallets-DgijLpqw.js → wallets-CA-bESDl.js} +5 -5
- package/_assets/{web-connector-C3GRXbj_.js → web-connector-CkPmzzva.js} +3 -3
- package/_assets/{writeContract-B4uhDk93.js → writeContract-CK1yAi7p.js} +1 -1
- package/_assets/{zoraTestnet-CXJJv6qS.js → zoraTestnet-aF35aj2M.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/LazyEmoteControls-BW-FF_VV.js +0 -2
- package/_assets/index-V7aSbkHg.js +0 -3390
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index
|
|
2
|
-
import{n as we,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index--VgcQeCR.js","_assets/react-OEOSdkUk.js","_assets/index-CaGVgZr4.js","_assets/sentry-B60WY-np.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/ethers-lk3HAbPB.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-DZHzdDAY.js","_assets/buy-P_iceS6H.js","_assets/authorizations-D50ifPOO.js","_assets/sendMetaTransaction-DkiH6liR.js","_assets/ManaPricingBanner.styles-BBwxQBv1.js","_assets/Faq-Bxgy5XAq.js","_assets/field.styles-CHc5xfgz.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as we,bL as je,o as q,v as I,bM as ke,s as l,t as s,w as Ie,B as Ae,x as $e,b as c,ak as Pe,I as A,bN as Y,bO as ee,bP as Le,_ as Ne,z as N,bQ as Ee,A as Te,bg as z,aD as Ce,bR as Se,E as Fe,bS as De,bT as O}from"./index-CaGVgZr4.js";import{r as g,u as Me,j as t,L as se,b as He}from"./react-OEOSdkUk.js";import{u as qe}from"./useImportable-DZHzdDAY.js";import{L as ze}from"./LoadMore-D3-F6XWb.js";import{u as P}from"./useInfiniteGrid-DguU-cIJ.js";import{m as ne}from"./mana-matic-C4e1sNO3.js";import"./sentry-B60WY-np.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";import"./buy-P_iceS6H.js";import"./authorizations-D50ifPOO.js";import"./sendMetaTransaction-DkiH6liR.js";const Oe=15e3;function Re(e,a){return e.txHash&&a.txHash?e.txHash===a.txHash:e.txHash||a.txHash?!1:e.status===a.status&&Math.abs(e.createdAt-a.createdAt)<=Oe}function We(e){const a=[...e].sort((i,r)=>r.createdAt-i.createdAt),n=[];for(const i of a){const r=n[n.length-1];r&&Re(r[r.length-1],i)?r.push(i):n.push([i])}return n.map(i=>{var r;return{id:((r=i.find(d=>d.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(d=>d.createdAt)),status:i.some(d=>d.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((d,u)=>d+u.credits,0),lines:i}})}function _e(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Be(e){const a=[],n=new Map;for(const i of e){const r=_e(i);if(!r){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const d=n.get(r);if(d){d.quantity+=1,d.credits+=i.credits;continue}const u={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(r,u),a.push(u)}return a}function Ge(e,a){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:a?we(e.manaWei,a):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ue(e){const n=We(e.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=e.sales.map(o=>{const x=Ge(o,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(e.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),d=new Set(e.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),u=(e.manaPurchases??[]).filter(o=>!d.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...n,...i,...r,...u].sort((o,x)=>x.createdAt-o.createdAt||(o.id<x.id?-1:1))}function Ke(e,a){return a==="all"?e:a==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const re=e=>e.trim().toLowerCase();function Qe(e){const a=new Map;for(const n of e??[]){const i=re(n.txHash??"");if(!i)continue;const r=a.get(i);r?r.push(n):a.set(i,[n])}return a}function Ve(e,a,n=Date.now()){const i=a.txHash?e.get(re(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?Xe(i[0].netCents):null,d=i.filter(o=>!o.available&&o.availableAt>n);if(d.length===0)return{kind:"credited",credits:r};const u=d.reduce((o,x)=>Math.max(o,x.availableAt),0);return{kind:"pending",credits:r,availableAt:u}}function Xe(e){return je(e)}function Ze(){const e=q(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:a,isLoading:n}=I({queryKey:["listing-count",e],queryFn:()=>ke({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:a==null?void 0:a.total,isLoading:n}}const Je="https://cdn.decentraland.org/@dcl/shop/0.9.0/_assets/credits-product-vs4Q6u6l.svg",R=Ie`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,Ye=l.section`
|
|
@@ -240,15 +240,15 @@ import{n as we,bK as je,o as q,v as I,bL as ke,s as l,t as s,w as Ie,B as Ae,x a
|
|
|
240
240
|
&[data-kind='income'] {
|
|
241
241
|
color: ${s.colors.okStrong};
|
|
242
242
|
}
|
|
243
|
-
`,
|
|
243
|
+
`,de=l.img`
|
|
244
244
|
width: 16px;
|
|
245
245
|
height: 16px;
|
|
246
246
|
vertical-align: -0.15em;
|
|
247
|
-
`,
|
|
247
|
+
`,dt=l.span`
|
|
248
248
|
display: inline-flex;
|
|
249
249
|
align-items: center;
|
|
250
250
|
cursor: pointer;
|
|
251
|
-
`,
|
|
251
|
+
`,ct=l.span`
|
|
252
252
|
position: fixed;
|
|
253
253
|
transform: translateX(-50%);
|
|
254
254
|
padding: 6px 8px;
|
|
@@ -320,12 +320,12 @@ import{n as we,bK as je,o as q,v as I,bL as ke,s as l,t as s,w as Ie,B as Ae,x a
|
|
|
320
320
|
display: flex;
|
|
321
321
|
flex-direction: column;
|
|
322
322
|
gap: 2px;
|
|
323
|
-
`,
|
|
323
|
+
`,U=l.span`
|
|
324
324
|
font-weight: 700;
|
|
325
325
|
white-space: nowrap;
|
|
326
326
|
overflow: hidden;
|
|
327
327
|
text-overflow: ellipsis;
|
|
328
|
-
`,
|
|
328
|
+
`,K=l.span`
|
|
329
329
|
display: inline-block;
|
|
330
330
|
width: 140px;
|
|
331
331
|
max-width: 60%;
|
|
@@ -364,7 +364,7 @@ import{n as we,bK as je,o as q,v as I,bL as ke,s as l,t as s,w as Ie,B as Ae,x a
|
|
|
364
364
|
@media (prefers-reduced-motion: reduce) {
|
|
365
365
|
animation: none;
|
|
366
366
|
}
|
|
367
|
-
`,
|
|
367
|
+
`,ce=l.div`
|
|
368
368
|
display: flex;
|
|
369
369
|
flex-direction: column;
|
|
370
370
|
align-items: center;
|
|
@@ -378,4 +378,4 @@ import{n as we,bK as je,o as q,v as I,bL as ke,s as l,t as s,w as Ie,B as Ae,x a
|
|
|
378
378
|
margin: 6px 0 0;
|
|
379
379
|
`,ht=l(Ae)`
|
|
380
380
|
margin-top: 12px;
|
|
381
|
-
`,V=H.withComponent(se),ut=g.lazy(()=>Ne(()=>import("./index
|
|
381
|
+
`,V=H.withComponent(se),ut=g.lazy(()=>Ne(()=>import("./index--VgcQeCR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),L=24,pt=["all","purchases","sales"],ae="migrate";function k(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function he(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ue(e){const a=Number(e)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function pe({children:e}){const a=g.useRef(null),[n,i]=g.useState(null),r=()=>{var u;const d=(u=a.current)==null?void 0:u.getBoundingClientRect();d&&i({top:d.bottom+8,left:d.left+d.width/2})};return t.jsxs(dt,{ref:a,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[e,n?He.createPortal(t.jsx(ct,{style:{top:n.top,left:n.left},role:"tooltip",children:c("activity.polygonMana")}),document.body):null]})}function xt({item:e}){const a=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||a,{data:i,isLoading:r}=I({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?De(e.tradeId):O(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),d=n&&r,u=(i==null?void 0:i.name)??c("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",x=z({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[d?t.jsx(B,{}):t.jsx(_,{children:o?t.jsx("img",{src:o,alt:u}):t.jsx(A,{name:"cart",size:20})}),t.jsxs(G,{children:[d?t.jsx(K,{}):t.jsx(U,{title:u,children:u}),e.quantity>1?t.jsx(Q,{children:c("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(lt,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return x?t.jsx(V,{to:x,"data-link":"true",children:f}):t.jsx(H,{children:f})}function mt({order:e}){const a=Be(e.lines),n=a.reduce((i,r)=>i+r.quantity,0);return t.jsxs(E,{"data-testid":"purchase-order",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:n})]})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":e.status,children:e.status==="PENDING"?c("activity.processing"):c("activity.completed")}),t.jsxs(j,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),t.jsx(W,{children:a.map(i=>t.jsx(xt,{item:i},i.key))})]})}function gt({sale:e}){const{data:a,isLoading:n}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??c("activity.itemFallback"),r=(a==null?void 0:a.thumbnail)??"",d=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,u=t.jsxs(t.Fragment,{children:[n?t.jsx(B,{}):t.jsx(_,{children:r?t.jsx("img",{src:r,alt:i}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[n?t.jsx(K,{}):t.jsx(U,{title:i,children:i}),t.jsx(Q,{children:c("activity.boughtFrom",{account:he(e.seller)})})]})]});return t.jsxs(E,{"data-testid":"activity-mana-purchase",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:c("activity.paidWithMana")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":"SETTLED",children:c("activity.completed")}),t.jsxs(j,{children:[ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(de,{src:ne,alt:"MANA"})})]})]})]}),t.jsx(W,{children:d?t.jsx(V,{to:d,"data-link":"true",children:u}):t.jsx(H,{children:u})})]})}function ft({sale:e,payout:a}){const{data:n,isLoading:i}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),r=(n==null?void 0:n.name)??c("activity.itemFallback"),d=(n==null?void 0:n.thumbnail)??"",u=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,o=t.jsxs(t.Fragment,{children:[i?t.jsx(B,{}):t.jsx(_,{children:d?t.jsx("img",{src:d,alt:r}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[i?t.jsx(K,{}):t.jsx(U,{title:r,children:r}),t.jsxs(Q,{children:[c("activity.soldTo",{account:he(e.counterparty)}),a.kind==="pending"?` · ${c("activity.payoutPendingOn",{date:k(a.availableAt)})}`:""]})]})]});return t.jsxs(E,{"data-testid":"activity-sale",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:c("activity.saleLabel")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?c("activity.payoutPending"):c("activity.sold")}),a.kind==="direct"?t.jsxs(j,{"data-kind":"income",children:["+",ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(de,{src:ne,alt:"MANA"})})]}):a.credits!==null?t.jsxs(j,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Ce(a.credits)]}):t.jsx(j,{"data-kind":"income",children:c("activity.payoutCredited")})]})]}),t.jsx(W,{children:u?t.jsx(V,{to:u,"data-link":"true",children:o}):t.jsx(H,{children:o})})]})}function bt({order:e}){const a=`$${(e.usdCents/100).toFixed(2)}`,n=Ee(e.status),i=n==="SETTLED"?c("activity.completed"):n==="FAILED"?c("activity.failed"):n==="UNFINISHED"?c("activity.unfinished"):c("activity.processing"),r=q(p=>p.session),d=Te(),[u,o]=g.useState(!1),x=e.status==="initiated"&&!!r;async function f(){if(!(!r||u)){o(!0);try{const p=await Se(e.id,r.identity);if(p){window.location.href=p;return}Fe.info(c("activity.resumeExpired")),d.invalidateQueries({queryKey:["credit-orders"]})}finally{o(!1)}}}return t.jsx(E,{"data-testid":"credit-order",children:t.jsxs(T,{children:[t.jsx(rt,{children:t.jsx("img",{src:Je,alt:"","aria-hidden":!0})}),t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[c("activity.creditPurchaseLabel")," · ",c("activity.creditPaid",{usd:a})]})]}),t.jsxs(D,{children:[x?t.jsx(ot,{type:"button",onClick:()=>void f(),disabled:u,"data-testid":"resume-order",children:u?c("activity.resuming"):c("activity.resume")}):null,t.jsx(M,{"data-status":n,children:i}),t.jsxs(j,{"data-kind":"income",children:["+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function yt({filter:e}){const a={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")}}[e];return t.jsxs(ce,{children:[t.jsx(A,{name:a.icon,size:40,color:s.colors.muted2}),t.jsx(le,{children:a.title}),t.jsx("p",{className:"muted",children:a.body}),e!=="sales"?t.jsx(ht,{as:se,to:"/items",variant:"purple",children:c("notFound.cta")}):null]})}function St(){const{session:e}=q(),[a,n]=g.useState("all"),[i,r]=Me(),d=i.get("view")===ae;$e({title:d?c("seo.import.title"):c("nav.activity"),noindex:!0});const{count:u}=qe(),{count:o}=Ze(),f=u!==void 0&&o!==void 0&&(u>0||o>0||d),p=!!e&&!d&&a!=="sales",m=!!e&&!d&&a!=="purchases",b=P(["purchases",e==null?void 0:e.address],h=>Le(e.address,e.identity,{first:L,skip:h}),{enabled:p}),y=P(["sales",e==null?void 0:e.address],h=>Y(e.address,{role:"seller",first:L,skip:h}),{enabled:m}),v=P(["credit-orders",e==null?void 0:e.address],h=>ee(e.address,e.identity,{first:L,skip:h}),{enabled:p}),w=P(["mana-purchases",e==null?void 0:e.address],h=>Y(e.address,{role:"buyer",first:L,skip:h}),{enabled:p}),{data:X}=I({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ee(e.address,e.identity,{first:200}).then(h=>h.payouts),enabled:m,staleTime:6e4}),xe=g.useMemo(()=>Qe(X),[X]),{data:me}=Pe(m);if(!e)return t.jsxs(ce,{children:[t.jsx(A,{name:"clock",size:40,color:s.colors.muted2}),t.jsx(le,{children:c("activity.signInTitle")}),t.jsx("p",{className:"muted",children:c("activity.signInBody")})]});const Z=Ke(Ue({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?w.items:[],rate:me}),a),ge=p&&(b.isLoading||v.isLoading||w.isLoading)||m&&y.isLoading,J=p&&(b.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||m&&y.isFetchingNextPage,fe=p&&(b.hasNextPage||v.hasNextPage||w.hasNextPage)||m&&y.hasNextPage;function be(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&w.hasNextPage&&w.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function ye(h){if(n(h),!d)return;const $=new URLSearchParams(i);$.delete("view"),r($,{replace:!0})}function ve(){const h=new URLSearchParams(i);h.set("view",ae),r(h,{replace:!0})}return t.jsxs(Ye,{children:[t.jsx(et,{children:t.jsx(tt,{children:c("nav.activity")})}),t.jsxs(it,{role:"tablist","aria-label":c("nav.activity"),children:[pt.map(h=>t.jsx(oe,{type:"button",role:"tab","aria-selected":!d&&a===h,"data-active":!d&&a===h,"data-testid":`activity-filter-${h}`,onClick:()=>ye(h),children:c(`activity.filter.${h}`)},h)),f?t.jsxs(at,{type:"button",role:"tab","aria-selected":d,"data-active":d,"data-testid":"activity-filter-migrate","aria-label":u?c("activity.migrate.chipAria",{count:u}):void 0,onClick:ve,children:[c("activity.migrate.chip"),u?t.jsx(st,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),d?t.jsx(g.Suspense,{fallback:t.jsx(nt,{"aria-busy":"true"}),children:t.jsx(ut,{})}):ge?t.jsx(te,{children:Array.from({length:5}).map((h,$)=>t.jsx(ie,{},$))}):Z.length===0?t.jsx(yt,{filter:a}):t.jsxs(t.Fragment,{children:[t.jsxs(te,{children:[Z.map(h=>h.kind==="purchase"?t.jsx(mt,{order:h.order},h.id):h.kind==="credit"?t.jsx(bt,{order:h.order},h.id):h.kind==="mana-purchase"?t.jsx(gt,{sale:h.sale},h.id):t.jsx(ft,{sale:h.sale,payout:Ve(xe,h.sale)},h.id)),J?t.jsx(ie,{}):null]}),t.jsx(ze,{hasNextPage:fe,isFetching:J,onLoadMore:be})]})]})}export{St as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-OEOSdkUk.js";import{s as u}from"./index-
|
|
1
|
+
import{r as l,j as v}from"./react-OEOSdkUk.js";import{s as u}from"./index-CaGVgZr4.js";import"./sentry-B60WY-np.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.9.0/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.9.0/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Ae,r as w,j as e,u as
|
|
1
|
+
import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}from"./useUrlFilters-DABDXRpV.js";import{c as W,r as Qe,bl as Xe,bm as Ye,ay as et,a as tt,s,t,o as Me,bb as nt,A as st,aD as fe,b as n,y as rt,I as _,z as A,bY as Y,ba as it,V as Q,bq as ot,bp as at,x as Ne,ak as Pe,n as We,q as lt,ai as ct,am as ke,an as D,aF as dt,bJ as pt}from"./index-CaGVgZr4.js";import{g as ht,h as xt,i as ft,j as mt,k as ut,C as gt,l as bt,o as yt,m as wt,n as jt,M as vt,u as $t,E as Ct,v as kt,p as St,q as Et,r as _t,s as Tt,t as Rt}from"./Assets.styles-DwvAA7Fx.js";import{S as Se,R as zt,F as It,e as At}from"./categories-Dp28MR0O.js";import{L as Mt}from"./LoadMore-D3-F6XWb.js";import{u as Nt}from"./useInfiniteGrid-DguU-cIJ.js";import{E as Pt}from"./ErrorNotice-CD3QThL8.js";import{d as Wt}from"./dcl-schemas-CmtP3U6y.js";import{s as Bt,G as Ft,w as Lt,S as Ut}from"./buy-gasless-CJuE25uZ.js";import{s as Ht,k as Ot}from"./buy-P_iceS6H.js";import{f as Dt}from"./errors-CUmo51Xe.js";import{J as Gt,C as qt,B as me}from"./ethers-lk3HAbPB.js";import{n as Vt}from"./Tooltip-BE30N5-7.js";import{G as Zt}from"./grid.styles-CrucuXuJ.js";import"./sentry-B60WY-np.js";import"./intl-CBcMB1D2.js";import"./authorizations-D50ifPOO.js";import"./sendMetaTransaction-DkiH6liR.js";function G(r){const o=r.source??"item",l=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${o}:${l}`}const B="100000000000000000000",Be=2,X=15,Jt=/^[a-zA-Z0-9]+$/;function Ee(r){const o=r.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<Be?{ok:!1,reason:"too-short"}:o.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Kt(r){return r.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Qt=["function available(string _subdomain) view returns (bool)"],_e={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Xt(){return W.chainId===Number(Wt.ChainId.MATIC_MAINNET)?_e.mainnet:_e.sepolia}async function Yt(r,o={}){var d;const{rpc:l,address:x}=Xt(),h=new Gt(l),c=new qt(x,Qt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${r}") on ${l}`);const p=await c.available(r);if((d=o.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${p}`),p?"available":"taken"}const en="https://app.across.to/api";class ue extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function tn(r){return et(B,r)}async function nn(r,o,l={}){var d;const x=l.chainId??W.chainId,h=l.provider??"across",c=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${x}&provider=${h}`,p=await tt(c,{method:"GET",identity:r,metadata:{}});if(!p.ok){let a;try{a=(d=await p.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new ue:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function sn(r,o){const l=me.from(r.availableAmount),h=me.from(B).sub(l);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Ot(r.id)}],creditsSignatures:[r.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:B}}async function rn(r,o={}){const l=en,x=o.intervalMs??1e4,h=o.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const d=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${r}`);if(d.ok){const a=await d.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};c={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(d=>setTimeout(d,x))}return c}async function on(r){const{name:o,identity:l,signer:x}=r,h=r.chainId??W.chainId,c=r.provider??"across",p=(r.beneficiary??await x.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:o,buyer:p,chainId:h,provider:c});try{const f=await Qe(h),g=tn(f);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:f});const u=await nn(l,o,{chainId:h,provider:c});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 Xe(l,g);if(d=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),me.from(v.maxCreditedValue).lt(B))throw new Error("Credit under-sized for the name price");const j=sn(v.credit,u);let m;try{m=await Bt({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Ft))throw b;m=await Ht(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Lt(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),c==="across"){const b=await rn(m,r.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:m};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:m,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:m}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:p,originConfirmed:a}),f instanceof Ut)return{status:"pending",originTxHash:f.txHash};if(d&&!a&&await Ye(l,[d]).catch(()=>{}),f instanceof ue)throw f;const g=new Error(Dt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const an=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -69,11 +69,11 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
69
69
|
height: 16px;
|
|
70
70
|
color: ${t.colors.brandViolet};
|
|
71
71
|
}
|
|
72
|
-
`,
|
|
72
|
+
`,re=s.hr`
|
|
73
73
|
border: 0;
|
|
74
74
|
border-top: 1px solid ${t.colors.line};
|
|
75
75
|
margin: 16px 0;
|
|
76
|
-
`,
|
|
76
|
+
`,ie=s.div`
|
|
77
77
|
display: flex;
|
|
78
78
|
align-items: center;
|
|
79
79
|
gap: 16px;
|
|
@@ -379,7 +379,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function Sn({name:
|
|
382
|
+
`;function Sn({name:r,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:c}=nt(x),p=st(),d=Ae(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===r.toLowerCase(),$=a==="completing",C=o!=null?fe(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:fe(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=T}},[$,l]);async function F(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await on({name:r,identity:x.identity,signer:x.signer});Q("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){Q(at(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const L=a!=="success"&&a!=="pending",z=rt(x==null?void 0:x.providerType);return e.jsx(an,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(ln,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:$,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(re,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ie,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(Te,{onClick:()=>f("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(cn,{children:[e.jsx(dn,{children:n("names.confirmTitle")}),e.jsx(pn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${En(r)}</b>`})}}),e.jsxs(hn,{children:[e.jsx(xn,{"aria-hidden":!0,children:"@"}),e.jsx(fn,{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(mn,{children:".dcl.eth"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(Te,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(un,{children:[e.jsx(gn,{src:it,alt:"",width:56,height:56}),e.jsx(bn,{children:z?n("names.confirming"):n("names.completing")}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(jn,{children:"1/1"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(re,{}),e.jsxs(pe,{"data-tone":"info",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsx(Re,{children:e.jsx(ze,{onClick:()=>{l(),d("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(re,{}),e.jsxs(vn,{children:[e.jsx($n,{"aria-hidden":!0,children:e.jsx(_,{name:"check"})}),e.jsxs(Cn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsxs(Re,{children:[e.jsx(ze,{onClick:()=>{l(),d("/my-items")},children:n("names.myItems")}),e.jsx(kn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function En(r){return r.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.9.0/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.9.0/_assets/world-B-9aPlxu.webp",Rn="https://cdn.decentraland.org/@dcl/shop/0.9.0/_assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.9.0/_assets/governance-DnazlIjy.webp",In=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,An=s.nav`
|
|
@@ -422,7 +422,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
422
422
|
gap: 32px;
|
|
423
423
|
padding-bottom: 32px;
|
|
424
424
|
}
|
|
425
|
-
`,
|
|
425
|
+
`,Wn=s.div`
|
|
426
426
|
position: relative;
|
|
427
427
|
border-radius: ${t.radius.banner};
|
|
428
428
|
overflow: hidden;
|
|
@@ -438,12 +438,12 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
438
438
|
padding: 40px 20px;
|
|
439
439
|
gap: 28px;
|
|
440
440
|
}
|
|
441
|
-
`,
|
|
441
|
+
`,Bn=s.div`
|
|
442
442
|
display: flex;
|
|
443
443
|
flex-direction: column;
|
|
444
444
|
align-items: center;
|
|
445
445
|
gap: 12px;
|
|
446
|
-
`,
|
|
446
|
+
`,Fn=s.h1`
|
|
447
447
|
margin: 0;
|
|
448
448
|
font-family: ${t.font.sans};
|
|
449
449
|
font-weight: 600;
|
|
@@ -479,11 +479,11 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
479
479
|
gap: 8px;
|
|
480
480
|
padding: 8px 8px 8px 16px;
|
|
481
481
|
background: ${t.colors.softWhite};
|
|
482
|
-
border: 1.5px solid ${({invalid:
|
|
482
|
+
border: 1.5px solid ${({invalid:r})=>r?t.colors.dclRed:t.colors.line};
|
|
483
483
|
border-radius: 20px;
|
|
484
484
|
|
|
485
485
|
&:focus-within {
|
|
486
|
-
border-color: ${({invalid:
|
|
486
|
+
border-color: ${({invalid:r})=>r?t.colors.dclRed:t.colors.magenta};
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
${t.media.maxWidth("mobile")} {
|
|
@@ -563,7 +563,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
563
563
|
${t.media.maxWidth("mobile")} {
|
|
564
564
|
font-size: 20px;
|
|
565
565
|
}
|
|
566
|
-
`,
|
|
566
|
+
`,Jn=s.input`
|
|
567
567
|
flex: 0 1 auto;
|
|
568
568
|
min-width: 0;
|
|
569
569
|
max-width: 100%;
|
|
@@ -585,7 +585,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
585
585
|
${t.media.maxWidth("mobile")} {
|
|
586
586
|
font-size: 16px;
|
|
587
587
|
}
|
|
588
|
-
`,
|
|
588
|
+
`,Kn=s.span`
|
|
589
589
|
flex: none;
|
|
590
590
|
margin-left: 2px;
|
|
591
591
|
font-family: ${t.font.sans};
|
|
@@ -597,13 +597,13 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
597
597
|
${t.media.maxWidth("mobile")} {
|
|
598
598
|
font-size: 16px;
|
|
599
599
|
}
|
|
600
|
-
`,
|
|
600
|
+
`,Qn=s.span`
|
|
601
601
|
flex: none;
|
|
602
602
|
font-family: ${t.font.sans};
|
|
603
603
|
font-size: 13px;
|
|
604
604
|
color: ${t.colors.muted2};
|
|
605
605
|
white-space: nowrap;
|
|
606
|
-
`,
|
|
606
|
+
`,Fe=s.button`
|
|
607
607
|
flex: none;
|
|
608
608
|
display: inline-flex;
|
|
609
609
|
align-items: center;
|
|
@@ -639,7 +639,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
639
639
|
${t.media.maxWidth("mobile")} {
|
|
640
640
|
display: none;
|
|
641
641
|
}
|
|
642
|
-
`,
|
|
642
|
+
`,Xn=s(Fe)`
|
|
643
643
|
display: none;
|
|
644
644
|
|
|
645
645
|
${t.media.maxWidth("mobile")} {
|
|
@@ -669,8 +669,8 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
669
669
|
font-weight: 500;
|
|
670
670
|
text-align: left;
|
|
671
671
|
|
|
672
|
-
background: ${({tone:
|
|
673
|
-
color: ${({tone:
|
|
672
|
+
background: ${({tone:r})=>r==="error"?"rgba(255, 45, 85, 0.12)":r==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
|
|
673
|
+
color: ${({tone:r})=>r==="error"?t.colors.dclRed:r==="ok"?"#0f7a4f":"#ecebed"};
|
|
674
674
|
|
|
675
675
|
.ico {
|
|
676
676
|
width: 16px;
|
|
@@ -717,7 +717,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
717
717
|
${t.media.maxWidth("mobile")} {
|
|
718
718
|
font-size: 16px;
|
|
719
719
|
}
|
|
720
|
-
`,
|
|
720
|
+
`,rs=s.div`
|
|
721
721
|
display: grid;
|
|
722
722
|
grid-template-columns: repeat(4, 1fr);
|
|
723
723
|
gap: 24px;
|
|
@@ -749,7 +749,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
749
749
|
flex-direction: column;
|
|
750
750
|
gap: 6px;
|
|
751
751
|
padding: 12px 16px;
|
|
752
|
-
`,
|
|
752
|
+
`,J=s.h3`
|
|
753
753
|
margin: 0;
|
|
754
754
|
font-family: ${t.font.sans};
|
|
755
755
|
font-weight: 700;
|
|
@@ -757,14 +757,14 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
757
757
|
line-height: 1.57;
|
|
758
758
|
text-transform: uppercase;
|
|
759
759
|
color: ${t.colors.text};
|
|
760
|
-
`,
|
|
760
|
+
`,K=s.p`
|
|
761
761
|
margin: 0;
|
|
762
762
|
font-family: ${t.font.sans};
|
|
763
763
|
font-weight: 400;
|
|
764
764
|
font-size: 14px;
|
|
765
765
|
line-height: 1.57;
|
|
766
766
|
color: ${t.colors.text};
|
|
767
|
-
`,
|
|
767
|
+
`,is=s.span`
|
|
768
768
|
font-weight: 600;
|
|
769
769
|
color: ${t.colors.accent};
|
|
770
770
|
`,Ie=s.a`
|
|
@@ -798,4 +798,4 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
798
798
|
clip: rect(0, 0, 0, 0);
|
|
799
799
|
white-space: nowrap;
|
|
800
800
|
border: 0;
|
|
801
|
-
`,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(i){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ds({onBack:i}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?Fe(W,x):null,[c,p]=w.useState(""),[d,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)},[c]),w.useEffect(()=>{if(!Ee(c).ok){a(c.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await Yt(c,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[c]);const m=Ee(c),b=m.ok&&(d==="available"||d==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(Yn,{children:[e.jsx(A,{}),fe(h)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Nn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Fn,{children:[e.jsxs(Wn,{children:[e.jsx(Bn,{children:n("names.heroTitle")}),e.jsx(Ln,{children:n("names.heroSubtitle")})]}),e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsxs(On,{invalid:d==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Zn,{"aria-hidden":!0,children:"@"}),e.jsx(Kn,{value:c,onChange:k=>p(Xt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:Q,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Dn,{ref:u,"aria-hidden":!0,children:c||n("names.inputPlaceholder")}),e.jsx(Xn,{children:n("names.suffix")})]}),c.length>0?e.jsxs(Jn,{"aria-hidden":!0,children:[c.length,"/",Q]}):null,e.jsx(Be,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),d==="taken"?e.jsxs(Gn,{role:"status","data-testid":"names-taken",children:[e.jsx(_,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(qn,{href:cs(c),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Qn,{onClick:$,disabled:!b,children:C}),d==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):d==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):d==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:We})}):null,e.jsx(os,{role:"status","aria-live":"polite",children:d==="available"?n("names.available",{name:c}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:n("names.whyTitle")}),e.jsx(ss,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(q,{children:[e.jsx(V,{src:_n,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(X,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Tn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(X,{children:[n("names.why2")," ",e.jsx(rs,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:as,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(X,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(X,{children:n("names.why4")}),e.jsxs(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Sn,{name:c,priceCredits:h,onClose:()=>g(!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",xe=48,hs=["all","on_sale","not_for_sale"];function Is(){const[i]=Ke(),o=Ae(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.get("q")??"").trim();Ne({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:l?"all":"wearable",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[l]),[c,p]=Xe(h),{subCategory:d,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=c,j=c.category,m=hs.includes(c.status)?c.status:"on_sale",[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const r=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",r);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=I}},[b]);const C=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=lt(),S=d?At[d]:void 0,N=(Se.find(r=>r.key===v)??Se[0]).server,B={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:E,search:l||void 0,sortBy:N,isSmart:u||void 0,onSale:!0,listingType:M?void 0:"primary"},L={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:N,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:z,total:y,isLoading:T,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Nt(C?["shop-items",B]:["catalog-items",L],r=>C?dt({...B,first:xe,skip:r}):pt({...L,first:xe,skip:r}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=r=>ye&&r.manaWei?Fe(r.manaWei,ye):null,qe=C&&De&&z.some(r=>r.source==="legacy"),we=T||R||qe,Ve=T?15:Math.min(Math.max(z.length,1),xe),je=w.useRef(null);w.useEffect(()=>{T||R||!l||je.current===l||(je.current=l,J("Shop Searched",{query:l,result_count:U}))},[l,T,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(T||R)return;const r=JSON.stringify({category:j,subCategory:d,rarities:a,min:k,max:E,sort:v,status:m,smart:u});if(H.current==="__init__"||H.current===r){H.current=r;return}H.current=r,J("Shop Applied Filter",{filters:{category:j,sub_category:d,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:m,smart:u,sort:v},result_count:U})},[j,d,a,k,E,v,m,u,T,R,U]);function ve(r){p({category:r,subCategory:null})}function $e(r){p({status:r})}function Ce(r){p({rarities:a.includes(r)?a.filter(I=>I!==r):[...a,r]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const r of zt)a.includes(r)&&P.push({key:`rarity-${r}`,label:ct(r),onRemove:()=>Ce(r)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&P.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ht,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(xt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(ft,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(mt,{children:[e.jsx(ut,{children:n("assets.filters")}),e.jsx(gt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(bt,{children:e.jsx(yt,{category:j,subCategory:d,onCategory:ve,onSub:r=>p({subCategory:r}),priceMin:f,priceMax:g,onPriceMin:r=>p({priceMin:r}),onPriceMax:r=>p({priceMax:r}),rarities:a,onToggleRarity:Ce,status:m,onStatus:$e,smart:u,onSmart:r=>p({smart:r})})}),e.jsx(wt,{children:e.jsx(jt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(vt,{children:j==="names"?e.jsx(ds,{onBack:()=>ve("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(It,{sort:v,onSort:r=>p({sort:r}),total:y,loading:T||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.some(r=>r.source==="legacy")?e.jsx($t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Pt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&z.length===0&&!ge?e.jsxs(Ct,{"data-testid":"browse-empty",children:[e.jsx(kt,{src:ps,alt:""}),e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.empty.title")}),e.jsx(_t,{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(Tt,{children:e.jsx(Rt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Zt,{"data-testid":"grid",children:we?e.jsx(ke,{count:Ve}):e.jsxs(e.Fragment,{children:[z.map(r=>{if(!C)return e.jsx(D,{item:r,mode:"view"},G(r));const I=r;if(I.source!=="legacy")return e.jsx(D,{item:r},G(r));const O=Ge(I);return O==null?e.jsx(D,{item:r,mode:"view"},G(r)):e.jsx(D,{item:{...I,priceCredits:O}},G(r))}),be?e.jsx(ke,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Is as Assets};
|
|
801
|
+
`,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(r){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(r)}`}function ds({onBack:r}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?We(B,x):null,[c,p]=w.useState(""),[d,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)},[c]),w.useEffect(()=>{if(!Ee(c).ok){a(c.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await Yt(c,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[c]);const m=Ee(c),b=m.ok&&(d==="available"||d==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(Yn,{children:[e.jsx(A,{}),fe(h)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Nn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsx(Fn,{children:n("names.heroTitle")}),e.jsx(Ln,{children:n("names.heroSubtitle")})]}),e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsxs(On,{invalid:d==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Zn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:c,onChange:k=>p(Kt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Dn,{ref:u,"aria-hidden":!0,children:c||n("names.inputPlaceholder")}),e.jsx(Kn,{children:n("names.suffix")})]}),c.length>0?e.jsxs(Qn,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Fe,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),d==="taken"?e.jsxs(Gn,{role:"status","data-testid":"names-taken",children:[e.jsx(_,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(qn,{href:cs(c),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Xn,{onClick:$,disabled:!b,children:C}),d==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):d==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):d==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:Be})}):null,e.jsx(os,{role:"status","aria-live":"polite",children:d==="available"?n("names.available",{name:c}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:n("names.whyTitle")}),e.jsx(ss,{children:n("names.whyIntro")})]}),e.jsxs(rs,{children:[e.jsxs(q,{children:[e.jsx(V,{src:_n,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why1Title")}),e.jsx(K,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Tn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why2Title")}),e.jsxs(K,{children:[n("names.why2")," ",e.jsx(is,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:as,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why3Title")}),e.jsx(K,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why4Title")}),e.jsx(K,{children:n("names.why4")}),e.jsxs(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Sn,{name:c,priceCredits:h,onClose:()=>g(!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",xe=48,hs=["all","on_sale","not_for_sale"];function Is(){const[r]=Je(),o=Ae(),l=(r.get("q")??"").trim().toLowerCase(),x=(r.get("q")??"").trim();Ne({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:l?"all":"wearable",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[l]),[c,p]=Ke(h),{subCategory:d,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=c,j=c.category,m=hs.includes(c.status)?c.status:"on_sale",[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const i=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",i);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=I}},[b]);const C=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=lt(),S=d?At[d]:void 0,N=(Se.find(i=>i.key===v)??Se[0]).server,F={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:E,search:l||void 0,sortBy:N,isSmart:u||void 0,onSale:!0,listingType:M?void 0:"primary"},L={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:N,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:z,total:y,isLoading:T,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Nt(C?["shop-items",F]:["catalog-items",L],i=>C?dt({...F,first:xe,skip:i}):pt({...L,first:xe,skip:i}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=i=>ye&&i.manaWei?We(i.manaWei,ye):null,qe=C&&De&&z.some(i=>i.source==="legacy"),we=T||R||qe,Ve=T?15:Math.min(Math.max(z.length,1),xe),je=w.useRef(null);w.useEffect(()=>{T||R||!l||je.current===l||(je.current=l,Q("Shop Searched",{query:l,result_count:U}))},[l,T,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(T||R)return;const i=JSON.stringify({category:j,subCategory:d,rarities:a,min:k,max:E,sort:v,status:m,smart:u});if(H.current==="__init__"||H.current===i){H.current=i;return}H.current=i,Q("Shop Applied Filter",{filters:{category:j,sub_category:d,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:m,smart:u,sort:v},result_count:U})},[j,d,a,k,E,v,m,u,T,R,U]);function ve(i){p({category:i,subCategory:null})}function $e(i){p({status:i})}function Ce(i){p({rarities:a.includes(i)?a.filter(I=>I!==i):[...a,i]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const i of zt)a.includes(i)&&P.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>Ce(i)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&P.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ht,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(xt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(ft,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(mt,{children:[e.jsx(ut,{children:n("assets.filters")}),e.jsx(gt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(bt,{children:e.jsx(yt,{category:j,subCategory:d,onCategory:ve,onSub:i=>p({subCategory:i}),priceMin:f,priceMax:g,onPriceMin:i=>p({priceMin:i}),onPriceMax:i=>p({priceMax:i}),rarities:a,onToggleRarity:Ce,status:m,onStatus:$e,smart:u,onSmart:i=>p({smart:i})})}),e.jsx(wt,{children:e.jsx(jt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(vt,{children:j==="names"?e.jsx(ds,{onBack:()=>ve("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(It,{sort:v,onSort:i=>p({sort:i}),total:y,loading:T||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.some(i=>i.source==="legacy")?e.jsx($t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Pt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&z.length===0&&!ge?e.jsxs(Ct,{"data-testid":"browse-empty",children:[e.jsx(kt,{src:ps,alt:""}),e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.empty.title")}),e.jsx(_t,{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(Tt,{children:e.jsx(Rt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Zt,{"data-testid":"grid",children:we?e.jsx(ke,{count:Ve}):e.jsxs(e.Fragment,{children:[z.map(i=>{if(!C)return e.jsx(D,{item:i,mode:"view"},G(i));const I=i;if(I.source!=="legacy")return e.jsx(D,{item:i},G(i));const O=Ge(I);return O==null?e.jsx(D,{item:i,mode:"view"},G(i)):e.jsx(D,{item:{...I,priceCredits:O}},G(i))}),be?e.jsx(ke,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Is as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as
|
|
1
|
+
import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as ae,a as re,b as le}from"./categories-Dp28MR0O.js";import{n as c,T as ce}from"./Tooltip-BE30N5-7.js";import{t as e,s as o,I as g,b as s,ai as W,C as v}from"./index-CaGVgZr4.js";const de=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -89,18 +89,18 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
89
89
|
justify-content: center;
|
|
90
90
|
gap: 6px;
|
|
91
91
|
padding: 8px 4px 0;
|
|
92
|
-
`,
|
|
92
|
+
`,N=o.label`
|
|
93
93
|
display: flex;
|
|
94
94
|
flex: 1;
|
|
95
95
|
min-width: 0;
|
|
96
96
|
flex-direction: column;
|
|
97
97
|
gap: 4px;
|
|
98
|
-
`,
|
|
98
|
+
`,P=o.span`
|
|
99
99
|
font-family: ${e.font.sans};
|
|
100
100
|
font-weight: 400;
|
|
101
101
|
font-size: 12px;
|
|
102
102
|
color: ${e.colors.muted};
|
|
103
|
-
`,
|
|
103
|
+
`,E=o.span`
|
|
104
104
|
display: flex;
|
|
105
105
|
align-items: center;
|
|
106
106
|
gap: 4px;
|
|
@@ -117,7 +117,7 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
117
117
|
width: 16px;
|
|
118
118
|
height: 16px;
|
|
119
119
|
color: ${e.colors.text};
|
|
120
|
-
`,
|
|
120
|
+
`,I=o.input`
|
|
121
121
|
width: 100%;
|
|
122
122
|
min-width: 0;
|
|
123
123
|
border: 0;
|
|
@@ -162,7 +162,7 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
162
162
|
right: ${({maxPct:i})=>`${100-i}%`};
|
|
163
163
|
background: ${e.colors.rarity};
|
|
164
164
|
border-radius: 2px;
|
|
165
|
-
`,
|
|
165
|
+
`,A=o.input`
|
|
166
166
|
position: absolute;
|
|
167
167
|
top: 0;
|
|
168
168
|
left: 0;
|
|
@@ -201,14 +201,14 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
201
201
|
align-items: center;
|
|
202
202
|
justify-content: space-between;
|
|
203
203
|
padding: 12px 4px 0;
|
|
204
|
-
`,
|
|
204
|
+
`,H=o.span`
|
|
205
205
|
display: inline-flex;
|
|
206
206
|
align-items: center;
|
|
207
207
|
gap: 2px;
|
|
208
208
|
font-family: ${e.font.sans};
|
|
209
209
|
font-size: 13px;
|
|
210
210
|
color: ${e.colors.text};
|
|
211
|
-
`,
|
|
211
|
+
`,L=o(g)`
|
|
212
212
|
width: 16px;
|
|
213
213
|
height: 16px;
|
|
214
214
|
color: ${e.colors.text};
|
|
@@ -245,13 +245,13 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
245
245
|
border-radius: 4px;
|
|
246
246
|
background: ${({color:i})=>i};
|
|
247
247
|
flex: none;
|
|
248
|
-
`,
|
|
248
|
+
`,Ce=o(g)`
|
|
249
249
|
position: absolute;
|
|
250
250
|
inset: 0;
|
|
251
251
|
width: 16px;
|
|
252
252
|
height: 16px;
|
|
253
253
|
color: ${e.colors.white};
|
|
254
|
-
`,
|
|
254
|
+
`,ze=o("span",c("selected"))`
|
|
255
255
|
font-family: ${e.font.sans};
|
|
256
256
|
font-weight: ${({selected:i})=>i?600:400};
|
|
257
257
|
font-size: 12px;
|
|
@@ -296,11 +296,11 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
296
296
|
${e.media.maxWidth("lg")} {
|
|
297
297
|
height: 52px;
|
|
298
298
|
}
|
|
299
|
-
`,
|
|
299
|
+
`,Ee=o.div`
|
|
300
300
|
display: flex;
|
|
301
301
|
align-items: center;
|
|
302
302
|
gap: 6px;
|
|
303
|
-
`,
|
|
303
|
+
`,Fe=o(g)`
|
|
304
304
|
width: 14px;
|
|
305
305
|
height: 14px;
|
|
306
306
|
color: ${e.colors.text};
|
|
@@ -350,7 +350,7 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
350
350
|
width: 40px;
|
|
351
351
|
height: 22px;
|
|
352
352
|
}
|
|
353
|
-
`,
|
|
353
|
+
`,Le=o("span",c("on"))`
|
|
354
354
|
position: absolute;
|
|
355
355
|
top: 50%;
|
|
356
356
|
left: ${({on:i})=>i?"calc(100% - 12px)":"0px"};
|
|
@@ -367,7 +367,7 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
367
367
|
height: 18px;
|
|
368
368
|
left: ${({on:i})=>i?"calc(100% - 18px)":"2px"};
|
|
369
369
|
}
|
|
370
|
-
`,d=1e5;function
|
|
370
|
+
`,d=1e5;function Be(i){var l;for(const h of re){const p=(l=h.subs)==null?void 0:l.find(a=>a.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:h,summary:p,desktopStatic:a,headerTestId:x,headerAria:f,children:u}){const m=t.jsx(le,{up:l,size:24,color:e.colors.text});return t.jsxs(pe,{children:[t.jsxs(xe,{type:"button",desktopStatic:a,onClick:h,"aria-expanded":l,"aria-label":f,"data-testid":x,children:[t.jsx(he,{children:i}),a?t.jsx(me,{children:m}):m]}),!l&&p?t.jsx(ge,{desktopHidden:a,children:p}):null,t.jsx(fe,{open:l,desktopStatic:a,children:t.jsx(ue,{children:u})})]})}function Ye({category:i,subCategory:l,onCategory:h,onSub:p,priceMin:a,priceMax:x,onPriceMin:f,onPriceMax:u,rarities:m,onToggleRarity:B,status:S,onStatus:D,smart:b,onSmart:O,hideNames:_=!1,collections:z=!1,onCollections:M}){const[Y,K]=$.useState(!0),[U,q]=$.useState(!0),[G,V]=$.useState(!1),[X,J]=$.useState(!0),R=a&&!Number.isNaN(Number(a))?Number(a):void 0,C=x&&!Number.isNaN(Number(x))?Number(x):void 0,w=R!=null?Math.min(R,d):0,y=C!=null?Math.min(C,d):d,Q=w/d*100,Z=y/d*100;function ee(n){const r=Math.min(n,y);f(r<=0?"":String(r))}function te(n){const r=Math.max(n,w);u(r>=d?"":String(r))}const oe=z?s("categories.collections"):l?Be(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",ie=R!=null||C!=null?`${a||"0"}-${x||"∞"}`:"",ne=T.filter(n=>m.includes(n)).map(W).join(", "),se=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(de,{children:[t.jsx(j,{title:s("assets.category"),open:Y,onToggle:()=>K(n=>!n),summary:oe,desktopStatic:!0,children:t.jsx(ae,{category:i,subCategory:l,onCategory:h,onSub:p,hideNames:_,collections:z,onCollections:M})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:U,onToggle:()=>q(n=>!n),summary:ie,desktopStatic:!0,children:[t.jsxs(be,{children:[t.jsxs(N,{children:[t.jsx(P,{children:s("assets.min")}),t.jsxs(E,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:a,onChange:n=>f(n.target.value)})]})]}),t.jsx(we,{children:s("assets.priceTo")}),t.jsxs(N,{children:[t.jsx(P,{children:s("assets.max")}),t.jsxs(E,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:x,onChange:n=>u(n.target.value)})]})]})]}),t.jsxs(ye,{children:[t.jsx($e,{"aria-hidden":!0}),t.jsx(ve,{minPct:Q,maxPct:Z,"aria-hidden":!0}),t.jsx(A,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>ee(Number(n.target.value))}),t.jsx(A,{type:"range",min:0,max:d,value:y,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>te(Number(n.target.value))})]}),t.jsxs(ke,{children:[t.jsxs(H,{children:[t.jsx(L,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(H,{children:[t.jsx(L,{name:v.iconName,"aria-hidden":!0}),y.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:G,onToggle:()=>V(n=>!n),summary:ne,headerTestId:"sidebar-section-toggle",children:t.jsx(je,{"data-testid":"rarity-filter",children:T.map(n=>{const r=m.includes(n);return t.jsxs(Se,{type:"button",selected:r,"aria-pressed":r,onClick:()=>B(n),"data-testid":"rarity-filter-check",children:[t.jsx(Re,{color:e.rarities[n],children:r?t.jsx(Ce,{name:"check","aria-hidden":!0}):null}),t.jsx(ze,{selected:r,children:W(n)})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:X,onToggle:()=>J(n=>!n),summary:se,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,r])=>t.jsxs(Te,{children:[t.jsx(We,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>D(n)}),t.jsx(Ne,{children:r})]},n))}),t.jsx(k,{}),t.jsxs(Pe,{children:[t.jsxs(Ee,{children:[t.jsx(Fe,{name:"smart","aria-hidden":!0}),t.jsx(Ie,{children:s("filter.smart")}),t.jsx(ce,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Ae,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0,"data-testid":"smart-hint"})})]}),t.jsx(He,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>O(!b),children:t.jsx(Le,{on:b})})]})]})}const Ke=o.div`
|
|
371
371
|
position: relative;
|
|
372
372
|
display: flex;
|
|
373
373
|
gap: 32px;
|
|
@@ -632,4 +632,4 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
632
632
|
outline: 2px solid ${e.colors.accent};
|
|
633
633
|
outline-offset: 2px;
|
|
634
634
|
}
|
|
635
|
-
`;export{Qe as C,k as D,ot as E,j as F,Ue as M,je as R,Te as S,Se as a,Re as b,
|
|
635
|
+
`;export{Qe as C,k as D,ot as E,j as F,Ue as M,je as R,Te as S,Se as a,Re as b,Ce as c,ze as d,We as e,Ne as f,Ke as g,Ve as h,qe as i,Xe as j,Je as k,Ge as l,Ze as m,et as n,Ye as o,nt as p,st as q,at as r,rt as s,lt as t,tt as u,it as v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i,L as _,r as F}from"./react-OEOSdkUk.js";import{s as n,B as G,t as a,w as D,x as P,b as e,o as W,y as O,I as z,z as B,v as w,A as K,c as H,D as Q,E as A,F as X,G as Z,H as E}from"./index-
|
|
1
|
+
import{j as i,L as _,r as F}from"./react-OEOSdkUk.js";import{s as n,B as G,t as a,w as D,x as P,b as e,o as W,y as O,I as z,z as B,v as w,A as K,c as H,D as Q,E as A,F as X,G as Z,H as E}from"./index-CaGVgZr4.js";import{c as J,d as U,b as V,e as Y,s as tt,a as it}from"./authorizations-D50ifPOO.js";import{f as et}from"./builder-Bo-EM0RQ.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-CUmo51Xe.js";import"./sentry-B60WY-np.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DkiH6liR.js";const nt=D`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,st=D`
|
|
4
4
|
to { background-position: -200% 0; }
|