@dcl/shop 1.0.1 → 1.0.2-31053112537.commit-2eeb02b

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.
Files changed (175) hide show
  1. package/_assets/{Activity-CYc4haGG.js → Activity-CT4EXTT1.js} +3 -3
  2. package/_assets/{AnimatedBackground-DEshz0c2.js → AnimatedBackground-wyzu1j63.js} +2 -2
  3. package/_assets/{Assets-D5sxwFuc.js → Assets-DFjWkvAj.js} +2 -2
  4. package/_assets/{Assets.styles-c5XuGAG4.js → Assets.styles-De3LV6PK.js} +1 -1
  5. package/_assets/{Authorizations-m488Gyk0.js → Authorizations-Erxm3Fyz.js} +1 -1
  6. package/_assets/Cart-DJkaXf-4.js +706 -0
  7. package/_assets/{CircularProgress-CB7Frwx7.js → CircularProgress-CdQvdQq6.js} +1 -1
  8. package/_assets/{Collection-CS-PKjRf.js → Collection-CJV4xLye.js} +1 -1
  9. package/_assets/{CollectionCarousel-DhrBSU2o.js → CollectionCarousel-CvMsq3XH.js} +2 -2
  10. package/_assets/{Confetti-z9mEz7Mo.js → Confetti-BH2iBIUi.js} +1 -1
  11. package/_assets/{Creator-BMYJiMCB.js → Creator-Cyy5FpL2.js} +1 -1
  12. package/_assets/{ErrorNotice-BG4CBNkl.js → ErrorNotice-h0GUcJEu.js} +1 -1
  13. package/_assets/{ExchangeController-CLyfn8FH.js → ExchangeController-B3cP_vUc.js} +1 -1
  14. package/_assets/{Faq-D7gV7iYA.js → Faq-CKehqHI0.js} +1 -1
  15. package/_assets/{GetCredits-CL7K_M9H.js → GetCredits-DdkULwKp.js} +1 -1
  16. package/_assets/{Grow-Ccwk3GHr.js → Grow-BV4Iorxj.js} +1 -1
  17. package/_assets/{HelpersUtil-tyC-vTbQ.js → HelpersUtil-CU-9vHU7.js} +1 -1
  18. package/_assets/{ItemDetail-DwY7HKZL.js → ItemDetail-BAqZB6Be.js} +1 -1
  19. package/_assets/LazyEmoteControls-Dsz7X5iX.js +2 -0
  20. package/_assets/{LoadMore-BLHzgyNQ.js → LoadMore-D4fnHonl.js} +1 -1
  21. package/_assets/{ManaPricingBanner.styles-G4jy5obg.js → ManaPricingBanner.styles-YVCL83wQ.js} +1 -1
  22. package/_assets/{MyAssets-BpBrCfKj.js → MyAssets-DeZdrOao.js} +1 -1
  23. package/_assets/{MyFavorites-eakG4vL0.js → MyFavorites-Jhmw64Z-.js} +1 -1
  24. package/_assets/{NotFound-By_5zIVf.js → NotFound-BV0gWDmk.js} +1 -1
  25. package/_assets/{NotificationsBell-DVM7TZeA.js → NotificationsBell-CbzYe18m.js} +1 -1
  26. package/_assets/{OutfitDetail-CKImDsVr.js → OutfitDetail-mnH36Arv.js} +1 -1
  27. package/_assets/{OutfitPreview-BDsx1Zln.js → OutfitPreview-DEQlnmtN.js} +1 -1
  28. package/_assets/{OutfitStudio-BNP0n5pI.js → OutfitStudio-DlMQxDuE.js} +1 -1
  29. package/_assets/{StoreSettings-CMOSmEWV.js → StoreSettings-DXQD9Iiv.js} +1 -1
  30. package/_assets/{Success-DKTCAGfP.js → Success-Duo1gCiQ.js} +1 -1
  31. package/_assets/{SwapController-B6jVCCgh.js → SwapController-CJtBte7L.js} +1 -1
  32. package/_assets/{Tooltip-CnjWof_H.js → Tooltip-H89dNdoQ.js} +1 -1
  33. package/_assets/{TradeService-DqBS7JER.js → TradeService-BcEoCIV7.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-BNh7T9LS.js → W3MFrameProviderSingleton-CZuJfgAC.js} +3 -3
  35. package/_assets/{WebCryptoP256-DVUZQ3fN.js → WebCryptoP256-BQ90tDtY.js} +1 -1
  36. package/_assets/{authorizations-CE0HtqU4.js → authorizations-GLPsQqiP.js} +1 -1
  37. package/_assets/{basic-sWTPOMIW.js → basic-kk_TRFwe.js} +1 -1
  38. package/_assets/{biconomy-Gn8OlgoU.js → biconomy-D-XcBmzY.js} +1 -1
  39. package/_assets/{builder-DeMyTCI7.js → builder-Dn0-qNG1.js} +1 -1
  40. package/_assets/{buy-BF3MKHeK.js → buy-C36PZNHt.js} +1 -1
  41. package/_assets/{buy-gasless-C6Uiz2ft.js → buy-gasless-cVGUwJcn.js} +1 -1
  42. package/_assets/{categories-e7ryjlpc.js → categories-l2OqZN_F.js} +42 -33
  43. package/_assets/{ccip-C8QxGeVJ.js → ccip-BkPpUcVC.js} +1 -1
  44. package/_assets/{ccip-BGow4NM2.js → ccip-DTvzkPzd.js} +1 -1
  45. package/_assets/{collectionPage.styles-DGJTp7Uw.js → collectionPage.styles-BP7gMOku.js} +5 -5
  46. package/_assets/{controller-Ct0gOkSO.js → controller-Cm3hwM7G.js} +2 -2
  47. package/_assets/{core-BPejI2Uv.js → core-DtQ_ZTXW.js} +4 -4
  48. package/_assets/{createSvgIcon-CfV25Qvu.js → createSvgIcon-DTfKYyFY.js} +1 -1
  49. package/_assets/{custom-CtkIvR1q.js → custom-dDX_uBau.js} +1 -1
  50. package/_assets/{data-capture-ChzQjncq.js → data-capture-BHgEiKBs.js} +1 -1
  51. package/_assets/{email-DTmn4SUk.js → email-D-4NGs1z.js} +1 -1
  52. package/_assets/{embedded-wallet-zOEVMj8r.js → embedded-wallet-BQg7nplX.js} +1 -1
  53. package/_assets/{emotion-styled.browser.esm-ftlGzXhy.js → emotion-styled.browser.esm-DKFf4xqI.js} +1 -1
  54. package/_assets/{engine-C84VS8MU.js → engine-9w9_00su.js} +1 -1
  55. package/_assets/{errors-jURSB57c.js → errors-DAy3n3Fl.js} +1 -1
  56. package/_assets/{estimate-l1-fee-BK9aiTEg.js → estimate-l1-fee-CMUFNeJj.js} +1 -1
  57. package/_assets/{execute-BJdfX8go.js → execute-DmyMuEbq.js} +2 -2
  58. package/_assets/{features-CEPVrrJh.js → features-dYRaytuv.js} +1 -1
  59. package/_assets/{fetchTokenMetadata-Cg8LhGF6.js → fetchTokenMetadata-B7vrevS4.js} +2 -2
  60. package/_assets/{field.styles-BO_2AHCA.js → field.styles-DxW4rsbZ.js} +1 -1
  61. package/_assets/{get-ecosystem-wallet-info-DN7GFeAM.js → get-ecosystem-wallet-info-D-zi5D-3.js} +1 -1
  62. package/_assets/{getBalance-CCluSQca.js → getBalance-03ROSZOz.js} +1 -1
  63. package/_assets/{getNFT-B3tNxOax.js → getNFT-BZ5HS1py.js} +1 -1
  64. package/_assets/{getNFT-C7PC0iJF.js → getNFT-CGrmS4cn.js} +1 -1
  65. package/_assets/{grid.styles-DRngdZfp.js → grid.styles-VdW_5pS8.js} +1 -1
  66. package/_assets/{hashTypedData-ulq3qXHW.js → hashTypedData-D0grmu7Q.js} +1 -1
  67. package/_assets/{hashTypedData-BPxQrISG.js → hashTypedData-DWrpUT7F.js} +1 -1
  68. package/_assets/{in-app-C_sI0Q7l.js → in-app-Fd-r2Pt9.js} +1 -1
  69. package/_assets/{in-app-wallet-calls-ozqkkU0m.js → in-app-wallet-calls-US6STGvk.js} +1 -1
  70. package/_assets/{index-DmouEX3z.js → index-0ctogS4p.js} +1 -1
  71. package/_assets/{index-DmYn7FTm.js → index-3M7Oc88-.js} +1 -1
  72. package/_assets/{index-B4Sh4DUY.js → index-9wBxZvS3.js} +1 -1
  73. package/_assets/{index-D_qvzN-5.js → index-B4OCkrkj.js} +1 -1
  74. package/_assets/{index-C7gyW2pC.js → index-BGWFa_3t.js} +1 -1
  75. package/_assets/{index-DNUmp9qJ.js → index-BLhzIl8l.js} +2 -2
  76. package/_assets/{index-C6jWze3p.js → index-BOqWivx2.js} +1 -1
  77. package/_assets/{index-B4VWghxR.js → index-BXAhg_WL.js} +1 -1
  78. package/_assets/{index-B4ldzGrT.js → index-BfrU5ARr.js} +1 -1
  79. package/_assets/{index-BwpU8az-.js → index-Bw5aGSBt.js} +3 -3
  80. package/_assets/{index-C21U9leN.js → index-C6snVc74.js} +2 -2
  81. package/_assets/{index-B8hnFmS-.js → index-C9g5jnkn.js} +3 -3
  82. package/_assets/{index-BCqRbjcA.js → index-C9qZGyVn.js} +1 -1
  83. package/_assets/{index-BsAc5Nb_.js → index-CBa9KvFL.js} +1 -1
  84. package/_assets/{index-B2h0kzTR.js → index-CHrjSjdy.js} +30 -27
  85. package/_assets/{index-CFj3lX4u.js → index-CTFDcqvg.js} +1 -1
  86. package/_assets/{index-B-0HDufu.js → index-CUnVy-2F.js} +1 -1
  87. package/_assets/{index-DPJNY0Ni.js → index-CYelE7gc.js} +1 -1
  88. package/_assets/{index-DUeFbNWb.js → index-Cji3FYAQ.js} +1 -1
  89. package/_assets/{index-BZo86GEs.js → index-Ck66rPGl.js} +1 -1
  90. package/_assets/{index-BpBLqmY7.js → index-CpgH80QO.js} +307 -307
  91. package/_assets/{index-Ce2J3RrX.js → index-Csv3ZE7U.js} +1 -1
  92. package/_assets/{index-sAHvnz2N.js → index-CvEQ-uxw.js} +1 -1
  93. package/_assets/{index-2bLJt5nu.js → index-CzuJbwKM.js} +1 -1
  94. package/_assets/{index-B1yZmsbg.js → index-D-lui3ze.js} +1 -1
  95. package/_assets/{index-0wuiFD-D.js → index-D6hB217e.js} +1 -1
  96. package/_assets/{index-yJr5AHy6.js → index-D90sT5TF.js} +1 -1
  97. package/_assets/{index-C8N5dIBi.js → index-DCty_Nzt.js} +1 -1
  98. package/_assets/{index-DrdjzH9k.js → index-DGVpcWzu.js} +1 -1
  99. package/_assets/{index-DEpHjDox.js → index-DIEYvaFA.js} +1 -1
  100. package/_assets/{index-YX6Ay2YX.js → index-DM21W4eU.js} +1 -1
  101. package/_assets/{index-DisgA_Kp.js → index-DMqWpF7F.js} +1 -1
  102. package/_assets/{index-C1ABS6aZ.js → index-DR22dJ1f.js} +1 -1
  103. package/_assets/{index-BCbVNwA6.js → index-DXEO_tM8.js} +1 -1
  104. package/_assets/{index-B41s2t0I.js → index-DZE8IM2d.js} +1 -1
  105. package/_assets/{index-BqQA-htt.js → index-D_RGYDYj.js} +1 -1
  106. package/_assets/{index-BwT65Ui0.js → index-Dctqjcot.js} +1 -1
  107. package/_assets/{index-aOhbQl_e.js → index-Desa5DLU.js} +1 -1
  108. package/_assets/{index-js8gBwwu.js → index-DlOXAhkq.js} +1 -1
  109. package/_assets/{index-Bk3FocQt.js → index-DmohqnOc.js} +1 -1
  110. package/_assets/{index-D3CBiscc.js → index-DpfgsZS7.js} +2 -2
  111. package/_assets/{index-G_9AGT2d.js → index-E6MYA_qz.js} +1 -1
  112. package/_assets/{index-Ca2t9jnc.js → index-GGunchuI.js} +1 -1
  113. package/_assets/{index-BQAoWWgI.js → index-WGFd54XN.js} +1 -1
  114. package/_assets/{index-CPVal8wI.js → index-Y3vrFRTZ.js} +1 -1
  115. package/_assets/{index-BG93ruhj.js → index-YtrNc4_U.js} +1 -1
  116. package/_assets/{index-Bfbo1-y3.js → index-_VGZGU-r.js} +3 -3
  117. package/_assets/{index-BQbGdQCn.js → index-b59UUC3O.js} +1 -1
  118. package/_assets/{index-D7sH_woo.js → index-mHYk9Ana.js} +1 -1
  119. package/_assets/{index-BLtmHnvk.js → index-ojnKZ8lo.js} +1 -1
  120. package/_assets/{index-DPh8zvp5.js → index-prmd5qIM.js} +1 -1
  121. package/_assets/{index-Cutc7nXs.js → index-vO2jCoJA.js} +1 -1
  122. package/_assets/{index.es-CAm13D3S.js → index.es-CM-7pdUr.js} +1 -1
  123. package/_assets/{index.es-_sMtTPSc.js → index.es-C_PIRdls.js} +4 -4
  124. package/_assets/{index.es-nXwNgZDa.js → index.es-iNKw5JYV.js} +1 -1
  125. package/_assets/{localBatchGatewayRequest-DldZ90JU.js → localBatchGatewayRequest-CvrWva1S.js} +1 -1
  126. package/_assets/{networks-A_3lFdbQ.js → networks-DxxML95J.js} +1 -1
  127. package/_assets/{onramp-uIn5Hze6.js → onramp-DlmUl4wC.js} +1 -1
  128. package/_assets/{openzeppelin-K0lueS2f.js → openzeppelin-oRjzN4zB.js} +1 -1
  129. package/_assets/{parseNft-B8gQqMLe.js → parseNft-B1VtTOpw.js} +2 -2
  130. package/_assets/{parseSignature-eP7njmVY.js → parseSignature-CiDHU6Nz.js} +1 -1
  131. package/_assets/{parseSignature-DzYQN9v3.js → parseSignature-D_U2MhSK.js} +3 -3
  132. package/_assets/{passkeys-CdjlkSrV.js → passkeys-C4nRLQjw.js} +1 -1
  133. package/_assets/{pay-with-exchange-2kPfthhA.js → pay-with-exchange-DjjSaX9l.js} +1 -1
  134. package/_assets/{qr-overlay-lH0GRusa.js → qr-overlay-D6ySLpj4.js} +1 -1
  135. package/_assets/{receive-D9VTDtK7.js → receive-BmTDhzFh.js} +1 -1
  136. package/_assets/{resolveImplementation-BBpjC548.js → resolveImplementation-C8betaeH.js} +1 -1
  137. package/_assets/{rpc-QKrpJtdm.js → rpc-BIRrsCrS.js} +1 -1
  138. package/_assets/{secp256k1-CYkRl_Jj.js → secp256k1-BKrO94JQ.js} +1 -1
  139. package/_assets/{secp256k1-DhRlT0ib.js → secp256k1-BKzdJAUQ.js} +1 -1
  140. package/_assets/{secp256k1-BC1FlI33.js → secp256k1-ChWI25jO.js} +1 -1
  141. package/_assets/{send-BR0llNO1.js → send-DkppUNQD.js} +1 -1
  142. package/_assets/{send-batch-transaction-BCKT8nBl.js → send-batch-transaction-BT57-cdv.js} +1 -1
  143. package/_assets/{send-eip712-transaction-DJ0zmOUy.js → send-eip712-transaction-DzyYzWbO.js} +2 -2
  144. package/_assets/{send-gasless-transaction-BjdM8j2X.js → send-gasless-transaction-CEY__cC5.js} +2 -2
  145. package/_assets/{send-transaction-C8RVBMn9.js → send-transaction-BUcSoRKJ.js} +2 -2
  146. package/_assets/{sendMetaTransaction-CcYdCbY-.js → sendMetaTransaction-ZsFc6TYS.js} +1 -1
  147. package/_assets/{sendRawTransaction-daS8Cqba.js → sendRawTransaction-RwVbISDi.js} +3 -3
  148. package/_assets/{serializeTransaction-hW8PYHkl.js → serializeTransaction-D7Ih8-j7.js} +1 -1
  149. package/_assets/{session-proposal-CqH6oHj9.js → session-proposal-BDnKkUie.js} +1 -1
  150. package/_assets/{session-request-BWv_wt41.js → session-request-maNMGkDh.js} +2 -2
  151. package/_assets/{signing-BqfCVU3I.js → signing-O4ufWRe8.js} +3 -3
  152. package/_assets/{skeleton.styles-DagyoT5y.js → skeleton.styles-B5G3DoRu.js} +1 -1
  153. package/_assets/{socials-D4goIlBt.js → socials-DgrJfl24.js} +1 -1
  154. package/_assets/{styled-CoVCpn99.js → styled-CzuG2SF7.js} +1 -1
  155. package/_assets/{swaps-GJ4U9DHL.js → swaps-CEuJEeBK.js} +1 -1
  156. package/_assets/{thirdweb-F_-Px602.js → thirdweb-CWMxyfTR.js} +3 -3
  157. package/_assets/{to-serializable-transaction-BkPY6iHK.js → to-serializable-transaction-eILRk2uK.js} +2 -2
  158. package/_assets/{transactionReceipt-iJ97NYxd.js → transactionReceipt-YxHkhYmR.js} +1 -1
  159. package/_assets/{transactions-Cl8fRRc0.js → transactions-DFikge11.js} +1 -1
  160. package/_assets/{useCreditPacks-Dsfos9wm.js → useCreditPacks-CPiiIVbF.js} +1 -1
  161. package/_assets/{useImportable-Bn9l5AUn.js → useImportable-BhPYUErM.js} +1 -1
  162. package/_assets/{useInfiniteGrid-VPnx9W8Q.js → useInfiniteGrid-DmIgZTT1.js} +1 -1
  163. package/_assets/{useTheme-D2_ZQh6-.js → useTheme-DnWPXYyn.js} +1 -1
  164. package/_assets/{verifyHash-DlqrxU4F.js → verifyHash-BCo8j0IO.js} +1 -1
  165. package/_assets/{w3m-modal-DRnBD4CD.js → w3m-modal-D7JdGvOC.js} +1 -1
  166. package/_assets/{w3m-modal-BTAbPei6.js → w3m-modal-Dyp8brdF.js} +1 -1
  167. package/_assets/{wait-for-tx-receipt-CETDDyPM.js → wait-for-tx-receipt-ITlfousv.js} +1 -1
  168. package/_assets/{wallets-91m5q0QW.js → wallets-DoMl3uKp.js} +5 -5
  169. package/_assets/{web-connector-qXgR2Q4O.js → web-connector-uCJIkgMa.js} +3 -3
  170. package/_assets/{writeContract-IIDoxAya.js → writeContract-DMg_Cu_T.js} +1 -1
  171. package/_assets/{zoraTestnet-ev6ZVcwL.js → zoraTestnet-CzhulMA0.js} +1 -1
  172. package/index.html +11 -11
  173. package/package.json +2 -2
  174. package/_assets/Cart-Ctyse8xg.js +0 -707
  175. package/_assets/LazyEmoteControls-BNHGzPTO.js +0 -2
@@ -1,707 +0,0 @@
1
- import{j as t,L as ke,r as M,b as ea,a as ta}from"./react-BYHuwl8r.js";import{t as de,s as i,b as a,L as ce,bd as aa,J as sa,I as O,z as St,K as Le,x as na,Y as H,ao as ct,o as ia,q as ra,v as oa,be as ca,A as da,bf as la,ap as ua,bg as ha,bh as dt,bi as pa,bj as ga,y as ma,bk as lt,$ as V,bl as ut,bm as xa,F as ae,r as fa,c as ht,bn as ya,C as ba,bo as pt,bp as Re,bq as va,br as xe,bs as fe,bt as gt,g as ye,f as wa,h as qe,bu as Ca}from"./index-BpBLqmY7.js";import{M as ja,S as ka,C as $a,H as Sa,a as Ta,T as Ma,X as Ia,b as Pa,B as za,c as Aa,d as mt,e as Ea,f as Ce,P as Tt,m as Ra,g as qa,h as Ba,i as _a,j as Mt,k as je,L as Fa,l as Wa,n as xt,o as ft,W as La,p as Ka,q as Na,A as Ua,r as Qa,s as Ha,t as Oa,u as Ga,v as Va,w as Da,x as Ya,y as Ja,z as Xa,D as Za,E as es,F as ts,G as as,I as ss,J as ns,K as is,N as Be,O as rs,Q as os,R as cs,U as ds,V as yt,Y as bt,Z as ls,_ as us,$ as hs}from"./CollectionCarousel-DhrBSU2o.js";import{k as ps,l as gs,a as ms,n as xs,f as fs,A as ys}from"./authorizations-CE0HtqU4.js";import{g as bs,j as _e}from"./buy-BF3MKHeK.js";import{b as vs,w as ws,S as vt,G as Cs}from"./buy-gasless-C6Uiz2ft.js";import{u as js,M as ks,R as be,r as $s,c as Ss,p as wt}from"./useCreditPacks-Dsfos9wm.js";import{i as Ts,a as Ms}from"./errors-jURSB57c.js";import{E as Is}from"./ErrorNotice-BG4CBNkl.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CcYdCbY-.js";const{colors:se,radius:Ps}=de,zs=i.div`
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
- gap: 8px;
6
- width: 100%;
7
- `,As=i.span`
8
- font-size: 16px;
9
- line-height: 22px;
10
- color: ${se.text2};
11
- text-transform: capitalize;
12
- white-space: nowrap;
13
- `,Es=i.div`
14
- display: flex;
15
- flex-direction: column;
16
- gap: 8px;
17
- /* The list is the modal's elastic region: inside a viewport-capped card it gives up height first, so
18
- the pack picker, total and Cancel/Buy below it stay on screen without scrolling. The floor is an
19
- explicit ~one row because a scroll container's automatic minimum size is zero — it would otherwise
20
- collapse to nothing on a short screen. */
21
- min-height: 120px;
22
- max-height: 360px;
23
- overflow-y: auto;
24
- width: 100%;
25
- scrollbar-width: thin;
26
- scrollbar-color: #a2a2a2 ${se.media};
27
-
28
- &::-webkit-scrollbar {
29
- width: 8px;
30
- }
31
- &::-webkit-scrollbar-track {
32
- background: ${se.media};
33
- border-radius: 10px;
34
- }
35
- &::-webkit-scrollbar-thumb {
36
- background: #a2a2a2;
37
- border-radius: ${Ps.btn};
38
- }
39
- `,Rs=i.span`
40
- margin-left: 8px;
41
- font-size: 13px;
42
- font-weight: 600;
43
- color: ${se.muted};
44
- `,qs=i.div`
45
- display: flex;
46
- align-items: center;
47
- justify-content: space-between;
48
- gap: 12px;
49
- padding: 0 0 12px;
50
- font-size: 14px;
51
- color: ${se.muted};
52
-
53
- & strong {
54
- display: inline-flex;
55
- align-items: center;
56
- gap: 6px;
57
- font-size: 20px;
58
- font-weight: 700;
59
- color: ${se.text};
60
- }
61
- `,Bs="https://cdn.decentraland.org/@dcl/shop/1.0.1/_assets/buy-error-22UunaPC.png";function _s(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"),Y=l==="processing";return t.jsxs(ja,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[t.jsx(ka,{onClick:W?void 0:z,"aria-hidden":!0}),t.jsxs($a,{"data-tall":Y||void 0,children:[t.jsxs(Sa,{children:[t.jsxs(Ta,{children:[t.jsx(Ma,{children:D}),!W&&t.jsx(Ia,{onClick:z,"aria-label":a("buyModal.close"),children:t.jsx(Pa,{})})]}),t.jsxs(za,{children:[t.jsx(Aa,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),t.jsx(mt,{}),t.jsx(Ea,{children:ce(P)})]})]}),l==="choose"&&t.jsxs(Ce,{children:[t.jsxs(qs,{children:[t.jsx("span",{children:a("cart.purchaseSummary")}),t.jsxs("strong",{children:[t.jsx(mt,{}),ce(o.totalCredits??0)]})]}),t.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Ra(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&t.jsx(Fs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&t.jsx(Ws,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&t.jsxs(Ce,{children:[t.jsxs(qa,{"data-testid":"buy-error",children:[t.jsx(Ba,{src:Bs,alt:"",width:64,height:80}),t.jsxs(_a,{children:[t.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),t.jsxs(Mt,{children:[t.jsx(je,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),t.jsx(je,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Fs({stage:o,step:l,total:P,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=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 t.jsxs(Ce,{"data-processing":!0,children:[t.jsx(Fa,{src:aa,alt:"",width:61,height:61}),t.jsx(Wa,{children:ne}),D?t.jsxs(zs,{children:[t.jsx(xt,{"aria-hidden":!0,children:t.jsx(ft,{"data-step":!0,style:{width:`${Y}%`}})}),P>1?t.jsxs(As,{children:[l,"/",P]}):null]}):t.jsx(xt,{"aria-hidden":!0,children:t.jsx(ft,{})})]})}function Ws({lines:o,shortfallCredits:l,packs:P,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=P.find(n=>n.id===z),ne=o.reduce((n,K)=>n+(K.quantity??1),0);return t.jsxs(Ce,{children:[t.jsxs(La,{"data-testid":"nofunds-warning",children:[t.jsx(Ka,{}),t.jsxs(Na,{children:[t.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",t.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),t.jsx(Es,{children:o.map(n=>{const K=n.quantity??1;return t.jsxs(Ua,{children:[t.jsx(Qa,{children:n.item.thumbnail?t.jsx("img",{src:n.item.thumbnail,alt:""}):null}),t.jsxs(Ha,{children:[t.jsxs("div",{children:[t.jsxs(Oa,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),K>1?t.jsx(Rs,{children:a("cartCheckout.qty",{count:K})}):null]}),n.item.creator?t.jsx(Ga,{address:n.item.creator}):null]}),t.jsxs(Va,{children:[t.jsx(Da,{}),t.jsx("span",{children:ce(n.priceCredits*K)})]})]})]},n.item.id)})}),t.jsx(Ya,{children:P.map(n=>{const K=n.id===z;return t.jsxs(Ja,{"data-testid":"credit-pack","data-on":K||void 0,onClick:()=>W(n.id),children:[t.jsx(Xa,{src:Za,alt:""}),t.jsx(es,{children:ce(n.credits)}),t.jsxs(ts,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),t.jsxs(as,{children:[t.jsxs(ss,{children:[t.jsx(ns,{}),t.jsx("span",{children:ce((A==null?void 0:A.credits)??0)})]}),t.jsxs(is,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),t.jsxs(Mt,{children:[t.jsx(je,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),t.jsx(je,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:It,radius:ee}=de,Pt="@media (max-width: 1080px)",I="@media (max-width: 880px)",Ct=i.div`
62
- max-width: 1510px;
63
- margin: 0 auto;
64
- /* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
65
- the footer rather than leaving a gray strip. Needs .page[data-route="/cart"] to be a flex column. */
66
- width: 100%;
67
- flex: 1 0 auto;
68
- display: flex;
69
- flex-direction: column;
70
-
71
- ${I} {
72
- padding-bottom: 188px; /* room for the fixed summary bar */
73
- }
74
- `,jt=i.button`
75
- display: inline-flex;
76
- align-items: center;
77
- gap: 6px;
78
- margin: 0 0 16px;
79
- padding: 0;
80
- border: 0;
81
- background: none;
82
- color: ${r.text2};
83
- font-size: 14px;
84
- font-weight: 600;
85
- letter-spacing: 0.02em;
86
- text-transform: uppercase;
87
- cursor: pointer;
88
- transition: color 0.15s ease;
89
-
90
- &:hover {
91
- color: ${r.accent};
92
- }
93
- & .ico {
94
- width: 18px;
95
- height: 18px;
96
- }
97
-
98
- ${I} {
99
- display: none;
100
- }
101
- `,Ls=i.div`
102
- display: grid;
103
- grid-template-columns: minmax(0, 1fr) 615px;
104
- gap: 24px;
105
- align-items: start;
106
-
107
- ${Pt} {
108
- grid-template-columns: 1fr;
109
- }
110
- `,kt=i.div`
111
- position: relative;
112
- /* The gray band is 733px in Figma (1553-317103) — taller than the panels inside it, deliberately. Without
113
- this it collapsed to the panels' height, and the page shell's own viewport-filling min-height then padded
114
- the page out BELOW the cross-sell, so a strip of gray showed under "You might also like" instead of the
115
- footer. Giving the band its designed height puts the leftover space where the design wants it. */
116
- min-height: 733px;
117
- /* Gray below the panels so the band never hugs the last card: Figma's band runs y152–950 with the
118
- content ending at 854. The min-height above only covers a SHORT cart — once the list outgrows it
119
- the band tracks the content, and without this padding it would butt straight into the purple. */
120
- padding-bottom: 96px;
121
-
122
- &::before {
123
- content: '';
124
- position: absolute;
125
- top: -28px;
126
- bottom: 0;
127
- left: 50%;
128
- width: 100vw;
129
- transform: translateX(-50%);
130
- background: ${r.media};
131
- z-index: 0;
132
- }
133
- & > * {
134
- position: relative;
135
- z-index: 1;
136
- }
137
-
138
- ${I} {
139
- /* The single-column layout is already taller than the desktop band, and the fixed summary bar sits over
140
- the bottom of it — a floor here would only add empty gray. */
141
- min-height: 0;
142
-
143
- /* The fixed summary bar already reserves room at the bottom on mobile (see Checkout). */
144
- padding-bottom: 32px;
145
-
146
- &::before {
147
- top: -16px; /* .page's mobile padding */
148
- }
149
- }
150
- `,Ks=i.div`
151
- min-width: 0;
152
- display: flex;
153
- flex-direction: column;
154
- gap: 12px;
155
- `,Ns=i.div`
156
- display: flex;
157
- align-items: center;
158
- justify-content: space-between;
159
- gap: 12px;
160
- background: ${r.white};
161
- border-radius: 16px;
162
- padding: 12px 12px 12px 24px;
163
-
164
- ${I} {
165
- gap: 8px;
166
- padding: 12px;
167
- }
168
- `,zt=i.section`
169
- min-width: 0;
170
- background: ${r.white};
171
- border-radius: 16px;
172
- padding: 24px;
173
-
174
- ${I} {
175
- padding: 16px;
176
- }
177
- `,Us=i(zt)`
178
- display: flex;
179
- flex-direction: column;
180
- align-items: center;
181
- justify-content: center;
182
- gap: 24px;
183
- min-height: 420px;
184
- padding: 48px 16px;
185
- text-align: center;
186
- color: ${r.text};
187
-
188
- ${de.media.maxWidth("mobile")} {
189
- min-height: 320px;
190
- padding: 32px 16px;
191
- }
192
- `,Qs=i.div`
193
- display: flex;
194
- flex-direction: column;
195
- align-items: center;
196
- gap: 12px;
197
- padding-bottom: 16px;
198
- `,Hs=i.p`
199
- margin: 0;
200
- font-size: 24px;
201
- font-weight: 700;
202
- line-height: 1.6;
203
-
204
- ${de.media.maxWidth("mobile")} {
205
- font-size: 20px;
206
- }
207
- `,Os=i.p`
208
- margin: 0;
209
- font-size: 20px;
210
- font-weight: 400;
211
- line-height: 1.6;
212
-
213
- ${de.media.maxWidth("mobile")} {
214
- font-size: 16px;
215
- }
216
- `,Gs=i(ke)`
217
- display: inline-flex;
218
- align-items: center;
219
- justify-content: center;
220
- width: 310px;
221
- max-width: 100%;
222
- height: 56px;
223
- padding: 0 12px;
224
- border-radius: ${ee.card};
225
- background: ${r.accent};
226
- color: ${r.softWhite};
227
- font-size: 15px;
228
- font-weight: 600;
229
- line-height: 24px;
230
- letter-spacing: 0.46px;
231
- text-transform: uppercase;
232
- text-decoration: none;
233
- transition: background 0.15s ease;
234
-
235
- &:hover {
236
- background: ${r.accentHover};
237
- }
238
- &:focus-visible {
239
- outline: 2px solid ${r.accent};
240
- outline-offset: 2px;
241
- }
242
- `,Vs=i.button`
243
- display: none;
244
-
245
- ${I} {
246
- display: inline-flex;
247
- align-items: center;
248
- flex-shrink: 0;
249
- border: 0;
250
- background: none;
251
- padding: 0;
252
- color: ${r.text};
253
- cursor: pointer;
254
-
255
- & .ico {
256
- width: 20px;
257
- height: 20px;
258
- }
259
- }
260
- `,Ds=i.h1`
261
- margin: 0;
262
- font-size: 14px;
263
- font-weight: 600;
264
- line-height: 1.57;
265
- color: ${r.text};
266
-
267
- ${I} {
268
- flex: 1;
269
- min-width: 0;
270
- font-size: 16px;
271
- }
272
- `,Ys=i.button`
273
- display: inline-flex;
274
- align-items: center;
275
- justify-content: center;
276
- gap: 8px;
277
- height: 40px;
278
- padding: 0 12px;
279
- border: 2px solid transparent;
280
- border-radius: ${ee.btn};
281
- background:
282
- linear-gradient(${r.white}, ${r.white}) padding-box,
283
- ${It.amethyst} border-box;
284
- color: ${r.accent};
285
- font-size: 13px;
286
- font-weight: 600;
287
- line-height: 24px;
288
- letter-spacing: 0.46px;
289
- text-transform: uppercase;
290
- white-space: nowrap;
291
- cursor: pointer;
292
- transition:
293
- box-shadow 0.15s ease,
294
- filter 0.15s ease;
295
-
296
- &:hover:not(:disabled) {
297
- box-shadow: 0 0 8px 0 rgba(165, 36, 179, 0.35);
298
- }
299
- &:active:not(:disabled) {
300
- filter: brightness(0.97);
301
- }
302
- &:disabled {
303
- opacity: 0.55;
304
- cursor: default;
305
- }
306
-
307
- ${I} {
308
- height: 36px;
309
- padding: 0 10px;
310
- font-size: 12px;
311
- }
312
- `,Js=i.div`
313
- display: flex;
314
- flex-direction: column;
315
- gap: 24px;
316
- `,Xs=i.div`
317
- position: relative;
318
- display: flex;
319
- align-items: stretch;
320
- gap: 12px;
321
- background: ${r.white};
322
- border: 1px solid ${r.gray4};
323
- border-radius: ${ee.card};
324
- overflow: hidden;
325
-
326
- &[data-unavailable] [data-thumb] {
327
- opacity: 0.5;
328
- }
329
- &[data-unavailable] [data-check] {
330
- display: none;
331
- }
332
- &[data-unavailable] [data-desc] {
333
- opacity: 0.7;
334
- }
335
- `,Zs=i.div`
336
- position: relative;
337
- flex-shrink: 0;
338
- width: 137.5px;
339
- height: 137px;
340
- background: ${r.media};
341
- border-radius: ${ee.card};
342
- display: grid;
343
- place-items: center;
344
- overflow: hidden;
345
-
346
- & img {
347
- width: 83%;
348
- height: 83%;
349
- object-fit: contain;
350
- filter: drop-shadow(0.56px 2.25px 2.8px rgba(0, 0, 0, 0.1));
351
- }
352
-
353
- ${I} {
354
- width: 120px;
355
- height: 120px;
356
- }
357
- `,en=i(ke)`
358
- position: absolute;
359
- inset: 0;
360
- display: grid;
361
- place-items: center;
362
- `,tn=i.span`
363
- position: absolute;
364
- top: 7.5px;
365
- left: 7.5px;
366
- width: 20px;
367
- height: 20px;
368
- border-radius: 50%;
369
- background: #34ce77;
370
- display: grid;
371
- place-items: center;
372
- `,an=i.div`
373
- flex: 1;
374
- min-width: 0;
375
- display: flex;
376
- flex-direction: column;
377
- justify-content: space-between;
378
- gap: 8px;
379
- padding: 16px 8px;
380
-
381
- ${I} {
382
- padding: 12px 4px 12px 0;
383
- }
384
- `,sn=i.div`
385
- display: flex;
386
- flex-direction: column;
387
- gap: 4px;
388
- min-width: 0;
389
- padding-right: 64px; /* clear the top-right favourite + remove group */
390
- `,At=Le`
391
- display: block;
392
- font-size: 16px;
393
- font-weight: 600;
394
- line-height: 1.2;
395
- color: ${r.text};
396
- text-decoration: none;
397
- overflow: hidden;
398
- text-overflow: ellipsis;
399
- white-space: nowrap;
400
-
401
- a&:hover {
402
- color: ${r.accent};
403
- }
404
-
405
- ${I} {
406
- white-space: normal;
407
- display: -webkit-box;
408
- -webkit-line-clamp: 2;
409
- line-clamp: 2;
410
- -webkit-box-orient: vertical;
411
- }
412
- `,nn=i.div`
413
- ${At};
414
- `,rn=i(ke)`
415
- ${At};
416
- `,on=i(sa)`
417
- font-size: 10px;
418
- line-height: 1.43;
419
- color: ${r.muted};
420
-
421
- & [data-avatar] {
422
- display: none;
423
- }
424
- & [data-testid='creator-name'] {
425
- font-size: 10px;
426
- line-height: 1.43;
427
- }
428
- `,cn=i.div`
429
- display: flex;
430
- align-items: center;
431
- justify-content: space-between;
432
- gap: 12px;
433
- padding-right: 8px;
434
- `,dn=i.div`
435
- display: inline-flex;
436
- align-items: center;
437
- gap: 8px;
438
- padding: 6px;
439
- border: 0.5px solid ${r.muted2};
440
- border-radius: ${ee.pill};
441
- `,$t=i.button`
442
- display: grid;
443
- place-items: center;
444
- width: 16px;
445
- height: 16px;
446
- padding: 0;
447
- border: 0;
448
- background: none;
449
- color: ${r.text};
450
- cursor: pointer;
451
-
452
- &:disabled {
453
- color: ${r.muted2};
454
- cursor: default;
455
- }
456
- `,ln=i.span`
457
- min-width: 12px;
458
- font-size: 14px;
459
- font-weight: 500;
460
- line-height: 1.2;
461
- color: ${r.text};
462
- text-align: center;
463
- `,un=i.div`
464
- display: inline-flex;
465
- align-items: center;
466
- gap: 4px;
467
- /* Always right-aligned: with a stepper present space-between handles it; for secondary/unique lines
468
- (no stepper) the auto margin keeps the lone price on the right instead of falling to the left. */
469
- margin-left: auto;
470
- font-size: 24px;
471
- font-weight: 600;
472
- color: ${r.text2};
473
-
474
- ${I} {
475
- font-size: 20px;
476
- }
477
- `,hn=i(St)`
478
- width: 24px;
479
- height: 24px;
480
- background: ${r.text};
481
-
482
- ${I} {
483
- width: 20px;
484
- height: 20px;
485
- }
486
- `,pn=i.span`
487
- margin-left: 6px;
488
- font-size: 14px;
489
- font-weight: 500;
490
- color: ${r.muted};
491
- text-decoration: line-through;
492
- `,gn=i.div`
493
- position: absolute;
494
- top: 9px;
495
- right: 7px;
496
- display: flex;
497
- align-items: flex-start;
498
- gap: 12px;
499
- `,mn=i.span`
500
- display: inline-flex;
501
- align-items: center;
502
- gap: 4px;
503
- font-size: 12px;
504
- font-weight: 600;
505
- line-height: 1;
506
- text-transform: uppercase;
507
- color: ${r.text2};
508
- `,xn=i(O)`
509
- color: #f48221;
510
- `,fn=i(ke)`
511
- font-size: 12px;
512
- font-weight: 600;
513
- line-height: 24px;
514
- letter-spacing: 0.46px;
515
- text-transform: uppercase;
516
- text-decoration: underline;
517
- color: ${r.accent};
518
-
519
- &:hover {
520
- color: ${r.accentHover};
521
- }
522
- &:focus-visible {
523
- outline: 2px solid ${r.accent};
524
- outline-offset: 2px;
525
- }
526
- `,yn=i.span`
527
- align-self: flex-start;
528
- display: inline-flex;
529
- align-items: center;
530
- gap: 4px;
531
- padding: 2px 4px;
532
- border-radius: ${ee.chip};
533
- background: #f4e9ff;
534
- font-size: 10px;
535
- font-weight: 400;
536
- line-height: 14px;
537
- color: ${r.text};
538
- `,bn=i(O)`
539
- width: 11.31px;
540
- height: 10.94px;
541
- background: ${r.text};
542
- `,Et=Le`
543
- display: grid;
544
- place-items: center;
545
- width: 24px;
546
- height: 24px;
547
- padding: 0;
548
- border: 0;
549
- background: none;
550
- color: ${r.muted};
551
- cursor: pointer;
552
- transition: color 0.12s ease;
553
-
554
- &:disabled {
555
- opacity: 0.5;
556
- cursor: default;
557
- }
558
- `,vn=i.button`
559
- ${Et};
560
-
561
- &:hover:not(:disabled) {
562
- color: ${r.text};
563
- }
564
- &[data-on] {
565
- color: ${r.dclRed};
566
- }
567
- `,wn=i.button`
568
- ${Et};
569
-
570
- &:hover:not(:disabled) {
571
- color: ${r.dclRed};
572
- }
573
- `,Cn=i.div`
574
- display: flex;
575
- gap: 20px;
576
- margin-top: 16px;
577
-
578
- & .link {
579
- font-size: 13px;
580
- color: ${r.muted};
581
- font-weight: 600;
582
- }
583
- & .link:hover:not(:disabled) {
584
- color: ${r.text};
585
- }
586
- `,jn=i.aside`
587
- position: sticky;
588
- top: 172px;
589
- display: flex;
590
- flex-direction: column;
591
- background: ${r.white};
592
- box-shadow: 0 1px 3px rgba(22, 21, 24, 0.06);
593
- border-radius: 16px;
594
- padding: 16px;
595
-
596
- ${Pt} {
597
- position: static;
598
- }
599
- ${I} {
600
- position: fixed;
601
- left: 0;
602
- right: 0;
603
- top: auto;
604
- bottom: 0;
605
- z-index: 30;
606
- border: 0;
607
- border-radius: 16px 16px 0 0;
608
- box-shadow: 0 -4px 20px rgba(22, 21, 24, 0.12);
609
- }
610
- `,kn=i.h2`
611
- margin: 0 0 24px;
612
- padding-bottom: 16px;
613
- border-bottom: 1px solid ${r.gray4};
614
- font-size: 24px;
615
- font-weight: 600;
616
- color: ${r.text};
617
-
618
- ${I} {
619
- margin-bottom: 12px;
620
- padding-bottom: 12px;
621
- }
622
- `,$n=i.div`
623
- display: flex;
624
- flex-direction: column;
625
- gap: 12px;
626
- `,Sn=i.div`
627
- display: flex;
628
- align-items: flex-start;
629
- justify-content: space-between;
630
- gap: 12px;
631
- `,Tn=i.span`
632
- font-size: 14px;
633
- font-weight: 600;
634
- line-height: 1.57;
635
- color: ${r.muted1};
636
- `,Mn=i.span`
637
- display: inline-flex;
638
- align-items: center;
639
- gap: 8px;
640
- font-size: 24px;
641
- font-weight: 700;
642
- color: ${r.text};
643
- `,In=i.span`
644
- display: flex;
645
- flex-direction: column;
646
- align-items: flex-end;
647
- justify-content: center;
648
- gap: 4px;
649
- `;i.span`
650
- font-size: 12px;
651
- font-weight: 400;
652
- line-height: 1;
653
- color: ${r.muted};
654
- `;const Pn=i(St)`
655
- width: 30px;
656
- height: 30px;
657
- background: ${r.text};
658
- -webkit-mask-size: 24px 24px;
659
- mask-size: 24px 24px;
660
- -webkit-mask-position: left center;
661
- mask-position: left center;
662
- `;i.button`
663
- width: 100%;
664
- height: 56px;
665
- border: 0;
666
- border-radius: ${ee.btn};
667
- background: ${It.buyBtn};
668
- color: ${r.softWhite};
669
- font-size: 15px;
670
- font-weight: 600;
671
- letter-spacing: 0.046em;
672
- text-transform: uppercase;
673
- cursor: pointer;
674
- transition: background-image 0.15s ease;
675
-
676
- /* Primary hover/pressed is the solid Primary red (Figma 738:53252 / 738:53262) — the gradient is
677
- the RESTING fill only. Painted as a flat GRADIENT, not a background-color: the shorthand can't
678
- interpolate background-image, so gradient -> colour dropped the image midway while the colour was
679
- still half transparent and the button visibly blinked. Same property both ends = a clean swap. */
680
- &:hover:not(:disabled),
681
- &:active:not(:disabled) {
682
- background-image: linear-gradient(${r.dclRed}, ${r.dclRed});
683
- }
684
- &:disabled {
685
- opacity: 0.6;
686
- cursor: default;
687
- }
688
- `;const Rt=Le`
689
- margin: 0;
690
- font-size: 13px;
691
- `,ve=i.p`
692
- ${Rt};
693
- `,zn=i(Is)`
694
- ${Rt};
695
- `,An=i.div`
696
- position: relative;
697
- flex: 1 0 auto;
698
- margin-top: 48px;
699
- /* Below the gray band the cross-sell sits straight on the purple field (Figma) — hence no band of its
700
- own. The padding is the whole gap from the top of the section to the heading; the shared carousel's
701
- own top margin is zeroed below so the two don't stack. */
702
- padding: 47px 0 24px;
703
-
704
- & section {
705
- margin-top: 0;
706
- }
707
- `;function Fe(o){if(Ts(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 En=12e4;function Rn(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 Dn(){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),Y=H(e=>e.setFittingOpen),A=ct(e=>e.items),ne=ct(e=>e.toggle),{session:n,signIn:K}=ia(),qt=ra(),le=js().packs.slice(0,ks);M.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Bt=o.some(e=>e.category!=="emote"),{data:$e}=oa({queryKey:["upsell-listings"],queryFn:()=>Ca({first:40}),staleTime:6e4}),{data:$}=ca(n),v=da(),te=ea(),{state:E}=ta(),[_t,ie]=M.useState(null),[Ke,ue]=M.useState(null),[Ft,B]=M.useState(!1),[_,G]=M.useState(null),Ne=M.useRef(0),[g,j]=M.useState(null),{data:he}=la(n),{data:re}=ua(!0),[Se,Ue]=M.useState(""),oe=M.useRef(null),Qe=ha(o),He=e=>lt(Qe[e.id]),Te=o.filter(He),Oe=o.length>0&&Te.length===0,Wt=Te.reduce((e,s)=>e+s.priceCredits*s.quantity,0),Lt=o.reduce((e,s)=>e+s.quantity,0),Kt=Te.reduce((e,s)=>e+s.quantity,0),Ge=_?_.liveTotalCredits:Wt,Nt=new Set(o.map(e=>e.id)),Ve=(($e==null?void 0:$e.items)??[]).filter(e=>!Nt.has(e.id)).slice(0,12),Ut=new Map(_==null?void 0:_.buyable.map(e=>[e.item.id,e])),pe=($==null?void 0:$.credits)??0,Me=Ge*10,Qt=re?dt(Me,re):0n,Ie=Be({priceCents:Me,priceManaWei:Qt,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),Ht=e=>e.some(s=>s.acquisition==="store"),Pe=e=>e.flatMap(s=>s.acquisition==="trade"?[s]:[]),Ot=xa,Gt=e=>ya(e.contractAddress,String(e.itemId));function ge(e){e(),G(null),ue(null),ie(null)}function Vt(){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];Ue(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 T=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:Q,maxCreditedValue:Z}=await pt(n.identity,p.usdCents,T,C);u.push({salt:Q.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:[Q],maxCreditedValue:Z,chainId:p.item.chainId}:{kind:"trade",trade:p.trade,credits:[Q],maxCreditedValue:Z})}catch(T){if(Ms(T)){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 T}}h="submit";const m=bs(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(ps())try{const x=new Map;f=await vs({purchases:y,buyer:n.address,signer:n.signer,onSigned:()=>N(m),onBroadcast:({txHash:C,salts:Q})=>{x.set(C,Q),Q.forEach(Z=>w.add(Z))}});const p=await Promise.allSettled(f.map(C=>ws(C)));p.forEach((C,Q)=>{const Z=x.get(f[Q])??[];C.status==="fulfilled"?(Z.forEach(Ee=>S.add(Ee)),R.push(f[Q])):C.reason instanceof vt||Z.forEach(Ee=>F.add(Ee))});const T=p.flatMap(C=>C.status==="rejected"?[C.reason]:[]);if(T.length&&!T.some(C=>C instanceof vt))throw T[0];q=!0}catch(x){if(!(x instanceof Cs)||!va(n.providerType))throw x;f=await _e({purchases:y,buyer:n.address,signer:n.signer,onSigned:N,onBroadcast:({salts:p})=>p.forEach(T=>w.add(T)),onSettled:({txHash:p,salts:T})=>{T.forEach(C=>S.add(C)),R.push(p)},onReverted:({salts:p})=>p.forEach(T=>F.add(T))})}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(T=>S.add(T)),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 U={items:c,txHash:f[0]??void 0,txHashes:f,settled:!0,...b?{creditsAdded:b}:{}};te("/success",{state:U,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,U)=>b+U.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 Ye(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}:{}};te("/success",{state:c,replace:!0})}function Je(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 Dt(e,s){const d=ye(qe.MANAToken,s),c=ye(qe.CreditsManager,s);await fs({auth:{kind:ys.Allowance,contractAddress:d.address,spenderAddress:c.address,chainId:s},signer:e})}async function Xe(){if(re)return re;try{return await v.fetchQuery({queryKey:["mana-rate",ht.chainId],queryFn:()=>fa(ht.chainId),staleTime:6e4})}catch{return}}async function Yt(e){const s=we(e).reduce((h,w)=>h+w.usdCents,0),c=(he??0n)>0n?await Xe():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 Yt(e),h=Be({priceCents:c,priceManaWei:u,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),w=Ht(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]=M.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=gs(s,e),u=n?await ms(c,n.address).catch(()=>!0):!0;if(xs(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 ls({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"]}),Ye(c,h)}catch(h){Je(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=us(c.map(m=>m.usdCents),($==null?void 0:$.balanceCents)??0),S=w.reduce((m,k)=>m+k,0),F=hs(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 U=m[f].item,{credit:x,maxCreditedValue:p}=await pt(n.identity,b,m[f].trade.id,U.contractAddress&&U.itemId!=null?{contractAddress:U.contractAddress,itemId:String(U.itemId)}:void 0);R.push({salt:x.id,itemId:U.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 _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"]}),Ye(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"]}),Je(m,"buy_cart_combined")}}async function J(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 $s(s,n.address,Ot,await Xe(),Gt),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(h=>l(h.id)),ue(Rn(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>En){G(null),ue(null),await J();return}ie(null),Ze(_.buyable)}}async function Zt(){if(Se){try{sessionStorage.setItem(be,JSON.stringify(H.getState().items))}catch{}B(!0);try{const e=await Ss(Se,n?{address:n.address,identity:n.identity}:void 0);if(e.url){window.location.href=e.url;return}te("/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=M.useRef(!1);M.useEffect(()=>{if(!n||it.current||!rs("cart-checkout"))return;it.current=!0;const e=setTimeout(()=>void J(),0);return()=>clearTimeout(e)},[n]);const rt=M.useRef(!1);M.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 J(),0);return()=>clearTimeout(e)},[E==null?void 0:E.resumeCheckout]);const ot=M.useRef(!1);M.useEffect(()=>{if(!(E!=null&&E.startCheckout))return;const e=setTimeout(()=>{ot.current||(ot.current=!0,J())},0);return()=>clearTimeout(e)},[E==null?void 0:E.startCheckout]);const X=Ft||(g==null?void 0:g.phase)==="processing";return o.length===0&&!g?t.jsx(Ct,{children:t.jsxs(kt,{children:[t.jsxs(jt,{onClick:()=>te(-1),type:"button",children:[t.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),t.jsxs(Us,{"data-testid":"cart-empty",children:[t.jsx(O,{name:"cart-plus",size:110}),t.jsxs(Qs,{children:[t.jsx(Hs,{children:a("cart.empty.title")}),t.jsx(Os,{children:a("cart.empty.body")})]}),t.jsx(Gs,{to:"/items",children:a("cart.empty.cta")})]})]})}):t.jsxs(Ct,{children:[t.jsxs(kt,{children:[t.jsxs(jt,{onClick:()=>te(-1),type:"button",children:[t.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),t.jsxs(Ls,{children:[t.jsxs(Ks,{children:[t.jsxs(Ns,{children:[t.jsx(Vs,{onClick:()=>te(-1),type:"button","aria-label":a("cart.goBack"),children:t.jsx(O,{name:"arrow-left"})}),t.jsx(Ds,{children:a("cart.panelTitle",{count:Lt})}),Bt?t.jsxs(Ys,{onClick:()=>Y(!0),disabled:X,children:[t.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),t.jsxs(zt,{children:[t.jsx(Js,{children:o.map(e=>{const s=Ut.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=Qe[e.id],m=!lt(y),k=y==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return t.jsxs(Xs,{"data-unavailable":m||void 0,children:[t.jsxs(Zs,{"data-thumb":!0,children:[q?t.jsx(en,{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(tn,{"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(an,{children:[t.jsxs(sn,{"data-desc":!0,children:[q?t.jsx(rn,{to:q,state:{item:e,tradeId:e.tradeId},title:e.name,children:e.name}):t.jsx(nn,{title:e.name,children:e.name}),e.creator?t.jsx(on,{address:e.creator,linkToProfile:!0}):null,qt&&u?t.jsxs(yn,{"data-testid":"cart-creator-tag",children:[t.jsx(bn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),t.jsx(cn,{children:m?t.jsxs(t.Fragment,{children:[t.jsxs(mn,{children:[t.jsx(xn,{name:"warning-fill",size:24}),k]}),q?t.jsx(fn,{to:q,state:{item:e,tradeId:e.tradeId},children:a("cart.availability.viewResales")}):null]}):t.jsxs(t.Fragment,{children:[u?t.jsxs(dn,{children:[t.jsx($t,{onClick:()=>ge(()=>z(e.id)),disabled:X||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(ln,{children:h}),t.jsx($t,{onClick:()=>ge(()=>P(e.id)),disabled:X||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(un,{children:[t.jsx(hn,{})," ",S,c?t.jsx(pn,{children:e.priceCredits*h}):null]})]})})]}),t.jsxs(gn,{children:[F?t.jsx(vn,{"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(wn,{onClick:()=>ge(()=>l(e.id)),disabled:X,"aria-label":a("cart.remove",{name:e.name}),title:a("cart.removeTitle"),children:t.jsx(O,{name:"trash",size:24})})]})]},e.id)})}),t.jsx(Cn,{children:t.jsx("button",{className:"link",onClick:()=>ge(W),disabled:X,children:a("cart.clearCart")})})]})]}),t.jsxs(jn,{children:[t.jsx(kn,{children:a("cart.purchaseSummary")}),t.jsxs($n,{children:[t.jsxs(Sn,{children:[t.jsx(Tn,{children:a("cart.totalItems",{count:Kt})}),t.jsx(In,{children:t.jsxs(Mn,{children:[t.jsx(Pn,{})," ",Ge]})})]}),t.jsx(Tt,{options:Ie.options,totalCents:Me,shortfall:Ie.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Ie.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:X||Oe,onPay:e=>void(_?nt():J(e)),creditsFallback:{label:X?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?nt():J())}}),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(zn,{message:_t})]})]})]})]}),Ve.length>0?t.jsx(An,{children:t.jsx(os,{title:a("cart.youMightAlsoLike"),items:Ve})}):null,Ae&&n?t.jsx(cs,{auth:Ae.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:t.jsx("img",{src:ds,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(_s,{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: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:Ue,onBuyPacks:()=>void Zt(),message:g.phase==="error"?g.message:void 0,onRetry:()=>void J()}):null]})}export{Dn as Cart};