@dcl/shop 1.0.2-31093320960.commit-a66fdac → 1.0.2-31094081013.commit-37c00e1
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-BZYV865P.js → Activity-DeOgokek.js} +5 -5
- package/_assets/{AnimatedBackground-C_gdl0Ga.js → AnimatedBackground-DIREtk3V.js} +1 -1
- package/_assets/{Assets-D6xTxE6H.js → Assets-CRZ_QO1e.js} +9 -9
- package/_assets/{Assets.styles-C2Y2OMju.js → Assets.styles-C-EISwab.js} +1 -1
- package/_assets/{Authorizations-Dyl-2_Wx.js → Authorizations-CGOEFvWM.js} +1 -1
- package/_assets/{Cart-q1C0b7B0.js → Cart-C_PPLurF.js} +70 -70
- package/_assets/{CircularProgress-DfC_DW6J.js → CircularProgress-DM473hjd.js} +1 -1
- package/_assets/{Collection-CikwxEA2.js → Collection-DNsOakgi.js} +1 -1
- package/_assets/{CollectionCarousel-CW99ees-.js → CollectionCarousel-DVAZWgEi.js} +2 -2
- package/_assets/{Confetti-D-f5Qezh.js → Confetti-DiPNTXWR.js} +1 -1
- package/_assets/{Creator-sxuxQmmv.js → Creator-D_2GGkjR.js} +22 -22
- package/_assets/{ErrorNotice-D_MmJHjd.js → ErrorNotice-C4BJGNNo.js} +1 -1
- package/_assets/{ExchangeController-5e1qfrC7.js → ExchangeController-BbErQv3J.js} +1 -1
- package/_assets/{Faq-CZWOMrti.js → Faq-B3ou3gl8.js} +1 -1
- package/_assets/{GetCredits-EPpLyZrC.js → GetCredits-DQGpag_t.js} +16 -16
- package/_assets/{Grow-CJcrEIIk.js → Grow-BYbpOY6G.js} +1 -1
- package/_assets/{HelpersUtil-D4FO24BM.js → HelpersUtil-CAeJviP_.js} +1 -1
- package/_assets/{ItemDetail-Daqpqudw.js → ItemDetail-CmLu32yo.js} +314 -314
- package/_assets/LazyEmoteControls-CdKXLAy2.js +2 -0
- package/_assets/{LoadMore-BcR7LuW8.js → LoadMore-D2_5Y95Q.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-b_tWuH2r.js → ManaPricingBanner.styles-BOXb65SH.js} +1 -1
- package/_assets/{MyAssets-CY3P4YpT.js → MyAssets-Q5csWdmV.js} +4 -4
- package/_assets/{MyFavorites-2J4ivx_A.js → MyFavorites-TgQC3qmQ.js} +1 -1
- package/_assets/{NotFound-B9SvSXoT.js → NotFound-xNuszOJY.js} +1 -1
- package/_assets/{NotificationsBell-DDd4PHL_.js → NotificationsBell-B0ht2-Nm.js} +1 -1
- package/_assets/{OutfitDetail-DfQD1uwS.js → OutfitDetail-CKULSRNB.js} +1 -1
- package/_assets/{OutfitPreview-B8wqKe4G.js → OutfitPreview-CFi9zq42.js} +1 -1
- package/_assets/{OutfitStudio-C8kgT_Q1.js → OutfitStudio-0O8U38w9.js} +9 -9
- package/_assets/{StoreSettings-BszakGpI.js → StoreSettings-oKu9Vmlo.js} +21 -21
- package/_assets/{Success-BlrhZwie.js → Success-CdhILm9C.js} +1 -1
- package/_assets/{SwapController-CtdE4CSE.js → SwapController-BOdqSpkL.js} +1 -1
- package/_assets/{Tooltip-D92iGFCG.js → Tooltip-DquNLfEU.js} +1 -1
- package/_assets/{TradeService-CDrDGVbQ.js → TradeService-BC_kDVrM.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-ChXXI6YZ.js → W3MFrameProviderSingleton-Bi80ahsb.js} +3 -3
- package/_assets/{WebCryptoP256-D8s1Qscb.js → WebCryptoP256-ke-0KBUQ.js} +1 -1
- package/_assets/{authorizations-qnGN3xsk.js → authorizations-C1zKbItJ.js} +1 -1
- package/_assets/{basic-DhSHVZRT.js → basic-BW0dlN8l.js} +1 -1
- package/_assets/{biconomy-ClBW5VwG.js → biconomy-CcS7AXQg.js} +1 -1
- package/_assets/{builder-CL5pdg21.js → builder-CMOy8MPi.js} +1 -1
- package/_assets/{buy-B-DDln2Y.js → buy-BHTwjx-z.js} +1 -1
- package/_assets/{buy-gasless-C_BmhnE7.js → buy-gasless-DqSXyXet.js} +1 -1
- package/_assets/{categories-B8yCTSzR.js → categories-J-FmFlxx.js} +1 -1
- package/_assets/{ccip-CJEnBLGM.js → ccip-HaZzSNwk.js} +1 -1
- package/_assets/{ccip-DQfkaCht.js → ccip-olpJbRoj.js} +1 -1
- package/_assets/{collectionPage.styles-CcRhgEaw.js → collectionPage.styles-Cqyo5Y5r.js} +4 -4
- package/_assets/{controller-JXbdlxZp.js → controller-T8bs6DO_.js} +2 -2
- package/_assets/{core-BSxLBlxi.js → core-CGJUYns5.js} +4 -4
- package/_assets/{createSvgIcon-yVJuzYrn.js → createSvgIcon-CInUIJHV.js} +2 -2
- package/_assets/{custom-B3uMWhu7.js → custom-Dum6PonW.js} +1 -1
- package/_assets/{data-capture-B-nbrWqF.js → data-capture-_GsSQlLZ.js} +1 -1
- package/_assets/{email-CVdda8uU.js → email-9_Uca2WQ.js} +1 -1
- package/_assets/{embedded-wallet-Y6M29Es7.js → embedded-wallet-NqZPOAGT.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-BF1qb2R0.js → emotion-styled.browser.esm-Ck5Rb8B4.js} +1 -1
- package/_assets/{engine-fjR5dIp4.js → engine-Cg61FEjb.js} +1 -1
- package/_assets/{errors-B_JuFrfU.js → errors-d4qtRp0M.js} +1 -1
- package/_assets/{estimate-l1-fee-B1LOd6k3.js → estimate-l1-fee--k9lHxkl.js} +1 -1
- package/_assets/{execute-BXynqqjh.js → execute-CYlTHSSl.js} +2 -2
- package/_assets/{features-Czbv6jQA.js → features-Cl-5U3h8.js} +1 -1
- package/_assets/{fetchTokenMetadata-BuR7htwA.js → fetchTokenMetadata-CKg0h170.js} +2 -2
- package/_assets/{field.styles-DFDRX2tk.js → field.styles-DcqIG6xz.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-C8Jcr_V9.js → get-ecosystem-wallet-info-BAhI_O0K.js} +1 -1
- package/_assets/{getBalance-sCJcvWYJ.js → getBalance-CcGY5gR3.js} +1 -1
- package/_assets/{getNFT-Vt2rJ26d.js → getNFT-BqGY0YuQ.js} +1 -1
- package/_assets/{getNFT-mOXdmQiA.js → getNFT-C7RDtKgC.js} +1 -1
- package/_assets/{grid.styles-CX_shgZ5.js → grid.styles-CIbPxjYz.js} +1 -1
- package/_assets/{hashTypedData-LiZBeYpJ.js → hashTypedData-BwahyepH.js} +1 -1
- package/_assets/{hashTypedData-CN02HuAO.js → hashTypedData-CQT8Z7QM.js} +1 -1
- package/_assets/{in-app-Di-YguDK.js → in-app-BEa0uOuE.js} +1 -1
- package/_assets/{in-app-wallet-calls-DeaYPRmI.js → in-app-wallet-calls-51HNs7nf.js} +1 -1
- package/_assets/{index-CBhJLill.js → index--IyCIOtL.js} +1 -1
- package/_assets/{index-BgNzVgyj.js → index-1vGbXY1i.js} +1 -1
- package/_assets/{index-CahHjkxT.js → index-B518D9dE.js} +1 -1
- package/_assets/{index-BPg5Mvmb.js → index-B9u-1PiI.js} +1 -1
- package/_assets/{index-rEZ_4IFC.js → index-BMkQyHsK.js} +2 -2
- package/_assets/{index-BKtPMRlC.js → index-BOAOhxo0.js} +2 -2
- package/_assets/{index-FT6agMXk.js → index-BU6JHtuu.js} +1 -1
- package/_assets/{index-DjW0J8pD.js → index-Ba9r5v6n.js} +1 -1
- package/_assets/{index-OQab0-JQ.js → index-BaAm1zmS.js} +1 -1
- package/_assets/{index-BzBhg1fo.js → index-BavNTQDp.js} +1 -1
- package/_assets/{index-tLIN_GkS.js → index-BgdG3zoP.js} +1 -1
- package/_assets/{index-DULGD4d2.js → index-Bvmi6kXJ.js} +1 -1
- package/_assets/{index-CF-t9R4v.js → index-By3SV-2A.js} +1 -1
- package/_assets/{index-DDJ7sdXv.js → index-BzxzcNw-.js} +1 -1
- package/_assets/{index-BKwIRP5b.js → index-C1gSwWjS.js} +1 -1
- package/_assets/{index-Bm_zAXvq.js → index-C4TDcPpO.js} +1 -1
- package/_assets/{index-94LcKPqN.js → index-CCZ9gop4.js} +1 -1
- package/_assets/{index-BVxFsPRO.js → index-CDvlfXaQ.js} +1 -1
- package/_assets/{index-Bf_azgOs.js → index-CJT6ZSAl.js} +1 -1
- package/_assets/{index-DQzE_-yq.js → index-CKPu0Rhs.js} +1 -1
- package/_assets/{index-BJXNRLkE.js → index-CKQaQP7G.js} +1 -1
- package/_assets/{index-C3CEKm2j.js → index-CL2TkiJT.js} +1 -1
- package/_assets/{index-D6OOP-51.js → index-CM4EYeWk.js} +1 -1
- package/_assets/{index-CdZzuE8e.js → index-CN2vDr4b.js} +1 -1
- package/_assets/{index-sFhq_-vF.js → index-CVQ6R1V5.js} +1 -1
- package/_assets/{index-BRQ9Wcma.js → index-CWsf7sXZ.js} +3 -3
- package/_assets/{index-Cleyy_0q.js → index-CYeweZh8.js} +1 -1
- package/_assets/{index-N1bohwEM.js → index-CYzST9ZR.js} +1 -1
- package/_assets/{index-CfP1fkI_.js → index-CZ9BTiBI.js} +1 -1
- package/_assets/{index-DlFosNf0.js → index-CcdXGk8X.js} +5 -5
- package/_assets/{index-Bz4Oae-5.js → index-Cg0mXcaQ.js} +1 -1
- package/_assets/{index-BuWzyRcz.js → index-Cob6No42.js} +1 -1
- package/_assets/{index-DJpl6Nbn.js → index-Ctmt-A7O.js} +1 -1
- package/_assets/{index-BanfPpYD.js → index-CywnrtKf.js} +1 -1
- package/_assets/{index-C6AA1Xf7.js → index-D1Mo88Cx.js} +2 -2
- package/_assets/{index-Dr4f9K-t.js → index-D2HoVrgJ.js} +1 -1
- package/_assets/{index-BkZn7ynX.js → index-D2rDVhzc.js} +1 -1
- package/_assets/{index-DNNPYfed.js → index-D7lXiq_p.js} +1 -1
- package/_assets/{index-BwmnMTdg.js → index-DKmNfx_r.js} +431 -424
- package/_assets/{index-BsJj67OU.js → index-DMZpMqtS.js} +1 -1
- package/_assets/{index-CcCpGfgd.js → index-DXwuJFaB.js} +1 -1
- package/_assets/{index-Bl852CQj.js → index-DZzT2JRV.js} +1 -1
- package/_assets/{index-DaSPxwNy.js → index-DctNZ_b7.js} +3 -3
- package/_assets/{index-CnCeem_J.js → index-DkuXtmln.js} +1 -1
- package/_assets/{index-Dm6Y9ZbQ.js → index-GdWtDaTT.js} +1 -1
- package/_assets/{index-C0C9VUse.js → index-Kvm4CCCA.js} +1 -1
- package/_assets/{index-DjYBUAnI.js → index-X1uFJuFF.js} +1 -1
- package/_assets/{index-8YFhojLT.js → index-YfmXULln.js} +1 -1
- package/_assets/{index-B5pEWwvB.js → index-aN7cL0g-.js} +1 -1
- package/_assets/{index-Bk3rNDtD.js → index-ee_B0C0M.js} +1 -1
- package/_assets/{index-IvNZzfoI.js → index-lKboGZNV.js} +3 -3
- package/_assets/{index-BKaw3xHY.js → index-w5mmrb4E.js} +1 -1
- package/_assets/{index.es-CAHIM3qD.js → index.es-CS0csk8D.js} +1 -1
- package/_assets/{index.es-Dwz0IUN6.js → index.es-Ddml2rSE.js} +4 -4
- package/_assets/{index.es-DAZuzUm7.js → index.es-yWrskgBR.js} +1 -1
- package/_assets/{localBatchGatewayRequest-CmvuTHFj.js → localBatchGatewayRequest-DSj1ZKv7.js} +1 -1
- package/_assets/{networks-DxoGDzHE.js → networks-Dx41u1PZ.js} +1 -1
- package/_assets/{onramp-DUHkYtuW.js → onramp-Sx99iwyT.js} +1 -1
- package/_assets/{openzeppelin-sla19LMh.js → openzeppelin-D--er9dZ.js} +1 -1
- package/_assets/{parseNft-UEsMFiqe.js → parseNft-BycYoYCg.js} +2 -2
- package/_assets/{parseSignature-CPQ4376G.js → parseSignature-BgjHqI5v.js} +3 -3
- package/_assets/{parseSignature-BhyKODlU.js → parseSignature-CWXm_7Sw.js} +1 -1
- package/_assets/{passkeys-wDVu6yuN.js → passkeys-Cm2xL-dr.js} +1 -1
- package/_assets/{pay-with-exchange-CWK-Ssp3.js → pay-with-exchange-txeqdTNS.js} +1 -1
- package/_assets/{qr-overlay-BNEHuGJ4.js → qr-overlay-C9HMMtO0.js} +1 -1
- package/_assets/{receive-BWFbKioL.js → receive-COw8m3yV.js} +1 -1
- package/_assets/{resolveImplementation-DgfhwMlM.js → resolveImplementation-Dy0lKeNl.js} +1 -1
- package/_assets/{rpc-BqdwSpX8.js → rpc-DnyWrYGQ.js} +1 -1
- package/_assets/{secp256k1-C-W8I-Zy.js → secp256k1-Bcdcpk_P.js} +1 -1
- package/_assets/{secp256k1-BBK7GqHS.js → secp256k1-CcNpg4z9.js} +1 -1
- package/_assets/{secp256k1-DREcXm38.js → secp256k1-DzL_PuFg.js} +1 -1
- package/_assets/{send-CHzkLWPr.js → send-C_n5nyrG.js} +1 -1
- package/_assets/{send-batch-transaction-5BgfAaSR.js → send-batch-transaction-TaBUhKoj.js} +1 -1
- package/_assets/{send-eip712-transaction-D_wCG6QA.js → send-eip712-transaction-B3V8gtKY.js} +2 -2
- package/_assets/{send-gasless-transaction-tLadnb9y.js → send-gasless-transaction-DzbSdxTV.js} +2 -2
- package/_assets/{send-transaction-D3DYgONV.js → send-transaction-BQoeBGHf.js} +2 -2
- package/_assets/{sendMetaTransaction-Uawte2uP.js → sendMetaTransaction-Cujmhto9.js} +1 -1
- package/_assets/{sendRawTransaction-yrJJjJuj.js → sendRawTransaction-B3U6sgIX.js} +3 -3
- package/_assets/{serializeTransaction-DbAjRO35.js → serializeTransaction-CEz8opnP.js} +1 -1
- package/_assets/{session-proposal-tovuipdf.js → session-proposal-DVoAcvce.js} +1 -1
- package/_assets/{session-request-CJx8_Nqv.js → session-request-CZokr4Xe.js} +2 -2
- package/_assets/{signing-DIdv4EGK.js → signing-DC0M8oPq.js} +3 -3
- package/_assets/{skeleton.styles-JTH6hNy6.js → skeleton.styles-DylVN6-9.js} +1 -1
- package/_assets/{socials-BMAR0gR_.js → socials-DcKQDWpl.js} +1 -1
- package/_assets/{styled-Dfg0i8eX.js → styled-JtDkvCU0.js} +1 -1
- package/_assets/{swaps-BGa4ySw5.js → swaps-BASgE7fT.js} +1 -1
- package/_assets/{thirdweb-Bf4Axk_U.js → thirdweb-DeY9PRqG.js} +3 -3
- package/_assets/{to-serializable-transaction-DRJLaygN.js → to-serializable-transaction-C5iBAwTT.js} +2 -2
- package/_assets/{transactionReceipt-Bhig9TGy.js → transactionReceipt-Ba3NjgOD.js} +1 -1
- package/_assets/{transactions-CCUXYIeH.js → transactions-7XnTBS-v.js} +1 -1
- package/_assets/{useCreditPacks-D8rMiOb_.js → useCreditPacks-D4DmfZdb.js} +1 -1
- package/_assets/{useImportable-CNQfbBw8.js → useImportable-BVgJ9iKt.js} +1 -1
- package/_assets/{useInfiniteGrid-BADHIu6F.js → useInfiniteGrid-pnTLFPAY.js} +1 -1
- package/_assets/{useTheme-DBV2Tqy3.js → useTheme-DsTUFXn9.js} +1 -1
- package/_assets/{verifyHash-Cdp-LdrE.js → verifyHash-gy6H4z-D.js} +1 -1
- package/_assets/{w3m-modal-BxSlR5wP.js → w3m-modal-Cr0FS0Kt.js} +1 -1
- package/_assets/{w3m-modal-CIDOCqB8.js → w3m-modal-CygdLVwq.js} +1 -1
- package/_assets/{wait-for-tx-receipt-C9B0C6I6.js → wait-for-tx-receipt-CJ8V2zdP.js} +1 -1
- package/_assets/{wallets-wYcTf8sk.js → wallets-CZSw2Puk.js} +5 -5
- package/_assets/{web-connector-DC2N7iZ9.js → web-connector-CdugmhvI.js} +3 -3
- package/_assets/{writeContract-EKs-5iav.js → writeContract-CcaW_hBH.js} +1 -1
- package/_assets/{zoraTestnet-DPmpNXvV.js → zoraTestnet-Bge55Z1n.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/LazyEmoteControls-CynuOxLa.js +0 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as e,L as ke,r as T,b as ea,a as ta}from"./react-BYHuwl8r.js";import{t as de,s as i,b as a,L as ce,ax as aa,ay as Re,az as sa,J as na,I as O,z as Mt,K as Ke,x as ia,X as H,am as dt,o as ra,q as oa,v as ca,aA as da,A as la,aB as ua,an as ha,aC as pa,aD as lt,aE as ga,aF as ma,y as xa,aG as ut,Z as V,aH as ht,aI as fa,F as ae,r as ya,c as pt,aJ as ba,C as va,aK as gt,aL as qe,aM as wa,aN as xe,aO as fe,aP as mt,g as ye,f as Ca,h as Be,aQ as ja}from"./index-DKmNfx_r.js";import{M as ka,S as $a,C as Sa,H as Ma,a as Ta,T as Ia,X as Pa,b as za,B as Aa,c as Ea,d as xt,e as Ra,f as Ce,P as Tt,m as qa,g as Ba,h as _a,i as Fa,j as Wa,k as It,l as je,L as La,n as Ka,o as ft,p as yt,W as Na,q as Qa,r as Ua,s as Ha,A as Oa,t as Ga,u as Va,v as Da,w as Ja,x as Xa,y as Ya,z as Za,D as es,E as ts,F as as,G as ss,I as ns,J as is,K as rs,N as os,O as cs,Q as _e,R as ds,U as ls,V as us,Y as hs,Z as bt,_ as vt,$ as ps,a0 as gs,a1 as ms}from"./CollectionCarousel-DVAZWgEi.js";import{f as xs,h as fs,a as ys,n as bs,i as vs,A as ws}from"./authorizations-C1zKbItJ.js";import{g as Cs,j as Fe}from"./buy-BHTwjx-z.js";import{b as js,w as ks,S as wt,G as $s}from"./buy-gasless-DqSXyXet.js";import{u as Ss,M as Ms,R as be,r as Ts,c as Is,p as Ct}from"./useCreditPacks-D4DmfZdb.js";import{i as Ps,a as zs}from"./errors-d4qtRp0M.js";import{E as As}from"./ErrorNotice-C4BJGNNo.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Cujmhto9.js";const{colors:se,radius:Es}=de,Rs=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
gap: 8px;
|
|
6
6
|
width: 100%;
|
|
7
|
-
`,
|
|
7
|
+
`,qs=i.span`
|
|
8
8
|
font-size: 16px;
|
|
9
9
|
line-height: 22px;
|
|
10
10
|
color: ${se.text2};
|
|
11
11
|
text-transform: capitalize;
|
|
12
12
|
white-space: nowrap;
|
|
13
|
-
`,
|
|
13
|
+
`,Bs=i.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
16
|
gap: 12px;
|
|
@@ -34,14 +34,14 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
34
34
|
}
|
|
35
35
|
&::-webkit-scrollbar-thumb {
|
|
36
36
|
background: #a2a2a2;
|
|
37
|
-
border-radius: ${
|
|
37
|
+
border-radius: ${Es.btn};
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,_s=i.span`
|
|
40
40
|
margin-left: 8px;
|
|
41
41
|
font-size: 13px;
|
|
42
42
|
font-weight: 600;
|
|
43
43
|
color: ${se.muted};
|
|
44
|
-
`,
|
|
44
|
+
`,Fs=i.div`
|
|
45
45
|
display: flex;
|
|
46
46
|
align-items: center;
|
|
47
47
|
justify-content: space-between;
|
|
@@ -58,7 +58,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
color: ${se.text};
|
|
60
60
|
}
|
|
61
|
-
`;function
|
|
61
|
+
`;function Ws(o){const{phase:l,balanceCredits:P,onClose:z}=o,W=l==="processing",D=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),J=l==="processing";return e.jsxs(ka,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx($a,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(Sa,{"data-tall":J||void 0,children:[e.jsxs(Ma,{children:[e.jsxs(Ta,{children:[e.jsx(Ia,{children:D}),!W&&e.jsx(Pa,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(za,{})})]}),e.jsxs(Aa,{children:[e.jsx(Ea,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(xt,{}),e.jsx(Ra,{children:ce(P)})]})]}),l==="choose"&&e.jsxs(Ce,{children:[e.jsxs(Fs,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(xt,{}),ce(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=qa(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Ls,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(Ks,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(Ce,{children:[e.jsxs(Ba,{"data-testid":"buy-error",children:[e.jsx(_a,{src:Fa,alt:"",width:64,height:80}),e.jsxs(Wa,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx(je,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(je,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Ls({stage:o,step:l,total:P,isSelfCustody:z,signatures:W}){const D=o==="reserving",J=P>0?Math.min(100,Math.round(l/P*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(Ce,{"data-processing":!0,children:[e.jsx(La,{src:aa,alt:"",width:61,height:61}),e.jsx(Ka,{children:ne}),D?e.jsxs(Rs,{children:[e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{"data-step":!0,style:{width:`${J}%`}})}),P>1?e.jsxs(qs,{children:[l,"/",P]}):null]}):e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{})})]})}function Ks({lines:o,shortfallCredits:l,packs:P,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:J}){const A=P.find(n=>n.id===z),ne=o.reduce((n,K)=>n+(K.quantity??1),0);return e.jsxs(Ce,{children:[e.jsxs(Na,{"data-testid":"nofunds-warning",children:[e.jsx(Qa,{}),e.jsxs(Ua,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne}),Re()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Ha,{href:sa("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]})]}),e.jsx(Bs,{children:o.map(n=>{const K=n.quantity??1;return e.jsxs(Oa,{children:[e.jsx(Ga,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Va,{children:[e.jsxs("div",{children:[e.jsxs(Da,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),K>1?e.jsx(_s,{children:a("cartCheckout.qty",{count:K})}):null]}),n.item.creator?e.jsx(Ja,{address:n.item.creator}):null]}),e.jsxs(Xa,{children:[e.jsx(Ya,{}),e.jsx("span",{children:ce(n.priceCredits*K)})]})]})]},n.item.id)})}),Re()?null:e.jsxs(e.Fragment,{children:[e.jsx(Za,{children:P.map(n=>{const K=n.id===z;return e.jsxs(es,{"data-testid":"credit-pack","data-on":K||void 0,onClick:()=>W(n.id),children:[e.jsx(ts,{src:as,alt:""}),e.jsx(ss,{children:ce(n.credits)}),e.jsxs(ns,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(is,{children:[e.jsxs(rs,{children:[e.jsx(os,{}),e.jsx("span",{children:ce((A==null?void 0:A.credits)??0)})]}),e.jsxs(cs,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]})]}),e.jsxs(It,{children:[e.jsx(je,{"data-variant":"outline",onClick:J,children:a("buyModal.cancel")}),Re()?null:e.jsx(je,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Ns,radius:te}=de,Pt="@media (max-width: 1080px)",I="@media (max-width: 880px)",jt=i.div`
|
|
62
62
|
max-width: 1510px;
|
|
63
63
|
margin: 0 auto;
|
|
64
64
|
/* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
|
|
@@ -71,7 +71,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
71
71
|
${I} {
|
|
72
72
|
padding-bottom: 188px; /* room for the fixed summary bar */
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
74
|
+
`,kt=i.button`
|
|
75
75
|
display: inline-flex;
|
|
76
76
|
align-items: center;
|
|
77
77
|
gap: 6px;
|
|
@@ -98,16 +98,16 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
98
98
|
${I} {
|
|
99
99
|
display: none;
|
|
100
100
|
}
|
|
101
|
-
`,
|
|
101
|
+
`,Qs=i.div`
|
|
102
102
|
display: grid;
|
|
103
103
|
grid-template-columns: minmax(0, 1fr) 615px;
|
|
104
104
|
gap: 24px;
|
|
105
105
|
align-items: start;
|
|
106
106
|
|
|
107
|
-
${
|
|
107
|
+
${Pt} {
|
|
108
108
|
grid-template-columns: 1fr;
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
`,$t=i.div`
|
|
111
111
|
position: relative;
|
|
112
112
|
/* The gray band is 733px in Figma (1553-317103) — taller than the panels inside it, deliberately. Without
|
|
113
113
|
this it collapsed to the panels' height, and the page shell's own viewport-filling min-height then padded
|
|
@@ -147,12 +147,12 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
147
147
|
top: -16px; /* .page's mobile padding */
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
`,
|
|
150
|
+
`,Us=i.div`
|
|
151
151
|
min-width: 0;
|
|
152
152
|
display: flex;
|
|
153
153
|
flex-direction: column;
|
|
154
154
|
gap: 12px;
|
|
155
|
-
`,
|
|
155
|
+
`,Hs=i.div`
|
|
156
156
|
display: flex;
|
|
157
157
|
align-items: center;
|
|
158
158
|
justify-content: space-between;
|
|
@@ -165,7 +165,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
165
165
|
gap: 8px;
|
|
166
166
|
padding: 12px;
|
|
167
167
|
}
|
|
168
|
-
`,
|
|
168
|
+
`,zt=i.section`
|
|
169
169
|
min-width: 0;
|
|
170
170
|
background: ${r.white};
|
|
171
171
|
border-radius: 16px;
|
|
@@ -174,7 +174,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
174
174
|
${I} {
|
|
175
175
|
padding: 16px;
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,Os=i(zt)`
|
|
178
178
|
display: flex;
|
|
179
179
|
flex-direction: column;
|
|
180
180
|
align-items: center;
|
|
@@ -189,13 +189,13 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
189
189
|
min-height: 320px;
|
|
190
190
|
padding: 32px 16px;
|
|
191
191
|
}
|
|
192
|
-
`,
|
|
192
|
+
`,Gs=i.div`
|
|
193
193
|
display: flex;
|
|
194
194
|
flex-direction: column;
|
|
195
195
|
align-items: center;
|
|
196
196
|
gap: 12px;
|
|
197
197
|
padding-bottom: 16px;
|
|
198
|
-
`,
|
|
198
|
+
`,Vs=i.p`
|
|
199
199
|
margin: 0;
|
|
200
200
|
font-size: 24px;
|
|
201
201
|
font-weight: 700;
|
|
@@ -204,7 +204,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
204
204
|
${de.media.maxWidth("mobile")} {
|
|
205
205
|
font-size: 20px;
|
|
206
206
|
}
|
|
207
|
-
`,
|
|
207
|
+
`,Ds=i.p`
|
|
208
208
|
margin: 0;
|
|
209
209
|
font-size: 20px;
|
|
210
210
|
font-weight: 400;
|
|
@@ -213,7 +213,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
213
213
|
${de.media.maxWidth("mobile")} {
|
|
214
214
|
font-size: 16px;
|
|
215
215
|
}
|
|
216
|
-
`,
|
|
216
|
+
`,Js=i(ke)`
|
|
217
217
|
display: inline-flex;
|
|
218
218
|
align-items: center;
|
|
219
219
|
justify-content: center;
|
|
@@ -239,7 +239,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
239
239
|
outline: 2px solid ${r.accent};
|
|
240
240
|
outline-offset: 2px;
|
|
241
241
|
}
|
|
242
|
-
`,
|
|
242
|
+
`,Xs=i.button`
|
|
243
243
|
display: none;
|
|
244
244
|
|
|
245
245
|
${I} {
|
|
@@ -257,7 +257,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
257
257
|
height: 20px;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
`,
|
|
260
|
+
`,Ys=i.h1`
|
|
261
261
|
margin: 0;
|
|
262
262
|
font-size: 14px;
|
|
263
263
|
font-weight: 600;
|
|
@@ -269,7 +269,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
269
269
|
min-width: 0;
|
|
270
270
|
font-size: 16px;
|
|
271
271
|
}
|
|
272
|
-
`,
|
|
272
|
+
`,Zs=i.button`
|
|
273
273
|
display: inline-flex;
|
|
274
274
|
align-items: center;
|
|
275
275
|
justify-content: center;
|
|
@@ -308,11 +308,11 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
308
308
|
padding: 0 10px;
|
|
309
309
|
font-size: 12px;
|
|
310
310
|
}
|
|
311
|
-
`,
|
|
311
|
+
`,en=i.div`
|
|
312
312
|
display: flex;
|
|
313
313
|
flex-direction: column;
|
|
314
314
|
gap: 24px;
|
|
315
|
-
`,
|
|
315
|
+
`,tn=i.div`
|
|
316
316
|
position: relative;
|
|
317
317
|
display: flex;
|
|
318
318
|
align-items: stretch;
|
|
@@ -331,7 +331,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
331
331
|
&[data-unavailable] [data-desc] {
|
|
332
332
|
opacity: 0.7;
|
|
333
333
|
}
|
|
334
|
-
`,
|
|
334
|
+
`,an=i.div`
|
|
335
335
|
position: relative;
|
|
336
336
|
flex-shrink: 0;
|
|
337
337
|
width: 137.5px;
|
|
@@ -353,12 +353,12 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
353
353
|
width: 120px;
|
|
354
354
|
height: 120px;
|
|
355
355
|
}
|
|
356
|
-
`,
|
|
356
|
+
`,sn=i(ke)`
|
|
357
357
|
position: absolute;
|
|
358
358
|
inset: 0;
|
|
359
359
|
display: grid;
|
|
360
360
|
place-items: center;
|
|
361
|
-
`,
|
|
361
|
+
`,nn=i.span`
|
|
362
362
|
position: absolute;
|
|
363
363
|
top: 7.5px;
|
|
364
364
|
left: 7.5px;
|
|
@@ -368,7 +368,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
368
368
|
background: #34ce77;
|
|
369
369
|
display: grid;
|
|
370
370
|
place-items: center;
|
|
371
|
-
`,
|
|
371
|
+
`,rn=i.div`
|
|
372
372
|
flex: 1;
|
|
373
373
|
min-width: 0;
|
|
374
374
|
display: flex;
|
|
@@ -380,13 +380,13 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
380
380
|
${I} {
|
|
381
381
|
padding: 12px 4px 12px 0;
|
|
382
382
|
}
|
|
383
|
-
`,
|
|
383
|
+
`,on=i.div`
|
|
384
384
|
display: flex;
|
|
385
385
|
flex-direction: column;
|
|
386
386
|
gap: 4px;
|
|
387
387
|
min-width: 0;
|
|
388
388
|
padding-right: 64px; /* clear the top-right favourite + remove group */
|
|
389
|
-
`,
|
|
389
|
+
`,At=Ke`
|
|
390
390
|
display: block;
|
|
391
391
|
font-size: 16px;
|
|
392
392
|
font-weight: 600;
|
|
@@ -408,11 +408,11 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
408
408
|
line-clamp: 2;
|
|
409
409
|
-webkit-box-orient: vertical;
|
|
410
410
|
}
|
|
411
|
-
`,
|
|
412
|
-
${
|
|
413
|
-
`,
|
|
414
|
-
${
|
|
415
|
-
`,
|
|
411
|
+
`,cn=i.div`
|
|
412
|
+
${At};
|
|
413
|
+
`,dn=i(ke)`
|
|
414
|
+
${At};
|
|
415
|
+
`,ln=i(na)`
|
|
416
416
|
font-size: 10px;
|
|
417
417
|
line-height: 1.43;
|
|
418
418
|
color: ${r.muted};
|
|
@@ -424,20 +424,20 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
424
424
|
font-size: 10px;
|
|
425
425
|
line-height: 1.43;
|
|
426
426
|
}
|
|
427
|
-
`,
|
|
427
|
+
`,un=i.div`
|
|
428
428
|
display: flex;
|
|
429
429
|
align-items: center;
|
|
430
430
|
justify-content: space-between;
|
|
431
431
|
gap: 12px;
|
|
432
432
|
padding-right: 8px;
|
|
433
|
-
`,
|
|
433
|
+
`,hn=i.div`
|
|
434
434
|
display: inline-flex;
|
|
435
435
|
align-items: center;
|
|
436
436
|
gap: 8px;
|
|
437
437
|
padding: 6px;
|
|
438
438
|
border: 0.5px solid ${r.muted2};
|
|
439
439
|
border-radius: ${te.pill};
|
|
440
|
-
|
|
440
|
+
`,St=i.button`
|
|
441
441
|
display: grid;
|
|
442
442
|
place-items: center;
|
|
443
443
|
width: 16px;
|
|
@@ -452,14 +452,14 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
452
452
|
color: ${r.muted2};
|
|
453
453
|
cursor: default;
|
|
454
454
|
}
|
|
455
|
-
`,
|
|
455
|
+
`,pn=i.span`
|
|
456
456
|
min-width: 12px;
|
|
457
457
|
font-size: 14px;
|
|
458
458
|
font-weight: 500;
|
|
459
459
|
line-height: 1.2;
|
|
460
460
|
color: ${r.text};
|
|
461
461
|
text-align: center;
|
|
462
|
-
`,
|
|
462
|
+
`,gn=i.div`
|
|
463
463
|
display: inline-flex;
|
|
464
464
|
align-items: center;
|
|
465
465
|
gap: 4px;
|
|
@@ -473,7 +473,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
473
473
|
${I} {
|
|
474
474
|
font-size: 20px;
|
|
475
475
|
}
|
|
476
|
-
`,
|
|
476
|
+
`,mn=i(Mt)`
|
|
477
477
|
width: 24px;
|
|
478
478
|
height: 24px;
|
|
479
479
|
background: ${r.text};
|
|
@@ -482,20 +482,20 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
482
482
|
width: 20px;
|
|
483
483
|
height: 20px;
|
|
484
484
|
}
|
|
485
|
-
`,
|
|
485
|
+
`,xn=i.span`
|
|
486
486
|
margin-left: 6px;
|
|
487
487
|
font-size: 14px;
|
|
488
488
|
font-weight: 500;
|
|
489
489
|
color: ${r.muted};
|
|
490
490
|
text-decoration: line-through;
|
|
491
|
-
`,
|
|
491
|
+
`,fn=i.div`
|
|
492
492
|
position: absolute;
|
|
493
493
|
top: 9px;
|
|
494
494
|
right: 7px;
|
|
495
495
|
display: flex;
|
|
496
496
|
align-items: flex-start;
|
|
497
497
|
gap: 12px;
|
|
498
|
-
`,
|
|
498
|
+
`,yn=i.span`
|
|
499
499
|
display: inline-flex;
|
|
500
500
|
align-items: center;
|
|
501
501
|
gap: 4px;
|
|
@@ -504,9 +504,9 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
504
504
|
line-height: 1;
|
|
505
505
|
text-transform: uppercase;
|
|
506
506
|
color: ${r.text2};
|
|
507
|
-
`,
|
|
507
|
+
`,bn=i(O)`
|
|
508
508
|
color: #f48221;
|
|
509
|
-
`,
|
|
509
|
+
`,vn=i(ke)`
|
|
510
510
|
font-size: 12px;
|
|
511
511
|
font-weight: 600;
|
|
512
512
|
line-height: 24px;
|
|
@@ -522,7 +522,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
522
522
|
outline: 2px solid ${r.accent};
|
|
523
523
|
outline-offset: 2px;
|
|
524
524
|
}
|
|
525
|
-
`,
|
|
525
|
+
`,wn=i.span`
|
|
526
526
|
align-self: flex-start;
|
|
527
527
|
display: inline-flex;
|
|
528
528
|
align-items: center;
|
|
@@ -534,11 +534,11 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
534
534
|
font-weight: 400;
|
|
535
535
|
line-height: 14px;
|
|
536
536
|
color: ${r.text};
|
|
537
|
-
`,
|
|
537
|
+
`,Cn=i(O)`
|
|
538
538
|
width: 11.31px;
|
|
539
539
|
height: 10.94px;
|
|
540
540
|
background: ${r.text};
|
|
541
|
-
`,
|
|
541
|
+
`,Et=Ke`
|
|
542
542
|
display: grid;
|
|
543
543
|
place-items: center;
|
|
544
544
|
width: 24px;
|
|
@@ -554,8 +554,8 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
554
554
|
opacity: 0.5;
|
|
555
555
|
cursor: default;
|
|
556
556
|
}
|
|
557
|
-
`,
|
|
558
|
-
${
|
|
557
|
+
`,jn=i.button`
|
|
558
|
+
${Et};
|
|
559
559
|
|
|
560
560
|
&:hover:not(:disabled) {
|
|
561
561
|
color: ${r.text};
|
|
@@ -563,13 +563,13 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
563
563
|
&[data-on] {
|
|
564
564
|
color: ${r.dclRed};
|
|
565
565
|
}
|
|
566
|
-
`,
|
|
567
|
-
${
|
|
566
|
+
`,kn=i.button`
|
|
567
|
+
${Et};
|
|
568
568
|
|
|
569
569
|
&:hover:not(:disabled) {
|
|
570
570
|
color: ${r.dclRed};
|
|
571
571
|
}
|
|
572
|
-
|
|
572
|
+
`,$n=i.div`
|
|
573
573
|
display: flex;
|
|
574
574
|
gap: 20px;
|
|
575
575
|
margin-top: 16px;
|
|
@@ -582,7 +582,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
582
582
|
& .link:hover:not(:disabled) {
|
|
583
583
|
color: ${r.text};
|
|
584
584
|
}
|
|
585
|
-
|
|
585
|
+
`,Sn=i.aside`
|
|
586
586
|
position: sticky;
|
|
587
587
|
top: 172px;
|
|
588
588
|
display: flex;
|
|
@@ -592,7 +592,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
592
592
|
border-radius: 16px;
|
|
593
593
|
padding: 16px;
|
|
594
594
|
|
|
595
|
-
${
|
|
595
|
+
${Pt} {
|
|
596
596
|
position: static;
|
|
597
597
|
}
|
|
598
598
|
${I} {
|
|
@@ -606,7 +606,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
606
606
|
border-radius: 16px 16px 0 0;
|
|
607
607
|
box-shadow: 0 -4px 20px rgba(22, 21, 24, 0.12);
|
|
608
608
|
}
|
|
609
|
-
`,
|
|
609
|
+
`,Mn=i.h2`
|
|
610
610
|
margin: 0 0 24px;
|
|
611
611
|
padding-bottom: 16px;
|
|
612
612
|
border-bottom: 1px solid ${r.gray4};
|
|
@@ -618,28 +618,28 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
618
618
|
margin-bottom: 12px;
|
|
619
619
|
padding-bottom: 12px;
|
|
620
620
|
}
|
|
621
|
-
`,
|
|
621
|
+
`,Tn=i.div`
|
|
622
622
|
display: flex;
|
|
623
623
|
flex-direction: column;
|
|
624
624
|
gap: 12px;
|
|
625
|
-
`,
|
|
625
|
+
`,In=i.div`
|
|
626
626
|
display: flex;
|
|
627
627
|
align-items: flex-start;
|
|
628
628
|
justify-content: space-between;
|
|
629
629
|
gap: 12px;
|
|
630
|
-
`,
|
|
630
|
+
`,Pn=i.span`
|
|
631
631
|
font-size: 14px;
|
|
632
632
|
font-weight: 600;
|
|
633
633
|
line-height: 1.57;
|
|
634
634
|
color: ${r.muted1};
|
|
635
|
-
`,
|
|
635
|
+
`,zn=i.span`
|
|
636
636
|
display: inline-flex;
|
|
637
637
|
align-items: center;
|
|
638
638
|
gap: 8px;
|
|
639
639
|
font-size: 24px;
|
|
640
640
|
font-weight: 700;
|
|
641
641
|
color: ${r.text};
|
|
642
|
-
`,
|
|
642
|
+
`,An=i.span`
|
|
643
643
|
display: flex;
|
|
644
644
|
flex-direction: column;
|
|
645
645
|
align-items: flex-end;
|
|
@@ -650,7 +650,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
650
650
|
font-weight: 400;
|
|
651
651
|
line-height: 1;
|
|
652
652
|
color: ${r.muted};
|
|
653
|
-
`;const
|
|
653
|
+
`;const En=i(Mt)`
|
|
654
654
|
width: 30px;
|
|
655
655
|
height: 30px;
|
|
656
656
|
background: ${r.text};
|
|
@@ -663,7 +663,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
663
663
|
height: 56px;
|
|
664
664
|
border: 0;
|
|
665
665
|
border-radius: ${te.btn};
|
|
666
|
-
background: ${
|
|
666
|
+
background: ${Ns.buyBtn};
|
|
667
667
|
color: ${r.softWhite};
|
|
668
668
|
font-size: 15px;
|
|
669
669
|
font-weight: 600;
|
|
@@ -684,14 +684,14 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
684
684
|
opacity: 0.6;
|
|
685
685
|
cursor: default;
|
|
686
686
|
}
|
|
687
|
-
`;const
|
|
687
|
+
`;const Rt=Ke`
|
|
688
688
|
margin: 0;
|
|
689
689
|
font-size: 13px;
|
|
690
690
|
`,ve=i.p`
|
|
691
|
-
${
|
|
692
|
-
`,
|
|
693
|
-
${
|
|
694
|
-
`,
|
|
691
|
+
${Rt};
|
|
692
|
+
`,Rn=i(As)`
|
|
693
|
+
${Rt};
|
|
694
|
+
`,qn=i.div`
|
|
695
695
|
position: relative;
|
|
696
696
|
flex: 1 0 auto;
|
|
697
697
|
margin-top: 48px;
|
|
@@ -703,4 +703,4 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
|
|
|
703
703
|
& section {
|
|
704
704
|
margin-top: 0;
|
|
705
705
|
}
|
|
706
|
-
`;function Fe(o){if(Is(o))return a("errors.rejected");const l=(o.message??"").toLowerCase();return l.includes("insufficient")?a("cart.error.insufficient",{currency:ba.name}):l.includes("no active listing")||l.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const qn=12e4;function Bn(o){const l=[];return o.unavailable.length&&l.push(a("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&l.push(a("cart.drop.own",{count:o.own.length})),a("cart.drop.removed",{items:l.join(` ${a("cart.drop.and")} `)})}const We=o=>o.reduce((l,P)=>l+P.priceCredits*P.quantity,0),we=o=>o.flatMap(l=>Array.from({length:l.quantity},()=>({...l,quantity:1})));function Xn(){na({title:a("nav.cart"),noindex:!0});const o=H(e=>e.items),l=H(e=>e.remove),P=H(e=>e.increment),z=H(e=>e.decrement),W=H(e=>e.clear),D=H(e=>e.restore),J=H(e=>e.setFittingOpen),A=ct(e=>e.items),ne=ct(e=>e.toggle),{session:n,signIn:K}=ia(),Rt=ra(),le=$s().packs.slice(0,Ss);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const qt=o.some(e=>e.category!=="emote"),{data:$e}=oa({queryKey:["upsell-listings"],queryFn:()=>Ca({first:40}),staleTime:6e4}),{data:$}=ca(n),v=da(),X=Zt(),{state:E}=ea(),[Bt,ie]=T.useState(null),[Ke,ue]=T.useState(null),[_t,B]=T.useState(!1),[_,G]=T.useState(null),Ne=T.useRef(0),[g,j]=T.useState(null),{data:he}=la(n),{data:re}=ua(!0),[Se,Qe]=T.useState(""),oe=T.useRef(null),Ue=ha(o),He=e=>lt(Ue[e.id]),Me=o.filter(He),Oe=o.length>0&&Me.length===0,Ft=Me.reduce((e,s)=>e+s.priceCredits*s.quantity,0),Wt=o.reduce((e,s)=>e+s.quantity,0),Lt=Me.reduce((e,s)=>e+s.quantity,0),Ge=_?_.liveTotalCredits:Ft,Kt=new Set(o.map(e=>e.id)),Ve=(($e==null?void 0:$e.items)??[]).filter(e=>!Kt.has(e.id)).slice(0,12),Nt=new Map(_==null?void 0:_.buyable.map(e=>[e.item.id,e])),pe=($==null?void 0:$.credits)??0,Te=Ge*10,Qt=re?dt(Te,re):0n,Ie=Be({priceCents:Te,priceManaWei:Qt,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),Ut=e=>e.some(s=>s.acquisition==="store"),Pe=e=>e.flatMap(s=>s.acquisition==="trade"?[s]:[]),Ht=xa,Ot=e=>ya(e.contractAddress,String(e.itemId));function ge(e){e(),G(null),ue(null),ie(null)}function Gt(){j(null),B(!1)}function De(e){const s=We(e),d=Math.max(0,s-pe),c=le.find(u=>u.credits>=d)??le[le.length-1];Qe(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:pe,shortfall:d}),j({phase:"nofunds",lines:e.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:d}),B(!1)}async function ze(e){if(!n||e.length===0)return;const s=we(e),d=s.map(y=>({...y.item,priceCredits:y.priceCredits})),c=e.map(y=>({...y.item,priceCredits:y.priceCredits,quantity:y.quantity})),u=[];let h="authorize";const w=new Set,S=new Set,F=new Set,R=[];let q=!1;j({phase:"processing",stage:"reserving",step:1,total:s.length});try{const y=[];for(let x=0;x<s.length;x++){const p=s[x];j({phase:"processing",stage:"reserving",step:x+1,total:s.length});try{const M=p.acquisition==="trade"?p.trade.id:void 0,C=p.item.contractAddress&&p.item.itemId!=null?{contractAddress:p.item.contractAddress,itemId:String(p.item.itemId)}:void 0,{credit:U,maxCreditedValue:ee}=await pt(n.identity,p.usdCents,M,C);u.push({salt:U.id,itemId:p.item.id}),y.push(p.acquisition==="store"?{kind:"store",item:{collection:p.item.contractAddress,itemId:String(p.item.itemId),priceWei:p.priceWei},credits:[U],maxCreditedValue:ee,chainId:p.item.chainId}:{kind:"trade",trade:p.trade,credits:[U],maxCreditedValue:ee})}catch(M){if(Ps(M)){if(u.length){try{await Re(n.identity,u.map(C=>C.salt))}catch(C){ae(C,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}De(e);return}throw M}}h="submit";const m=ws(y).length,k=x=>m>1?{current:x,total:m}:void 0,L=(x,p)=>j({phase:"processing",stage:x,step:s.length,total:s.length,signatures:k(p)}),N=x=>x<m?L("awaiting-signature",x+1):L("settling",m);L("awaiting-signature",1);let f=[];if(ms())try{const x=new Map;f=await Cs({purchases:y,buyer:n.address,signer:n.signer,onSigned:()=>N(m),onBroadcast:({txHash:C,salts:U})=>{x.set(C,U),U.forEach(ee=>w.add(ee))}});const p=await Promise.allSettled(f.map(C=>js(C)));p.forEach((C,U)=>{const ee=x.get(f[U])??[];C.status==="fulfilled"?(ee.forEach(Ee=>S.add(Ee)),R.push(f[U])):C.reason instanceof vt||ee.forEach(Ee=>F.add(Ee))});const M=p.flatMap(C=>C.status==="rejected"?[C.reason]:[]);if(M.length&&!M.some(C=>C instanceof vt))throw M[0];q=!0}catch(x){if(!(x instanceof ks)||!va(n.providerType))throw x;f=await _e({purchases:y,buyer:n.address,signer:n.signer,onSigned:N,onBroadcast:({salts:p})=>p.forEach(M=>w.add(M)),onSettled:({txHash:p,salts:M})=>{M.forEach(C=>S.add(C)),R.push(p)},onReverted:({salts:p})=>p.forEach(M=>F.add(M))})}else f=await _e({purchases:y,buyer:n.address,signer:n.signer,onSigned:N,onBroadcast:({salts:x})=>x.forEach(p=>w.add(p)),onSettled:({txHash:x,salts:p})=>{p.forEach(M=>S.add(M)),R.push(x)},onReverted:({salts:x})=>x.forEach(p=>F.add(p))});e.forEach(x=>l(x.item.id)),G(null),V("Shop Completed Purchase",{...xe(d),payment_type:"credits",no_crypto_step:q,transaction_hash:f[0]??null}),bt(v);const b=oe.current;oe.current=null,j(null),B(!1);const Q={items:c,txHash:f[0]??void 0,txHashes:f,settled:!0,...b?{creditsAdded:b}:{}};X("/success",{state:Q,replace:!0})}catch(y){fe(y)||ae(y,{flow:"cart_checkout",step:h,cart_size:e.length});const m=new Set([...w].filter(b=>!F.has(b))),{toRelease:k,boughtItemIds:L}=wt({reservations:u,spent:m,settled:S}),N=d.filter(b=>L.includes(b.id)),f=d.filter(b=>!L.includes(b.id));if(V(fe(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:h,error_code:gt(y),value_usd:ut(f.reduce((b,Q)=>b+Q.priceCredits,0)),cart_size:s.length,partial:N.length>0}),k.length)try{await Re(n.identity,k)}catch(b){ae(b,{flow:"cart_checkout",step:"release"})}if(v.invalidateQueries({queryKey:["usd-balance"]}),N.length>0){L.forEach(b=>l(b)),G(null),bt(v),V("Shop Completed Purchase",{...xe(N),payment_type:"credits",no_crypto_step:q,transaction_hash:R[0]??null,partial:!0}),j({phase:"error",message:a("cart.error.partiallyBought")}),B(!1);return}j({phase:"error",message:Fe(y)})}}function Je(e,s){v.invalidateQueries({queryKey:["usd-balance"]}),v.invalidateQueries({queryKey:["detail-trade"]}),v.invalidateQueries({queryKey:["shop-item"]}),v.invalidateQueries({queryKey:["owned-token"]}),v.invalidateQueries({queryKey:["public-token"]}),v.invalidateQueries({queryKey:["item-resales"]}),v.invalidateQueries({queryKey:["shop-items"]}),v.invalidateQueries({queryKey:["catalog-items"]}),v.invalidateQueries({queryKey:["my-assets"]}),v.invalidateQueries({queryKey:["purchases"]}),v.invalidateQueries({queryKey:["owned-item-count"]}),v.invalidateQueries({queryKey:["overview-listings"]}),v.invalidateQueries({queryKey:["upsell-listings"]});const d=oe.current;oe.current=null,j(null),B(!1);const c={items:e,txHash:s[0]??void 0,txHashes:s,settled:!0,...d?{creditsAdded:d}:{}};X("/success",{state:c,replace:!0})}function Xe(e,s){fe(e)||ae(e,{flow:s,step:"submit"}),V(fe(e)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:gt(e)}),j({phase:"error",message:Fe(e)}),B(!1)}async function Vt(e,s){const d=ye(qe.MANAToken,s),c=ye(qe.CreditsManager,s);await bs({auth:{kind:vs.Allowance,contractAddress:d.address,spenderAddress:c.address,chainId:s},signer:e})}async function Ye(){if(re)return re;try{return await v.fetchQuery({queryKey:["mana-rate",ht.chainId],queryFn:()=>fa(ht.chainId),staleTime:6e4})}catch{return}}async function Dt(e){const s=we(e).reduce((h,w)=>h+w.usdCents,0),c=(he??0n)>0n?await Ye():re,u=c?dt(s,c):0n;return{totalCents:s,manaWei:u}}async function Ze(e,s){const d=We(e),{totalCents:c,manaWei:u}=await Dt(e),h=Be({priceCents:c,priceManaWei:u,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),w=Ut(e)?{...h,options:h.options.filter(S=>S.method==="credits")}:h;if(s&&w.options.some(S=>S.method===s)){if(s==="credits"){ze(e);return}const{spender:S,chainId:F}=et(s,e);await tt(S,F,()=>s==="mana"?void at(e):void st(e,c,u));return}if(w.options.some(S=>S.method==="mana"||S.method==="combined")){j({phase:"choose",lines:e,totalCents:c,manaWei:u}),B(!1);return}if($!=null&&$.credits<d){De(e);return}ze(e)}function Jt(e){return Be({priceCents:e.totalCents,priceManaWei:e.manaWei,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n})}const[Ae,me]=T.useState(null);function et(e,s){const d=Pe(s)[0].trade;return{spender:e==="mana"?ye(wa(d.contract),d.chainId).address:ye(qe.CreditsManager,d.chainId).address,chainId:d.chainId}}async function tt(e,s,d){const c=xs(s,e),u=n?await fs(c,n.address).catch(()=>!0):!0;if(ys(n==null?void 0:n.providerType,u)){B(!1),me({auth:c,run:d});return}d()}function Xt(e){if((g==null?void 0:g.phase)!=="choose")return;const{lines:s,totalCents:d,manaWei:c}=g;if(e==="credits"){ze(s);return}const{spender:u,chainId:h}=et(e,s);tt(u,h,()=>e==="mana"?void at(s):void st(s,d,c))}async function at(e){if(!n||e.length===0)return;const s=we(e),d=s.map(h=>({...h.item,priceCredits:h.priceCredits})),c=e.map(h=>({...h.item,priceCredits:h.priceCredits,quantity:h.quantity})),u=()=>j({phase:"processing",stage:"settling",step:s.length,total:s.length});j({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});try{const h=await hs({trades:Pe(s).map(w=>w.trade),buyer:n.address,signer:n.signer,onSigned:u});e.forEach(w=>l(w.item.id)),G(null),V("Shop Completed Purchase",{...xe(d),payment_type:"mana",transaction_hash:h[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Je(c,h)}catch(h){Xe(h,"buy_cart_mana")}}async function st(e,s,d){if(!n||e.length===0)return;const c=we(e),u=c.map(m=>({...m.item,priceCredits:m.priceCredits})),h=e.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),w=ps(c.map(m=>m.usdCents),($==null?void 0:$.balanceCents)??0),S=w.reduce((m,k)=>m+k,0),F=gs(Math.max(0,s-S),s,d),R=[],q=new Set,y=new Set;j({phase:"processing",stage:"reserving",step:1,total:c.length});try{const m=Pe(c),k=[];for(let f=0;f<m.length;f++){const b=w[f];if(b<=0)continue;j({phase:"processing",stage:"reserving",step:f+1,total:m.length});const Q=m[f].item,{credit:x,maxCreditedValue:p}=await pt(n.identity,b,m[f].trade.id,Q.contractAddress&&Q.itemId!=null?{contractAddress:Q.contractAddress,itemId:String(Q.itemId)}:void 0);R.push({salt:x.id,itemId:Q.id}),k.push({kind:"trade",trade:m[f].trade,credits:[x],maxCreditedValue:p})}m.forEach((f,b)=>{w[b]<=0&&k.push({kind:"trade",trade:f.trade,credits:[],maxCreditedValue:"0"})}),k[0]={...k[0],maxCreditedValue:(BigInt(k[0].maxCreditedValue)+F).toString()},await Vt(n.signer,m[0].trade.chainId);const L=()=>j({phase:"processing",stage:"settling",step:c.length,total:c.length});j({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const N=await _e({purchases:k,buyer:n.address,signer:n.signer,onSigned:L,onBroadcast:({salts:f})=>f.forEach(b=>q.add(b)),onReverted:({salts:f})=>f.forEach(b=>y.add(b))});e.forEach(f=>l(f.item.id)),G(null),V("Shop Completed Purchase",{...xe(u),payment_type:"credits_and_mana",transaction_hash:N[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Je(h,N)}catch(m){const{toRelease:k}=wt({reservations:R,spent:new Set([...q].filter(L=>!y.has(L))),settled:new Set});k.length&&Re(n.identity,k).catch(()=>{}),R.length&&v.invalidateQueries({queryKey:["usd-balance"]}),Xe(m,"buy_cart_combined")}}async function Y(e){if(!n){yt({type:"cart-checkout"}),K();return}const s=H.getState().items.filter(He);if(s.length===0)return;ie(null),ue(null),B(!0);const d=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{cart_size:s.length,cart_value_credits:d,cart_value_usd:ut(d),has_sufficient_credits:pe>=d});try{const c=await Ms(s,n.address,Ht,await Ye(),Ot),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(h=>l(h.id)),ue(Bn(c))),c.buyable.length===0){ie(a("cart.error.noneAvailable")),G(null);return}if(c.orderChanged){G(c),Ne.current=Date.now();return}await Ze(c.buyable,e)}catch(c){ae(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),ie(Fe(c))}finally{B(!1)}}async function nt(){if(_){if(!n){yt({type:"cart-checkout"}),K();return}if(Date.now()-Ne.current>qn){G(null),ue(null),await Y();return}ie(null),Ze(_.buyable)}}async function Yt(){if(Se){try{sessionStorage.setItem(be,JSON.stringify(H.getState().items))}catch{}B(!0);try{const e=await Ts(Se,n?{address:n.address,identity:n.identity}:void 0);if(e.url){window.location.href=e.url;return}X("/credits")}catch(e){try{sessionStorage.removeItem(be)}catch{}ae(e,{flow:"cart_buy_credits"}),j({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{B(!1)}}}const it=T.useRef(!1);T.useEffect(()=>{if(!n||it.current||!cs("cart-checkout"))return;it.current=!0;const e=setTimeout(()=>void Y(),0);return()=>clearTimeout(e)},[n]);const rt=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.resumeCheckout)||rt.current)return;rt.current=!0,oe.current=E.creditsAdded??null;try{const s=sessionStorage.getItem(be);if(s){sessionStorage.removeItem(be);const d=JSON.parse(s);Array.isArray(d)&&d.length&&D(d)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const e=setTimeout(()=>void Y(),0);return()=>clearTimeout(e)},[E==null?void 0:E.resumeCheckout]);const ot=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.startCheckout)||ot.current)return;ot.current=!0,X(".",{replace:!0,state:null});const e=setTimeout(()=>void Y(),0);return()=>clearTimeout(e)},[E==null?void 0:E.startCheckout]);const Z=_t||(g==null?void 0:g.phase)==="processing";return o.length===0&&!g?t.jsx(Ct,{children:t.jsxs(kt,{children:[t.jsxs(jt,{onClick:()=>X(-1),type:"button",children:[t.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),t.jsxs(Hs,{"data-testid":"cart-empty",children:[t.jsx(O,{name:"cart-plus",size:110}),t.jsxs(Os,{children:[t.jsx(Gs,{children:a("cart.empty.title")}),t.jsx(Vs,{children:a("cart.empty.body")})]}),t.jsx(Ds,{to:"/items",children:a("cart.empty.cta")})]})]})}):t.jsxs(Ct,{children:[t.jsxs(kt,{children:[t.jsxs(jt,{onClick:()=>X(-1),type:"button",children:[t.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),t.jsxs(Ns,{children:[t.jsxs(Qs,{children:[t.jsxs(Us,{children:[t.jsx(Js,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:t.jsx(O,{name:"arrow-left"})}),t.jsx(Xs,{children:a("cart.panelTitle",{count:Wt})}),qt?t.jsxs(Ys,{onClick:()=>J(!0),disabled:Z,children:[t.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),t.jsxs(Pt,{children:[t.jsx(Zs,{children:o.map(e=>{const s=Nt.get(e.id),d=s?s.priceCredits:e.priceCredits,c=!!s&&s.priceCredits!==e.priceCredits,u=!e.tokenId,h=e.quantity,w=typeof e.available=="number"&&h>=e.available,S=d*h,F=pa(e),R=!!F&&!!A[F],q=ga(e),y=Ue[e.id],m=!lt(y),k=y==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return t.jsxs(en,{"data-unavailable":m||void 0,children:[t.jsxs(tn,{"data-thumb":!0,children:[q?t.jsx(an,{to:q,state:{item:e,tradeId:e.tradeId},"aria-label":e.name,children:e.thumbnail?t.jsx("img",{src:e.thumbnail,alt:e.name}):null}):e.thumbnail?t.jsx("img",{src:e.thumbnail,alt:e.name}):null,t.jsx(sn,{"data-check":!0,"aria-hidden":!0,children:t.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:t.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t.jsxs(nn,{children:[t.jsxs(rn,{"data-desc":!0,children:[q?t.jsx(cn,{to:q,state:{item:e,tradeId:e.tradeId},title:e.name,children:e.name}):t.jsx(on,{title:e.name,children:e.name}),e.creator?t.jsx(dn,{address:e.creator,linkToProfile:!0}):null,Rt&&u?t.jsxs(vn,{"data-testid":"cart-creator-tag",children:[t.jsx(wn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),t.jsx(ln,{children:m?t.jsxs(t.Fragment,{children:[t.jsxs(fn,{children:[t.jsx(yn,{name:"warning-fill",size:24}),k]}),q?t.jsx(bn,{to:q,state:{item:e,tradeId:e.tradeId},children:a("cart.availability.viewResales")}):null]}):t.jsxs(t.Fragment,{children:[u?t.jsxs(un,{children:[t.jsx($t,{onClick:()=>ge(()=>z(e.id)),disabled:Z||h<=1,"aria-label":a("cart.decreaseQuantity",{name:e.name}),children:t.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:t.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),t.jsx(hn,{children:h}),t.jsx($t,{onClick:()=>ge(()=>P(e.id)),disabled:Z||w,"aria-label":a("cart.increaseQuantity"),children:t.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:t.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,t.jsxs(pn,{children:[t.jsx(gn,{})," ",S,c?t.jsx(mn,{children:e.priceCredits*h}):null]})]})})]}),t.jsxs(xn,{children:[F?t.jsx(Cn,{"data-on":R||void 0,onClick:()=>ne(e),"aria-label":R?a("cart.removeFromFavorites",{name:e.name}):a("cart.addToFavorites",{name:e.name}),title:R?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:t.jsx(O,{name:R?"heart-solid":"heart"})}):null,t.jsx(jn,{onClick:()=>ge(()=>l(e.id)),disabled:Z,"aria-label":a("cart.remove",{name:e.name}),title:a("cart.removeTitle"),children:t.jsx(O,{name:"trash",size:24})})]})]},e.id)})}),t.jsx(kn,{children:t.jsx("button",{className:"link",onClick:()=>ge(W),disabled:Z,children:a("cart.clearCart")})})]})]}),t.jsxs($n,{children:[t.jsx(Sn,{children:a("cart.purchaseSummary")}),t.jsxs(Mn,{children:[t.jsxs(Tn,{children:[t.jsx(In,{children:a("cart.totalItems",{count:Lt})}),t.jsx(zn,{children:t.jsxs(Pn,{children:[t.jsx(An,{})," ",Ge]})})]}),t.jsx(Mt,{options:Ie.options,totalCents:Te,shortfall:Ie.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Ie.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:Z||Oe,onPay:e=>void(_?nt():Y(e)),creditsFallback:{label:Z?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?nt():Y())}}),Oe?t.jsx(ve,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:t.jsx(ve,{className:"muted",children:a("cart.signInHint")}),_?t.jsx(ve,{className:"muted",children:a("cart.priceChanged")}):null,Ke?t.jsx(ve,{className:"muted",children:Ke}):null,t.jsx(En,{message:Bt})]})]})]})]}),Ve.length>0?t.jsx(Rn,{children:t.jsx(ds,{title:a("cart.youMightAlsoLike"),items:Ve})}):null,Ae&&n?t.jsx(ls,{auth:Ae.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:t.jsx("img",{src:us,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:e}=Ae;me(null),e()},onCancel:()=>me(null),onClose:()=>me(null)}):null,g?t.jsx(Fs,{phase:g.phase,balanceCredits:pe,onClose:Gt,stage:g.phase==="processing"?g.stage:void 0,step:g.phase==="processing"?g.step:void 0,total:g.phase==="processing"?g.total:void 0,isSelfCustody:ma(n==null?void 0:n.providerType),signatures:g.phase==="processing"?g.signatures:void 0,options:g.phase==="choose"?Jt(g).options:void 0,onPay:Xt,totalCents:g.phase==="choose"?g.totalCents:void 0,totalManaWei:g.phase==="choose"?g.manaWei:void 0,totalCredits:g.phase==="choose"?We(g.lines):void 0,lines:g.phase==="nofunds"?g.lines:void 0,shortfallCredits:g.phase==="nofunds"?g.shortfall:void 0,packs:le,selectedPack:Se,onSelectPack:Qe,onBuyPacks:()=>void Yt(),message:g.phase==="error"?g.message:void 0,onRetry:()=>void Y()}):null]})}export{Xn as Cart};
|
|
706
|
+
`;function We(o){if(Ps(o))return a("errors.rejected");const l=(o.message??"").toLowerCase();return l.includes("insufficient")?a("cart.error.insufficient",{currency:va.name}):l.includes("no active listing")||l.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Bn=12e4;function _n(o){const l=[];return o.unavailable.length&&l.push(a("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&l.push(a("cart.drop.own",{count:o.own.length})),a("cart.drop.removed",{items:l.join(` ${a("cart.drop.and")} `)})}const Le=o=>o.reduce((l,P)=>l+P.priceCredits*P.quantity,0),we=o=>o.flatMap(l=>Array.from({length:l.quantity},()=>({...l,quantity:1})));function Yn(){ia({title:a("nav.cart"),noindex:!0});const o=H(t=>t.items),l=H(t=>t.remove),P=H(t=>t.increment),z=H(t=>t.decrement),W=H(t=>t.clear),D=H(t=>t.restore),J=H(t=>t.setFittingOpen),A=dt(t=>t.items),ne=dt(t=>t.toggle),{session:n,signIn:K}=ra(),qt=oa(),le=Ss().packs.slice(0,Ms);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Bt=o.some(t=>t.category!=="emote"),{data:$e}=ca({queryKey:["upsell-listings"],queryFn:()=>ja({first:40}),staleTime:6e4}),{data:$}=da(n),v=la(),X=ea(),{state:E}=ta(),[_t,ie]=T.useState(null),[Ne,ue]=T.useState(null),[Ft,B]=T.useState(!1),[_,G]=T.useState(null),Qe=T.useRef(0),[g,j]=T.useState(null),{data:he}=ua(n),{data:re}=ha(!0),[Se,Ue]=T.useState(""),oe=T.useRef(null),He=pa(o),Oe=t=>ut(He[t.id]),Me=o.filter(Oe),Ge=o.length>0&&Me.length===0,Wt=Me.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Lt=o.reduce((t,s)=>t+s.quantity,0),Kt=Me.reduce((t,s)=>t+s.quantity,0),Ve=_?_.liveTotalCredits:Wt,Nt=new Set(o.map(t=>t.id)),De=(($e==null?void 0:$e.items)??[]).filter(t=>!Nt.has(t.id)).slice(0,12),Qt=new Map(_==null?void 0:_.buyable.map(t=>[t.item.id,t])),pe=($==null?void 0:$.credits)??0,Te=Ve*10,Ut=re?lt(Te,re):0n,Ie=_e({priceCents:Te,priceManaWei:Ut,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),Ht=t=>t.some(s=>s.acquisition==="store"),Pe=t=>t.flatMap(s=>s.acquisition==="trade"?[s]:[]),Ot=fa,Gt=t=>ba(t.contractAddress,String(t.itemId));function ge(t){t(),G(null),ue(null),ie(null)}function Vt(){j(null),B(!1)}function Je(t){const s=Le(t),d=Math.max(0,s-pe),c=le.find(u=>u.credits>=d)??le[le.length-1];Ue(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:pe,shortfall:d}),j({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:d}),B(!1)}async function ze(t){if(!n||t.length===0)return;const s=we(t),d=s.map(y=>({...y.item,priceCredits:y.priceCredits})),c=t.map(y=>({...y.item,priceCredits:y.priceCredits,quantity:y.quantity})),u=[];let h="authorize";const w=new Set,S=new Set,F=new Set,R=[];let q=!1;j({phase:"processing",stage:"reserving",step:1,total:s.length});try{const y=[];for(let x=0;x<s.length;x++){const p=s[x];j({phase:"processing",stage:"reserving",step:x+1,total:s.length});try{const M=p.acquisition==="trade"?p.trade.id:void 0,C=p.item.contractAddress&&p.item.itemId!=null?{contractAddress:p.item.contractAddress,itemId:String(p.item.itemId)}:void 0,{credit:U,maxCreditedValue:ee}=await gt(n.identity,p.usdCents,M,C);u.push({salt:U.id,itemId:p.item.id}),y.push(p.acquisition==="store"?{kind:"store",item:{collection:p.item.contractAddress,itemId:String(p.item.itemId),priceWei:p.priceWei},credits:[U],maxCreditedValue:ee,chainId:p.item.chainId}:{kind:"trade",trade:p.trade,credits:[U],maxCreditedValue:ee})}catch(M){if(zs(M)){if(u.length){try{await qe(n.identity,u.map(C=>C.salt))}catch(C){ae(C,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}Je(t);return}throw M}}h="submit";const m=Cs(y).length,k=x=>m>1?{current:x,total:m}:void 0,L=(x,p)=>j({phase:"processing",stage:x,step:s.length,total:s.length,signatures:k(p)}),N=x=>x<m?L("awaiting-signature",x+1):L("settling",m);L("awaiting-signature",1);let f=[];if(xs())try{const x=new Map;f=await js({purchases:y,buyer:n.address,signer:n.signer,onSigned:()=>N(m),onBroadcast:({txHash:C,salts:U})=>{x.set(C,U),U.forEach(ee=>w.add(ee))}});const p=await Promise.allSettled(f.map(C=>ks(C)));p.forEach((C,U)=>{const ee=x.get(f[U])??[];C.status==="fulfilled"?(ee.forEach(Ee=>S.add(Ee)),R.push(f[U])):C.reason instanceof wt||ee.forEach(Ee=>F.add(Ee))});const M=p.flatMap(C=>C.status==="rejected"?[C.reason]:[]);if(M.length&&!M.some(C=>C instanceof wt))throw M[0];q=!0}catch(x){if(!(x instanceof $s)||!wa(n.providerType))throw x;f=await Fe({purchases:y,buyer:n.address,signer:n.signer,onSigned:N,onBroadcast:({salts:p})=>p.forEach(M=>w.add(M)),onSettled:({txHash:p,salts:M})=>{M.forEach(C=>S.add(C)),R.push(p)},onReverted:({salts:p})=>p.forEach(M=>F.add(M))})}else f=await Fe({purchases:y,buyer:n.address,signer:n.signer,onSigned:N,onBroadcast:({salts:x})=>x.forEach(p=>w.add(p)),onSettled:({txHash:x,salts:p})=>{p.forEach(M=>S.add(M)),R.push(x)},onReverted:({salts:x})=>x.forEach(p=>F.add(p))});t.forEach(x=>l(x.item.id)),G(null),V("Shop Completed Purchase",{...xe(d),payment_type:"credits",no_crypto_step:q,transaction_hash:f[0]??null}),vt(v);const b=oe.current;oe.current=null,j(null),B(!1);const Q={items:c,txHash:f[0]??void 0,txHashes:f,settled:!0,...b?{creditsAdded:b}:{}};X("/success",{state:Q,replace:!0})}catch(y){fe(y)||ae(y,{flow:"cart_checkout",step:h,cart_size:t.length});const m=new Set([...w].filter(b=>!F.has(b))),{toRelease:k,boughtItemIds:L}=Ct({reservations:u,spent:m,settled:S}),N=d.filter(b=>L.includes(b.id)),f=d.filter(b=>!L.includes(b.id));if(V(fe(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:h,error_code:mt(y),value_usd:ht(f.reduce((b,Q)=>b+Q.priceCredits,0)),cart_size:s.length,partial:N.length>0}),k.length)try{await qe(n.identity,k)}catch(b){ae(b,{flow:"cart_checkout",step:"release"})}if(v.invalidateQueries({queryKey:["usd-balance"]}),N.length>0){L.forEach(b=>l(b)),G(null),vt(v),V("Shop Completed Purchase",{...xe(N),payment_type:"credits",no_crypto_step:q,transaction_hash:R[0]??null,partial:!0}),j({phase:"error",message:a("cart.error.partiallyBought")}),B(!1);return}j({phase:"error",message:We(y)})}}function Xe(t,s){v.invalidateQueries({queryKey:["usd-balance"]}),v.invalidateQueries({queryKey:["detail-trade"]}),v.invalidateQueries({queryKey:["shop-item"]}),v.invalidateQueries({queryKey:["owned-token"]}),v.invalidateQueries({queryKey:["public-token"]}),v.invalidateQueries({queryKey:["item-resales"]}),v.invalidateQueries({queryKey:["shop-items"]}),v.invalidateQueries({queryKey:["catalog-items"]}),v.invalidateQueries({queryKey:["my-assets"]}),v.invalidateQueries({queryKey:["purchases"]}),v.invalidateQueries({queryKey:["owned-item-count"]}),v.invalidateQueries({queryKey:["overview-listings"]}),v.invalidateQueries({queryKey:["upsell-listings"]});const d=oe.current;oe.current=null,j(null),B(!1);const c={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...d?{creditsAdded:d}:{}};X("/success",{state:c,replace:!0})}function Ye(t,s){fe(t)||ae(t,{flow:s,step:"submit"}),V(fe(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:mt(t)}),j({phase:"error",message:We(t)}),B(!1)}async function Dt(t,s){const d=ye(Be.MANAToken,s),c=ye(Be.CreditsManager,s);await vs({auth:{kind:ws.Allowance,contractAddress:d.address,spenderAddress:c.address,chainId:s},signer:t})}async function Ze(){if(re)return re;try{return await v.fetchQuery({queryKey:["mana-rate",pt.chainId],queryFn:()=>ya(pt.chainId),staleTime:6e4})}catch{return}}async function Jt(t){const s=we(t).reduce((h,w)=>h+w.usdCents,0),c=(he??0n)>0n?await Ze():re,u=c?lt(s,c):0n;return{totalCents:s,manaWei:u}}async function et(t,s){const d=Le(t),{totalCents:c,manaWei:u}=await Jt(t),h=_e({priceCents:c,priceManaWei:u,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),w=Ht(t)?{...h,options:h.options.filter(S=>S.method==="credits")}:h;if(s&&w.options.some(S=>S.method===s)){if(s==="credits"){ze(t);return}const{spender:S,chainId:F}=tt(s,t);await at(S,F,()=>s==="mana"?void st(t):void nt(t,c,u));return}if(w.options.some(S=>S.method==="mana"||S.method==="combined")){j({phase:"choose",lines:t,totalCents:c,manaWei:u}),B(!1);return}if($!=null&&$.credits<d){Je(t);return}ze(t)}function Xt(t){return _e({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n})}const[Ae,me]=T.useState(null);function tt(t,s){const d=Pe(s)[0].trade;return{spender:t==="mana"?ye(Ca(d.contract),d.chainId).address:ye(Be.CreditsManager,d.chainId).address,chainId:d.chainId}}async function at(t,s,d){const c=fs(s,t),u=n?await ys(c,n.address).catch(()=>!0):!0;if(bs(n==null?void 0:n.providerType,u)){B(!1),me({auth:c,run:d});return}d()}function Yt(t){if((g==null?void 0:g.phase)!=="choose")return;const{lines:s,totalCents:d,manaWei:c}=g;if(t==="credits"){ze(s);return}const{spender:u,chainId:h}=tt(t,s);at(u,h,()=>t==="mana"?void st(s):void nt(s,d,c))}async function st(t){if(!n||t.length===0)return;const s=we(t),d=s.map(h=>({...h.item,priceCredits:h.priceCredits})),c=t.map(h=>({...h.item,priceCredits:h.priceCredits,quantity:h.quantity})),u=()=>j({phase:"processing",stage:"settling",step:s.length,total:s.length});j({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});try{const h=await ps({trades:Pe(s).map(w=>w.trade),buyer:n.address,signer:n.signer,onSigned:u});t.forEach(w=>l(w.item.id)),G(null),V("Shop Completed Purchase",{...xe(d),payment_type:"mana",transaction_hash:h[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Xe(c,h)}catch(h){Ye(h,"buy_cart_mana")}}async function nt(t,s,d){if(!n||t.length===0)return;const c=we(t),u=c.map(m=>({...m.item,priceCredits:m.priceCredits})),h=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),w=gs(c.map(m=>m.usdCents),($==null?void 0:$.balanceCents)??0),S=w.reduce((m,k)=>m+k,0),F=ms(Math.max(0,s-S),s,d),R=[],q=new Set,y=new Set;j({phase:"processing",stage:"reserving",step:1,total:c.length});try{const m=Pe(c),k=[];for(let f=0;f<m.length;f++){const b=w[f];if(b<=0)continue;j({phase:"processing",stage:"reserving",step:f+1,total:m.length});const Q=m[f].item,{credit:x,maxCreditedValue:p}=await gt(n.identity,b,m[f].trade.id,Q.contractAddress&&Q.itemId!=null?{contractAddress:Q.contractAddress,itemId:String(Q.itemId)}:void 0);R.push({salt:x.id,itemId:Q.id}),k.push({kind:"trade",trade:m[f].trade,credits:[x],maxCreditedValue:p})}m.forEach((f,b)=>{w[b]<=0&&k.push({kind:"trade",trade:f.trade,credits:[],maxCreditedValue:"0"})}),k[0]={...k[0],maxCreditedValue:(BigInt(k[0].maxCreditedValue)+F).toString()},await Dt(n.signer,m[0].trade.chainId);const L=()=>j({phase:"processing",stage:"settling",step:c.length,total:c.length});j({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const N=await Fe({purchases:k,buyer:n.address,signer:n.signer,onSigned:L,onBroadcast:({salts:f})=>f.forEach(b=>q.add(b)),onReverted:({salts:f})=>f.forEach(b=>y.add(b))});t.forEach(f=>l(f.item.id)),G(null),V("Shop Completed Purchase",{...xe(u),payment_type:"credits_and_mana",transaction_hash:N[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Xe(h,N)}catch(m){const{toRelease:k}=Ct({reservations:R,spent:new Set([...q].filter(L=>!y.has(L))),settled:new Set});k.length&&qe(n.identity,k).catch(()=>{}),R.length&&v.invalidateQueries({queryKey:["usd-balance"]}),Ye(m,"buy_cart_combined")}}async function Y(t){if(!n){bt({type:"cart-checkout"}),K();return}const s=H.getState().items.filter(Oe);if(s.length===0)return;ie(null),ue(null),B(!0);const d=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{cart_size:s.length,cart_value_credits:d,cart_value_usd:ht(d),has_sufficient_credits:pe>=d});try{const c=await Ts(s,n.address,Ot,await Ze(),Gt),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(h=>l(h.id)),ue(_n(c))),c.buyable.length===0){ie(a("cart.error.noneAvailable")),G(null);return}if(c.orderChanged){G(c),Qe.current=Date.now();return}await et(c.buyable,t)}catch(c){ae(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),ie(We(c))}finally{B(!1)}}async function it(){if(_){if(!n){bt({type:"cart-checkout"}),K();return}if(Date.now()-Qe.current>Bn){G(null),ue(null),await Y();return}ie(null),et(_.buyable)}}async function Zt(){if(Se){try{sessionStorage.setItem(be,JSON.stringify(H.getState().items))}catch{}B(!0);try{const t=await Is(Se,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}X("/credits")}catch(t){try{sessionStorage.removeItem(be)}catch{}ae(t,{flow:"cart_buy_credits"}),j({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{B(!1)}}}const rt=T.useRef(!1);T.useEffect(()=>{if(!n||rt.current||!ds("cart-checkout"))return;rt.current=!0;const t=setTimeout(()=>void Y(),0);return()=>clearTimeout(t)},[n]);const ot=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.resumeCheckout)||ot.current)return;ot.current=!0,oe.current=E.creditsAdded??null;try{const s=sessionStorage.getItem(be);if(s){sessionStorage.removeItem(be);const d=JSON.parse(s);Array.isArray(d)&&d.length&&D(d)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Y(),0);return()=>clearTimeout(t)},[E==null?void 0:E.resumeCheckout]);const ct=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.startCheckout)||ct.current)return;ct.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Y(),0);return()=>clearTimeout(t)},[E==null?void 0:E.startCheckout]);const Z=Ft||(g==null?void 0:g.phase)==="processing";return o.length===0&&!g?e.jsx(jt,{children:e.jsxs($t,{children:[e.jsxs(kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Os,{"data-testid":"cart-empty",children:[e.jsx(O,{name:"cart-plus",size:110}),e.jsxs(Gs,{children:[e.jsx(Vs,{children:a("cart.empty.title")}),e.jsx(Ds,{children:a("cart.empty.body")})]}),e.jsx(Js,{to:"/items",children:a("cart.empty.cta")})]})]})}):e.jsxs(jt,{children:[e.jsxs($t,{children:[e.jsxs(kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Qs,{children:[e.jsxs(Us,{children:[e.jsxs(Hs,{children:[e.jsx(Xs,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(O,{name:"arrow-left"})}),e.jsx(Ys,{children:a("cart.panelTitle",{count:Lt})}),Bt?e.jsxs(Zs,{onClick:()=>J(!0),disabled:Z,children:[e.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(zt,{children:[e.jsx(en,{children:o.map(t=>{const s=Qt.get(t.id),d=s?s.priceCredits:t.priceCredits,c=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,h=t.quantity,w=typeof t.available=="number"&&h>=t.available,S=d*h,F=ga(t),R=!!F&&!!A[F],q=ma(t),y=He[t.id],m=!ut(y),k=y==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(tn,{"data-unavailable":m||void 0,children:[e.jsxs(an,{"data-thumb":!0,children:[q?e.jsx(sn,{to:q,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(nn,{"data-check":!0,"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(rn,{children:[e.jsxs(on,{"data-desc":!0,children:[q?e.jsx(dn,{to:q,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(cn,{title:t.name,children:t.name}),t.creator?e.jsx(ln,{address:t.creator,linkToProfile:!0}):null,qt&&u?e.jsxs(wn,{"data-testid":"cart-creator-tag",children:[e.jsx(Cn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(un,{children:m?e.jsxs(e.Fragment,{children:[e.jsxs(yn,{children:[e.jsx(bn,{name:"warning-fill",size:24}),k]}),q?e.jsx(vn,{to:q,state:{item:t,tradeId:t.tradeId},children:a("cart.availability.viewResales")}):null]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(hn,{children:[e.jsx(St,{onClick:()=>ge(()=>z(t.id)),disabled:Z||h<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(pn,{children:h}),e.jsx(St,{onClick:()=>ge(()=>P(t.id)),disabled:Z||w,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs(gn,{children:[e.jsx(mn,{})," ",S,c?e.jsx(xn,{children:t.priceCredits*h}):null]})]})})]}),e.jsxs(fn,{children:[F?e.jsx(jn,{"data-on":R||void 0,onClick:()=>ne(t),"aria-label":R?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:R?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(O,{name:R?"heart-solid":"heart"})}):null,e.jsx(kn,{onClick:()=>ge(()=>l(t.id)),disabled:Z,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(O,{name:"trash",size:24})})]})]},t.id)})}),e.jsx($n,{children:e.jsx("button",{className:"link",onClick:()=>ge(W),disabled:Z,children:a("cart.clearCart")})})]})]}),e.jsxs(Sn,{children:[e.jsx(Mn,{children:a("cart.purchaseSummary")}),e.jsxs(Tn,{children:[e.jsxs(In,{children:[e.jsx(Pn,{children:a("cart.totalItems",{count:Kt})}),e.jsx(An,{children:e.jsxs(zn,{children:[e.jsx(En,{})," ",Ve]})})]}),e.jsx(Tt,{options:Ie.options,totalCents:Te,shortfall:Ie.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Ie.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:Z||Ge,onPay:t=>void(_?it():Y(t)),creditsFallback:{label:Z?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?it():Y())}}),Ge?e.jsx(ve,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(ve,{className:"muted",children:a("cart.signInHint")}),_?e.jsx(ve,{className:"muted",children:a("cart.priceChanged")}):null,Ne?e.jsx(ve,{className:"muted",children:Ne}):null,e.jsx(Rn,{message:_t})]})]})]})]}),De.length>0?e.jsx(qn,{children:e.jsx(ls,{title:a("cart.youMightAlsoLike"),items:De})}):null,Ae&&n?e.jsx(us,{auth:Ae.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:hs,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=Ae;me(null),t()},onCancel:()=>me(null),onClose:()=>me(null)}):null,g?e.jsx(Ws,{phase:g.phase,balanceCredits:pe,onClose:Vt,stage:g.phase==="processing"?g.stage:void 0,step:g.phase==="processing"?g.step:void 0,total:g.phase==="processing"?g.total:void 0,isSelfCustody:xa(n==null?void 0:n.providerType),signatures:g.phase==="processing"?g.signatures:void 0,options:g.phase==="choose"?Xt(g).options:void 0,onPay:Yt,totalCents:g.phase==="choose"?g.totalCents:void 0,totalManaWei:g.phase==="choose"?g.manaWei:void 0,totalCredits:g.phase==="choose"?Le(g.lines):void 0,lines:g.phase==="nofunds"?g.lines:void 0,shortfallCredits:g.phase==="nofunds"?g.shortfall:void 0,packs:le,selectedPack:Se,onSelectPack:Ue,onBuyPacks:()=>void Zt(),message:g.phase==="error"?g.message:void 0,onRetry:()=>void Y()}):null]})}export{Yn as Cart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ai as N,aj as w,ak as o,al as n,K as D,w as M}from"./index-
|
|
1
|
+
import{ai as N,aj as w,ak as o,al as n,K as D,w as M}from"./index-DKmNfx_r.js";import{r as U,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-JtDkvCU0.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as m,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,
|
|
1
|
+
import{j as e,r as m,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,bt as ee,a1 as te,D as T,bu as ae,bv as oe,I as ie,b as a,c as re,F as se,v as ne,x as ce,C as le,ap as z,aq as de,bw as pe,bx as xe}from"./index-DKmNfx_r.js";import{E as he}from"./ErrorNotice-C4BJGNNo.js";import{d as me,P as ge,C as ue,a as be,b as fe}from"./collectionPage.styles-Cqyo5Y5r.js";import{u as ve,S as W,a as ye,F as je,c as Ce,P as we,d as $e,H as ke,e as Ne}from"./categories-J-FmFlxx.js";import{L as Se}from"./LoadMore-D2_5Y95Q.js";import{u as Pe}from"./useInfiniteGrid-pnTLFPAY.js";import{G as Ae}from"./grid.styles-CIbPxjYz.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-DylVN6-9.js";const Me=s.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|