@dcl/shop 0.1.0-30362033606.commit-6679fb7 → 0.1.0-30381444187.commit-e5b9f13
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-B63zG8uY.js +291 -0
- package/assets/{AnimatedBackground-iEufGyJM.js → AnimatedBackground-CWPdO0WE.js} +1 -1
- package/assets/{Assets-D_qxhH0_.js → Assets-WnaUem5h.js} +4 -4
- package/assets/{Assets.styles-CLuTJVZD.js → Assets.styles-Dmhspue_.js} +1 -1
- package/assets/{Authorizations-GHs_v1B1.js → Authorizations-CAStHHID.js} +1 -1
- package/assets/{Button-BhJV9mDs.js → Button-BDUHWtxg.js} +2 -2
- package/assets/{Cart-CruglxJv.js → Cart-D-YOXeH9.js} +1 -1
- package/assets/{CircularProgress-epyn6nc6.js → CircularProgress-CpOs7g9a.js} +1 -1
- package/assets/{Collection-Djuc0POi.js → Collection-9Fu4_XnC.js} +1 -1
- package/assets/{CollectionCarousel-DKG8cPgV.js → CollectionCarousel-CzvvuUUw.js} +5 -5
- package/assets/{ConstantsUtil-CqaPdSAF.js → ConstantsUtil-DTrOBzCe.js} +1 -1
- package/assets/{ContentClient-0BEnf6CP.js → ContentClient-jyMKirlf.js} +1 -1
- package/assets/{Creator-eSug8_TQ.js → Creator-3NXIbePD.js} +1 -1
- package/assets/{DeploymentBuilder-Df9ZJakk.js → DeploymentBuilder-j08uBP-r.js} +1 -1
- package/assets/{ErrorNotice-D_Z5OVFI.js → ErrorNotice-BG40E5Ff.js} +1 -1
- package/assets/{ExchangeController-Ct4Ki5nB.js → ExchangeController-CL_gVqSw.js} +1 -1
- package/assets/{GetCredits-XtvdCK97.js → GetCredits-DSK7zyc2.js} +1 -1
- package/assets/{HelpersUtil-CYSRpIiK.js → HelpersUtil-BfapKZKr.js} +1 -1
- package/assets/ImportListings-DZs_dFSO.js +5 -0
- package/assets/{ItemDetail-AWy_u3GL.js → ItemDetail-D49gDAwf.js} +134 -134
- package/assets/{LoadMore-BTQZzU_a.js → LoadMore-DTUpuDyu.js} +1 -1
- package/assets/MarketCheckout-CoUO17KO.js +3 -0
- package/assets/{MenuList-BF1nXMBL.js → MenuList-DQbLlN7L.js} +1 -1
- package/assets/{MyAssets-crgNspr4.js → MyAssets-DJ0hwGXR.js} +16 -16
- package/assets/{MyFavorites-DSuisiq3.js → MyFavorites-D3n_-d0Z.js} +1 -1
- package/assets/{NetworkUtil-DQZGJzap.js → NetworkUtil-C1aEwuOK.js} +1 -1
- package/assets/{NotFound-B8sPg1gR.js → NotFound-MMFCqdKn.js} +1 -1
- package/assets/{NotificationsBell-c4MiNFUe.js → NotificationsBell-CNLR9ard.js} +1 -1
- package/assets/{StoreSettings-HSUnq4XZ.js → StoreSettings-CdSK69sU.js} +1 -1
- package/assets/{Success-rVm2tk33.js → Success-KKN_AjMe.js} +2 -2
- package/assets/{SwapController-FYPbMPBT.js → SwapController-BNkoWTIp.js} +1 -1
- package/assets/{Tooltip-CRNJUi7h.js → Tooltip-CBuz_rc2.js} +5 -5
- package/assets/{TradeService-BMX7g6F3.js → TradeService-Dm_ASWCN.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-Bo3pJwFX.js → W3MFrameProviderSingleton-CeSRgOaN.js} +3 -3
- package/assets/{WebCryptoP256-YM8V8hE_.js → WebCryptoP256-GalvwmvU.js} +1 -1
- package/assets/{authorizations-B3unAuyK.js → authorizations-Ds7LRLV0.js} +1 -1
- package/assets/{basic-CqYT-xKy.js → basic-D_j1sfcj.js} +1 -1
- package/assets/{biconomy-DdUJ1TI6.js → biconomy-YD94PgiS.js} +1 -1
- package/assets/{browser-BgOlLsTO.js → browser-CTzRZpIE.js} +1 -1
- package/assets/browser-ponyfill-6L1OGOLN.js +1 -0
- package/assets/{browser-ponyfill-CMZ3i8tY.js → browser-ponyfill-CI1-rMvf.js} +1 -1
- package/assets/{builder-0ySmkHq4.js → builder-Cc8g4-4q.js} +1 -1
- package/assets/{buy-G_ozgV7F.js → buy-DnSS_Kop.js} +1 -1
- package/assets/buy-gasless-9Zn1yAMk.js +1 -0
- package/assets/{cart-checkout-BWnjrd9o.js → cart-checkout-BAugwPm6.js} +1 -1
- package/assets/{categories-Es6QIUbi.js → categories-BI9AXlDF.js} +1 -1
- package/assets/{ccip-CbLx66OQ.js → ccip-CiESIEiQ.js} +1 -1
- package/assets/{ccip-CQ3kYqry.js → ccip-bHN-8eS1.js} +1 -1
- package/assets/{chains-Bk8fyLPj.js → chains-Znt1BTfw.js} +1 -1
- package/assets/collection-DE3QnCpW.js +1 -0
- package/assets/{common-CI-kmbOq.js → common-D9tSChDa.js} +1 -1
- package/assets/{controller-BBOeHMtg.js → controller-B2JIau8v.js} +2 -2
- package/assets/{core-DuCtOV4j.js → core-3cHR7yu5.js} +4 -4
- package/assets/{custom-Dux_cR5y.js → custom-BFV9Niby.js} +1 -1
- package/assets/{data-capture-BtkbB29s.js → data-capture-DTqon_Ye.js} +1 -1
- package/assets/decimals-Bmvg-V50.js +1 -0
- package/assets/{decimals-CIbX1tiW.js → decimals-C4nLn1ac.js} +1 -1
- package/assets/{detectExtension-DObVoAzH.js → detectExtension-BgMIFAUw.js} +1 -1
- package/assets/{email-CQ3uWiN7.js → email-CN7CWhKF.js} +1 -1
- package/assets/{embedded-wallet-D6ThwibN.js → embedded-wallet-Q6nTAiGf.js} +1 -1
- package/assets/{emotion-styled.browser.esm-rdVqxNso.js → emotion-styled.browser.esm-DU8E1n2c.js} +1 -1
- package/assets/{engine-BbDeZ4M-.js → engine-DoRvgWV1.js} +1 -1
- package/assets/{errors-B3QlpNKh.js → errors-CG6pp58g.js} +1 -1
- package/assets/estimate-l1-fee-DIch6QAI.js +1 -0
- package/assets/eth_estimateGas-JYqF9U1i.js +1 -0
- package/assets/{eth_getStorageAt-y8U-lfEv.js → eth_getStorageAt--oQrWy0Q.js} +1 -1
- package/assets/eth_getTransactionCount-BEhAgz2O.js +1 -0
- package/assets/{ethereum-D72JFjbG.js → ethereum-3zUUm4Pr.js} +1 -1
- package/assets/{ethers-BteKixT0.js → ethers-CtVvB8eG.js} +1 -1
- package/assets/{execute-CuvSUGCv.js → execute-UcJesME5.js} +2 -2
- package/assets/{extractIPFS-BVwwoxM1.js → extractIPFS-BmriCqG8.js} +1 -1
- package/assets/{features-C5pmu6GA.js → features-B53I2xTg.js} +1 -1
- package/assets/{fetchTokenMetadata-Vkw7Qayd.js → fetchTokenMetadata-CqYkUkwH.js} +2 -2
- package/assets/{fortmatic-uodRBNqF.js → fortmatic-DM_o40Lo.js} +1 -1
- package/assets/{get-bytecode-PhqNpgKV.js → get-bytecode-C6TlbHJu.js} +1 -1
- package/assets/get-ecosystem-wallet-info-HoRTPbSm.js +1 -0
- package/assets/{getBalance-BBhNKCqJ.js → getBalance-BMDqICQz.js} +2 -2
- package/assets/{getInstalledModules-DS4FSkHX.js → getInstalledModules-BLQxYEXn.js} +1 -1
- package/assets/{getNFT-Bs83vt27.js → getNFT-6TA-E6XX.js} +2 -2
- package/assets/getNFT-WdF3UG1j.js +1 -0
- package/assets/getThemeProps-HByDG2pD.js +1 -0
- package/assets/{hashTypedData-DdM26gim.js → hashTypedData-BGvyK_O1.js} +1 -1
- package/assets/{hashTypedData-CRyVzapS.js → hashTypedData-ug9gj3v5.js} +1 -1
- package/assets/import-CZZ9-DX_.js +1 -0
- package/assets/{in-app-BvBGB6Fh.js → in-app-BXpVuL_f.js} +1 -1
- package/assets/{in-app-wallet-calls-B-BvRXhc.js → in-app-wallet-calls-Cw2KNfOh.js} +1 -1
- package/assets/{index-BUjNpZOK.js → index-2RpQo6sW.js} +1 -1
- package/assets/{index-BYonXszl.js → index-2jouHGho.js} +1 -1
- package/assets/{index-DlO08MsL.js → index-8wx1oJ_F.js} +2 -2
- package/assets/{index-BJ86ZwVJ.js → index-B0SdAX-m.js} +1 -1
- package/assets/{index-D1MCC2DS.js → index-B1saYH84.js} +1 -1
- package/assets/{index-CdccZQ_A.js → index-B2DUxMjO.js} +1 -1
- package/assets/{index-CsB5T8lQ.js → index-B5JNl4HC.js} +1 -1
- package/assets/index-B6MKNzS8.js +1 -0
- package/assets/{index-CpCOc_0i.js → index-B7jIFcHs.js} +2 -2
- package/assets/{index-BHxCSgWX.js → index-BBeW5CPj.js} +1 -1
- package/assets/{index-CJIwpbLW.js → index-BDwWglvl.js} +1 -1
- package/assets/{index-C_brH2k2.js → index-BEmTYNSG.js} +1 -1
- package/assets/{index-C3SS5bz4.js → index-BG7lZdfP.js} +1 -1
- package/assets/{index-4i696-lE.js → index-BHPkQDns.js} +1 -1
- package/assets/{index-ByGwjpMp.js → index-BOMAmQU7.js} +1 -1
- package/assets/{index-CBZo3NZq.js → index-BQe1IsNb.js} +2 -2
- package/assets/{index-Ded3SJr4.js → index-BTV13rXH.js} +1 -1
- package/assets/{index-CMYPEZgT.js → index-BZ6S4-Qy.js} +1 -1
- package/assets/{index-CH_NAbJs.js → index-BeeMSgi1.js} +1 -1
- package/assets/{index-NezN4_GC.js → index-Bq0YYsbG.js} +1 -1
- package/assets/{index-CZsWD06k.js → index-BqPcUFuz.js} +1 -1
- package/assets/{index-5PxxT_Hi.js → index-BvrGtJes.js} +1 -1
- package/assets/{index-DhSu6yft.js → index-C0ACz6_-.js} +1 -1
- package/assets/{index-DFnEt9BN.js → index-C68XxPCY.js} +1 -1
- package/assets/{index-a5aMOiol.js → index-C7TVyPoU.js} +1 -1
- package/assets/{index-B5I913jj.js → index-CDEPMu43.js} +3 -3
- package/assets/{index-Bn4g5O31.js → index-CEcu6qlS.js} +2 -2
- package/assets/{index-D2Zsvd3f.js → index-CKSJdo5m.js} +1 -1
- package/assets/{index-D7uajZIF.js → index-CSZuXP_O.js} +1 -1
- package/assets/{index-ClCqW_rO.js → index-CYMsLttB.js} +1 -1
- package/assets/{index-BURKzVS1.js → index-CaR23uYb.js} +1 -1
- package/assets/{index-B4z3h9SS.js → index-CeKksx_X.js} +1 -1
- package/assets/{index-zv5mxAYx.js → index-CjpRvZkq.js} +1 -1
- package/assets/{index-nJZkl4yb.js → index-CkWJ4sTo.js} +1 -1
- package/assets/{index-DNjpXMun.js → index-CmgZ4NMC.js} +1 -1
- package/assets/{index-wC0QnbPi.js → index-CmgoqHgW.js} +1 -1
- package/assets/{index-DA2_HcoB.js → index-Cy8JAEGy.js} +1 -1
- package/assets/{index-H3CdymL9.js → index-D0fJ7qrq.js} +1 -1
- package/assets/{index-BAGLKm-V.js → index-D7r-KbUN.js} +1 -1
- package/assets/{index-YP58zh-H.js → index-D95ZUsPD.js} +1 -1
- package/assets/{index-2MAAQV09.js → index-D9gz4wTG.js} +1 -1
- package/assets/{index-p57r9lnj.js → index-DGIUeX6X.js} +1 -1
- package/assets/{index-CzQl6pS8.js → index-DaGhU6Uz.js} +1 -1
- package/assets/{index-CjxT1gx4.js → index-DiGXPxzb.js} +1 -1
- package/assets/{index-Bthwkhf8.js → index-DpXleRYB.js} +1 -1
- package/assets/{index-D1vVk8OZ.js → index-DqLpZ4oP.js} +1 -1
- package/assets/{index-DZr0hKxc.js → index-Dr9lSl0n.js} +1 -1
- package/assets/{index-dg4grBtF.js → index-ExvBrBJ4.js} +2 -2
- package/assets/{index-BkuRUv0H.js → index-F-n6GV2b.js} +1 -1
- package/assets/{index-BX_i57O_.js → index-F_0Er667.js} +2 -2
- package/assets/{index-D-WoE9lZ.js → index-Fe4H2sUE.js} +1 -1
- package/assets/{index-BgyvxrzE.js → index-FvnJRnD5.js} +3 -3
- package/assets/{index-Dlx6rt2u.js → index-G_lkaThL.js} +1 -1
- package/assets/{index-Dai5XPjM.js → index-TmxHL85j.js} +31 -31
- package/assets/{index-CAs9TZEG.js → index-Y77Y_U0L.js} +1 -1
- package/assets/{index-B7JI7ldm.js → index-Z5LdHVdI.js} +1 -1
- package/assets/{index-DV0XdLTX.js → index-_hV86vSn.js} +1 -1
- package/assets/{index-BtE-jNvg.js → index-b39aIkkP.js} +1 -1
- package/assets/{index-DfCBTENl.js → index-euFuE7ah.js} +1 -1
- package/assets/{index-CL6c3iVg.js → index-gxa5wyAJ.js} +3 -3
- package/assets/{index-9s4_sQX7.js → index-m5R1RgvV.js} +1 -1
- package/assets/{index-BMVr9JEp.js → index-ogLhf7-S.js} +1 -1
- package/assets/{index-CVi7PdPM.js → index-tFmbSlHL.js} +1 -1
- package/assets/{index.es-d7QjqFps.js → index.es-CmoiU8SE.js} +1 -1
- package/assets/{index.es-B9qRsTw5.js → index.es-DD7iT23u.js} +4 -4
- package/assets/{index.es-CC0hx--A.js → index.es-DDEozdoq.js} +1 -1
- package/assets/{linkAccount-6BFCh5cx.js → linkAccount-BR5_llhd.js} +1 -1
- package/assets/{localBatchGatewayRequest-BGKFudjd.js → localBatchGatewayRequest-BGfmM9P7.js} +1 -1
- package/assets/{mana-rate-Dh0XRmbf.js → mana-rate-C8zn6Vfu.js} +1 -1
- package/assets/{native-15jVjX8Y.js → native-BSpg_u0K.js} +1 -1
- package/assets/{networks-CJHR4Hzo.js → networks-CBAVrHYh.js} +1 -1
- package/assets/{onramp-DCythIMd.js → onramp-dft5bcN9.js} +1 -1
- package/assets/{openzeppelin-CvXZ_iOn.js → openzeppelin-WekOcr_Z.js} +1 -1
- package/assets/{ownerOf-CFrKicrH.js → ownerOf-D9UDfElT.js} +1 -1
- package/assets/{parseNft-CFMan3R8.js → parseNft-DTV6iT7B.js} +2 -2
- package/assets/{parseSignature-B2ae5H_l.js → parseSignature-C7rL0b_w.js} +3 -3
- package/assets/{parseSignature-BFD_ILq0.js → parseSignature-DmkHq9fC.js} +1 -1
- package/assets/{passkeys-CTuv_5P6.js → passkeys--Px7LRhh.js} +1 -1
- package/assets/{pay-with-exchange-CWNTkcKw.js → pay-with-exchange-CMQeyenn.js} +1 -1
- package/assets/{prepare-contract-call-DUVOtgM0.js → prepare-contract-call-CHrp3EL4.js} +1 -1
- package/assets/{qr-overlay-iuHA89Qf.js → qr-overlay-Dz377WEQ.js} +3 -3
- package/assets/{react-B36MyIP_.js → react-BW1xvPTF.js} +1 -1
- package/assets/{receive-DjFemyyC.js → receive-CpDxltQB.js} +1 -1
- package/assets/{resolveImplementation-DYl32KDg.js → resolveImplementation-CFOrDNcu.js} +1 -1
- package/assets/{rpc-Cx_JL8Xb.js → rpc-CjfGBkRY.js} +1 -1
- package/assets/{secp256k1-B7JhrCDg.js → secp256k1-C77TwNwR.js} +1 -1
- package/assets/{secp256k1-CltAnO7K.js → secp256k1-DSadr9B6.js} +1 -1
- package/assets/{secp256k1-CPWzTneR.js → secp256k1-Dgs0hNIB.js} +1 -1
- package/assets/{send-BrpjMOTP.js → send-BMIoBrdl.js} +1 -1
- package/assets/{send-batch-transaction-CbDS0Qog.js → send-batch-transaction-CZ5LHGtL.js} +1 -1
- package/assets/{send-eip712-transaction-CTcgkhR6.js → send-eip712-transaction-DmvWUFiv.js} +2 -2
- package/assets/send-gasless-transaction-DxLNFATn.js +2 -0
- package/assets/{send-transaction-B7OJlw7I.js → send-transaction-DVEripxy.js} +2 -2
- package/assets/{sendMetaTransaction-r8fzkVlB.js → sendMetaTransaction-7YAoB-pL.js} +1 -1
- package/assets/{sendRawTransaction-DsHI9qgM.js → sendRawTransaction-BXyfyJLD.js} +3 -3
- package/assets/{sentry-gZJVwIqQ.js → sentry-BV_ZSgtd.js} +1 -1
- package/assets/{serializeTransaction-xwHKCWao.js → serializeTransaction-BkF9WfrN.js} +1 -1
- package/assets/{session-proposal-IxK8YbH3.js → session-proposal-DoIVwtwv.js} +1 -1
- package/assets/{session-request-DVsQQiDu.js → session-request-C3QQi3mV.js} +2 -2
- package/assets/{sha256-DDEIajFz.js → sha256-BImz_UXn.js} +1 -1
- package/assets/{signing-DG3xJRlW.js → signing-BInyigJZ.js} +3 -3
- package/assets/{socials-BwXT1X55.js → socials-HN5nwNut.js} +1 -1
- package/assets/{swaps-BH6mkFik.js → swaps-Dbu6ix4y.js} +1 -1
- package/assets/{thirdweb-BVpV6K-m.js → thirdweb-DY9iSWOj.js} +3 -3
- package/assets/{to-serializable-transaction-CjhXjs-A.js → to-serializable-transaction-DFrgce7C.js} +2 -2
- package/assets/{totalSupply-CGOKYv2C.js → totalSupply-D4j1WOYW.js} +1 -1
- package/assets/{trade-encoding-DyS_yWBn.js → trade-encoding-CcRCeIpG.js} +1 -1
- package/assets/{transaction-C_LVUDbA.js → transaction-BOS1fhp8.js} +1 -1
- package/assets/{transactionReceipt-rNz8j7SE.js → transactionReceipt-5vjrQVvz.js} +1 -1
- package/assets/{transactions-Bmo025ie.js → transactions-DLwOfx7v.js} +1 -1
- package/assets/useCreditPacks-Dft_m4Vq.js +1 -0
- package/assets/{useInfiniteGrid-rJdstFin.js → useInfiniteGrid-pff93KiW.js} +1 -1
- package/assets/useManaRate-C5mRxzeC.js +1 -0
- package/assets/useSecondarySales-BRJGIRwF.js +1 -0
- package/assets/{useStore-DkvGYgqc.js → useStore-CV_90SkB.js} +2 -2
- package/assets/useTheme-cgcgN0ze.js +1 -0
- package/assets/{utils-swuB5ZX6.js → utils-B7rjkjB1.js} +1 -1
- package/assets/{verifyHash-CwPWQPwT.js → verifyHash-BJDJ-yWB.js} +1 -1
- package/assets/{w3m-modal-C1Ym3Jda.js → w3m-modal-C_4vaAKJ.js} +1 -1
- package/assets/{w3m-modal-D2-gzhTC.js → w3m-modal-Cs01ZX0b.js} +1 -1
- package/assets/{wait-for-tx-receipt-CDninVEz.js → wait-for-tx-receipt-CYy9IgHg.js} +1 -1
- package/assets/{wallets-CrqEt-GS.js → wallets-D4ZcCkX2.js} +5 -5
- package/assets/{web-connector-DQoPqph2.js → web-connector-p1b6xGQr.js} +3 -3
- package/assets/{writeContract-eGc70oTI.js → writeContract-Cl5bVpey.js} +1 -1
- package/assets/{zora-sepolia-BltAzWAs.js → zora-sepolia-CVS3owSi.js} +1 -1
- package/assets/{zoraTestnet-DYX03m-Z.js → zoraTestnet-Dg220Oc3.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Activity-BLNPi_3I.js +0 -287
- package/assets/ImportListings-BqR-zEJR.js +0 -5
- package/assets/MarketCheckout-rGu14iiZ.js +0 -3
- package/assets/browser-ponyfill-lfpnveOA.js +0 -1
- package/assets/buy-gasless-Mzedr7ex.js +0 -1
- package/assets/collection-CUUdfXnW.js +0 -1
- package/assets/decimals-CS6j__sw.js +0 -1
- package/assets/estimate-l1-fee-DnuQRU3q.js +0 -1
- package/assets/eth_estimateGas-D2jEM0E-.js +0 -1
- package/assets/eth_getTransactionCount-CME439qZ.js +0 -1
- package/assets/get-ecosystem-wallet-info-y1X5AZ_K.js +0 -1
- package/assets/getNFT-CqpZBPAh.js +0 -1
- package/assets/getThemeProps-C13FKFea.js +0 -1
- package/assets/import-DRcmHaW1.js +0 -1
- package/assets/index-DpPUc0sl.js +0 -1
- package/assets/send-gasless-transaction-DbFAFDf9.js +0 -2
- package/assets/useCreditPacks-lMN2Cy0g.js +0 -1
- package/assets/useManaRate-DLQBcAci.js +0 -1
- package/assets/useTheme-BWX-jis-.js +0 -1
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import{r as b,j as e,L as _,e as dt}from"./react-BW1xvPTF.js";import{s as l,K as o,R as lt,B as ht,x as ut,t as d,u as xt,n as j,I as g,aG as B,aH as G,aI as pt,C as v,aJ as mt,an as E,S as Q,A as gt,aK as ft,aL as X}from"./index-TmxHL85j.js";import{a as yt}from"./mana-rate-C8zn6Vfu.js";import{u as bt}from"./useManaRate-C5mRxzeC.js";import{L as jt}from"./LoadMore-DTUpuDyu.js";import{u as f}from"./useInfiniteGrid-pff93KiW.js";import"./sentry-BV_ZSgtd.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CtVvB8eG.js";import"./intl-CBcMB1D2.js";const vt=15e3;function kt(t,i){return t.txHash&&i.txHash?t.txHash===i.txHash:t.txHash||i.txHash?!1:t.status===i.status&&Math.abs(t.createdAt-i.createdAt)<=vt}function wt(t){const i=[...t].sort((a,n)=>n.createdAt-a.createdAt),s=[];for(const a of i){const n=s[s.length-1];n&&kt(n[n.length-1],a)?n.push(a):s.push([a])}return s.map(a=>{var n;return{id:((n=a.find(c=>c.txHash))==null?void 0:n.txHash)??a[a.length-1].id,createdAt:Math.max(...a.map(c=>c.createdAt)),status:a.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:a.reduce((c,u)=>c+u.credits,0),lines:a}})}function It(t){const i=[],s=new Map;for(const a of t)if(a.tradeId){const n=s.get(a.tradeId);if(n){n.quantity+=1,n.credits+=a.credits;continue}const c={key:a.tradeId,tradeId:a.tradeId,quantity:1,credits:a.credits};s.set(a.tradeId,c),i.push(c)}else i.push({key:a.id,tradeId:null,quantity:1,credits:a.credits});return i}function At(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?yt(t.manaWei,i):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function $t(t){const s=wt(t.purchases.filter(r=>r.status!=="EXPIRED")).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),a=t.sales.map(r=>{const x=At(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),n=(t.creditOrders??[]).filter(r=>r.status!=="failed").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(t.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),u=(t.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...a,...n,...u].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Pt(t,i){return i==="all"?t:i==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const J=t=>t.trim().toLowerCase();function Lt(t){const i=new Map;for(const s of t??[]){const a=J(s.txHash??"");if(!a)continue;const n=i.get(a);n?n.push(s):i.set(a,[s])}return i}function Nt(t,i,s=Date.now()){const a=i.txHash?t.get(J(i.txHash)):void 0;if(!a||a.length===0)return{kind:"direct"};const n=a.length===1?Et(a[0].netCents):null,c=a.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:n};const u=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:n,availableAt:u}}function Et(t){return Math.floor(t/10)}const Tt="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381444187.commit-e5b9f13/assets/credits-product-vs4Q6u6l.svg",T=lt`
|
|
2
|
+
0% { background-position: 200% 0; }
|
|
3
|
+
100% { background-position: -200% 0; }
|
|
4
|
+
`,Ct=l.section`
|
|
5
|
+
width: 100%;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
min-height: 60vh;
|
|
8
|
+
/* Centre the whole column — heading, tabs and cards as ONE block — so the feed isn't parked against
|
|
9
|
+
the left edge of a wide page. Centring only the list would leave the heading orphaned from it. */
|
|
10
|
+
max-width: 760px;
|
|
11
|
+
margin-inline: auto;
|
|
12
|
+
`,St=l.div`
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: baseline;
|
|
15
|
+
gap: 12px;
|
|
16
|
+
margin-bottom: 20px;
|
|
17
|
+
`,Ft=l.h1`
|
|
18
|
+
font-family: ${o.font.sans};
|
|
19
|
+
margin: 0;
|
|
20
|
+
`;l.span`
|
|
21
|
+
color: ${o.colors.muted};
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
`;const Mt=l.div`
|
|
24
|
+
display: flex;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
margin-bottom: 20px;
|
|
27
|
+
flex-wrap: wrap;
|
|
28
|
+
`,Dt=l.button`
|
|
29
|
+
appearance: none;
|
|
30
|
+
border: 1px solid ${o.colors.line};
|
|
31
|
+
background: ${o.colors.white};
|
|
32
|
+
color: ${o.colors.text};
|
|
33
|
+
font-family: ${o.font.sans};
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
padding: 8px 16px;
|
|
37
|
+
min-height: 40px;
|
|
38
|
+
border-radius: ${o.radius.pill};
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
transition:
|
|
41
|
+
background 0.15s,
|
|
42
|
+
border-color 0.15s,
|
|
43
|
+
color 0.15s;
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
background: ${o.colors.media};
|
|
47
|
+
}
|
|
48
|
+
&:focus-visible {
|
|
49
|
+
outline: 2px solid ${o.colors.accent};
|
|
50
|
+
outline-offset: 2px;
|
|
51
|
+
}
|
|
52
|
+
&[data-active='true'] {
|
|
53
|
+
background: ${o.colors.accent};
|
|
54
|
+
border-color: ${o.colors.accent};
|
|
55
|
+
color: ${o.colors.white};
|
|
56
|
+
}
|
|
57
|
+
`,K=l.div`
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: 16px;
|
|
61
|
+
`,k=l.div`
|
|
62
|
+
background: ${o.colors.white};
|
|
63
|
+
border: 1px solid ${o.colors.line};
|
|
64
|
+
border-radius: 16px;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
`,w=l.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
gap: 12px;
|
|
71
|
+
padding: 14px 18px;
|
|
72
|
+
background: ${o.colors.softWhite};
|
|
73
|
+
border-bottom: 1px solid ${o.colors.line};
|
|
74
|
+
|
|
75
|
+
${o.media.down("mobile")} {
|
|
76
|
+
flex-wrap: wrap;
|
|
77
|
+
}
|
|
78
|
+
`,I=l.div`
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
gap: 2px;
|
|
82
|
+
min-width: 0;
|
|
83
|
+
`,A=l.span`
|
|
84
|
+
font-weight: 700;
|
|
85
|
+
color: ${o.colors.text};
|
|
86
|
+
`,$=l.span`
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
color: ${o.colors.muted};
|
|
89
|
+
`,P=l.div`
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 14px;
|
|
93
|
+
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
94
|
+
leading thumbnail, giving the head three children instead of two). */
|
|
95
|
+
margin-left: auto;
|
|
96
|
+
`,Ht=l.div`
|
|
97
|
+
flex: 0 0 auto;
|
|
98
|
+
width: 52px;
|
|
99
|
+
height: 52px;
|
|
100
|
+
border-radius: 10px;
|
|
101
|
+
background: ${o.colors.media};
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
|
|
106
|
+
img {
|
|
107
|
+
width: 30px;
|
|
108
|
+
height: 30px;
|
|
109
|
+
display: block;
|
|
110
|
+
}
|
|
111
|
+
`,L=l.span`
|
|
112
|
+
font-size: 11px;
|
|
113
|
+
font-weight: 700;
|
|
114
|
+
text-transform: uppercase;
|
|
115
|
+
letter-spacing: 0.03em;
|
|
116
|
+
padding: 4px 10px;
|
|
117
|
+
border-radius: ${o.radius.pill};
|
|
118
|
+
white-space: nowrap;
|
|
119
|
+
|
|
120
|
+
&[data-status='SETTLED'] {
|
|
121
|
+
background: rgba(30, 166, 114, 0.14);
|
|
122
|
+
color: ${o.colors.okStrong};
|
|
123
|
+
}
|
|
124
|
+
&[data-status='PENDING'] {
|
|
125
|
+
background: rgba(245, 166, 35, 0.16);
|
|
126
|
+
color: #b5790a;
|
|
127
|
+
}
|
|
128
|
+
&[data-status='SOLD'] {
|
|
129
|
+
background: rgba(103, 58, 183, 0.14);
|
|
130
|
+
color: ${o.colors.accent};
|
|
131
|
+
}
|
|
132
|
+
&[data-status='FAILED'] {
|
|
133
|
+
background: rgba(214, 61, 61, 0.14);
|
|
134
|
+
color: #b02a2a;
|
|
135
|
+
}
|
|
136
|
+
`,p=l.div`
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 5px;
|
|
140
|
+
font-weight: 800;
|
|
141
|
+
color: ${o.colors.text};
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
|
|
144
|
+
.ccy-mark {
|
|
145
|
+
width: 16px;
|
|
146
|
+
height: 16px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Money received (a sale) reads as income in the shop's success green.
|
|
150
|
+
&[data-kind='income'] {
|
|
151
|
+
color: ${o.colors.okStrong};
|
|
152
|
+
}
|
|
153
|
+
`,Z=l.img`
|
|
154
|
+
width: 16px;
|
|
155
|
+
height: 16px;
|
|
156
|
+
vertical-align: -0.15em;
|
|
157
|
+
`,zt=l.span`
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
`,qt=l.span`
|
|
162
|
+
position: fixed;
|
|
163
|
+
transform: translateX(-50%);
|
|
164
|
+
padding: 6px 8px;
|
|
165
|
+
border-radius: 6px;
|
|
166
|
+
background: #16141a;
|
|
167
|
+
color: #fff;
|
|
168
|
+
font-size: 12px;
|
|
169
|
+
font-weight: 600;
|
|
170
|
+
line-height: 1;
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
173
|
+
pointer-events: none;
|
|
174
|
+
z-index: 9999;
|
|
175
|
+
`,C=l.div`
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
`,N=l.div`
|
|
179
|
+
display: grid;
|
|
180
|
+
grid-template-columns: 52px 1fr auto;
|
|
181
|
+
align-items: center;
|
|
182
|
+
gap: 14px;
|
|
183
|
+
padding: 12px 18px;
|
|
184
|
+
text-decoration: none;
|
|
185
|
+
color: inherit;
|
|
186
|
+
|
|
187
|
+
& + & {
|
|
188
|
+
border-top: 1px solid ${o.colors.line};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&[data-link='true'] {
|
|
192
|
+
transition: background 0.15s;
|
|
193
|
+
}
|
|
194
|
+
&[data-link='true']:hover {
|
|
195
|
+
background: ${o.colors.media};
|
|
196
|
+
}
|
|
197
|
+
&[data-link='true']:focus-visible {
|
|
198
|
+
outline: 2px solid ${o.colors.accent};
|
|
199
|
+
outline-offset: -2px;
|
|
200
|
+
}
|
|
201
|
+
`,S=l.div`
|
|
202
|
+
width: 52px;
|
|
203
|
+
height: 52px;
|
|
204
|
+
border-radius: 10px;
|
|
205
|
+
background: ${o.colors.media};
|
|
206
|
+
overflow: hidden;
|
|
207
|
+
display: flex;
|
|
208
|
+
align-items: center;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
color: ${o.colors.muted2};
|
|
211
|
+
|
|
212
|
+
img {
|
|
213
|
+
width: 100%;
|
|
214
|
+
height: 100%;
|
|
215
|
+
object-fit: contain;
|
|
216
|
+
}
|
|
217
|
+
`,F=l.div`
|
|
218
|
+
width: 52px;
|
|
219
|
+
height: 52px;
|
|
220
|
+
border-radius: 10px;
|
|
221
|
+
background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
|
|
222
|
+
background-size: 200% 100%;
|
|
223
|
+
animation: ${T} 1.3s infinite linear;
|
|
224
|
+
|
|
225
|
+
@media (prefers-reduced-motion: reduce) {
|
|
226
|
+
animation: none;
|
|
227
|
+
}
|
|
228
|
+
`,M=l.div`
|
|
229
|
+
min-width: 0;
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
gap: 2px;
|
|
233
|
+
`,D=l.span`
|
|
234
|
+
font-weight: 700;
|
|
235
|
+
white-space: nowrap;
|
|
236
|
+
overflow: hidden;
|
|
237
|
+
text-overflow: ellipsis;
|
|
238
|
+
`,H=l.span`
|
|
239
|
+
display: inline-block;
|
|
240
|
+
width: 140px;
|
|
241
|
+
max-width: 60%;
|
|
242
|
+
height: 12px;
|
|
243
|
+
border-radius: 6px;
|
|
244
|
+
background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
|
|
245
|
+
background-size: 200% 100%;
|
|
246
|
+
animation: ${T} 1.3s infinite linear;
|
|
247
|
+
|
|
248
|
+
@media (prefers-reduced-motion: reduce) {
|
|
249
|
+
animation: none;
|
|
250
|
+
}
|
|
251
|
+
`,z=l.span`
|
|
252
|
+
font-size: 13px;
|
|
253
|
+
color: ${o.colors.muted};
|
|
254
|
+
`,Ot=l.div`
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
gap: 4px;
|
|
258
|
+
font-weight: 700;
|
|
259
|
+
color: ${o.colors.text};
|
|
260
|
+
white-space: nowrap;
|
|
261
|
+
|
|
262
|
+
.ccy-mark {
|
|
263
|
+
width: 14px;
|
|
264
|
+
height: 14px;
|
|
265
|
+
}
|
|
266
|
+
`,U=l.div`
|
|
267
|
+
height: 132px;
|
|
268
|
+
border-radius: 16px;
|
|
269
|
+
border: 1px solid transparent;
|
|
270
|
+
background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
|
|
271
|
+
background-size: 200% 100%;
|
|
272
|
+
animation: ${T} 1.3s infinite linear;
|
|
273
|
+
|
|
274
|
+
@media (prefers-reduced-motion: reduce) {
|
|
275
|
+
animation: none;
|
|
276
|
+
}
|
|
277
|
+
`,V=l.div`
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-direction: column;
|
|
280
|
+
align-items: center;
|
|
281
|
+
gap: 8px;
|
|
282
|
+
text-align: center;
|
|
283
|
+
padding: 90px 20px;
|
|
284
|
+
min-height: 50vh;
|
|
285
|
+
`,Y=l.p`
|
|
286
|
+
font-size: 22px;
|
|
287
|
+
font-weight: 700;
|
|
288
|
+
margin: 6px 0 0;
|
|
289
|
+
`,Wt=l(ht)`
|
|
290
|
+
margin-top: 12px;
|
|
291
|
+
`,q=N.withComponent(_),y=24,Rt=["all","purchases","sales"];function m(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const i=Number(t)/1e18;return Number.isFinite(i)?i.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const i=b.useRef(null),[s,a]=b.useState(null),n=()=>{var u;const c=(u=i.current)==null?void 0:u.getBoundingClientRect();c&&a({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(zt,{ref:i,tabIndex:0,onMouseEnter:n,onMouseLeave:()=>a(null),onFocus:n,onBlur:()=>a(null),children:[t,s?dt.createPortal(e.jsx(qt,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Bt({item:t}){const{data:i,isLoading:s}=j({queryKey:["trade-display",t.tradeId],queryFn:()=>ft(t.tradeId),enabled:!!t.tradeId,staleTime:3e5}),a=!!t.tradeId&&s,n=(i==null?void 0:i.name)??d("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",u=E({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[a?e.jsx(F,{}):e.jsx(S,{children:c?e.jsx("img",{src:c,alt:n}):e.jsx(g,{name:"cart",size:20})}),e.jsxs(M,{children:[a?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),t.quantity>1?e.jsx(z,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(Ot,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]});return u?e.jsx(q,{to:u,"data-link":"true",children:r}):e.jsx(N,{children:r})}function Gt({order:t}){const i=It(t.lines),s=i.reduce((a,n)=>a+n.quantity,0);return e.jsxs(k,{"data-testid":"purchase-order",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsxs($,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(p,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(C,{children:i.map(a=>e.jsx(Bt,{item:a},a.key))})]})}function Kt({sale:t}){const{data:i,isLoading:s}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>X(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(i==null?void 0:i.name)??d("activity.itemFallback"),n=(i==null?void 0:i.thumbnail)??"",c=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,u=e.jsxs(e.Fragment,{children:[s?e.jsx(F,{}):e.jsx(S,{children:n?e.jsx("img",{src:n,alt:a}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[s?e.jsx(H,{}):e.jsx(D,{title:a,children:a}),e.jsx(z,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(k,{"data-testid":"activity-mana-purchase",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsx($,{children:d("activity.paidWithMana")})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(p,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:Q,alt:"MANA"})})]})]})]}),e.jsx(C,{children:c?e.jsx(q,{to:c,"data-link":"true",children:u}):e.jsx(N,{children:u})})]})}function Ut({sale:t,payout:i}){const{data:s,isLoading:a}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>X(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),n=(s==null?void 0:s.name)??d("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",u=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[a?e.jsx(F,{}):e.jsx(S,{children:c?e.jsx("img",{src:c,alt:n}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[a?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),e.jsxs(z,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),i.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:m(i.availableAt)})}`:""]})]})]});return e.jsxs(k,{"data-testid":"activity-sale",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsx($,{children:d("activity.saleLabel")})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":i.kind==="pending"?"PENDING":"SOLD",children:i.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),i.kind==="direct"?e.jsxs(p,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:Q,alt:"MANA"})})]}):i.credits!==null?e.jsxs(p,{"data-kind":"income",children:[e.jsx(v,{className:"ccy-mark"})," +",gt(i.credits)]}):e.jsx(p,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(C,{children:u?e.jsx(q,{to:u,"data-link":"true",children:r}):e.jsx(N,{children:r})})]})}function _t({order:t}){const i=`$${(t.usdCents/100).toFixed(2)}`,s=mt(t.status),a=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(k,{"data-testid":"credit-order",children:e.jsxs(w,{children:[e.jsx(Ht,{children:e.jsx("img",{src:Tt,alt:"","aria-hidden":!0})}),e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsxs($,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:i})]})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":s,children:a}),e.jsxs(p,{"data-kind":"income",children:["+",e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Qt({filter:t}){const i={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(V,{children:[e.jsx(g,{name:i.icon,size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:i.title}),e.jsx("p",{className:"muted",children:i.body}),t!=="sales"?e.jsx(Wt,{as:_,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function se(){ut({title:d("nav.activity"),noindex:!0});const{session:t}=xt(),[i,s]=b.useState("all"),a=!!t&&i!=="sales",n=!!t&&i!=="purchases",c=f(["purchases",t==null?void 0:t.address],h=>pt(t.address,t.identity,{first:y,skip:h}),{enabled:a}),u=f(["sales",t==null?void 0:t.address],h=>B(t.address,{role:"seller",first:y,skip:h}),{enabled:n}),r=f(["credit-orders",t==null?void 0:t.address],h=>G(t.address,t.identity,{first:y,skip:h}),{enabled:a}),x=f(["mana-purchases",t==null?void 0:t.address],h=>B(t.address,{role:"buyer",first:y,skip:h}),{enabled:a}),{data:O}=j({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>G(t.address,t.identity,{first:200}).then(h=>h.payouts),enabled:n,staleTime:6e4}),at=b.useMemo(()=>Lt(O),[O]),{data:nt}=bt(n);if(!t)return e.jsxs(V,{children:[e.jsx(g,{name:"clock",size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const W=Pt($t({purchases:a?c.items:[],sales:n?u.items:[],creditOrders:a?r.items:[],manaPurchases:a?x.items:[],rate:nt}),i),st=a&&(c.isLoading||r.isLoading||x.isLoading)||n&&u.isLoading,R=a&&(c.isFetchingNextPage||r.isFetchingNextPage||x.isFetchingNextPage)||n&&u.isFetchingNextPage,rt=a&&(c.hasNextPage||r.hasNextPage||x.hasNextPage)||n&&u.hasNextPage;function ot(){a&&c.hasNextPage&&c.fetchNextPage(),a&&r.hasNextPage&&r.fetchNextPage(),a&&x.hasNextPage&&x.fetchNextPage(),n&&u.hasNextPage&&u.fetchNextPage()}return e.jsxs(Ct,{children:[e.jsx(St,{children:e.jsx(Ft,{children:d("nav.activity")})}),e.jsx(Mt,{role:"tablist","aria-label":d("nav.activity"),children:Rt.map(h=>e.jsx(Dt,{type:"button",role:"tab","aria-selected":i===h,"data-active":i===h,"data-testid":`activity-filter-${h}`,onClick:()=>s(h),children:d(`activity.filter.${h}`)},h))}),st?e.jsx(K,{children:Array.from({length:5}).map((h,ct)=>e.jsx(U,{},ct))}):W.length===0?e.jsx(Qt,{filter:i}):e.jsxs(e.Fragment,{children:[e.jsxs(K,{children:[W.map(h=>h.kind==="purchase"?e.jsx(Gt,{order:h.order},h.id):h.kind==="credit"?e.jsx(_t,{order:h.order},h.id):h.kind==="mana-purchase"?e.jsx(Kt,{sale:h.sale},h.id):e.jsx(Ut,{sale:h.sale,payout:Nt(at,h.sale)},h.id)),R?e.jsx(U,{}):null]}),e.jsx(jt,{hasNextPage:rt,isFetching:R,onLoadMore:ot})]})]})}export{se as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-
|
|
1
|
+
import{r as l,j as v}from"./react-BW1xvPTF.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381444187.commit-e5b9f13/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381444187.commit-e5b9f13/assets/DCL_LogoPattern-BryBPc3d.png",b=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{u as Le,r as f,j as e,b as tt}from"./react-BW1xvPTF.js";import{m as W,h as nt,c as st,v as ot,s,K as t,u as ie,a as rt,b as Be,A as Fe,y as it,t as o,I as T,C as F,d as ye,j as J,k as at,l as lt,x as We,L as ct,M as te,aM as dt,aN as pt}from"./index-TmxHL85j.js";import{u as ft}from"./useSecondarySales-BRJGIRwF.js";import{r as ht,m as xt,a as He}from"./mana-rate-C8zn6Vfu.js";import{u as Ue}from"./useManaRate-C5mRxzeC.js";import{g as ut,h as mt,i as gt,j as bt,k as yt,C as wt,l as jt,o as vt,m as Ct,n as $t,M as kt,E as St,p as Et,q as Tt,r as It,s as _t,t as Rt,u as zt}from"./Assets.styles-Dmhspue_.js";import{d as we,R as At,F as Nt,S as je,b as Mt}from"./categories-BI9AXlDF.js";import{L as Pt}from"./LoadMore-DTUpuDyu.js";import{M as Lt}from"./MarketCheckout-CoUO17KO.js";import{u as Bt}from"./useInfiniteGrid-pff93KiW.js";import{E as Ft}from"./ErrorNotice-BG40E5Ff.js";import{d as Wt}from"./dcl-schemas-BICTSpB5.js";import{u as Ht,G as Ut,w as Ot,S as Dt}from"./buy-gasless-9Zn1yAMk.js";import{s as Gt}from"./buy-DnSS_Kop.js";import{i as qt}from"./trade-encoding-CcRCeIpG.js";import{f as Vt}from"./errors-CG6pp58g.js";import{J as Kt,C as Zt,B as re}from"./ethers-CtVvB8eG.js";import{l as Qt}from"./loader-logo-BzY9EKdC.js";import{n as Jt}from"./emotion-CSxEP8yM.js";import"./sentry-BV_ZSgtd.js";import"./intl-CBcMB1D2.js";import"./Tooltip-CBuz_rc2.js";import"./authorizations-Ds7LRLV0.js";import"./sendMetaTransaction-7YAoB-pL.js";function ne(n){const r=n.source??"item",l=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${r}:${l}`}const H="100000000000000000000",Oe=2,X=15,Xt=/^[a-zA-Z0-9]+$/;function ve(n){const r=n.trim();return r.length===0?{ok:!1,reason:"empty"}:Xt.test(r)?r.length<Oe?{ok:!1,reason:"too-short"}:r.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Yt(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const en=["function available(string _subdomain) view returns (bool)"],Ce={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function tn(){return W.chainId===Wt.ChainId.MATIC_MAINNET?Ce.mainnet:Ce.sepolia}async function nn(n,r={}){var a;const{rpc:l,address:h}=tn(),u=new Kt(l),c=new Zt(h,en,u);console.info(`[names] availability check → DCLRegistrar(${h}).available("${n}") on ${l}`);const x=await c.available(n);if((a=r.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${x}`),x?"available":"taken"}const sn="https://app.across.to/api";class De extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function on(n){return xt(H,n)}async function rn(n,r,l={}){var a;const h=l.chainId??W.chainId,u=l.provider??"across",c=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${h}&provider=${u}`,x=await ot(c,{method:"GET",identity:n,metadata:{}});if(!x.ok){let d;try{d=(a=await x.json())==null?void 0:a.code}catch{}throw d==="ROUTE_COST_TOO_HIGH"?new De:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function an(n,r){const l=re.from(n.availableAmount),u=re.from(H).sub(l);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:qt(n.id)}],creditsSignatures:[n.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:u.isNegative()?"0":u.toString(),maxCreditedValue:H}}async function ln(n,r={}){const l=sn,h=r.intervalMs??1e4,u=r.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<u;x++){try{const a=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${n}`);if(a.ok){const d=await a.json(),p=(d.status??"pending").toLowerCase(),w=d.fillTx??d.fillTxnRef??null,m=d.actionsSucceeded!==!1;if(p==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:m};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:w,actionsSucceeded:m}}}catch{}x<u-1&&await new Promise(a=>setTimeout(a,h))}return c}async function cn(n){const{name:r,identity:l,signer:h}=n,u=n.chainId??W.chainId,c=n.provider??"across",x=(n.beneficiary??await h.getAddress()).toLowerCase();let a=null,d=!1;console.info("[names] register start",{name:r,buyer:x,chainId:u,provider:c});try{const p=await ht(u),w=on(p);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:p});const m=await rn(l,r,{chainId:u,provider:c});console.info("[names] step 2/6 route fetched",{target:m.externalCall.target,selector:m.externalCall.selector,provider:m.provider,quoteId:m.quoteId});const C=await nt(l,w);if(a=C.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:C.credit.id,maxCreditedValue:C.maxCreditedValue}),re.from(C.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const $=an(C.credit,m);let b;try{b=await Ht({chainId:u,buyer:x,signer:h,args:$})}catch(y){if(!(y instanceof Ut))throw y;b=await Gt(u,$,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:b}),await Ot(b),d=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:b}),c==="across"){const y=await ln(b,n.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:b};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:b,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:b}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:r,buyer:x,originConfirmed:d}),p instanceof Dt)return{status:"pending",originTxHash:p.txHash};throw a&&!d&&await st(l,[a]).catch(()=>{}),p instanceof De?p:new Error(Vt(p,"Couldn't register the name. Please try again.",{sale:!0}))}}const dn=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -366,10 +366,10 @@ import{a as Le,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D a
|
|
|
366
366
|
flex: none;
|
|
367
367
|
color: ${t.colors.dclRed};
|
|
368
368
|
}
|
|
369
|
-
`;function zn({name:n,priceCredits:r,onClose:l}){const{session:h}=ie(),{data:u,isError:c}=rt(h),x=
|
|
369
|
+
`;function zn({name:n,priceCredits:r,onClose:l}){const{session:h}=ie(),{data:u,isError:c}=rt(h),x=Be(),a=Le(),[d,p]=f.useState("confirm"),[w,m]=f.useState(""),[C,$]=f.useState(null),b=f.useRef(!1),y=w.trim().toLowerCase()===n.toLowerCase(),S=d==="completing",j=r!=null?Fe(r):"—";f.useEffect(()=>{const g=R=>{R.key==="Escape"&&!S&&l()};document.addEventListener("keydown",g);const Y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=Y}},[S,l]);async function E(){if(!(!h||!y||b.current)){b.current=!0,p("completing"),$(null);try{await cn({name:n,identity:h.identity,signer:h.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),p("success")}catch(g){J(lt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:at(g),purchase_type:"name"}),$((g==null?void 0:g.message)||o("names.errorGeneric")),p("error")}finally{b.current=!1}}}const k=d!=="success",I=it(h==null?void 0:h.providerType);return e.jsx(dn,{onClick:S?void 0:l,role:"presentation",children:e.jsxs(pn,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[k&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:d==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(Se,{onClick:l,disabled:S,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",ye(u,c)]}),e.jsx(Te,{})]}),(d==="confirm"||d==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(Ie,{children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(F,{}),j]})]}),d==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),e.jsx(Me,{onClick:()=>p("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(fn,{children:[e.jsx(hn,{children:o("names.confirmTitle")}),e.jsx(xn,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${An(n)}</b>`})}}),e.jsxs(un,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(gn,{value:w,onChange:g=>m(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(bn,{children:".dcl.eth"})]})]}),e.jsx(Me,{onClick:()=>void E(),disabled:!y||!h,children:o("names.buyCta")})]})]}),d==="completing"&&e.jsxs(yn,{children:[e.jsx(wn,{src:Qt,alt:"",width:56,height:56}),e.jsx(jn,{children:I?o("names.confirming"):o("names.completing")}),e.jsxs(vn,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx($n,{children:"1/1"})]})]}),d==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:o("names.successHeaderTitle")}),e.jsx(Se,{onClick:l,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",ye(u,c)]}),e.jsx(Te,{}),e.jsxs(kn,{children:[e.jsx(Sn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(En,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(Ie,{style:{marginTop:20},children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(F,{}),j]})]}),e.jsxs(Tn,{children:[e.jsx(In,{onClick:()=>{l(),a("/my-assets")},children:o("names.myItems")}),e.jsx(_n,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function An(n){return n.replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381444187.commit-e5b9f13/assets/identity-B4DXDuJP.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381444187.commit-e5b9f13/assets/world-B-9aPlxu.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381444187.commit-e5b9f13/assets/invite-BfwIhP2C.webp",Ln="https://cdn.decentraland.org/@dcl/shop/0.1.0-30381444187.commit-e5b9f13/assets/governance-DnazlIjy.webp",Bn=s.div`
|
|
370
370
|
width: 100%;
|
|
371
371
|
min-width: 0;
|
|
372
|
-
`,
|
|
372
|
+
`,Fn=s.nav`
|
|
373
373
|
display: flex;
|
|
374
374
|
align-items: center;
|
|
375
375
|
gap: 6px;
|
|
@@ -784,4 +784,4 @@ import{a as Le,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D a
|
|
|
784
784
|
clip: rect(0, 0, 0, 0);
|
|
785
785
|
white-space: nowrap;
|
|
786
786
|
border: 0;
|
|
787
|
-
`,hs="https://docs.decentraland.org/creator/worlds/about/",xs="https://governance.decentraland.org";function us(n){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function ms({onBack:n}){We({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:l}=ie(),{data:h}=Ue(),u=h?He(H,h):null,[c,x]=f.useState(""),[a,d]=f.useState("idle"),[p,w]=f.useState(!1),m=f.useRef(null),[C,$]=f.useState(void 0);f.useLayoutEffect(()=>{m.current&&$(m.current.offsetWidth)},[c]),f.useEffect(()=>{if(!ve(c).ok){d(c.length===0?"idle":"invalid");return}d("checking");const k=new AbortController,I=setTimeout(()=>{(async()=>{try{const g=await nn(c,{signal:k.signal});d(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(I),k.abort()}},[c]);const b=ve(c),y=b.ok&&(a==="available"||a==="error");function S(){if(y){if(!r){l();return}w(!0)}}const j=e.jsxs(e.Fragment,{children:[o("names.claim"),u!=null?e.jsxs(rs,{children:[e.jsx(B,{}),Be(u)]}):null]});return e.jsxs(Fn,{"data-testid":"names-page",children:[e.jsxs(Bn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Wn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Hn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Un,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{children:[e.jsx(Gn,{children:o("names.heroTitle")}),e.jsx(qn,{children:o("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Kn,{children:[e.jsxs(Zn,{invalid:a==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:c,onChange:E=>x(Yt(E.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Qn,{ref:m,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(ns,{children:o("names.suffix")})]}),c.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Ge,{onClick:S,disabled:!y,"data-testid":"names-claim",children:j})]}),a==="taken"?e.jsxs(Jn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Xn,{href:us(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(os,{onClick:S,disabled:!y,children:j}),a==="checking"?e.jsx(se,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):a==="error"?e.jsx(se,{tone:"muted",role:"status",children:o("names.checkError")}):a==="invalid"&&!b.ok&&b.reason==="too-short"?e.jsx(se,{tone:"muted",role:"status",children:o("names.tooShort",{min:Oe})}):null,e.jsx(fs,{role:"status","aria-live":"polite",children:a==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:o("names.whyTitle")}),e.jsx(cs,{children:o("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Nn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why1Title")}),e.jsx(Q,{children:o("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Mn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why2Title")}),e.jsxs(Q,{children:[o("names.why2")," ",e.jsx(ps,{children:o("names.why2Address")})]}),e.jsxs(Pe,{href:hs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Pn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why3Title")}),e.jsx(Q,{children:o("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Ln,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why4Title")}),e.jsx(Q,{children:o("names.why4")}),e.jsxs(Pe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(zn,{name:c,priceCredits:u,onClose:()=>w(!1)}):null]})}const gs="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",oe=48;function bs(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Us(){const[n]=tt(),r=Le(),l=(n.get("q")??"").trim().toLowerCase(),h=Fe(),{session:u,signIn:c}=ie(),x=(n.get("q")??"").trim();We({title:x?o("seo.collectibles.searchTitle",{query:x}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[a,d]=f.useState("wearable"),[p,w]=f.useState(null),[m,C]=f.useState([]),[$,b]=f.useState(""),[y,S]=f.useState(""),[j,E]=f.useState("on_sale"),[k,I]=f.useState(!1),[g,Y]=f.useState("newest"),[R,A]=f.useState(!1),[ae,ee]=f.useState(null);f.useEffect(()=>{if(!R)return;const i=F=>{F.key==="Escape"&&A(!1)};document.addEventListener("keydown",i);const v=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=v}},[R]);const U=j==="on_sale",N=$&&!Number.isNaN(Number($))?Number($):void 0,M=y&&!Number.isNaN(Number(y))?Number(y):void 0,qe=ft(),le=p?Pt[p]:void 0,ce=(we.find(i=>i.key===g)??we[0]).server,de={category:a,rarities:m.length?m:void 0,wearableCategories:le,minPriceCredits:N,maxPriceCredits:M,search:l||void 0,sortBy:ce,isSmart:k||void 0,onSale:!0,listingType:qe?void 0:"primary"},pe={category:a,rarities:m.length?m:void 0,wearableCategories:le,search:l||void 0,sortBy:ce,isWearableSmart:k||void 0,isOnSale:j==="not_for_sale"?!1:void 0},{items:P,total:fe,isLoading:_,isPlaceholderData:z,error:he,hasNextPage:Ve,isFetchingNextPage:xe,fetchNextPage:Ke}=Ft(U?["shop-items",de]:["catalog-items",pe],i=>U?dt({...de,first:oe,skip:i}):pt({...pe,first:oe,skip:i}),{enabled:a!=="names"}),O=fe,ue=_||z,Ze=_?15:Math.min(Math.max(P.length,1),oe),{data:D,isError:Qe}=Ue(),Je=i=>D&&i.manaWei?He(i.manaWei,D):null,me=f.useRef(null);f.useEffect(()=>{_||z||!l||me.current===l||(me.current=l,J("Shop Searched",{query:l,result_count:O}))},[l,_,z,O]);const G=f.useRef("__init__");f.useEffect(()=>{if(_||z)return;const i=JSON.stringify({category:a,subCategory:p,rarities:m,min:N,max:M,sort:g,status:j,smart:k});if(G.current==="__init__"||G.current===i){G.current=i;return}G.current=i,J("Shop Applied Filter",{filters:{category:a,sub_category:p,rarities:m,min_price_credits:N??null,max_price_credits:M??null,status:j,smart:k,sort:g},result_count:O})},[a,p,m,N,M,g,j,k,_,z,O]);function ge(i){d(i),w(null)}function be(i){C(v=>v.includes(i)?v.filter(F=>F!==i):[...v,i])}function Xe(){d("wearable"),w(null),C([]),b(""),S(""),E("on_sale"),I(!1)}function Ye(i){const v=P.find(F=>F.id===i.id);if(!(!v||v.source!=="legacy"||!v.manaWei)){if(!u){c();return}ee(bs(v))}}function et(){h.invalidateQueries({queryKey:["shop-items"]})}const L=[];(N!=null||M!=null)&&L.push({key:"price",label:o("filter.price"),onRemove:()=>{b(""),S("")}});for(const i of Nt)m.includes(i)&&L.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>be(i)});return k&&L.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),j!=="on_sale"&&L.push({key:"status",label:j==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>E("on_sale")}),e.jsxs(mt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(gt,{onClick:()=>A(!1),"aria-hidden":!0}):null,e.jsxs(bt,{className:R?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:o("assets.filters")}),e.jsx(jt,{onClick:()=>A(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:a,subCategory:p,onCategory:ge,onSub:w,priceMin:$,priceMax:y,onPriceMin:b,onPriceMax:S,rarities:m,onToggleRarity:be,status:j,onStatus:E,smart:k,onSmart:I})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>A(!1),children:o("assets.showItems")})})]})]}),e.jsx(St,{children:a==="names"?e.jsx(ms,{onBack:()=>ge("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Mt,{sort:g,onSort:Y,total:fe,loading:_||z,query:l,onOpenFilters:()=>A(!0),chips:L,onClearChips:Xe}),Qe&&U&&P.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,he?e.jsx(Bt,{message:o("assets.loadError"),testId:"browse-error"}):null,!ue&&P.length===0&&!he?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(Tt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(_t,{children:o("assets.empty.title")}),e.jsx(Rt,{children:x?e.jsxs(e.Fragment,{children:[o("assets.empty.searchBefore"),e.jsx("b",{children:x}),o("assets.empty.searchAfter")]}):o("assets.empty.filters")})]}),e.jsx(zt,{children:e.jsx(At,{type:"button",onClick:()=>r("/overview"),children:o("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid","data-testid":"grid",children:ue?e.jsx(je,{count:Ze}):e.jsxs(e.Fragment,{children:[P.map(i=>{if(!U)return e.jsx(te,{item:i,mode:"view"},ne(i));const v=i;return v.source==="legacy"?e.jsx(te,{item:v,mode:"market",marketPriceCredits:Je(v),onBuyNow:Ye},ne(i)):e.jsx(te,{item:i},ne(i))}),xe?e.jsx(je,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:xe,onLoadMore:()=>void Ke()})]})]})}),ae&&D?e.jsx(ht,{listing:ae,rate:D,onClose:()=>ee(null),onSold:()=>{ee(null),et()}}):null]})}export{Us as Assets};
|
|
787
|
+
`,hs="https://docs.decentraland.org/creator/worlds/about/",xs="https://governance.decentraland.org";function us(n){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function ms({onBack:n}){We({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:l}=ie(),{data:h}=Ue(),u=h?He(H,h):null,[c,x]=f.useState(""),[a,d]=f.useState("idle"),[p,w]=f.useState(!1),m=f.useRef(null),[C,$]=f.useState(void 0);f.useLayoutEffect(()=>{m.current&&$(m.current.offsetWidth)},[c]),f.useEffect(()=>{if(!ve(c).ok){d(c.length===0?"idle":"invalid");return}d("checking");const k=new AbortController,I=setTimeout(()=>{(async()=>{try{const g=await nn(c,{signal:k.signal});d(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(I),k.abort()}},[c]);const b=ve(c),y=b.ok&&(a==="available"||a==="error");function S(){if(y){if(!r){l();return}w(!0)}}const j=e.jsxs(e.Fragment,{children:[o("names.claim"),u!=null?e.jsxs(rs,{children:[e.jsx(F,{}),Fe(u)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Fn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Wn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Hn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Un,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{children:[e.jsx(Gn,{children:o("names.heroTitle")}),e.jsx(qn,{children:o("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Kn,{children:[e.jsxs(Zn,{invalid:a==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:c,onChange:E=>x(Yt(E.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Qn,{ref:m,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(ns,{children:o("names.suffix")})]}),c.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Ge,{onClick:S,disabled:!y,"data-testid":"names-claim",children:j})]}),a==="taken"?e.jsxs(Jn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Xn,{href:us(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(os,{onClick:S,disabled:!y,children:j}),a==="checking"?e.jsx(se,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):a==="error"?e.jsx(se,{tone:"muted",role:"status",children:o("names.checkError")}):a==="invalid"&&!b.ok&&b.reason==="too-short"?e.jsx(se,{tone:"muted",role:"status",children:o("names.tooShort",{min:Oe})}):null,e.jsx(fs,{role:"status","aria-live":"polite",children:a==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:o("names.whyTitle")}),e.jsx(cs,{children:o("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Nn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why1Title")}),e.jsx(Q,{children:o("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Mn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why2Title")}),e.jsxs(Q,{children:[o("names.why2")," ",e.jsx(ps,{children:o("names.why2Address")})]}),e.jsxs(Pe,{href:hs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Pn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why3Title")}),e.jsx(Q,{children:o("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Ln,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why4Title")}),e.jsx(Q,{children:o("names.why4")}),e.jsxs(Pe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(zn,{name:c,priceCredits:u,onClose:()=>w(!1)}):null]})}const gs="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",oe=48;function bs(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Os(){const[n]=tt(),r=Le(),l=(n.get("q")??"").trim().toLowerCase(),h=Be(),{session:u,signIn:c}=ie(),x=(n.get("q")??"").trim();We({title:x?o("seo.collectibles.searchTitle",{query:x}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[a,d]=f.useState("wearable"),[p,w]=f.useState(null),[m,C]=f.useState([]),[$,b]=f.useState(""),[y,S]=f.useState(""),[j,E]=f.useState("on_sale"),[k,I]=f.useState(!1),[g,Y]=f.useState("newest"),[R,A]=f.useState(!1),[ae,ee]=f.useState(null);f.useEffect(()=>{if(!R)return;const i=B=>{B.key==="Escape"&&A(!1)};document.addEventListener("keydown",i);const v=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=v}},[R]);const U=j==="on_sale",N=$&&!Number.isNaN(Number($))?Number($):void 0,M=y&&!Number.isNaN(Number(y))?Number(y):void 0,qe=ft(),le=p?Mt[p]:void 0,ce=(we.find(i=>i.key===g)??we[0]).server,de={category:a,rarities:m.length?m:void 0,wearableCategories:le,minPriceCredits:N,maxPriceCredits:M,search:l||void 0,sortBy:ce,isSmart:k||void 0,onSale:!0,listingType:qe?void 0:"primary"},pe={category:a,rarities:m.length?m:void 0,wearableCategories:le,search:l||void 0,sortBy:ce,isWearableSmart:k||void 0,isOnSale:j==="not_for_sale"?!1:void 0},{items:P,total:fe,isLoading:_,isPlaceholderData:z,error:he,hasNextPage:Ve,isFetchingNextPage:xe,fetchNextPage:Ke}=Bt(U?["shop-items",de]:["catalog-items",pe],i=>U?dt({...de,first:oe,skip:i}):pt({...pe,first:oe,skip:i}),{enabled:a!=="names"}),O=fe,ue=_||z,Ze=_?15:Math.min(Math.max(P.length,1),oe),{data:D,isError:Qe}=Ue(),Je=i=>D&&i.manaWei?He(i.manaWei,D):null,me=f.useRef(null);f.useEffect(()=>{_||z||!l||me.current===l||(me.current=l,J("Shop Searched",{query:l,result_count:O}))},[l,_,z,O]);const G=f.useRef("__init__");f.useEffect(()=>{if(_||z)return;const i=JSON.stringify({category:a,subCategory:p,rarities:m,min:N,max:M,sort:g,status:j,smart:k});if(G.current==="__init__"||G.current===i){G.current=i;return}G.current=i,J("Shop Applied Filter",{filters:{category:a,sub_category:p,rarities:m,min_price_credits:N??null,max_price_credits:M??null,status:j,smart:k,sort:g},result_count:O})},[a,p,m,N,M,g,j,k,_,z,O]);function ge(i){d(i),w(null)}function be(i){C(v=>v.includes(i)?v.filter(B=>B!==i):[...v,i])}function Xe(){d("wearable"),w(null),C([]),b(""),S(""),E("on_sale"),I(!1)}function Ye(i){const v=P.find(B=>B.id===i.id);if(!(!v||v.source!=="legacy"||!v.manaWei)){if(!u){c();return}ee(bs(v))}}function et(){h.invalidateQueries({queryKey:["shop-items"]})}const L=[];(N!=null||M!=null)&&L.push({key:"price",label:o("filter.price"),onRemove:()=>{b(""),S("")}});for(const i of At)m.includes(i)&&L.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>be(i)});return k&&L.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),j!=="on_sale"&&L.push({key:"status",label:j==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>E("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(mt,{onClick:()=>A(!1),"aria-hidden":!0}):null,e.jsxs(gt,{className:R?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(bt,{children:[e.jsx(yt,{children:o("assets.filters")}),e.jsx(wt,{onClick:()=>A(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(jt,{children:e.jsx(vt,{category:a,subCategory:p,onCategory:ge,onSub:w,priceMin:$,priceMax:y,onPriceMin:b,onPriceMax:S,rarities:m,onToggleRarity:be,status:j,onStatus:E,smart:k,onSmart:I})}),e.jsx(Ct,{children:e.jsx($t,{type:"button",onClick:()=>A(!1),children:o("assets.showItems")})})]})]}),e.jsx(kt,{children:a==="names"?e.jsx(ms,{onBack:()=>ge("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Nt,{sort:g,onSort:Y,total:fe,loading:_||z,query:l,onOpenFilters:()=>A(!0),chips:L,onClearChips:Xe}),Qe&&U&&P.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,he?e.jsx(Ft,{message:o("assets.loadError"),testId:"browse-error"}):null,!ue&&P.length===0&&!he?e.jsxs(St,{"data-testid":"browse-empty",children:[e.jsx(Et,{src:gs,alt:""}),e.jsxs(Tt,{children:[e.jsx(It,{children:o("assets.empty.title")}),e.jsx(_t,{children:x?e.jsxs(e.Fragment,{children:[o("assets.empty.searchBefore"),e.jsx("b",{children:x}),o("assets.empty.searchAfter")]}):o("assets.empty.filters")})]}),e.jsx(Rt,{children:e.jsx(zt,{type:"button",onClick:()=>r("/overview"),children:o("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid","data-testid":"grid",children:ue?e.jsx(je,{count:Ze}):e.jsxs(e.Fragment,{children:[P.map(i=>{if(!U)return e.jsx(te,{item:i,mode:"view"},ne(i));const v=i;return v.source==="legacy"?e.jsx(te,{item:v,mode:"market",marketPriceCredits:Je(v),onBuyNow:Ye},ne(i)):e.jsx(te,{item:i},ne(i))}),xe?e.jsx(je,{count:6}):null]})}),e.jsx(Pt,{hasNextPage:Ve,isFetching:xe,onLoadMore:()=>void Ke()})]})]})}),ae&&D?e.jsx(Lt,{listing:ae,rate:D,onClose:()=>ee(null),onSold:()=>{ee(null),et()}}):null]})}export{Os as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-
|
|
1
|
+
import{r as $,j as t}from"./react-BW1xvPTF.js";import{R as C,a as oe,C as ie,c as ne}from"./categories-BI9AXlDF.js";import{T as se}from"./Tooltip-CBuz_rc2.js";import{K as e,s as o,I as m,t as s,L as re,e as v}from"./index-TmxHL85j.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,L as q,r as D}from"./react-
|
|
1
|
+
import{j as t,L as q,r as D}from"./react-BW1xvPTF.js";import{s as a,B as M,K as o,R as I,x as B,t as e,u as F,y as K,I as f,C as G,S as P,n as w,b as Q,m as H,U as k,J as O,N as $}from"./index-TmxHL85j.js";import{b as W,c as _,d as J,f as U,s as X,h as V}from"./authorizations-Ds7LRLV0.js";import{a as Y}from"./builder-Cc8g4-4q.js";import{f as Z}from"./errors-CG6pp58g.js";import"./sentry-BV_ZSgtd.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CtVvB8eG.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-7YAoB-pL.js";const tt=I`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,it=I`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bc as Xe,bd as Ye,F as Ge,be as qe,Y as G,Z as b,$ as z,W as ee,X as se,bf as Ze,a2 as H,R as le,V as Ce,bg as be,bh as we,bi as w,a1 as Re,bj as Je,T as Qe,aU as eo,E as oo,a0 as B,bk as to,bl as J}from"./index-TmxHL85j.js";import{r as l,j as T,R as Y}from"./react-BW1xvPTF.js";function Me(e){var o,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(t=Me(e[o]))&&(i&&(i+=" "),i+=t)}else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function no(){for(var e,o,t=0,i="",n=arguments.length;t<n;t++)(e=arguments[t])&&(o=Me(e))&&(i&&(i+=" "),i+=o);return i}const io=["className","component"];function ao(e={}){const{themeId:o,defaultTheme:t,defaultClassName:i="MuiBox-root",generateClassName:n}=e,a=Xe("div",{shouldForwardProp:u=>u!=="theme"&&u!=="sx"&&u!=="as"})(Ye);return l.forwardRef(function(c,p){const f=Ge(t),g=qe(c),{className:m,component:v="div"}=g,h=G(g,io);return T.jsx(a,b({as:v,ref:p,className:no(m,n?n(i):i),theme:o&&f[o]||f},h))})}function ae(e,o){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ae(e,o)}function ro(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,ae(e,o)}const ge=Y.createContext(null);function so(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ce(e,o){var t=function(a){return o&&l.isValidElement(a)?o(a):a},i=Object.create(null);return e&&l.Children.map(e,function(n){return n}).forEach(function(n){i[n.key]=t(n)}),i}function lo(e,o){e=e||{},o=o||{};function t(f){return f in o?o[f]:e[f]}var i=Object.create(null),n=[];for(var a in e)a in o?n.length&&(i[a]=n,n=[]):n.push(a);var r,u={};for(var c in o){if(i[c])for(r=0;r<i[c].length;r++){var p=i[c][r];u[i[c][r]]=t(p)}u[c]=t(c)}for(r=0;r<n.length;r++)u[n[r]]=t(n[r]);return u}function A(e,o,t){return t[o]!=null?t[o]:e.props[o]}function co(e,o){return ce(e.children,function(t){return l.cloneElement(t,{onExited:o.bind(null,t),in:!0,appear:A(t,"appear",e),enter:A(t,"enter",e),exit:A(t,"exit",e)})})}function uo(e,o,t){var i=ce(e.children),n=lo(o,i);return Object.keys(n).forEach(function(a){var r=n[a];if(l.isValidElement(r)){var u=a in o,c=a in i,p=o[a],f=l.isValidElement(p)&&!p.props.in;c&&(!u||f)?n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:!0,exit:A(r,"exit",e),enter:A(r,"enter",e)}):!c&&u&&!f?n[a]=l.cloneElement(r,{in:!1}):c&&u&&l.isValidElement(p)&&(n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:p.props.in,exit:A(r,"exit",e),enter:A(r,"enter",e)}))}}),n}var po=Object.values||function(e){return Object.keys(e).map(function(o){return e[o]})},fo={component:"div",childFactory:function(o){return o}},ue=(function(e){ro(o,e);function o(i,n){var a;a=e.call(this,i,n)||this;var r=a.handleExited.bind(so(a));return a.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},a}var t=o.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},o.getDerivedStateFromProps=function(n,a){var r=a.children,u=a.handleExited,c=a.firstRender;return{children:c?co(n,u):uo(n,r,u),firstRender:!1}},t.handleExited=function(n,a){var r=ce(this.props.children);n.key in r||(n.props.onExited&&n.props.onExited(a),this.mounted&&this.setState(function(u){var c=b({},u.children);return delete c[n.key],{children:c}}))},t.render=function(){var n=this.props,a=n.component,r=n.childFactory,u=G(n,["component","childFactory"]),c=this.state.contextValue,p=po(this.state.children).map(r);return delete u.appear,delete u.enter,delete u.exit,a===null?Y.createElement(ge.Provider,{value:c},p):Y.createElement(ge.Provider,{value:c},Y.createElement(a,u,p))},o})(Y.Component);ue.propTypes={};ue.defaultProps=fo;function ho(e){const{className:o,classes:t,pulsate:i=!1,rippleX:n,rippleY:a,rippleSize:r,in:u,onExited:c,timeout:p}=e,[f,g]=l.useState(!1),m=z(o,t.ripple,t.rippleVisible,i&&t.ripplePulsate),v={width:r,height:r,top:-(r/2)+a,left:-(r/2)+n},h=z(t.child,f&&t.childLeaving,i&&t.childPulsate);return!u&&!f&&g(!0),l.useEffect(()=>{if(!u&&c!=null){const C=setTimeout(c,p);return()=>{clearTimeout(C)}}},[c,u,p]),T.jsx("span",{className:m,style:v,children:T.jsx("span",{className:h})})}const E=ee("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),bo=["center","classes","className"];let oe=e=>e,me,xe,ve,ye;const re=550,go=80,mo=le(me||(me=oe`
|
|
2
2
|
0% {
|
|
3
3
|
transform: scale(0);
|
|
4
4
|
opacity: 0.1;
|
|
@@ -71,4 +71,4 @@ import{bb as Xe,bc as Ye,q as Ge,bd as qe,Y as G,Z as b,$ as z,W as ee,X as se,b
|
|
|
71
71
|
animation-iteration-count: infinite;
|
|
72
72
|
animation-delay: 200ms;
|
|
73
73
|
}
|
|
74
|
-
`),E.rippleVisible,mo,re,({theme:e})=>e.transitions.easing.easeInOut,E.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,E.child,E.childLeaving,xo,re,({theme:e})=>e.transitions.easing.easeInOut,E.childPulsate,vo,({theme:e})=>e.transitions.easing.easeInOut),Ro=l.forwardRef(function(o,t){const i=se({props:o,name:"MuiTouchRipple"}),{center:n=!1,classes:a={},className:r}=i,u=G(i,bo),[c,p]=l.useState([]),f=l.useRef(0),g=l.useRef(null);l.useEffect(()=>{g.current&&(g.current(),g.current=null)},[c]);const m=l.useRef(!1),v=Ze(),h=l.useRef(null),C=l.useRef(null),_=l.useCallback(d=>{const{pulsate:R,rippleX:x,rippleY:y,rippleSize:L,cb:O}=d;p(M=>[...M,T.jsx(Co,{classes:{ripple:z(a.ripple,E.ripple),rippleVisible:z(a.rippleVisible,E.rippleVisible),ripplePulsate:z(a.ripplePulsate,E.ripplePulsate),child:z(a.child,E.child),childLeaving:z(a.childLeaving,E.childLeaving),childPulsate:z(a.childPulsate,E.childPulsate)},timeout:re,pulsate:R,rippleX:x,rippleY:y,rippleSize:L},f.current)]),f.current+=1,g.current=O},[a]),V=l.useCallback((d={},R={},x=()=>{})=>{const{pulsate:y=!1,center:L=n||R.pulsate,fakeElement:O=!1}=R;if((d==null?void 0:d.type)==="mousedown"&&m.current){m.current=!1;return}(d==null?void 0:d.type)==="touchstart"&&(m.current=!0);const M=O?null:C.current,D=M?M.getBoundingClientRect():{width:0,height:0,left:0,top:0};let P,j,F;if(L||d===void 0||d.clientX===0&&d.clientY===0||!d.clientX&&!d.touches)P=Math.round(D.width/2),j=Math.round(D.height/2);else{const{clientX:W,clientY:k}=d.touches&&d.touches.length>0?d.touches[0]:d;P=Math.round(W-D.left),j=Math.round(k-D.top)}if(L)F=Math.sqrt((2*D.width**2+D.height**2)/3),F%2===0&&(F+=1);else{const W=Math.max(Math.abs((M?M.clientWidth:0)-P),P)*2+2,k=Math.max(Math.abs((M?M.clientHeight:0)-j),j)*2+2;F=Math.sqrt(W**2+k**2)}d!=null&&d.touches?h.current===null&&(h.current=()=>{_({pulsate:y,rippleX:P,rippleY:j,rippleSize:F,cb:x})},v.start(go,()=>{h.current&&(h.current(),h.current=null)})):_({pulsate:y,rippleX:P,rippleY:j,rippleSize:F,cb:x})},[n,_,v]),S=l.useCallback(()=>{V({},{pulsate:!0})},[V]),I=l.useCallback((d,R)=>{if(v.clear(),(d==null?void 0:d.type)==="touchend"&&h.current){h.current(),h.current=null,v.start(0,()=>{I(d,R)});return}h.current=null,p(x=>x.length>0?x.slice(1):x),g.current=R},[v]);return l.useImperativeHandle(t,()=>({pulsate:S,start:V,stop:I}),[S,V,I]),T.jsx(yo,b({className:z(E.root,a.root,r),ref:C},u,{children:T.jsx(ue,{component:null,exit:!0,children:c})}))});function Mo(e){return Ce("MuiButtonBase",e)}const zo=ee("MuiButtonBase",["root","disabled","focusVisible"]),Eo=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Bo=e=>{const{disabled:o,focusVisible:t,focusVisibleClassName:i,classes:n}=e,r=Re({root:["root",o&&"disabled",t&&"focusVisible"]},Mo,n);return t&&i&&(r.root+=` ${i}`),r},To=H("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${zo.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),$o=l.forwardRef(function(o,t){const i=se({props:o,name:"MuiButtonBase"}),{action:n,centerRipple:a=!1,children:r,className:u,component:c="button",disabled:p=!1,disableRipple:f=!1,disableTouchRipple:g=!1,focusRipple:m=!1,LinkComponent:v="a",onBlur:h,onClick:C,onContextMenu:_,onDragLeave:V,onFocus:S,onFocusVisible:I,onKeyDown:d,onKeyUp:R,onMouseDown:x,onMouseLeave:y,onMouseUp:L,onTouchEnd:O,onTouchMove:M,onTouchStart:D,tabIndex:P=0,TouchRippleProps:j,touchRippleRef:F,type:W}=i,k=G(i,Eo),K=l.useRef(null),$=l.useRef(null),Ee=be($,F),{isFocusVisibleRef:pe,onFocus:Be,onBlur:Te,ref:$e}=we(),[U,q]=l.useState(!1);p&&U&&q(!1),l.useImperativeHandle(n,()=>({focusVisible:()=>{q(!0),K.current.focus()}}),[]);const[te,Ie]=l.useState(!1);l.useEffect(()=>{Ie(!0)},[]);const Pe=te&&!f&&!p;l.useEffect(()=>{U&&m&&!f&&te&&$.current.pulsate()},[f,m,U,te]);function N(s,fe,Ke=g){return w(he=>(fe&&fe(he),!Ke&&$.current&&$.current[s](he),!0))}const ke=N("start",x),Ne=N("stop",_),Ve=N("stop",V),Se=N("stop",L),Le=N("stop",s=>{U&&s.preventDefault(),y&&y(s)}),De=N("start",D),je=N("stop",O),Fe=N("stop",M),_e=N("stop",s=>{Te(s),pe.current===!1&&q(!1),h&&h(s)},!1),Oe=w(s=>{K.current||(K.current=s.currentTarget),Be(s),pe.current===!0&&(q(!0),I&&I(s)),S&&S(s)}),ne=()=>{const s=K.current;return c&&c!=="button"&&!(s.tagName==="A"&&s.href)},ie=l.useRef(!1),We=w(s=>{m&&!ie.current&&U&&$.current&&s.key===" "&&(ie.current=!0,$.current.stop(s,()=>{$.current.start(s)})),s.target===s.currentTarget&&ne()&&s.key===" "&&s.preventDefault(),d&&d(s),s.target===s.currentTarget&&ne()&&s.key==="Enter"&&!p&&(s.preventDefault(),C&&C(s))}),Ue=w(s=>{m&&s.key===" "&&$.current&&U&&!s.defaultPrevented&&(ie.current=!1,$.current.stop(s,()=>{$.current.pulsate(s)})),R&&R(s),C&&s.target===s.currentTarget&&ne()&&s.key===" "&&!s.defaultPrevented&&C(s)});let Z=c;Z==="button"&&(k.href||k.to)&&(Z=v);const X={};Z==="button"?(X.type=W===void 0?"button":W,X.disabled=p):(!k.href&&!k.to&&(X.role="button"),p&&(X["aria-disabled"]=p));const Ae=be(t,$e,K),de=b({},i,{centerRipple:a,component:c,disabled:p,disableRipple:f,disableTouchRipple:g,focusRipple:m,tabIndex:P,focusVisible:U}),He=Bo(de);return T.jsxs(To,b({as:Z,className:z(He.root,u),ownerState:de,onBlur:_e,onClick:C,onContextMenu:Ne,onFocus:Oe,onKeyDown:We,onKeyUp:Ue,onMouseDown:ke,onMouseLeave:Le,onMouseUp:Se,onDragLeave:Ve,onTouchEnd:je,onTouchMove:Fe,onTouchStart:De,ref:Ae,tabIndex:p?-1:P,type:W},X,k,{children:[r,Pe?T.jsx(Ro,b({ref:Ee,center:a},j)):null]}))}),Io=ee("MuiBox",["root"]),Po=eo(),Uo=ao({themeId:Qe,defaultTheme:Po,defaultClassName:Io.root,generateClassName:Je.generate});function ko(e){return Ce("MuiButton",e)}const Q=ee("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),No=l.createContext({}),Vo=l.createContext(void 0),So=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Lo=e=>{const{color:o,disableElevation:t,fullWidth:i,size:n,variant:a,classes:r}=e,u={root:["root",a,`${a}${B(o)}`,`size${B(n)}`,`${a}Size${B(n)}`,`color${B(o)}`,t&&"disableElevation",i&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${B(n)}`],endIcon:["icon","endIcon",`iconSize${B(n)}`]},c=Re(u,ko,r);return b({},r,c)},ze=e=>b({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Do=H($o,{shouldForwardProp:e=>to(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[t.variant],o[`${t.variant}${B(t.color)}`],o[`size${B(t.size)}`],o[`${t.variant}Size${B(t.size)}`],t.color==="inherit"&&o.colorInherit,t.disableElevation&&o.disableElevation,t.fullWidth&&o.fullWidth]}})(({theme:e,ownerState:o})=>{var t,i;const n=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],a=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return b({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":b({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:J.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="text"&&o.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:J.alpha(e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="outlined"&&o.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[o.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:J.alpha(e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},o.variant==="contained"&&o.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[o.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[o.color].main}}),"&:active":b({},o.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Q.focusVisible}`]:b({},o.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Q.disabled}`]:b({color:(e.vars||e).palette.action.disabled},o.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},o.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},o.variant==="text"&&{padding:"6px 8px"},o.variant==="text"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].main},o.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},o.variant==="outlined"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[o.color].mainChannel} / 0.5)`:`1px solid ${J.alpha(e.palette[o.color].main,.5)}`},o.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(t=(i=e.palette).getContrastText)==null?void 0:t.call(i,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:n,boxShadow:(e.vars||e).shadows[2]},o.variant==="contained"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].contrastText,backgroundColor:(e.vars||e).palette[o.color].main},o.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},o.size==="small"&&o.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},o.size==="small"&&o.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},o.size==="small"&&o.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},o.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Q.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Q.disabled}`]:{boxShadow:"none"}}),jo=H("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.startIcon,o[`iconSize${B(t.size)}`]]}})(({ownerState:e})=>b({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},ze(e))),Fo=H("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.endIcon,o[`iconSize${B(t.size)}`]]}})(({ownerState:e})=>b({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},ze(e))),Ao=l.forwardRef(function(o,t){const i=l.useContext(No),n=l.useContext(Vo),a=oo(i,o),r=se({props:a,name:"MuiButton"}),{children:u,color:c="primary",component:p="button",className:f,disabled:g=!1,disableElevation:m=!1,disableFocusRipple:v=!1,endIcon:h,focusVisibleClassName:C,fullWidth:_=!1,size:V="medium",startIcon:S,type:I,variant:d="text"}=r,R=G(r,So),x=b({},r,{color:c,component:p,disabled:g,disableElevation:m,disableFocusRipple:v,fullWidth:_,size:V,type:I,variant:d}),y=Lo(x),L=S&&T.jsx(jo,{className:y.startIcon,ownerState:x,children:S}),O=h&&T.jsx(Fo,{className:y.endIcon,ownerState:x,children:h}),M=n||"";return T.jsxs(Do,b({ownerState:x,className:z(i.className,y.root,f,M),component:p,disabled:g,focusRipple:!v,focusVisibleClassName:z(y.focusVisible,C),ref:t,type:I},R,{classes:y,children:[L,u,O]}))});export{No as B,ge as T,ro as _,Vo as a,$o as b,Ao as c,Uo as d};
|
|
74
|
+
`),E.rippleVisible,mo,re,({theme:e})=>e.transitions.easing.easeInOut,E.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,E.child,E.childLeaving,xo,re,({theme:e})=>e.transitions.easing.easeInOut,E.childPulsate,vo,({theme:e})=>e.transitions.easing.easeInOut),Ro=l.forwardRef(function(o,t){const i=se({props:o,name:"MuiTouchRipple"}),{center:n=!1,classes:a={},className:r}=i,u=G(i,bo),[c,p]=l.useState([]),f=l.useRef(0),g=l.useRef(null);l.useEffect(()=>{g.current&&(g.current(),g.current=null)},[c]);const m=l.useRef(!1),v=Ze(),h=l.useRef(null),C=l.useRef(null),_=l.useCallback(d=>{const{pulsate:R,rippleX:x,rippleY:y,rippleSize:L,cb:O}=d;p(M=>[...M,T.jsx(Co,{classes:{ripple:z(a.ripple,E.ripple),rippleVisible:z(a.rippleVisible,E.rippleVisible),ripplePulsate:z(a.ripplePulsate,E.ripplePulsate),child:z(a.child,E.child),childLeaving:z(a.childLeaving,E.childLeaving),childPulsate:z(a.childPulsate,E.childPulsate)},timeout:re,pulsate:R,rippleX:x,rippleY:y,rippleSize:L},f.current)]),f.current+=1,g.current=O},[a]),V=l.useCallback((d={},R={},x=()=>{})=>{const{pulsate:y=!1,center:L=n||R.pulsate,fakeElement:O=!1}=R;if((d==null?void 0:d.type)==="mousedown"&&m.current){m.current=!1;return}(d==null?void 0:d.type)==="touchstart"&&(m.current=!0);const M=O?null:C.current,D=M?M.getBoundingClientRect():{width:0,height:0,left:0,top:0};let P,F,j;if(L||d===void 0||d.clientX===0&&d.clientY===0||!d.clientX&&!d.touches)P=Math.round(D.width/2),F=Math.round(D.height/2);else{const{clientX:W,clientY:k}=d.touches&&d.touches.length>0?d.touches[0]:d;P=Math.round(W-D.left),F=Math.round(k-D.top)}if(L)j=Math.sqrt((2*D.width**2+D.height**2)/3),j%2===0&&(j+=1);else{const W=Math.max(Math.abs((M?M.clientWidth:0)-P),P)*2+2,k=Math.max(Math.abs((M?M.clientHeight:0)-F),F)*2+2;j=Math.sqrt(W**2+k**2)}d!=null&&d.touches?h.current===null&&(h.current=()=>{_({pulsate:y,rippleX:P,rippleY:F,rippleSize:j,cb:x})},v.start(go,()=>{h.current&&(h.current(),h.current=null)})):_({pulsate:y,rippleX:P,rippleY:F,rippleSize:j,cb:x})},[n,_,v]),S=l.useCallback(()=>{V({},{pulsate:!0})},[V]),I=l.useCallback((d,R)=>{if(v.clear(),(d==null?void 0:d.type)==="touchend"&&h.current){h.current(),h.current=null,v.start(0,()=>{I(d,R)});return}h.current=null,p(x=>x.length>0?x.slice(1):x),g.current=R},[v]);return l.useImperativeHandle(t,()=>({pulsate:S,start:V,stop:I}),[S,V,I]),T.jsx(yo,b({className:z(E.root,a.root,r),ref:C},u,{children:T.jsx(ue,{component:null,exit:!0,children:c})}))});function Mo(e){return Ce("MuiButtonBase",e)}const zo=ee("MuiButtonBase",["root","disabled","focusVisible"]),Eo=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Bo=e=>{const{disabled:o,focusVisible:t,focusVisibleClassName:i,classes:n}=e,r=Re({root:["root",o&&"disabled",t&&"focusVisible"]},Mo,n);return t&&i&&(r.root+=` ${i}`),r},To=H("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${zo.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),$o=l.forwardRef(function(o,t){const i=se({props:o,name:"MuiButtonBase"}),{action:n,centerRipple:a=!1,children:r,className:u,component:c="button",disabled:p=!1,disableRipple:f=!1,disableTouchRipple:g=!1,focusRipple:m=!1,LinkComponent:v="a",onBlur:h,onClick:C,onContextMenu:_,onDragLeave:V,onFocus:S,onFocusVisible:I,onKeyDown:d,onKeyUp:R,onMouseDown:x,onMouseLeave:y,onMouseUp:L,onTouchEnd:O,onTouchMove:M,onTouchStart:D,tabIndex:P=0,TouchRippleProps:F,touchRippleRef:j,type:W}=i,k=G(i,Eo),K=l.useRef(null),$=l.useRef(null),Ee=be($,j),{isFocusVisibleRef:pe,onFocus:Be,onBlur:Te,ref:$e}=we(),[U,q]=l.useState(!1);p&&U&&q(!1),l.useImperativeHandle(n,()=>({focusVisible:()=>{q(!0),K.current.focus()}}),[]);const[te,Ie]=l.useState(!1);l.useEffect(()=>{Ie(!0)},[]);const Pe=te&&!f&&!p;l.useEffect(()=>{U&&m&&!f&&te&&$.current.pulsate()},[f,m,U,te]);function N(s,fe,Ke=g){return w(he=>(fe&&fe(he),!Ke&&$.current&&$.current[s](he),!0))}const ke=N("start",x),Ne=N("stop",_),Ve=N("stop",V),Se=N("stop",L),Le=N("stop",s=>{U&&s.preventDefault(),y&&y(s)}),De=N("start",D),Fe=N("stop",O),je=N("stop",M),_e=N("stop",s=>{Te(s),pe.current===!1&&q(!1),h&&h(s)},!1),Oe=w(s=>{K.current||(K.current=s.currentTarget),Be(s),pe.current===!0&&(q(!0),I&&I(s)),S&&S(s)}),ne=()=>{const s=K.current;return c&&c!=="button"&&!(s.tagName==="A"&&s.href)},ie=l.useRef(!1),We=w(s=>{m&&!ie.current&&U&&$.current&&s.key===" "&&(ie.current=!0,$.current.stop(s,()=>{$.current.start(s)})),s.target===s.currentTarget&&ne()&&s.key===" "&&s.preventDefault(),d&&d(s),s.target===s.currentTarget&&ne()&&s.key==="Enter"&&!p&&(s.preventDefault(),C&&C(s))}),Ue=w(s=>{m&&s.key===" "&&$.current&&U&&!s.defaultPrevented&&(ie.current=!1,$.current.stop(s,()=>{$.current.pulsate(s)})),R&&R(s),C&&s.target===s.currentTarget&&ne()&&s.key===" "&&!s.defaultPrevented&&C(s)});let Z=c;Z==="button"&&(k.href||k.to)&&(Z=v);const X={};Z==="button"?(X.type=W===void 0?"button":W,X.disabled=p):(!k.href&&!k.to&&(X.role="button"),p&&(X["aria-disabled"]=p));const Ae=be(t,$e,K),de=b({},i,{centerRipple:a,component:c,disabled:p,disableRipple:f,disableTouchRipple:g,focusRipple:m,tabIndex:P,focusVisible:U}),He=Bo(de);return T.jsxs(To,b({as:Z,className:z(He.root,u),ownerState:de,onBlur:_e,onClick:C,onContextMenu:Ne,onFocus:Oe,onKeyDown:We,onKeyUp:Ue,onMouseDown:ke,onMouseLeave:Le,onMouseUp:Se,onDragLeave:Ve,onTouchEnd:Fe,onTouchMove:je,onTouchStart:De,ref:Ae,tabIndex:p?-1:P,type:W},X,k,{children:[r,Pe?T.jsx(Ro,b({ref:Ee,center:a},F)):null]}))}),Io=ee("MuiBox",["root"]),Po=eo(),Uo=ao({themeId:Qe,defaultTheme:Po,defaultClassName:Io.root,generateClassName:Je.generate});function ko(e){return Ce("MuiButton",e)}const Q=ee("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),No=l.createContext({}),Vo=l.createContext(void 0),So=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Lo=e=>{const{color:o,disableElevation:t,fullWidth:i,size:n,variant:a,classes:r}=e,u={root:["root",a,`${a}${B(o)}`,`size${B(n)}`,`${a}Size${B(n)}`,`color${B(o)}`,t&&"disableElevation",i&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${B(n)}`],endIcon:["icon","endIcon",`iconSize${B(n)}`]},c=Re(u,ko,r);return b({},r,c)},ze=e=>b({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Do=H($o,{shouldForwardProp:e=>to(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[t.variant],o[`${t.variant}${B(t.color)}`],o[`size${B(t.size)}`],o[`${t.variant}Size${B(t.size)}`],t.color==="inherit"&&o.colorInherit,t.disableElevation&&o.disableElevation,t.fullWidth&&o.fullWidth]}})(({theme:e,ownerState:o})=>{var t,i;const n=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],a=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return b({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":b({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:J.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="text"&&o.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:J.alpha(e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="outlined"&&o.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[o.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:J.alpha(e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},o.variant==="contained"&&o.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[o.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[o.color].main}}),"&:active":b({},o.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Q.focusVisible}`]:b({},o.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Q.disabled}`]:b({color:(e.vars||e).palette.action.disabled},o.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},o.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},o.variant==="text"&&{padding:"6px 8px"},o.variant==="text"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].main},o.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},o.variant==="outlined"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[o.color].mainChannel} / 0.5)`:`1px solid ${J.alpha(e.palette[o.color].main,.5)}`},o.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(t=(i=e.palette).getContrastText)==null?void 0:t.call(i,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:n,boxShadow:(e.vars||e).shadows[2]},o.variant==="contained"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].contrastText,backgroundColor:(e.vars||e).palette[o.color].main},o.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},o.size==="small"&&o.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},o.size==="small"&&o.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},o.size==="small"&&o.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},o.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Q.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Q.disabled}`]:{boxShadow:"none"}}),Fo=H("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.startIcon,o[`iconSize${B(t.size)}`]]}})(({ownerState:e})=>b({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},ze(e))),jo=H("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.endIcon,o[`iconSize${B(t.size)}`]]}})(({ownerState:e})=>b({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},ze(e))),Ao=l.forwardRef(function(o,t){const i=l.useContext(No),n=l.useContext(Vo),a=oo(i,o),r=se({props:a,name:"MuiButton"}),{children:u,color:c="primary",component:p="button",className:f,disabled:g=!1,disableElevation:m=!1,disableFocusRipple:v=!1,endIcon:h,focusVisibleClassName:C,fullWidth:_=!1,size:V="medium",startIcon:S,type:I,variant:d="text"}=r,R=G(r,So),x=b({},r,{color:c,component:p,disabled:g,disableElevation:m,disableFocusRipple:v,fullWidth:_,size:V,type:I,variant:d}),y=Lo(x),L=S&&T.jsx(Fo,{className:y.startIcon,ownerState:x,children:S}),O=h&&T.jsx(jo,{className:y.endIcon,ownerState:x,children:h}),M=n||"";return T.jsxs(Do,b({ownerState:x,className:z(i.className,y.root,f,M),component:p,disabled:g,focusRipple:!v,focusVisibleClassName:z(y.focusVisible,C),ref:t,type:I},R,{classes:y,children:[L,u,O]}))});export{No as B,ge as T,ro as _,Vo as a,$o as b,Ao as c,Uo as d};
|