@dcl/shop 0.10.1-31042990976.commit-7edc9b6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_assets/Activity-CJO4ONwi.js +371 -0
- package/_assets/AnimatedBackground-CHiOSgJ6.js +97 -0
- package/_assets/{Assets-BzPVRWYe.js → Assets-1KVsmH01.js} +8 -8
- package/_assets/{Assets.styles-D4-S4NWG.js → Assets.styles-BUHnZ7Nb.js} +140 -132
- package/_assets/{Authorizations-gGXOHHeT.js → Authorizations-BGlyC4dr.js} +28 -26
- package/_assets/Cart-afrKtZvj.js +707 -0
- package/_assets/{CircularProgress-DNShuaaC.js → CircularProgress-K7JjSpPZ.js} +1 -1
- package/_assets/{Collection-CI_bqtk6.js → Collection-B0G71rJV.js} +19 -19
- package/_assets/CollectionCarousel-B4hzcKRb.js +816 -0
- package/_assets/{Confetti-DkcOmptO.js → Confetti-BBhDY6Q2.js} +1 -1
- package/_assets/{Creator-CFf63R4B.js → Creator-CYC3eVKx.js} +7 -7
- package/_assets/{ErrorNotice-C_rQ_hZp.js → ErrorNotice-CnPcFEw_.js} +1 -1
- package/_assets/{ExchangeController-BPF_kkCP.js → ExchangeController-BAefeOHy.js} +1 -1
- package/_assets/{Faq--E1fBOzk.js → Faq-D03YByjo.js} +20 -14
- package/_assets/{GetCredits-C2rjzPBY.js → GetCredits-Cyw0rRMV.js} +114 -80
- package/_assets/{Grow-CyHu9l8s.js → Grow-CPwRVF9g.js} +1 -1
- package/_assets/{HelpersUtil-Bh7qiwp_.js → HelpersUtil-DJC0aWJi.js} +1 -1
- package/_assets/{ItemDetail-CtR1YHPh.js → ItemDetail-DSuMCjR9.js} +510 -480
- package/_assets/LazyEmoteControls-D-xqLU4A.js +2 -0
- package/_assets/{LoadMore-BQIcG-2Y.js → LoadMore-CMAFsns3.js} +1 -1
- package/_assets/ManaPricingBanner.styles-Bb7BS6EM.js +93 -0
- package/_assets/{MyAssets-Dk_4queh.js → MyAssets-C5lGRPqP.js} +33 -33
- package/_assets/{MyFavorites-yuyxKJv4.js → MyFavorites-C1t1o6Li.js} +12 -11
- package/_assets/{NotFound-rquTctww.js → NotFound-Bdi_fN5j.js} +1 -1
- package/_assets/{NotificationsBell-CFCmzqHj.js → NotificationsBell-BQk3EV9b.js} +1 -1
- package/_assets/{OutfitDetail-BFc4wS6X.js → OutfitDetail-D3Mwl6KR.js} +4 -4
- package/_assets/{OutfitPreview-C214293j.js → OutfitPreview-BpWwkAro.js} +2 -2
- package/_assets/{OutfitStudio-OOy9Y3VP.js → OutfitStudio-BL7OYD9h.js} +1 -1
- package/_assets/{StoreSettings-BpkjL6md.js → StoreSettings-BNhzJJib.js} +1 -1
- package/_assets/{Success-BXjczKuA.js → Success-Cnu7oCbI.js} +1 -1
- package/_assets/{SwapController-CA7wAH0n.js → SwapController-BD23YCPw.js} +1 -1
- package/_assets/{Tooltip-BoJS18Z3.js → Tooltip-tAvMrdFp.js} +1 -1
- package/_assets/{TradeService-DsmKoPxy.js → TradeService-a2JgoWq2.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-DKeivVWe.js → W3MFrameProviderSingleton-CPDmjNiA.js} +3 -3
- package/_assets/{WebCryptoP256-CJPdW9Ug.js → WebCryptoP256-DIEJtB0I.js} +1 -1
- package/_assets/{authorizations-2Xd-ft_C.js → authorizations-HgwrWkaa.js} +1 -1
- package/_assets/{basic-CpO7N7NV.js → basic-B3qEjJvY.js} +1 -1
- package/_assets/{biconomy-HF5uwOUc.js → biconomy-CzcDC8vB.js} +1 -1
- package/_assets/{builder-uBBMnbtK.js → builder-TZGldT6a.js} +1 -1
- package/_assets/{buy-CgUGATyG.js → buy-CuFubBZY.js} +1 -1
- package/_assets/{buy-gasless-CVTH5KGZ.js → buy-gasless-DO6cBuJ3.js} +1 -1
- package/_assets/{categories-yTyOCTA2.js → categories-B3DJZe02.js} +54 -54
- package/_assets/{ccip-Bq1h60c1.js → ccip-CB03B_MW.js} +1 -1
- package/_assets/{ccip-BjT8ndU2.js → ccip-VI2-jJnV.js} +1 -1
- package/_assets/collectionPage.styles-DXfFyRiH.js +49 -0
- package/_assets/{controller-CBtSaaQD.js → controller-CEo6ipG_.js} +2 -2
- package/_assets/{core-CIuOeePP.js → core-DmqfUS4f.js} +4 -4
- package/_assets/{createSvgIcon-Dax4uwaL.js → createSvgIcon-WfOAVB94.js} +4 -4
- package/_assets/{custom-CYUokIbm.js → custom-bIxIBqCn.js} +1 -1
- package/_assets/{data-capture-6P55-IaB.js → data-capture-Dtaj6ehs.js} +1 -1
- package/_assets/disposePreview-5vjiqVZ0.js +1 -0
- package/_assets/{email-nYmfz15C.js → email-DBXWS-p0.js} +1 -1
- package/_assets/{embedded-wallet-D_e_UWzV.js → embedded-wallet-DqlpsZRk.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-s1GWUoDX.js → emotion-styled.browser.esm-pOAX0dMa.js} +1 -1
- package/_assets/{engine-CpLQoIqI.js → engine-gP8vp-2g.js} +1 -1
- package/_assets/{errors-hu6Xw0D2.js → errors-WNvNILsF.js} +1 -1
- package/_assets/{estimate-l1-fee-CLRDa6fI.js → estimate-l1-fee-X1cvAsdL.js} +1 -1
- package/_assets/{execute-DqPg9Ksw.js → execute-V2l_cDAW.js} +2 -2
- package/_assets/{features-BtrrmffG.js → features-CFR_-yBt.js} +1 -1
- package/_assets/{fetchTokenMetadata-DFJ36WnI.js → fetchTokenMetadata-Do5GLuIQ.js} +2 -2
- package/_assets/{field.styles-XpeJ0COA.js → field.styles-ciG_OcBi.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-DlCx83R8.js → get-ecosystem-wallet-info-CyDTxLgQ.js} +1 -1
- package/_assets/{getBalance-B5ocM9g2.js → getBalance-7wKu8RUe.js} +1 -1
- package/_assets/{getNFT-oiyevCuO.js → getNFT-BbpUiMXR.js} +1 -1
- package/_assets/{getNFT-DBaH5cpy.js → getNFT-DecLUThv.js} +1 -1
- package/_assets/{grid.styles-Dpb8Greh.js → grid.styles-Caahz6PS.js} +1 -1
- package/_assets/{hashTypedData-CeLfcFPQ.js → hashTypedData-C9kgxiiE.js} +1 -1
- package/_assets/{hashTypedData-NanWeJ-D.js → hashTypedData-Ca524zaX.js} +1 -1
- package/_assets/hero-credits-mobile-C9Muog4T.webp +0 -0
- package/_assets/{in-app-DfEVZ7ts.js → in-app-B-disnkm.js} +1 -1
- package/_assets/{in-app-wallet-calls-CaankqgP.js → in-app-wallet-calls-3yighozE.js} +1 -1
- package/_assets/{index-De-xiANX.js → index--1pBMb8n.js} +1 -1
- package/_assets/{index-BNnBkkJr.js → index-2-BWsekC.js} +1 -1
- package/_assets/{index-DxUWfPTE.js → index-8xcbpK09.js} +1 -1
- package/_assets/{index-Dyf04oQ8.js → index-B6l73M7K.js} +1 -1
- package/_assets/{index-BJ6fvgAM.js → index-BBX5Tona.js} +1 -1
- package/_assets/{index-_l18b6D8.js → index-BLCTVSaC.js} +1 -1
- package/_assets/{index-CYd-9A8i.js → index-BMFVFrWl.js} +3 -3
- package/_assets/{index-CaH_IfZ9.js → index-BQB7qYN1.js} +1 -1
- package/_assets/index-BYP7oMPZ.css +1 -0
- package/_assets/{index-BMGdvlP9.js → index-Bd7SNoIN.js} +2 -2
- package/_assets/{index-OiVd03k_.js → index-BdQllJHM.js} +1 -1
- package/_assets/{index-Cbb2oZ2Y.js → index-BjEDpwxR.js} +1 -1
- package/_assets/{index-B4WRMX84.js → index-BrU_i04f.js} +1 -1
- package/_assets/{index-BGSoCmOn.js → index-BuImQh6o.js} +1 -1
- package/_assets/{index-COqbI5lZ.js → index-C3MGLBUO.js} +1 -1
- package/_assets/index-C616xNgB.js +3699 -0
- package/_assets/{index-DI0-gUeO.js → index-CAl290ro.js} +1 -1
- package/_assets/{index-BPoXI4qO.js → index-CEDBhmGn.js} +1 -1
- package/_assets/{index-C8Cm7Ukd.js → index-CEnhHz30.js} +1 -1
- package/_assets/{index-BC1n3NBn.js → index-CFziwAGz.js} +1 -1
- package/_assets/{index-DJxot5zE.js → index-CGcb9Mz3.js} +1 -1
- package/_assets/{index-DxD-NQZ2.js → index-CKkE-eRE.js} +1 -1
- package/_assets/{index-cpjoojGa.js → index-CONyzZZC.js} +3 -3
- package/_assets/{index-BHzYL11-.js → index-CO_xP_3N.js} +1 -1
- package/_assets/{index-BqVSjccZ.js → index-CUAEZ5zJ.js} +1 -1
- package/_assets/index-CZBUgvRB.js +1 -0
- package/_assets/{index-BXdpk7Oq.js → index-CdFrv2eV.js} +1 -1
- package/_assets/{index-zPBk9zxn.js → index-CjhGjrdW.js} +1 -1
- package/_assets/{index-w9D58X3R.js → index-CmlH9TBP.js} +1 -1
- package/_assets/{index-enm6a-Yh.js → index-CyITvpDL.js} +1 -1
- package/_assets/{index-UiKz3U--.js → index-D58OkhU1.js} +1 -1
- package/_assets/{index-BKYIrw8q.js → index-D9iAFl4E.js} +1 -1
- package/_assets/{index-CWMeoaW8.js → index-DCAUOF_r.js} +1 -1
- package/_assets/{index-B-kvIPu1.js → index-DCMLwiSR.js} +1 -1
- package/_assets/{index-CPOch-_L.js → index-DEw1jYQT.js} +1 -1
- package/_assets/{index-Bry4nBQ3.js → index-DJOlt1Iv.js} +1 -1
- package/_assets/{index-Bu9Qy6np.js → index-DKghJgJj.js} +1 -1
- package/_assets/{index-CaRe7gid.js → index-DNvcQt0s.js} +3 -3
- package/_assets/{index-jzVm2M_d.js → index-DRI1gQSo.js} +1 -1
- package/_assets/{index-gR7VkXwX.js → index-DUmo7598.js} +3 -3
- package/_assets/{index-BccvdHMd.js → index-Dag4zALf.js} +1 -1
- package/_assets/index-DsH_mBtT.js +622 -0
- package/_assets/{index-BntzHAg5.js → index-DvjyzmjB.js} +1 -1
- package/_assets/{index-T6PQTPj1.js → index-DxB85HDB.js} +1 -1
- package/_assets/{index-ChhX0J8g.js → index-Eip3e8N8.js} +1 -1
- package/_assets/{index-CQMg581G.js → index-Gw3Mauv_.js} +1 -1
- package/_assets/{index-CkvT2_Qp.js → index-JuH5W7YS.js} +2 -2
- package/_assets/{index-D9avTVnT.js → index-N5sgh9IC.js} +1 -1
- package/_assets/{index-CIJje8vF.js → index-o0b8cjRQ.js} +1 -1
- package/_assets/{index-Deo0xkWr.js → index-p0fxtTsZ.js} +2 -2
- package/_assets/{index-FaWeourd.js → index-p4Ph7ugv.js} +1 -1
- package/_assets/{index-B0jVlmk0.js → index-tCYP1O3W.js} +1 -1
- package/_assets/{index-BZQS2qMR.js → index-yiECqJCb.js} +1 -1
- package/_assets/{index.es-DZrZt1nk.js → index.es-C5PJ78RX.js} +1 -1
- package/_assets/{index.es-COh1P5q0.js → index.es-D73EniUm.js} +1 -1
- package/_assets/{index.es-DKfCNVgZ.js → index.es-DF_hlZIu.js} +4 -4
- package/_assets/{localBatchGatewayRequest-BI4PJuWG.js → localBatchGatewayRequest-DvkdRgNo.js} +1 -1
- package/_assets/{networks-Blxn8DDe.js → networks-7b-i0dnd.js} +1 -1
- package/_assets/{onramp-Dy-wl2-G.js → onramp-CoF8bFaS.js} +1 -1
- package/_assets/{openzeppelin-BMYbmCTg.js → openzeppelin-DcsEW8tQ.js} +1 -1
- package/_assets/{parseNft-C3NZ6wub.js → parseNft-CNJ2CwyE.js} +2 -2
- package/_assets/{parseSignature-DYiE9TKW.js → parseSignature-D0-1k6Yx.js} +1 -1
- package/_assets/{parseSignature-C_OIotiZ.js → parseSignature-whU_pkfu.js} +3 -3
- package/_assets/{passkeys-B1XwJZLc.js → passkeys-SqHHDvyI.js} +1 -1
- package/_assets/{pay-with-exchange-CNHEYWhj.js → pay-with-exchange-Cvr7dd94.js} +1 -1
- package/_assets/promo-best-rated-emotes-C6kNvB-a.png +0 -0
- package/_assets/promo-week-selected-outfits-BBmkZYZx.png +0 -0
- package/_assets/{qr-overlay-xYKFPsA7.js → qr-overlay-HlBTd234.js} +1 -1
- package/_assets/{receive-CZ46hzUV.js → receive-HPltMi_i.js} +1 -1
- package/_assets/{resolveImplementation-CjcXKJyr.js → resolveImplementation-CM1yFlGf.js} +1 -1
- package/_assets/{rpc-CcyaVsGv.js → rpc-CPS_djFB.js} +1 -1
- package/_assets/{secp256k1-CKJqWWFY.js → secp256k1-CQmdb_AD.js} +1 -1
- package/_assets/{secp256k1-CtAF_8et.js → secp256k1-ChRNiO68.js} +1 -1
- package/_assets/{secp256k1-ZiNVKyYC.js → secp256k1-DUTfCpIK.js} +1 -1
- package/_assets/{send-batch-transaction-BjDzAjfB.js → send-batch-transaction-Vn4JOFM5.js} +1 -1
- package/_assets/{send-eip712-transaction-C_cuPsBN.js → send-eip712-transaction-Qvibiwhe.js} +2 -2
- package/_assets/{send-gasless-transaction-nJMNrEi5.js → send-gasless-transaction-DQLcvFHt.js} +2 -2
- package/_assets/{send-transaction-DlrF4JVI.js → send-transaction-CZ0kapdy.js} +2 -2
- package/_assets/{send-C3JUT-Wt.js → send-zy_Vr6BQ.js} +1 -1
- package/_assets/{sendMetaTransaction-CYTRgQS4.js → sendMetaTransaction-Ba_-1nOk.js} +1 -1
- package/_assets/{sendRawTransaction-CrjHCLLH.js → sendRawTransaction-BUz1EYd8.js} +3 -3
- package/_assets/{serializeTransaction-DCwr_uqm.js → serializeTransaction-B8qCVIIu.js} +1 -1
- package/_assets/{session-proposal-Cr_4TYaU.js → session-proposal-BqO43SKO.js} +1 -1
- package/_assets/{session-request-VECe4LIn.js → session-request-DbQI-hjo.js} +2 -2
- package/_assets/{signing-DsQKDYvj.js → signing-CVGndCRE.js} +3 -3
- package/_assets/{skeleton.styles-B5haYcet.js → skeleton.styles-K9f1Sxf1.js} +1 -1
- package/_assets/{socials-B80b3Xbl.js → socials-CNOGl_eO.js} +1 -1
- package/_assets/{styled-qF6AFIDl.js → styled-CljNQW-J.js} +1 -1
- package/_assets/{swaps-9KfTzTvK.js → swaps-D5haogfk.js} +1 -1
- package/_assets/{thirdweb-C31f21KI.js → thirdweb-CC2bk-Up.js} +3 -3
- package/_assets/{to-serializable-transaction-DRO125BM.js → to-serializable-transaction-BB0M9pw8.js} +2 -2
- package/_assets/{transactionReceipt-D2IEagp9.js → transactionReceipt-puJsrtjz.js} +1 -1
- package/_assets/{transactions-COJcFMl1.js → transactions-BnYHwdat.js} +1 -1
- package/_assets/{useCreditPacks-UUgawD-U.js → useCreditPacks-xyyhS_80.js} +1 -1
- package/_assets/{useImportable-DdzyhNKj.js → useImportable-Bh7jH6e9.js} +1 -1
- package/_assets/{useInfiniteGrid-CWAXtPPS.js → useInfiniteGrid-CV4TXaLn.js} +1 -1
- package/_assets/{useTheme-nSt_zjh9.js → useTheme-Czw2-J4G.js} +1 -1
- package/_assets/{verifyHash-3joPxTRt.js → verifyHash-CAYWYGEG.js} +1 -1
- package/_assets/{w3m-modal-fllBGzZL.js → w3m-modal-DtofW43q.js} +1 -1
- package/_assets/{w3m-modal-BdMUp7-V.js → w3m-modal-Fr29zvJe.js} +1 -1
- package/_assets/{wait-for-tx-receipt-DLk5rirA.js → wait-for-tx-receipt-mfzWqQ40.js} +1 -1
- package/_assets/{wallets-p_5_3A7U.js → wallets-DT2LKaVF.js} +5 -5
- package/_assets/{web-connector-B1ItZy3i.js → web-connector-4TZSYYzx.js} +3 -3
- package/_assets/{writeContract-_6f7I-3C.js → writeContract-CEQ0n4-z.js} +1 -1
- package/_assets/{zoraTestnet-BegtFmVb.js → zoraTestnet-Cd1Th5ww.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-Cx-gKp62.js +0 -381
- package/_assets/AnimatedBackground-yDvJglBx.js +0 -97
- package/_assets/Cart-C4zUzYSx.js +0 -669
- package/_assets/CollectionCarousel-BAwS8rTZ.js +0 -804
- package/_assets/LazyEmoteControls-BUp4tFZX.js +0 -2
- package/_assets/ManaPricingBanner.styles-Dj_122X4.js +0 -74
- package/_assets/collectionPage.styles-BOOK4JE1.js +0 -48
- package/_assets/disposePreview-C6zVmkpS.js +0 -1
- package/_assets/index-BL2RPpVH.js +0 -3390
- package/_assets/index-C3zA3tgr.js +0 -519
- package/_assets/index-D-NhBWWr.css +0 -1
- package/_assets/index-sW8OdK66.js +0 -1
- package/_assets/packs-backdrop-BcXiUPeP.webp +0 -0
package/index.html
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
<link rel="canonical" href="https://decentraland.org/shop/" />
|
|
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.
|
|
20
|
-
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.
|
|
19
|
+
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/1.0.0/favicon.ico" sizes="16x16 32x32 48x48" />
|
|
20
|
+
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/1.0.0/dcl-mark.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.
|
|
22
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/1.0.0/site.webmanifest" />
|
|
23
23
|
|
|
24
24
|
<!-- Open Graph.
|
|
25
25
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<meta name="twitter:image:alt" content="Decentraland Shop — wearables and emotes for your avatar" />
|
|
59
59
|
|
|
60
60
|
<!-- Sitemap -->
|
|
61
|
-
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.
|
|
61
|
+
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/1.0.0/sitemap.xml" />
|
|
62
62
|
|
|
63
63
|
<!-- Warm the 3D preview / fonts -->
|
|
64
64
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
<link rel="preconnect" href="https://wearable-preview.decentraland.org" />
|
|
71
71
|
<link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
|
|
72
72
|
<link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
|
|
73
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.
|
|
74
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.
|
|
75
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.
|
|
76
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.
|
|
77
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.
|
|
78
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.
|
|
79
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.
|
|
73
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/index-C616xNgB.js"></script>
|
|
74
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/react-BYHuwl8r.js">
|
|
75
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/dcl-schemas-CmtP3U6y.js">
|
|
76
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/sentry-Dx-KuLV3.js">
|
|
77
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/ethers-BDpbhgX6.js">
|
|
78
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/intl-CBcMB1D2.js">
|
|
79
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/1.0.0/_assets/index-BYP7oMPZ.css">
|
|
80
80
|
</head>
|
|
81
81
|
<body>
|
|
82
82
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/shop",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
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": "2c3846e4c745227de11e88e69906ad8614079c2d"
|
|
12
12
|
}
|
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-C3zA3tgr.js","_assets/react-BYHuwl8r.js","_assets/index-BL2RPpVH.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-BDpbhgX6.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-DdzyhNKj.js","_assets/buy-CgUGATyG.js","_assets/authorizations-2Xd-ft_C.js","_assets/sendMetaTransaction-CYTRgQS4.js","_assets/ManaPricingBanner.styles-Dj_122X4.js","_assets/Faq--E1fBOzk.js","_assets/field.styles-XpeJ0COA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as ke,bM as Ie,o as z,v as A,bN as Ae,s as h,t as a,w as $e,B as Le,x as Pe,b as d,ao as Ne,I as $,bO as te,bP as ie,bQ as Ee,_ as Te,z as N,bR as Ce,A as Se,bh as R,L as Fe,bS as Me,E as De,bT as Oe,bU as _}from"./index-BL2RPpVH.js";import{r as g,u as He,j as t,L as re,e as qe}from"./react-BYHuwl8r.js";import{u as ze}from"./useImportable-DdzyhNKj.js";import{L as Re}from"./LoadMore-BQIcG-2Y.js";import{u as L}from"./useInfiniteGrid-CWAXtPPS.js";import{m as oe}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-CgUGATyG.js";import"./authorizations-2Xd-ft_C.js";import"./sendMetaTransaction-CYTRgQS4.js";const _e=15e3;function Ge(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=_e}function We(e){const s=[...e].sort((i,r)=>r.createdAt-i.createdAt),n=[];for(const i of s){const r=n[n.length-1];r&&Ge(r[r.length-1],i)?r.push(i):n.push([i])}return n.map(i=>{var r;return{id:((r=i.find(c=>c.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,u)=>c+u.credits,0),lines:i}})}function Be(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Ue(e){const s=[],n=new Map;for(const i of e){const r=Be(i);if(!r){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=n.get(r);if(c){c.quantity+=1,c.credits+=i.credits;continue}const u={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(r,u),s.push(u)}return s}function Ke(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?ke(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Qe(e){const n=We(e.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=e.sales.map(o=>{const x=Ke(o,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(e.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),c=new Set(e.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),u=(e.manaPurchases??[]).filter(o=>!c.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...n,...i,...r,...u].sort((o,x)=>x.createdAt-o.createdAt||(o.id<x.id?-1:1))}function Ve(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function Xe(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const r=s.get(i);r?r.push(n):s.set(i,[n])}return s}function Ye(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?Ze(i[0].netCents):null,c=i.filter(o=>!o.available&&o.availableAt>n);if(c.length===0)return{kind:"credited",credits:r};const u=c.reduce((o,x)=>Math.max(o,x.availableAt),0);return{kind:"pending",credits:r,availableAt:u}}function Ze(e){return Ie(e)}function Je(){const e=z(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const et="https://cdn.decentraland.org/@dcl/shop/0.10.1-31042990976.commit-7edc9b6/_assets/credits-product-vs4Q6u6l.svg",G=$e`
|
|
3
|
-
0% { background-position: 200% 0; }
|
|
4
|
-
100% { background-position: -200% 0; }
|
|
5
|
-
`,tt=h.section`
|
|
6
|
-
width: 100%;
|
|
7
|
-
min-width: 0;
|
|
8
|
-
min-height: 60vh;
|
|
9
|
-
/* Centre the whole column — heading, tabs and cards as ONE block — so the feed isn't parked against
|
|
10
|
-
the left edge of a wide page. Centring only the list would leave the heading orphaned from it.
|
|
11
|
-
|
|
12
|
-
ONE width for every view. The migration tool needs 1003px (its row is a thumbnail, a name and a
|
|
13
|
-
144px price field; narrower, the price field drops to its own line on a desktop), and the feed used
|
|
14
|
-
to sit at 760px — so switching chips resized the heading and the whole column under it, which reads
|
|
15
|
-
as the page reloading rather than as a filter changing. */
|
|
16
|
-
max-width: 1003px;
|
|
17
|
-
margin-inline: auto;
|
|
18
|
-
`,it=h.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: baseline;
|
|
21
|
-
gap: 12px;
|
|
22
|
-
margin-bottom: 20px;
|
|
23
|
-
`,st=h.h1`
|
|
24
|
-
font-family: ${a.font.sans};
|
|
25
|
-
margin: 0;
|
|
26
|
-
`;h.span`
|
|
27
|
-
color: ${a.colors.muted};
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
`;const at=h.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
gap: 8px;
|
|
32
|
-
margin-bottom: 20px;
|
|
33
|
-
flex-wrap: wrap;
|
|
34
|
-
`,de=h.button`
|
|
35
|
-
appearance: none;
|
|
36
|
-
/* Figma draws the row as a 0.5px Gray 4 hairline, a shade darker and half the weight of the card
|
|
37
|
-
border this used, and sets the label a point smaller with the tracking the shop's other 13px
|
|
38
|
-
pills carry. */
|
|
39
|
-
border: 0.5px solid ${a.colors.gray4};
|
|
40
|
-
background: ${a.colors.white};
|
|
41
|
-
color: ${a.colors.text};
|
|
42
|
-
font-family: ${a.font.sans};
|
|
43
|
-
font-size: 13px;
|
|
44
|
-
font-weight: 600;
|
|
45
|
-
line-height: 24px;
|
|
46
|
-
letter-spacing: 0.46px;
|
|
47
|
-
/* The design gives the pill a flat 40px and no vertical padding, centring the 24px line box inside
|
|
48
|
-
it — so the height is the 40 it draws rather than the sum of a line box, padding and a border. */
|
|
49
|
-
display: inline-flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
justify-content: center;
|
|
52
|
-
padding: 0 16px;
|
|
53
|
-
min-height: 40px;
|
|
54
|
-
border-radius: ${a.radius.pill};
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
transition:
|
|
57
|
-
background 0.15s,
|
|
58
|
-
border-color 0.15s,
|
|
59
|
-
color 0.15s;
|
|
60
|
-
|
|
61
|
-
&:hover {
|
|
62
|
-
background: ${a.colors.media};
|
|
63
|
-
}
|
|
64
|
-
&:focus-visible {
|
|
65
|
-
outline: 2px solid ${a.colors.accent};
|
|
66
|
-
outline-offset: 2px;
|
|
67
|
-
}
|
|
68
|
-
&[data-active='true'] {
|
|
69
|
-
background: ${a.colors.accent};
|
|
70
|
-
border-color: ${a.colors.accent};
|
|
71
|
-
color: ${a.colors.white};
|
|
72
|
-
}
|
|
73
|
-
`,nt=h(de)`
|
|
74
|
-
position: relative;
|
|
75
|
-
|
|
76
|
-
/* Violet-on-violet once the chip fills, so the badge inverts. Reached by test id rather than by
|
|
77
|
-
interpolating the styled def, which throws under vitest (see CLAUDE.md). */
|
|
78
|
-
&[data-active='true'] [data-testid='activity-migrate-count'] {
|
|
79
|
-
background: ${a.colors.white};
|
|
80
|
-
color: ${a.colors.accent};
|
|
81
|
-
/* See MigrateBadge: a white ring would vanish into the page here, since the disc itself is white. */
|
|
82
|
-
box-shadow: 0 0 0 2px ${a.colors.accent};
|
|
83
|
-
}
|
|
84
|
-
`,rt=h.span`
|
|
85
|
-
position: absolute;
|
|
86
|
-
/* Offsets run from the chip's PADDING box, so they carry the 1px its hairline occupies in layout on
|
|
87
|
-
top of the 5.5 / 2.5 the design measures from the pill's outer edge. */
|
|
88
|
-
top: -6.5px;
|
|
89
|
-
right: -3.5px;
|
|
90
|
-
display: grid;
|
|
91
|
-
place-items: center;
|
|
92
|
-
/* The chip's tracking would otherwise widen the disc off its 20px. */
|
|
93
|
-
letter-spacing: normal;
|
|
94
|
-
/* Figma only ever draws a single digit, as a fixed 20px disc. The padding is what lets a two- or
|
|
95
|
-
three-figure count grow leftwards out of the corner instead of spilling out of the circle. */
|
|
96
|
-
min-width: 20px;
|
|
97
|
-
height: 20px;
|
|
98
|
-
padding: 0 6px;
|
|
99
|
-
border-radius: ${a.radius.pill};
|
|
100
|
-
background: ${a.colors.brandViolet};
|
|
101
|
-
/**
|
|
102
|
-
* A ring, whose colour has to FOLLOW THE DISC rather than the page.
|
|
103
|
-
*
|
|
104
|
-
* The disc hangs off the corner: part of it sits on the chip, part on the page. Unselected it is violet
|
|
105
|
-
* on white, so it already reads and the white ring only separates it from the chip's grey hairline.
|
|
106
|
-
* Selected, the chip inverts it to white on violet — and a white disc against the white page has no edge
|
|
107
|
-
* at all along the half that overhangs, which is the state where the circle looked unfinished. That case
|
|
108
|
-
* needs the ring in the chip's accent instead (below), so the disc keeps a hard edge on both surfaces.
|
|
109
|
-
*
|
|
110
|
-
* box-shadow rather than a border: a border would grow the 20px disc the design fixes, while a spread
|
|
111
|
-
* shadow draws outside the box.
|
|
112
|
-
*/
|
|
113
|
-
box-shadow: 0 0 0 2px ${a.colors.white};
|
|
114
|
-
font-weight: 600;
|
|
115
|
-
font-size: 12px;
|
|
116
|
-
line-height: 1.6;
|
|
117
|
-
color: ${a.colors.white};
|
|
118
|
-
`,ot=h.div`
|
|
119
|
-
min-height: 60vh;
|
|
120
|
-
`,se=h.div`
|
|
121
|
-
display: flex;
|
|
122
|
-
flex-direction: column;
|
|
123
|
-
gap: 16px;
|
|
124
|
-
`,E=h.div`
|
|
125
|
-
background: ${a.colors.white};
|
|
126
|
-
border: 1px solid ${a.colors.line};
|
|
127
|
-
border-radius: 16px;
|
|
128
|
-
overflow: hidden;
|
|
129
|
-
`,T=h.div`
|
|
130
|
-
display: flex;
|
|
131
|
-
align-items: center;
|
|
132
|
-
justify-content: space-between;
|
|
133
|
-
gap: 12px;
|
|
134
|
-
padding: 14px 18px;
|
|
135
|
-
background: ${a.colors.softWhite};
|
|
136
|
-
border-bottom: 1px solid ${a.colors.line};
|
|
137
|
-
|
|
138
|
-
${a.media.maxWidth("mobile")} {
|
|
139
|
-
flex-wrap: wrap;
|
|
140
|
-
}
|
|
141
|
-
`,C=h.div`
|
|
142
|
-
display: flex;
|
|
143
|
-
flex-direction: column;
|
|
144
|
-
gap: 2px;
|
|
145
|
-
min-width: 0;
|
|
146
|
-
`,S=h.span`
|
|
147
|
-
font-weight: 700;
|
|
148
|
-
color: ${a.colors.text};
|
|
149
|
-
`,F=h.span`
|
|
150
|
-
font-size: 13px;
|
|
151
|
-
color: ${a.colors.muted};
|
|
152
|
-
`,M=h.div`
|
|
153
|
-
display: flex;
|
|
154
|
-
align-items: center;
|
|
155
|
-
gap: 14px;
|
|
156
|
-
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
157
|
-
leading thumbnail, giving the head three children instead of two). */
|
|
158
|
-
margin-left: auto;
|
|
159
|
-
`,ct=h.div`
|
|
160
|
-
flex: 0 0 auto;
|
|
161
|
-
width: 52px;
|
|
162
|
-
height: 52px;
|
|
163
|
-
border-radius: 10px;
|
|
164
|
-
background: ${a.colors.media};
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
justify-content: center;
|
|
168
|
-
|
|
169
|
-
img {
|
|
170
|
-
width: 30px;
|
|
171
|
-
height: 30px;
|
|
172
|
-
display: block;
|
|
173
|
-
}
|
|
174
|
-
`,D=h.span`
|
|
175
|
-
font-size: 11px;
|
|
176
|
-
font-weight: 700;
|
|
177
|
-
text-transform: uppercase;
|
|
178
|
-
letter-spacing: 0.03em;
|
|
179
|
-
padding: 4px 10px;
|
|
180
|
-
border-radius: ${a.radius.pill};
|
|
181
|
-
white-space: nowrap;
|
|
182
|
-
|
|
183
|
-
&[data-status='SETTLED'] {
|
|
184
|
-
background: rgba(30, 166, 114, 0.14);
|
|
185
|
-
color: ${a.colors.okStrong};
|
|
186
|
-
}
|
|
187
|
-
&[data-status='PENDING'] {
|
|
188
|
-
background: rgba(245, 166, 35, 0.16);
|
|
189
|
-
color: #b5790a;
|
|
190
|
-
}
|
|
191
|
-
&[data-status='SOLD'] {
|
|
192
|
-
background: rgba(103, 58, 183, 0.14);
|
|
193
|
-
color: ${a.colors.accent};
|
|
194
|
-
}
|
|
195
|
-
&[data-status='FAILED'] {
|
|
196
|
-
background: rgba(214, 61, 61, 0.14);
|
|
197
|
-
color: #b02a2a;
|
|
198
|
-
}
|
|
199
|
-
/* Nobody paid and nobody is owed anything — deliberately the quietest of the four. Reusing PENDING's
|
|
200
|
-
amber here is what made an abandoned checkout look like money on its way. */
|
|
201
|
-
&[data-status='UNFINISHED'] {
|
|
202
|
-
background: ${a.colors.line};
|
|
203
|
-
color: ${a.colors.muted};
|
|
204
|
-
}
|
|
205
|
-
`,dt=h.button`
|
|
206
|
-
font-size: 11px;
|
|
207
|
-
font-weight: 700;
|
|
208
|
-
text-transform: uppercase;
|
|
209
|
-
letter-spacing: 0.03em;
|
|
210
|
-
padding: 4px 10px;
|
|
211
|
-
border-radius: ${a.radius.pill};
|
|
212
|
-
white-space: nowrap;
|
|
213
|
-
border: 1px solid ${a.colors.accent};
|
|
214
|
-
background: transparent;
|
|
215
|
-
color: ${a.colors.accent};
|
|
216
|
-
cursor: pointer;
|
|
217
|
-
transition: background 0.15s ease;
|
|
218
|
-
|
|
219
|
-
&:hover:not(:disabled) {
|
|
220
|
-
background: rgba(103, 58, 183, 0.08);
|
|
221
|
-
}
|
|
222
|
-
&:disabled {
|
|
223
|
-
opacity: 0.6;
|
|
224
|
-
cursor: default;
|
|
225
|
-
}
|
|
226
|
-
`,j=h.div`
|
|
227
|
-
display: flex;
|
|
228
|
-
align-items: center;
|
|
229
|
-
gap: 5px;
|
|
230
|
-
font-weight: 800;
|
|
231
|
-
color: ${a.colors.text};
|
|
232
|
-
white-space: nowrap;
|
|
233
|
-
|
|
234
|
-
.ccy-mark {
|
|
235
|
-
width: 16px;
|
|
236
|
-
height: 16px;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// Money received (a sale) reads as income in the shop's success green.
|
|
240
|
-
&[data-kind='income'] {
|
|
241
|
-
color: ${a.colors.okStrong};
|
|
242
|
-
}
|
|
243
|
-
`,le=h.img`
|
|
244
|
-
width: 16px;
|
|
245
|
-
height: 16px;
|
|
246
|
-
vertical-align: -0.15em;
|
|
247
|
-
`,lt=h.span`
|
|
248
|
-
display: inline-flex;
|
|
249
|
-
align-items: center;
|
|
250
|
-
cursor: pointer;
|
|
251
|
-
`,ht=h.span`
|
|
252
|
-
position: fixed;
|
|
253
|
-
transform: translateX(-50%);
|
|
254
|
-
padding: 6px 8px;
|
|
255
|
-
border-radius: 6px;
|
|
256
|
-
background: #16141a;
|
|
257
|
-
color: ${a.colors.white};
|
|
258
|
-
font-size: 12px;
|
|
259
|
-
font-weight: 600;
|
|
260
|
-
line-height: 1;
|
|
261
|
-
white-space: nowrap;
|
|
262
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
263
|
-
pointer-events: none;
|
|
264
|
-
z-index: 9999;
|
|
265
|
-
`,W=h.div`
|
|
266
|
-
display: flex;
|
|
267
|
-
flex-direction: column;
|
|
268
|
-
`,O=h.div`
|
|
269
|
-
display: grid;
|
|
270
|
-
grid-template-columns: 52px 1fr auto;
|
|
271
|
-
align-items: center;
|
|
272
|
-
gap: 14px;
|
|
273
|
-
padding: 12px 18px;
|
|
274
|
-
text-decoration: none;
|
|
275
|
-
color: inherit;
|
|
276
|
-
|
|
277
|
-
& + & {
|
|
278
|
-
border-top: 1px solid ${a.colors.line};
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
&[data-link='true'] {
|
|
282
|
-
transition: background 0.15s;
|
|
283
|
-
}
|
|
284
|
-
&[data-link='true']:hover {
|
|
285
|
-
background: ${a.colors.media};
|
|
286
|
-
}
|
|
287
|
-
&[data-link='true']:focus-visible {
|
|
288
|
-
outline: 2px solid ${a.colors.accent};
|
|
289
|
-
outline-offset: -2px;
|
|
290
|
-
}
|
|
291
|
-
`,B=h.div`
|
|
292
|
-
width: 52px;
|
|
293
|
-
height: 52px;
|
|
294
|
-
border-radius: 10px;
|
|
295
|
-
background: ${a.colors.media};
|
|
296
|
-
overflow: hidden;
|
|
297
|
-
display: flex;
|
|
298
|
-
align-items: center;
|
|
299
|
-
justify-content: center;
|
|
300
|
-
color: ${a.colors.muted2};
|
|
301
|
-
|
|
302
|
-
img {
|
|
303
|
-
width: 100%;
|
|
304
|
-
height: 100%;
|
|
305
|
-
object-fit: contain;
|
|
306
|
-
}
|
|
307
|
-
`,U=h.div`
|
|
308
|
-
width: 52px;
|
|
309
|
-
height: 52px;
|
|
310
|
-
border-radius: 10px;
|
|
311
|
-
background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
|
|
312
|
-
background-size: 200% 100%;
|
|
313
|
-
animation: ${G} 1.3s infinite linear;
|
|
314
|
-
|
|
315
|
-
@media (prefers-reduced-motion: reduce) {
|
|
316
|
-
animation: none;
|
|
317
|
-
}
|
|
318
|
-
`,K=h.div`
|
|
319
|
-
min-width: 0;
|
|
320
|
-
display: flex;
|
|
321
|
-
flex-direction: column;
|
|
322
|
-
gap: 2px;
|
|
323
|
-
`,Q=h.span`
|
|
324
|
-
font-weight: 700;
|
|
325
|
-
white-space: nowrap;
|
|
326
|
-
overflow: hidden;
|
|
327
|
-
text-overflow: ellipsis;
|
|
328
|
-
`,V=h.span`
|
|
329
|
-
display: inline-block;
|
|
330
|
-
width: 140px;
|
|
331
|
-
max-width: 60%;
|
|
332
|
-
height: 12px;
|
|
333
|
-
border-radius: 6px;
|
|
334
|
-
background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
|
|
335
|
-
background-size: 200% 100%;
|
|
336
|
-
animation: ${G} 1.3s infinite linear;
|
|
337
|
-
|
|
338
|
-
@media (prefers-reduced-motion: reduce) {
|
|
339
|
-
animation: none;
|
|
340
|
-
}
|
|
341
|
-
`,X=h.span`
|
|
342
|
-
font-size: 13px;
|
|
343
|
-
color: ${a.colors.muted};
|
|
344
|
-
`,ut=h.div`
|
|
345
|
-
display: flex;
|
|
346
|
-
align-items: center;
|
|
347
|
-
gap: 4px;
|
|
348
|
-
font-weight: 700;
|
|
349
|
-
color: ${a.colors.text};
|
|
350
|
-
white-space: nowrap;
|
|
351
|
-
|
|
352
|
-
.ccy-mark {
|
|
353
|
-
width: 14px;
|
|
354
|
-
height: 14px;
|
|
355
|
-
}
|
|
356
|
-
`,ae=h.div`
|
|
357
|
-
height: 132px;
|
|
358
|
-
border-radius: 16px;
|
|
359
|
-
border: 1px solid transparent;
|
|
360
|
-
background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
|
|
361
|
-
background-size: 200% 100%;
|
|
362
|
-
animation: ${G} 1.3s infinite linear;
|
|
363
|
-
|
|
364
|
-
@media (prefers-reduced-motion: reduce) {
|
|
365
|
-
animation: none;
|
|
366
|
-
}
|
|
367
|
-
`,he=h.div`
|
|
368
|
-
display: flex;
|
|
369
|
-
flex-direction: column;
|
|
370
|
-
align-items: center;
|
|
371
|
-
gap: 8px;
|
|
372
|
-
text-align: center;
|
|
373
|
-
padding: 90px 20px;
|
|
374
|
-
min-height: 50vh;
|
|
375
|
-
`,ue=h.p`
|
|
376
|
-
font-size: 22px;
|
|
377
|
-
font-weight: 700;
|
|
378
|
-
margin: 6px 0 0;
|
|
379
|
-
`,pt=h(Le)`
|
|
380
|
-
margin-top: 12px;
|
|
381
|
-
`,Y=O.withComponent(re),xt=g.lazy(()=>Te(()=>import("./index-C3zA3tgr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,mt=["all","purchases","sales"],H="section",ne="listings",q="view",gt="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function xe(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function me({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),r=()=>{var u;const c=(u=s.current)==null?void 0:u.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(lt,{ref:s,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[e,n?qe.createPortal(t.jsx(ht,{style:{top:n.top,left:n.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function ft({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:r}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Oe(e.tradeId):_(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),c=n&&r,u=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",x=R({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[c?t.jsx(U,{}):t.jsx(B,{children:o?t.jsx("img",{src:o,alt:u}):t.jsx($,{name:"cart",size:20})}),t.jsxs(K,{children:[c?t.jsx(V,{}):t.jsx(Q,{title:u,children:u}),e.quantity>1?t.jsx(X,{children:d("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(ut,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return x?t.jsx(Y,{to:x,"data-link":"true",children:f}):t.jsx(O,{children:f})}function bt({order:e}){const s=Ue(e.lines),n=s.reduce((i,r)=>i+r.quantity,0);return t.jsxs(E,{"data-testid":"purchase-order",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsxs(F,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:n})]})]}),t.jsxs(M,{children:[t.jsx(D,{"data-status":e.status,children:e.status==="PENDING"?d("activity.processing"):d("activity.completed")}),t.jsxs(j,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),t.jsx(W,{children:s.map(i=>t.jsx(ft,{item:i},i.key))})]})}function yt({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??d("activity.itemFallback"),r=(s==null?void 0:s.thumbnail)??"",c=R({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,u=t.jsxs(t.Fragment,{children:[n?t.jsx(U,{}):t.jsx(B,{children:r?t.jsx("img",{src:r,alt:i}):t.jsx($,{name:"offer",size:20})}),t.jsxs(K,{children:[n?t.jsx(V,{}):t.jsx(Q,{title:i,children:i}),t.jsx(X,{children:d("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(E,{"data-testid":"activity-mana-purchase",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsx(F,{children:d("activity.paidWithMana")})]}),t.jsxs(M,{children:[t.jsx(D,{"data-status":"SETTLED",children:d("activity.completed")}),t.jsxs(j,{children:[xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(le,{src:oe,alt:"MANA"})})]})]})]}),t.jsx(W,{children:c?t.jsx(Y,{to:c,"data-link":"true",children:u}):t.jsx(O,{children:u})})]})}function vt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),r=(n==null?void 0:n.name)??d("activity.itemFallback"),c=(n==null?void 0:n.thumbnail)??"",u=R({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,o=t.jsxs(t.Fragment,{children:[i?t.jsx(U,{}):t.jsx(B,{children:c?t.jsx("img",{src:c,alt:r}):t.jsx($,{name:"offer",size:20})}),t.jsxs(K,{children:[i?t.jsx(V,{}):t.jsx(Q,{title:r,children:r}),t.jsxs(X,{children:[d("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(E,{"data-testid":"activity-sale",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsx(F,{children:d("activity.saleLabel")})]}),t.jsxs(M,{children:[t.jsx(D,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),s.kind==="direct"?t.jsxs(j,{"data-kind":"income",children:["+",xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(le,{src:oe,alt:"MANA"})})]}):s.credits!==null?t.jsxs(j,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(j,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),t.jsx(W,{children:u?t.jsx(Y,{to:u,"data-link":"true",children:o}):t.jsx(O,{children:o})})]})}function wt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Ce(e.status),i=n==="SETTLED"?d("activity.completed"):n==="FAILED"?d("activity.failed"):n==="UNFINISHED"?d("activity.unfinished"):d("activity.processing"),r=z(p=>p.session),c=Se(),[u,o]=g.useState(!1),x=e.status==="initiated"&&!!r;async function f(){if(!(!r||u)){o(!0);try{const p=await Me(e.id,r.identity);if(p){window.location.href=p;return}De.info(d("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})}finally{o(!1)}}}return t.jsx(E,{"data-testid":"credit-order",children:t.jsxs(T,{children:[t.jsx(ct,{children:t.jsx("img",{src:et,alt:"","aria-hidden":!0})}),t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsxs(F,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:s})]})]}),t.jsxs(M,{children:[x?t.jsx(dt,{type:"button",onClick:()=>void f(),disabled:u,"data-testid":"resume-order",children:u?d("activity.resuming"):d("activity.resume")}):null,t.jsx(D,{"data-status":n,children:i}),t.jsxs(j,{"data-kind":"income",children:["+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function jt({filter:e}){const s={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")}}[e];return t.jsxs(he,{children:[t.jsx($,{name:s.icon,size:40,color:a.colors.muted2}),t.jsx(ue,{children:s.title}),t.jsx("p",{className:"muted",children:s.body}),e!=="sales"?t.jsx(pt,{as:re,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function Dt(){const{session:e}=z(),[s,n]=g.useState("all"),[i,r]=He(),c=i.get(H)===ne||i.get(q)===gt;Pe({title:c?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:u}=ze(),{count:o}=Je(),f=u!==void 0&&o!==void 0&&(u>0||o>0||c),p=!!e&&!c&&s!=="sales",m=!!e&&!c&&s!=="purchases",b=L(["purchases",e==null?void 0:e.address],l=>Ee(e.address,e.identity,{first:P,skip:l}),{enabled:p}),y=L(["sales",e==null?void 0:e.address],l=>te(e.address,{role:"seller",first:P,skip:l}),{enabled:m}),v=L(["credit-orders",e==null?void 0:e.address],l=>ie(e.address,e.identity,{first:P,skip:l}),{enabled:p}),w=L(["mana-purchases",e==null?void 0:e.address],l=>te(e.address,{role:"buyer",first:P,skip:l}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ie(e.address,e.identity,{first:200}).then(l=>l.payouts),enabled:m,staleTime:6e4}),ge=g.useMemo(()=>Xe(Z),[Z]),{data:fe}=Ne(m);if(!e)return t.jsxs(he,{children:[t.jsx($,{name:"clock",size:40,color:a.colors.muted2}),t.jsx(ue,{children:d("activity.signInTitle")}),t.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const J=Ve(Qe({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?w.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||w.isLoading)||m&&y.isLoading,ee=p&&(b.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||m&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||w.hasNextPage)||m&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&w.hasNextPage&&w.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function we(l){if(n(l),!c)return;const k=new URLSearchParams(i);k.delete(H),k.delete(q),r(k,{replace:!0})}function je(){const l=new URLSearchParams(i);l.set(H,ne),l.delete(q),r(l,{replace:!0})}return t.jsxs(tt,{children:[t.jsx(it,{children:t.jsx(st,{children:d("nav.activity")})}),t.jsxs(at,{role:"tablist","aria-label":d("nav.activity"),children:[mt.map(l=>t.jsx(de,{type:"button",role:"tab","aria-selected":!c&&s===l,"data-active":!c&&s===l,"data-testid":`activity-filter-${l}`,onClick:()=>we(l),children:d(`activity.filter.${l}`)},l)),f?t.jsxs(nt,{type:"button",role:"tab","aria-selected":c,"data-active":c,"data-testid":"activity-filter-migrate","aria-label":u?d("activity.migrate.chipAria",{count:u}):void 0,onClick:je,children:[d("activity.migrate.chip"),u?t.jsx(rt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),c?t.jsx(g.Suspense,{fallback:t.jsx(ot,{"aria-busy":"true"}),children:t.jsx(xt,{})}):be?t.jsx(se,{children:Array.from({length:5}).map((l,k)=>t.jsx(ae,{},k))}):J.length===0?t.jsx(jt,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(se,{children:[J.map(l=>l.kind==="purchase"?t.jsx(bt,{order:l.order},l.id):l.kind==="credit"?t.jsx(wt,{order:l.order},l.id):l.kind==="mana-purchase"?t.jsx(yt,{sale:l.sale},l.id):t.jsx(vt,{sale:l.sale,payout:Ye(ge,l.sale)},l.id)),ee?t.jsx(ae,{}):null]}),t.jsx(Re,{hasNextPage:ye,isFetching:ee,onLoadMore:ve})]})]})}export{Dt as Activity};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-BYHuwl8r.js";import{s as u}from"./index-BL2RPpVH.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.10.1-31042990976.commit-7edc9b6/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.10.1-31042990976.commit-7edc9b6/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
|
-
attribute vec2 a_position;
|
|
3
|
-
varying vec2 v_uv;
|
|
4
|
-
void main() {
|
|
5
|
-
v_uv = a_position * 0.5 + 0.5;
|
|
6
|
-
gl_Position = vec4(a_position, 0.0, 1.0);
|
|
7
|
-
}
|
|
8
|
-
`,P=`
|
|
9
|
-
precision highp float;
|
|
10
|
-
|
|
11
|
-
uniform float u_time;
|
|
12
|
-
uniform vec2 u_resolution;
|
|
13
|
-
uniform sampler2D u_overlayTex;
|
|
14
|
-
|
|
15
|
-
varying vec2 v_uv;
|
|
16
|
-
|
|
17
|
-
const vec4 innerColor = vec4(0.749, 0.0, 1.0, 1.0);
|
|
18
|
-
const vec4 outerColor = vec4(0.3176, 0.0235, 0.5176, 1.0);
|
|
19
|
-
const float vignetteRadius = 0.167;
|
|
20
|
-
const float vignetteSmoothness = 0.5;
|
|
21
|
-
const vec4 overlayColor = vec4(1.0, 1.0, 1.0, 1.0);
|
|
22
|
-
const float overlayTiling = 1.66;
|
|
23
|
-
const vec2 overlayDirection = vec2(1.0, -1.25);
|
|
24
|
-
const float overlaySpeed = 0.06;
|
|
25
|
-
const float overlayAlpha = 0.573;
|
|
26
|
-
const vec4 glowColor = vec4(0.5725, 0.0588, 0.6392, 1.0);
|
|
27
|
-
const float glowStrength = 0.17;
|
|
28
|
-
const vec2 glowRadiusVec = vec2(0.05, 0.13);
|
|
29
|
-
const float glowSmoothness = 3.61;
|
|
30
|
-
const vec2 glowCenter = vec2(0.68, 0.5);
|
|
31
|
-
const float luminosityStrength = 0.541;
|
|
32
|
-
|
|
33
|
-
vec3 rgb2hsv(vec3 c) {
|
|
34
|
-
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
|
35
|
-
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
|
|
36
|
-
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
|
|
37
|
-
float d = q.x - min(q.w, q.y);
|
|
38
|
-
float e = 1e-10;
|
|
39
|
-
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
vec3 hsv2rgb(vec3 c) {
|
|
43
|
-
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
|
44
|
-
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
|
45
|
-
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
void main() {
|
|
49
|
-
vec2 uv = v_uv;
|
|
50
|
-
|
|
51
|
-
vec2 centerUV = uv - 0.5;
|
|
52
|
-
float rad = length(centerUV);
|
|
53
|
-
float mask = smoothstep(vignetteRadius + vignetteSmoothness, vignetteRadius, rad);
|
|
54
|
-
vec4 vignette = mix(outerColor, innerColor, mask);
|
|
55
|
-
|
|
56
|
-
float aspect = u_resolution.x / u_resolution.y;
|
|
57
|
-
vec2 overlayUV = uv;
|
|
58
|
-
overlayUV.x *= overlayTiling * aspect;
|
|
59
|
-
overlayUV.y *= overlayTiling;
|
|
60
|
-
overlayUV += u_time * overlayDirection * overlaySpeed;
|
|
61
|
-
vec4 overlay = texture2D(u_overlayTex, overlayUV) * overlayColor;
|
|
62
|
-
overlay.a *= overlayAlpha * mask;
|
|
63
|
-
|
|
64
|
-
vec3 vignetteHSV = rgb2hsv(vignette.rgb);
|
|
65
|
-
vec3 overlayHSV = rgb2hsv(overlay.rgb);
|
|
66
|
-
float val = mix(0.5, 1.0, overlayHSV.z);
|
|
67
|
-
vec3 luminosityBlend = hsv2rgb(vec3(vignetteHSV.x, vignetteHSV.y, val));
|
|
68
|
-
float luminosityBlendAmount = overlay.a * luminosityStrength;
|
|
69
|
-
vec4 result = vec4(mix(vignette.rgb, luminosityBlend, luminosityBlendAmount), 1.0);
|
|
70
|
-
|
|
71
|
-
vec2 glowDelta = (uv - glowCenter) / glowRadiusVec;
|
|
72
|
-
glowDelta.x *= aspect;
|
|
73
|
-
float glowDist = length(glowDelta);
|
|
74
|
-
float glowMask = 1.0 - smoothstep(1.0, 1.0 + glowSmoothness, glowDist);
|
|
75
|
-
vec4 glow = glowColor * glowMask * glowStrength;
|
|
76
|
-
result.rgb += glow.rgb * glow.a;
|
|
77
|
-
|
|
78
|
-
gl_FragColor = result;
|
|
79
|
-
}
|
|
80
|
-
`;function p(t,n,r){const e=t.createShader(n);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function D(t,n,r){const e=t.createProgram();return e?(t.attachShader(e,n),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function L(t,n,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=n,e}const B=u.div`
|
|
81
|
-
position: absolute;
|
|
82
|
-
inset: 0;
|
|
83
|
-
overflow: hidden;
|
|
84
|
-
`,F=u.div`
|
|
85
|
-
position: absolute;
|
|
86
|
-
inset: 0;
|
|
87
|
-
width: 100%;
|
|
88
|
-
height: 100%;
|
|
89
|
-
background-size: cover;
|
|
90
|
-
background-position: center;
|
|
91
|
-
background-repeat: no-repeat;
|
|
92
|
-
`,I=u.canvas`
|
|
93
|
-
position: absolute;
|
|
94
|
-
inset: 0;
|
|
95
|
-
width: 100%;
|
|
96
|
-
height: 100%;
|
|
97
|
-
`;function G(){const t=l.useRef(null),n=l.useRef(0);return l.useEffect(()=>{var x;const r=t.current;if(!r||(x=window.matchMedia)!=null&&x.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=p(e,e.VERTEX_SHADER,U),i=p(e,e.FRAGMENT_SHADER,P);if(!o||!i){o&&e.deleteShader(o),i&&e.deleteShader(i);return}const a=D(e,o,i);if(!a){e.deleteShader(o),e.deleteShader(i);return}const m=e.getAttribLocation(a,"a_position"),R=e.getUniformLocation(a,"u_time"),_=e.getUniformLocation(a,"u_resolution"),y=e.getUniformLocation(a,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let d=!1;const f=L(e,b,()=>d),w=()=>{const c=window.devicePixelRatio||1,E=r.clientWidth*c,g=r.clientHeight*c;(r.width!==E||r.height!==g)&&(r.width=E,r.height=g)},A=performance.now()/1e3,h=()=>{w(),e.viewport(0,0,r.width,r.height),e.useProgram(a),e.uniform1f(R,performance.now()/1e3-A),e.uniform2f(_,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,f),e.uniform1i(y,0),e.enableVertexAttribArray(m),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(m,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),n.current=requestAnimationFrame(h)},T=c=>{c.preventDefault(),cancelAnimationFrame(n.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(h),()=>{d=!0,cancelAnimationFrame(n.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(a),e.deleteShader(o),e.deleteShader(i),e.deleteBuffer(s),e.deleteTexture(f)}},[]),v.jsxs(B,{"aria-hidden":!0,children:[v.jsx(F,{style:{backgroundImage:`url(${S})`}}),v.jsx(I,{ref:t})]})}export{G as default};
|