@dcl/shop 1.5.0 → 1.5.1-31366020421.commit-a932959
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-D50vcan8.js → Activity-cvDn0OW7.js} +4 -4
- package/_assets/{AnimatedBackground-Cj9EpqOd.js → AnimatedBackground-Cs97Pw7B.js} +2 -2
- package/_assets/{Assets-Dm36HC3A.js → Assets-tokcK3HS.js} +8 -8
- package/_assets/{Assets.styles-BN60--IX.js → Assets.styles-vGBckZFh.js} +2 -2
- package/_assets/{Authorizations-Bbe2ZDBQ.js → Authorizations-CiL63tzA.js} +2 -2
- package/_assets/{Cart-DYn6HPbr.js → Cart-C8KIfCxW.js} +2 -2
- package/_assets/{CircularProgress-Dnmv1o80.js → CircularProgress-CptlGegD.js} +2 -2
- package/_assets/{Collection-CjjgGrQS.js → Collection-B3jdmrAL.js} +2 -2
- package/_assets/{CollectionCarousel-CE-opnoC.js → CollectionCarousel-iWCZwqCr.js} +3 -3
- package/_assets/{Confetti-CB_-TN9l.js → Confetti-ePaLJz75.js} +4 -4
- package/_assets/{ConstantsUtil-BCnsDBTq.js → ConstantsUtil-DHObKJJf.js} +2 -2
- package/_assets/{ContentClient-BroqC_BC.js → ContentClient-CEoCQFIQ.js} +2 -2
- package/_assets/{Creator-7Yfv-O5x.js → Creator-Bh7pQmzR.js} +2 -2
- package/_assets/{DeploymentBuilder-COWMAjp6.js → DeploymentBuilder-Dyr1BaTj.js} +2 -2
- package/_assets/{ErrorNotice-wkmOXUCs.js → ErrorNotice-CZNCgTxS.js} +2 -2
- package/_assets/{ExchangeController-DcWjBpqs.js → ExchangeController-Ye4z2dHV.js} +2 -2
- package/_assets/{Faq-CA4hGBgd.js → Faq-ClDyJeKJ.js} +2 -2
- package/_assets/{GetCredits-C1jk05TS.js → GetCredits-DMvk1xuG.js} +2 -2
- package/_assets/{Grow-CcOFR0O2.js → Grow-B1EYOuUC.js} +2 -2
- package/_assets/{HelpersUtil-x0q9yjB9.js → HelpersUtil-CsV69Okr.js} +2 -2
- package/_assets/{ItemDetail-Bs-qLZFu.js → ItemDetail-CwgkeLu2.js} +2 -2
- package/_assets/{JumpInIcon-cZDuK4Lg.js → JumpInIcon-CDlTvQHY.js} +2 -2
- package/_assets/LazyEmoteControls-TQfuJfSA.js +3 -0
- package/_assets/{LoadMore-BZI6acD0.js → LoadMore-C1cZ5UNo.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-neDlJJ8w.js → ManaPricingBanner.styles-hxrEwdFB.js} +2 -2
- package/_assets/{MyAssets-DEjyJKXL.js → MyAssets-D0V-c6Ps.js} +3 -3
- package/_assets/{MyFavorites-9-PnpfHx.js → MyFavorites-DignMfYr.js} +2 -2
- package/_assets/{NetworkUtil-DVL7Xu9N.js → NetworkUtil-BdE7VVhP.js} +2 -2
- package/_assets/{NotFound-BDyYbYda.js → NotFound-BXrLGON0.js} +2 -2
- package/_assets/{NotificationsBell-u-VIWywh.js → NotificationsBell-CicwMOI1.js} +2 -2
- package/_assets/{OutfitDetail-D_HFSW_e.js → OutfitDetail-DOcQyo4a.js} +2 -2
- package/_assets/{OutfitPreview-CsF2hEkC.js → OutfitPreview-CKBBVOOY.js} +2 -2
- package/_assets/{OutfitStudio-y556wVuq.js → OutfitStudio-C0kY_Cfy.js} +2 -2
- package/_assets/{StoreSettings-DnLNG_Ka.js → StoreSettings-Dzp3NApk.js} +22 -22
- package/_assets/{Success-B00AAChl.js → Success-sRAi_kQ5.js} +2 -2
- package/_assets/{SwapController-BlAUBM9b.js → SwapController-BroITATw.js} +2 -2
- package/_assets/{Tooltip-D7BUz9Sv.js → Tooltip-CCg0T_dV.js} +2 -2
- package/_assets/{TradeService-DsOm5uw9.js → TradeService-CU84Hh9C.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-CcisOnMz.js → W3MFrameProviderSingleton-D3f-L0Hp.js} +4 -4
- package/_assets/{WebCryptoP256-B_1-pjua.js → WebCryptoP256-BMdZxA42.js} +2 -2
- package/_assets/{authorizations-myrKPD1A.js → authorizations-Cf4bU_Bf.js} +2 -2
- package/_assets/{basic-DZNTCsO4.js → basic-B8woqKQy.js} +2 -2
- package/_assets/{biconomy-pXPYefnS.js → biconomy-Nt7X_Ugj.js} +2 -2
- package/_assets/{browser-CET7W5is.js → browser-CAIwVClS.js} +2 -2
- package/_assets/{browser-ponyfill-Bv6ATZck.js → browser-ponyfill-Bu9tKfUl.js} +2 -2
- package/_assets/{builder-BdgH0BgM.js → builder-BIrWDvyA.js} +2 -2
- package/_assets/{buy-obADexg6.js → buy-D4LpLWxD.js} +2 -2
- package/_assets/{buy-gasless-D8dkO9Jk.js → buy-gasless-CvGSf1b-.js} +2 -2
- package/_assets/{categories-BZabyZ8A.js → categories-DMzQeR7X.js} +2 -2
- package/_assets/{ccip-CI12YOWU.js → ccip-B60QX7d9.js} +2 -2
- package/_assets/{ccip-CGaqhm20.js → ccip-lV_0X038.js} +2 -2
- package/_assets/{chains-BM8zToEd.js → chains-C6YGB_3Y.js} +2 -2
- package/_assets/collectionPage.styles-D32n3MzW.js +33 -0
- package/_assets/{common-nuOYkaHb.js → common-DsdJnAl2.js} +2 -2
- package/_assets/{controller-DBGJ9L27.js → controller-DOQUFDlY.js} +3 -3
- package/_assets/{core-D0C-qqK-.js → core-CJ14e6mG.js} +5 -5
- package/_assets/{createSvgIcon-vJ2m_SdG.js → createSvgIcon-LRSt1gSQ.js} +2 -2
- package/_assets/{custom-BfFlFyk9.js → custom-8xv3rkT5.js} +2 -2
- package/_assets/{data-capture-rNXQJ8Zi.js → data-capture-CcelGNnq.js} +2 -2
- package/_assets/{dcl-schemas-zsu0mTrZ.js → dcl-schemas-C5Zz5LAu.js} +2 -2
- package/_assets/{decimals-D4xl4QFg.js → decimals-DUdMuYU3.js} +2 -2
- package/_assets/{decimals-quYRp8SH.js → decimals-DcbFurR1.js} +2 -2
- package/_assets/{detectExtension-DoCJoOPy.js → detectExtension-Cpzi3LQr.js} +2 -2
- package/_assets/{disposePreview-BE9W7_ar.js → disposePreview-jAXksTVY.js} +2 -2
- package/_assets/{email-CFiP-ip_.js → email-Ds4J8CNM.js} +2 -2
- package/_assets/{embedded-wallet-PbYbuMMZ.js → embedded-wallet-DdaI4VeO.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-C5nLwySz.js → emotion-styled.browser.esm-DArqcfGl.js} +2 -2
- package/_assets/{engine-J1JNmp9O.js → engine-trQ2t9oB.js} +2 -2
- package/_assets/{errors-2UPb-hkl.js → errors-CpeNUYSo.js} +2 -2
- package/_assets/{estimate-l1-fee-BwftZ3CV.js → estimate-l1-fee-B5C6LZqC.js} +2 -2
- package/_assets/{eth_estimateGas-DdmXvVTn.js → eth_estimateGas-DJagw65R.js} +2 -2
- package/_assets/{eth_getStorageAt-CW_qzl7W.js → eth_getStorageAt-Cf-uhtDW.js} +2 -2
- package/_assets/{eth_getTransactionCount-BESG7-Xo.js → eth_getTransactionCount-DuM-yt87.js} +2 -2
- package/_assets/{ethereum-BoIbQ5Uo.js → ethereum-BmbHFZBu.js} +2 -2
- package/_assets/{ethers-Cht1Npa6.js → ethers-CA7SNjfo.js} +2 -2
- package/_assets/{events-BQT4aY54.js → events-Aef6JoI0.js} +2 -2
- package/_assets/{execute-Pf7DweE-.js → execute-DfrNaPfY.js} +3 -3
- package/_assets/{extractIPFS-D2l69R_q.js → extractIPFS-CrKlHy6J.js} +2 -2
- package/_assets/{features-HA9-zgBN.js → features-wV9HnHjb.js} +2 -2
- package/_assets/{fetchTokenMetadata-D8fD5Err.js → fetchTokenMetadata-grMUFCHs.js} +3 -3
- package/_assets/{field.styles-C4G2gSVV.js → field.styles-1KkCaAPE.js} +2 -2
- package/_assets/{fortmatic-Dxx5MUEp.js → fortmatic-DQHGrQiv.js} +2 -2
- package/_assets/{get-bytecode-Ch5mbRJo.js → get-bytecode-D-uZhxhc.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-v-jnHsN8.js → get-ecosystem-wallet-info-BywzukZD.js} +2 -2
- package/_assets/{getBalance-Bjl_9rGE.js → getBalance-BZ6bq-v6.js} +3 -3
- package/_assets/{getInstalledModules-D8N_r1VL.js → getInstalledModules-B44NHLkQ.js} +2 -2
- package/_assets/{getNFT-DhNzYzGs.js → getNFT-C4aMkdIS.js} +2 -2
- package/_assets/{getNFT-DjQEqIhL.js → getNFT-CgOvdivA.js} +3 -3
- package/_assets/{grid.styles-DJA6ds3T.js → grid.styles-BMvDs3g0.js} +2 -2
- package/_assets/{hashTypedData-Dt1_lU4P.js → hashTypedData-BcwDFutq.js} +2 -2
- package/_assets/{hashTypedData-3q-08HPJ.js → hashTypedData-DxvRnpuc.js} +2 -2
- package/_assets/{in-app-CEjpNVMq.js → in-app-CKMzua3I.js} +2 -2
- package/_assets/{in-app-wallet-calls-6tmutwY9.js → in-app-wallet-calls-BRGDWhw2.js} +2 -2
- package/_assets/{index-BLFQZTHC.js → index-4m8QmCJg.js} +2 -2
- package/_assets/{index-Cb6o5QcG.js → index-7natfj2e.js} +2 -2
- package/_assets/{index-DFWrKmpN.js → index-B-1wkiiE.js} +2 -2
- package/_assets/{index-CAlbRphK.js → index-B0OfdLzt.js} +2 -2
- package/_assets/{index-CmXbc7lv.js → index-B4BDVZXQ.js} +2 -2
- package/_assets/{index-CTfbAh5-.js → index-B8W26nTV.js} +2 -2
- package/_assets/{index-DV7gCXRp.js → index-B95f1JWg.js} +2 -2
- package/_assets/{index-BWJrmI8J.js → index-B9nC0765.js} +2 -2
- package/_assets/{index-CRECFzcT.js → index-BLWyZMxU.js} +2 -2
- package/_assets/{index-Rb9tumPW.js → index-BbRTZWpS.js} +2 -2
- package/_assets/{index-BzFuK5se.js → index-BhZ2_HO4.js} +2 -2
- package/_assets/{index-8kZYA2-O.js → index-BiJ3O7rg.js} +4 -4
- package/_assets/{index-CZhMC4kH.js → index-BicgOYPG.js} +2 -2
- package/_assets/{index-DZIVenz3.js → index-BjvNJN1S.js} +2 -2
- package/_assets/{index-Be1DAYcx.js → index-BrF2NZNJ.js} +3 -3
- package/_assets/{index-h2F8pV2S.js → index-BuRIr6bM.js} +2 -2
- package/_assets/{index-D-58ERHc.js → index-BwFuhO4p.js} +2 -2
- package/_assets/{index-CzbPOqEg.js → index-BztYAXq8.js} +2 -2
- package/_assets/{index-DIP_sUCq.js → index-C4JZljr3.js} +2 -2
- package/_assets/{index-eIhHVUKG.js → index-CBkIqIzh.js} +2 -2
- package/_assets/{index-EQSB0K_p.js → index-CD03KIJl.js} +2 -2
- package/_assets/{index-BeL--w3s.js → index-CD3Tvyp1.js} +2 -2
- package/_assets/{index-CQ3l2DcQ.js → index-CJ1DJX7d.js} +2 -2
- package/_assets/{index-JFxZKYjR.js → index-CJuvdPBw.js} +2 -2
- package/_assets/{index-0_zP29oO.js → index-CKDUOdtp.js} +3 -3
- package/_assets/{index-aR5X3dZ-.js → index-CM0Qik5d.js} +3 -3
- package/_assets/{index-C492aOeh.js → index-COD9YfQN.js} +2 -2
- package/_assets/{index-CfNBjwcb.js → index-CPjQtUlr.js} +2 -2
- package/_assets/{index-DbclrA2_.js → index-CR-UxcoC.js} +2 -2
- package/_assets/{index-bx_y7ptf.js → index-CXnr2ZRU.js} +2 -2
- package/_assets/{index-2-pr64VT.js → index-CbYBs_lI.js} +4 -4
- package/_assets/{index-BroOWhEI.js → index-CeacxHNx.js} +2 -2
- package/_assets/{index-C_d7O00s.js → index-CjTfWL_h.js} +2 -2
- package/_assets/{index-Ncd5tqva.js → index-CkRgpj4B.js} +2 -2
- package/_assets/{index-6_hmX3Zn.js → index-CoG-F7qL.js} +2 -2
- package/_assets/{index-BFCjjzWd.js → index-CphwVzYj.js} +2 -2
- package/_assets/{index-6JtqbgZ8.js → index-CxAZOdj4.js} +2 -2
- package/_assets/{index-BCJhCky7.js → index-D-Y_L8VI.js} +2 -2
- package/_assets/{index-Cp3rZqk4.js → index-D3ZrXJPq.js} +2 -2
- package/_assets/{index-g9E_6bSc.js → index-D6Y48D2b.js} +13 -13
- package/_assets/{index-BRAA-IQE.js → index-DCasPMPc.js} +2 -2
- package/_assets/{index-DeBDhSJ4.js → index-DFS-GYVw.js} +2 -2
- package/_assets/{index-Bbzv3wH5.js → index-DJ3GNx2o.js} +3 -3
- package/_assets/{index-C_Z4-Tsf.js → index-DOaQtCHh.js} +2 -2
- package/_assets/{index-SkKQMc9S.js → index-DXHSgICB.js} +2 -2
- package/_assets/{index-B141FaqE.js → index-D_42VeVh.js} +2 -2
- package/_assets/{index-D4jH-gDn.js → index-DaQ3a9bK.js} +2 -2
- package/_assets/{index-fn6ahAcN.js → index-DdBD8Efx.js} +2 -2
- package/_assets/{index-PhgdcTs2.js → index-DgYEe6sB.js} +2 -2
- package/_assets/{index-DX5r_ARn.js → index-DkF9JXA2.js} +2 -2
- package/_assets/{index-DXVk_zOz.js → index-Dsae-V_M.js} +4 -4
- package/_assets/{index-D_BCza3W.js → index-DtVcik1F.js} +2 -2
- package/_assets/{index-BcY3W_FA.js → index-Dzn_RcAk.js} +2 -2
- package/_assets/{index-DP9zIdRT.js → index-ELICr9V3.js} +2 -2
- package/_assets/{index-EzX7B_ff.js → index-J9nzZgE0.js} +2 -2
- package/_assets/{index-D2UcTOTK.js → index-NxxFsKni.js} +2 -2
- package/_assets/{index-CGoL-IM3.js → index-TXjjVhAk.js} +2 -2
- package/_assets/{index-BokOWw7t.js → index-anOEbevI.js} +2 -2
- package/_assets/{index-s5CgRAlM.js → index-c8h2rSai.js} +2 -2
- package/_assets/{index-BYrTj_EQ.js → index-dw5JtGWO.js} +2 -2
- package/_assets/{index-Cj_SbcrU.js → index-iwN6-0mB.js} +2 -2
- package/_assets/{index-CD4bV5HZ.js → index-oMs39cNW.js} +2 -2
- package/_assets/{index-VoCS0qIV.js → index-qDzdSaYE.js} +2 -2
- package/_assets/{index-sOhcwjb_.js → index-r5HgWCvr.js} +2 -2
- package/_assets/{index-Bv3zJuLU.js → index-sy9e4stt.js} +2 -2
- package/_assets/{index-QE9cOzMl.js → index-tMfmrJMR.js} +2 -2
- package/_assets/{index-zopSmgUE.js → index-zEfFWWJb.js} +2 -2
- package/_assets/{index.es-DC8RZ1r0.js → index.es-CcIwV0al.js} +2 -2
- package/_assets/{index.es-Yxw4DEWh.js → index.es-Cdiy2Ygh.js} +5 -5
- package/_assets/{index.es-CZVczq11.js → index.es-kA8dBVzo.js} +2 -2
- package/_assets/{index.es-CbC-Ad3H.js → index.es-wjJuNMyB.js} +2 -2
- package/_assets/{linkAccount-DbIcvZbz.js → linkAccount-DDCQ9xFS.js} +2 -2
- package/_assets/{localBatchGatewayRequest-Br-Wu49v.js → localBatchGatewayRequest-E6Z_my0a.js} +2 -2
- package/_assets/{native-QaB_FNcb.js → native-B100eEAc.js} +2 -2
- package/_assets/{networks-DibksEWV.js → networks-HEvhQVrO.js} +2 -2
- package/_assets/{onramp-DNhBIW9J.js → onramp-Dv0igTYc.js} +2 -2
- package/_assets/{openzeppelin-BMEKK2uZ.js → openzeppelin-mVUqKuFH.js} +2 -2
- package/_assets/{ownerOf-ucIO2Oo9.js → ownerOf-DpdNxuRq.js} +2 -2
- package/_assets/{parseNft-bwiPaC8A.js → parseNft-CQidDVRS.js} +3 -3
- package/_assets/{parseSignature-BRRICXDl.js → parseSignature-1vVodYxh.js} +4 -4
- package/_assets/{parseSignature-ChuWJvud.js → parseSignature-CUOYRnG2.js} +2 -2
- package/_assets/{passkeys-GNVhWiYH.js → passkeys-B0mOmbNs.js} +2 -2
- package/_assets/{pay-with-exchange-BoN9NnNE.js → pay-with-exchange-CyU_DddD.js} +2 -2
- package/_assets/{prepare-contract-call-BhdaU_XX.js → prepare-contract-call-kysjIUih.js} +2 -2
- package/_assets/{qr-overlay-DMmFJkur.js → qr-overlay-ByUzauws.js} +4 -4
- package/_assets/{react-B9n8JCiV.js → react-DjgD1SKK.js} +2 -2
- package/_assets/{receive-edYvLtm6.js → receive-DgjmahOf.js} +2 -2
- package/_assets/{resolveImplementation-SOb_bqu8.js → resolveImplementation-BfYpO2Xr.js} +2 -2
- package/_assets/{resume-buy-C-Hfow0v.js → resume-buy-tRhLQi5l.js} +2 -2
- package/_assets/{rpc-g6VOgRj_.js → rpc-ChasrjIt.js} +2 -2
- package/_assets/{secp256k1-bZiVPGU6.js → secp256k1-BL0YyvsS.js} +2 -2
- package/_assets/{secp256k1-DBTedRgH.js → secp256k1-CWrSytHZ.js} +2 -2
- package/_assets/{secp256k1-D4-wgLzz.js → secp256k1-zC2c4F5w.js} +2 -2
- package/_assets/{send-Bq9XPe8V.js → send-CDtnM64d.js} +2 -2
- package/_assets/{send-batch-transaction-C3ba0zM5.js → send-batch-transaction-BGFbl3wn.js} +2 -2
- package/_assets/{send-eip712-transaction-BsNFy8Qs.js → send-eip712-transaction-CDTqI4NB.js} +3 -3
- package/_assets/{send-gasless-transaction-CxzWwDfD.js → send-gasless-transaction-BNZdEBEz.js} +3 -3
- package/_assets/{send-transaction-Czlff4lG.js → send-transaction-DW48_dHE.js} +3 -3
- package/_assets/{sendMetaTransaction-9dQlFhJ5.js → sendMetaTransaction-CLloXgEL.js} +2 -2
- package/_assets/{sendRawTransaction-CnPt4u94.js → sendRawTransaction-B3WYw0pU.js} +4 -4
- package/_assets/{sentry-C8wiaTF5.js → sentry-BzKl6xa_.js} +3 -3
- package/_assets/{serializeTransaction-0yzgFbSK.js → serializeTransaction-BUAz-bxL.js} +2 -2
- package/_assets/{session-proposal-Bprkv_gG.js → session-proposal-Co3jt5At.js} +2 -2
- package/_assets/{session-request-BqDJ5a3X.js → session-request-SWH4Db01.js} +3 -3
- package/_assets/{sha256-BIQZZb2h.js → sha256-PonHT0Ah.js} +2 -2
- package/_assets/{signing-CeqmWwT_.js → signing-DIktXS4Y.js} +4 -4
- package/_assets/{skeleton.styles-_MnBbAn2.js → skeleton.styles-C2bsI5MR.js} +2 -2
- package/_assets/{socials-DkCfjmn5.js → socials-B3kyjMfP.js} +2 -2
- package/_assets/{styled-cs1xfj_N.js → styled-CzDgNewG.js} +2 -2
- package/_assets/{swaps-x_b1JTpB.js → swaps-DPyCKNrL.js} +2 -2
- package/_assets/{thirdweb-D4vC1WLT.js → thirdweb-aHxQDTTQ.js} +4 -4
- package/_assets/{to-serializable-transaction-D0j52_mt.js → to-serializable-transaction-CKe-_2eq.js} +3 -3
- package/_assets/{totalSupply-K01Q0Vn5.js → totalSupply-ldFglBEL.js} +2 -2
- package/_assets/{transaction-B2jurCc_.js → transaction-CRWzUB2f.js} +2 -2
- package/_assets/{transactionReceipt-CXp_NVxA.js → transactionReceipt-CyGHN5Nk.js} +2 -2
- package/_assets/{transactions-CPs59cEM.js → transactions-BAE0NVef.js} +2 -2
- package/_assets/{useCreditPacks-DJEg-u1J.js → useCreditPacks-C9-tAb2z.js} +2 -2
- package/_assets/{useImportable-Do_H6s5X.js → useImportable-bdeMknzy.js} +2 -2
- package/_assets/{useInfiniteGrid-DvCeqJD2.js → useInfiniteGrid-DVJPBLH3.js} +2 -2
- package/_assets/{useStore-B4y_HkPA.js → useStore-B85xvh3X.js} +3 -3
- package/_assets/{useTheme-bW0U-kEn.js → useTheme-C3PdklT_.js} +2 -2
- package/_assets/{useUrlFilters-D6CPlmy-.js → useUrlFilters-ApGVW6Tp.js} +2 -2
- package/_assets/{utils-BloBOUR4.js → utils-DB7fbA_D.js} +2 -2
- package/_assets/{verifyHash-DF_wkOzi.js → verifyHash-DVr4k5A1.js} +2 -2
- package/_assets/{w3m-modal-CWW3o8Gz.js → w3m-modal-18HE2Yda.js} +2 -2
- package/_assets/{w3m-modal-lc3PaE2r.js → w3m-modal-BHpfF9nw.js} +2 -2
- package/_assets/{wait-for-tx-receipt-Cs_qTDwb.js → wait-for-tx-receipt-CgLDEeGZ.js} +2 -2
- package/_assets/{wallets-B7X87fc5.js → wallets-D9Jg6j5b.js} +6 -6
- package/_assets/{web-connector-CZxusr6b.js → web-connector-BOvWpzjH.js} +4 -4
- package/_assets/{writeContract-B3AMPXHo.js → writeContract-yHFbG1fX.js} +2 -2
- package/_assets/{zora-sepolia-BjfGh2Ub.js → zora-sepolia-DCDyFTJW.js} +2 -2
- package/_assets/{zoraTestnet-Dg6F3Hp1.js → zoraTestnet-9snrjdkb.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/LazyEmoteControls-D8kI2iLE.js +0 -3
- package/_assets/collectionPage.styles-DLXuPy7D.js +0 -33
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{q as Ae,bF as Ee,v as _,l as A,bG as $e,t as s,s as l,x as Le,B as Pe,y as Ne,b as r,an as Te,I as E,bH as ie,bI as ne,bJ as Se,_ as Fe,A as N,bK as Ce,D as De,aF as O,L as Me,bL as He,F as $,bM as qe,bN as W}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-qDzdSaYE.js","_assets/react-DjgD1SKK.js","_assets/index-D6Y48D2b.js","_assets/dcl-schemas-C5Zz5LAu.js","_assets/sentry-BzKl6xa_.js","_assets/ethers-CA7SNjfo.js","_assets/intl-AKLEHPeO.js","_assets/index-l2QjlKjX.css","_assets/useImportable-bdeMknzy.js","_assets/buy-D4LpLWxD.js","_assets/authorizations-Cf4bU_Bf.js","_assets/sendMetaTransaction-CLloXgEL.js","_assets/ManaPricingBanner.styles-hxrEwdFB.js","_assets/Faq-ClDyJeKJ.js","_assets/field.styles-1KkCaAPE.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{q as Ae,bF as Ee,v as _,l as A,bG as $e,t as s,s as l,x as Le,B as Pe,y as Ne,b as r,an as Te,I as E,bH as ie,bI as ne,bJ as Se,_ as Fe,A as N,bK as Ce,D as De,aF as O,L as Me,bL as He,F as $,bM as qe,bN as W}from"./index-D6Y48D2b.js";import{r as g,u as ze,j as t,L as oe,e as Re}from"./react-DjgD1SKK.js";import{u as _e}from"./useImportable-bdeMknzy.js";import{L as Oe}from"./LoadMore-C1cZ5UNo.js";import{u as L}from"./useInfiniteGrid-DVJPBLH3.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import"./dcl-schemas-C5Zz5LAu.js";import"./sentry-BzKl6xa_.js";import"./ethers-CA7SNjfo.js";import"./intl-AKLEHPeO.js";import"./buy-D4LpLWxD.js";import"./authorizations-Cf4bU_Bf.js";import"./sendMetaTransaction-CLloXgEL.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="978ea6f6-d2a6-48aa-8deb-e012e185fbc9",e._sentryDebugIdIdentifier="sentry-dbid-978ea6f6-d2a6-48aa-8deb-e012e185fbc9")}catch{}})();const We=15e3;function Ge(e,n){return e.txHash&&n.txHash?e.txHash===n.txHash:e.txHash||n.txHash?!1:e.status===n.status&&Math.abs(e.createdAt-n.createdAt)<=We}function Ue(e){const n=[...e].sort((i,d)=>d.createdAt-i.createdAt),a=[];for(const i of n){const d=a[a.length-1];d&&Ge(d[d.length-1],i)?d.push(i):a.push([i])}return a.map(i=>{var d;return{id:((d=i.find(o=>o.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(o=>o.createdAt)),status:Be(i),totalCredits:i.reduce((o,h)=>o+h.credits,0),lines:i}})}function Be(e){return e.some(n=>n.status==="PENDING")?"PENDING":e.some(n=>n.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ke(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Qe(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Xe(e){const n=[],a=new Map;for(const i of e){const d=Qe(i);if(!d){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const o=a.get(d);if(o){o.quantity+=1,o.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};a.set(d,h),n.push(h)}return n}function Ve(e,n){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:n?Ae(e.manaWei,n):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Je(e){const a=Ue(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Ve(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})),o=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!o.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...a,...i,...d,...h].sort((c,m)=>m.createdAt-c.createdAt||(c.id<m.id?-1:1))}function Ze(e,n){return n==="all"?e:n==="sales"?e.filter(a=>a.kind==="sale"):e.filter(a=>a.kind==="purchase"||a.kind==="credit"||a.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function et(e){const n=new Map;for(const a of e??[]){const i=ce(a.txHash??"");if(!i)continue;const d=n.get(i);d?d.push(a):n.set(i,[a])}return n}function tt(e,n,a=Date.now()){const i=n.txHash?e.get(ce(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?it(i[0].netCents):null,o=i.filter(c=>!c.available&&c.availableAt>a);if(o.length===0)return{kind:"credited",credits:d};const h=o.reduce((c,m)=>Math.max(c,m.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function it(e){return Ee(e)}function nt(){const e=_(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:n,isLoading:a}=A({queryKey:["listing-count",e],queryFn:()=>$e({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:n==null?void 0:n.total,isLoading:a}}const st="https://cdn.decentraland.org/@dcl/shop/1.5.1-31366020421.commit-a932959/_assets/credits-product-vs4Q6u6l.svg",G=Le`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,at=l.section`
|
|
@@ -375,5 +375,5 @@ import{q as Ae,bF as Ee,v as _,l as A,bG as $e,t as s,s as l,x as Le,B as Pe,y a
|
|
|
375
375
|
color: ${s.colors.softWhite};
|
|
376
376
|
`,bt=l(Pe)`
|
|
377
377
|
margin-top: 12px;
|
|
378
|
-
`,J=q.withComponent(oe),yt=g.lazy(()=>Fe(()=>import("./index-VoCS0qIV.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,vt=["all","purchases","sales"],z="section",re="listings",R="view",jt="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ge(e){const n=Number(e)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function fe({children:e}){const n=g.useRef(null),[a,i]=g.useState(null),d=()=>{var h;const o=(h=n.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return t.jsxs(mt,{ref:n,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,a?Re.createPortal(t.jsx(xt,{style:{top:a.top,left:a.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function wt({item:e}){const n=!!e.contractAddress&&!!e.itemId,a=!!e.tradeId||n,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?qe(e.tradeId):W(e.contractAddress,{itemId:e.itemId}),enabled:a,staleTime:5*6e4}),o=a&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=O({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:[o?t.jsx(K,{}):t.jsx(B,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(E,{name:"cart",size:20})}),t.jsxs(Q,{children:[o?t.jsx(V,{}):t.jsx(X,{title:h,children:h}),e.quantity>1?t.jsx(Y,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(ft,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return m?t.jsx(J,{to:m,"data-link":"true",children:f}):t.jsx(q,{children:f})}function kt({order:e}){const n=Xe(e.lines),a=n.reduce((o,h)=>o+h.quantity,0),i=Ke(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(T,{"data-testid":"purchase-order",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:a})]})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":i,children:d}),t.jsxs(w,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),i==="FAILED"?t.jsx(gt,{children:r("activity.purchaseFailedNote")}):null,t.jsx(U,{children:n.map(o=>t.jsx(wt,{item:o},o.key))})]})}function It({sale:e}){const{data:n,isLoading:a}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>W(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??r("activity.itemFallback"),d=(n==null?void 0:n.thumbnail)??"",o=O({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[a?t.jsx(K,{}):t.jsx(B,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[a?t.jsx(V,{}):t.jsx(X,{title:i,children:i}),t.jsx(Y,{children:r("activity.boughtFrom",{account:xe(e.seller)})})]})]});return t.jsxs(T,{"data-testid":"activity-mana-purchase",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.paidWithMana")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(w,{children:[ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(U,{children:o?t.jsx(J,{to:o,"data-link":"true",children:h}):t.jsx(q,{children:h})})]})}function At({sale:e,payout:n}){const{data:a,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>W(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(a==null?void 0:a.name)??r("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=O({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(K,{}):t.jsx(B,{children:o?t.jsx("img",{src:o,alt:d}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[i?t.jsx(V,{}):t.jsx(X,{title:d,children:d}),t.jsxs(Y,{children:[r("activity.soldTo",{account:xe(e.counterparty)}),n.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(n.availableAt)})}`:""]})]})]});return t.jsxs(T,{"data-testid":"activity-sale",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.saleLabel")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),n.kind==="direct"?t.jsxs(w,{"data-kind":"income",children:["+",ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):n.credits!==null?t.jsxs(w,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Me(n.credits)]}):t.jsx(w,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(U,{children:h?t.jsx(J,{to:h,"data-link":"true",children:c}):t.jsx(q,{children:c})})]})}function Et({order:e}){const n=`$${(e.usdCents/100).toFixed(2)}`,a=Ce(e.status),i=a==="SETTLED"?r("activity.completed"):a==="FAILED"?r("activity.failed"):a==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=_(p=>p.session),o=De(),[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 He(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}$.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?($.info(r("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?($.success(r("activity.resumePaid")),o.invalidateQueries({queryKey:["credit-orders"]})):$.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(T,{"data-testid":"credit-order",children:t.jsxs(S,{children:[t.jsx(ht,{children:t.jsx("img",{src:st,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:n})]})]}),t.jsxs(M,{children:[m?t.jsx(pt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(H,{"data-status":a,children:i}),t.jsxs(w,{"data-kind":a==="UNFINISHED"?void 0:"income",children:[a==="UNFINISHED"?"":"+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function $t({filter:e}){const n={all:{icon:"clock",title:r("activity.emptyAllTitle"),body:r("activity.emptyAllBody")},purchases:{icon:"cart",title:r("activity.emptyPurchasesTitle"),body:r("activity.emptyPurchasesBody")},sales:{icon:"offer",title:r("activity.emptySalesTitle"),body:r("activity.emptySalesBody")}}[e];return t.jsxs(he,{children:[t.jsx(E,{name:n.icon,size:40,color:s.colors.muted2}),t.jsx(pe,{children:n.title}),t.jsx(me,{children:n.body}),e!=="sales"?t.jsx(bt,{as:oe,to:"/items",variant:"white",children:r("notFound.cta")}):null]})}function _t(){const{session:e}=_(),[n,a]=g.useState("all"),[i,d]=ze(),o=i.get(z)===re||i.get(R)===jt;Ne({title:o?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=_e(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||o),p=!!e&&!o&&n!=="sales",x=!!e&&!o&&n!=="purchases",b=L(["purchases",e==null?void 0:e.address],u=>Se(e.address,e.identity,{first:P,skip:u}),{enabled:p}),y=L(["sales",e==null?void 0:e.address],u=>ie(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=L(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=L(["mana-purchases",e==null?void 0:e.address],u=>ie(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:Z}=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}),be=g.useMemo(()=>et(Z),[Z]),{data:ye}=Te(x);if(!e)return t.jsxs(he,{children:[t.jsx(E,{name:"clock",size:40,color:s.colors.muted2}),t.jsx(pe,{children:r("activity.signInTitle")}),t.jsx(me,{children:r("activity.signInBody")})]});const ee=Ze(Je({purchases:p?b.items:[],sales:x?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:ye}),n),ve=p&&(b.isLoading||v.isLoading||j.isLoading)||x&&y.isLoading,te=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&y.isFetchingNextPage,je=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&y.hasNextPage;function we(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&y.hasNextPage&&y.fetchNextPage()}function ke(u){if(a(u),!o)return;const k=new URLSearchParams(i);k.delete(z),k.delete(R),d(k,{replace:!0})}function Ie(){const u=new URLSearchParams(i);u.set(z,re),u.delete(R),d(u,{replace:!0})}return t.jsxs(at,{children:[t.jsx(rt,{children:t.jsx(ot,{children:r("nav.activity")})}),t.jsxs(dt,{role:"tablist","aria-label":r("nav.activity"),children:[vt.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!o&&n===u,"data-active":!o&&n===u,"data-testid":`activity-filter-${u}`,onClick:()=>ke(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(ct,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:Ie,children:[r("activity.migrate.chip"),h?t.jsx(lt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?t.jsx(g.Suspense,{fallback:t.jsx(ut,{"aria-busy":"true"}),children:t.jsx(yt,{})}):ve?t.jsx(se,{children:Array.from({length:5}).map((u,k)=>t.jsx(ae,{},k))}):ee.length===0?t.jsx($t,{filter:n}):t.jsxs(t.Fragment,{children:[t.jsxs(se,{children:[ee.map(u=>u.kind==="purchase"?t.jsx(kt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Et,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx(It,{sale:u.sale},u.id):t.jsx(At,{sale:u.sale,payout:tt(be,u.sale)},u.id)),te?t.jsx(ae,{}):null]}),t.jsx(Oe,{hasNextPage:je,isFetching:te,onLoadMore:we})]})]})}export{_t as Activity};
|
|
379
|
-
//# sourceMappingURL=Activity-
|
|
378
|
+
`,J=q.withComponent(oe),yt=g.lazy(()=>Fe(()=>import("./index-qDzdSaYE.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,vt=["all","purchases","sales"],z="section",re="listings",R="view",jt="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ge(e){const n=Number(e)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function fe({children:e}){const n=g.useRef(null),[a,i]=g.useState(null),d=()=>{var h;const o=(h=n.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return t.jsxs(mt,{ref:n,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,a?Re.createPortal(t.jsx(xt,{style:{top:a.top,left:a.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function wt({item:e}){const n=!!e.contractAddress&&!!e.itemId,a=!!e.tradeId||n,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?qe(e.tradeId):W(e.contractAddress,{itemId:e.itemId}),enabled:a,staleTime:5*6e4}),o=a&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=O({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:[o?t.jsx(K,{}):t.jsx(B,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(E,{name:"cart",size:20})}),t.jsxs(Q,{children:[o?t.jsx(V,{}):t.jsx(X,{title:h,children:h}),e.quantity>1?t.jsx(Y,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(ft,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return m?t.jsx(J,{to:m,"data-link":"true",children:f}):t.jsx(q,{children:f})}function kt({order:e}){const n=Xe(e.lines),a=n.reduce((o,h)=>o+h.quantity,0),i=Ke(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(T,{"data-testid":"purchase-order",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:a})]})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":i,children:d}),t.jsxs(w,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),i==="FAILED"?t.jsx(gt,{children:r("activity.purchaseFailedNote")}):null,t.jsx(U,{children:n.map(o=>t.jsx(wt,{item:o},o.key))})]})}function It({sale:e}){const{data:n,isLoading:a}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>W(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??r("activity.itemFallback"),d=(n==null?void 0:n.thumbnail)??"",o=O({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[a?t.jsx(K,{}):t.jsx(B,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[a?t.jsx(V,{}):t.jsx(X,{title:i,children:i}),t.jsx(Y,{children:r("activity.boughtFrom",{account:xe(e.seller)})})]})]});return t.jsxs(T,{"data-testid":"activity-mana-purchase",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.paidWithMana")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(w,{children:[ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(U,{children:o?t.jsx(J,{to:o,"data-link":"true",children:h}):t.jsx(q,{children:h})})]})}function At({sale:e,payout:n}){const{data:a,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>W(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(a==null?void 0:a.name)??r("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=O({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(K,{}):t.jsx(B,{children:o?t.jsx("img",{src:o,alt:d}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[i?t.jsx(V,{}):t.jsx(X,{title:d,children:d}),t.jsxs(Y,{children:[r("activity.soldTo",{account:xe(e.counterparty)}),n.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(n.availableAt)})}`:""]})]})]});return t.jsxs(T,{"data-testid":"activity-sale",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.saleLabel")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),n.kind==="direct"?t.jsxs(w,{"data-kind":"income",children:["+",ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):n.credits!==null?t.jsxs(w,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Me(n.credits)]}):t.jsx(w,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(U,{children:h?t.jsx(J,{to:h,"data-link":"true",children:c}):t.jsx(q,{children:c})})]})}function Et({order:e}){const n=`$${(e.usdCents/100).toFixed(2)}`,a=Ce(e.status),i=a==="SETTLED"?r("activity.completed"):a==="FAILED"?r("activity.failed"):a==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=_(p=>p.session),o=De(),[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 He(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}$.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?($.info(r("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?($.success(r("activity.resumePaid")),o.invalidateQueries({queryKey:["credit-orders"]})):$.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(T,{"data-testid":"credit-order",children:t.jsxs(S,{children:[t.jsx(ht,{children:t.jsx("img",{src:st,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:n})]})]}),t.jsxs(M,{children:[m?t.jsx(pt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(H,{"data-status":a,children:i}),t.jsxs(w,{"data-kind":a==="UNFINISHED"?void 0:"income",children:[a==="UNFINISHED"?"":"+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function $t({filter:e}){const n={all:{icon:"clock",title:r("activity.emptyAllTitle"),body:r("activity.emptyAllBody")},purchases:{icon:"cart",title:r("activity.emptyPurchasesTitle"),body:r("activity.emptyPurchasesBody")},sales:{icon:"offer",title:r("activity.emptySalesTitle"),body:r("activity.emptySalesBody")}}[e];return t.jsxs(he,{children:[t.jsx(E,{name:n.icon,size:40,color:s.colors.muted2}),t.jsx(pe,{children:n.title}),t.jsx(me,{children:n.body}),e!=="sales"?t.jsx(bt,{as:oe,to:"/items",variant:"white",children:r("notFound.cta")}):null]})}function _t(){const{session:e}=_(),[n,a]=g.useState("all"),[i,d]=ze(),o=i.get(z)===re||i.get(R)===jt;Ne({title:o?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=_e(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||o),p=!!e&&!o&&n!=="sales",x=!!e&&!o&&n!=="purchases",b=L(["purchases",e==null?void 0:e.address],u=>Se(e.address,e.identity,{first:P,skip:u}),{enabled:p}),y=L(["sales",e==null?void 0:e.address],u=>ie(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=L(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=L(["mana-purchases",e==null?void 0:e.address],u=>ie(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:Z}=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}),be=g.useMemo(()=>et(Z),[Z]),{data:ye}=Te(x);if(!e)return t.jsxs(he,{children:[t.jsx(E,{name:"clock",size:40,color:s.colors.muted2}),t.jsx(pe,{children:r("activity.signInTitle")}),t.jsx(me,{children:r("activity.signInBody")})]});const ee=Ze(Je({purchases:p?b.items:[],sales:x?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:ye}),n),ve=p&&(b.isLoading||v.isLoading||j.isLoading)||x&&y.isLoading,te=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&y.isFetchingNextPage,je=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&y.hasNextPage;function we(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&y.hasNextPage&&y.fetchNextPage()}function ke(u){if(a(u),!o)return;const k=new URLSearchParams(i);k.delete(z),k.delete(R),d(k,{replace:!0})}function Ie(){const u=new URLSearchParams(i);u.set(z,re),u.delete(R),d(u,{replace:!0})}return t.jsxs(at,{children:[t.jsx(rt,{children:t.jsx(ot,{children:r("nav.activity")})}),t.jsxs(dt,{role:"tablist","aria-label":r("nav.activity"),children:[vt.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!o&&n===u,"data-active":!o&&n===u,"data-testid":`activity-filter-${u}`,onClick:()=>ke(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(ct,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:Ie,children:[r("activity.migrate.chip"),h?t.jsx(lt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?t.jsx(g.Suspense,{fallback:t.jsx(ut,{"aria-busy":"true"}),children:t.jsx(yt,{})}):ve?t.jsx(se,{children:Array.from({length:5}).map((u,k)=>t.jsx(ae,{},k))}):ee.length===0?t.jsx($t,{filter:n}):t.jsxs(t.Fragment,{children:[t.jsxs(se,{children:[ee.map(u=>u.kind==="purchase"?t.jsx(kt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Et,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx(It,{sale:u.sale},u.id):t.jsx(At,{sale:u.sale,payout:tt(be,u.sale)},u.id)),te?t.jsx(ae,{}):null]}),t.jsx(Oe,{hasNextPage:je,isFetching:te,onLoadMore:we})]})]})}export{_t as Activity};
|
|
379
|
+
//# sourceMappingURL=Activity-cvDn0OW7.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-DjgD1SKK.js";import{s as f}from"./index-D6Y48D2b.js";import"./dcl-schemas-C5Zz5LAu.js";import"./sentry-BzKl6xa_.js";import"./ethers-CA7SNjfo.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]="05a43e80-d48c-49ab-9e72-3f6e232cfa16",e._sentryDebugIdIdentifier="sentry-dbid-05a43e80-d48c-49ab-9e72-3f6e232cfa16")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.5.1-31366020421.commit-a932959/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.5.1-31366020421.commit-a932959/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -95,4 +95,4 @@ void main() {
|
|
|
95
95
|
width: 100%;
|
|
96
96
|
height: 100%;
|
|
97
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-
|
|
98
|
+
//# sourceMappingURL=AnimatedBackground-Cs97Pw7B.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as f,b as Ue,j as e,u as et}from"./react-B9n8JCiV.js";import{u as tt}from"./useUrlFilters-D6CPlmy-.js";import{u as nt,S as Re,R as st,F as it,e as ot}from"./categories-BZabyZ8A.js";import{c as q,r as at,aK as rt,aL as lt,aR as ct,a as dt,l as ht,ch as pt,ci as ft,s as i,t,v as Oe,aA as ut,D as mt,L as Ce,b as n,z as xt,I as E,A as O,cj as le,ax as gt,Z as oe,aH as Me,aP as yt,aO as bt,y as De,an as Ge,q as Ze,w as wt,ac as Ct,ap as Fe,aq as J,aZ as vt,bD as jt}from"./index-g9E_6bSc.js";import{R as $t,S as kt,a as St,D as Et,b as Tt,C as _t,c as Lt,F as Rt,d as Mt,e as Ft,M as It,u as Nt,g as At,v as zt,E as Bt,h as Wt,f as Pt,i as Ht,j as Ut}from"./Assets.styles-BN60--IX.js";import{L as Ot}from"./LoadMore-BZI6acD0.js";import{u as Dt}from"./useInfiniteGrid-DvCeqJD2.js";import{E as Gt}from"./ErrorNotice-wkmOXUCs.js";import{d as Zt}from"./dcl-schemas-zsu0mTrZ.js";import{s as qt,G as Vt,w as Kt,S as Qt}from"./buy-gasless-D8dkO9Jk.js";import{s as Jt,j as Xt}from"./buy-obADexg6.js";import{f as Yt}from"./errors-2UPb-hkl.js";import{J as en,C as tn,B as ve}from"./ethers-Cht1Npa6.js";import{n as nn}from"./Tooltip-D7BUz9Sv.js";import{G as sn}from"./grid.styles-DJA6ds3T.js";import"./skeleton.styles-_MnBbAn2.js";import"./sentry-C8wiaTF5.js";import"./intl-AKLEHPeO.js";import"./authorizations-myrKPD1A.js";import"./sendMetaTransaction-9dQlFhJ5.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]="bbf8c3fd-58a4-4fac-9541-0a2c5b685d5e",s._sentryDebugIdIdentifier="sentry-dbid-bbf8c3fd-58a4-4fac-9541-0a2c5b685d5e")}catch{}})();function X(s){const o=s.source??"item",a=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${a}`}const V="100000000000000000000",qe=2,ae=15,on=/^[a-zA-Z0-9]+$/;function Ie(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:on.test(o)?o.length<qe?{ok:!1,reason:"too-short"}:o.length>ae?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function an(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,ae)}const rn=["function available(string _subdomain) view returns (bool)"],Ne={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function ln(){return q.chainId===Number(Zt.ChainId.MATIC_MAINNET)?Ne.mainnet:Ne.sepolia}async function cn(s,o={}){var m;const{rpc:a,address:d}=ln(),h=new en(a),u=new tn(d,rn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${a}`);const l=await u.available(s);if((m=o.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const dn="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 je 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 hn(s){return ct(V,s)}async function pn(s,o,a={}){var m;const d=a.chainId??q.chainId,h=a.provider??"across",u=`${q.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await dt(u,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function fn(s,o){const a=ve.from(s.availableAmount),h=ve.from(V).sub(a);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Xt(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 un(s,o={}){const a=dn,d=o.intervalMs??1e4,h=o.maxAttempts??60;let u={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const m=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${s}`);if(m.ok){const c=await m.json(),g=(c.status??"pending").toLowerCase(),p=c.fillTx??c.fillTxnRef??null,y=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(g==="filled")return{status:"filled",destinationTxHash:p,actionsSucceeded:y};if(g==="refunded"||g==="expired")return{status:g,destinationTxHash:null,actionsSucceeded:!1};u={status:"pending",destinationTxHash:p,actionsSucceeded:y}}}catch{}l<h-1&&await new Promise(m=>setTimeout(m,d))}return u}async function mn(s){const{name:o,identity:a,signer:d}=s,h=p=>{var y;try{(y=s.onProgress)==null||y.call(s,p)}catch{}},u=s.chainId??q.chainId,l=s.provider??"across",m=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,g="unconfirmed";console.info("[names] register start",{name:o,buyer:m,chainId:u,provider:l}),h("preparing");try{const p=await at(u),y=hn(p);console.info("[names] step 1/6 sized reservation",{usdCents:y,manaRate:p});const j=await pn(a,o,{chainId:u,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 w=await rt(a,y);if(c=w.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:w.credit.id,maxCreditedValue:w.maxCreditedValue}),ve.from(w.maxCreditedValue).lt(V))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const $=fn(w.credit,j);let C;try{C=await qt({chainId:u,buyer:m,signer:d,args:$})}catch(x){if(!(x instanceof Vt))throw x;if(x.reason==="relayer-unreachable"){g="unobservable";const k=new $e;throw k.cause=x,k}C=await Jt(u,$,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:C}),h("confirming"),await Kt(C),g="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:C}),l==="across"){h("registering");const x=await un(C,s.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:C};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:C}),{status:"pending",originTxHash:C};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new je;return{status:"registered",originTxHash:C,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:C}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:o,buyer:m,originState:g}),p instanceof Qt)return{status:"pending",originTxHash:p.txHash};if(c&&g==="unconfirmed"&&await lt(a,[c]).catch(()=>{}),p instanceof ke||p instanceof je||p instanceof $e)throw p;const y=new Error(Yt(p,"Couldn't register the name. Please try again.",{sale:!0}));throw y.cause=p,y}}function xn(){const{data:s}=ht({queryKey:["feature-flag","shop-names"],queryFn:()=>pt(ft.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const gn=60,yn=700,bn=25;function wn(s){if(!s)return[];const o=[];for(let a=1;a<=s.length;a++)o.push({text:s.slice(0,a),delay:gn});o[o.length-1]={text:s,delay:yn};for(let a=s.length-1;a>=1;a--)o.push({text:s.slice(0,a),delay:bn});return o}function Cn(s){return s.flatMap(wn)}function vn(s,o){const a=f.useMemo(()=>Cn(s),[s]),[d,h]=f.useState(0);return f.useEffect(()=>{if(!o||a.length===0)return;const u=setTimeout(()=>h(l=>(l+1)%a.length),a[d%a.length].delay);return()=>clearTimeout(u)},[d,o,a]),!o||a.length===0?"":a[d%a.length].text}const jn="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",$n="https://cdn.decentraland.org/@dcl/shop/1.5.0/_assets/name-verified-oGwQ3ntb.svg",kn="#34fee6",Sn=i.div`
|
|
1
|
+
import{r as f,b as Ue,j as e,u as et}from"./react-DjgD1SKK.js";import{u as tt}from"./useUrlFilters-ApGVW6Tp.js";import{u as nt,S as Re,R as st,F as it,e as ot}from"./categories-DMzQeR7X.js";import{c as q,r as at,aK as rt,aL as lt,aR as ct,a as dt,l as ht,ch as pt,ci as ft,s as i,t,v as Oe,aA as ut,D as mt,L as Ce,b as n,z as xt,I as E,A as O,cj as le,ax as gt,Z as oe,aH as Me,aP as bt,aO as yt,y as De,an as Ge,q as Ze,w as wt,ac as Ct,ap as Fe,aq as J,aZ as vt,bD as jt}from"./index-D6Y48D2b.js";import{R as $t,S as kt,a as St,D as Et,b as Tt,C as _t,c as Lt,F as Rt,d as Mt,e as Ft,M as It,u as Nt,g as At,v as zt,E as Bt,h as Wt,f as Pt,i as Ht,j as Ut}from"./Assets.styles-vGBckZFh.js";import{L as Ot}from"./LoadMore-C1cZ5UNo.js";import{u as Dt}from"./useInfiniteGrid-DVJPBLH3.js";import{E as Gt}from"./ErrorNotice-CZNCgTxS.js";import{d as Zt}from"./dcl-schemas-C5Zz5LAu.js";import{s as qt,G as Vt,w as Kt,S as Qt}from"./buy-gasless-CvGSf1b-.js";import{s as Jt,j as Xt}from"./buy-D4LpLWxD.js";import{f as Yt}from"./errors-CpeNUYSo.js";import{J as en,C as tn,B as ve}from"./ethers-CA7SNjfo.js";import{n as nn}from"./Tooltip-CCg0T_dV.js";import{G as sn}from"./grid.styles-BMvDs3g0.js";import"./skeleton.styles-C2bsI5MR.js";import"./sentry-BzKl6xa_.js";import"./intl-AKLEHPeO.js";import"./authorizations-Cf4bU_Bf.js";import"./sendMetaTransaction-CLloXgEL.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]="7dfb293e-403e-4b5f-b619-12bbff6e8b06",s._sentryDebugIdIdentifier="sentry-dbid-7dfb293e-403e-4b5f-b619-12bbff6e8b06")}catch{}})();function X(s){const o=s.source??"item",a=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${a}`}const V="100000000000000000000",qe=2,ae=15,on=/^[a-zA-Z0-9]+$/;function Ie(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:on.test(o)?o.length<qe?{ok:!1,reason:"too-short"}:o.length>ae?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function an(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,ae)}const rn=["function available(string _subdomain) view returns (bool)"],Ne={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function ln(){return q.chainId===Number(Zt.ChainId.MATIC_MAINNET)?Ne.mainnet:Ne.sepolia}async function cn(s,o={}){var m;const{rpc:a,address:d}=ln(),h=new en(a),u=new tn(d,rn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${a}`);const l=await u.available(s);if((m=o.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const dn="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 je 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 hn(s){return ct(V,s)}async function pn(s,o,a={}){var m;const d=a.chainId??q.chainId,h=a.provider??"across",u=`${q.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await dt(u,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function fn(s,o){const a=ve.from(s.availableAmount),h=ve.from(V).sub(a);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Xt(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 un(s,o={}){const a=dn,d=o.intervalMs??1e4,h=o.maxAttempts??60;let u={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const m=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${s}`);if(m.ok){const c=await m.json(),g=(c.status??"pending").toLowerCase(),p=c.fillTx??c.fillTxnRef??null,b=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(g==="filled")return{status:"filled",destinationTxHash:p,actionsSucceeded:b};if(g==="refunded"||g==="expired")return{status:g,destinationTxHash:null,actionsSucceeded:!1};u={status:"pending",destinationTxHash:p,actionsSucceeded:b}}}catch{}l<h-1&&await new Promise(m=>setTimeout(m,d))}return u}async function mn(s){const{name:o,identity:a,signer:d}=s,h=p=>{var b;try{(b=s.onProgress)==null||b.call(s,p)}catch{}},u=s.chainId??q.chainId,l=s.provider??"across",m=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,g="unconfirmed";console.info("[names] register start",{name:o,buyer:m,chainId:u,provider:l}),h("preparing");try{const p=await at(u),b=hn(p);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:p});const j=await pn(a,o,{chainId:u,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 w=await rt(a,b);if(c=w.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:w.credit.id,maxCreditedValue:w.maxCreditedValue}),ve.from(w.maxCreditedValue).lt(V))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const $=fn(w.credit,j);let C;try{C=await qt({chainId:u,buyer:m,signer:d,args:$})}catch(x){if(!(x instanceof Vt))throw x;if(x.reason==="relayer-unreachable"){g="unobservable";const k=new $e;throw k.cause=x,k}C=await Jt(u,$,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:C}),h("confirming"),await Kt(C),g="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:C}),l==="across"){h("registering");const x=await un(C,s.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:C};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:C}),{status:"pending",originTxHash:C};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new je;return{status:"registered",originTxHash:C,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:C}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:o,buyer:m,originState:g}),p instanceof Qt)return{status:"pending",originTxHash:p.txHash};if(c&&g==="unconfirmed"&&await lt(a,[c]).catch(()=>{}),p instanceof ke||p instanceof je||p instanceof $e)throw p;const b=new Error(Yt(p,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=p,b}}function xn(){const{data:s}=ht({queryKey:["feature-flag","shop-names"],queryFn:()=>pt(ft.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const gn=60,bn=700,yn=25;function wn(s){if(!s)return[];const o=[];for(let a=1;a<=s.length;a++)o.push({text:s.slice(0,a),delay:gn});o[o.length-1]={text:s,delay:bn};for(let a=s.length-1;a>=1;a--)o.push({text:s.slice(0,a),delay:yn});return o}function Cn(s){return s.flatMap(wn)}function vn(s,o){const a=f.useMemo(()=>Cn(s),[s]),[d,h]=f.useState(0);return f.useEffect(()=>{if(!o||a.length===0)return;const u=setTimeout(()=>h(l=>(l+1)%a.length),a[d%a.length].delay);return()=>clearTimeout(u)},[d,o,a]),!o||a.length===0?"":a[d%a.length].text}const jn="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",$n="https://cdn.decentraland.org/@dcl/shop/1.5.1-31366020421.commit-a932959/_assets/name-verified-oGwQ3ntb.svg",kn="#34fee6",Sn=i.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -155,7 +155,7 @@ import{r as f,b as Ue,j as e,u as et}from"./react-B9n8JCiV.js";import{u as tt}fr
|
|
|
155
155
|
font-family: ${t.font.sans};
|
|
156
156
|
font-size: 14px;
|
|
157
157
|
color: ${t.colors.muted2};
|
|
158
|
-
`,
|
|
158
|
+
`,be=i.div`
|
|
159
159
|
flex: none;
|
|
160
160
|
display: flex;
|
|
161
161
|
align-items: center;
|
|
@@ -236,7 +236,7 @@ import{r as f,b as Ue,j as e,u as et}from"./react-B9n8JCiV.js";import{u as tt}fr
|
|
|
236
236
|
font-family: ${t.font.sans};
|
|
237
237
|
font-size: 16px;
|
|
238
238
|
color: ${t.colors.muted2};
|
|
239
|
-
`,
|
|
239
|
+
`,ye=i.button`
|
|
240
240
|
margin-top: 16px;
|
|
241
241
|
width: 100%;
|
|
242
242
|
height: 46px;
|
|
@@ -458,7 +458,7 @@ import{r as f,b as Ue,j as e,u as et}from"./react-B9n8JCiV.js";import{u as tt}fr
|
|
|
458
458
|
color: ${t.colors.accent};
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
`;function Jn({name:s,priceCredits:o,onClose:a}){const{session:d}=Oe(),{data:h,isError:u}=ut(d),l=mt(),m=Ue(),[c,g]=f.useState("confirm"),[p,y]=f.useState(""),[j,w]=f.useState(null),[$,C]=f.useState(!1),[x,k]=f.useState("preparing"),M=f.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),F=c==="completing",A=o!=null?Ce(o):"—",B=o==null,z=h==null?void 0:h.credits,W=o!=null&&z!=null?o-z:0,S=W>0,P=B?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:Ce(W)}):null;f.useEffect(()=>{const b=G=>{G.key==="Escape"&&!F&&a()};document.addEventListener("keydown",b);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",b),document.body.style.overflow=D}},[F,a]);async function _(){if(!(!d||!T||B||S||M.current)){M.current=!0,g("completing"),w(null),k("preparing");try{const b=await mn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Me(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Me(o??0),transaction_hash:b.originTxHash??null,settlement:b.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(b.status==="registered"?"success":"pending")}catch(b){oe(bt(b)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:yt(b),purchase_type:"name"});const D=b instanceof je,G=b instanceof $e;w(b instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(b==null?void 0:b.message)||n("names.errorGeneric")),C(D||G),g("error")}finally{M.current=!1}}}const L=c!=="success"&&c!=="pending",v=xt(d==null?void 0:d.providerType),I=v?2:1,N=v&&(x==="preparing"||x==="awaiting-confirmation"),R=N?1:I,re=N?n("names.confirming"):n("names.completing"),H=x==="registering"?n("names.processingRegistering"):null;return e.jsx(Sn,{onClick:F?void 0:a,role:"presentation",children:e.jsxs(En,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:b=>b.stopPropagation(),children:[L&&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:F,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,u)]}),e.jsx(fe,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ue,{children:[e.jsx(Ae,{"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(ye,{children:[e.jsx(O,{}),A]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),$?e.jsx(be,{onClick:a,children:n("names.errorSpentDismiss")}):e.jsx(be,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Mn,{children:[e.jsx(Fn,{children:n("names.confirmTitle")}),e.jsx(In,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Xn(s)}</b>`})}}),e.jsxs(Nn,{children:[e.jsx(An,{"aria-hidden":!0,children:"@"}),e.jsx(zn,{value:p,onChange:b=>y(b.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Bn,{children:".dcl.eth"})]})]}),P?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:P})]}):null,e.jsx(be,{onClick:()=>void _(),disabled:!T||!d||B||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Wn,{children:[e.jsx(Pn,{src:gt,alt:"",width:61,height:61}),e.jsxs(Hn,{children:[e.jsx(Un,{children:re}),e.jsxs(Dn,{children:[e.jsx(Gn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Zn,{"data-testid":"name-progress-count",children:`${R}/${I}`})]}),H?e.jsx(On,{children:H}):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,u)]}),e.jsx(fe,{}),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(ue,{style:{marginTop:20},children:[e.jsx(Ae,{"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(ye,{children:[e.jsx(O,{}),A]})]}),e.jsx(ze,{children:e.jsx(Be,{onClick:()=>{a(),m("/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,u)]}),e.jsx(fe,{}),e.jsxs(qn,{children:[e.jsx(Vn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(Kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ue,{style:{marginTop:20},children:[e.jsxs(Tn,{"data-testid":"name-success-tile",children:[e.jsx(_n,{src:jn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Ln,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(Rn,{src:$n,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(ye,{children:[e.jsx(O,{}),A]})]}),e.jsxs(ze,{children:[e.jsx(Be,{onClick:()=>{a(),m("/my-items")},children:n("names.myItems")}),e.jsx(Qn,{href:q.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Xn(s){return s.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const Yn="https://cdn.decentraland.org/@dcl/shop/1.5.0/_assets/identity-icon-C8yAW_Gq.svg",es="https://cdn.decentraland.org/@dcl/shop/1.5.0/_assets/world-icon-6xQ-PmmW.svg",ts="https://cdn.decentraland.org/@dcl/shop/1.5.0/_assets/invite-icon-Bz6lCTuB.svg",ns="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",ss=i.div`
|
|
461
|
+
`;function Jn({name:s,priceCredits:o,onClose:a}){const{session:d}=Oe(),{data:h,isError:u}=ut(d),l=mt(),m=Ue(),[c,g]=f.useState("confirm"),[p,b]=f.useState(""),[j,w]=f.useState(null),[$,C]=f.useState(!1),[x,k]=f.useState("preparing"),M=f.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),F=c==="completing",A=o!=null?Ce(o):"—",B=o==null,z=h==null?void 0:h.credits,W=o!=null&&z!=null?o-z:0,S=W>0,P=B?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:Ce(W)}):null;f.useEffect(()=>{const y=G=>{G.key==="Escape"&&!F&&a()};document.addEventListener("keydown",y);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=D}},[F,a]);async function _(){if(!(!d||!T||B||S||M.current)){M.current=!0,g("completing"),w(null),k("preparing");try{const y=await mn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Me(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Me(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(y.status==="registered"?"success":"pending")}catch(y){oe(yt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:bt(y),purchase_type:"name"});const D=y instanceof je,G=y instanceof $e;w(y instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),C(D||G),g("error")}finally{M.current=!1}}}const L=c!=="success"&&c!=="pending",v=xt(d==null?void 0:d.providerType),I=v?2:1,N=v&&(x==="preparing"||x==="awaiting-confirmation"),R=N?1:I,re=N?n("names.confirming"):n("names.completing"),H=x==="registering"?n("names.processingRegistering"):null;return e.jsx(Sn,{onClick:F?void 0:a,role:"presentation",children:e.jsxs(En,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&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:F,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,u)]}),e.jsx(fe,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ue,{children:[e.jsx(Ae,{"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,{}),A]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),$?e.jsx(ye,{onClick:a,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Mn,{children:[e.jsx(Fn,{children:n("names.confirmTitle")}),e.jsx(In,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Xn(s)}</b>`})}}),e.jsxs(Nn,{children:[e.jsx(An,{"aria-hidden":!0,children:"@"}),e.jsx(zn,{value:p,onChange:y=>b(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Bn,{children:".dcl.eth"})]})]}),P?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:P})]}):null,e.jsx(ye,{onClick:()=>void _(),disabled:!T||!d||B||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Wn,{children:[e.jsx(Pn,{src:gt,alt:"",width:61,height:61}),e.jsxs(Hn,{children:[e.jsx(Un,{children:re}),e.jsxs(Dn,{children:[e.jsx(Gn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Zn,{"data-testid":"name-progress-count",children:`${R}/${I}`})]}),H?e.jsx(On,{children:H}):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,u)]}),e.jsx(fe,{}),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(ue,{style:{marginTop:20},children:[e.jsx(Ae,{"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,{}),A]})]}),e.jsx(ze,{children:e.jsx(Be,{onClick:()=>{a(),m("/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,u)]}),e.jsx(fe,{}),e.jsxs(qn,{children:[e.jsx(Vn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(Kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ue,{style:{marginTop:20},children:[e.jsxs(Tn,{"data-testid":"name-success-tile",children:[e.jsx(_n,{src:jn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Ln,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(Rn,{src:$n,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,{}),A]})]}),e.jsxs(ze,{children:[e.jsx(Be,{onClick:()=>{a(),m("/my-items")},children:n("names.myItems")}),e.jsx(Qn,{href:q.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Xn(s){return s.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const Yn="https://cdn.decentraland.org/@dcl/shop/1.5.1-31366020421.commit-a932959/_assets/identity-icon-C8yAW_Gq.svg",es="https://cdn.decentraland.org/@dcl/shop/1.5.1-31366020421.commit-a932959/_assets/world-icon-6xQ-PmmW.svg",ts="https://cdn.decentraland.org/@dcl/shop/1.5.1-31366020421.commit-a932959/_assets/invite-icon-Bz6lCTuB.svg",ns="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",ss=i.div`
|
|
462
462
|
width: 100%;
|
|
463
463
|
min-width: 0;
|
|
464
464
|
`,is=i.nav`
|
|
@@ -631,7 +631,7 @@ import{r as f,b as Ue,j as e,u as et}from"./react-B9n8JCiV.js";import{u as tt}fr
|
|
|
631
631
|
}
|
|
632
632
|
`,gs=i(Ve)`
|
|
633
633
|
color: #ec303a;
|
|
634
|
-
`,
|
|
634
|
+
`,bs=i.label`
|
|
635
635
|
flex: 1;
|
|
636
636
|
min-width: 0;
|
|
637
637
|
display: flex;
|
|
@@ -639,7 +639,7 @@ import{r as f,b as Ue,j as e,u as et}from"./react-B9n8JCiV.js";import{u as tt}fr
|
|
|
639
639
|
gap: 0;
|
|
640
640
|
cursor: text;
|
|
641
641
|
overflow: hidden;
|
|
642
|
-
`,
|
|
642
|
+
`,ys=i.span`
|
|
643
643
|
flex: none;
|
|
644
644
|
margin-right: 8px;
|
|
645
645
|
font-family: ${t.font.sans};
|
|
@@ -918,5 +918,5 @@ import{r as f,b as Ue,j as e,u as et}from"./react-B9n8JCiV.js";import{u as tt}fr
|
|
|
918
918
|
clip: rect(0, 0, 0, 0);
|
|
919
919
|
white-space: nowrap;
|
|
920
920
|
border: 0;
|
|
921
|
-
`,Is="https://docs.decentraland.org/creator/worlds/about/",Ns="https://governance.decentraland.org";function Pe(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 As({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:a}=Oe(),d=xn(),{data:h}=Ge(),u=h?Ze(V,h):null,[l,m]=f.useState(""),[c,g]=f.useState("idle"),[p,y]=f.useState(!1),[j,w]=f.useState(!1),[$,C]=f.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});f.useEffect(()=>{var N;const v=(N=window.matchMedia)==null?void 0:N.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const I=R=>C(R.matches);return v.addEventListener("change",I),()=>v.removeEventListener("change",I)},[]);const x=n("names.placeholderExamples"),k=f.useMemo(()=>x.split(",").map(v=>v.trim()).filter(Boolean),[x]),T=vn(k,!j&&!l&&!$)||n("names.inputPlaceholder"),F=f.useRef(null),[A,B]=f.useState(void 0);f.useLayoutEffect(()=>{F.current&&B(F.current.getBoundingClientRect().width)},[l,T]),f.useEffect(()=>{if(!Ie(l).ok){g(l.length===0?"idle":"invalid");return}g("checking");const I=new AbortController,N=setTimeout(()=>{(async()=>{try{const R=await cn(l,{signal:I.signal});g(R)}catch(R){if((R==null?void 0:R.name)==="AbortError")return;g("error")}})()},400);return()=>{clearTimeout(N),I.abort()}},[l]);const z=Ie(l),W=z.ok&&(c==="available"||c==="error"),S=d&&W,P=!d&&W;function _(){if(S){if(!o){a();return}y(!0)}}const L=e.jsxs(e.Fragment,{children:[n("names.claim"),u!=null?e.jsxs($s,{children:[e.jsx(O,{}),Ce(u)]}):null]});return e.jsxs(ss,{"data-testid":"names-page",children:[e.jsxs(is,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(os,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(as,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(rs,{children:[e.jsxs(ls,{children:[e.jsxs(cs,{children:[e.jsx(ds,{children:n("names.heroTitle")}),e.jsx(hs,{children:n("names.heroSubtitle")})]}),e.jsxs(ps,{children:[e.jsxs(fs,{"data-testid":"names-input-wrap",children:[e.jsxs(us,{invalid:c==="taken",children:[e.jsxs(ys,{children:[e.jsx(bs,{"aria-hidden":!0,children:"@"}),e.jsx(ws,{value:l,onChange:v=>m(an(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ae,onFocus:()=>w(!0),style:{width:A!=null?`${A}px`:void 0}}),e.jsx(ms,{ref:F,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(Cs,{children:n("names.suffix")})]}),l.length>0?e.jsxs(vs,{"aria-hidden":!0,children:[l.length,"/",ae]}):null,e.jsx(Ke,{onClick:_,disabled:!S,"data-testid":"names-claim",children:L})]}),c==="taken"?e.jsxs(xs,{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(gs,{href:Pe(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")}):P?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(Ss,{href:Pe(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:qe})}):null]}),e.jsx(js,{onClick:_,disabled:!S,children:L}),e.jsx(Fs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs(Es,{children:[e.jsxs(Ts,{children:[e.jsx(_s,{children:n("names.whyTitle")}),e.jsx(Ls,{children:n("names.whyIntro")})]}),e.jsxs(Rs,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Yn,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:es,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Ms,{children:n("names.why2Address")})]}),e.jsxs(We,{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:ts,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:ns,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(We,{href:Ns,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(Jn,{name:l,priceCredits:u,onClose:()=>y(!1)}):null]})}const zs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",He=48,Bs=["all","on_sale","not_for_sale"];function oi(){const[s]=et(),o=Ue(),a=(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=f.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[u,l]=tt(h),{subCategory:m,rarities:c,priceMin:g,priceMax:p,smart:y,sort:j}=u,w=u.category,$=Bs.includes(u.status)?u.status:"on_sale";nt(`${w}:${m??""}`);const[C,x]=f.useState(!1);f.useEffect(()=>{if(!C)return;const r=Q=>{Q.key==="Escape"&&x(!1)};document.addEventListener("keydown",r);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=U}},[C]);const k=$==="on_sale",M=g&&!Number.isNaN(Number(g))?Number(g):void 0,T=p&&!Number.isNaN(Number(p))?Number(p):void 0,F=wt(),A=m?ot[m]:void 0,B=(Re.find(r=>r.key===j)??Re[0]).server,z={category:w,rarities:c.length?c:void 0,wearableCategories:A,minPriceCredits:M,maxPriceCredits:T,search:a||void 0,sortBy:B,isSmart:y||void 0,onSale:!0,listingType:F?void 0:"primary"},W={category:w,rarities:c.length?c:void 0,wearableCategories:A,search:a||void 0,sortBy:B,isWearableSmart:y||void 0,isOnSale:$==="not_for_sale"?!1:void 0},{items:S,total:P,isLoading:_,isPlaceholderData:L,error:v,hasNextPage:I,isFetchingNextPage:N,isFetchNextPageError:R,fetchNextPage:re}=Dt(k?["shop-items",z]:["catalog-items",W],r=>k?vt({...z,first:He,skip:r}):jt({...W,first:He,skip:r}),{enabled:w!=="names"}),H=P,{data:b,isError:D,isPending:G}=Ge(),Qe=r=>b&&r.manaWei?Ze(r.manaWei,b):null,Je=k&&G&&S.some(r=>r.source==="legacy"),Se=_||L||Je,Xe=_?15:Math.max(S.length,1),Ee=f.useRef(null);f.useEffect(()=>{_||L||!a||Ee.current===a||(Ee.current=a,oe("Shop Searched",{query:a,result_count:H}))},[a,_,L,H]);const K=f.useRef("__init__");f.useEffect(()=>{if(_||L)return;const r=JSON.stringify({category:w,subCategory:m,rarities:c,min:M,max:T,sort:j,status:$,smart:y});if(K.current==="__init__"||K.current===r){K.current=r;return}K.current=r,oe("Shop Applied Filter",{filters:{category:w,sub_category:m,rarities:c,min_price_credits:M??null,max_price_credits:T??null,status:$,smart:y,sort:j},result_count:H})},[w,m,c,M,T,j,$,y,_,L,H]);function Te(r){l({category:r,subCategory:null})}function _e(r){l({status:r})}function Le(r){l({rarities:c.includes(r)?c.filter(U=>U!==r):[...c,r]})}function Ye(){l(h)}const Z=[];(M!=null||T!=null)&&Z.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const r of st)c.includes(r)&&Z.push({key:`rarity-${r}`,label:Ct(r),onRemove:()=>Le(r)});return y&&Z.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),$!=="on_sale"&&Z.push({key:"status",label:$==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>_e("on_sale")}),e.jsxs($t,{"data-testid":"browse",children:[w!=="names"&&e.jsxs(e.Fragment,{children:[C?e.jsx(kt,{onClick:()=>x(!1),"aria-hidden":!0}):null,e.jsxs(St,{"data-open":C||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(Et,{children:[e.jsx(Tt,{children:n("assets.filters")}),e.jsx(_t,{onClick:()=>x(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Lt,{children:e.jsx(Rt,{category:w,subCategory:m,onCategory:Te,onSub:r=>l({subCategory:r}),priceMin:g,priceMax:p,onPriceMin:r=>l({priceMin:r}),onPriceMax:r=>l({priceMax:r}),rarities:c,onToggleRarity:Le,status:$,onStatus:_e,smart:y,onSmart:r=>l({smart:r})})}),e.jsx(Mt,{children:e.jsx(Ft,{type:"button",onClick:()=>x(!1),children:n("assets.showItems")})})]})]}),e.jsx(It,{children:w==="names"?e.jsx(As,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(it,{sort:j,onSort:r=>l({sort:r}),total:P,loading:_||L,query:a,onOpenFilters:()=>x(!0),chips:Z,onClearChips:Ye}),D&&k&&S.some(r=>r.source==="legacy")?e.jsx(Nt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,v?e.jsx(Gt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&S.length===0&&!v?e.jsxs(At,{"data-testid":"browse-empty",children:[e.jsx(zt,{src:zs,alt:""}),e.jsxs(Bt,{children:[e.jsx(Wt,{children:n("assets.empty.title")}),e.jsx(Pt,{children:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Ht,{children:e.jsx(Ut,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(sn,{"data-testid":"grid",children:Se?e.jsx(Fe,{count:Xe}):e.jsxs(e.Fragment,{children:[S.map(r=>{if(!k)return e.jsx(J,{item:r,mode:"view"},X(r));const U=r;if(U.source!=="legacy")return e.jsx(J,{item:r},X(r));const Q=Qe(U);return Q==null?e.jsx(J,{item:r,mode:"view"},X(r)):e.jsx(J,{item:{...U,priceCredits:Q}},X(r))}),N?e.jsx(Fe,{count:6}):null]})}),e.jsx(Ot,{hasNextPage:I,isFetching:N,isError:R,onLoadMore:()=>void re()})]})]})})]})}export{oi as Assets};
|
|
922
|
-
//# sourceMappingURL=Assets-
|
|
921
|
+
`,Is="https://docs.decentraland.org/creator/worlds/about/",Ns="https://governance.decentraland.org";function Pe(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 As({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:a}=Oe(),d=xn(),{data:h}=Ge(),u=h?Ze(V,h):null,[l,m]=f.useState(""),[c,g]=f.useState("idle"),[p,b]=f.useState(!1),[j,w]=f.useState(!1),[$,C]=f.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});f.useEffect(()=>{var N;const v=(N=window.matchMedia)==null?void 0:N.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const I=R=>C(R.matches);return v.addEventListener("change",I),()=>v.removeEventListener("change",I)},[]);const x=n("names.placeholderExamples"),k=f.useMemo(()=>x.split(",").map(v=>v.trim()).filter(Boolean),[x]),T=vn(k,!j&&!l&&!$)||n("names.inputPlaceholder"),F=f.useRef(null),[A,B]=f.useState(void 0);f.useLayoutEffect(()=>{F.current&&B(F.current.getBoundingClientRect().width)},[l,T]),f.useEffect(()=>{if(!Ie(l).ok){g(l.length===0?"idle":"invalid");return}g("checking");const I=new AbortController,N=setTimeout(()=>{(async()=>{try{const R=await cn(l,{signal:I.signal});g(R)}catch(R){if((R==null?void 0:R.name)==="AbortError")return;g("error")}})()},400);return()=>{clearTimeout(N),I.abort()}},[l]);const z=Ie(l),W=z.ok&&(c==="available"||c==="error"),S=d&&W,P=!d&&W;function _(){if(S){if(!o){a();return}b(!0)}}const L=e.jsxs(e.Fragment,{children:[n("names.claim"),u!=null?e.jsxs($s,{children:[e.jsx(O,{}),Ce(u)]}):null]});return e.jsxs(ss,{"data-testid":"names-page",children:[e.jsxs(is,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(os,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(as,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(rs,{children:[e.jsxs(ls,{children:[e.jsxs(cs,{children:[e.jsx(ds,{children:n("names.heroTitle")}),e.jsx(hs,{children:n("names.heroSubtitle")})]}),e.jsxs(ps,{children:[e.jsxs(fs,{"data-testid":"names-input-wrap",children:[e.jsxs(us,{invalid:c==="taken",children:[e.jsxs(bs,{children:[e.jsx(ys,{"aria-hidden":!0,children:"@"}),e.jsx(ws,{value:l,onChange:v=>m(an(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ae,onFocus:()=>w(!0),style:{width:A!=null?`${A}px`:void 0}}),e.jsx(ms,{ref:F,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(Cs,{children:n("names.suffix")})]}),l.length>0?e.jsxs(vs,{"aria-hidden":!0,children:[l.length,"/",ae]}):null,e.jsx(Ke,{onClick:_,disabled:!S,"data-testid":"names-claim",children:L})]}),c==="taken"?e.jsxs(xs,{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(gs,{href:Pe(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")}):P?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(Ss,{href:Pe(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:qe})}):null]}),e.jsx(js,{onClick:_,disabled:!S,children:L}),e.jsx(Fs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs(Es,{children:[e.jsxs(Ts,{children:[e.jsx(_s,{children:n("names.whyTitle")}),e.jsx(Ls,{children:n("names.whyIntro")})]}),e.jsxs(Rs,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Yn,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:es,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Ms,{children:n("names.why2Address")})]}),e.jsxs(We,{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:ts,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:ns,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(We,{href:Ns,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(Jn,{name:l,priceCredits:u,onClose:()=>b(!1)}):null]})}const zs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",He=48,Bs=["all","on_sale","not_for_sale"];function oi(){const[s]=et(),o=Ue(),a=(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=f.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[u,l]=tt(h),{subCategory:m,rarities:c,priceMin:g,priceMax:p,smart:b,sort:j}=u,w=u.category,$=Bs.includes(u.status)?u.status:"on_sale";nt(`${w}:${m??""}`);const[C,x]=f.useState(!1);f.useEffect(()=>{if(!C)return;const r=Q=>{Q.key==="Escape"&&x(!1)};document.addEventListener("keydown",r);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=U}},[C]);const k=$==="on_sale",M=g&&!Number.isNaN(Number(g))?Number(g):void 0,T=p&&!Number.isNaN(Number(p))?Number(p):void 0,F=wt(),A=m?ot[m]:void 0,B=(Re.find(r=>r.key===j)??Re[0]).server,z={category:w,rarities:c.length?c:void 0,wearableCategories:A,minPriceCredits:M,maxPriceCredits:T,search:a||void 0,sortBy:B,isSmart:b||void 0,onSale:!0,listingType:F?void 0:"primary"},W={category:w,rarities:c.length?c:void 0,wearableCategories:A,search:a||void 0,sortBy:B,isWearableSmart:b||void 0,isOnSale:$==="not_for_sale"?!1:void 0},{items:S,total:P,isLoading:_,isPlaceholderData:L,error:v,hasNextPage:I,isFetchingNextPage:N,isFetchNextPageError:R,fetchNextPage:re}=Dt(k?["shop-items",z]:["catalog-items",W],r=>k?vt({...z,first:He,skip:r}):jt({...W,first:He,skip:r}),{enabled:w!=="names"}),H=P,{data:y,isError:D,isPending:G}=Ge(),Qe=r=>y&&r.manaWei?Ze(r.manaWei,y):null,Je=k&&G&&S.some(r=>r.source==="legacy"),Se=_||L||Je,Xe=_?15:Math.max(S.length,1),Ee=f.useRef(null);f.useEffect(()=>{_||L||!a||Ee.current===a||(Ee.current=a,oe("Shop Searched",{query:a,result_count:H}))},[a,_,L,H]);const K=f.useRef("__init__");f.useEffect(()=>{if(_||L)return;const r=JSON.stringify({category:w,subCategory:m,rarities:c,min:M,max:T,sort:j,status:$,smart:b});if(K.current==="__init__"||K.current===r){K.current=r;return}K.current=r,oe("Shop Applied Filter",{filters:{category:w,sub_category:m,rarities:c,min_price_credits:M??null,max_price_credits:T??null,status:$,smart:b,sort:j},result_count:H})},[w,m,c,M,T,j,$,b,_,L,H]);function Te(r){l({category:r,subCategory:null})}function _e(r){l({status:r})}function Le(r){l({rarities:c.includes(r)?c.filter(U=>U!==r):[...c,r]})}function Ye(){l(h)}const Z=[];(M!=null||T!=null)&&Z.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const r of st)c.includes(r)&&Z.push({key:`rarity-${r}`,label:Ct(r),onRemove:()=>Le(r)});return b&&Z.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),$!=="on_sale"&&Z.push({key:"status",label:$==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>_e("on_sale")}),e.jsxs($t,{"data-testid":"browse",children:[w!=="names"&&e.jsxs(e.Fragment,{children:[C?e.jsx(kt,{onClick:()=>x(!1),"aria-hidden":!0}):null,e.jsxs(St,{"data-open":C||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(Et,{children:[e.jsx(Tt,{children:n("assets.filters")}),e.jsx(_t,{onClick:()=>x(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Lt,{children:e.jsx(Rt,{category:w,subCategory:m,onCategory:Te,onSub:r=>l({subCategory:r}),priceMin:g,priceMax:p,onPriceMin:r=>l({priceMin:r}),onPriceMax:r=>l({priceMax:r}),rarities:c,onToggleRarity:Le,status:$,onStatus:_e,smart:b,onSmart:r=>l({smart:r})})}),e.jsx(Mt,{children:e.jsx(Ft,{type:"button",onClick:()=>x(!1),children:n("assets.showItems")})})]})]}),e.jsx(It,{children:w==="names"?e.jsx(As,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(it,{sort:j,onSort:r=>l({sort:r}),total:P,loading:_||L,query:a,onOpenFilters:()=>x(!0),chips:Z,onClearChips:Ye}),D&&k&&S.some(r=>r.source==="legacy")?e.jsx(Nt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,v?e.jsx(Gt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&S.length===0&&!v?e.jsxs(At,{"data-testid":"browse-empty",children:[e.jsx(zt,{src:zs,alt:""}),e.jsxs(Bt,{children:[e.jsx(Wt,{children:n("assets.empty.title")}),e.jsx(Pt,{children:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Ht,{children:e.jsx(Ut,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(sn,{"data-testid":"grid",children:Se?e.jsx(Fe,{count:Xe}):e.jsxs(e.Fragment,{children:[S.map(r=>{if(!k)return e.jsx(J,{item:r,mode:"view"},X(r));const U=r;if(U.source!=="legacy")return e.jsx(J,{item:r},X(r));const Q=Qe(U);return Q==null?e.jsx(J,{item:r,mode:"view"},X(r)):e.jsx(J,{item:{...U,priceCredits:Q}},X(r))}),N?e.jsx(Fe,{count:6}):null]})}),e.jsx(Ot,{hasNextPage:I,isFetching:N,isError:R,onLoadMore:()=>void re()})]})]})})]})}export{oi as Assets};
|
|
922
|
+
//# sourceMappingURL=Assets-tokcK3HS.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b,j as o}from"./react-
|
|
1
|
+
import{r as b,j as o}from"./react-DjgD1SKK.js";import{C as oe,R as B,a as je,b as We}from"./categories-DMzQeR7X.js";import{n as c,T as Re}from"./Tooltip-CCg0T_dV.js";import{s as t,t as e,I as T,b as a,ac as K,C as U}from"./index-D6Y48D2b.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new i.Error().stack;s&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[s]="62cf201a-bd04-4a4c-b137-62ac156cfa9e",i._sentryDebugIdIdentifier="sentry-dbid-62cf201a-bd04-4a4c-b137-62ac156cfa9e")}catch{}})();const f=1e5,y=900,g=90,R=g*2,ie=y/g,ne=f-y,Y=100;function G(i){const s=Math.max(0,Math.min(Math.round(i),R));if(s<=g)return s*ie;const p=y+(s-g)/g*ne;return Math.round(p/Y)*Y}function M(i){const s=Math.max(0,Math.min(i,f));return s<=y?Math.round(s/ie):g+Math.round((s-y)/ne*g)}function q(i){return M(i)/R*100}const Te=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -649,4 +649,4 @@ import{r as b,j as o}from"./react-B9n8JCiV.js";import{C as oe,R as B,a as je,b a
|
|
|
649
649
|
outline-offset: 2px;
|
|
650
650
|
}
|
|
651
651
|
`;export{ft as C,gt as D,$t as E,lt as F,ct as M,dt as R,xt as S,pt as a,mt as b,ht as c,ut as d,bt as e,St as f,wt as g,kt as h,jt as i,Wt as j,j as k,W as l,Oe as m,Be as n,Ke as o,Ue as p,Ye as q,Ge as r,qe as s,Ve as t,yt as u,vt as v};
|
|
652
|
-
//# sourceMappingURL=Assets.styles-
|
|
652
|
+
//# sourceMappingURL=Assets.styles-vGBckZFh.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as q,r as F}from"./react-
|
|
1
|
+
import{j as e,L as q,r as F}from"./react-DjgD1SKK.js";import{t as o,s as n,B as G,x as R,y as P,b as i,v as B,z as O,I as z,A as K,l as w,D as H,c as Q,E as X,F as A,h as Z,G as J,H as E}from"./index-D6Y48D2b.js";import{c as U,d as V,b as Y,e as tt,s as et,a as it}from"./authorizations-Cf4bU_Bf.js";import{f as ot}from"./builder-BIrWDvyA.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-CpeNUYSo.js";import"./dcl-schemas-C5Zz5LAu.js";import"./sentry-BzKl6xa_.js";import"./ethers-CA7SNjfo.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-CLloXgEL.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]="f863e8e9-ed42-4434-a007-18fb09404fa5",t._sentryDebugIdIdentifier="sentry-dbid-f863e8e9-ed42-4434-a007-18fb09404fa5")}catch{}})();const st=R`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,rt=R`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -189,4 +189,4 @@ import{j as e,L as q,r as F}from"./react-B9n8JCiV.js";import{t as o,s as n,B as
|
|
|
189
189
|
`,M=n(G)`
|
|
190
190
|
margin-top: 12px;
|
|
191
191
|
`;function j({descriptor:t,owner:s,signer:r,name:a,description:c,image:l,icon:p}){const v=H(),[h,y]=F.useState(!1),{data:u,isLoading:g,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>it(t,s),staleTime:3e4});async function m(){if(h||g)return;const b=!u;y(!0);try{await et({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?i("authorizations.toastActivated",{name:a}):i("authorizations.toastDeactivated",{name:a}))}catch(C){Z(C,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(nt(C,i("authorizations.errorGeneric")))}finally{y(!1)}}const W=g?i("authorizations.checking"):u?i("authorizations.active"):i("authorizations.inactive");return e.jsxs(ht,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[e.jsx(gt,{children:l?e.jsx("img",{src:l,alt:""}):p}),e.jsxs(mt,{children:[e.jsx(ft,{title:a,children:a}),e.jsx(xt,{children:c})]}),e.jsxs(bt,{children:[e.jsx(yt,{"data-active":!!u,children:W}),h?e.jsx(jt,{"aria-label":i("authorizations.working")}):e.jsx(zt,{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:g,onClick:()=>void m()})]})]})}const x=500,N=10,vt=x*N;async function _(t,s){const r=await E(t,{category:s,first:x}),a=Math.min(Math.ceil(r.total/x),N),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(l,p)=>E(t,{category:s,first:x,skip:(p+1)*x})));return{assets:[...r.assets,...c.flatMap(l=>l.assets)],truncated:r.total>vt}}function kt(t){return w({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([_(t,"wearable"),_(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function $t(t){return w({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:J})}function Ct(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=X(t);return a===t?i("authorizations.collectionFallback"):a}function At(t,s){return w({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await ot(t,s),a=new Map;for(const c of r){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return[...a.values()]}})}function qt(){P({title:i("authorizations.title"),noindex:!0});const{session:t,signIn:s}=B(),r=Q.chainId,a=O(t==null?void 0:t.providerType),{data:c,isLoading:l}=kt(a?t==null?void 0:t.address:void 0),{data:p,isLoading:v}=$t(!!a&&!!(t!=null&&t.address)),{data:h,isLoading:y}=At(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return e.jsxs(D,{children:[e.jsx(z,{name:"info",size:40,color:o.colors.muted2}),e.jsx(S,{children:i("authorizations.signInTitle")}),e.jsx(L,{children:i("authorizations.signInBody")}),e.jsx(M,{variant:"white",onClick:()=>s(),children:i("storeSettings.signIn")})]});if(!a)return e.jsxs(D,{children:[e.jsx(z,{name:"check",size:40,color:o.colors.ok}),e.jsx(S,{children:i("authorizations.managedTitle")}),e.jsx(L,{children:i("authorizations.managedBody")}),e.jsx(M,{as:q,to:"/items",variant:"white",children:i("authorizations.managedCta")})]});const u=U(r),g=V(r);return e.jsxs(ct,{children:[e.jsxs(lt,{children:[e.jsx(dt,{children:i("authorizations.title")}),e.jsx(ut,{children:i("authorizations.intro")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.buyingTitle")}),e.jsxs(f,{children:[e.jsx(j,{descriptor:u,owner:t.address,signer:t.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:e.jsx(K,{className:"ccy-mark"})}),e.jsx(j,{descriptor:g,owner:t.address,signer:t.signer,name:i("authorizations.manaName"),description:i("authorizations.manaDesc"),icon:e.jsx(pt,{src:at,alt:"","aria-hidden":!0})})]})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.sellingTitle")}),c!=null&&c.truncated?e.jsx(wt,{"data-testid":"authorizations-selling-truncated",children:i("authorizations.sellingTruncated",{count:c.scanned})}):null,l||v?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(I,{"aria-hidden":!0},m))}):c&&c.collections.length>0?e.jsx(f,{children:c.collections.map(d=>e.jsx(j,{descriptor:Y(d.contractAddress,r),owner:t.address,signer:t.signer,name:Ct(d.contractAddress,p),description:i("authorizations.sellingDesc"),image:d.image,icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.sellingEmpty")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.mintingTitle")}),y?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(I,{"aria-hidden":!0},m))}):h&&h.length>0?e.jsx(f,{children:h.map(d=>e.jsx(j,{descriptor:tt(d.contractAddress,r),owner:t.address,signer:t.signer,name:d.name||i("authorizations.collectionFallback"),description:i("authorizations.mintingDesc"),icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.mintingEmpty")})]})]})}export{qt as Authorizations};
|
|
192
|
-
//# sourceMappingURL=Authorizations-
|
|
192
|
+
//# sourceMappingURL=Authorizations-CiL63tzA.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as Ke,r as I,b as oa,a as ca}from"./react-
|
|
1
|
+
import{j as e,L as Ke,r as I,b as oa,a as ca}from"./react-DjgD1SKK.js";import{t as J,s as r,b as a,L as ue,C as ke,ax as la,ay as Ee,az as da,J as ua,I as O,A as qt,K as Qe,y as ha,X as H,am as pt,v as pa,w as ga,l as ma,aA as xa,D as fa,aB as ya,an as ba,aC as va,aD as gt,aE as wa,aF as Ca,z as ja,aG as mt,Z as V,aH as xt,aI as ka,h as ne,r as $a,c as ft,aJ as Sa,aK as yt,aL as qe,aM as Ma,aN as be,aO as ve,aP as bt,g as vt,f as wt,aQ as Ta}from"./index-D6Y48D2b.js";import{M as Ia,S as Pa,C as Aa,H as za,a as Ea,T as qa,X as Ba,b as Ra,B as _a,c as Fa,d as Ct,e as Wa,f as $e,P as Bt,g as La,h as Ka,i as Qa,j as Na,k as Le,l as he,L as Ua,m as Ga,n as jt,o as kt,W as Ha,p as Oa,q as Da,r as Va,A as Ja,s as Xa,t as Ya,u as Za,v as es,w as ts,x as as,y as ss,z as ns,D as is,E as rs,F as os,G as cs,I as ls,J as ds,K as us,N as hs,O as Be,Q as ps,R as gs,U as ms,V as xs,Y as $t,Z as St,_ as fs,$ as ys,a0 as bs,a1 as vs,a2 as Mt,a3 as ws}from"./CollectionCarousel-iWCZwqCr.js";import{f as Cs,h as js,a as ks,n as $s,i as Ss,A as Ms}from"./authorizations-Cf4bU_Bf.js";import{g as Ts,h as Re,p as Is}from"./buy-D4LpLWxD.js";import{b as Ps,w as As,S as Tt,G as zs}from"./buy-gasless-CvGSf1b-.js";import{u as Es,M as qs,R as we,r as Bs,c as Rs,p as It,a as _e}from"./useCreditPacks-C9-tAb2z.js";import{i as _s,a as Fs}from"./errors-CpeNUYSo.js";import{E as Ws}from"./ErrorNotice-CZNCgTxS.js";import"./dcl-schemas-C5Zz5LAu.js";import"./sentry-BzKl6xa_.js";import"./ethers-CA7SNjfo.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-CLloXgEL.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new i.Error().stack;u&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[u]="9e67c79f-62a9-4489-933b-dbbc03f2c654",i._sentryDebugIdIdentifier="sentry-dbid-9e67c79f-62a9-4489-933b-dbbc03f2c654")}catch{}})();const{colors:ie,radius:Ls}=J,Ks=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -703,4 +703,4 @@ import{j as e,L as Ke,r as I,b as oa,a as ca}from"./react-B9n8JCiV.js";import{t
|
|
|
703
703
|
margin-top: 0;
|
|
704
704
|
}
|
|
705
705
|
`;function Fe(i){if(_s(i))return a("errors.rejected");const u=(i.message??"").toLowerCase();return u.includes("insufficient")?a("cart.error.insufficient",{currency:ke.name}):u.includes("no active listing")||u.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Nn=12e4;function Un(i){const u=[];return i.unavailable.length&&u.push(a("cart.drop.unavailable",{count:i.unavailable.length})),i.own.length&&u.push(a("cart.drop.own",{count:i.own.length})),a("cart.drop.removed",{items:u.join(` ${a("cart.drop.and")} `)})}const We=i=>i.reduce((u,P)=>u+P.priceCredits*P.quantity,0),je=i=>i.flatMap(u=>Array.from({length:u.quantity},()=>({...u,quantity:1})));function ii(){var ht;ha({title:a("nav.cart"),noindex:!0});const i=H(t=>t.items),u=H(t=>t.remove),P=H(t=>t.increment),z=H(t=>t.decrement),W=H(t=>t.clear),X=H(t=>t.restore),Y=H(t=>t.setFittingOpen),K=pt(t=>t.items),re=pt(t=>t.toggle),{session:n,signIn:Q}=pa(),Kt=ga(),pe=Es().packs.slice(0,qs);I.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Qt=i.some(t=>t.category!=="emote"),{data:Se}=ma({queryKey:["upsell-listings"],queryFn:()=>Ta({first:40}),staleTime:6e4}),{data:j}=xa(n),y=fa(),Z=oa(),{state:q}=ca(),[Nt,oe]=I.useState(null),[Ne,ge]=I.useState(null),[Ut,R]=I.useState(!1),[_,D]=I.useState(null),Ue=I.useRef(0),[p,k]=I.useState(null),{data:me}=ya(n),{data:ce}=ba(!0),[Me,Ge]=I.useState(""),le=I.useRef(null),He=va(i),Oe=t=>mt(He[t.id]),Te=i.filter(Oe),De=i.length>0&&Te.length===0,Gt=Te.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Ht=i.reduce((t,s)=>t+s.quantity,0),Ot=Te.reduce((t,s)=>t+s.quantity,0),Ve=_?_.liveTotalCredits:Gt,Dt=new Set(i.map(t=>t.id)),Je=((Se==null?void 0:Se.items)??[]).filter(t=>!Dt.has(t.id)).slice(0,12),Vt=new Map(_==null?void 0:_.buyable.map(t=>[t.item.id,t])),xe=(j==null?void 0:j.credits)??0,Ie=Ve*10,Jt=ce?gt(Ie,ce):0n,Pe=Be({priceCents:Ie,priceManaWei:Jt,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:me??0n}),Xt=t=>t.flatMap(s=>{const c=_e(s);return c.kind==="store"?[c.mint]:[]}),Yt=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),Zt=ka,ea=t=>Sa(t.contractAddress,String(t.itemId));function fe(t){t(),D(null),ge(null),oe(null)}function ta(){k(null),R(!1)}function Xe(t){const s=We(t),c=Math.max(0,s-xe),o=pe.find(d=>d.credits>=c)??pe[pe.length-1];Ge(o.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:xe,shortfall:c}),k({phase:"nofunds",lines:t.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:c}),R(!1)}async function Ae(t){if(!n||t.length===0)return;const s=je(t),c=s.map(x=>({...x.item,priceCredits:x.priceCredits})),o=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),d=[];let v="authorize";const m=new Set,M=new Set,L=new Set,F=[];let w=!1;k({phase:"processing",stage:"reserving",step:1,total:s.length});try{const x=[];for(let h=0;h<s.length;h++){const g=s[h];k({phase:"processing",stage:"reserving",step:h+1,total:s.length});try{const S=g.acquisition==="trade"?g.trade.id:void 0,b=g.item.contractAddress&&g.item.itemId!=null?{contractAddress:g.item.contractAddress,itemId:String(g.item.itemId)}:void 0,{credit:E,maxCreditedValue:B}=await yt(n.identity,g.usdCents,S,b);d.push({salt:E.id,itemId:g.item.id}),x.push(g.acquisition==="store"?{kind:"store",item:{collection:g.item.contractAddress,itemId:String(g.item.itemId),priceWei:g.priceWei},credits:[E],maxCreditedValue:B,chainId:g.item.chainId}:{kind:"trade",trade:g.trade,credits:[E],maxCreditedValue:B})}catch(S){if(Fs(S)){if(d.length){try{await qe(n.identity,d.map(b=>b.salt))}catch(b){ne(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}Xe(t);return}throw S}}d.length&&y.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const $=Ts(x).length,N=h=>$>1?{current:h,total:$}:void 0,U=(h,g)=>k({phase:"processing",stage:h,step:s.length,total:s.length,signatures:N(g)}),G=h=>h<$?U("awaiting-signature",h+1):U("settling",$);U("awaiting-signature",1);let T=[];if(Cs())try{const h=new Map;T=await Ps({purchases:x,buyer:n.address,signer:n.signer,onSigned:()=>G($),onBroadcast:({txHash:b,salts:E})=>{h.set(b,E),E.forEach(B=>m.add(B))}});const g=await Promise.allSettled(T.map(b=>As(b)));g.forEach((b,E)=>{const B=h.get(T[E])??[];b.status==="fulfilled"?(B.forEach(se=>M.add(se)),F.push(T[E])):b.reason instanceof Tt||B.forEach(se=>L.add(se))});const S=g.flatMap(b=>b.status==="rejected"?[b.reason]:[]);if(S.length&&!S.some(b=>b instanceof Tt))throw S[0];w=!0}catch(h){if(!(h instanceof zs)||!Ma(n.providerType))throw h;T=await Re({purchases:x,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:g})=>g.forEach(S=>m.add(S)),onSettled:({txHash:g,salts:S})=>{S.forEach(b=>M.add(b)),F.push(g)},onReverted:({salts:g})=>g.forEach(S=>L.add(S))})}else T=await Re({purchases:x,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:h})=>h.forEach(g=>m.add(g)),onSettled:({txHash:h,salts:g})=>{g.forEach(S=>M.add(S)),F.push(h)},onReverted:({salts:h})=>h.forEach(g=>L.add(g))});t.forEach(h=>u(h.item.id)),D(null),V("Shop Completed Purchase",{...be(c),payment_type:"credits",no_crypto_step:w,transaction_hash:T[0]??null}),St(y);const C=le.current;le.current=null,k(null),R(!1);const f={items:o,txHash:T[0]??void 0,txHashes:T,settled:!0,...C?{creditsAdded:C}:{}};Z("/success",{state:f,replace:!0})}catch(x){ve(x)||ne(x,{flow:"cart_checkout",step:v,cart_size:t.length});const $=new Set([...m].filter(f=>!L.has(f))),{toRelease:N,boughtItemIds:U}=It({reservations:d,spent:$,settled:M}),G=[...$].some(f=>!M.has(f)),T=c.filter(f=>U.includes(f.id)),C=c.filter(f=>!U.includes(f.id));if(V(ve(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:bt(x),value_usd:xt(C.reduce((f,h)=>f+h.priceCredits,0)),cart_size:s.length,partial:T.length>0}),N.length)try{await qe(n.identity,N)}catch(f){ne(f,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),T.length>0){U.forEach(f=>u(f)),D(null),St(y),V("Shop Completed Purchase",{...be(T),payment_type:"credits",no_crypto_step:w,transaction_hash:F[0]??null,partial:!0}),k({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:G}),R(!1);return}k({phase:"error",message:G?void 0:Fe(x),heldCredits:G})}}function Ye(t,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const c=le.current;le.current=null,k(null),R(!1);const o={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};Z("/success",{state:o,replace:!0})}function Ze(t,s){ve(t)||ne(t,{flow:s,step:"submit"}),V(ve(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:bt(t)}),k({phase:"error",message:Fe(t)}),R(!1)}async function aa(t,s,c){const o=vt(wt.MANAToken,s),d=vt(wt.CreditsManager,s);await Ss({auth:{kind:Ms.Allowance,contractAddress:o.address,spenderAddress:d.address,chainId:s},signer:t,requiredWei:c})}async function et(){if(ce)return ce;try{return await y.fetchQuery({queryKey:["mana-rate",ft.chainId],queryFn:()=>$a(ft.chainId),staleTime:6e4})}catch{return}}async function sa(t){const s=je(t).reduce((v,m)=>v+m.usdCents,0),o=(me??0n)>0n?await et():ce,d=o?gt(s,o):0n;return{totalCents:s,manaWei:d}}async function tt(t,s){const c=We(t),{totalCents:o,manaWei:d}=await sa(t),v=Be({priceCents:o,priceManaWei:d,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:me??0n});if(s&&v.options.some(m=>m.method===s)){if(s==="credits"){Ae(t);return}const m=it(v,s);await st(at(s,t),m,()=>s==="mana"?void rt(t,m):void ot(t,o,d));return}if(v.options.some(m=>m.method==="mana"||m.method==="combined")){k({phase:"choose",lines:t,totalCents:o,manaWei:d}),R(!1);return}if(j!=null&&j.credits<c){Xe(t);return}Ae(t)}function ze(t){return Be({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:me??0n})}const[de,ye]=I.useState(null);function at(t,s){const c=new Map;for(const o of s){const d=fs(t,_e(o));c.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...c.values()]}async function st(t,s,c){const o=[];for(const{spender:d,chainId:v}of t){const m=js(v,d),M=n?await ks(m,n.address,s).catch(()=>!0):!0;$s(n==null?void 0:n.providerType,M)&&o.push(m)}if(o.length===0){c();return}R(!1),nt(o,0,c)}function nt(t,s,c){ye({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?nt(t,s+1,c):c()})}function it(t,s){var c;return((c=t.options.find(o=>o.method===s))==null?void 0:c.manaWei)??0n}function na(t){if((p==null?void 0:p.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:o}=p;if(t==="credits"){Ae(s);return}const d=it(ze(p),t);st(at(t,s),d,()=>t==="mana"?void rt(s,d):void ot(s,c,o))}async function rt(t,s){if(!n||t.length===0)return;const c=je(t),o=c.map(m=>({...m.item,priceCredits:m.priceCredits})),d=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),v=()=>k({phase:"processing",stage:"settling",step:c.length,total:c.length});k({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const m=await ys({trades:Yt(c),mints:Xt(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>u(M.item.id)),D(null),V("Shop Completed Purchase",{...be(o),payment_type:"mana",transaction_hash:m[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Ye(d,m)}catch(m){Ze(m,"buy_cart_mana")}}async function ot(t,s,c){if(!n||t.length===0)return;const o=je(t),d=o.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),m=bs(o.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),M=[],L=new Set,F=new Set;k({phase:"processing",stage:"reserving",step:1,total:o.length});try{const w=o.map(_e),x=[],$=new Map,N=new Map;for(let C=0;C<o.length;C++){const f=o[C],h=w[C],g=m[C],S=vs(Math.max(0,f.usdCents-g),s,c);let b;if(g<=0)b=Mt(h,[],"0");else{k({phase:"processing",stage:"reserving",step:C+1,total:o.length});const B=f.item,{credit:se,maxCreditedValue:ra}=await yt(n.identity,g,h.kind==="trade"?h.trade.id:void 0,B.contractAddress&&B.itemId!=null?{contractAddress:B.contractAddress,itemId:String(B.itemId)}:void 0);M.push({salt:se.id,itemId:B.id}),b=Mt(h,[se],ra)}const E=Is(b);$.set(E,($.get(E)??0n)+S),N.has(E)||N.set(E,x.length),x.push(b)}M.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,f]of $){const h=N.get(C);h==null||f<=0n||(x[h]={...x[h],maxCreditedValue:(BigInt(x[h].maxCreditedValue)+f).toString()})}const U=[...$.values()].reduce((C,f)=>C+f,0n);await aa(n.signer,ws(w[0]),U);const G=()=>k({phase:"processing",stage:"settling",step:o.length,total:o.length});k({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});const T=await Re({purchases:x,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:C})=>C.forEach(f=>L.add(f)),onReverted:({salts:C})=>C.forEach(f=>F.add(f))});t.forEach(C=>u(C.item.id)),D(null),V("Shop Completed Purchase",{...be(d),payment_type:"credits_and_mana",transaction_hash:T[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Ye(v,T)}catch(w){const{toRelease:x}=It({reservations:M,spent:new Set([...L].filter($=>!F.has($))),settled:new Set});x.length&&qe(n.identity,x).catch(()=>{}),M.length&&y.invalidateQueries({queryKey:["usd-balance"]}),Ze(w,"buy_cart_combined")}}async function ee(t){if(!n){$t({type:"cart-checkout"}),Q();return}const s=H.getState().items.filter(Oe);if(s.length===0)return;oe(null),ge(null),R(!0);const c=s.reduce((o,d)=>o+d.priceCredits*d.quantity,0);V("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:xt(c),has_sufficient_credits:xe>=c});try{const o=await Bs(s,n.address,Zt,await et(),ea),d=[...o.unavailable,...o.own];if(d.length&&(d.forEach(v=>u(v.id)),ge(Un(o))),o.buyable.length===0){oe(a("cart.error.noneAvailable")),D(null);return}if(o.orderChanged){D(o),Ue.current=Date.now();return}await tt(o.buyable,t)}catch(o){ne(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),oe(Fe(o))}finally{R(!1)}}async function ct(){if(_){if(!n){$t({type:"cart-checkout"}),Q();return}if(Date.now()-Ue.current>Nn){D(null),ge(null),await ee();return}oe(null),tt(_.buyable)}}async function ia(){if(Me){try{sessionStorage.setItem(we,JSON.stringify(H.getState().items))}catch{}R(!0);try{const t=await Rs(Me,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}Z("/credits")}catch(t){try{sessionStorage.removeItem(we)}catch{}ne(t,{flow:"cart_buy_credits"}),k({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{R(!1)}}}const lt=I.useRef(!1);I.useEffect(()=>{if(!n||lt.current||!ps("cart-checkout"))return;lt.current=!0;const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[n]);const dt=I.useRef(!1);I.useEffect(()=>{if(!(q!=null&&q.resumeCheckout)||dt.current)return;dt.current=!0,le.current=q.creditsAdded??null;try{const s=sessionStorage.getItem(we);if(s){sessionStorage.removeItem(we);const c=JSON.parse(s);Array.isArray(c)&&c.length&&X(c)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[q==null?void 0:q.resumeCheckout]);const ut=I.useRef(!1);I.useEffect(()=>{if(!(q!=null&&q.startCheckout)||ut.current)return;ut.current=!0,Z(".",{replace:!0,state:null});const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[q==null?void 0:q.startCheckout]);const te=Ut||(p==null?void 0:p.phase)==="processing";return i.length===0&&!p?e.jsx(Pt,{children:e.jsxs(zt,{children:[e.jsxs(At,{onClick:()=>Z(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(en,{"data-testid":"cart-empty",children:[e.jsx(O,{name:"cart-plus",size:110}),e.jsxs(tn,{children:[e.jsx(an,{children:a("cart.empty.title")}),e.jsx(sn,{children:a("cart.empty.body")})]}),e.jsx(nn,{to:"/items",children:a("cart.empty.cta")})]})]})}):e.jsxs(Pt,{children:[e.jsxs(zt,{children:[e.jsxs(At,{onClick:()=>Z(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Xs,{children:[e.jsxs(Ys,{children:[e.jsxs(Zs,{children:[e.jsx(rn,{onClick:()=>Z(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(O,{name:"arrow-left"})}),e.jsx(on,{children:a("cart.panelTitle",{count:Ht})}),Qt?e.jsxs(cn,{onClick:()=>Y(!0),disabled:te,children:[e.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(_t,{children:[e.jsx(ln,{children:i.map(t=>{const s=Vt.get(t.id),c=s?s.priceCredits:t.priceCredits,o=!!s&&s.priceCredits!==t.priceCredits,d=!t.tokenId,v=t.quantity,m=typeof t.available=="number"&&v>=t.available,M=c*v,L=wa(t),F=!!L&&!!K[L],w=Ca(t),x=He[t.id],$=!mt(x),N=x==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(dn,{"data-unavailable":$||void 0,children:[e.jsxs(un,{"data-thumb":!0,children:[w?e.jsx(hn,{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(pn,{"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(gn,{children:[e.jsxs(mn,{"data-desc":!0,children:[w?e.jsx(fn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(xn,{title:t.name,children:t.name}),t.creator?e.jsx(yn,{address:t.creator,linkToProfile:!0}):null,Kt&&d?e.jsxs(Tn,{"data-testid":"cart-creator-tag",children:[e.jsx(In,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(bn,{children:$?e.jsxs(Sn,{children:[e.jsx(Mn,{name:"warning-fill",size:24}),N]}):e.jsxs(e.Fragment,{children:[d?e.jsxs(vn,{children:[e.jsx(Et,{onClick:()=>fe(()=>z(t.id)),disabled:te||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(wn,{children:v}),e.jsx(Et,{onClick:()=>fe(()=>P(t.id)),disabled:te||m,"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(Cn,{children:[e.jsx(jn,{})," ",M,o?e.jsx(kn,{children:t.priceCredits*v}):null]})]})})]}),e.jsxs($n,{children:[L?e.jsx(Pn,{"data-on":F||void 0,onClick:()=>re(t),"aria-label":F?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:F?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(O,{name:F?"heart-solid":"heart"})}):null,e.jsx(An,{onClick:()=>fe(()=>u(t.id)),disabled:te,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(O,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(zn,{children:e.jsx("button",{className:"link",onClick:()=>fe(W),disabled:te,children:a("cart.clearCart")})})]})]}),e.jsxs(En,{children:[e.jsx(qn,{children:a("cart.purchaseSummary")}),e.jsxs(Bn,{children:[e.jsxs(Rn,{children:[e.jsx(_n,{children:a("cart.totalItems",{count:Ot})}),e.jsx(Wn,{children:e.jsxs(Fn,{children:[e.jsx(Ln,{})," ",Ve]})})]}),e.jsx(Bt,{options:Pe.options,totalCents:Ie,shortfall:Pe.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Pe.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:te||De,onPay:t=>void(_?ct():ee(t)),creditsFallback:{label:te?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?ct():ee())}}),De?e.jsx(Ce,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(Ce,{className:"muted",children:a("cart.signInHint")}),_?e.jsx(Ce,{className:"muted",children:a("cart.priceChanged")}):null,Ne?e.jsx(Ce,{className:"muted",children:Ne}):null,e.jsx(Kn,{message:Nt})]})]})]})]}),Je.length>0?e.jsx(Qn,{children:e.jsx(gs,{title:a("cart.youMightAlsoLike"),items:Je})}):null,de&&n?e.jsx(ms,{auth:de.auth,signer:n.signer,step:{index:de.index,total:de.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:xs,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=de;ye(null),t()},onCancel:()=>ye(null),onClose:()=>ye(null)}):null,p?e.jsx(Os,{phase:p.phase,balanceCredits:xe,heldCreditsCount:((ht=j==null?void 0:j.held)==null?void 0:ht.credits)??null,onClose:ta,stage:p.phase==="processing"?p.stage:void 0,step:p.phase==="processing"?p.step:void 0,total:p.phase==="processing"?p.total:void 0,isSelfCustody:ja(n==null?void 0:n.providerType),signatures:p.phase==="processing"?p.signatures:void 0,options:p.phase==="choose"?ze(p).options:void 0,shortfall:p.phase==="choose"?ze(p).manaShortfall:void 0,onPay:na,totalCents:p.phase==="choose"?p.totalCents:void 0,totalManaWei:p.phase==="choose"?p.manaWei:void 0,totalCredits:p.phase==="choose"?We(p.lines):void 0,lines:p.phase==="nofunds"?p.lines:void 0,shortfallCredits:p.phase==="nofunds"?p.shortfall:void 0,packs:pe,selectedPack:Me,onSelectPack:Ge,onBuyPacks:()=>void ia(),message:p.phase==="error"?p.message:void 0,heldCredits:p.phase==="error"&&!!p.heldCredits,onRetry:()=>void ee()}):null]})}export{ii as Cart};
|
|
706
|
-
//# sourceMappingURL=Cart-
|
|
706
|
+
//# sourceMappingURL=Cart-C8KIfCxW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ai as R,aj as j,ak as o,al as c,K as _,x as $}from"./index-
|
|
1
|
+
import{ai as R,aj as j,ak as o,al as c,K as _,x as $}from"./index-D6Y48D2b.js";import{r as N,j as h}from"./react-DjgD1SKK.js";import{g as E,a as U,c as z,b as K}from"./clsx-BEtG4eYu.js";import{s as y}from"./styled-CzDgNewG.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="49a56e80-4fa3-4bdc-9d8d-84ae423a203c",r._sentryDebugIdIdentifier="sentry-dbid-49a56e80-4fa3-4bdc-9d8d-84ae423a203c")}catch{}})();function F(r){return E("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,C,P,D,S;const t=44,B=$(C||(C=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -26,4 +26,4 @@ import{ai as R,aj as j,ak as o,al as c,K as _,x as $}from"./index-g9E_6bSc.js";i
|
|
|
26
26
|
`),B)),Z=y("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(r,e)=>e.svg})({display:"block"}),q=y("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.circle,e[`circle${c(s.variant)}`],s.disableShrink&&e.circleDisableShrink]}})(({ownerState:r,theme:e})=>o({stroke:"currentColor"},r.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},r.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:r})=>r.variant==="indeterminate"&&!r.disableShrink&&_(S||(S=l`
|
|
27
27
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
28
28
|
`),G)),Q=N.forwardRef(function(e,s){const a=R({props:e,name:"MuiCircularProgress"}),{className:d,color:u="primary",disableShrink:w=!1,size:f=40,style:I,thickness:i=3.6,value:m=0,variant:v="indeterminate"}=a,M=j(a,W),n=o({},a,{color:u,disableShrink:w,size:f,thickness:i,value:m,variant:v}),p=L(n),g={},k={},x={};if(v==="determinate"){const b=2*Math.PI*((t-i)/2);g.strokeDasharray=b.toFixed(3),x["aria-valuenow"]=Math.round(m),g.strokeDashoffset=`${((100-m)/100*b).toFixed(3)}px`,k.transform="rotate(-90deg)"}return h.jsx(V,o({className:z(p.root,d),style:o({width:f,height:f},k,I),ownerState:n,ref:s,role:"progressbar"},x,M,{children:h.jsx(Z,{className:p.svg,ownerState:n,viewBox:`${t/2} ${t/2} ${t} ${t}`,children:h.jsx(q,{className:p.circle,style:g,ownerState:n,cx:t,cy:t,r:(t-i)/2,fill:"none",strokeWidth:i})})}))});export{Q as C};
|
|
29
|
-
//# sourceMappingURL=CircularProgress-
|
|
29
|
+
//# sourceMappingURL=CircularProgress-CptlGegD.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,d as J,b as X}from"./react-
|
|
1
|
+
import{j as e,r as h,d as J,b as X}from"./react-DjgD1SKK.js";import{t as b,s,a1 as ee,E as T,bu as te,bv as ae,I as oe,b as o,c as ie,h as re,l as se,y as ne,C as ce,ap as z,aq as le,bw as de,bx as pe}from"./index-D6Y48D2b.js";import{E as xe}from"./ErrorNotice-CZNCgTxS.js";import{d as ue,P as he,C as ge,a as me,b as be}from"./collectionPage.styles-D32n3MzW.js";import{u as fe}from"./useStore-B85xvh3X.js";import{u as ye,S as F,a as ve,F as je,c as we,P as Ce,d as $e,H as ke,e as Ne}from"./categories-DMzQeR7X.js";import{L as Se}from"./LoadMore-C1cZ5UNo.js";import{u as Pe}from"./useInfiniteGrid-DVJPBLH3.js";import{G as Ae}from"./grid.styles-BMvDs3g0.js";import"./dcl-schemas-C5Zz5LAu.js";import"./sentry-BzKl6xa_.js";import"./ethers-CA7SNjfo.js";import"./intl-AKLEHPeO.js";import"./skeleton.styles-C2bsI5MR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="04b4a11b-c603-4ff8-933d-09b4f0fb4109",t._sentryDebugIdIdentifier="sentry-dbid-04b4a11b-c603-4ff8-933d-09b4f0fb4109")}catch{}})();const Ee=s.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -160,4 +160,4 @@ import{j as e,r as h,d as J,b as X}from"./react-B9n8JCiV.js";import{t as b,s,a1
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
`,qe=48;function st(){var R;const{contractAddress:t}=J(),a=X(),[n,p]=h.useState("all"),[l,g]=h.useState(null),[m,f]=h.useState([]),[x,y]=h.useState(""),[d,v]=h.useState(""),[k,L]=h.useState("newest");ye(`${n}:${l??""}`);const N=x&&!Number.isNaN(Number(x))?Number(x):void 0,S=d&&!Number.isNaN(Number(d))?Number(d):void 0,B=l?Ne[l]:void 0,D=(F.find(i=>i.key===k)??F[0]).server,P={category:n,rarities:m.length?m:void 0,wearableCategories:B,minPriceCredits:N,maxPriceCredits:S,sortBy:D},{items:j,total:G,isLoading:w,error:A,hasNextPage:H,isFetchingNextPage:E,isFetchNextPageError:U,fetchNextPage:q}=Pe(["collection-page",t,P],i=>de(t,{...P,first:qe,skip:i}),{enabled:!!t}),{data:r}=se({queryKey:["collection-meta",t],queryFn:()=>pe(t),enabled:!!t,staleTime:5*6e4}),M=(r==null?void 0:r.name)||o("collection.fallbackTitle");ne({title:r==null?void 0:r.name,description:r!=null&&r.name?o("seo.collection.description",{name:r.name}):void 0});const I=(r==null?void 0:r.creator)||((R=j[0])==null?void 0:R.creator);function Y(i){p(i),g(null)}function K(i){f(u=>u.includes(i)?u.filter(Z=>Z!==i):[...u,i])}function O(){p("all"),g(null),f([]),y(""),v("")}const C=!!(N||S),Q=C?`${x||"0"}–${d||"∞"}`:o("filter.price"),V=n!=="all"||!!l||m.length>0||C;return e.jsxs(he,{"data-testid":"collection-page",children:[e.jsxs(ge,{"aria-label":o("collection.breadcrumbAria"),children:[e.jsx(me,{onClick:()=>a("/items"),children:o("collection.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(be,{children:M})]}),e.jsx(ze,{name:M,creator:I}),e.jsxs(Ge,{"data-testid":"browse",children:[e.jsxs(Ue,{"data-testid":"browse-sidebar",children:[e.jsx(Be,{address:I}),e.jsx(ve,{category:n,subCategory:l,onCategory:Y,onSub:g,title:o("collection.category"),flat:!0})]}),e.jsxs(He,{children:[e.jsx(je,{rarities:m,onToggleRarity:K,sort:k,onSort:L,total:G,loading:w,anyActive:V,onClear:O,renderTrailing:i=>e.jsx(we,{panelKey:"price",label:Q,active:C,panel:i,children:e.jsxs(Ce,{"data-variant":"price",children:[e.jsxs($e,{children:[e.jsx("input",{type:"number",min:"0","aria-label":o("collection.priceMin"),placeholder:o("collection.priceMinPlaceholder"),value:x,onChange:u=>y(u.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":o("collection.priceMax"),placeholder:o("collection.priceMaxPlaceholder"),value:d,onChange:u=>v(u.target.value)})]}),e.jsx(ke,{children:o("collection.priceHint",{currency:ce.name})})]})})}),A?e.jsx(xe,{message:o("collection.error")}):null,e.jsx(Ae,{"data-testid":"grid",children:w?e.jsx(z,{count:15}):e.jsxs(e.Fragment,{children:[j.map(i=>e.jsx(le,{item:i},i.id)),E?e.jsx(z,{count:6}):null]})}),e.jsx(Se,{hasNextPage:H,isFetching:E,isError:U,onLoadMore:()=>void q()}),!w&&!A&&j.length===0?e.jsx("p",{className:"muted",children:o("collection.empty")}):null]})]})]})}export{st as Collection,st as default};
|
|
163
|
-
//# sourceMappingURL=Collection-
|
|
163
|
+
//# sourceMappingURL=Collection-B3jdmrAL.js.map
|