@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
@@ -0,0 +1,706 @@
1
+ import{j as t,L as ke,r as P,b as Xt,a as Zt}from"./react-BYHuwl8r.js";import{t as de,s as i,b as a,L as ce,bd as ea,J as ta,I as H,z as St,K as Le,x as aa,Y as Q,ao as ot,o as sa,q as na,v as ia,be as ra,A as oa,bf as ca,ap as da,bg as la,bh as ct,bi as ua,bj as ha,y as pa,bk as dt,$ as G,bl as lt,bm as ga,F as ae,r as ma,c as ut,bn as xa,C as fa,bo as ht,bp as Re,bq as ya,br as xe,bs as fe,bt as pt,g as ye,f as ba,h as qe,bu as va}from"./index-CpgH80QO.js";import{M as wa,S as Ca,C as ja,H as ka,a as Sa,T as $a,X as Ta,b as Ma,B as Ia,c as Pa,d as gt,e as za,f as Ce,P as $t,m as Aa,g as Ea,h as Ra,i as qa,j as Tt,k as je,L as Ba,l as _a,n as mt,o as xt,W as Fa,p as Wa,q as La,A as Ka,r as Na,s as Ua,t as Qa,u as Ha,v as Oa,w as Ga,x as Va,y as Da,z as Ya,D as Ja,E as Xa,F as Za,G as es,I as ts,J as as,K as ss,N as Be,O as ns,Q as is,R as rs,U as os,V as ft,Y as yt,Z as cs,_ as ds,$ as ls}from"./CollectionCarousel-CvMsq3XH.js";import{k as us,l as hs,a as ps,n as gs,f as ms,A as xs}from"./authorizations-GLPsQqiP.js";import{g as fs,j as _e}from"./buy-C36PZNHt.js";import{b as ys,w as bs,S as bt,G as vs}from"./buy-gasless-cVGUwJcn.js";import{u as ws,M as Cs,R as be,r as js,c as ks,p as vt}from"./useCreditPacks-CPiiIVbF.js";import{i as Ss,a as $s}from"./errors-DAy3n3Fl.js";import{E as Ts}from"./ErrorNotice-h0GUcJEu.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-ZsFc6TYS.js";const{colors:se,radius:Ms}=de,Is=i.div`
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ gap: 8px;
6
+ width: 100%;
7
+ `,Ps=i.span`
8
+ font-size: 16px;
9
+ line-height: 22px;
10
+ color: ${se.text2};
11
+ text-transform: capitalize;
12
+ white-space: nowrap;
13
+ `,zs=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: ${Ms.btn};
38
+ }
39
+ `,As=i.span`
40
+ margin-left: 8px;
41
+ font-size: 13px;
42
+ font-weight: 600;
43
+ color: ${se.muted};
44
+ `,Es=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
+ `,Rs="https://cdn.decentraland.org/@dcl/shop/1.0.2-31053112537.commit-2eeb02b/_assets/buy-error-22UunaPC.png";function qs(o){const{phase:l,balanceCredits:I,onClose:z}=o,F=l==="processing",V=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),D=l==="processing";return t.jsxs(wa,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[t.jsx(Ca,{onClick:F?void 0:z,"aria-hidden":!0}),t.jsxs(ja,{"data-tall":D||void 0,children:[t.jsxs(ka,{children:[t.jsxs(Sa,{children:[t.jsx($a,{children:V}),!F&&t.jsx(Ta,{onClick:z,"aria-label":a("buyModal.close"),children:t.jsx(Ma,{})})]}),t.jsxs(Ia,{children:[t.jsx(Pa,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),t.jsx(gt,{}),t.jsx(za,{children:ce(I)})]})]}),l==="choose"&&t.jsxs(Ce,{children:[t.jsxs(Es,{children:[t.jsx("span",{children:a("cart.purchaseSummary")}),t.jsxs("strong",{children:[t.jsx(gt,{}),ce(o.totalCredits??0)]})]}),t.jsx($t,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Aa(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&t.jsx(Bs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&t.jsx(_s,{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(Ea,{"data-testid":"buy-error",children:[t.jsx(Ra,{src:Rs,alt:"",width:64,height:80}),t.jsxs(qa,{children:[t.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),t.jsxs(Tt,{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 Bs({stage:o,step:l,total:I,isSelfCustody:z,signatures:F}){const V=o==="reserving",D=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&F&&F.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:F.current,total:F.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(Ba,{src:ea,alt:"",width:61,height:61}),t.jsx(_a,{children:ne}),V?t.jsxs(Is,{children:[t.jsx(mt,{"aria-hidden":!0,children:t.jsx(xt,{"data-step":!0,style:{width:`${D}%`}})}),I>1?t.jsxs(Ps,{children:[l,"/",I]}):null]}):t.jsx(mt,{"aria-hidden":!0,children:t.jsx(xt,{})})]})}function _s({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:F,onBuyPacks:V,onCancel:D}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return t.jsxs(Ce,{children:[t.jsxs(Fa,{"data-testid":"nofunds-warning",children:[t.jsx(Wa,{}),t.jsxs(La,{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(zs,{children:o.map(n=>{const L=n.quantity??1;return t.jsxs(Ka,{children:[t.jsx(Na,{children:n.item.thumbnail?t.jsx("img",{src:n.item.thumbnail,alt:""}):null}),t.jsxs(Ua,{children:[t.jsxs("div",{children:[t.jsxs(Qa,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?t.jsx(As,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?t.jsx(Ha,{address:n.item.creator}):null]}),t.jsxs(Oa,{children:[t.jsx(Ga,{}),t.jsx("span",{children:ce(n.priceCredits*L)})]})]})]},n.item.id)})}),t.jsx(Va,{children:I.map(n=>{const L=n.id===z;return t.jsxs(Da,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>F(n.id),children:[t.jsx(Ya,{src:Ja,alt:""}),t.jsx(Xa,{children:ce(n.credits)}),t.jsxs(Za,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),t.jsxs(es,{children:[t.jsxs(ts,{children:[t.jsx(as,{}),t.jsx("span",{children:ce((A==null?void 0:A.credits)??0)})]}),t.jsxs(ss,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),t.jsxs(Tt,{children:[t.jsx(je,{"data-variant":"outline",onClick:D,children:a("buyModal.cancel")}),t.jsx(je,{"data-variant":"gradient",onClick:V,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Fs,radius:Z}=de,Mt="@media (max-width: 1080px)",M="@media (max-width: 880px)",wt=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
+ ${M} {
72
+ padding-bottom: 188px; /* room for the fixed summary bar */
73
+ }
74
+ `,Ct=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
+ ${M} {
99
+ display: none;
100
+ }
101
+ `,Ws=i.div`
102
+ display: grid;
103
+ grid-template-columns: minmax(0, 1fr) 615px;
104
+ gap: 24px;
105
+ align-items: start;
106
+
107
+ ${Mt} {
108
+ grid-template-columns: 1fr;
109
+ }
110
+ `,jt=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
+ ${M} {
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
+ `,Ls=i.div`
151
+ min-width: 0;
152
+ display: flex;
153
+ flex-direction: column;
154
+ gap: 12px;
155
+ `,Ks=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
+ ${M} {
165
+ gap: 8px;
166
+ padding: 12px;
167
+ }
168
+ `,It=i.section`
169
+ min-width: 0;
170
+ background: ${r.white};
171
+ border-radius: 16px;
172
+ padding: 24px;
173
+
174
+ ${M} {
175
+ padding: 16px;
176
+ }
177
+ `,Ns=i(It)`
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
+ `,Us=i.div`
193
+ display: flex;
194
+ flex-direction: column;
195
+ align-items: center;
196
+ gap: 12px;
197
+ padding-bottom: 16px;
198
+ `,Qs=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
+ `,Hs=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
+ `,Os=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: ${Z.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
+ `,Gs=i.button`
243
+ display: none;
244
+
245
+ ${M} {
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
+ `,Vs=i.h1`
261
+ margin: 0;
262
+ font-size: 14px;
263
+ font-weight: 600;
264
+ line-height: 1.57;
265
+ color: ${r.text};
266
+
267
+ ${M} {
268
+ flex: 1;
269
+ min-width: 0;
270
+ font-size: 16px;
271
+ }
272
+ `,Ds=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 ${r.text2};
280
+ border-radius: ${Z.btn};
281
+ background: none;
282
+ color: ${r.text2};
283
+ font-size: 13px;
284
+ font-weight: 600;
285
+ line-height: 24px;
286
+ letter-spacing: 0.46px;
287
+ text-transform: uppercase;
288
+ white-space: nowrap;
289
+ cursor: pointer;
290
+ transition:
291
+ background 0.15s ease,
292
+ filter 0.15s ease;
293
+
294
+ /* Mixed from currentColor so the wash cannot drift from the border colour. */
295
+ &:hover:not(:disabled) {
296
+ background: color-mix(in srgb, currentColor 6%, transparent);
297
+ }
298
+ &:active:not(:disabled) {
299
+ filter: brightness(0.97);
300
+ }
301
+ &:disabled {
302
+ opacity: 0.55;
303
+ cursor: default;
304
+ }
305
+
306
+ ${M} {
307
+ height: 36px;
308
+ padding: 0 10px;
309
+ font-size: 12px;
310
+ }
311
+ `,Ys=i.div`
312
+ display: flex;
313
+ flex-direction: column;
314
+ gap: 24px;
315
+ `,Js=i.div`
316
+ position: relative;
317
+ display: flex;
318
+ align-items: stretch;
319
+ gap: 12px;
320
+ background: ${r.white};
321
+ border: 1px solid ${r.gray4};
322
+ border-radius: ${Z.card};
323
+ overflow: hidden;
324
+
325
+ &[data-unavailable] [data-thumb] {
326
+ opacity: 0.5;
327
+ }
328
+ &[data-unavailable] [data-check] {
329
+ display: none;
330
+ }
331
+ &[data-unavailable] [data-desc] {
332
+ opacity: 0.7;
333
+ }
334
+ `,Xs=i.div`
335
+ position: relative;
336
+ flex-shrink: 0;
337
+ width: 137.5px;
338
+ height: 137px;
339
+ background: ${r.media};
340
+ border-radius: ${Z.card};
341
+ display: grid;
342
+ place-items: center;
343
+ overflow: hidden;
344
+
345
+ & img {
346
+ width: 83%;
347
+ height: 83%;
348
+ object-fit: contain;
349
+ filter: drop-shadow(0.56px 2.25px 2.8px rgba(0, 0, 0, 0.1));
350
+ }
351
+
352
+ ${M} {
353
+ width: 120px;
354
+ height: 120px;
355
+ }
356
+ `,Zs=i(ke)`
357
+ position: absolute;
358
+ inset: 0;
359
+ display: grid;
360
+ place-items: center;
361
+ `,en=i.span`
362
+ position: absolute;
363
+ top: 7.5px;
364
+ left: 7.5px;
365
+ width: 20px;
366
+ height: 20px;
367
+ border-radius: 50%;
368
+ background: #34ce77;
369
+ display: grid;
370
+ place-items: center;
371
+ `,tn=i.div`
372
+ flex: 1;
373
+ min-width: 0;
374
+ display: flex;
375
+ flex-direction: column;
376
+ justify-content: space-between;
377
+ gap: 8px;
378
+ padding: 16px 8px;
379
+
380
+ ${M} {
381
+ padding: 12px 4px 12px 0;
382
+ }
383
+ `,an=i.div`
384
+ display: flex;
385
+ flex-direction: column;
386
+ gap: 4px;
387
+ min-width: 0;
388
+ padding-right: 64px; /* clear the top-right favourite + remove group */
389
+ `,Pt=Le`
390
+ display: block;
391
+ font-size: 16px;
392
+ font-weight: 600;
393
+ line-height: 1.2;
394
+ color: ${r.text};
395
+ text-decoration: none;
396
+ overflow: hidden;
397
+ text-overflow: ellipsis;
398
+ white-space: nowrap;
399
+
400
+ a&:hover {
401
+ color: ${r.accent};
402
+ }
403
+
404
+ ${M} {
405
+ white-space: normal;
406
+ display: -webkit-box;
407
+ -webkit-line-clamp: 2;
408
+ line-clamp: 2;
409
+ -webkit-box-orient: vertical;
410
+ }
411
+ `,sn=i.div`
412
+ ${Pt};
413
+ `,nn=i(ke)`
414
+ ${Pt};
415
+ `,rn=i(ta)`
416
+ font-size: 10px;
417
+ line-height: 1.43;
418
+ color: ${r.muted};
419
+
420
+ & [data-avatar] {
421
+ display: none;
422
+ }
423
+ & [data-testid='creator-name'] {
424
+ font-size: 10px;
425
+ line-height: 1.43;
426
+ }
427
+ `,on=i.div`
428
+ display: flex;
429
+ align-items: center;
430
+ justify-content: space-between;
431
+ gap: 12px;
432
+ padding-right: 8px;
433
+ `,cn=i.div`
434
+ display: inline-flex;
435
+ align-items: center;
436
+ gap: 8px;
437
+ padding: 6px;
438
+ border: 0.5px solid ${r.muted2};
439
+ border-radius: ${Z.pill};
440
+ `,kt=i.button`
441
+ display: grid;
442
+ place-items: center;
443
+ width: 16px;
444
+ height: 16px;
445
+ padding: 0;
446
+ border: 0;
447
+ background: none;
448
+ color: ${r.text};
449
+ cursor: pointer;
450
+
451
+ &:disabled {
452
+ color: ${r.muted2};
453
+ cursor: default;
454
+ }
455
+ `,dn=i.span`
456
+ min-width: 12px;
457
+ font-size: 14px;
458
+ font-weight: 500;
459
+ line-height: 1.2;
460
+ color: ${r.text};
461
+ text-align: center;
462
+ `,ln=i.div`
463
+ display: inline-flex;
464
+ align-items: center;
465
+ gap: 4px;
466
+ /* Always right-aligned: with a stepper present space-between handles it; for secondary/unique lines
467
+ (no stepper) the auto margin keeps the lone price on the right instead of falling to the left. */
468
+ margin-left: auto;
469
+ font-size: 24px;
470
+ font-weight: 600;
471
+ color: ${r.text2};
472
+
473
+ ${M} {
474
+ font-size: 20px;
475
+ }
476
+ `,un=i(St)`
477
+ width: 24px;
478
+ height: 24px;
479
+ background: ${r.text};
480
+
481
+ ${M} {
482
+ width: 20px;
483
+ height: 20px;
484
+ }
485
+ `,hn=i.span`
486
+ margin-left: 6px;
487
+ font-size: 14px;
488
+ font-weight: 500;
489
+ color: ${r.muted};
490
+ text-decoration: line-through;
491
+ `,pn=i.div`
492
+ position: absolute;
493
+ top: 9px;
494
+ right: 7px;
495
+ display: flex;
496
+ align-items: flex-start;
497
+ gap: 12px;
498
+ `,gn=i.span`
499
+ display: inline-flex;
500
+ align-items: center;
501
+ gap: 4px;
502
+ font-size: 12px;
503
+ font-weight: 600;
504
+ line-height: 1;
505
+ text-transform: uppercase;
506
+ color: ${r.text2};
507
+ `,mn=i(H)`
508
+ color: #f48221;
509
+ `,xn=i(ke)`
510
+ font-size: 12px;
511
+ font-weight: 600;
512
+ line-height: 24px;
513
+ letter-spacing: 0.46px;
514
+ text-transform: uppercase;
515
+ text-decoration: underline;
516
+ color: ${r.accent};
517
+
518
+ &:hover {
519
+ color: ${r.accentHover};
520
+ }
521
+ &:focus-visible {
522
+ outline: 2px solid ${r.accent};
523
+ outline-offset: 2px;
524
+ }
525
+ `,fn=i.span`
526
+ align-self: flex-start;
527
+ display: inline-flex;
528
+ align-items: center;
529
+ gap: 4px;
530
+ padding: 2px 4px;
531
+ border-radius: ${Z.chip};
532
+ background: #f4e9ff;
533
+ font-size: 10px;
534
+ font-weight: 400;
535
+ line-height: 14px;
536
+ color: ${r.text};
537
+ `,yn=i(H)`
538
+ width: 11.31px;
539
+ height: 10.94px;
540
+ background: ${r.text};
541
+ `,zt=Le`
542
+ display: grid;
543
+ place-items: center;
544
+ width: 24px;
545
+ height: 24px;
546
+ padding: 0;
547
+ border: 0;
548
+ background: none;
549
+ color: ${r.muted};
550
+ cursor: pointer;
551
+ transition: color 0.12s ease;
552
+
553
+ &:disabled {
554
+ opacity: 0.5;
555
+ cursor: default;
556
+ }
557
+ `,bn=i.button`
558
+ ${zt};
559
+
560
+ &:hover:not(:disabled) {
561
+ color: ${r.text};
562
+ }
563
+ &[data-on] {
564
+ color: ${r.dclRed};
565
+ }
566
+ `,vn=i.button`
567
+ ${zt};
568
+
569
+ &:hover:not(:disabled) {
570
+ color: ${r.dclRed};
571
+ }
572
+ `,wn=i.div`
573
+ display: flex;
574
+ gap: 20px;
575
+ margin-top: 16px;
576
+
577
+ & .link {
578
+ font-size: 13px;
579
+ color: ${r.muted};
580
+ font-weight: 600;
581
+ }
582
+ & .link:hover:not(:disabled) {
583
+ color: ${r.text};
584
+ }
585
+ `,Cn=i.aside`
586
+ position: sticky;
587
+ top: 172px;
588
+ display: flex;
589
+ flex-direction: column;
590
+ background: ${r.white};
591
+ box-shadow: 0 1px 3px rgba(22, 21, 24, 0.06);
592
+ border-radius: 16px;
593
+ padding: 16px;
594
+
595
+ ${Mt} {
596
+ position: static;
597
+ }
598
+ ${M} {
599
+ position: fixed;
600
+ left: 0;
601
+ right: 0;
602
+ top: auto;
603
+ bottom: 0;
604
+ z-index: 30;
605
+ border: 0;
606
+ border-radius: 16px 16px 0 0;
607
+ box-shadow: 0 -4px 20px rgba(22, 21, 24, 0.12);
608
+ }
609
+ `,jn=i.h2`
610
+ margin: 0 0 24px;
611
+ padding-bottom: 16px;
612
+ border-bottom: 1px solid ${r.gray4};
613
+ font-size: 24px;
614
+ font-weight: 600;
615
+ color: ${r.text};
616
+
617
+ ${M} {
618
+ margin-bottom: 12px;
619
+ padding-bottom: 12px;
620
+ }
621
+ `,kn=i.div`
622
+ display: flex;
623
+ flex-direction: column;
624
+ gap: 12px;
625
+ `,Sn=i.div`
626
+ display: flex;
627
+ align-items: flex-start;
628
+ justify-content: space-between;
629
+ gap: 12px;
630
+ `,$n=i.span`
631
+ font-size: 14px;
632
+ font-weight: 600;
633
+ line-height: 1.57;
634
+ color: ${r.muted1};
635
+ `,Tn=i.span`
636
+ display: inline-flex;
637
+ align-items: center;
638
+ gap: 8px;
639
+ font-size: 24px;
640
+ font-weight: 700;
641
+ color: ${r.text};
642
+ `,Mn=i.span`
643
+ display: flex;
644
+ flex-direction: column;
645
+ align-items: flex-end;
646
+ justify-content: center;
647
+ gap: 4px;
648
+ `;i.span`
649
+ font-size: 12px;
650
+ font-weight: 400;
651
+ line-height: 1;
652
+ color: ${r.muted};
653
+ `;const In=i(St)`
654
+ width: 30px;
655
+ height: 30px;
656
+ background: ${r.text};
657
+ -webkit-mask-size: 24px 24px;
658
+ mask-size: 24px 24px;
659
+ -webkit-mask-position: left center;
660
+ mask-position: left center;
661
+ `;i.button`
662
+ width: 100%;
663
+ height: 56px;
664
+ border: 0;
665
+ border-radius: ${Z.btn};
666
+ background: ${Fs.buyBtn};
667
+ color: ${r.softWhite};
668
+ font-size: 15px;
669
+ font-weight: 600;
670
+ letter-spacing: 0.046em;
671
+ text-transform: uppercase;
672
+ cursor: pointer;
673
+ transition: background-image 0.15s ease;
674
+
675
+ /* Primary hover/pressed is the solid Primary red (Figma 738:53252 / 738:53262) — the gradient is
676
+ the RESTING fill only. Painted as a flat GRADIENT, not a background-color: the shorthand can't
677
+ interpolate background-image, so gradient -> colour dropped the image midway while the colour was
678
+ still half transparent and the button visibly blinked. Same property both ends = a clean swap. */
679
+ &:hover:not(:disabled),
680
+ &:active:not(:disabled) {
681
+ background-image: linear-gradient(${r.dclRed}, ${r.dclRed});
682
+ }
683
+ &:disabled {
684
+ opacity: 0.6;
685
+ cursor: default;
686
+ }
687
+ `;const At=Le`
688
+ margin: 0;
689
+ font-size: 13px;
690
+ `,ve=i.p`
691
+ ${At};
692
+ `,Pn=i(Ts)`
693
+ ${At};
694
+ `,zn=i.div`
695
+ position: relative;
696
+ flex: 1 0 auto;
697
+ margin-top: 48px;
698
+ /* Below the gray band the cross-sell sits straight on the purple field (Figma) — hence no band of its
699
+ own. The padding is the whole gap from the top of the section to the heading; the shared carousel's
700
+ own top margin is zeroed below so the two don't stack. */
701
+ padding: 47px 0 24px;
702
+
703
+ & section {
704
+ margin-top: 0;
705
+ }
706
+ `;function Fe(o){if(Ss(o))return a("errors.rejected");const l=(o.message??"").toLowerCase();return l.includes("insufficient")?a("cart.error.insufficient",{currency:fa.name}):l.includes("no active listing")||l.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const An=12e4;function En(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,I)=>l+I.priceCredits*I.quantity,0),we=o=>o.flatMap(l=>Array.from({length:l.quantity},()=>({...l,quantity:1})));function Vn(){aa({title:a("nav.cart"),noindex:!0});const o=Q(e=>e.items),l=Q(e=>e.remove),I=Q(e=>e.increment),z=Q(e=>e.decrement),F=Q(e=>e.clear),V=Q(e=>e.restore),D=Q(e=>e.setFittingOpen),A=ot(e=>e.items),ne=ot(e=>e.toggle),{session:n,signIn:L}=sa(),Et=na(),le=ws().packs.slice(0,Cs);P.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Rt=o.some(e=>e.category!=="emote"),{data:Se}=ia({queryKey:["upsell-listings"],queryFn:()=>va({first:40}),staleTime:6e4}),{data:S}=ra(n),v=oa(),ee=Xt(),{state:Y}=Zt(),[qt,ie]=P.useState(null),[Ke,ue]=P.useState(null),[Bt,q]=P.useState(!1),[B,O]=P.useState(null),Ne=P.useRef(0),[g,j]=P.useState(null),{data:he}=ca(n),{data:re}=da(!0),[$e,Ue]=P.useState(""),oe=P.useRef(null),Qe=la(o),He=e=>dt(Qe[e.id]),Te=o.filter(He),Oe=o.length>0&&Te.length===0,_t=Te.reduce((e,s)=>e+s.priceCredits*s.quantity,0),Ft=o.reduce((e,s)=>e+s.quantity,0),Wt=Te.reduce((e,s)=>e+s.quantity,0),Ge=B?B.liveTotalCredits:_t,Lt=new Set(o.map(e=>e.id)),Ve=((Se==null?void 0:Se.items)??[]).filter(e=>!Lt.has(e.id)).slice(0,12),Kt=new Map(B==null?void 0:B.buyable.map(e=>[e.item.id,e])),pe=(S==null?void 0:S.credits)??0,Me=Ge*10,Nt=re?ct(Me,re):0n,Ie=Be({priceCents:Me,priceManaWei:Nt,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:he??0n}),Ut=e=>e.some(s=>s.acquisition==="store"),Pe=e=>e.flatMap(s=>s.acquisition==="trade"?[s]:[]),Qt=ga,Ht=e=>xa(e.contractAddress,String(e.itemId));function ge(e){e(),O(null),ue(null),ie(null)}function Ot(){j(null),q(!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),G("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}),q(!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,$=new Set,_=new Set,E=[];let R=!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:U,maxCreditedValue:X}=await ht(n.identity,p.usdCents,T,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:X,chainId:p.item.chainId}:{kind:"trade",trade:p.trade,credits:[U],maxCreditedValue:X})}catch(T){if($s(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=fs(y).length,k=x=>m>1?{current:x,total:m}:void 0,W=(x,p)=>j({phase:"processing",stage:x,step:s.length,total:s.length,signatures:k(p)}),K=x=>x<m?W("awaiting-signature",x+1):W("settling",m);W("awaiting-signature",1);let f=[];if(us())try{const x=new Map;f=await ys({purchases:y,buyer:n.address,signer:n.signer,onSigned:()=>K(m),onBroadcast:({txHash:C,salts:U})=>{x.set(C,U),U.forEach(X=>w.add(X))}});const p=await Promise.allSettled(f.map(C=>bs(C)));p.forEach((C,U)=>{const X=x.get(f[U])??[];C.status==="fulfilled"?(X.forEach(Ee=>$.add(Ee)),E.push(f[U])):C.reason instanceof bt||X.forEach(Ee=>_.add(Ee))});const T=p.flatMap(C=>C.status==="rejected"?[C.reason]:[]);if(T.length&&!T.some(C=>C instanceof bt))throw T[0];R=!0}catch(x){if(!(x instanceof vs)||!ya(n.providerType))throw x;f=await _e({purchases:y,buyer:n.address,signer:n.signer,onSigned:K,onBroadcast:({salts:p})=>p.forEach(T=>w.add(T)),onSettled:({txHash:p,salts:T})=>{T.forEach(C=>$.add(C)),E.push(p)},onReverted:({salts:p})=>p.forEach(T=>_.add(T))})}else f=await _e({purchases:y,buyer:n.address,signer:n.signer,onSigned:K,onBroadcast:({salts:x})=>x.forEach(p=>w.add(p)),onSettled:({txHash:x,salts:p})=>{p.forEach(T=>$.add(T)),E.push(x)},onReverted:({salts:x})=>x.forEach(p=>_.add(p))});e.forEach(x=>l(x.item.id)),O(null),G("Shop Completed Purchase",{...xe(d),payment_type:"credits",no_crypto_step:R,transaction_hash:f[0]??null}),yt(v);const b=oe.current;oe.current=null,j(null),q(!1);const N={items:c,txHash:f[0]??void 0,txHashes:f,settled:!0,...b?{creditsAdded:b}:{}};ee("/success",{state:N,replace:!0})}catch(y){fe(y)||ae(y,{flow:"cart_checkout",step:h,cart_size:e.length});const m=new Set([...w].filter(b=>!_.has(b))),{toRelease:k,boughtItemIds:W}=vt({reservations:u,spent:m,settled:$}),K=d.filter(b=>W.includes(b.id)),f=d.filter(b=>!W.includes(b.id));if(G(fe(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:h,error_code:pt(y),value_usd:lt(f.reduce((b,N)=>b+N.priceCredits,0)),cart_size:s.length,partial:K.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"]}),K.length>0){W.forEach(b=>l(b)),O(null),yt(v),G("Shop Completed Purchase",{...xe(K),payment_type:"credits",no_crypto_step:R,transaction_hash:E[0]??null,partial:!0}),j({phase:"error",message:a("cart.error.partiallyBought")}),q(!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),q(!1);const c={items:e,txHash:s[0]??void 0,txHashes:s,settled:!0,...d?{creditsAdded:d}:{}};ee("/success",{state:c,replace:!0})}function Je(e,s){fe(e)||ae(e,{flow:s,step:"submit"}),G(fe(e)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:pt(e)}),j({phase:"error",message:Fe(e)}),q(!1)}async function Gt(e,s){const d=ye(qe.MANAToken,s),c=ye(qe.CreditsManager,s);await ms({auth:{kind:xs.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",ut.chainId],queryFn:()=>ma(ut.chainId),staleTime:6e4})}catch{return}}async function Vt(e){const s=we(e).reduce((h,w)=>h+w.usdCents,0),c=(he??0n)>0n?await Xe():re,u=c?ct(s,c):0n;return{totalCents:s,manaWei:u}}async function Ze(e,s){const d=We(e),{totalCents:c,manaWei:u}=await Vt(e),h=Be({priceCents:c,priceManaWei:u,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:he??0n}),w=Ut(e)?{...h,options:h.options.filter($=>$.method==="credits")}:h;if(s&&w.options.some($=>$.method===s)){if(s==="credits"){ze(e);return}const{spender:$,chainId:_}=et(s,e);await tt($,_,()=>s==="mana"?void at(e):void st(e,c,u));return}if(w.options.some($=>$.method==="mana"||$.method==="combined")){j({phase:"choose",lines:e,totalCents:c,manaWei:u}),q(!1);return}if(S!=null&&S.credits<d){De(e);return}ze(e)}function Dt(e){return Be({priceCents:e.totalCents,priceManaWei:e.manaWei,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:he??0n})}const[Ae,me]=P.useState(null);function et(e,s){const d=Pe(s)[0].trade;return{spender:e==="mana"?ye(ba(d.contract),d.chainId).address:ye(qe.CreditsManager,d.chainId).address,chainId:d.chainId}}async function tt(e,s,d){const c=hs(s,e),u=n?await ps(c,n.address).catch(()=>!0):!0;if(gs(n==null?void 0:n.providerType,u)){q(!1),me({auth:c,run:d});return}d()}function Yt(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 cs({trades:Pe(s).map(w=>w.trade),buyer:n.address,signer:n.signer,onSigned:u});e.forEach(w=>l(w.item.id)),O(null),G("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=ds(c.map(m=>m.usdCents),(S==null?void 0:S.balanceCents)??0),$=w.reduce((m,k)=>m+k,0),_=ls(Math.max(0,s-$),s,d),E=[],R=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 N=m[f].item,{credit:x,maxCreditedValue:p}=await ht(n.identity,b,m[f].trade.id,N.contractAddress&&N.itemId!=null?{contractAddress:N.contractAddress,itemId:String(N.itemId)}:void 0);E.push({salt:x.id,itemId:N.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)+_).toString()},await Gt(n.signer,m[0].trade.chainId);const W=()=>j({phase:"processing",stage:"settling",step:c.length,total:c.length});j({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const K=await _e({purchases:k,buyer:n.address,signer:n.signer,onSigned:W,onBroadcast:({salts:f})=>f.forEach(b=>R.add(b)),onReverted:({salts:f})=>f.forEach(b=>y.add(b))});e.forEach(f=>l(f.item.id)),O(null),G("Shop Completed Purchase",{...xe(u),payment_type:"credits_and_mana",transaction_hash:K[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Ye(h,K)}catch(m){const{toRelease:k}=vt({reservations:E,spent:new Set([...R].filter(W=>!y.has(W))),settled:new Set});k.length&&Re(n.identity,k).catch(()=>{}),E.length&&v.invalidateQueries({queryKey:["usd-balance"]}),Je(m,"buy_cart_combined")}}async function te(e){if(!n){ft({type:"cart-checkout"}),L();return}const s=Q.getState().items.filter(He);if(s.length===0)return;ie(null),ue(null),q(!0);const d=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);G("Shop Started Checkout",{cart_size:s.length,cart_value_credits:d,cart_value_usd:lt(d),has_sufficient_credits:pe>=d});try{const c=await js(s,n.address,Qt,await Xe(),Ht),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(h=>l(h.id)),ue(En(c))),c.buyable.length===0){ie(a("cart.error.noneAvailable")),O(null);return}if(c.orderChanged){O(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{q(!1)}}async function nt(){if(B){if(!n){ft({type:"cart-checkout"}),L();return}if(Date.now()-Ne.current>An){O(null),ue(null),await te();return}ie(null),Ze(B.buyable)}}async function Jt(){if($e){try{sessionStorage.setItem(be,JSON.stringify(Q.getState().items))}catch{}q(!0);try{const e=await ks($e,n?{address:n.address,identity:n.identity}:void 0);if(e.url){window.location.href=e.url;return}ee("/credits")}catch(e){try{sessionStorage.removeItem(be)}catch{}ae(e,{flow:"cart_buy_credits"}),j({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const it=P.useRef(!1);P.useEffect(()=>{if(!n||it.current||!ns("cart-checkout"))return;it.current=!0;const e=setTimeout(()=>void te(),0);return()=>clearTimeout(e)},[n]);const rt=P.useRef(!1);P.useEffect(()=>{if(!(Y!=null&&Y.resumeCheckout)||rt.current)return;rt.current=!0,oe.current=Y.creditsAdded??null;try{const s=sessionStorage.getItem(be);if(s){sessionStorage.removeItem(be);const d=JSON.parse(s);Array.isArray(d)&&d.length&&V(d)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const e=setTimeout(()=>void te(),0);return()=>clearTimeout(e)},[Y==null?void 0:Y.resumeCheckout]);const J=Bt||(g==null?void 0:g.phase)==="processing";return o.length===0&&!g?t.jsx(wt,{children:t.jsxs(jt,{children:[t.jsxs(Ct,{onClick:()=>ee(-1),type:"button",children:[t.jsx(H,{name:"arrow-left"}),a("nav.cart")]}),t.jsxs(Ns,{"data-testid":"cart-empty",children:[t.jsx(H,{name:"cart-plus",size:110}),t.jsxs(Us,{children:[t.jsx(Qs,{children:a("cart.empty.title")}),t.jsx(Hs,{children:a("cart.empty.body")})]}),t.jsx(Os,{to:"/items",children:a("cart.empty.cta")})]})]})}):t.jsxs(wt,{children:[t.jsxs(jt,{children:[t.jsxs(Ct,{onClick:()=>ee(-1),type:"button",children:[t.jsx(H,{name:"arrow-left"}),a("nav.cart")]}),t.jsxs(Ws,{children:[t.jsxs(Ls,{children:[t.jsxs(Ks,{children:[t.jsx(Gs,{onClick:()=>ee(-1),type:"button","aria-label":a("cart.goBack"),children:t.jsx(H,{name:"arrow-left"})}),t.jsx(Vs,{children:a("cart.panelTitle",{count:Ft})}),Rt?t.jsxs(Ds,{onClick:()=>D(!0),disabled:J,children:[t.jsx(H,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),t.jsxs(It,{children:[t.jsx(Ys,{children:o.map(e=>{const s=Kt.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,$=d*h,_=ua(e),E=!!_&&!!A[_],R=ha(e),y=Qe[e.id],m=!dt(y),k=y==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return t.jsxs(Js,{"data-unavailable":m||void 0,children:[t.jsxs(Xs,{"data-thumb":!0,children:[R?t.jsx(Zs,{to:R,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(en,{"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(tn,{children:[t.jsxs(an,{"data-desc":!0,children:[R?t.jsx(nn,{to:R,state:{item:e,tradeId:e.tradeId},title:e.name,children:e.name}):t.jsx(sn,{title:e.name,children:e.name}),e.creator?t.jsx(rn,{address:e.creator,linkToProfile:!0}):null,Et&&u?t.jsxs(fn,{"data-testid":"cart-creator-tag",children:[t.jsx(yn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),t.jsx(on,{children:m?t.jsxs(t.Fragment,{children:[t.jsxs(gn,{children:[t.jsx(mn,{name:"warning-fill",size:24}),k]}),R?t.jsx(xn,{to:R,state:{item:e,tradeId:e.tradeId},children:a("cart.availability.viewResales")}):null]}):t.jsxs(t.Fragment,{children:[u?t.jsxs(cn,{children:[t.jsx(kt,{onClick:()=>ge(()=>z(e.id)),disabled:J||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(dn,{children:h}),t.jsx(kt,{onClick:()=>ge(()=>I(e.id)),disabled:J||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(ln,{children:[t.jsx(un,{})," ",$,c?t.jsx(hn,{children:e.priceCredits*h}):null]})]})})]}),t.jsxs(pn,{children:[_?t.jsx(bn,{"data-on":E||void 0,onClick:()=>ne(e),"aria-label":E?a("cart.removeFromFavorites",{name:e.name}):a("cart.addToFavorites",{name:e.name}),title:E?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:t.jsx(H,{name:E?"heart-solid":"heart"})}):null,t.jsx(vn,{onClick:()=>ge(()=>l(e.id)),disabled:J,"aria-label":a("cart.remove",{name:e.name}),title:a("cart.removeTitle"),children:t.jsx(H,{name:"trash",size:24})})]})]},e.id)})}),t.jsx(wn,{children:t.jsx("button",{className:"link",onClick:()=>ge(F),disabled:J,children:a("cart.clearCart")})})]})]}),t.jsxs(Cn,{children:[t.jsx(jn,{children:a("cart.purchaseSummary")}),t.jsxs(kn,{children:[t.jsxs(Sn,{children:[t.jsx($n,{children:a("cart.totalItems",{count:Wt})}),t.jsx(Mn,{children:t.jsxs(Tn,{children:[t.jsx(In,{})," ",Ge]})})]}),t.jsx($t,{options:Ie.options,totalCents:Me,shortfall:Ie.manaShortfall,showCreditsAmount:!1,creditsLabel:B?a("marketCheckout.confirmPurchase"):Ie.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:J||Oe,onPay:e=>void(B?nt():te(e)),creditsFallback:{label:J?a("cart.working"):B?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(B?nt():te())}}),Oe?t.jsx(ve,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:t.jsx(ve,{className:"muted",children:a("cart.signInHint")}),B?t.jsx(ve,{className:"muted",children:a("cart.priceChanged")}):null,Ke?t.jsx(ve,{className:"muted",children:Ke}):null,t.jsx(Pn,{message:qt})]})]})]})]}),Ve.length>0?t.jsx(zn,{children:t.jsx(is,{title:a("cart.youMightAlsoLike"),items:Ve})}):null,Ae&&n?t.jsx(rs,{auth:Ae.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:t.jsx("img",{src:os,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(qs,{phase:g.phase,balanceCredits:pe,onClose:Ot,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:pa(n==null?void 0:n.providerType),signatures:g.phase==="processing"?g.signatures:void 0,options:g.phase==="choose"?Dt(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"?We(g.lines):void 0,lines:g.phase==="nofunds"?g.lines:void 0,shortfallCredits:g.phase==="nofunds"?g.shortfall:void 0,packs:le,selectedPack:$e,onSelectPack:Ue,onBuyPacks:()=>void Jt(),message:g.phase==="error"?g.message:void 0,onRetry:()=>void te()}):null]})}export{Vn as Cart};