@dcl/shop 1.12.2-34818778994.commit-b4640d0 → 1.12.2-34900076381.commit-51dacfd
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-BVBmjc8l.js → Activity-CIKijfDM.js} +6 -6
- package/_assets/{AnimatedBackground-BNduzr26.js → AnimatedBackground-_gyrQB1T.js} +6 -6
- package/_assets/{Assets-D7ats-bz.js → Assets-B2K_cmnI.js} +7 -7
- package/_assets/{Authorizations-C2MLXIEE.js → Authorizations-DyIeYcce.js} +2 -2
- package/_assets/{Cart-CkiQhh0O.js → Cart-CSFWNK61.js} +2 -2
- package/_assets/{Collection-DHFMLovX.js → Collection-gzCGf9qh.js} +2 -2
- package/_assets/{CollectionCarousel-DyoDUK2C.js → CollectionCarousel-ToGb_noU.js} +3 -3
- package/_assets/{Confetti-C5u7OYps.js → Confetti-JSzqH7Ip.js} +4 -4
- package/_assets/{ConstantsUtil-iHTHgWEv.js → ConstantsUtil-C3PRQd9g.js} +2 -2
- package/_assets/{ContentClient-DbDGQxLQ.js → ContentClient-D-1ep2Qj.js} +2 -2
- package/_assets/{Creator-BJ01OCBl.js → Creator-BgEWqJgt.js} +2 -2
- package/_assets/{DeploymentBuilder-ZkusBL6j.js → DeploymentBuilder-G4ce_7cE.js} +2 -2
- package/_assets/{EmotePlaybackBar-D2SJud_N.js → EmotePlaybackBar-B0Uc3owu.js} +3 -3
- package/_assets/{ErrorNotice-CHgNxcyQ.js → ErrorNotice-OMXWYAuR.js} +2 -2
- package/_assets/{ExchangeController-Tsk6_96f.js → ExchangeController-C0OB0Bge.js} +2 -2
- package/_assets/{Faq-Dg9a5kp0.js → Faq-7MARz-uk.js} +2 -2
- package/_assets/{GetCredits-CfNX-3ZU.js → GetCredits-CnYVlRca.js} +2 -2
- package/_assets/{Grow-Dbnh9Gu7.js → Grow-BJLgfaZo.js} +2 -2
- package/_assets/{HelpersUtil-DG_BcIGf.js → HelpersUtil-CiInuuPk.js} +2 -2
- package/_assets/{ItemDetail-CMK1yntB.js → ItemDetail-ZKj7005Y.js} +340 -340
- package/_assets/{LoadMore--6nlZKAg.js → LoadMore-CQ_nr3wh.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-oXQP1xCb.js → ManaPricingBanner.styles-BDWA26Gj.js} +2 -2
- package/_assets/{MyAssets-BeoYV8mP.js → MyAssets-B2GcuGNt.js} +2 -2
- package/_assets/{MyFavorites--2AmmQa8.js → MyFavorites-umbZrcVq.js} +2 -2
- package/_assets/{NetworkUtil-Bi-msfi1.js → NetworkUtil-DPSm2Q0Z.js} +2 -2
- package/_assets/{NotFound-JiIUYy2F.js → NotFound-B2FUduBB.js} +2 -2
- package/_assets/{NotificationsBell-DKloM1Vj.js → NotificationsBell-5Ws2kcHe.js} +2 -2
- package/_assets/{OutfitDetail-B5Gd2vOb.js → OutfitDetail-EWtg7dA4.js} +2 -2
- package/_assets/{OutfitPreview-CE5g0z5E.js → OutfitPreview-CLtZP5CQ.js} +2 -2
- package/_assets/{OutfitStudio-HAqsu3Nl.js → OutfitStudio-G9ckeRxq.js} +2 -2
- package/_assets/{StoreSettings-_NsLSEXW.js → StoreSettings-BVqjvWCT.js} +2 -2
- package/_assets/{Success-z7LRn2Nn.js → Success-CavcWROi.js} +2 -2
- package/_assets/{SwapController-BHpMPECW.js → SwapController-Cw8SYF_2.js} +2 -2
- package/_assets/{TradeService-DbtQqVd7.js → TradeService-JthCmLDQ.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-Bb4Nd_Ds.js → W3MFrameProviderSingleton-BfD_7D0f.js} +4 -4
- package/_assets/{WebCryptoP256-CRvg-Nyh.js → WebCryptoP256-30TJFW1u.js} +2 -2
- package/_assets/{authorizations-Ct87bLpZ.js → authorizations-DkuKVqPp.js} +2 -2
- package/_assets/{basic-CHY4qy6i.js → basic-Bs6Gr70L.js} +2 -2
- package/_assets/{biconomy-CmCXVveR.js → biconomy-DXsuRb6U.js} +2 -2
- package/_assets/{browseLayout.styles-CD0IScll.js → browseLayout.styles-auYUxt_L.js} +2 -2
- package/_assets/{browser-D9k3q93s.js → browser-C09NBHCh.js} +2 -2
- package/_assets/{browser-ponyfill-r_Cb0UvN.js → browser-ponyfill-D_2NFVf-.js} +2 -2
- package/_assets/{builder-BNPELa8K.js → builder-Bum_vmmD.js} +2 -2
- package/_assets/{buy-Dw9Bj7hD.js → buy-ae9eqPro.js} +2 -2
- package/_assets/{buy-gasless-CBKPcEwF.js → buy-gasless-FJedqUxy.js} +2 -2
- package/_assets/{categories-7G2C3PfM.js → categories-CdWn6WdC.js} +2 -2
- package/_assets/{ccip-CYbUewzf.js → ccip-64TO57d6.js} +2 -2
- package/_assets/{ccip-Cy6LU3ip.js → ccip-B42Jus-p.js} +2 -2
- package/_assets/{chains-QkSExWRv.js → chains-Dc_J2jwK.js} +2 -2
- package/_assets/collectionPage.styles-_TS1Qp9v.js +41 -0
- package/_assets/{common-CP63-oot.js → common-BjfIRqgA.js} +2 -2
- package/_assets/{controller-Bdm28Y7D.js → controller-CZ2ab2fW.js} +3 -3
- package/_assets/{core-t5aP5rLI.js → core-Dy-HNq2C.js} +5 -5
- package/_assets/{createSvgIcon-B6i2Y7Of.js → createSvgIcon-BJh7o8aD.js} +2 -2
- package/_assets/{crumbs.styles-DvLkEQ1F.js → crumbs.styles-CZXtZ0wH.js} +2 -2
- package/_assets/{custom-CPk8cUDr.js → custom-DnSVFWmX.js} +2 -2
- package/_assets/{data-capture-Dqlgd_XT.js → data-capture-DaxNBoxb.js} +2 -2
- package/_assets/{dcl-schemas-DClyK8sW.js → dcl-schemas-DJyDUFXH.js} +2 -2
- package/_assets/{decimals-Bx6EEocO.js → decimals-Buju5-qu.js} +2 -2
- package/_assets/{decimals-CFvFa9J4.js → decimals-DvlwzgVB.js} +2 -2
- package/_assets/{detectExtension-CIkXvanD.js → detectExtension-pv9jZmds.js} +2 -2
- package/_assets/{disposePreview-BEfrrnIt.js → disposePreview-BJKtQ23t.js} +2 -2
- package/_assets/{email-CXAydXKB.js → email-B9MeAxMA.js} +2 -2
- package/_assets/{embedded-wallet-BOjOjulj.js → embedded-wallet-Cf5Etceo.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-XcENv_Sv.js → emotion-styled.browser.esm-CmWJpDsL.js} +2 -2
- package/_assets/{engine-DQ15u5PO.js → engine-Drrfa69Q.js} +2 -2
- package/_assets/{errors-C36yLQlw.js → errors-Cr-V9DJT.js} +2 -2
- package/_assets/{estimate-l1-fee-Dk4SHuBk.js → estimate-l1-fee-DUHpk5eI.js} +2 -2
- package/_assets/{eth_estimateGas-cQxq2QWV.js → eth_estimateGas-8MbWUdDD.js} +2 -2
- package/_assets/{eth_getStorageAt-BcinxYl2.js → eth_getStorageAt-og5wv8sp.js} +2 -2
- package/_assets/{eth_getTransactionCount-MJl1pNMO.js → eth_getTransactionCount-BqYcKyfR.js} +2 -2
- package/_assets/{ethereum-V0sW1J3f.js → ethereum-CwWlLH0t.js} +2 -2
- package/_assets/{ethers-DOyNn0vs.js → ethers-CU4Cxyvz.js} +2 -2
- package/_assets/{events-CCn9J_2a.js → events-BdOJ55Uk.js} +2 -2
- package/_assets/{execute-BKniLgCg.js → execute-CxSKRA9N.js} +3 -3
- package/_assets/{extractIPFS-CuvU06kq.js → extractIPFS-DXM7W9nF.js} +2 -2
- package/_assets/{features-DPitOC3t.js → features-C0_ArUSr.js} +2 -2
- package/_assets/{fetchTokenMetadata-DpEgpfxC.js → fetchTokenMetadata-Dc1KVWMt.js} +3 -3
- package/_assets/{field.styles-BoqKqw8U.js → field.styles-CrQuoGyI.js} +2 -2
- package/_assets/{fortmatic-BFwqHblp.js → fortmatic-Df7sq4Sx.js} +2 -2
- package/_assets/{get-bytecode-BuCFwSkX.js → get-bytecode-DLmgaPLw.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-B0B09aUD.js → get-ecosystem-wallet-info-CXR4kJXv.js} +2 -2
- package/_assets/{getBalance-A1aUHw4a.js → getBalance-DRyNZsul.js} +3 -3
- package/_assets/{getInstalledModules-CMqYNZIs.js → getInstalledModules-B4T78GNi.js} +2 -2
- package/_assets/{getNFT-CyBLkytL.js → getNFT-BNK9W_GW.js} +2 -2
- package/_assets/{getNFT-CMkDPKM3.js → getNFT-CPcr5ctj.js} +3 -3
- package/_assets/{grid.styles-BWp5hRCl.js → grid.styles-D1BFIqWD.js} +2 -2
- package/_assets/{hashTypedData-IvmNmmCB.js → hashTypedData-DlWMtADd.js} +2 -2
- package/_assets/{hashTypedData-CgGD-2f9.js → hashTypedData-DmNTE8Pg.js} +2 -2
- package/_assets/{in-app-BWphzEXN.js → in-app-DxtaICms.js} +2 -2
- package/_assets/{in-app-wallet-calls-BQohYStA.js → in-app-wallet-calls-DPu0mnJP.js} +2 -2
- package/_assets/{index-DcV6mz4U.js → index--_ZKLiNQ.js} +2 -2
- package/_assets/{index-8Xi5w0jl.js → index-8-WjKZKh.js} +4 -4
- package/_assets/{index-DL4Ng5gW.js → index-B2hd-nF_.js} +2 -2
- package/_assets/{index-XQxI2EWC.js → index-B8LcyGYe.js} +2 -2
- package/_assets/{index-Cj82A80V.js → index-B9sJFVMd.js} +2 -2
- package/_assets/{index-DOeWT5L1.js → index-BAOfRC9j.js} +2 -2
- package/_assets/{index-CWFuIRQn.js → index-BD39TKlb.js} +2 -2
- package/_assets/{index-SPhsLC2Q.js → index-BDfmWFTr.js} +2 -2
- package/_assets/{index-8vQS_6b-.js → index-BG9kwA5Q.js} +2 -2
- package/_assets/{index-ByPQnlbk.js → index-BGpW0SU0.js} +2 -2
- package/_assets/{index-CXOLiVIM.js → index-BJa2A7s_.js} +2 -2
- package/_assets/{index-DtGOkzX7.js → index-BPBfycuL.js} +2 -2
- package/_assets/{index-7kxE-iA6.js → index-BT-PeJMD.js} +2 -2
- package/_assets/{index-Dp7pXqB2.js → index-BTAI_RE_.js} +2 -2
- package/_assets/{index-CN-sj3Aq.js → index-BXrY-hCz.js} +2 -2
- package/_assets/{index-CSne_m1Z.js → index-BYY9SIuz.js} +2 -2
- package/_assets/{index-Cu2xjJu3.js → index-BbwUb-L_.js} +2 -2
- package/_assets/{index-CenMjqSZ.js → index-Bmtx96ie.js} +2 -2
- package/_assets/{index-BlKRNziK.js → index-BtfdQMyQ.js} +2 -2
- package/_assets/{index-ceMkXxtM.js → index-BxMxUayl.js} +2 -2
- package/_assets/{index-C5VozPg4.js → index-C7B5xZ7E.js} +2 -2
- package/_assets/{index-3f3O9poo.js → index-CFgUTKWL.js} +2 -2
- package/_assets/{index-BjtJbOzT.js → index-CIOWtcFe.js} +2 -2
- package/_assets/{index-CTTkGX74.js → index-CJoZc4_X.js} +2 -2
- package/_assets/{index-zMLyTrtb.js → index-CKVDUwvN.js} +4 -4
- package/_assets/{index-DBMknjke.js → index-CLDscwLL.js} +2 -2
- package/_assets/{index-CoblKGWq.js → index-CLkbMtSE.js} +2 -2
- package/_assets/{index-BXnq7PrD.js → index-CP058mol.js} +2 -2
- package/_assets/{index-BH-icA8C.js → index-CPjHZOlD.js} +2 -2
- package/_assets/{index-ClFXaP1w.js → index-CZuYuS5o.js} +2 -2
- package/_assets/{index-kZnmPfT5.js → index-CaQ3KLoa.js} +2 -2
- package/_assets/{index-sYTXYMnS.js → index-Ce1PIqLP.js} +2 -2
- package/_assets/{index-BDQq5KCl.js → index-CjKaGHcY.js} +2 -2
- package/_assets/{index-CAk812YM.js → index-CwtR_NJH.js} +3 -3
- package/_assets/{index-Cjtj0Ta_.js → index-D2sMIq2e.js} +2 -2
- package/_assets/{index-D-wgq5XE.js → index-D6hz2Sm9.js} +2 -2
- package/_assets/{index-DnmukSDI.js → index-DJCTVPv4.js} +2 -2
- package/_assets/{index-Ca9b4PGk.js → index-DKVMuZOF.js} +2 -2
- package/_assets/{index-CFdMUMIf.js → index-DMXxGVB0.js} +2 -2
- package/_assets/{index-BSyZKyGh.js → index-DUAMN1QW.js} +3 -3
- package/_assets/{index-DsTPKUHx.js → index-DarCNBc9.js} +2 -2
- package/_assets/{index-DYaYTEGI.js → index-DbCYcHRW.js} +4 -4
- package/_assets/{index-98bhCYY8.js → index-Dbdd643g.js} +3 -3
- package/_assets/{index-BPaUpWBb.js → index-Dd-Q3mQU.js} +2 -2
- package/_assets/{index-BaE0_hXe.js → index-DgscAb6D.js} +2 -2
- package/_assets/{index-BCBt6Hwx.js → index-DjVpyhrz.js} +2 -2
- package/_assets/{index-Bi_ScqKk.js → index-Dl8zJZ3K.js} +2 -2
- package/_assets/{index-C1yRnz_E.js → index-Dlg6WMNx.js} +3 -3
- package/_assets/{index-Chj2Yu9b.js → index-DruW9MeT.js} +2 -2
- package/_assets/{index-DH4TysgU.js → index-Du2F48OY.js} +2 -2
- package/_assets/{index-BOPHP3Ox.js → index-DvPlPDFB.js} +2 -2
- package/_assets/{index-C9VWwOrN.js → index-Dx00JkBG.js} +2 -2
- package/_assets/{index-D_j9kw_t.js → index-DxcULOYk.js} +2 -2
- package/_assets/{index-D5f11azz.js → index-DyD13iwV.js} +2 -2
- package/_assets/{index-CxN9xUcA.js → index-F4S6ZxVj.js} +2 -2
- package/_assets/{index-BNATKs5w.js → index-J3IT5zaH.js} +2 -2
- package/_assets/{index-D2CdrSfi.js → index-KGbN_-sc.js} +2 -2
- package/_assets/{index-GMnLDRte.css → index-S9IHtNtO.css} +1 -1
- package/_assets/{index-CCwEfRv1.js → index-V1ph_pFu.js} +2 -2
- package/_assets/{index-lHZ_hIvP.js → index-YlSuGC-c.js} +2 -2
- package/_assets/{index-CMJzrmHJ.js → index-dE2eeicG.js} +2 -2
- package/_assets/{index-CYRG3OQ_.js → index-fJ30H4nd.js} +2 -2
- package/_assets/{index-BHMkdOZv.js → index-gALOgjze.js} +2 -2
- package/_assets/{index-DJL5YAMY.js → index-h0rfabEc.js} +2 -2
- package/_assets/{index-DHYVO_C1.js → index-kPBUi_77.js} +2 -2
- package/_assets/{index-D9nco8aW.js → index-n0iu7hmp.js} +718 -651
- package/_assets/{index-BICfW5w1.js → index-rm2kSJf-.js} +2 -2
- package/_assets/{index-CwMaummt.js → index-tFSwvSCH.js} +2 -2
- package/_assets/{index.es-BKn9UIXr.js → index.es-BNA3QhHr.js} +2 -2
- package/_assets/{index.es-MMNE5pZE.js → index.es-BasYBP-f.js} +2 -2
- package/_assets/{index.es-C5D7tEFD.js → index.es-C6pnHL-k.js} +5 -5
- package/_assets/{index.es-_7n0cbOB.js → index.es-C7kVl18E.js} +2 -2
- package/_assets/{items-empty-CBUQV73X.js → items-empty-Bq8pgRSd.js} +2 -2
- package/_assets/{jump-DcqLxJfZ.js → jump-BODXGRfH.js} +2 -2
- package/_assets/{linkAccount-CG2m2ivw.js → linkAccount-CBhHA30z.js} +2 -2
- package/_assets/{localBatchGatewayRequest-fDdUWjpv.js → localBatchGatewayRequest-FKBXRf9a.js} +2 -2
- package/_assets/{native-DhTmA_87.js → native-DBHbfTt9.js} +2 -2
- package/_assets/{networks-BP6--4FE.js → networks-DptrJFRw.js} +2 -2
- package/_assets/{onramp-Bd7Tp0Gr.js → onramp-DIXwPuYN.js} +2 -2
- package/_assets/{openzeppelin-CMYKvQnB.js → openzeppelin-BCm5XOrF.js} +2 -2
- package/_assets/{ownerOf-DXi3Nf-w.js → ownerOf-Co2Dryh7.js} +2 -2
- package/_assets/{parseNft-DvZ-VqeS.js → parseNft-Le1GUMqk.js} +3 -3
- package/_assets/{parseSignature-Cl9hAC1S.js → parseSignature-C0BkSp07.js} +4 -4
- package/_assets/{parseSignature-ClNFuHRD.js → parseSignature-CE6EcCOe.js} +2 -2
- package/_assets/{passkeys-B5ti2y79.js → passkeys-CPiXMgaD.js} +2 -2
- package/_assets/{pay-with-exchange-6YuPECVQ.js → pay-with-exchange-CjkXmngy.js} +2 -2
- package/_assets/{prepare-contract-call-DeTSyI4G.js → prepare-contract-call-BrL23E5O.js} +2 -2
- package/_assets/{qr-overlay-C6-AAmDW.js → qr-overlay-C3VZ64p1.js} +4 -4
- package/_assets/{react-C9neZ7Uo.js → react-BavsWmnY.js} +2 -2
- package/_assets/{receive-Q48SYcCQ.js → receive-CyfCPl9Y.js} +2 -2
- package/_assets/{resolveImplementation-CRZtvyEi.js → resolveImplementation-Ba8Zh1c2.js} +2 -2
- package/_assets/{resume-buy-Do1iVtIQ.js → resume-buy-yS1A7yD_.js} +2 -2
- package/_assets/{rpc-DxyE7c-Z.js → rpc-DlDYXUR-.js} +2 -2
- package/_assets/{sales-empty-Dy3xBmna.js → sales-empty-BTuFQaXt.js} +2 -2
- package/_assets/{search-empty-ChvQhAxZ.js → search-empty-DN4dEw7x.js} +2 -2
- package/_assets/{secp256k1-BOQVYpb2.js → secp256k1-BJzHmtRU.js} +2 -2
- package/_assets/{secp256k1-D1OPQNuQ.js → secp256k1-CW_pFN5M.js} +2 -2
- package/_assets/{secp256k1-PQG5l4bt.js → secp256k1-DW68_Oz0.js} +2 -2
- package/_assets/{send-agjirfqK.js → send-BnwHmW_-.js} +2 -2
- package/_assets/{send-batch-transaction-Bc90Fax3.js → send-batch-transaction-jAknlYjX.js} +2 -2
- package/_assets/{send-eip712-transaction-CCFcW2Ft.js → send-eip712-transaction-BGPc8sRn.js} +3 -3
- package/_assets/{send-gasless-transaction-nGOHz_b7.js → send-gasless-transaction-CBAzaXuu.js} +3 -3
- package/_assets/{send-transaction-BwgZFsLw.js → send-transaction-D4zR5IM-.js} +3 -3
- package/_assets/{sendMetaTransaction-l440Kzt0.js → sendMetaTransaction-Hg2a-HsY.js} +2 -2
- package/_assets/{sendRawTransaction-DwabYVD5.js → sendRawTransaction-CMQoh8kw.js} +4 -4
- package/_assets/{sentry-BuY6eQh6.js → sentry-D26A9rSF.js} +3 -3
- package/_assets/{serializeTransaction-C2y8_jXC.js → serializeTransaction-BPtgFeVP.js} +2 -2
- package/_assets/{session-proposal-a7HeV7Ss.js → session-proposal-BPbG0SPd.js} +2 -2
- package/_assets/{session-request-De1VyCVk.js → session-request-C8v_Q9nW.js} +3 -3
- package/_assets/{sha256-C3hKp14x.js → sha256-DAQZ6NHX.js} +2 -2
- package/_assets/{signing-D5xGCJn-.js → signing-B6Zbcewp.js} +4 -4
- package/_assets/{skeleton.styles-BFR1JQBu.js → skeleton.styles-DJ1-rE_6.js} +2 -2
- package/_assets/{socials-DcUoLnFD.js → socials-Cp4NEDcl.js} +2 -2
- package/_assets/{styled-BrPcF75A.js → styled-2Xt93imn.js} +2 -2
- package/_assets/{swaps-x5kK5Noa.js → swaps-CQzIovHd.js} +2 -2
- package/_assets/{thirdweb-0Sksx90X.js → thirdweb-DNFqz1By.js} +4 -4
- package/_assets/{to-serializable-transaction-BZTbgB31.js → to-serializable-transaction-D414ejP3.js} +3 -3
- package/_assets/{totalSupply-CgxOFHzl.js → totalSupply-qAy2u22j.js} +2 -2
- package/_assets/{transaction-Bk2KdZgf.js → transaction-DdAHBchN.js} +2 -2
- package/_assets/{transactionReceipt-BbhpoOZG.js → transactionReceipt-CGiqPuPZ.js} +2 -2
- package/_assets/{transactions-D-13bz92.js → transactions-DKq786t5.js} +2 -2
- package/_assets/{useCreditPacks-CksfdQ6Q.js → useCreditPacks-DTcqWFc9.js} +2 -2
- package/_assets/{useInfiniteGrid-Bn9FRhmQ.js → useInfiniteGrid-Dj3j7mQc.js} +2 -2
- package/_assets/{useStore-C6S7ZSK4.js → useStore-CMQwKTKX.js} +3 -3
- package/_assets/{useTheme-D4hAdBst.js → useTheme-BbYdnJK2.js} +2 -2
- package/_assets/{utils-oSsk5zcr.js → utils-MC6aTIlm.js} +2 -2
- package/_assets/{verifyHash-CjecN0X7.js → verifyHash-gWmtWDGj.js} +2 -2
- package/_assets/{w3m-modal-DOfxhEVC.js → w3m-modal-DHPHm9tB.js} +2 -2
- package/_assets/{w3m-modal-BO8cz5T2.js → w3m-modal-DS0jrmOx.js} +2 -2
- package/_assets/{wait-for-tx-receipt--wtpLWF7.js → wait-for-tx-receipt-967wmkoc.js} +2 -2
- package/_assets/{wallets-CytxfgQl.js → wallets-B_RWh2g-.js} +6 -6
- package/_assets/{web-connector-BfWWxhba.js → web-connector-CDUajHhV.js} +4 -4
- package/_assets/{writeContract-C2ED-e33.js → writeContract-DBv3gq8d.js} +2 -2
- package/_assets/{zora-sepolia-Dl-iX-Ui.js → zora-sepolia-C2Gd3G4l.js} +2 -2
- package/_assets/{zoraTestnet-BwxMZdDl.js → zoraTestnet-C-J3yX-8.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/collectionPage.styles-BktmnSZw.js +0 -41
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{V as we,bJ as Ie,p as U,m as A,bK as Ae,t as o,s as l,n as Ee,o as Le,b as r,J as Ne,I as T,bL as se,bM as ne,bN as $e,_ as Pe,L as Te,r as E,aq as K,bO as Se,v as Ce,bn as B,E as Fe,bP as De,x as N,bQ as Me,bR as Q}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-kPBUi_77.js","_assets/react-BavsWmnY.js","_assets/index-n0iu7hmp.js","_assets/dcl-schemas-DJyDUFXH.js","_assets/sentry-D26A9rSF.js","_assets/ethers-CU4Cxyvz.js","_assets/intl-AKLEHPeO.js","_assets/index-S9IHtNtO.css","_assets/sales-empty-BTuFQaXt.js","_assets/buy-ae9eqPro.js","_assets/authorizations-DkuKVqPp.js","_assets/sendMetaTransaction-Hg2a-HsY.js","_assets/ManaPricingBanner.styles-BDWA26Gj.js","_assets/Faq-7MARz-uk.js","_assets/field.styles-CrQuoGyI.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{V as we,bJ as Ie,p as U,m as A,bK as Ae,t as o,s as l,n as Ee,o as Le,b as r,J as Ne,I as T,bL as se,bM as ne,bN as $e,_ as Pe,L as Te,r as E,aq as K,bO as Se,v as Ce,bn as B,E as Fe,bP as De,x as N,bQ as Me,bR as Q}from"./index-n0iu7hmp.js";import{r as g,u as He,j as t,e as Re,L as qe}from"./react-BavsWmnY.js";import{u as Oe,s as _e}from"./sales-empty-BTuFQaXt.js";import{L as ze}from"./LoadMore-CQ_nr3wh.js";import{u as $}from"./useInfiniteGrid-Dj3j7mQc.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-DJyDUFXH.js";import"./sentry-D26A9rSF.js";import"./ethers-CU4Cxyvz.js";import"./intl-AKLEHPeO.js";import"./buy-ae9eqPro.js";import"./authorizations-DkuKVqPp.js";import"./sendMetaTransaction-Hg2a-HsY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="adb3880a-91a6-4fb4-a902-89fc03d2b070",e._sentryDebugIdIdentifier="sentry-dbid-adb3880a-91a6-4fb4-a902-89fc03d2b070")}catch{}})();const Ge=15e3;function Ue(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=Ge}function Ke(e){const s=[...e].sort((i,d)=>d.createdAt-i.createdAt),n=[];for(const i of s){const d=n[n.length-1];d&&Ue(d[d.length-1],i)?d.push(i):n.push([i])}return n.map(i=>{var d;return{id:((d=i.find(a=>a.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(a=>a.createdAt)),status:Be(i),totalCredits:i.reduce((a,h)=>a+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Qe(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Ve(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Xe(e){const s=[],n=new Map;for(const i of e){const d=Ve(i);if(!d){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits});continue}const a=n.get(d);if(a){a.quantity+=1,a.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};n.set(d,h),s.push(h)}return s}function Je(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?we(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Ze(e){const n=Ke(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Je(c,e.rate);return{kind:"sale",id:`sale:${m.id}`,createdAt:m.createdAt,sale:m}}),d=(e.creditOrders??[]).filter(c=>c.status!=="failed"&&c.status!=="abandoned").map(c=>({kind:"credit",id:`credit:${c.id}`,createdAt:c.createdAt,order:c})),a=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!a.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...n,...i,...d,...h].sort((c,m)=>m.createdAt-c.createdAt||(c.id<m.id?-1:1))}function et(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function tt(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const d=s.get(i);d?d.push(n):s.set(i,[n])}return s}function it(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?st(i[0].netCents):null,a=i.filter(c=>!c.available&&c.availableAt>n);if(a.length===0)return{kind:"credited",credits:d};const h=a.reduce((c,m)=>Math.max(c,m.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function st(e){return Ie(e)}function nt(){const e=U(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const at="https://cdn.decentraland.org/@dcl/shop/1.12.2-34900076381.commit-51dacfd/_assets/credits-product-vs4Q6u6l.svg",V=Ee`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,rt=l.section`
|
|
@@ -357,11 +357,11 @@ import{V as we,bJ as Ie,p as U,m as A,bK as Ae,t as o,s as l,n as Ee,o as Le,b a
|
|
|
357
357
|
@media (prefers-reduced-motion: reduce) {
|
|
358
358
|
animation: none;
|
|
359
359
|
}
|
|
360
|
-
`,
|
|
360
|
+
`,bt=l.div`
|
|
361
361
|
display: flex;
|
|
362
362
|
flex-direction: column;
|
|
363
363
|
align-items: center;
|
|
364
|
-
`,
|
|
364
|
+
`,yt=l.div`
|
|
365
365
|
display: flex;
|
|
366
366
|
flex-direction: column;
|
|
367
367
|
align-items: center;
|
|
@@ -385,5 +385,5 @@ import{V as we,bJ as Ie,p as U,m as A,bK as Ae,t as o,s as l,n as Ee,o as Le,b a
|
|
|
385
385
|
height: 26px;
|
|
386
386
|
object-fit: contain;
|
|
387
387
|
}
|
|
388
|
-
`,Z=L.withComponent(qe),wt=g.lazy(()=>Pe(()=>import("./index-DHYVO_C1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function me(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function xe({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(xt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?Re.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=B({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:[a?t.jsx(J,{}):t.jsx(q,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(O,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return m?t.jsx(Z,{to:m,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(O,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Xe(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(X,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(q,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(X,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(q,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(X,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[m?t.jsx(mt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(R,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(yt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Oe(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",x=!!e&&!a&&s!=="purchases",y=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),b=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(x);if(!e)return t.jsxs(bt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?y.items:[],sales:x?b.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),ye=p&&(y.isLoading||v.isLoading||j.isLoading)||x&&b.isLoading,ie=p&&(y.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&b.isFetchingNextPage,be=p&&(y.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&b.hasNextPage;function ve(){p&&y.hasNextPage&&y.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&b.hasNextPage&&b.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):ye?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:be,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
|
|
389
|
-
//# sourceMappingURL=Activity-
|
|
388
|
+
`,Z=L.withComponent(qe),wt=g.lazy(()=>Pe(()=>import("./index-kPBUi_77.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function me(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function xe({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(xt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?Re.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=B({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:[a?t.jsx(J,{}):t.jsx(q,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(O,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return m?t.jsx(Z,{to:m,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(O,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Xe(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(X,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(q,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(X,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(q,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(X,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[m?t.jsx(mt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(R,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(bt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Oe(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",x=!!e&&!a&&s!=="purchases",b=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),y=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(x);if(!e)return t.jsxs(yt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?b.items:[],sales:x?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||j.isLoading)||x&&y.isLoading,ie=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&y.hasNextPage&&y.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):be?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:ye,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
|
|
389
|
+
//# sourceMappingURL=Activity-CIKijfDM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as d}from"./react-
|
|
1
|
+
import{r as u,j as d}from"./react-BavsWmnY.js";import{s as f}from"./index-n0iu7hmp.js";import"./dcl-schemas-DJyDUFXH.js";import"./sentry-D26A9rSF.js";import"./ethers-CU4Cxyvz.js";import"./intl-AKLEHPeO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="f4db2410-38a2-4079-998f-0cc81858783e",e._sentryDebugIdIdentifier="sentry-dbid-f4db2410-38a2-4079-998f-0cc81858783e")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.12.2-34900076381.commit-51dacfd/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.12.2-34900076381.commit-51dacfd/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -77,11 +77,11 @@ void main() {
|
|
|
77
77
|
|
|
78
78
|
gl_FragColor = result;
|
|
79
79
|
}
|
|
80
|
-
`;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=
|
|
80
|
+
`;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=f.div`
|
|
81
81
|
position: absolute;
|
|
82
82
|
inset: 0;
|
|
83
83
|
overflow: hidden;
|
|
84
|
-
`,k=
|
|
84
|
+
`,k=f.div`
|
|
85
85
|
position: absolute;
|
|
86
86
|
inset: 0;
|
|
87
87
|
width: 100%;
|
|
@@ -89,10 +89,10 @@ void main() {
|
|
|
89
89
|
background-size: cover;
|
|
90
90
|
background-position: center;
|
|
91
91
|
background-repeat: no-repeat;
|
|
92
|
-
`,V=
|
|
92
|
+
`,V=f.canvas`
|
|
93
93
|
position: absolute;
|
|
94
94
|
inset: 0;
|
|
95
95
|
width: 100%;
|
|
96
96
|
height: 100%;
|
|
97
|
-
`;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const
|
|
98
|
-
//# sourceMappingURL=AnimatedBackground-
|
|
97
|
+
`;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const m=t.getAttribLocation(i,"a_position"),R=t.getUniformLocation(i,"u_time"),w=t.getUniformLocation(i,"u_resolution"),b=t.getUniformLocation(i,"u_overlayTex"),A=t.getUniformLocation(i,"u_overlayTiling"),v=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,v),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);let g=!1;const h=F(t,P,()=>g),S=()=>{const l=window.devicePixelRatio||1,E=o.clientWidth*l,x=o.clientHeight*l;(o.width!==E||o.height!==x)&&(o.width=E,o.height=x)},U=performance.now()/1e3,y=()=>{S(),t.viewport(0,0,o.width,o.height),t.useProgram(i),t.uniform1f(R,performance.now()/1e3-U),t.uniform2f(w,o.width,o.height),t.uniform1f(A,r.current),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,h),t.uniform1i(b,0),t.enableVertexAttribArray(m),t.bindBuffer(t.ARRAY_BUFFER,v),t.vertexAttribPointer(m,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLES,0,6),n.current=requestAnimationFrame(y)},T=l=>{l.preventDefault(),cancelAnimationFrame(n.current),o.style.opacity="0"};return o.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(y),()=>{g=!0,cancelAnimationFrame(n.current),o.removeEventListener("webglcontextlost",T),t.deleteProgram(i),t.deleteShader(c),t.deleteShader(s),t.deleteBuffer(v),t.deleteTexture(h)}},[]),d.jsxs(C,{"aria-hidden":!0,children:[d.jsx(k,{style:{backgroundImage:`url(${D})`}}),d.jsx(V,{ref:a})]})}export{K as default};
|
|
98
|
+
//# sourceMappingURL=AnimatedBackground-_gyrQB1T.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as m,b as He,j as e,u as tt}from"./react-
|
|
1
|
+
import{r as m,b as He,j as e,u as tt}from"./react-BavsWmnY.js";import{u as nt,s as st}from"./search-empty-DN4dEw7x.js";import{u as it,t as Ie,R as ot,j as rt,k as at,l as lt,m as ct,n as dt,o as ht,p as pt,v as ut,q as ft,r as mt,M as xt,s as gt}from"./browseLayout.styles-auYUxt_L.js";import{c as G,R as bt,U as yt,by as wt,bu as vt,aC as jt,a as Ct,m as $t,cA as kt,cB as St,s as i,t,p as Oe,bh as Et,v as Tt,E as ve,b as n,q as Rt,I as E,r as O,cC as le,bf as _t,af as oe,bp as Le,bx as It,bw as Lt,o as De,J as Ge,V as qe,W as Nt,at as At,L as zt,S as Ne,M as J,aK as Mt,bH as Wt}from"./index-n0iu7hmp.js";import{L as Bt}from"./LoadMore-CQ_nr3wh.js";import{u as Pt}from"./useInfiniteGrid-Dj3j7mQc.js";import{n as Ft,S as Ut}from"./categories-CdWn6WdC.js";import{E as Ht}from"./ErrorNotice-OMXWYAuR.js";import{d as Ot}from"./dcl-schemas-DJyDUFXH.js";import{s as Dt,G as Gt,w as qt,S as Vt}from"./buy-gasless-FJedqUxy.js";import{s as Zt,o as Kt}from"./buy-ae9eqPro.js";import{f as Qt}from"./errors-Cr-V9DJT.js";import{J as Jt,C as Xt,B as je}from"./ethers-CU4Cxyvz.js";import{n as Yt}from"./name-glyph-aUugT8vq.js";import{c as en}from"./crumbs.styles-CZXtZ0wH.js";import{G as tn}from"./grid.styles-D1BFIqWD.js";import"./skeleton.styles-DJ1-rE_6.js";import"./sentry-D26A9rSF.js";import"./intl-AKLEHPeO.js";import"./authorizations-DkuKVqPp.js";import"./sendMetaTransaction-Hg2a-HsY.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="812ebd25-c3ff-4952-b14f-c8b015ceb2c8",s._sentryDebugIdIdentifier="sentry-dbid-812ebd25-c3ff-4952-b14f-c8b015ceb2c8")}catch{}})();function X(s){const o=s.source??"item",r=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${r}`}const V="100000000000000000000",Ve=2,re=15,nn=/^[a-zA-Z0-9]+$/;function Ae(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:nn.test(o)?o.length<Ve?{ok:!1,reason:"too-short"}:o.length>re?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function sn(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,re)}const on=["function available(string _subdomain) view returns (bool)"],ze={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return G.chainId===Number(Ot.ChainId.MATIC_MAINNET)?ze.mainnet:ze.sepolia}async function an(s,o={}){var u;const{rpc:r,address:d}=rn(),h=new Jt(r),g=new Xt(d,on,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${r}`);const l=await g.available(s);if((u=o.signal)!=null&&u.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const ln="https://app.across.to/api";class ke extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ce extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class $e extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function cn(s){return jt(V,s)}async function dn(s,o,r={}){var u;const d=r.chainId??G.chainId,h=r.provider??"across",g=`${G.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await Ct(g,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(u=await l.json())==null?void 0:u.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function hn(s,o){const r=je.from(s.availableAmount),h=je.from(V).sub(r);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Kt(s.id)}],creditsSignatures:[s.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:V}}async function pn(s,o={}){const r=ln,d=o.intervalMs??1e4,h=o.maxAttempts??60;let g={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const u=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${s}`);if(u.ok){const c=await u.json(),p=(c.status??"pending").toLowerCase(),f=c.fillTx??c.fillTxnRef??null,w=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(p==="filled")return{status:"filled",destinationTxHash:f,actionsSucceeded:w};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};g={status:"pending",destinationTxHash:f,actionsSucceeded:w}}}catch{}l<h-1&&await new Promise(u=>setTimeout(u,d))}return g}async function un(s){const{name:o,identity:r,signer:d}=s,h=f=>{var w;try{(w=s.onProgress)==null||w.call(s,f)}catch{}},g=s.chainId??G.chainId,l=s.provider??"across",u=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,p="unconfirmed";console.info("[names] register start",{name:o,buyer:u,chainId:g,provider:l}),h("preparing");try{const f=await bt(yt(G.chainId).address),w=cn(f);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:f});const j=await dn(r,o,{chainId:g,provider:l});console.info("[names] step 2/6 route fetched",{target:j.externalCall.target,selector:j.externalCall.selector,provider:j.provider,quoteId:j.quoteId});const $=await wt(r,w,void 0,void 0,o);if(c=$.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:$.credit.id,maxCreditedValue:$.maxCreditedValue}),je.from($.maxCreditedValue).lt(V))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const C=hn($.credit,j);let x;try{x=await Dt({chainId:g,buyer:u,signer:d,args:C})}catch(b){if(!(b instanceof Gt))throw b;if(b.reason==="relayer-unreachable"){p="unobservable";const S=new $e;throw S.cause=b,S}x=await Zt(g,C,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:x}),h("confirming"),await qt(x),p="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:x}),l==="across"){h("registering");const b=await pn(x,s.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:x};if(b.status==="filled"&&b.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:x}),{status:"pending",originTxHash:x};if(b.status!=="filled"||b.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:x,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:x}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:u,originState:p}),f instanceof Vt)return{status:"pending",originTxHash:f.txHash};if(c&&p==="unconfirmed"&&await vt(r,[c]).catch(()=>{}),f instanceof ke||f instanceof Ce||f instanceof $e)throw f;const w=new Error(Qt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=f,w}}function fn(){const{data:s}=$t({queryKey:["feature-flag","shop-names"],queryFn:()=>kt(St.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const mn=60,xn=700,gn=25;function bn(s){if(!s)return[];const o=[];for(let r=1;r<=s.length;r++)o.push({text:s.slice(0,r),delay:mn});o[o.length-1]={text:s,delay:xn};for(let r=s.length-1;r>=1;r--)o.push({text:s.slice(0,r),delay:gn});return o}function yn(s){return s.flatMap(bn)}function wn(s,o){const r=m.useMemo(()=>yn(s),[s]),[d,h]=m.useState(0);return m.useEffect(()=>{if(!o||r.length===0)return;const g=setTimeout(()=>h(l=>(l+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(g)},[d,o,r]),!o||r.length===0?"":r[d%r.length].text}const vn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34900076381.commit-51dacfd/_assets/name-verified-oGwQ3ntb.svg",jn="#34fee6",Cn=i.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -458,7 +458,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-C9neZ7Uo.js";import{u as nt,s
|
|
|
458
458
|
color: ${t.colors.accent};
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
`;function Zn({name:s,priceCredits:o,onClose:a}){const{session:d}=Oe(),{data:h,isError:g}=Et(d),l=Tt(),u=He(),[c,p]=m.useState("confirm"),[f,w]=m.useState(""),[j,$]=m.useState(null),[C,x]=m.useState(!1),[b,S]=m.useState("preparing"),L=m.useRef(!1),T=f.trim().toLowerCase()===s.toLowerCase(),k=c==="completing",W=o!=null?ve(o):"—",B=o==null,z=h==null?void 0:h.credits,P=o!=null&&z!=null?o-z:0,N=P>0,A=B?n("names.priceUnavailable"):N?n("names.insufficientCredits",{credits:ve(P)}):null;m.useEffect(()=>{const y=D=>{D.key==="Escape"&&!k&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[k,a]);async function F(){if(!(!d||!T||B||N||L.current)){L.current=!0,p("completing"),$(null),S("preparing");try{const y=await un({name:s,identity:d.identity,signer:d.signer,onProgress:S});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),p(y.status==="registered"?"success":"pending")}catch(y){oe(Lt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:It(y),purchase_type:"name"});const U=y instanceof Ce,D=y instanceof $e;$(y instanceof ke?n("names.errorRouteCost"):U?n("names.errorNotRegistered"):D?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),x(U||D),p("error")}finally{L.current=!1}}}const R=c!=="success"&&c!=="pending",v=Rt(d==null?void 0:d.providerType),I=v?2:1,M=v&&(b==="preparing"||b==="awaiting-confirmation"),_=M?1:I,re=M?n("names.confirming"):n("names.completing"),Z=b==="registering"?n("names.processingRegistering"):null;return e.jsx(Cn,{onClick:k?void 0:a,role:"presentation",children:e.jsxs($n,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[R&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:a,disabled:k,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),C?e.jsx(ye,{onClick:a,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>p("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{children:[e.jsx(_n,{children:n("names.confirmTitle")}),e.jsx(In,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(s)}</b>`})}}),e.jsxs(Ln,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(An,{value:f,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(f.length,8)}ch`}}),e.jsx(zn,{children:".dcl.eth"})]})]}),A?e.jsxs(we,{"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(ye,{onClick:()=>void F(),disabled:!T||!d||B||N,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Mn,{children:[e.jsx(Wn,{src:_t,alt:"",width:61,height:61}),e.jsxs(Bn,{children:[e.jsx(Pn,{children:re}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{"data-testid":"name-progress-count",children:`${_}/${I}`})]}),Z?e.jsx(Fn,{children:Z}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{}),e.jsxs(we,{"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(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{a(),u("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{}),e.jsxs(Dn,{children:[e.jsx(Gn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(qn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(kn,{"data-testid":"name-success-tile",children:[e.jsx(Sn,{src:Yt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(En,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(Tn,{src:vn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{a(),u("/my-items")},children:n("names.myItems")}),e.jsx(Vn,{href:G.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(s){return s.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818778994.commit-b4640d0/_assets/identity-icon-C8yAW_Gq.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818778994.commit-b4640d0/_assets/world-icon-6xQ-PmmW.svg",Xn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818778994.commit-b4640d0/_assets/invite-icon-Bz6lCTuB.svg",Yn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",es=i.div`
|
|
461
|
+
`;function Zn({name:s,priceCredits:o,onClose:r}){const{session:d}=Oe(),{data:h,isError:g}=Et(d),l=Tt(),u=He(),[c,p]=m.useState("confirm"),[f,w]=m.useState(""),[j,$]=m.useState(null),[C,x]=m.useState(!1),[b,S]=m.useState("preparing"),L=m.useRef(!1),T=f.trim().toLowerCase()===s.toLowerCase(),k=c==="completing",W=o!=null?ve(o):"—",B=o==null,z=h==null?void 0:h.credits,P=o!=null&&z!=null?o-z:0,N=P>0,A=B?n("names.priceUnavailable"):N?n("names.insufficientCredits",{credits:ve(P)}):null;m.useEffect(()=>{const y=D=>{D.key==="Escape"&&!k&&r()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[k,r]);async function F(){if(!(!d||!T||B||N||L.current)){L.current=!0,p("completing"),$(null),S("preparing");try{const y=await un({name:s,identity:d.identity,signer:d.signer,onProgress:S});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),p(y.status==="registered"?"success":"pending")}catch(y){oe(Lt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:It(y),purchase_type:"name"});const U=y instanceof Ce,D=y instanceof $e;$(y instanceof ke?n("names.errorRouteCost"):U?n("names.errorNotRegistered"):D?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),x(U||D),p("error")}finally{L.current=!1}}}const R=c!=="success"&&c!=="pending",v=Rt(d==null?void 0:d.providerType),I=v?2:1,M=v&&(b==="preparing"||b==="awaiting-confirmation"),_=M?1:I,ae=M?n("names.confirming"):n("names.completing"),Z=b==="registering"?n("names.processingRegistering"):null;return e.jsx(Cn,{onClick:k?void 0:r,role:"presentation",children:e.jsxs($n,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[R&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:r,disabled:k,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),C?e.jsx(ye,{onClick:r,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>p("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{children:[e.jsx(_n,{children:n("names.confirmTitle")}),e.jsx(In,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(s)}</b>`})}}),e.jsxs(Ln,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(An,{value:f,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(f.length,8)}ch`}}),e.jsx(zn,{children:".dcl.eth"})]})]}),A?e.jsxs(we,{"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(ye,{onClick:()=>void F(),disabled:!T||!d||B||N,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Mn,{children:[e.jsx(Wn,{src:_t,alt:"",width:61,height:61}),e.jsxs(Bn,{children:[e.jsx(Pn,{children:ae}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{"data-testid":"name-progress-count",children:`${_}/${I}`})]}),Z?e.jsx(Fn,{children:Z}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{}),e.jsxs(we,{"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(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{r(),u("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{}),e.jsxs(Dn,{children:[e.jsx(Gn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(qn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(kn,{"data-testid":"name-success-tile",children:[e.jsx(Sn,{src:Yt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(En,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(Tn,{src:vn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{r(),u("/my-items")},children:n("names.myItems")}),e.jsx(Vn,{href:G.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(s){return s.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34900076381.commit-51dacfd/_assets/identity-icon-C8yAW_Gq.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34900076381.commit-51dacfd/_assets/world-icon-6xQ-PmmW.svg",Xn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34900076381.commit-51dacfd/_assets/invite-icon-Bz6lCTuB.svg",Yn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",es=i.div`
|
|
462
462
|
width: 100%;
|
|
463
463
|
min-width: 0;
|
|
464
464
|
`,ts=i.nav`
|
|
@@ -517,12 +517,12 @@ import{r as m,b as He,j as e,u as tt}from"./react-C9neZ7Uo.js";import{u as nt,s
|
|
|
517
517
|
padding: 40px 20px;
|
|
518
518
|
gap: 28px;
|
|
519
519
|
}
|
|
520
|
-
`,
|
|
520
|
+
`,rs=i.div`
|
|
521
521
|
display: flex;
|
|
522
522
|
flex-direction: column;
|
|
523
523
|
align-items: center;
|
|
524
524
|
gap: 12px;
|
|
525
|
-
`,
|
|
525
|
+
`,as=i.h1`
|
|
526
526
|
margin: 0;
|
|
527
527
|
font-family: ${t.font.sans};
|
|
528
528
|
font-weight: 600;
|
|
@@ -919,7 +919,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-C9neZ7Uo.js";import{u as nt,s
|
|
|
919
919
|
clip: rect(0, 0, 0, 0);
|
|
920
920
|
white-space: nowrap;
|
|
921
921
|
border: 0;
|
|
922
|
-
`,Is="https://docs.decentraland.org/creator/worlds/about/",Ls="https://governance.decentraland.org";function Fe(s){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(s)}`}function Ns({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:
|
|
922
|
+
`,Is="https://docs.decentraland.org/creator/worlds/about/",Ls="https://governance.decentraland.org";function Fe(s){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(s)}`}function Ns({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:r}=Oe(),d=fn(),{data:h}=Ge(),g=h?qe(V,h):null,[l,u]=m.useState(""),[c,p]=m.useState("idle"),[f,w]=m.useState(!1),[j,$]=m.useState(!1),[C,x]=m.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});m.useEffect(()=>{var M;const v=(M=window.matchMedia)==null?void 0:M.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const I=_=>x(_.matches);return v.addEventListener("change",I),()=>v.removeEventListener("change",I)},[]);const b=n("names.placeholderExamples"),S=m.useMemo(()=>b.split(",").map(v=>v.trim()).filter(Boolean),[b]),T=wn(S,!j&&!l&&!C)||n("names.inputPlaceholder"),k=m.useRef(null),[W,B]=m.useState(void 0);m.useLayoutEffect(()=>{k.current&&B(k.current.getBoundingClientRect().width)},[l,T]),m.useEffect(()=>{if(!Ae(l).ok){p(l.length===0?"idle":"invalid");return}p("checking");const I=new AbortController,M=setTimeout(()=>{(async()=>{try{const _=await an(l,{signal:I.signal});p(_)}catch(_){if((_==null?void 0:_.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(M),I.abort()}},[l]);const z=Ae(l),P=z.ok&&(c==="available"||c==="error"),N=d&&P,A=!d&&P;function F(){if(N){if(!o){r();return}w(!0)}}const R=e.jsxs(e.Fragment,{children:[n("names.claim"),g!=null?e.jsxs(vs,{children:[e.jsx(O,{}),ve(g)]}):null]});return e.jsxs(es,{"data-testid":"names-page",children:[e.jsxs(ts,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ns,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ss,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsxs(rs,{children:[e.jsx(as,{children:n("names.heroTitle")}),e.jsx(ls,{children:n("names.heroSubtitle")})]}),e.jsxs(cs,{children:[e.jsxs(ds,{"data-testid":"names-input-wrap",children:[e.jsxs(hs,{invalid:c==="taken",children:[e.jsxs(ms,{children:[e.jsx(xs,{"aria-hidden":!0,children:"@"}),e.jsx(gs,{value:l,onChange:v=>u(sn(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:re,onFocus:()=>$(!0),style:{width:W!=null?`${W}px`:void 0}}),e.jsx(ps,{ref:k,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(bs,{children:n("names.suffix")})]}),l.length>0?e.jsxs(ys,{"aria-hidden":!0,children:[l.length,"/",re]}):null,e.jsx(Ke,{onClick:F,disabled:!N,"data-testid":"names-claim",children:R})]}),c==="taken"?e.jsxs(us,{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(fs,{href:Fe(l),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(Y,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):A?e.jsxs(Y,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(Cs,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!z.ok&&z.reason==="too-short"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.tooShort",{min:Ve})}):null]}),e.jsx(ws,{onClick:F,disabled:!N,children:R}),e.jsx(_s,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs($s,{children:[e.jsxs(ks,{children:[e.jsx(Ss,{children:n("names.whyTitle")}),e.jsx(Es,{children:n("names.whyIntro")})]}),e.jsxs(Ts,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Qn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why1Title")}),e.jsx(ie,{children:n("names.why1")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Jn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Rs,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:Is,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Xn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why3Title")}),e.jsx(ie,{children:n("names.why3")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Yn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(Pe,{href:Ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Zn,{name:l,priceCredits:g,onClose:()=>w(!1)}):null]})}const As=i.p`
|
|
923
923
|
display: flex;
|
|
924
924
|
align-items: center;
|
|
925
925
|
gap: 10px;
|
|
@@ -935,5 +935,5 @@ import{r as m,b as He,j as e,u as tt}from"./react-C9neZ7Uo.js";import{u as nt,s
|
|
|
935
935
|
background: rgba(211, 51, 51, 0.1);
|
|
936
936
|
color: ${t.colors.err};
|
|
937
937
|
}
|
|
938
|
-
`,Ue=48,zs=["all","on_sale","not_for_sale"],Ms=s=>s?"all":"on_sale";function ii(){const[s]=tt(),o=He(),
|
|
939
|
-
//# sourceMappingURL=Assets-
|
|
938
|
+
`,Ue=48,zs=["all","on_sale","not_for_sale"],Ms=s=>s?"all":"on_sale";function ii(){const[s]=tt(),o=He(),r=(s.get("q")??"").trim().toLowerCase(),d=(s.get("q")??"").trim();De({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=Ms(!!r),g=m.useMemo(()=>({category:"all",status:h,subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[h]),[l,u]=nt(g),{subCategory:c,rarities:p,priceMin:f,priceMax:w,smart:j,sort:$}=l,C=l.category,x=zs.includes(l.status)?l.status:h;it(`${C}:${c??""}`);const[b,S]=m.useState(!1);m.useEffect(()=>{if(!b)return;const a=Q=>{Q.key==="Escape"&&S(!1)};document.addEventListener("keydown",a);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",a),document.body.style.overflow=H}},[b]);const L=x==="on_sale",T=f&&!Number.isNaN(Number(f))?Number(f):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,W=Nt(),B=c?Ut[c]:void 0,z=(Ie.find(a=>a.key===$)??Ie[0]).server,P={category:C,rarities:p.length?p:void 0,wearableCategories:B,minPriceCredits:T,maxPriceCredits:k,search:r||void 0,sortBy:z,isSmart:j||void 0,onSale:!0,listingType:W?void 0:"primary"},N={category:C,rarities:p.length?p:void 0,wearableCategories:B,search:r||void 0,sortBy:z,isWearableSmart:j||void 0,isOnSale:x==="not_for_sale"?!1:void 0},{items:A,total:F,isLoading:R,isPlaceholderData:v,error:I,hasNextPage:M,isFetchingNextPage:_,isFetchNextPageError:ae,fetchNextPage:Z}=Pt(L?["shop-items",P]:["catalog-items",N],a=>L?Mt({...P,first:Ue,skip:a}):Wt({...N,first:Ue,skip:a}),{enabled:C!=="names"}),y=F,{data:U,isError:D,isPending:Qe}=Ge(),Je=a=>U&&a.manaWei?qe(a.manaWei,U):null,Xe=L&&Qe&&A.some(a=>a.source==="legacy"),Se=R||v||Xe,Ye=R?15:Math.max(A.length,1),Ee=m.useRef(null);m.useEffect(()=>{R||v||!r||Ee.current===r||(Ee.current=r,oe("Shop Searched",{query:r,result_count:y}))},[r,R,v,y]);const K=m.useRef("__init__");m.useEffect(()=>{if(R||v)return;const a=JSON.stringify({category:C,subCategory:c,rarities:p,min:T,max:k,sort:$,status:x,smart:j});if(K.current==="__init__"||K.current===a){K.current=a;return}K.current=a,oe("Shop Applied Filter",{filters:{category:C,sub_category:c,rarities:p,min_price_credits:T??null,max_price_credits:k??null,status:x,smart:j,sort:$},result_count:y})},[C,c,p,T,k,$,x,j,R,v,y]);function Te(a){u({category:a,subCategory:null})}function Re(a){u({status:a})}function _e(a){u({rarities:p.includes(a)?p.filter(H=>H!==a):[...p,a]})}function et(){u(g)}const q=[];(T!=null||k!=null)&&q.push({key:"price",label:n("filter.price"),onRemove:()=>{u({priceMin:"",priceMax:""})}});for(const a of ot)p.includes(a)&&q.push({key:`rarity-${a}`,label:At(a),onRemove:()=>_e(a)});return j&&q.push({key:"smart",label:n("filter.smart"),onRemove:()=>u({smart:!1})}),x!==h&&q.push({key:"status",label:x==="all"?n("filter.statusAll"):x==="on_sale"?n("filter.onSale"):n("filter.notForSale"),onRemove:()=>Re(h)}),e.jsxs(rt,{"data-testid":"browse",children:[C!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(at,{onClick:()=>S(!1),"aria-hidden":!0}):null,e.jsxs(lt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ct,{children:[e.jsx(dt,{children:n("assets.filters")}),e.jsx(ht,{onClick:()=>S(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(pt,{children:e.jsx(ut,{category:C,subCategory:c,onCategory:Te,onSub:a=>u({subCategory:a}),priceMin:f,priceMax:w,onPriceMin:a=>u({priceMin:a}),onPriceMax:a=>u({priceMax:a}),rarities:p,onToggleRarity:_e,status:x,onStatus:Re,smart:j,onSmart:a=>u({smart:a})})}),e.jsx(ft,{children:e.jsx(mt,{type:"button",onClick:()=>S(!1),children:n("assets.showItems")})})]})]}),e.jsx(xt,{children:C==="names"?e.jsx(Ns,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(gt,{sort:$,onSort:a=>u({sort:a}),total:F,loading:R||v,query:r,onOpenFilters:()=>S(!0),chips:q,onClearChips:et}),D&&L&&A.some(a=>a.source==="legacy")?e.jsx(As,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,I?e.jsx(Ht,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&A.length===0&&!I?e.jsx(zt,{testId:"browse-empty",icon:st,title:n("assets.empty.title"),body:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters"),cta:{label:n("assets.empty.cta"),onClick:()=>o("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(tn,{"data-testid":"grid",children:Se?e.jsx(Ne,{count:Ye}):e.jsxs(e.Fragment,{children:[A.map(a=>{if(!L)return e.jsx(J,{item:a,mode:"view"},X(a));const H=a;if(H.source!=="legacy")return e.jsx(J,{item:a},X(a));const Q=Je(H);return Q==null?e.jsx(J,{item:a,mode:"view"},X(a)):e.jsx(J,{item:{...H,priceCredits:Q}},X(a))}),_?e.jsx(Ne,{count:6}):null]})}),e.jsx(Bt,{hasNextPage:M,isFetching:_,isError:ae,onLoadMore:()=>void Z()})]})]})})]})}export{ii as Assets};
|
|
939
|
+
//# sourceMappingURL=Assets-B2K_cmnI.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as F,r as G}from"./react-
|
|
1
|
+
import{j as e,L as F,r as G}from"./react-BavsWmnY.js";import{t as o,s as n,B as K,n as P,o as Q,b as i,p as H,q as X,I as v,r as V,m as k,v as Z,c as J,w as U,x as T,h as Y,y as tt,z as D}from"./index-n0iu7hmp.js";import{a as et,b as it,c as C,d as ot,e as at,s as nt,f as st}from"./authorizations-DkuKVqPp.js";import{f as rt}from"./builder-Bum_vmmD.js";import{m as M}from"./mana-matic-CEqvSwrJ.js";import{f as ct}from"./errors-Cr-V9DJT.js";import"./dcl-schemas-DJyDUFXH.js";import"./sentry-D26A9rSF.js";import"./ethers-CU4Cxyvz.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-Hg2a-HsY.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="586c40bf-a30f-4df8-9ac2-fe7a2af988f5",t._sentryDebugIdIdentifier="sentry-dbid-586c40bf-a30f-4df8-9ac2-fe7a2af988f5")}catch{}})();const lt=P`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,dt=P`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -189,4 +189,4 @@ import{j as e,L as F,r as G}from"./react-C9neZ7Uo.js";import{t as o,s as n,B as
|
|
|
189
189
|
`,W=n(K)`
|
|
190
190
|
margin-top: 12px;
|
|
191
191
|
`;function y({descriptor:t,owner:s,signer:r,name:a,description:c,image:d,icon:m,revokeOnly:$=!1}){const g=Z(),[z,j]=G.useState(!1),{data:u,isLoading:l,refetch:h}=k({queryKey:["authorization",t.id,s],queryFn:()=>st(t,s),staleTime:3e4});async function p(){if(z||l)return;const w=!u;j(!0);try{await nt({auth:t,signer:r,active:w}),await h(),g.setQueryData(["authorization",t.id,s],w),T.success(w?i("authorizations.toastActivated",{name:a}):i("authorizations.toastDeactivated",{name:a}))}catch(E){Y(E,{flow:"authorizations",step:w?"grant":"revoke"}),T.error(ct(E,i("authorizations.errorGeneric")))}finally{j(!1)}}if($&&u===!1)return null;const f=l?i("authorizations.checking"):u?i("authorizations.active"):i("authorizations.inactive");return e.jsxs(gt,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[e.jsx(ft,{children:d?e.jsx("img",{src:d,alt:""}):m}),e.jsxs(xt,{children:[e.jsx(yt,{title:a,children:a}),e.jsx(bt,{children:c})]}),e.jsxs(jt,{children:[e.jsx(zt,{"data-active":!!u,children:f}),z?e.jsx(vt,{"aria-label":i("authorizations.working")}):e.jsx(wt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?i("authorizations.deactivateAria",{name:a}):i("authorizations.activateAria",{name:a}),disabled:l,onClick:()=>void p()})]})]})}const b=500,B=10,$t=b*B;async function O(t,s){const r=await D(t,{category:s,first:b}),a=Math.min(Math.ceil(r.total/b),B),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(d,m)=>D(t,{category:s,first:b,skip:(m+1)*b})));return{assets:[...r.assets,...c.flatMap(d=>d.assets)],truncated:r.total>$t}}function Ct(t){return k({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([O(t,"wearable"),O(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const d=c.contractAddress.toLowerCase();a.has(d)||a.set(d,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function At(t){return k({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:tt})}function It(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=U(t);return a===t?i("authorizations.collectionFallback"):a}function Et(t,s){return k({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await rt(t,s),a=new Map;for(const c of r){const d=c.contractAddress.toLowerCase();a.has(d)||a.set(d,c)}return[...a.values()]}})}function Pt(){Q({title:i("authorizations.title"),noindex:!0});const{session:t,signIn:s}=H(),r=J.chainId,a=X(t==null?void 0:t.providerType),{data:c,isLoading:d}=Ct(a?t==null?void 0:t.address:void 0),{data:m,isLoading:$}=At(!!a&&!!(t!=null&&t.address)),{data:g,isLoading:z}=Et(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return e.jsxs(N,{children:[e.jsx(v,{name:"info",size:40,color:o.colors.muted2}),e.jsx(R,{children:i("authorizations.signInTitle")}),e.jsx(q,{children:i("authorizations.signInBody")}),e.jsx(W,{variant:"white",onClick:()=>s(),children:i("storeSettings.signIn")})]});if(!a)return e.jsxs(N,{children:[e.jsx(v,{name:"check",size:40,color:o.colors.ok}),e.jsx(R,{children:i("authorizations.managedTitle")}),e.jsx(q,{children:i("authorizations.managedBody")}),e.jsx(W,{as:F,to:"/items",variant:"white",children:i("authorizations.managedCta")})]});const j=et(r),u=it(r);return e.jsxs(ut,{children:[e.jsxs(ht,{children:[e.jsx(pt,{children:i("authorizations.title")}),e.jsx(mt,{children:i("authorizations.intro")})]}),e.jsxs(A,{children:[e.jsx(I,{children:i("authorizations.buyingTitle")}),e.jsxs(x,{children:[e.jsx(y,{descriptor:j,owner:t.address,signer:t.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:e.jsx(V,{className:"ccy-mark"})}),e.jsx(y,{descriptor:u,owner:t.address,signer:t.signer,name:i("authorizations.manaName"),description:i("authorizations.manaDesc"),icon:e.jsx(L,{src:M,alt:"","aria-hidden":!0})}),C(u).map(l=>e.jsx(y,{descriptor:l,owner:t.address,signer:t.signer,name:`${i("authorizations.manaName")} ${i("authorizations.previousVersion")}`,description:i("authorizations.manaDesc"),icon:e.jsx(L,{src:M,alt:"","aria-hidden":!0}),revokeOnly:!0},l.id))]})]}),e.jsxs(A,{children:[e.jsx(I,{children:i("authorizations.sellingTitle")}),c!=null&&c.truncated?e.jsx(kt,{"data-testid":"authorizations-selling-truncated",children:i("authorizations.sellingTruncated",{count:c.scanned})}):null,d||$?e.jsx(x,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((l,h)=>e.jsx(S,{"aria-hidden":!0},h))}):c&&c.collections.length>0?e.jsx(x,{children:c.collections.flatMap(l=>{const h=ot(l.contractAddress,r);return[h,...C(h)].map((p,f)=>e.jsx(y,{descriptor:p,owner:t.address,signer:t.signer,name:It(l.contractAddress,m),description:i("authorizations.sellingDesc"),image:l.image,icon:e.jsx(v,{name:"pen",size:18}),revokeOnly:f>0},p.id))})}):e.jsx(_,{children:i("authorizations.sellingEmpty")})]}),e.jsxs(A,{children:[e.jsx(I,{children:i("authorizations.mintingTitle")}),z?e.jsx(x,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((l,h)=>e.jsx(S,{"aria-hidden":!0},h))}):g&&g.length>0?e.jsx(x,{children:g.flatMap(l=>{const h=at(l.contractAddress,r);return[h,...C(h)].map((p,f)=>e.jsx(y,{descriptor:p,owner:t.address,signer:t.signer,name:l.name||i("authorizations.collectionFallback"),description:i("authorizations.mintingDesc"),icon:e.jsx(v,{name:"pen",size:18}),revokeOnly:f>0},p.id))})}):e.jsx(_,{children:i("authorizations.mintingEmpty")})]})]})}export{Pt as Authorizations};
|
|
192
|
-
//# sourceMappingURL=Authorizations-
|
|
192
|
+
//# sourceMappingURL=Authorizations-DyIeYcce.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as Qt,r as T,b as xa,a as fa}from"./react-
|
|
1
|
+
import{j as e,L as Qt,r as T,b as xa,a as fa}from"./react-BavsWmnY.js";import{s as i,t as E,b as a,r as Pe,E as ae,be as Fe,C as Me,bf as ma,D as Le,bg as ya,A as ba,I as Y,j as Xe,o as va,ad as H,H as jt,p as wa,W as Ca,m as ja,bh as ka,v as $a,bi as Sa,J as Ma,bj as Ta,bk as kt,L as Pa,bl as Ia,bm as Aa,bn as za,aq as Ke,q as Ea,bo as $t,af as V,bp as St,bq as Ba,h as re,br as Ra,bs as qa,bt as _a,bu as Ne,Y as Wa,bv as we,bw as Ce,bx as Mt,by as Fa,g as Tt,f as Pt,bz as La}from"./index-n0iu7hmp.js";import{m as Te,M as Ka,S as Na,C as Qa,H as Ua,a as Ga,T as Oa,X as Ha,b as Da,B as Va,c as Ya,d as It,e as Ja,f as Ie,g as Xa,h as Za,i as es,j as ts,k as Je,l as pe,L as as,P as ss,n as At,o as zt,W as ns,p as is,q as rs,r as os,A as cs,s as ls,t as ds,u as us,v as hs,w as ps,x as gs,y as xs,z as fs,D as ms,E as ys,F as bs,G as vs,I as ws,J as Cs,K as js,N as ks,O as Qe,Q as $s,R as Ss,U as Ms,V as Et,Y as Bt,Z as Ts,_ as Ps,$ as Is,a0 as As,a1 as Rt,a2 as zs}from"./CollectionCarousel-ToGb_noU.js";import{l as Es,n as Bs,f as Rs,o as qs,h as _s,A as Ws}from"./authorizations-DkuKVqPp.js";import{p as qt,g as Fs,h as Ue}from"./buy-ae9eqPro.js";import{w as Ls,S as Ge,b as Ks,G as Ns}from"./buy-gasless-FJedqUxy.js";import{u as Qs,M as Us,R as je,r as Gs,c as Os,g as Hs,a as Ds,p as _t,b as Oe}from"./useCreditPacks-DTcqWFc9.js";import{i as Vs,a as Ys}from"./errors-Cr-V9DJT.js";import{E as Js}from"./ErrorNotice-OMXWYAuR.js";import"./dcl-schemas-DJyDUFXH.js";import"./sentry-D26A9rSF.js";import"./ethers-CU4Cxyvz.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-Hg2a-HsY.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new r.Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="91310df3-5127-4303-ac08-f334eebc9540",r._sentryDebugIdIdentifier="sentry-dbid-91310df3-5127-4303-ac08-f334eebc9540")}catch{}})();const Xs=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -745,4 +745,4 @@ import{j as e,L as Qt,r as T,b as xa,a as fa}from"./react-C9neZ7Uo.js";import{s
|
|
|
745
745
|
margin-top: 0;
|
|
746
746
|
}
|
|
747
747
|
`;function Ve(r){if(Vs(r))return a("errors.rejected");const d=(r.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Me.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const ai=12e4;function si(r){const d=[];return r.unavailable.length&&d.push(a("cart.drop.unavailable",{count:r.unavailable.length})),r.own.length&&d.push(a("cart.drop.own",{count:r.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Ye=r=>r.reduce((d,k)=>d+k.priceCredits*k.quantity,0),Se=r=>r.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1})));function yi(){var Ct;va({title:a("nav.cart"),noindex:!0});const r=H(t=>t.items),d=H(t=>t.remove),k=H(t=>t.increment),$=H(t=>t.decrement),B=H(t=>t.clear),U=H(t=>t.restore),O=H(t=>t.setFittingOpen),A=jt(t=>t.items),J=jt(t=>t.toggle),{session:n,signIn:G}=wa(),Yt=Ca(),ge=Qs().packs.slice(0,Us);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Jt=r.some(t=>t.category!=="emote"),{data:Ae}=ja({queryKey:["upsell-listings"],queryFn:()=>La({first:40}),staleTime:6e4}),{data:j}=ka(n),b=$a(),X=xa(),{state:R}=fa(),[Xt,le]=T.useState(null),[Ze,xe]=T.useState(null),[Zt,q]=T.useState(!1),[_,D]=T.useState(null),et=T.useRef(0),[h,S]=T.useState(null),{data:fe}=Sa(n),{data:de}=Ma(!0),[ze,tt]=T.useState(""),ue=T.useRef(null),at=Ta(r),st=t=>$t(at[t.id]),Ee=r.filter(st),nt=r.length>0&&Ee.length===0,ea=Ee.reduce((t,s)=>t+s.priceCredits*s.quantity,0),ta=r.reduce((t,s)=>t+s.quantity,0),aa=Ee.reduce((t,s)=>t+s.quantity,0),it=_?_.liveTotalCredits:ea,sa=new Set(r.map(t=>t.id)),rt=((Ae==null?void 0:Ae.items)??[]).filter(t=>!sa.has(t.id)).slice(0,12),na=new Map(_==null?void 0:_.buyable.map(t=>[t.item.id,t])),me=(j==null?void 0:j.credits)??0,Be=it*10,ia=de?kt(Be,de):0n,Re=Qe({priceCents:Be,priceManaWei:ia,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),ra=t=>t.flatMap(s=>{const c=Oe(s);return c.kind==="store"?[c.mint]:[]}),oa=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),ca=Ba,la=t=>qa(t.contractAddress,String(t.itemId));function ye(t){t(),D(null),xe(null),le(null)}function da(){S(null),q(!1)}function ot(t){const s=Ye(t),c=Math.max(0,s-me),o=ge.find(u=>u.credits>=c)??ge[ge.length-1];tt(o.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:c}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:c}),q(!1)}async function qe(t){if(!n||t.length===0)return;const s=Se(t),c=s.map(m=>({...m.item,priceCredits:m.priceCredits})),o=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),u=[];let v="authorize";const g=new Set,M=new Set,L=new Set,W=[];let w=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[],z=Hs(s,qt);let K=0;for(const p of z){S({phase:"processing",stage:"reserving",step:K+1,total:s.length});try{const{credit:f,maxCreditedValue:y}=await _a(n.identity,p.units.map(Ds));p.units.forEach((Q,ie)=>{u.push({salt:f.id,itemId:Q.item.id}),m.push({...p.drafts[ie],credits:[f],maxCreditedValue:y})}),K+=p.units.length}catch(f){if(Ys(f)){if(u.length){try{await Ne(n.identity,[...new Set(u.map(y=>y.salt))])}catch(y){re(y,{flow:"cart_checkout",step:"release"})}b.invalidateQueries({queryKey:["usd-balance"]})}ot(t);return}throw f}}u.length&&b.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const N=Fs(m).length,te=p=>N>1?{current:p,total:N}:void 0,F=(p,f)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:te(f)}),C=p=>p<N?F("awaiting-signature",p+1):F("settling",N);F("awaiting-signature",1);let x=[];const P=new Map,se=async p=>{const f=await Promise.allSettled(p.map(y=>Ls(y)));return f.forEach((y,Q)=>{const ie=P.get(p[Q])??[];y.status==="fulfilled"?(ie.forEach(We=>M.add(We)),W.push(p[Q])):y.reason instanceof Ge||ie.forEach(We=>L.add(We))}),f.flatMap(y=>y.status==="rejected"?[y.reason]:[])};if(Es())try{let p=0;x=await Ks({purchases:m,buyer:n.address,signer:n.signer,identity:n.identity,onSigned:()=>F("settling",Math.min(p+1,N)),onBroadcast:({txHash:y,salts:Q})=>{p+=1,P.set(y,Q),Q.forEach(ie=>g.add(ie))},onGroupSettling:({settled:y})=>F("settling",y)});const f=await se(x);if(f.length&&!f.some(y=>y instanceof Ge))throw f[0];w=!0}catch(p){if(p instanceof Ge)throw await se([...P.keys()]),p;if(!(p instanceof Ns)||!Wa(n.providerType))throw p;x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:f})=>f.forEach(y=>g.add(y)),onSettled:({txHash:f,salts:y})=>{y.forEach(Q=>M.add(Q)),W.push(f)},onReverted:({salts:f})=>f.forEach(y=>L.add(y))})}else x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(f=>g.add(f)),onSettled:({txHash:p,salts:f})=>{f.forEach(y=>M.add(y)),W.push(p)},onReverted:({salts:p})=>p.forEach(f=>L.add(f))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...we(c),payment_type:"credits",no_crypto_step:w,transaction_hash:x[0]??null}),Bt(b);const ve=ue.current;ue.current=null,S(null),q(!1);const ne={items:o,txHash:x[0]??void 0,txHashes:x,settled:!0,...ve?{creditsAdded:ve}:{}};X("/success",{state:ne,replace:!0})}catch(m){Ce(m)||re(m,{flow:"cart_checkout",step:v,cart_size:t.length});const z=new Set([...g].filter(x=>!L.has(x))),{toRelease:K,boughtItemIds:N}=_t({reservations:u,spent:z,settled:M}),te=[...z].some(x=>!M.has(x)),F=c.filter(x=>N.includes(x.id)),C=c.filter(x=>!N.includes(x.id));if(V(Ce(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Mt(m),value_usd:St(C.reduce((x,P)=>x+P.priceCredits,0)),cart_size:s.length,partial:F.length>0}),K.length)try{await Ne(n.identity,K)}catch(x){re(x,{flow:"cart_checkout",step:"release"})}if(b.invalidateQueries({queryKey:["usd-balance"]}),F.length>0){N.forEach(x=>d(x)),D(null),Bt(b),V("Shop Completed Purchase",{...we(F),payment_type:"credits",no_crypto_step:w,transaction_hash:W[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:te}),q(!1);return}S({phase:"error",message:te?void 0:Ve(m),heldCredits:te})}}function ct(t,s){b.invalidateQueries({queryKey:["usd-balance"]}),b.invalidateQueries({queryKey:["detail-trade"]}),b.invalidateQueries({queryKey:["shop-item"]}),b.invalidateQueries({queryKey:["owned-token"]}),b.invalidateQueries({queryKey:["public-token"]}),b.invalidateQueries({queryKey:["item-resales"]}),b.invalidateQueries({queryKey:["shop-items"]}),b.invalidateQueries({queryKey:["catalog-items"]}),b.invalidateQueries({queryKey:["my-assets"]}),b.invalidateQueries({queryKey:["purchases"]}),b.invalidateQueries({queryKey:["owned-item-count"]}),b.invalidateQueries({queryKey:["overview-listings"]}),b.invalidateQueries({queryKey:["upsell-listings"]});const c=ue.current;ue.current=null,S(null),q(!1);const o={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};X("/success",{state:o,replace:!0})}function lt(t,s){Ce(t)||re(t,{flow:s,step:"submit"}),V(Ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Mt(t)}),S({phase:"error",message:Ve(t)}),q(!1)}async function ua(t,s,c){const o=Tt(Pt.MANAToken,s),u=Tt(Pt.CreditsManager,s);await _s({auth:{kind:Ws.Allowance,contractAddress:o.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:c})}async function dt(){if(de)return de;try{return await b.fetchQuery(Ra())}catch{return}}async function ha(t){const s=Se(t).reduce((v,g)=>v+g.usdCents,0),o=(fe??0n)>0n?await dt():de,u=o?kt(s,o):0n;return{totalCents:s,manaWei:u}}async function ut(t,s){const c=Ye(t),{totalCents:o,manaWei:u}=await ha(t),v=Qe({priceCents:o,priceManaWei:u,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n});if(s&&v.options.some(g=>g.method===s)){if(s==="credits"){qe(t);return}const g=xt(v,s);await pt(ht(s,t),g,()=>s==="mana"?void ft(t,g):void mt(t,o,u));return}if(v.options.some(g=>g.method==="mana"||g.method==="combined")){S({phase:"choose",lines:t,totalCents:o,manaWei:u}),q(!1);return}if(j!=null&&j.credits<c){ot(t);return}qe(t)}function _e(t){return Qe({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[he,be]=T.useState(null);function ht(t,s){const c=new Map;for(const o of s){const u=Ts(t,Oe(o));c.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...c.values()]}async function pt(t,s,c){const o=[];for(const{spender:u,chainId:v}of t){const g=Bs(v,u),M=n?await Rs(g,n.address,s).catch(()=>!0):!0;qs(n==null?void 0:n.providerType,M)&&o.push(g)}if(o.length===0){c();return}q(!1),gt(o,0,c)}function gt(t,s,c){be({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?gt(t,s+1,c):c()})}function xt(t,s){var c;return((c=t.options.find(o=>o.method===s))==null?void 0:c.manaWei)??0n}function pa(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:o}=h;if(t==="credits"){qe(s);return}const u=xt(_e(h),t);pt(ht(t,s),u,()=>t==="mana"?void ft(s,u):void mt(s,c,o))}async function ft(t,s){if(!n||t.length===0)return;const c=Se(t),o=c.map(g=>({...g.item,priceCredits:g.priceCredits})),u=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),v=()=>S({phase:"processing",stage:"settling",step:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const g=await Ps({trades:oa(c),mints:ra(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>d(M.item.id)),D(null),V("Shop Completed Purchase",{...we(o),payment_type:"mana",transaction_hash:g[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(u,g)}catch(g){lt(g,"buy_cart_mana")}}async function mt(t,s,c){if(!n||t.length===0)return;const o=Se(t),u=o.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),g=Is(o.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),M=[],L=new Set,W=new Set;S({phase:"processing",stage:"reserving",step:1,total:o.length});try{const w=o.map(Oe),m=[],z=new Map,K=new Map;for(let C=0;C<o.length;C++){const x=o[C],P=w[C],se=g[C],ve=As(Math.max(0,x.usdCents-se),s,c);let ne;if(se<=0)ne=Rt(P,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:o.length});const f=x.item,{credit:y,maxCreditedValue:Q}=await Fa(n.identity,se,P.kind==="trade"?P.trade.id:void 0,f.contractAddress&&f.itemId!=null?{contractAddress:f.contractAddress,itemId:String(f.itemId)}:void 0);M.push({salt:y.id,itemId:f.id}),ne=Rt(P,[y],Q)}const p=qt(ne);z.set(p,(z.get(p)??0n)+ve),K.has(p)||K.set(p,m.length),m.push(ne)}M.length&&b.invalidateQueries({queryKey:["usd-balance"]});for(const[C,x]of z){const P=K.get(C);P==null||x<=0n||(m[P]={...m[P],maxCreditedValue:(BigInt(m[P].maxCreditedValue)+x).toString()})}const N=[...z.values()].reduce((C,x)=>C+x,0n);await ua(n.signer,zs(w[0]),N);const te=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});const F=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:te,onBroadcast:({salts:C})=>C.forEach(x=>L.add(x)),onReverted:({salts:C})=>C.forEach(x=>W.add(x))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...we(u),payment_type:"credits_and_mana",transaction_hash:F[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(v,F)}catch(w){const{toRelease:m}=_t({reservations:M,spent:new Set([...L].filter(z=>!W.has(z))),settled:new Set});m.length&&Ne(n.identity,m).catch(()=>{}),M.length&&b.invalidateQueries({queryKey:["usd-balance"]}),lt(w,"buy_cart_combined")}}async function Z(t){if(!n){Et({type:"cart-checkout"}),G();return}const s=H.getState().items.filter(st);if(s.length===0)return;le(null),xe(null),q(!0);const c=s.reduce((o,u)=>o+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:c,cart_value_usd:St(c),has_sufficient_credits:me>=c});try{const o=await Gs(s,n.address,ca,await dt(),la),u=[...o.unavailable,...o.own];if(u.length&&(u.forEach(v=>d(v.id)),xe(si(o))),o.buyable.length===0){le(a("cart.error.noneAvailable")),D(null);return}if(o.orderChanged){D(o),et.current=Date.now();return}await ut(o.buyable,t)}catch(o){re(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),le(Ve(o))}finally{q(!1)}}async function yt(){if(_){if(!n){Et({type:"cart-checkout"}),G();return}if(Date.now()-et.current>ai){D(null),xe(null),await Z();return}le(null),ut(_.buyable)}}async function ga(){if(ze){try{sessionStorage.setItem(je,JSON.stringify(H.getState().items))}catch{}q(!0);try{const t=await Os(ze,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}X("/credits")}catch(t){try{sessionStorage.removeItem(je)}catch{}re(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const bt=T.useRef(!1);T.useEffect(()=>{if(!n||bt.current||!$s("cart-checkout"))return;bt.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const vt=T.useRef(!1);T.useEffect(()=>{if(!(R!=null&&R.resumeCheckout)||vt.current)return;vt.current=!0,ue.current=R.creditsAdded??null;try{const s=sessionStorage.getItem(je);if(s){sessionStorage.removeItem(je);const c=JSON.parse(s);Array.isArray(c)&&c.length&&U(c)}}catch{}b.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[R==null?void 0:R.resumeCheckout]);const wt=T.useRef(!1);T.useEffect(()=>{if(!(R!=null&&R.startCheckout)||wt.current)return;wt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[R==null?void 0:R.startCheckout]);const ee=Zt||(h==null?void 0:h.phase)==="processing";return r.length===0&&!h?e.jsx(Ft,{children:e.jsxs(Kt,{children:[e.jsxs(Lt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(yn,{children:e.jsx(Pa,{variant:"light",testId:"cart-empty",icon:Ia,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(Ft,{children:[e.jsxs(Kt,{children:[e.jsxs(Lt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(gn,{children:[e.jsxs(xn,{children:[e.jsxs(fn,{children:[e.jsx(bn,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx(vn,{children:a("cart.panelTitle",{count:ta})}),Jt?e.jsxs(wn,{onClick:()=>O(!0),disabled:ee,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(mn,{children:[e.jsx(Cn,{children:r.map(t=>{const s=na.get(t.id),c=s?s.priceCredits:t.priceCredits,o=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,v=t.quantity,g=typeof t.available=="number"&&v>=t.available,M=c*v,L=Aa(t),W=!!L&&!!A[L],w=za(t),m=at[t.id],z=!$t(m),K=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(jn,{"data-unavailable":z||void 0,children:[e.jsxs(kn,{"data-thumb":!0,children:[w?e.jsx($n,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Sn,{"data-check":!0,"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(Mn,{children:[e.jsxs(Tn,{"data-desc":!0,children:[w?e.jsx(In,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Pn,{title:t.name,children:t.name}),t.creator?e.jsx(An,{address:t.creator,linkToProfile:!0}):null,Yt&&u?e.jsxs(Kn,{"data-testid":"cart-creator-tag",children:[e.jsx(Nn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(zn,{children:z?e.jsxs(Fn,{children:[e.jsx(Ln,{name:"warning-fill",size:24}),K]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(En,{children:[e.jsx(Nt,{onClick:()=>ye(()=>$(t.id)),disabled:ee||v<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(Bn,{children:v}),e.jsx(Nt,{onClick:()=>ye(()=>k(t.id)),disabled:ee||g,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs(Rn,{children:[e.jsx(qn,{})," ",e.jsx(Ke,{credits:M}),o?e.jsx(_n,{children:e.jsx(Ke,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Wn,{children:[L?e.jsx(Qn,{"data-on":W||void 0,onClick:()=>J(t),"aria-label":W?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:W?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:W?"heart-solid":"heart"})}):null,e.jsx(Un,{onClick:()=>ye(()=>d(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(Y,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(Gn,{children:e.jsx("button",{className:"link",onClick:()=>ye(B),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(On,{children:[e.jsx(Hn,{children:a("cart.purchaseSummary")}),e.jsxs(Dn,{children:[e.jsxs(Vn,{children:[e.jsx(Yn,{children:a("cart.totalItems",{count:aa})}),e.jsx(Xn,{children:e.jsxs(Jn,{children:[e.jsx(Zn,{})," ",e.jsx(Ke,{credits:it})]})})]}),e.jsx(Gt,{options:Re.options,totalCents:Be,shortfall:Re.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Re.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||nt,onPay:t=>void(_?yt():Z(t)),creditsFallback:{label:ee?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?yt():Z())}}),nt?e.jsx($e,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx($e,{className:"muted",children:a("cart.signInHint")}),_?e.jsx($e,{className:"muted",children:a("cart.priceChanged")}):null,Ze?e.jsx($e,{className:"muted",children:Ze}):null,e.jsx(ei,{message:Xt})]})]})]})]}),rt.length>0?e.jsx(ti,{children:e.jsx(Ss,{title:a("cart.youMightAlsoLike"),items:rt})}):null,he&&n?e.jsx(Ms,{auth:he.auth,signer:n.signer,step:{index:he.index,total:he.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Te,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=he;be(null),t()},onCancel:()=>be(null),onClose:()=>be(null)}):null,h?e.jsx(dn,{phase:h.phase,balanceCredits:me,heldCreditsCount:((Ct=j==null?void 0:j.held)==null?void 0:Ct.credits)??null,onClose:da,stage:h.phase==="processing"?h.stage:void 0,step:h.phase==="processing"?h.step:void 0,total:h.phase==="processing"?h.total:void 0,isSelfCustody:Ea(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?_e(h).options:void 0,shortfall:h.phase==="choose"?_e(h).manaShortfall:void 0,onPay:pa,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?Ye(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:ge,selectedPack:ze,onSelectPack:tt,onBuyPacks:()=>void ga(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{yi as Cart};
|
|
748
|
-
//# sourceMappingURL=Cart-
|
|
748
|
+
//# sourceMappingURL=Cart-CSFWNK61.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,d as se,b as oe}from"./react-
|
|
1
|
+
import{j as e,r as h,d as se,b as oe}from"./react-BavsWmnY.js";import{t as b,s as m,h as re,I as ae,n as ie,b as r,a0 as q,w as F,bF as ne,bG as le,c as ce,bU as de,m as me,o as ue,at as pe,L as fe,S as G,M as he,bH as xe,bV as be}from"./index-n0iu7hmp.js";import{E as ge}from"./ErrorNotice-OMXWYAuR.js";import{d as ye,P as ve,C as je,a as E,b as we,S as Ce}from"./collectionPage.styles-_TS1Qp9v.js";import{u as ke}from"./useStore-CMQwKTKX.js";import{u as Se,t as U,R as $e,j as Ne,k as Ee,l as Ie,m as Fe,n as Me,o as Re,p as Te,v as _e,q as Ae,r as Pe,M as Le,s as De}from"./browseLayout.styles-auYUxt_L.js";import{L as Be}from"./LoadMore-CQ_nr3wh.js";import{u as ze}from"./useInfiniteGrid-Dj3j7mQc.js";import{u as Oe,s as Ge}from"./search-empty-DN4dEw7x.js";import{S as Ue}from"./categories-CdWn6WdC.js";import{G as We}from"./grid.styles-D1BFIqWD.js";import"./dcl-schemas-DJyDUFXH.js";import"./sentry-D26A9rSF.js";import"./ethers-CU4Cxyvz.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-CZXtZ0wH.js";import"./skeleton.styles-DJ1-rE_6.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="1826f137-e610-4a16-ba73-56f1e82b5013",o._sentryDebugIdIdentifier="sentry-dbid-1826f137-e610-4a16-ba73-56f1e82b5013")}catch{}})();const qe=m.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -131,4 +131,4 @@ import{j as e,r as h,d as se,b as oe}from"./react-C9neZ7Uo.js";import{t as b,s a
|
|
|
131
131
|
background: ${j.blackBtn};
|
|
132
132
|
}
|
|
133
133
|
`;function lt({address:o}){var d,n;const{data:s}=q(o);if(!o)return null;const i=(s==null?void 0:s.name)||F(o),l=(n=(d=s==null?void 0:s.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${ce.profileUrl}/${o}`,u=ne(le({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??o}));return e.jsxs(at,{"data-testid":"creator-card",children:[l?e.jsx(W,{src:l,alt:"",loading:"eager",style:{backgroundColor:u}}):e.jsx(W,{as:"span","aria-hidden":!0,style:{backgroundColor:u}}),e.jsx(it,{title:i,children:i}),e.jsx(ot,{value:o,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(o)})}),e.jsx(nt,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const ct=48,dt=["all","on_sale","not_for_sale"];function Et(){var O;const{contractAddress:o}=se(),s=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[l,a]=Oe(i),{category:u,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:M}=l,g=dt.includes(l.status)?l.status:"all",R=t=>a({status:t});Se(`${u}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=te=>{te.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=N}},[w]);const T=x&&!Number.isNaN(Number(x))?Number(x):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?Ue[d]:void 0,K=(U.find(t=>t.key===M)??U[0]).server,A={contractAddress:o,category:u,rarities:n.length?n:void 0,wearableCategories:H,minPriceCredits:T,maxPriceCredits:_,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:V,total:Q,isLoading:k,error:P,hasNextPage:Z,isFetchingNextPage:L,isFetchNextPageError:J,fetchNextPage:X}=ze(["collection-page",A],t=>xe({...A,first:ct,skip:t}),{enabled:!!o}),S=de(V),{data:c}=me({queryKey:["collection-meta",o],queryFn:()=>be(o),enabled:!!o,staleTime:5*6e4}),D=(c==null?void 0:c.name)||r("collection.fallbackTitle");ue({title:c==null?void 0:c.name,description:c!=null&&c.name?r("seo.collection.description",{name:c.name}):void 0});const p=(c==null?void 0:c.creator)||((O=S[0])==null?void 0:O.creator),{data:$}=q(p),Y=($==null?void 0:$.name)||(p?F(p):"");function ee(t){a({category:t,subCategory:null})}function B(t){a({rarities:n.includes(t)?n.filter(N=>N!==t):[...n,t]})}function z(){a(i)}const v=[];(T!=null||_!=null)&&v.push({key:"price",label:r("filter.price"),onRemove:()=>{a({priceMin:"",priceMax:""})}});for(const t of $e)n.includes(t)&&v.push({key:`rarity-${t}`,label:pe(t),onRemove:()=>B(t)});return C&&v.push({key:"smart",label:r("filter.smart"),onRemove:()=>a({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(ve,{"data-testid":"collection-page",children:[e.jsxs(je,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(E,{onClick:()=>s("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}`),children:Y}),e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(we,{children:D})]}),e.jsx(Ze,{name:D,creator:p}),e.jsxs(Ne,{"data-testid":"browse",children:[w?e.jsx(Ee,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(Ce,{children:[e.jsx(lt,{address:p}),e.jsxs(Ie,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(Fe,{children:[e.jsx(Me,{children:r("assets.filters")}),e.jsx(Re,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Te,{children:e.jsx(_e,{category:u,subCategory:d,onCategory:ee,onSub:t=>a({subCategory:t}),priceMin:x,priceMax:f,onPriceMin:t=>a({priceMin:t}),onPriceMax:t=>a({priceMax:t}),rarities:n,onToggleRarity:B,status:g,onStatus:R,smart:C,onSmart:t=>a({smart:t}),hideNames:!0})}),e.jsx(Ae,{children:e.jsx(Pe,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(Le,{children:[e.jsx(De,{sort:M,onSort:t=>a({sort:t}),total:Q,loading:k,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),P?e.jsx(ge,{message:r("collection.error")}):null,!k&&!P&&S.length===0?e.jsx(fe,{testId:"collection-empty",icon:Ge,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(We,{"data-testid":"grid",children:k?e.jsx(G,{count:15}):e.jsxs(e.Fragment,{children:[S.map(t=>e.jsx(he,{item:t},t.id)),L?e.jsx(G,{count:6}):null]})}),e.jsx(Be,{hasNextPage:Z,isFetching:L,isError:J,onLoadMore:()=>void X()})]})]})]})]})}export{Et as Collection,Et as default};
|
|
134
|
-
//# sourceMappingURL=Collection-
|
|
134
|
+
//# sourceMappingURL=Collection-gzCGf9qh.js.map
|