@dcl/shop 0.1.0-29994094833.commit-84e34c2 → 0.1.0-29994103056.commit-191afbc
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/{AnimatedBackground-DW1UTWMl.js → AnimatedBackground-CwVmQoMy.js} +3 -3
- package/assets/{Assets-D0Gpv-gx.js → Assets-DqZw3BZv.js} +1 -1
- package/assets/{Assets.styles-Dz0IZ5_I.js → Assets.styles-BmY0qPN-.js} +1 -1
- package/assets/{Authorizations-hlWKflXp.js → Authorizations-BxmoVEl_.js} +3 -3
- package/assets/{Cart-BNmwscGt.js → Cart-DA1J5Be_.js} +1 -1
- package/assets/{CircularProgress-CzgFv03I.js → CircularProgress-BmaY3soK.js} +3 -3
- package/assets/{Collection-CdFCCFbq.js → Collection-BlMV8rIO.js} +1 -1
- package/assets/{CollectionCarousel-D6IuiIc2.js → CollectionCarousel-B2cDWt_o.js} +1 -1
- package/assets/{Creator-CaxOzhEa.js → Creator-CVsany2p.js} +1 -1
- package/assets/{CssVarsProvider-F9lbInZM.js → CssVarsProvider-D03-j1T8.js} +3 -3
- package/assets/{ExchangeController-DgDdAAKd.js → ExchangeController-BKklF67w.js} +1 -1
- package/assets/{GetCredits-B-aIxpHv.js → GetCredits-l0W_kkUA.js} +1 -1
- package/assets/{HelpersUtil-CYLAmB96.js → HelpersUtil-1AJlaO39.js} +1 -1
- package/assets/{ImportListings-wLBEk5Jj.js → ImportListings-CaC4hXkS.js} +1 -1
- package/assets/ItemDetail-DHaOvIrD.js +78 -0
- package/assets/{LoadMore-DAM-bEob.js → LoadMore-DCZi1YY-.js} +1 -1
- package/assets/{MarketCheckout-BemjD_ML.js → MarketCheckout-BrvEzX8j.js} +1 -1
- package/assets/MyAssets-Gc_o5t9O.js +258 -0
- package/assets/{MyFavorites-D4nPx2R8.js → MyFavorites-CTtHG-tK.js} +1 -1
- package/assets/{MyPurchases-cVdBxnoE.js → MyPurchases-DLOdIHUA.js} +4 -4
- package/assets/{NotFound-8rhBEKBk.js → NotFound-0kATSaSv.js} +1 -1
- package/assets/{PrimaryListModal-DRCA3QS9.js → PrimaryListModal-QH5JEih2.js} +1 -1
- package/assets/{StoreSettings-ggmmaFdw.js → StoreSettings-D97bWmhq.js} +5 -5
- package/assets/{Success-BTcAti-s.js → Success-DRMy6BRe.js} +1 -1
- package/assets/{SwapController-DAWHQ4ok.js → SwapController-C8nP5wvc.js} +1 -1
- package/assets/{Tooltip-CAVGsqiJ.js → Tooltip-BaUllE5E.js} +1 -1
- package/assets/{TradeService-Bq-E9rL5.js → TradeService-ZNznSjPX.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-CO4_1ccR.js → W3MFrameProviderSingleton-B-iMukUt.js} +3 -3
- package/assets/{WebCryptoP256-DHiXQ6Dv.js → WebCryptoP256-BN2oUA6b.js} +1 -1
- package/assets/{authorizations-mnih5q8o.js → authorizations-QONJAQC4.js} +1 -1
- package/assets/{basic-DIfzBgGC.js → basic-BAZBRGQf.js} +1 -1
- package/assets/{biconomy-Btr8t9M_.js → biconomy-Bnx-4bDS.js} +1 -1
- package/assets/{buy-CHyPhIFc.js → buy-CE5I6jg2.js} +1 -1
- package/assets/{buy-gasless-DRDa-VRS.js → buy-gasless-DPcBjPtZ.js} +1 -1
- package/assets/{cart-checkout-4SY4EejM.js → cart-checkout-CUI-WqEI.js} +1 -1
- package/assets/{categories-7ZUMUxRc.js → categories-BGNx7jfw.js} +1 -1
- package/assets/{ccip-CKzYrGsq.js → ccip-CPI8_6cL.js} +1 -1
- package/assets/{ccip-DQPPdysF.js → ccip-s5BQ-vNw.js} +1 -1
- package/assets/collection-Bm8Org8q.js +1 -0
- package/assets/{controller-oqfUGC7Q.js → controller-CL9wipr5.js} +2 -2
- package/assets/{core-BnR4IbQF.js → core-gCo9rRyh.js} +4 -4
- package/assets/{custom-LYbOpT74.js → custom-BIAxnPyV.js} +1 -1
- package/assets/{data-capture-DvxW9LWJ.js → data-capture-D_IuhqRX.js} +1 -1
- package/assets/{email-DblmG_9w.js → email-BCklj9Js.js} +1 -1
- package/assets/{embedded-wallet-BIBD3NXe.js → embedded-wallet-B6X4cZQC.js} +1 -1
- package/assets/emotion-styled.browser.esm-D40Lt8fm.js +1 -0
- package/assets/{engine-Q3dlwVZc.js → engine-skvS20px.js} +1 -1
- package/assets/{errors-B3Jy0VAJ.js → errors-DmdGTuzI.js} +1 -1
- package/assets/{estimate-l1-fee-DPrAoRm1.js → estimate-l1-fee-J0AI4VGA.js} +1 -1
- package/assets/{execute-GsOG5tOz.js → execute-B_XUV-t5.js} +2 -2
- package/assets/{features-BHjaYixx.js → features-D1q967sn.js} +1 -1
- package/assets/{fetchTokenMetadata-CIsTf8qh.js → fetchTokenMetadata-Bgs6k1N5.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-B8oiqf_g.js → get-ecosystem-wallet-info-BRMexyn8.js} +1 -1
- package/assets/{getBalance-Q-FuT0Qm.js → getBalance-D2FG5QKV.js} +1 -1
- package/assets/{getNFT-DBtyLr3S.js → getNFT-BHzS5Cs2.js} +1 -1
- package/assets/{getNFT-BonpS0wI.js → getNFT-DrLPmHpk.js} +1 -1
- package/assets/{getOverlayAlpha-5GYRyW4x.js → getOverlayAlpha-B90Fo_-m.js} +1 -1
- package/assets/{hashTypedData-BhuoQuOn.js → hashTypedData-Cetq1UOK.js} +1 -1
- package/assets/{hashTypedData-l7BbP1BP.js → hashTypedData-DwlPS8MG.js} +1 -1
- package/assets/{import-a0kWnC35.js → import-DLMm_P8-.js} +1 -1
- package/assets/{in-app-ESN8W__G.js → in-app-CL2vGnrW.js} +1 -1
- package/assets/{in-app-wallet-calls-BYj88Ef-.js → in-app-wallet-calls-CQYLsbwB.js} +1 -1
- package/assets/{index-NuJxOSl-.js → index-B-3QmCY1.js} +1 -1
- package/assets/{index-hxYvqItN.js → index-B-wT7-Au.js} +1 -1
- package/assets/{index-Cyn8gRvH.js → index-B65D0iv0.js} +1 -1
- package/assets/{index-BTNH3ieH.js → index-B6gcmiqs.js} +1 -1
- package/assets/{index-DlCwuyBG.js → index-BBg2vZhG.js} +1 -1
- package/assets/{index-B_w7D_1t.js → index-BEYHZcex.js} +1 -1
- package/assets/{index-DjtMF_FP.js → index-BZk7RUfM.js} +1 -1
- package/assets/{index-Cup4Stx2.js → index-BedvNbsM.js} +1 -1
- package/assets/{index-D4JXiKx_.js → index-BkQHYnhC.js} +1 -1
- package/assets/{index-DmGRJRWs.js → index-BptsdzIZ.js} +1 -1
- package/assets/{index-CnnU_mLv.js → index-BrG8RI5z.js} +1 -1
- package/assets/{index-BeGn7EwY.js → index-BywohlL7.js} +1 -1
- package/assets/{index-u26i2x4Z.js → index-C0wsNojR.js} +1 -1
- package/assets/{index-Dz17wnbD.js → index-C2N-AU8j.js} +3 -3
- package/assets/{index-BZcSxyRp.js → index-C2te_xAY.js} +2 -2
- package/assets/{index-Ctb1grEl.js → index-C5t2d1JX.js} +1 -1
- package/assets/{index-BU99LwmJ.js → index-C6-1JAkG.js} +1 -1
- package/assets/{index-Np3Taixr.js → index-C97CPhyL.js} +1 -1
- package/assets/{index-DqNB5gIy.js → index-CHspULa1.js} +1 -1
- package/assets/{index-BJj2KSp_.js → index-CMZ-l1j1.js} +1 -1
- package/assets/{index-B5qcYwN0.js → index-CVPd9k0D.js} +1 -1
- package/assets/{index-zU9Uj5fP.js → index-CW9ug21x.js} +3 -3
- package/assets/{index-DiBhVrGy.js → index-CWfnhYLp.js} +1 -1
- package/assets/{index-CDM_k6C9.js → index-ChbyDwUh.js} +1 -1
- package/assets/{index-CJZmNG9i.js → index-Che81lrU.js} +1 -1
- package/assets/{index-BI7O7l1f.js → index-Chep4cKH.js} +3 -3
- package/assets/{index-DfEfFqPo.js → index-Ctbl3gOg.js} +1 -1
- package/assets/{index-CNzygfnu.js → index-CwlKjFOG.js} +1 -1
- package/assets/{index-DDV0fT7b.js → index-Cx9CeoZH.js} +1 -1
- package/assets/{index-BsaSZdou.js → index-CyrfWYlv.js} +1 -1
- package/assets/{index-BCPi-ClS.js → index-D-i0A7WQ.js} +2 -2
- package/assets/{index-DNIRbQMj.js → index-D2F7-1mk.js} +1 -1
- package/assets/{index-CcLECkyd.js → index-D3iIxnX6.js} +1 -1
- package/assets/{index-BeJqoBti.js → index-D5zi_XmR.js} +1 -1
- package/assets/{index-BYcynwJw.js → index-D6Thjy9g.js} +1 -1
- package/assets/{index-BZLlD7vv.js → index-DAhYJ23_.js} +1 -1
- package/assets/{index-L6AnZu2-.js → index-DLJwIINa.js} +1 -1
- package/assets/{index-DD7JYX6I.js → index-DOyivP0c.js} +2 -2
- package/assets/{index-BnPeVq62.js → index-DTJ6mS_J.js} +1 -1
- package/assets/{index-D_vAUTlU.js → index-DYAXJBpy.js} +1 -1
- package/assets/{index-D2u3qo5-.js → index-DaOu_NHP.js} +20 -20
- package/assets/{index-_zid9pow.js → index-DcsKpVUb.js} +1 -1
- package/assets/{index-B7MM-EDJ.js → index-DexIqMzn.js} +3 -3
- package/assets/{index-BQMla4xK.js → index-DnxELmkR.js} +1 -1
- package/assets/{index-DNgvtVPS.js → index-DyhpH4px.js} +1 -1
- package/assets/{index-nccYW6P3.js → index-Dzy3N4vA.js} +1 -1
- package/assets/{index-YTUbuYV5.js → index-Zev_LSPI.js} +2 -2
- package/assets/{index-GAPC_47T.js → index-d3ZKkcaA.js} +1 -1
- package/assets/{index-B-6uQuND.js → index-nTA1Tk1a.js} +1 -1
- package/assets/{index-BTUsGa6S.js → index-o_m2wFAn.js} +1 -1
- package/assets/{index-T7BPymVH.js → index-uK7qM9c7.js} +1 -1
- package/assets/{index-BDLTpYuD.js → index-yr9vyS0z.js} +1 -1
- package/assets/{index.es-CZyih3uZ.js → index.es-CZtQ8FVb.js} +4 -4
- package/assets/{index.es-DVSJ83NI.js → index.es-DlHsAJbI.js} +1 -1
- package/assets/{index.es-BVmvZPLl.js → index.es-DnNvUOrT.js} +1 -1
- package/assets/{localBatchGatewayRequest-CjdETprd.js → localBatchGatewayRequest-DiUucTH0.js} +1 -1
- package/assets/{mana-rate-DcCwt7oF.js → mana-rate-BX_VjspN.js} +1 -1
- package/assets/{networks-Gp8grhfL.js → networks-D5rFr4Uy.js} +1 -1
- package/assets/{onramp-DzUZOn5v.js → onramp-RD8o9zW8.js} +1 -1
- package/assets/{openzeppelin-Re-ToQ3G.js → openzeppelin-GzHB2W1P.js} +1 -1
- package/assets/{parseNft-DvKM3tDX.js → parseNft-CbgJiXpe.js} +2 -2
- package/assets/{parseSignature-CTjdilwC.js → parseSignature-DGB4v4W-.js} +1 -1
- package/assets/{parseSignature-ChGXlmjA.js → parseSignature-DZazOabU.js} +3 -3
- package/assets/{passkeys-O7R8Skr8.js → passkeys-BDOXnD26.js} +1 -1
- package/assets/{pay-with-exchange-CGXWXub_.js → pay-with-exchange-ChCNzNHg.js} +1 -1
- package/assets/{qr-overlay-DQBJWl2U.js → qr-overlay-BIPzfQds.js} +1 -1
- package/assets/{receive-amOjcYAx.js → receive-CsWO80gl.js} +1 -1
- package/assets/{resolveImplementation-CstEI2ba.js → resolveImplementation-CInkT_I9.js} +1 -1
- package/assets/{rpc-ZYSy-eJG.js → rpc-DOR15RcJ.js} +1 -1
- package/assets/{secp256k1-DADPdC2O.js → secp256k1-C8pkcGJ3.js} +1 -1
- package/assets/{secp256k1-DfE_4Njp.js → secp256k1-DUaLgTGJ.js} +1 -1
- package/assets/{secp256k1-CdMvj0c6.js → secp256k1-N7sx_maT.js} +1 -1
- package/assets/{send-B9WVOIIy.js → send-BEnX8iHn.js} +1 -1
- package/assets/{send-batch-transaction-BpIXP8aL.js → send-batch-transaction-Cl-WR4dD.js} +1 -1
- package/assets/{send-eip712-transaction-C-UOcWS2.js → send-eip712-transaction-BnpCutKi.js} +2 -2
- package/assets/{send-gasless-transaction-D2HEIqEd.js → send-gasless-transaction-CGxm_r0E.js} +2 -2
- package/assets/{send-transaction-rA10MuVm.js → send-transaction-BcThrsCr.js} +2 -2
- package/assets/{sendRawTransaction-FATzwmfZ.js → sendRawTransaction-BJLeMhAd.js} +3 -3
- package/assets/{serializeTransaction-DixmbC2c.js → serializeTransaction-BMgHZkKp.js} +1 -1
- package/assets/{session-proposal-BOIm4XSE.js → session-proposal-Ds2RY-CA.js} +1 -1
- package/assets/{session-request-c_OnJFO0.js → session-request-CLTybC5q.js} +2 -2
- package/assets/{signing-41DxLyFg.js → signing-Dr9d33yf.js} +3 -3
- package/assets/{socials-BWQzaLAW.js → socials-CaYP6kJa.js} +1 -1
- package/assets/{swaps-CivCXKBU.js → swaps-BHrutsbS.js} +1 -1
- package/assets/{thirdweb-C8KpcE8I.js → thirdweb-DIAnaqbp.js} +3 -3
- package/assets/{to-serializable-transaction-BWjd1RMk.js → to-serializable-transaction-DqNZm-Zy.js} +2 -2
- package/assets/{trade-encoding-CtfVB9K4.js → trade-encoding-DqhxC9n7.js} +1 -1
- package/assets/{transactionReceipt-Coqh5oX3.js → transactionReceipt-iA2axmC8.js} +1 -1
- package/assets/{transactions-C7og5tua.js → transactions-DAq9dNVo.js} +1 -1
- package/assets/{useCreditPacks-Djg10PxH.js → useCreditPacks-CV1PhThV.js} +1 -1
- package/assets/{useInfiniteGrid-Cg-FBhvv.js → useInfiniteGrid-Dh1-HUF4.js} +1 -1
- package/assets/{useStore-Bvj7HKvJ.js → useStore-DBh7zwbY.js} +1 -1
- package/assets/useTheme--bd6Ub02.js +1 -0
- package/assets/useTheme-ddXkiCRZ.js +1 -0
- package/assets/{verifyHash--D25lC81.js → verifyHash-C62BfpA_.js} +1 -1
- package/assets/{w3m-modal-BG_0bUMI.js → w3m-modal-BT8yrl74.js} +1 -1
- package/assets/{w3m-modal-B0pocWlf.js → w3m-modal-Bxbo8T_Z.js} +1 -1
- package/assets/{wait-for-tx-receipt-DxxlAWDR.js → wait-for-tx-receipt-D_og-NhE.js} +1 -1
- package/assets/{wallets-DsPPoviJ.js → wallets-B72ZtlfA.js} +5 -5
- package/assets/{web-connector-Brej9YrP.js → web-connector-DBmok4eN.js} +3 -3
- package/assets/{writeContract-CgNduh80.js → writeContract-CLiFKioV.js} +1 -1
- package/assets/{zoraTestnet-Bc68rMQr.js → zoraTestnet-Bfnpd26p.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/ItemDetail-DYEljYNo.js +0 -78
- package/assets/MyAssets-uGWTenCp.js +0 -258
- package/assets/collection-LjzTm4kD.js +0 -1
- package/assets/emotion-styled.browser.esm-CtG7z_nw.js +0 -1
- package/assets/useTheme-BDMGaPba.js +0 -1
- package/assets/useTheme-DpYzrDIG.js +0 -1
package/index.html
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
<link rel="canonical" href="https://shop.decentraland.org/" />
|
|
17
17
|
|
|
18
18
|
<!-- Favicon: the Decentraland mark (same as the marketplace). -->
|
|
19
|
-
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
20
|
-
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
19
|
+
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/favicon.ico" sizes="16x16 32x32 48x48" />
|
|
20
|
+
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/apple-touch-icon.png" />
|
|
21
21
|
<meta name="apple-mobile-web-app-title" content="DCL Shop" />
|
|
22
|
-
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
22
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/site.webmanifest" />
|
|
23
23
|
|
|
24
24
|
<!-- Open Graph -->
|
|
25
25
|
<meta property="og:type" content="website" />
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<meta name="twitter:image:alt" content="Decentraland Shop — wearables and emotes for your avatar" />
|
|
49
49
|
|
|
50
50
|
<!-- Sitemap -->
|
|
51
|
-
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
51
|
+
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/sitemap.xml" />
|
|
52
52
|
|
|
53
53
|
<!-- Warm the 3D preview / fonts -->
|
|
54
54
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
<link rel="preconnect" href="https://wearable-preview.decentraland.org" />
|
|
61
61
|
<link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
|
|
62
62
|
<link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
|
|
63
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
64
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
65
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
66
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
67
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
68
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
69
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
63
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/assets/index-DaOu_NHP.js"></script>
|
|
64
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/assets/react-BrLDncxD.js">
|
|
65
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/assets/dcl-schemas-BICTSpB5.js">
|
|
66
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/assets/sentry-DYZXk5O5.js">
|
|
67
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/assets/ethers-BIvjmL85.js">
|
|
68
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/assets/intl-CBcMB1D2.js">
|
|
69
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994103056.commit-191afbc/assets/index-Bw9Y53F1.css">
|
|
70
70
|
</head>
|
|
71
71
|
<body>
|
|
72
72
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/shop",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-29994103056.commit-191afbc",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Decentraland",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/decentraland/shop.git"
|
|
10
10
|
},
|
|
11
|
-
"commit": "
|
|
11
|
+
"commit": "191afbc5d2e37d740e0200156317e1862ac7d321"
|
|
12
12
|
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dz17wnbD.js","assets/react-BrLDncxD.js","assets/dcl-schemas-BICTSpB5.js","assets/index-D2u3qo5-.js","assets/sentry-DYZXk5O5.js","assets/ethers-BIvjmL85.js","assets/intl-CBcMB1D2.js","assets/index-Bw9Y53F1.css","assets/emotion-styled.browser.esm-CtG7z_nw.js","assets/useTheme-BDMGaPba.js","assets/CircularProgress-CzgFv03I.js","assets/index-BCPi-ClS.js","assets/useTheme-DpYzrDIG.js","assets/CssVarsProvider-F9lbInZM.js","assets/getOverlayAlpha-5GYRyW4x.js","assets/index-D4JXiKx_.js","assets/colors-LINLm1ux.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as oe,r as d,j as e,d as pa,u as ya,L as fa}from"./react-BrLDncxD.js";import{d as X,n as xa,o as ve,t,ah as ba,i as ga,b as ja,w as va,q as ne,x as D,y as ge,z as fe,ai as Na,E as Z,g as E,j as de,B as z,C as xe,p as wa,J as Je,_ as be,ak as ka,ax as Ia,ay as Ca,az as Sa,aA as Aa,c as Ne,aB as Ma,L as Ye,m as B,aC as Pa,I as T,F as K,s as W,aD as Ea,aE as Fa,aF as La,G as Ta,ae as ze,a as Ke,aG as Da,aH as Ra,aI as qa,aJ as Ba,aK as $a,af as Oa,u as za,aL as Ka,aM as Wa,aN as Va,h as Qa,aO as We,aP as Ua,f as Ga,ao as Ha,aQ as Ja,aR as Ya,ap as Xa,aS as Za,aT as et}from"./index-D2u3qo5-.js";import{d as G}from"./dcl-schemas-BICTSpB5.js";import{b as Ve,c as at}from"./buy-CHyPhIFc.js";import{P as tt,f as st}from"./PrimaryListModal-DRCA3QS9.js";import{b as it,w as rt,S as nt,G as lt}from"./buy-gasless-DRDa-VRS.js";import{a as dt}from"./authorizations-mnih5q8o.js";import{u as ot,M as ct,c as mt}from"./useCreditPacks-Djg10PxH.js";import{W as ut,C as ht,a as _t}from"./CollectionCarousel-D6IuiIc2.js";import{R as Qe}from"./resume-buy-Bf0zIH7y.js";import{a as pt,f as je,i as yt}from"./errors-B3Jy0VAJ.js";import{E as ce}from"./ErrorNotice-BDH9xoG4.js";import{l as ft}from"./loader-logo-BzY9EKdC.js";import{C as xt}from"./CircularProgress-CzgFv03I.js";import{a as bt,b as gt}from"./trade-encoding-CtfVB9K4.js";import{u as jt,M as vt}from"./MarketCheckout-BemjD_ML.js";import{s as Nt}from"./address-DrURAr9O.js";import{T as Xe}from"./Tooltip-CAVGsqiJ.js";import"./sentry-DYZXk5O5.js";import"./ethers-BIvjmL85.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-iOoE_Tw3.js";import"./mana-rate-DcCwt7oF.js";import"./emotion-CSxEP8yM.js";function wt({item:s,onClose:n,resume:i=!1}){var ae,te;const{session:o}=X(),{data:m}=xa(o),h=ve(),w=oe(),x=ot().packs.slice(0,ct),[c,l]=d.useState("loading"),[a,j]=d.useState(null),[y,N]=d.useState(""),[F,b]=d.useState(s.priceCredits),[f,g]=d.useState(null),I=d.useRef(null),M=(f==null?void 0:f.credits)??F,ee=(m==null?void 0:m.credits)??0;d.useEffect(()=>{let u=!1;if(!o){l("error"),j(t("buyModal.signInToCheckout"));return}const C=_=>{const S=_-((m==null?void 0:m.credits)??0),v=x.find(R=>R.credits>=S)??x[x.length-1];N(v.id),D("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:_,credits_balance:(m==null?void 0:m.credits)??0,shortfall:Math.max(0,S)}),l("nofunds")};return(async()=>{var _,S;try{const v=await ba(s);if(!v)throw new Error("not for sale");if(ga(v,o.address))throw new Error("You can't buy your own listing.");const R=ja((S=(_=v.received)==null?void 0:_[0])==null?void 0:S.amount);if(!Number.isFinite(R)||R<=0)throw new Error("price unavailable");const V=Math.ceil(R/10);if(u)return;if(b(V),m!=null&&m.credits<V){C(V);return}try{const{credit:A,maxCreditedValue:J,usdCents:O}=await va(o.identity,R,v.id);if(u){ne(o.identity,[A.id]).catch(()=>{});return}I.current=A.id;const se=Math.ceil(O/10);b(se);const Q={trade:v,credit:A,maxCreditedValue:J,usdCents:O,credits:se};g(Q),i?H(Q):l("ready")}catch(A){if(u)return;if(pt(A)){C(V);return}throw A}}catch(v){if(u)return;D(fe(v)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:ge(v)}),l("error"),j(je(v,t("buyModal.error.generic"),{sale:!0}))}})(),()=>{u=!0,I.current&&o&&(ne(o.identity,[I.current]).catch(()=>{}),I.current=null)}},[]);async function H(u=f){if(!o||!u)return;l("processing"),j(null);let C=!1;try{const _={trade:u.trade,buyer:o.address,signer:o.signer,credits:[u.credit],maxCreditedValue:u.maxCreditedValue};let S;if(dt())try{S=await it(_),await rt(S),C=!0}catch(v){if(v instanceof nt)C=!0;else if(v instanceof lt)S=await Ve(_);else throw v}else S=await Ve(_);I.current=null,D("Shop Completed Purchase",{...Na([s]),payment_type:"credits",no_crypto_step:C,transaction_hash:S??null}),h.invalidateQueries({queryKey:["usd-balance"]}),l("complete")}catch(_){fe(_)||Z(_,{flow:"buy",step:"submit",gasless:C}),ne(o.identity,[u.credit.id]).catch(()=>{}),I.current=null,D(fe(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ge(_)}),h.invalidateQueries({queryKey:["usd-balance"]}),j(je(_,t("buyModal.error.generic"),{sale:!0})),l("error")}}async function me(){if(!(!y||!o)){try{sessionStorage.setItem(Qe,JSON.stringify(s))}catch{}f&&ne(o.identity,[f.credit.id]).catch(()=>{}),I.current=null,l("loading");try{const u=await mt(y,{address:o.address,identity:o.identity});if(u.url){window.location.href=u.url;return}w("/credits")}catch(u){Z(u,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Qe)}catch{}j(t("buyModal.error.creditsCheckout")),l("error")}}}const $=c==="processing",L=c==="complete"?t("buyModal.titleComplete"):c==="nofunds"?t("buyModal.titleNoFunds"):t("buyModal.titleBuy");return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":t("buyModal.dialogAria",{name:s.name}),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:$?void 0:n,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${c==="processing"||c==="loading"?" buy-modal__card--tall":""}`,children:[e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:L}),!$&&e.jsx("button",{className:"buy-modal__x",onClick:n,"aria-label":t("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:c==="nofunds"?t("buyModal.dclBalance"):t("buyModal.myCreditsBalance")}),e.jsx(E,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:de(ee)})]})]}),c==="loading"&&e.jsx("div",{className:"buy-modal__body buy-modal__processing",children:e.jsx(xt,{size:44})}),c==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(ce,{message:a}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:n,children:t("buyModal.close")})})]}),c==="nofunds"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsx(ut,{className:"buy-modal__warning-ico"}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:t("buyModal.insufficientFunds")})," ",t("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:t("buyModal.warningCreditsAmount",{count:Math.max(0,M-ee)})})," ",t("buyModal.warningToPurchase",{count:1})]})]}),e.jsx(Ue,{item:s,priceCredits:M}),e.jsx("div",{className:"buy-modal__packs",children:x.map(u=>{const C=u.credits,_=u.id===y;return e.jsxs("button",{className:`buy-modal__pack${_?" buy-modal__pack--on":""}`,onClick:()=>N(u.id),children:[e.jsx(E,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:de(C)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",u.usd.toFixed(2),")"]})]},u.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(E,{className:"buy-modal__total-ico"}),e.jsx("span",{children:de(((ae=x.find(u=>u.id===y))==null?void 0:ae.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",(((te=x.find(u=>u.id===y))==null?void 0:te.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:n,children:t("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:()=>void me(),children:t("buyModal.buy")})]})]}),c==="ready"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(Ue,{item:s,priceCredits:M}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient buy-modal__btn--full",onClick:()=>void H(),children:t("buyModal.buy")})})]}),c==="processing"&&e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:ft,alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:i?t("buyModal.completingPurchase"):t("buyModal.completingTransaction")}),e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]}),c==="complete"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__success",children:[e.jsxs("svg",{viewBox:"0 0 64 64",width:"64",height:"64","aria-hidden":!0,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsxs("p",{className:"buy-modal__success-text",children:[e.jsx("b",{children:t("getCredits.successTitle")})," ",t("buyModal.successBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:()=>w("/assets?tab=mine"),children:t("buyModal.myAssets")}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:n,children:[t("buyModal.tryInWorld"),e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":!0,children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]})]})}function Ue({item:s,priceCredits:n}){return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsx("div",{className:"buy-modal__asset-name",title:s.name,children:s.name||t("buyModal.itemFallback")}),s.creator?e.jsx(ht,{address:s.creator,className:"buy-modal__asset-creator"}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(E,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:de(n)})]})]})]})}const kt=1e3*60*60*24*182;function It({asset:s,session:n,onClose:i}){const o=ve(),m=oe(),[h,w]=d.useState("10"),[x,c]=d.useState(null),[l,a]=d.useState(null),[j,y]=d.useState(!1),[N,F]=d.useState(null);async function b(){a(null);const g=Number(h);if(!Number.isInteger(g)||g<=0){a(t("sellModal.errorWholeNumber"));return}y(!0);try{c(t("sellModal.statusPreparing")),await bt({signer:n.signer,contractAddress:s.contractAddress,chainId:s.chainId}),c(t("sellModal.statusListing"));const I=await gt({signer:n.signer,nft:{contractAddress:s.contractAddress,tokenId:s.tokenId,network:s.network,chainId:s.chainId},usdPrice:g/10,expiresAtMs:Date.now()+kt});c(t("sellModal.statusPublishing")),await wa(I,n.identity),c(null),F(g),D("Shop Listed Item",{item_id:s.itemId??s.tokenId??null,contract_address:s.contractAddress,price_credits:g,price_usd:g/10,listing_type:"secondary",is_primary:!1}),Je.success(t("sellModal.toastOnSale",{name:s.name})),o.invalidateQueries({queryKey:["my-assets",n.address]})}catch(I){Z(I,{flow:"list_secondary"}),D("Shop Listing Failed",{listing_type:"secondary",error_code:ge(I)}),a(je(I,t("sellModal.errorGeneric"))),c(null)}finally{y(!1)}}function f(){i(),m(`/item/${s.contractAddress}/${s.tokenId}`)}return N!==null?e.jsx("div",{className:"modal-backdrop",onClick:i,role:"presentation",children:e.jsxs("div",{className:"modal modal--success",onClick:g=>g.stopPropagation(),role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:t("sellModal.successTitle")}),s.image?e.jsx("img",{className:"modal__img",src:s.image,alt:s.name}):null,e.jsx("p",{className:"modal-success__name",children:s.name}),e.jsxs("p",{className:"muted small",children:[t("sellModal.listedFor")," ",e.jsxs("strong",{children:[e.jsx(E,{className:"ccy-mark"})," ",N]})]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx(z,{variant:"ghost",onClick:i,children:t("getCredits.done")}),e.jsx(z,{variant:"purple",onClick:f,children:t("sellModal.viewInShop")})]})]})}):e.jsx("div",{className:"modal-backdrop",onClick:i,role:"presentation",children:e.jsxs("div",{className:"modal","data-testid":"modal",onClick:g=>g.stopPropagation(),role:"dialog","aria-modal":"true",children:[e.jsx("h2",{className:"modal__title",children:t("sellModal.listTitle",{name:s.name})}),s.image?e.jsx("img",{className:"modal__img",src:s.image,alt:s.name}):null,e.jsxs("label",{className:"field",children:[e.jsx("span",{children:t("sellModal.priceLabel",{currency:xe.name})}),e.jsx("input",{type:"number",min:"1",step:"1",value:h,onChange:g=>w(g.target.value),disabled:j})]}),e.jsx("p",{className:"muted small",children:t("sellModal.pricedInWhole",{currency:xe.name,currencySingular:xe.nameSingular})}),x?e.jsx("p",{className:"muted",children:x}):null,e.jsx(ce,{message:l}),e.jsxs("div",{className:"modal__actions",children:[e.jsx(z,{variant:"ghost",onClick:i,disabled:j,children:t("sellModal.cancel")}),e.jsx(z,{onClick:()=>void b(),disabled:j,children:j?t("sellModal.listing"):t("sellModal.putOnSale")})]})]})})}const Ct=d.lazy(async()=>{const[{EmoteControls:s},{Experimental_CssVarsProvider:n},{light:i}]=await Promise.all([be(()=>import("./index-Dz17wnbD.js").then(o=>o.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),be(()=>import("./index-BCPi-ClS.js"),__vite__mapDeps([11,3,1,2,4,5,6,7,12,9,13,14])),be(()=>import("./index-D4JXiKx_.js"),__vite__mapDeps([15,3,1,2,4,5,6,7,16,14,13,9]))]);return{default:o=>e.jsx(n,{theme:i,children:e.jsx(s,{...o})})}});function St(s){return e.jsx(d.Suspense,{fallback:null,children:e.jsx(Ct,{...s})})}function At({item:s}){const n=X(f=>{var g;return(g=f.session)==null?void 0:g.address}),{data:i,isLoading:o}=ka(n),m=n&&i?n:"default",h=s.category==="emote",[w,x]=d.useState("item"),c=!h&&w==="item",l=c||!o,[a,j]=d.useState(!0);d.useEffect(()=>{j(!0)},[s.id,c]);const y=!!n&&!!i,N=y&&Ia(s,Ca(i)),F=Sa(s)[0],b=y&&!N&&!h;return e.jsxs(e.Fragment,{children:[l?e.jsx(Aa,{id:"shop-item-preview",contractAddress:s.contractAddress,tokenId:s.tokenId??void 0,itemId:s.tokenId?void 0:s.itemId??void 0,profile:c?void 0:N?m:"default",bodyShape:c||N?void 0:F,type:h?void 0:c?G.PreviewType.WEARABLE:G.PreviewType.AVATAR,emote:h||c?void 0:G.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:h?1.5:void 0,wheelStart:h?100:void 0,dev:Ne.chainId===80002,onLoad:()=>j(!1)}):null,!l||a?e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":t("itemPreview.loading"),children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})}):null,b&&!c?e.jsx("p",{className:"item-preview__note",children:t("itemPreview.shownOnBody",{shape:Ma(F)})}):null,h?e.jsx("div",{className:"item-preview__emote-controls","data-testid":"emote-controls",children:e.jsx(St,{wearablePreviewId:"shop-item-preview",hideFrameInput:!0})}):e.jsxs("div",{className:"item-preview__toggle",role:"group","aria-label":t("itemPreview.previewMode"),children:[e.jsxs("button",{type:"button",className:w==="avatar"?"is-active":"","aria-pressed":w==="avatar","aria-label":t("itemPreview.onAvatar"),onClick:()=>x("avatar"),children:[e.jsxs("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"7.5",r:"4"}),e.jsx("path",{d:"M4 20c0-4.2 3.6-6.5 8-6.5s8 2.3 8 6.5v.5H4z"})]}),e.jsx("span",{className:"item-preview__toggle-label",children:t("itemPreview.onAvatar")})]}),e.jsxs("button",{type:"button",className:w==="item"?"is-active":"","aria-pressed":w==="item","aria-label":t("itemPreview.item"),onClick:()=>x("item"),children:[e.jsx("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M8.5 3 3 6l1.8 3.8 2.2-1V21h10V8.8l2.2 1L22 6l-5.5-3a2.6 2.6 0 0 1-4.5 1.4A2.6 2.6 0 0 1 8.5 3z"})}),e.jsx("span",{className:"item-preview__toggle-label",children:t("itemPreview.item")})]})]})]})}function Ze(){return Ne.shopServerUrl||(typeof window<"u"?window.location.origin:"")}async function Mt(s,n,i){const o=new URLSearchParams({contractAddress:s,itemId:n}),m=`${Ze()}/notify-requests?${o.toString()}`,h=await Ye(m,{method:"GET",identity:i,metadata:{}});if(!h.ok)throw new Error(`getNotifyRequest ${h.status}`);return h.json()}async function Pt(s,n){const i=`${Ze()}/notify-requests`,o=await Ye(i,{method:"POST",identity:n,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok)throw new Error(`createNotifyRequest ${o.status}: ${await o.text()}`);await o.json().catch(()=>{})}function Ge(s){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s.trim())}function Et({item:s}){const n=X(b=>b.session),i=X(b=>b.signIn),[o,m]=d.useState(""),[h,w]=d.useState(!1),[x,c]=d.useState(!1),[l,a]=d.useState(null),j=!!n&&!!s.contractAddress&&!!s.itemId,{data:y}=B({queryKey:["notify-request",s.contractAddress,s.itemId,n==null?void 0:n.address],enabled:j,queryFn:()=>Mt(s.contractAddress,s.itemId,n.identity)});d.useEffect(()=>{y!=null&&y.email&&m(b=>b||y.email)},[y==null?void 0:y.email]),d.useEffect(()=>{if(!n)return;let b=!1;return Pa().then(f=>{!b&&f&&m(g=>g||f)}),()=>{b=!0}},[n]);const N=x||!!(y!=null&&y.subscribed);async function F(b){if(b.preventDefault(),!(!n||!s.itemId||!Ge(o)||h)){w(!0),a(null);try{await Pt({contractAddress:s.contractAddress,itemId:s.itemId,chainId:s.chainId,email:o.trim()},n.identity),c(!0)}catch(f){Z(f,{flow:"notify-me",contractAddress:s.contractAddress,itemId:s.itemId}),a(t("notifyMe.error"))}finally{w(!1)}}}return n?N?e.jsxs("div",{className:"notify notify__done","data-testid":"notify-subscribed",children:[e.jsx("span",{className:"notify__done-check","aria-hidden":!0,children:e.jsx(T,{name:"check",size:12})}),e.jsx("span",{className:"notify__done-text",children:t("notifyMe.subscribedBody")})]}):e.jsxs("form",{className:"notify",onSubmit:F,"data-testid":"notify",children:[e.jsx("label",{className:"notify__label",htmlFor:"notify-email",children:t("notifyMe.label")}),e.jsxs("div",{className:"notify__row",children:[e.jsx("input",{id:"notify-email",className:"notify__input",type:"email",inputMode:"email",autoComplete:"email",placeholder:t("notifyMe.placeholder"),value:o,onChange:b=>m(b.target.value),"data-testid":"notify-email"}),e.jsx("button",{type:"submit",className:"notify__btn",disabled:!Ge(o)||h,"data-testid":"notify-submit",children:h?t("notifyMe.working"):t("notifyMe.cta")})]}),e.jsx(ce,{message:l})]}):e.jsx("div",{className:"notify","data-testid":"notify",children:e.jsx("button",{type:"button",className:"notify__signin",onClick:i,"data-testid":"notify-signin",children:t("notifyMe.signInCta")})})}const Ft=W.button`
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
gap: 8px;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 40px;
|
|
9
|
-
padding: 0 12px;
|
|
10
|
-
border: 2px solid #c640cd;
|
|
11
|
-
border-radius: 8px;
|
|
12
|
-
background: transparent;
|
|
13
|
-
color: ${K.colors.accent};
|
|
14
|
-
font-family: ${K.font.sans};
|
|
15
|
-
font-weight: 600;
|
|
16
|
-
font-size: 15px;
|
|
17
|
-
line-height: 24px;
|
|
18
|
-
letter-spacing: 0.46px;
|
|
19
|
-
text-transform: uppercase;
|
|
20
|
-
cursor: not-allowed;
|
|
21
|
-
opacity: 0.55;
|
|
22
|
-
transition: opacity 0.15s ease;
|
|
23
|
-
|
|
24
|
-
&:hover,
|
|
25
|
-
&:focus-visible {
|
|
26
|
-
opacity: 0.75;
|
|
27
|
-
}
|
|
28
|
-
&:focus-visible {
|
|
29
|
-
outline: 2px solid ${K.colors.accent};
|
|
30
|
-
outline-offset: 2px;
|
|
31
|
-
}
|
|
32
|
-
`;function Lt({item:s}){return e.jsx(Xe,{block:!0,content:t("makeOffer.comingSoon"),onShow:()=>D("Shop Make Offer Tooltip Shown",{contractAddress:s.contractAddress,itemId:s.itemId}),children:e.jsxs(Ft,{type:"button","aria-disabled":!0,onClick:n=>n.preventDefault(),"data-testid":"make-offer",children:[e.jsx(T,{name:"offer",size:20,"aria-hidden":!0}),e.jsx("span",{children:t("makeOffer.cta")})]})})}const Tt=W(Ea)`
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
gap: 1px;
|
|
37
|
-
background: ${K.colors.lineStrong};
|
|
38
|
-
`;function Dt({contractAddress:s,name:n,items:i,className:o}){const m=oe();if(!s||!n)return null;const h=(i??[]).map(c=>c.thumbnail).filter(c=>!!c).slice(0,4),w=h.slice(0,2),x=h.slice(2,4);return e.jsxs(Fa,{as:"button","data-link":!0,className:o,"data-testid":"creator",onClick:c=>{c.stopPropagation(),m(`/collection/${s}`)},children:[h.length>0?e.jsxs(Tt,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{className:`collection-collage__row${x.length===0?" collection-collage__row--full":""}`,children:w.map((c,l)=>e.jsx("img",{src:c,alt:""},l))}),x.length>0?e.jsx("span",{className:"collection-collage__row",children:x.map((c,l)=>e.jsx("img",{src:c,alt:""},l))}):null]}):null,e.jsx(La,{"data-testid":"creator-name",children:Ta(n)})]})}const Rt=W(z)`
|
|
39
|
-
margin-top: 6px;
|
|
40
|
-
`,le=W(z)`
|
|
41
|
-
&& {
|
|
42
|
-
width: 100%;
|
|
43
|
-
height: 48px;
|
|
44
|
-
font-size: 15px;
|
|
45
|
-
font-weight: 600;
|
|
46
|
-
letter-spacing: 0.46px;
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
justify-content: center;
|
|
50
|
-
gap: 8px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
${K.media.down("lg")} {
|
|
54
|
-
.item-detail__ctas--dual && {
|
|
55
|
-
flex: 1 1 auto;
|
|
56
|
-
width: auto;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`,qt=W("div")`
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
gap: 10px;
|
|
63
|
-
width: 100%;
|
|
64
|
-
`,Bt=W(z)`
|
|
65
|
-
&& {
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 44px;
|
|
68
|
-
}
|
|
69
|
-
`,$t=W("p")`
|
|
70
|
-
margin: 4px 0 0;
|
|
71
|
-
font-size: 13px;
|
|
72
|
-
color: ${K.colors.muted};
|
|
73
|
-
|
|
74
|
-
a {
|
|
75
|
-
color: ${K.colors.accent};
|
|
76
|
-
font-weight: 600;
|
|
77
|
-
}
|
|
78
|
-
`;function Ot(s){return Object.values(G.Rarity).includes(s)}function zt(s){return s==="male"?t("itemDetail.genderMale"):s==="female"?t("itemDetail.genderFemale"):s==="unisex"?t("itemDetail.genderUnisex"):null}function He(s){return s.wearableCategory?s.wearableCategory.replace(/_/g," "):s.category==="emote"?t("itemDetail.categoryEmote"):t("itemDetail.categoryWearable")}function ps(){var $e;const{contractAddress:s,tokenId:n}=pa(),{state:i}=ya(),o=oe(),m=!!(i!=null&&i.market),h=(i==null?void 0:i.marketPriceCredits)??null,w=ze(r=>r.add),x=ze(r=>r.items),c=Ke(r=>r.toggle),{session:l}=X(),[a,j]=d.useState(()=>i!=null&&i.item?{...i.item,tradeId:i.tradeId??i.item.tradeId}:{id:`${s}-${n}`,name:"",creator:"",contractAddress:s??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:Ne.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:n??void 0,tradeId:i==null?void 0:i.tradeId}),[y,N]=d.useState(!1),[F,b]=d.useState(!!(i!=null&&i.resumeBuy));d.useEffect(()=>{i!=null&&i.resumeBuy&&N(!0)},[i==null?void 0:i.resumeBuy]);const{data:f=[],isFetched:g}=B({queryKey:["collection-items",a.contractAddress],enabled:!!a.contractAddress,queryFn:()=>Ha(a.contractAddress,{first:20}).then(r=>r.items)}),I=a.available==null&&!a.tokenId,{data:M,isLoading:ee}=B({queryKey:["shop-item",a.contractAddress,n],enabled:!m&&!!a.contractAddress&&!!n&&(!(i!=null&&i.item)||I),queryFn:()=>Ja(a.contractAddress,n)});d.useEffect(()=>{M&&j(r=>r.tradeId?r.available!=null&&r.wearableCategory?r:{...r,available:r.available??M.available,wearableCategory:r.wearableCategory??M.wearableCategory}:{...M})},[M]);const[H,me]=d.useState(!1),{data:$=""}=B({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>Ya(a.contractAddress,a.itemId)}),{data:L}=B({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>Xa(a.contractAddress)});d.useEffect(()=>{if(a.name||M||f.length===0)return;const r=n&&f.find(k=>k.tokenId===n||k.itemId===n)||f.find(k=>k.contractAddress===a.contractAddress);r&&j(k=>({...r,tradeId:k.tradeId??r.tradeId}))},[f,M]);const ae=d.useMemo(()=>{const r=new Set,k=[];for(const P of f){if(P.id===a.id||a.itemId&&P.itemId===a.itemId||a.tokenId&&P.tokenId===a.tokenId)continue;const Oe=`${P.contractAddress}-${P.itemId??P.tokenId??P.id}`;r.has(Oe)||(r.add(Oe),k.push(P))}return k},[f,a.id,a.itemId,a.tokenId]),{data:te,isLoading:u}=B({queryKey:["detail-trade",a.id,a.tradeId,a.contractAddress,a.itemId],enabled:!!a.contractAddress,queryFn:async()=>{if(a.tradeId)return a.tradeId;if(a.itemId){const r=await Za(a.contractAddress,a.itemId);return(r==null?void 0:r.id)??null}return null}}),C=a.tradeId??te??void 0,_=!!C,{data:S}=jt(m),v=d.useMemo(()=>{if(!m||!(i!=null&&i.item))return null;const r=i.item;return r.manaWei?{tradeId:r.tradeId??r.id,listingType:"primary",contractAddress:r.contractAddress,itemId:r.itemId??"",name:r.name,thumbnail:r.thumbnail,rarity:r.rarity,category:r.category,wearableCategory:r.wearableCategory??null,creator:r.creator,manaWei:r.manaWei,available:1,network:r.network,chainId:r.chainId,createdAt:0}:null},[m,i==null?void 0:i.item]),R=m&&h!=null&&!!S&&!!v,V=Da({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),A=d.useMemo(()=>({...a,tradeId:C,id:C??a.id}),[a,C]),J=x.some(r=>r.id===A.id),O=!A.tokenId,se=(($e=x.find(r=>r.id===A.id))==null?void 0:$e.quantity)??0,Q=O&&typeof a.available=="number"&&se>=a.available,q=Ke(r=>!!r.items[a.id]),we=d.useRef(null);d.useEffect(()=>{!a.name||u||we.current===a.id||(we.current=a.id,D("Shop Viewed Item",{...Ra(a),for_sale:_}),qa(a))},[a.id,a.name,u,_]);const ie=`${s}/${n}`,ke=d.useRef(ie);d.useEffect(()=>{ke.current!==ie&&(ke.current=ie,i!=null&&i.item&&j({...i.item,tradeId:i.tradeId??i.item.tradeId}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"}))},[ie]);function ea(){!_||he||u||!O&&J||Q||w(A,"item_detail")}const ue=Ot(a.rarity)?a.rarity:G.Rarity.COMMON,Ie=zt(a.gender),Ce=Ba(a),Se=$a(a.gender),aa=_&&V,ta=t("itemDetail.moreFromCollection"),he=Oa(a,l==null?void 0:l.address),re=ve(),[sa,Ae]=d.useState(!1),[ia,Me]=d.useState(!1),[Y,Pe]=d.useState(!1),[ra,Ee]=d.useState(null),{data:p,isLoading:na}=B({queryKey:["owned-token",a.contractAddress,a.tokenId,l==null?void 0:l.address],enabled:!m&&!!(l!=null&&l.address)&&!!a.contractAddress&&!!a.tokenId,queryFn:()=>l?et(l.address,a.contractAddress,a.tokenId):null});d.useEffect(()=>{p&&j(r=>r.name?r.issuedId?r:{...r,issuedId:p.issuedId}:{id:p.id,name:p.name,creator:"",contractAddress:p.contractAddress,itemId:p.itemId,category:p.category,rarity:p.rarity??"common",network:p.network,chainId:p.chainId,thumbnail:p.image,priceCredits:p.listingPrice??0,gender:null,isSmart:!1,tokenId:p.tokenId,issuedId:p.issuedId,tradeId:p.tradeId})},[p]);const{data:_e}=B({queryKey:["publishable-item",a.contractAddress,a.itemId,l==null?void 0:l.address],enabled:he&&!!l&&!!a.itemId,queryFn:async()=>l?(await st(l.address,l.identity)).find(k=>k.contractAddress.toLowerCase()===a.contractAddress.toLowerCase()&&k.blockchainItemId===a.itemId)??null:null}),U=!!p,pe=!m&&(he||U),la=U?!!(p!=null&&p.isOnSale):_,ye=U?p==null?void 0:p.tradeId:C,Fe=U?!!p:!!_e;async function Le(){await Promise.all([re.invalidateQueries({queryKey:["owned-token",a.contractAddress,a.tokenId]}),re.invalidateQueries({queryKey:["detail-trade"]}),re.invalidateQueries({queryKey:["shop-item"]}),re.invalidateQueries({queryKey:["collection-sale-state"]})])}async function Te(r={}){if(!l||!ye)return!1;Ee(null),Pe(!0);try{const k=await Ga(ye);return await at({trade:k,signer:l.signer}),r.silent||Je.success(t("myAssets.removedFromSale",{name:a.name})),await Le(),!0}catch(k){const P=yt(k);return P||Z(k,{flow:"remove-listing",tradeId:ye}),Ee(P?t("getCredits.errorCanceled"):t("myAssets.removeListingError")),!1}finally{Pe(!1)}}function De(){U?Ae(!0):Me(!0)}async function da(){await Te({silent:!0})&&De()}function Re(){Ae(!1),Me(!1),Le()}const qe=_?u?t("itemDetail.checking"):Q?t("itemDetail.maxInCart"):!O&&J?t("assetCard.inCart"):t("assetCard.addToCart"):t("itemDetail.notForSale"),oa=typeof a.available=="number"&&a.available>0&&!a.tokenId&&!m,ca=!m&&!a.tokenId&&a.available===0,ma=!pe&&_&&!m,ua=m||!pe,ha=ee||!!a.contractAddress&&!g||!a.name&&na,Be=!a.name&&!ha,_a=/^https?:\/\//i.test(a.thumbnail);return za(Be?{title:t("seo.item.notFoundTitle"),noindex:!0}:a.name?{title:a.name,description:$||t("seo.item.fallbackDescription",{name:a.name,rarity:a.rarity,category:He(a),creator:Nt(a.creator)}),image:_a?a.thumbnail:void 0,type:"product"}:{}),Be?e.jsxs("div",{className:"item-detail item-detail--notfound",children:[e.jsx(T,{name:"cart",className:"item-detail__notfound-ico"}),e.jsx("h1",{className:"item-detail__notfound-title",children:t("itemDetail.notAvailableTitle")}),e.jsx("p",{className:"muted",children:t("itemDetail.notAvailableBody")}),e.jsx(Rt,{variant:"purple",onClick:()=>o("/assets"),children:t("notFound.cta")})]}):e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":t("itemDetail.breadcrumbAria"),children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>o("/assets"),children:t("nav.collectibles")}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:a.name||t("itemDetail.itemFallback")})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsxs("div",{className:"item-detail__preview","data-testid":"item-preview",children:[a.name?e.jsx(At,{item:a}):e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":t("itemPreview.loading"),children:e.jsx("span",{className:"skeleton item-preview__skeleton","aria-hidden":!0})}),e.jsx("button",{className:`item-detail__fav item-detail__fav--preview${q?" is-on":""}`,onClick:()=>c(a),"aria-pressed":q,"aria-label":q?t("assetCard.removeFromFavorites"):t("assetCard.addToFavorites"),children:e.jsx(T,{name:q?"heart-solid":"heart",size:18})})]}),e.jsx("div",{className:"item-detail__info",children:a.name?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:a.name}),e.jsx("button",{className:`item-detail__fav${q?" is-on":""}`,onClick:()=>c(a),"aria-pressed":q,"aria-label":q?t("assetCard.removeFromFavorites"):t("assetCard.addToFavorites"),children:e.jsx(T,{name:q?"heart-solid":"heart",size:18})})]}),e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",style:{background:Va(ue),color:Wa(ue)},title:Ka(a.rarity),children:a.rarity}),e.jsxs("span",{className:"chip item-detail__chip",children:[Ce?e.jsx(T,{name:Ce,size:18,color:"var(--text-2)"}):null,He(a)]}),Ie?e.jsxs("span",{className:"chip item-detail__chip",children:[Se?e.jsx(T,{name:Se,size:18,color:"var(--text-2)"}):null,Ie]}):null,a.issuedId?e.jsxs("span",{className:"chip item-detail__chip","data-testid":"detail-issued",children:["#",a.issuedId]}):null]}),$?e.jsxs("div",{className:"item-detail__section item-detail__description",children:[e.jsx("div",{className:"item-detail__label",children:t("itemDetail.description")}),e.jsx("p",{className:`item-detail__desc-text${H?" is-expanded":""}`,children:$}),$.length>140?e.jsx("button",{className:"link item-detail__desc-toggle",onClick:()=>me(r=>!r),children:H?t("itemDetail.showLess"):t("itemDetail.readMore")}):null]}):null,a.creator||L!=null&&L.name?e.jsxs("div",{className:"item-detail__meta",children:[a.creator?e.jsxs("div",{className:"item-detail__meta-col",children:[e.jsx("div",{className:"item-detail__label",children:t("itemDetail.creator")}),e.jsx(Qa,{address:a.creator,className:"item-detail__creator",linkToProfile:!0,hidePrefix:!0})]}):null,L!=null&&L.name?e.jsxs("div",{className:"item-detail__meta-col item-detail__meta-col--collection",children:[e.jsx("div",{className:"item-detail__label",children:t("itemDetail.collection")}),e.jsx(Dt,{contractAddress:a.contractAddress,name:L.name,items:f,className:"item-detail__creator"})]}):null]}):null,e.jsx("hr",{className:"item-detail__divider"}),e.jsx("div",{className:"item-detail__price-block",children:e.jsxs("div",{className:"item-detail__price-row",children:[e.jsxs("div",{className:"item-detail__price-col",children:[m||_?e.jsx("div",{className:"item-detail__price-label",children:t("itemDetail.price")}):null,m?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"item-detail__price item-detail__price--market",children:h==null?e.jsx("span",{className:"item-detail__price-value",children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"item-detail__approx","aria-hidden":!0,children:"≈"}),e.jsx(E,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:h})]})}),e.jsx("div",{className:"item-detail__market-note muted",children:t("assetCard.marketPrice")})]}):_?aa?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx(E,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx(E,{className:"item-detail__diamond item-detail__diamond--was"}),a.compareAtCredits]}),We(a.compareAtCredits,a.priceCredits)>0?e.jsx("span",{className:"item-detail__sale-badge",children:t("assetCard.saleWithDiscount",{pct:We(a.compareAtCredits,a.priceCredits)})}):null,e.jsx(Ua,{endsAt:a.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx(E,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}):e.jsxs("div",{className:"item-detail__price item-detail__price--none",children:[e.jsx("span",{children:t("itemDetail.notForSale")}),e.jsx(Xe,{content:t("itemDetail.notForSaleHint"),children:e.jsx("span",{className:"item-detail__price-info",tabIndex:0,role:"img","aria-label":t("itemDetail.notForSaleHint"),children:e.jsx(T,{name:"info",size:14})})})]})]}),oa?e.jsxs("div",{className:"item-detail__stock-col",children:[e.jsx("div",{className:"item-detail__price-label",children:t("itemDetail.stock")}),e.jsxs("div",{className:"item-detail__stock-value",children:[(a.available??0).toLocaleString(),"/",G.Rarity.getMaxSupply(ue).toLocaleString()]})]}):ca?e.jsx("div",{className:"item-detail__stock-col",children:e.jsx("div",{className:"item-detail__stock-value item-detail__stock-value--out","data-testid":"out-of-stock",children:t("itemDetail.outOfStock")})}):null]})}),e.jsx("div",{className:`item-detail__ctas${ua?" item-detail__ctas--buttons":""}${ma?" item-detail__ctas--dual":""}`,children:m?e.jsxs(le,{variant:"purple",onClick:()=>N(!0),disabled:!R,children:[e.jsx("span",{className:"item-detail__cta-label",children:t("assetCard.buyNow")}),h!=null?e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(E,{className:"item-detail__cta-diamond"}),h]}):null]}):pe?e.jsxs(qt,{"data-testid":"manage-actions",children:[e.jsx(ce,{message:ra}),la?e.jsxs(e.Fragment,{children:[e.jsx(le,{variant:"purple",onClick:()=>void da(),disabled:Y||!Fe,children:e.jsx("span",{className:"item-detail__cta-label",children:Y?t("itemDetail.manageWorking"):t("itemDetail.manageUpdatePrice")})}),e.jsx(Bt,{variant:"ghost",onClick:()=>void Te(),disabled:Y,children:Y?t("myAssets.removing"):t("itemDetail.manageRemove")})]}):e.jsx(le,{variant:"purple",onClick:()=>{U&&D("Shop Started Listing",{listing_type:"secondary",item_id:a.itemId??a.tokenId??null}),De()},disabled:Y||!Fe,children:e.jsx("span",{className:"item-detail__cta-label",children:t("itemDetail.manageList")})}),e.jsxs($t,{children:[t("itemDetail.ownItemPrefix")," ",e.jsx(fa,{to:"/my-assets",children:t("nav.myAssets")}),t("itemDetail.ownItemSuffix")]})]}):_?e.jsxs(e.Fragment,{children:[e.jsxs(le,{variant:"purple",onClick:()=>N(!0),disabled:u,children:[e.jsx("span",{className:"item-detail__cta-label",children:t("assetCard.buyNow")}),e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(E,{className:"item-detail__cta-diamond"}),a.priceCredits]})]}),e.jsxs("button",{className:"item-detail__addcart",onClick:ea,disabled:u||(O?Q:J),"aria-label":qe,children:[e.jsx(T,{name:"cart-solid"}),e.jsx("span",{className:"item-detail__addcart-label",children:qe})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Et,{item:a}),e.jsx(Lt,{item:a})]})})]}):e.jsx(Kt,{})})]}),e.jsx(_t,{title:ta,items:ae,onViewAll:a.contractAddress?()=>o(`/collection/${a.contractAddress}`):void 0}),y&&m&&v&&S?e.jsx(vt,{listing:v,rate:S,onClose:()=>N(!1),onSold:()=>N(!1)}):y&&!m?e.jsx(wt,{item:A,resume:F,onClose:()=>{N(!1),b(!1)}}):null,sa&&p&&l?e.jsx(It,{asset:p,session:l,onClose:Re}):null,ia&&_e&&l?e.jsx(tt,{item:_e,session:l,onClose:Re}):null]})}function Kt(){return e.jsxs("div",{className:"item-detail__info-skel","aria-hidden":!0,children:[e.jsx("span",{className:"skeleton id-skel__title"}),e.jsxs("div",{className:"id-skel__chips",children:[e.jsx("span",{className:"skeleton id-skel__chip"}),e.jsx("span",{className:"skeleton id-skel__chip"})]}),e.jsx("span",{className:"skeleton id-skel__line"}),e.jsx("span",{className:"skeleton id-skel__line id-skel__line--short"}),e.jsx("hr",{className:"item-detail__divider"}),e.jsx("span",{className:"skeleton id-skel__price"}),e.jsx("span",{className:"skeleton id-skel__btn"})]})}export{ps as ItemDetail,ps as default};
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import{L as Se,b as Ye,r as d,j as t}from"./react-BrLDncxD.js";import{s as a,F as s,I as j,u as Je,t as r,d as Ve,o as Ze,G as le,m as M,B as Xe,A as q,x as et,H as tt,f as st,J as ot,E as nt,c as je,K as rt}from"./index-D2u3qo5-.js";import{f as at}from"./import-a0kWnC35.js";import{P as it,f as lt}from"./PrimaryListModal-DRCA3QS9.js";import{c as ct}from"./buy-CHyPhIFc.js";import{R as G,C as dt,a as mt,F as pt,S as D,b as ce}from"./categories-7ZUMUxRc.js";import{L as ut}from"./LoadMore-DAM-bEob.js";import{D as de,F as me,R as ft,a as xt,b as ht,c as yt,d as gt,S as bt,e as wt,f as St,g as jt,h as $t,i as Ct,j as It,k as kt,C as vt,l as At,m as Et,n as Tt,M as Ft}from"./Assets.styles-Dz0IZ5_I.js";import{u as Rt}from"./useInfiniteGrid-Cg-FBhvv.js";import{E as U}from"./ErrorNotice-BDH9xoG4.js";import{n as $e}from"./emotion-CSxEP8yM.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DYZXk5O5.js";import"./ethers-BIvjmL85.js";import"./intl-CBcMB1D2.js";import"./mana-rate-DcCwt7oF.js";import"./sendMetaTransaction-iOoE_Tw3.js";import"./trade-encoding-CtfVB9K4.js";import"./authorizations-mnih5q8o.js";import"./errors-B3Jy0VAJ.js";import"./Tooltip-CAVGsqiJ.js";a.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 4px;
|
|
5
|
-
width: 100%;
|
|
6
|
-
`;a.h2`
|
|
7
|
-
margin: 0;
|
|
8
|
-
padding: 4px 4px 2px;
|
|
9
|
-
font-family: ${s.font.sans};
|
|
10
|
-
font-weight: 700;
|
|
11
|
-
font-size: 12px;
|
|
12
|
-
letter-spacing: 0.46px;
|
|
13
|
-
text-transform: uppercase;
|
|
14
|
-
color: ${s.colors.muted};
|
|
15
|
-
`;a("button",$e("selected"))`
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
gap: 10px;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 40px;
|
|
21
|
-
padding: 4px 12px;
|
|
22
|
-
border: 0;
|
|
23
|
-
border-radius: 8px;
|
|
24
|
-
background: ${({selected:o})=>o?s.colors.media:"transparent"};
|
|
25
|
-
color: ${s.colors.text};
|
|
26
|
-
font-family: ${s.font.sans};
|
|
27
|
-
font-weight: ${({selected:o})=>o?600:400};
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
text-align: left;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
|
|
32
|
-
@media (hover: hover) {
|
|
33
|
-
&:hover {
|
|
34
|
-
background: ${s.colors.media};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
&:focus-visible {
|
|
38
|
-
outline: 2px solid ${s.colors.accent};
|
|
39
|
-
outline-offset: 2px;
|
|
40
|
-
}
|
|
41
|
-
`;a(j)`
|
|
42
|
-
width: 18px;
|
|
43
|
-
height: 18px;
|
|
44
|
-
flex: none;
|
|
45
|
-
color: ${s.colors.muted};
|
|
46
|
-
`;a.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
gap: 8px;
|
|
50
|
-
width: 100%;
|
|
51
|
-
`;a.span`
|
|
52
|
-
font-family: ${s.font.sans};
|
|
53
|
-
font-weight: 600;
|
|
54
|
-
font-size: 14px;
|
|
55
|
-
line-height: 1.43;
|
|
56
|
-
color: ${s.colors.text};
|
|
57
|
-
padding: 0 4px;
|
|
58
|
-
`;a.div`
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-wrap: wrap;
|
|
61
|
-
gap: 8px;
|
|
62
|
-
padding: 4px;
|
|
63
|
-
`;a("button",$e("selected"))`
|
|
64
|
-
display: inline-flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
gap: 4px;
|
|
67
|
-
padding: 4px 10px;
|
|
68
|
-
border-radius: 6px;
|
|
69
|
-
background: ${({selected:o})=>o?s.colors.text:s.colors.softWhite};
|
|
70
|
-
border: ${({selected:o})=>o?`1px solid ${s.colors.text}`:`0.5px solid ${s.colors.gray4}`};
|
|
71
|
-
color: ${({selected:o})=>o?s.colors.white:s.colors.gray0};
|
|
72
|
-
font-family: ${s.font.sans};
|
|
73
|
-
font-weight: ${({selected:o})=>o?600:400};
|
|
74
|
-
font-size: 12px;
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
|
|
77
|
-
&:hover {
|
|
78
|
-
border-color: ${s.colors.text};
|
|
79
|
-
}
|
|
80
|
-
&:focus-visible {
|
|
81
|
-
outline: 2px solid ${s.colors.accent};
|
|
82
|
-
outline-offset: 2px;
|
|
83
|
-
}
|
|
84
|
-
`;const _t=a.div`
|
|
85
|
-
display: flex;
|
|
86
|
-
align-items: center;
|
|
87
|
-
gap: 8px;
|
|
88
|
-
height: 44px;
|
|
89
|
-
padding: 0 12px;
|
|
90
|
-
margin-bottom: 16px;
|
|
91
|
-
border: 1px solid ${s.colors.lineStrong};
|
|
92
|
-
border-radius: ${s.radius.btn};
|
|
93
|
-
background: ${s.colors.white};
|
|
94
|
-
|
|
95
|
-
&:focus-within {
|
|
96
|
-
border-color: ${s.colors.accent};
|
|
97
|
-
}
|
|
98
|
-
`,Lt=a(j)`
|
|
99
|
-
width: 18px;
|
|
100
|
-
height: 18px;
|
|
101
|
-
flex: none;
|
|
102
|
-
color: ${s.colors.muted};
|
|
103
|
-
`,Ot=a.input`
|
|
104
|
-
flex: 1;
|
|
105
|
-
min-width: 0;
|
|
106
|
-
border: 0;
|
|
107
|
-
background: none;
|
|
108
|
-
padding: 0;
|
|
109
|
-
font-family: ${s.font.sans};
|
|
110
|
-
font-size: 14px;
|
|
111
|
-
color: ${s.colors.text};
|
|
112
|
-
|
|
113
|
-
&::placeholder {
|
|
114
|
-
color: ${s.colors.muted2};
|
|
115
|
-
}
|
|
116
|
-
&:focus {
|
|
117
|
-
outline: 0;
|
|
118
|
-
}
|
|
119
|
-
`,Pt=a.button`
|
|
120
|
-
display: grid;
|
|
121
|
-
place-items: center;
|
|
122
|
-
width: 24px;
|
|
123
|
-
height: 24px;
|
|
124
|
-
border: 0;
|
|
125
|
-
border-radius: 50%;
|
|
126
|
-
background: ${s.colors.chip};
|
|
127
|
-
color: ${s.colors.text};
|
|
128
|
-
cursor: pointer;
|
|
129
|
-
flex: none;
|
|
130
|
-
|
|
131
|
-
&:focus-visible {
|
|
132
|
-
outline: 2px solid ${s.colors.accent};
|
|
133
|
-
outline-offset: 2px;
|
|
134
|
-
}
|
|
135
|
-
`,zt=a(j)`
|
|
136
|
-
width: 12px;
|
|
137
|
-
height: 12px;
|
|
138
|
-
`,pe=a.div`
|
|
139
|
-
display: grid;
|
|
140
|
-
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
|
|
141
|
-
gap: 20px;
|
|
142
|
-
|
|
143
|
-
${s.media.down("sm")} {
|
|
144
|
-
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
145
|
-
gap: 12px;
|
|
146
|
-
}
|
|
147
|
-
`;a.p`
|
|
148
|
-
margin: 24px 0;
|
|
149
|
-
font-family: ${s.font.sans};
|
|
150
|
-
font-size: 14px;
|
|
151
|
-
color: ${s.colors.muted};
|
|
152
|
-
`;const ue=a.div`
|
|
153
|
-
display: flex;
|
|
154
|
-
flex-direction: column;
|
|
155
|
-
align-items: center;
|
|
156
|
-
justify-content: center;
|
|
157
|
-
gap: 6px;
|
|
158
|
-
padding: 72px 24px;
|
|
159
|
-
text-align: center;
|
|
160
|
-
`,fe=a.div`
|
|
161
|
-
display: flex;
|
|
162
|
-
align-items: center;
|
|
163
|
-
justify-content: center;
|
|
164
|
-
width: 72px;
|
|
165
|
-
height: 72px;
|
|
166
|
-
margin-bottom: 10px;
|
|
167
|
-
border-radius: 50%;
|
|
168
|
-
background: ${s.colors.navViolet};
|
|
169
|
-
color: ${s.colors.accent};
|
|
170
|
-
`,xe=a.p`
|
|
171
|
-
margin: 0;
|
|
172
|
-
font-family: ${s.font.sans};
|
|
173
|
-
font-size: 18px;
|
|
174
|
-
font-weight: 600;
|
|
175
|
-
color: ${s.colors.text};
|
|
176
|
-
`,he=a.p`
|
|
177
|
-
margin: 0;
|
|
178
|
-
max-width: 360px;
|
|
179
|
-
font-family: ${s.font.sans};
|
|
180
|
-
font-size: 14px;
|
|
181
|
-
line-height: 1.5;
|
|
182
|
-
color: ${s.colors.muted};
|
|
183
|
-
`,Bt=a(Se)`
|
|
184
|
-
margin-top: 12px;
|
|
185
|
-
display: inline-flex;
|
|
186
|
-
align-items: center;
|
|
187
|
-
height: 40px;
|
|
188
|
-
padding: 0 20px;
|
|
189
|
-
border-radius: 8px;
|
|
190
|
-
background: ${s.colors.accent};
|
|
191
|
-
color: #fff;
|
|
192
|
-
font-family: ${s.font.sans};
|
|
193
|
-
font-size: 14px;
|
|
194
|
-
font-weight: 600;
|
|
195
|
-
text-decoration: none;
|
|
196
|
-
cursor: pointer;
|
|
197
|
-
|
|
198
|
-
&:hover {
|
|
199
|
-
background: ${s.colors.accentHover};
|
|
200
|
-
}
|
|
201
|
-
`,Kt=a.section`
|
|
202
|
-
max-width: 520px;
|
|
203
|
-
margin: 48px auto;
|
|
204
|
-
text-align: center;
|
|
205
|
-
display: flex;
|
|
206
|
-
flex-direction: column;
|
|
207
|
-
gap: 16px;
|
|
208
|
-
align-items: center;
|
|
209
|
-
`,Nt=a.h1`
|
|
210
|
-
margin: 0;
|
|
211
|
-
font-family: ${s.font.sans};
|
|
212
|
-
font-weight: 700;
|
|
213
|
-
font-size: 24px;
|
|
214
|
-
color: ${s.colors.text};
|
|
215
|
-
`,Mt=a.p`
|
|
216
|
-
margin: 0;
|
|
217
|
-
font-family: ${s.font.sans};
|
|
218
|
-
font-size: 15px;
|
|
219
|
-
color: ${s.colors.muted};
|
|
220
|
-
`,qt=a(Se)`
|
|
221
|
-
display: flex;
|
|
222
|
-
align-items: center;
|
|
223
|
-
gap: 12px;
|
|
224
|
-
margin-bottom: 16px;
|
|
225
|
-
padding: 12px 16px;
|
|
226
|
-
border-radius: ${s.radius.btn};
|
|
227
|
-
background: ${s.colors.rarityBg};
|
|
228
|
-
color: ${s.colors.text};
|
|
229
|
-
text-decoration: none;
|
|
230
|
-
|
|
231
|
-
&:hover {
|
|
232
|
-
filter: brightness(0.98);
|
|
233
|
-
}
|
|
234
|
-
&:focus-visible {
|
|
235
|
-
outline: 2px solid ${s.colors.accent};
|
|
236
|
-
outline-offset: 2px;
|
|
237
|
-
}
|
|
238
|
-
`,Gt=a.span`
|
|
239
|
-
display: flex;
|
|
240
|
-
flex-direction: column;
|
|
241
|
-
flex: 1;
|
|
242
|
-
min-width: 0;
|
|
243
|
-
font-family: ${s.font.sans};
|
|
244
|
-
`,Dt=a.strong`
|
|
245
|
-
font-weight: 600;
|
|
246
|
-
font-size: 14px;
|
|
247
|
-
color: ${s.colors.text};
|
|
248
|
-
`,Ut=a.span`
|
|
249
|
-
font-size: 12px;
|
|
250
|
-
color: ${s.colors.muted};
|
|
251
|
-
`,Ht=a.span`
|
|
252
|
-
flex: none;
|
|
253
|
-
font-weight: 600;
|
|
254
|
-
font-size: 13px;
|
|
255
|
-
color: ${s.colors.accent};
|
|
256
|
-
text-transform: uppercase;
|
|
257
|
-
letter-spacing: 0.046em;
|
|
258
|
-
`,Qt=48,ye=[{key:"wearables",labelKey:"myAssets.sectionWearables",category:"wearable"},{key:"emotes",labelKey:"myAssets.sectionEmotes",category:"emote"},{key:"names",labelKey:"myAssets.sectionNames",category:"ens"},{key:"creations",labelKey:"myAssets.sectionCreations"}],H=[{key:"newest",label:"filterBar.sortNewest",server:"newest"},{key:"name",label:"filterBar.sortName",server:"name"},{key:"cheapest",label:"filterBar.sortCheapest",server:"cheapest"}];function ge(o){return o==="wearables"||o==="emotes"}const be={wearables:"wearable",emotes:"emote",names:"names",creations:""},Wt={wearable:"wearables",emote:"emotes",names:"names"};function Yt(o){return`${je.builderUrl}/names/${encodeURIComponent(o)}`}function we(o){return{id:o.id,name:o.name,creator:"",contractAddress:o.contractAddress,itemId:o.itemId,category:o.category,rarity:o.rarity??"common",network:o.network,chainId:o.chainId,thumbnail:o.image,priceCredits:o.listingPrice??0,gender:null,isSmart:!1,tokenId:o.tokenId,issuedId:o.issuedId}}function Jt(o,T=0){return{id:`${o.contractAddress}-${o.blockchainItemId}`,name:o.name,creator:"",contractAddress:o.contractAddress,itemId:o.blockchainItemId,category:o.category,rarity:o.rarity,network:"MATIC",chainId:je.chainId,thumbnail:o.thumbnail,priceCredits:T,gender:null,isSmart:!1}}function gs(){var re,ae;Je({title:r("nav.myAssets"),noindex:!0});const{session:o,error:T,signIn:Ce,restore:Q}=Ve(),F=Ze(),[Ie,ke]=Ye(),W=Ie.get("section"),l=ye.some(e=>e.key===W)?W:"wearables",[m,R]=d.useState("all"),[h,_]=d.useState([]),[p,$]=d.useState(null),[w,ve]=d.useState("newest"),[C,Y]=d.useState(""),[y,Ae]=d.useState(""),[I,g]=d.useState(!1),[Ee,Te]=d.useState(!0),[Fe,Re]=d.useState(!1),[J,V]=d.useState(null),[_e,Z]=d.useState(null),[Le,X]=d.useState(null);d.useEffect(()=>{Q()},[Q]),d.useEffect(()=>{const e=setTimeout(()=>Ae(C.trim()),300);return()=>clearTimeout(e)},[C]),d.useEffect(()=>{if(!I)return;const e=i=>{i.key==="Escape"&&g(!1)};document.addEventListener("keydown",e);const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=n}},[I]);const u=o==null?void 0:o.address,Oe=ye.find(e=>e.key===l),k=ge(l),ee=(H.find(e=>e.key===w)??H[0]).server,Pe=m==="on_sale"?r("filter.onSale"):m==="not_for_sale"?r("filter.notForSale"):"",ze=G.filter(e=>h.includes(e)).map(le).join(", ");function te(e){ke(n=>{const i=new URLSearchParams(n);return i.set("section",e),i},{replace:!0}),$(null),ge(e)||_([]),g(!1)}function se(e){_(n=>n.includes(e)?n.filter(i=>i!==e):[...n,e])}function Be(e){const n=Wt[e];n&&te(n)}const{items:L,total:Ke,isLoading:O,isPlaceholderData:P,error:Ne,hasNextPage:Me,isFetchingNextPage:oe,fetchNextPage:qe}=Rt(["my-assets",u,l,m,h,p,y,ee],e=>tt(u,{category:Oe.category,first:Qt,skip:e,search:y||void 0,rarities:k&&h.length?h:void 0,wearableCategories:l==="wearables"&&p?ce[p]:void 0,emoteCategories:l==="emotes"&&p?ce[p]:void 0,onlyOnSale:m==="on_sale"||void 0,sortBy:ee}).then(n=>({items:n.assets,total:n.total})),{enabled:!!u&&l!=="creations"}),z=d.useMemo(()=>m==="not_for_sale"?L.filter(e=>!e.isOnSale):L,[L,m]),{data:v,isLoading:B,isError:Ge}=M({queryKey:["publishable-items",u],queryFn:()=>lt(u,o.identity),enabled:!!o&&l==="creations",retry:!1}),K=d.useMemo(()=>[...new Set((v??[]).map(e=>e.contractAddress))],[v]),{data:A}=M({queryKey:["collection-sale-state",u,K],enabled:K.length>0,queryFn:async()=>{const e=await Promise.all(K.map(async i=>[i,await rt(i)])),n={};for(const[i,c]of e)for(const[f,x]of Object.entries(c))n[`${i}-${f}`]=x;return n}}),S=e=>A==null?void 0:A[`${e.contractAddress}-${e.blockchainItemId}`],N=d.useMemo(()=>{let e=v??[];if(m==="on_sale"?e=e.filter(i=>{var c;return(c=S(i))==null?void 0:c.isOnSale}):m==="not_for_sale"&&(e=e.filter(i=>{var c;return!((c=S(i))!=null&&c.isOnSale)})),y){const i=y.toLowerCase();e=e.filter(c=>c.name.toLowerCase().includes(i))}const n=[...e];return w==="name"?n.sort((i,c)=>i.name.localeCompare(c.name)):w==="cheapest"&&n.sort((i,c)=>{var f,x;return(((f=S(i))==null?void 0:f.priceCredits)??0)-(((x=S(c))==null?void 0:x.priceCredits)??0)}),n},[v,A,m,y,w]),{data:b}=M({queryKey:["importable",u],queryFn:()=>at(u),enabled:!!u}),ne=((b==null?void 0:b.creations.length)??0)+((b==null?void 0:b.owned.length)??0);async function De(e,n,i){if(o){X(null),Z(i);try{const c=await st(e);await ct({trade:c,signer:o.signer}),ot.success(r("myAssets.removedFromSale",{name:n})),await F.invalidateQueries({queryKey:["my-assets",o.address]}),await F.invalidateQueries({queryKey:["collection-sale-state"]}),await F.invalidateQueries({queryKey:["publishable-items"]})}catch(c){const f=c,x=(f.message??"").toLowerCase(),ie=f.code===4001||x.includes("reject")||x.includes("denied");ie||nt(c,{flow:"remove-listing",tradeId:e}),X(ie?r("getCredits.errorCanceled"):r("myAssets.removeListingError"))}finally{Z(null)}}}if(!o)return t.jsxs(Kt,{children:[t.jsx(Nt,{children:r("nav.myAssets")}),t.jsx(Mt,{children:r("myAssets.signInPrompt")}),t.jsx(Xe,{variant:"purple",onClick:()=>Ce(),children:r("storeSettings.signIn")}),t.jsx(U,{message:T})]});const Ue=l==="creations"?B:O||P,He=l==="creations"?N.length:m==="not_for_sale"?z.length:Ke,E=[];if(m!=="all"&&E.push({key:"status",label:m==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),k)for(const e of G)h.includes(e)&&E.push({key:`rarity-${e}`,label:le(e),onRemove:()=>se(e)});if(k&&p){const e=(ae=(re=dt.find(n=>n.key===be[l]))==null?void 0:re.subs)==null?void 0:ae.find(n=>n.key===p);E.push({key:"sub",label:e?r(e.labelKey):p,onRemove:()=>$(null)})}function Qe(){R("all"),_([]),$(null)}const We=t.jsxs(t.Fragment,{children:[t.jsx(mt,{title:r("myAssets.assetsHeading"),category:be[l],subCategory:p,onCategory:Be,onSub:$,onCollections:()=>te("creations"),collections:l==="creations",extraLabelKey:"myAssets.sectionCreations",hideAll:!0}),k?t.jsxs(t.Fragment,{children:[t.jsx(de,{}),t.jsx(me,{title:r("assets.rarity"),open:Fe,onToggle:()=>Re(e=>!e),summary:ze,headerTestId:"sidebar-section-toggle",children:t.jsx(ft,{"data-testid":"rarity-filter",children:G.map(e=>{const n=h.includes(e);return t.jsxs(xt,{type:"button",selected:n,"aria-pressed":n,onClick:()=>se(e),"data-testid":"rarity-filter-check",children:[t.jsx(ht,{color:s.rarities[e],children:n?t.jsx(yt,{name:"check","aria-hidden":!0}):null}),t.jsx(gt,{selected:n,children:e})]},e)})})})]}):null,t.jsx(de,{}),t.jsx(me,{title:r("filter.status"),open:Ee,onToggle:()=>Te(e=>!e),summary:Pe,children:[["all",r("filter.statusAll")],["on_sale",r("filter.onSale")],["not_for_sale",r("filter.notForSale")]].map(([e,n])=>t.jsxs(bt,{children:[t.jsx(wt,{type:"radio",name:"myassets-status",checked:m===e,onChange:()=>R(e)}),t.jsx(St,{children:n})]},e))})]});return t.jsxs(jt,{"data-testid":"my-assets",children:[I?t.jsx($t,{onClick:()=>g(!1),"aria-hidden":!0}):null,t.jsxs(Ct,{className:I?"is-open":"","data-testid":"my-assets-sidebar",children:[t.jsxs(It,{children:[t.jsx(kt,{children:r("assets.filters")}),t.jsx(vt,{onClick:()=>g(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),t.jsx(At,{children:We}),t.jsx(Et,{children:t.jsx(Tt,{type:"button",onClick:()=>g(!1),children:r("assets.showItems")})})]}),t.jsxs(Ft,{children:[t.jsxs(_t,{children:[t.jsx(Lt,{name:"search","aria-hidden":!0}),t.jsx(Ot,{type:"search",value:C,placeholder:r("myAssets.searchPlaceholder"),"aria-label":r("myAssets.searchPlaceholder"),onChange:e=>Y(e.target.value)}),C?t.jsx(Pt,{type:"button","aria-label":r("myAssets.clearSearch"),onClick:()=>Y(""),children:t.jsx(zt,{name:"close","aria-hidden":!0})}):null]}),ne>0?t.jsxs(qt,{to:"/import",children:[t.jsx("span",{"aria-hidden":!0,children:"📦"}),t.jsxs(Gt,{children:[t.jsx(Dt,{children:r("myAssets.importTitle")}),t.jsx(Ut,{children:r("myAssets.importSub",{count:ne})})]}),t.jsx(Ht,{children:r("myAssets.import")})]}):null,t.jsx(pt,{sort:w,onSort:ve,sortOptions:H,total:He,loading:Ue,query:y,onOpenFilters:()=>g(!0),chips:E,onClearChips:Qe}),(l==="creations"?Ge:Ne)?t.jsx(U,{message:r("myAssets.ownedError"),testId:"my-assets-error"}):null,t.jsx(U,{message:Le}),l==="creations"?t.jsxs(t.Fragment,{children:[t.jsx(pe,{"data-testid":"grid",children:B?t.jsx(D,{count:12}):N.map(e=>{const n=S(e),i=!!(n!=null&&n.isOnSale);return t.jsx(q,{item:Jt(e,(n==null?void 0:n.priceCredits)??0),mode:"manage",listed:i,busy:_e===e.id,onList:()=>{et("Shop Started Listing",{listing_type:"primary",item_id:e.blockchainItemId}),V(e)},onUnlist:()=>{n!=null&&n.tradeId&&De(n.tradeId,e.name,e.id)}},`${e.contractAddress}-${e.blockchainItemId}`)})}),!B&&N.length===0?t.jsxs(ue,{children:[t.jsx(fe,{children:t.jsx(j,{name:"pen",size:30,"aria-hidden":!0})}),t.jsx(xe,{children:r("myAssets.emptyCreationsTitle")}),t.jsx(he,{children:r("myAssets.nothingToPublish")})]}):null]}):t.jsxs(t.Fragment,{children:[t.jsxs(pe,{"data-testid":"grid",children:[O||P?t.jsx(D,{count:12}):z.map(e=>l==="names"?t.jsx(q,{item:{...we(e),category:"ens"},mode:"manage-link",manageHref:Yt(e.name)},e.id):t.jsx(q,{item:we(e),mode:"manage-link"},e.id)),oe?t.jsx(D,{count:6}):null]}),m!=="not_for_sale"?t.jsx(ut,{hasNextPage:Me,isFetching:oe,onLoadMore:()=>void qe()}):null,!O&&!P&&z.length===0?t.jsxs(ue,{children:[t.jsx(fe,{children:t.jsx(j,{name:l==="names"?"website":l==="emotes"?"emote-dance":"cat-upper",size:30,"aria-hidden":!0})}),t.jsx(xe,{children:l==="names"?r("myAssets.emptyNamesTitle"):r("myAssets.emptyOwnedTitle")}),t.jsx(he,{children:l==="names"?r("myAssets.namesEmpty"):r("myAssets.ownedEmpty")}),l!=="names"?t.jsx(Bt,{to:"/assets",children:r("myAssets.emptyBrowse")}):null]}):null]})]}),J?t.jsx(it,{item:J,session:o,onClose:()=>V(null)}):null]})}export{gs as MyAssets};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./react-BrLDncxD.js";import{ae as h,d as p,af as A,t as u,g as C,B as b,J as x}from"./index-D2u3qo5-.js";const $="https://cdn.decentraland.org/@dcl/shop/0.1.0-29994094833.commit-84e34c2/assets/default-cover-7vUE644d.jpeg",E=2166136261,_=16777619,M=4294967295,S=.75,I=1,N="#ffffff",T=/[\p{L}\p{N}]/u;function j(n){let s=E>>>0;for(let t=0;t<n.length;t++)s^=n.charCodeAt(t),s=Math.imul(s,_)>>>0;return s>>>0}function L(n,s,t){const e=n>=1?n-Math.floor(n):n,i=Math.floor(e*6),c=e*6-i,o=t*(1-s),a=t*(1-s*c),l=t*(1-s*(1-c));switch(i%6){case 0:return{r:t,g:l,b:o};case 1:return{r:a,g:t,b:o};case 2:return{r:o,g:t,b:l};case 3:return{r:o,g:a,b:t};case 4:return{r:l,g:o,b:t};default:return{r:t,g:o,b:a}}}function g(n){return Math.max(0,Math.min(255,Math.round(n*255))).toString(16).padStart(2,"0")}function R({r:n,g:s,b:t}){return`#${g(n)}${g(s)}${g(t)}`}function U(n){if(!n)return"";let s="";for(let t=0;t<n.length;t++){const e=n[t];T.test(e)&&(s+=e)}return s}function B({name:n,hasClaimedName:s,ethAddress:t}){const e=U(n);return e?s||!t||t.length<=4?e:`${e}#${t.slice(-4)}`:""}function H(n){if(!n)return N;const t=j(n)/M;return R(L(t,S,I))}function V({items:n,source:s}){const t=h(r=>r.add),e=h(r=>r.items.map(d=>d.id)),i=p(r=>{var d;return(d=r.session)==null?void 0:d.address}),c=n.filter(r=>r.priceCredits>0&&!A(r,i));if(c.length===0)return null;const o=new Set(e),a=c.filter(r=>!o.has(r.id)),l=c.reduce((r,d)=>r+d.priceCredits,0);function m(){a.forEach(r=>t(r,s)),x.success(u("addAll.added",{count:a.length}))}return f.jsxs("div",{className:"addall",children:[f.jsxs("span",{className:"addall__summary",children:[u("addAll.forSale",{count:c.length})," · ",f.jsx(C,{className:"addall__diamond"})," ",l.toLocaleString()]}),f.jsx(b,{variant:"purple",size:"sm",onClick:m,disabled:a.length===0,children:a.length===0?u("addAll.allInCart"):u("addAll.addAll",{count:a.length})})]})}export{V as A,B as a,$ as d,H as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as z,Y as I,Z as j,$ as q,a0 as R,a1 as A,a2 as D,a3 as G,a4 as U}from"./index-D2u3qo5-.js";import{r as c}from"./react-BrLDncxD.js";var V=I,W=function(e){return e!=="theme"},E=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?V:W},O=function(e,t,s){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(d){return e.__emotion_forwardProp(d)&&i(d)}:i}return typeof r!="function"&&s&&(r=e.__emotion_forwardProp),r},Y=function(e){var t=e.cache,s=e.serialized,r=e.isStringTag;return D(t,s,r),G(function(){return U(t,s,r)}),null},Z=function o(e,t){var s=e.__emotion_real===e,r=s&&e.__emotion_base||e,i,d;t!==void 0&&(i=t.label,d=t.target);var b=O(e,t,s),w=b||E(r),_=!w("as");return function(){var m=arguments,l=s&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&l.push("label:"+i+";"),m[0]==null||m[0].raw===void 0)l.push.apply(l,m);else{var S=m[0];l.push(S[0]);for(var x=m.length,p=1;p<x;p++)l.push(m[p],S[p])}var n=j(function(a,u,v){var P=_&&a.as||r,f="",F=[],h=a;if(a.theme==null){h={};for(var C in a)h[C]=a[C];h.theme=c.useContext(q)}typeof a.className=="string"?f=R(u.registered,F,a.className):a.className!=null&&(f=a.className+" ");var N=A(l.concat(F),u.registered,h);f+=u.key+"-"+N.name,d!==void 0&&(f+=" "+d);var k=_&&b===void 0?E(P):w,g={};for(var y in a)_&&y==="as"||k(y)&&(g[y]=a[y]);return g.className=f,v&&(g.ref=v),c.createElement(c.Fragment,null,c.createElement(Y,{cache:u,serialized:N,isStringTag:typeof P=="string"}),c.createElement(P,g))});return n.displayName=i!==void 0?i:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",n.defaultProps=e.defaultProps,n.__emotion_real=n,n.__emotion_base=r,n.__emotion_styles=l,n.__emotion_forwardProp=b,Object.defineProperty(n,"toString",{value:function(){return"."+d}}),n.withComponent=function(a,u){var v=o(a,z({},t,u,{shouldForwardProp:O(n,u,!0)}));return v.apply(void 0,l)},n}},$=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],T=Z.bind(null);$.forEach(function(o){T[o]=T(o)});export{T as n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n}from"./react-BrLDncxD.js";import{$ as r,a5 as s}from"./index-D2u3qo5-.js";function o(e){return Object.keys(e).length===0}function m(e=null){const t=n.useContext(r);return!t||o(t)?e:t}const u=s();function h(e=u){return m(e)}export{m as a,h as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./react-BrLDncxD.js";import{T as m,l as t}from"./index-D2u3qo5-.js";import{u as o}from"./useTheme-BDMGaPba.js";function a(){const e=o(t);return e[m]||e}export{a as u};
|