@dcl/shop 0.7.3-30998099552.commit-f7fa6e3 → 0.7.3-31002809274.commit-68e2004

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 (176) hide show
  1. package/_assets/Activity-DRU10G0s.js +381 -0
  2. package/_assets/{AnimatedBackground-xf-j6J30.js → AnimatedBackground-BPNjZnHs.js} +1 -1
  3. package/_assets/{Assets-B9oJjG4n.js → Assets-B9gu6JnA.js} +13 -13
  4. package/_assets/{Assets.styles-BYFeJKPe.js → Assets.styles-DiCnesUC.js} +1 -1
  5. package/_assets/{Authorizations-D5dl-34t.js → Authorizations-BQzDrrA_.js} +1 -1
  6. package/_assets/{Cart-BU0E1kp3.js → Cart-BHkq2PkV.js} +2 -2
  7. package/_assets/{CircularProgress-ogI8F2v0.js → CircularProgress-CQb8cfhx.js} +1 -1
  8. package/_assets/{Collection--mvsoerx.js → Collection-DvApaJVE.js} +1 -1
  9. package/_assets/{CollectionCarousel-DVB8xJEb.js → CollectionCarousel-3Ff7fmHM.js} +6 -6
  10. package/_assets/{Creator-BuMUJ_0H.js → Creator-phXYNMmi.js} +6 -6
  11. package/_assets/{ErrorNotice-CmE8Bw2a.js → ErrorNotice-Biw7jacR.js} +1 -1
  12. package/_assets/{ExchangeController-ptA9AGiC.js → ExchangeController-j0EaU5ur.js} +1 -1
  13. package/_assets/{Faq-mPkwptjW.js → Faq-CYehw8Xd.js} +1 -1
  14. package/_assets/{GetCredits-kPP7odsJ.js → GetCredits-B5t5SiEY.js} +15 -15
  15. package/_assets/{Grow-2tBlbsbN.js → Grow-BbO3nPWz.js} +1 -1
  16. package/_assets/{HelpersUtil-BhMvvX5p.js → HelpersUtil-Bm2I2riv.js} +1 -1
  17. package/_assets/{ItemDetail-BBfILay8.js → ItemDetail-D-C6pe19.js} +333 -333
  18. package/_assets/LazyEmoteControls-BxXOD9g-.js +2 -0
  19. package/_assets/{LoadMore-CPMkfBBp.js → LoadMore-DMhOO7Nq.js} +1 -1
  20. package/_assets/{ManaPricingBanner.styles-C9hjNdio.js → ManaPricingBanner.styles-D0ksfubq.js} +1 -1
  21. package/_assets/{MyAssets-CkicCdty.js → MyAssets-pppiT6fl.js} +1 -1
  22. package/_assets/{MyFavorites-CRs6BUTO.js → MyFavorites-B8NF0NVk.js} +1 -1
  23. package/_assets/{NotFound-DbXDxLPP.js → NotFound-ySn_lkJ7.js} +1 -1
  24. package/_assets/{NotificationsBell-CeytqPp_.js → NotificationsBell-Mz-RqcfB.js} +1 -1
  25. package/_assets/{OutfitDetail-DhAPMkez.js → OutfitDetail-dru3bX0e.js} +1 -1
  26. package/_assets/{OutfitPreview-C08Jf7mn.js → OutfitPreview-RhS9kvYc.js} +1 -1
  27. package/_assets/{OutfitStudio-Bpg_2rBv.js → OutfitStudio-B-MkV2Nw.js} +1 -1
  28. package/_assets/{StoreSettings-CkHNFMS9.js → StoreSettings-DMlPpaxq.js} +1 -1
  29. package/_assets/{Success-CXkJDsIM.js → Success-DGiWm-dB.js} +1 -1
  30. package/_assets/{SwapController-CNP2nUqB.js → SwapController-DC-RT5b2.js} +1 -1
  31. package/_assets/{Tooltip-Ca1xi18J.js → Tooltip-DIS1AoSo.js} +1 -1
  32. package/_assets/{TradeService-pK5iIjeI.js → TradeService-CW14jFoK.js} +1 -1
  33. package/_assets/{W3MFrameProviderSingleton-FyX1W-1Y.js → W3MFrameProviderSingleton-Bn14TsAB.js} +3 -3
  34. package/_assets/{WebCryptoP256-lGIWaHSV.js → WebCryptoP256-DN6bPKJH.js} +1 -1
  35. package/_assets/{authorizations-C776tgTp.js → authorizations-BJlchz9P.js} +1 -1
  36. package/_assets/{basic-B5CZMUy4.js → basic-Db4hGFC-.js} +1 -1
  37. package/_assets/{biconomy-BcosBJNp.js → biconomy-yx9AAdUi.js} +1 -1
  38. package/_assets/{builder-CsxZ_GQ8.js → builder-Db8kqGSp.js} +1 -1
  39. package/_assets/{buy-BZ3zKYDO.js → buy-DHqPe2Je.js} +1 -1
  40. package/_assets/{buy-gasless-eYZufj8D.js → buy-gasless-CvTXQoUY.js} +1 -1
  41. package/_assets/{categories-Bhx5AiD0.js → categories-BMCKe30t.js} +1 -1
  42. package/_assets/{ccip-DmdM_5D9.js → ccip-DSJk995u.js} +1 -1
  43. package/_assets/{ccip-DrUklMi-.js → ccip-kyphTkC8.js} +1 -1
  44. package/_assets/{collectionPage.styles-CJq9b5Dn.js → collectionPage.styles-Dmgr28GG.js} +1 -1
  45. package/_assets/{controller-C-sKqF34.js → controller-BxSHfLz5.js} +2 -2
  46. package/_assets/{core-CriR9cGd.js → core-FJbXZcd9.js} +4 -4
  47. package/_assets/{createSvgIcon-BntPICgm.js → createSvgIcon-BVj0atRc.js} +1 -1
  48. package/_assets/{custom-FzLs4-KY.js → custom-8lpWNVH1.js} +1 -1
  49. package/_assets/{data-capture-Du1PLWpA.js → data-capture-ZsoqccWO.js} +1 -1
  50. package/_assets/{email-C0nzy1sI.js → email-TmqKH5rK.js} +1 -1
  51. package/_assets/{embedded-wallet-CVZ_vFlC.js → embedded-wallet-D8AjSmuZ.js} +1 -1
  52. package/_assets/{emotion-styled.browser.esm-CJtlF7Gn.js → emotion-styled.browser.esm-B1CecDgm.js} +1 -1
  53. package/_assets/{engine-Cn3nxRwN.js → engine-CTKRqGmj.js} +1 -1
  54. package/_assets/{errors-C-i7myPZ.js → errors-CCUK8cBW.js} +1 -1
  55. package/_assets/{estimate-l1-fee-Dpb0Bl0S.js → estimate-l1-fee-DpS-XaOF.js} +1 -1
  56. package/_assets/{execute-wHrMFCta.js → execute-Bz7pyjbp.js} +2 -2
  57. package/_assets/{features-5HsC8l6J.js → features-W9H6sjcF.js} +1 -1
  58. package/_assets/{fetchTokenMetadata-MnlAMPaL.js → fetchTokenMetadata-COd7SGVt.js} +2 -2
  59. package/_assets/{field.styles-BIjk7dlh.js → field.styles-CdYHVXFs.js} +1 -1
  60. package/_assets/{get-ecosystem-wallet-info-BtHiGyT4.js → get-ecosystem-wallet-info-CMuxAyIB.js} +1 -1
  61. package/_assets/{getBalance-BFjfr7yO.js → getBalance-DQubrLKJ.js} +1 -1
  62. package/_assets/{getNFT-T59O6JYG.js → getNFT-BNY2enZa.js} +1 -1
  63. package/_assets/{getNFT-zUEFFArE.js → getNFT-CSRtW3h-.js} +1 -1
  64. package/_assets/{grid.styles-CKmGs0rK.js → grid.styles-DH_ZretM.js} +1 -1
  65. package/_assets/{hashTypedData-EoQ_H9e4.js → hashTypedData-BA0RWbmG.js} +1 -1
  66. package/_assets/{hashTypedData-CCw0LbC7.js → hashTypedData-Dqqcre1R.js} +1 -1
  67. package/_assets/{in-app-BpY0Ul44.js → in-app-BvYCjHKb.js} +1 -1
  68. package/_assets/{in-app-wallet-calls-_O1gpzp1.js → in-app-wallet-calls-CxpZt-vc.js} +1 -1
  69. package/_assets/{index-CzGc0rp2.js → index-4grC8vnQ.js} +16 -16
  70. package/_assets/{index-CS3o6W8g.js → index-B91rfq1c.js} +1 -1
  71. package/_assets/{index-CQi6H5fT.js → index-BDuns4Lg.js} +1 -1
  72. package/_assets/{index-BF0Lz5Vl.js → index-BGOWhyHo.js} +3 -3
  73. package/_assets/{index-DlhjzwF5.js → index-BJNlk-SI.js} +1 -1
  74. package/_assets/{index-DGpSfYbI.js → index-BfAg05xe.js} +1 -1
  75. package/_assets/{index-BCeaifQW.js → index-BiAcVSuI.js} +1 -1
  76. package/_assets/{index-BB2qMLiD.js → index-BjtZr1Rk.js} +1 -1
  77. package/_assets/{index-B64uIzbz.js → index-Bl9hxKO2.js} +1 -1
  78. package/_assets/{index-Cc8-wJI-.js → index-BmtMCuH8.js} +1 -1
  79. package/_assets/{index-DM4Lw-b2.js → index-BogeqjBp.js} +1 -1
  80. package/_assets/{index-CrkAzP5M.js → index-BpsXe6IR.js} +1 -1
  81. package/_assets/{index-D9BXwvii.js → index-Bqt5iJBo.js} +1 -1
  82. package/_assets/{index-kGUEZDex.js → index-BsEcuD0O.js} +2 -2
  83. package/_assets/{index-C2wq-XJv.js → index-Bw6vREOp.js} +2 -2
  84. package/_assets/{index-vw2DCGCa.js → index-C-IYvYAw.js} +1 -1
  85. package/_assets/{index-0HOZkX4v.js → index-C0jkYp6u.js} +1 -1
  86. package/_assets/{index-GFGo0kL7.js → index-CN8Fwkg_.js} +2 -2
  87. package/_assets/{index-DlNMwZA0.js → index-CNDHrB-N.js} +1 -1
  88. package/_assets/{index-DqNNmcTE.js → index-CRKbJ2OP.js} +1 -1
  89. package/_assets/{index-DUGnqqvn.js → index-CTvMZ0av.js} +1 -1
  90. package/_assets/{index-51jxmcXj.js → index-CefOdSuo.js} +1 -1
  91. package/_assets/{index-DQOXE4dt.js → index-Cfy91mWw.js} +1 -1
  92. package/_assets/{index-CME7Vo6o.js → index-Ch2NaYC8.js} +1 -1
  93. package/_assets/{index-D_vtI9c4.js → index-Cj_FIJ6O.js} +1 -1
  94. package/_assets/{index-DYmEn4kI.js → index-CkZ39O4D.js} +1 -1
  95. package/_assets/{index-DnlGx8cM.js → index-Cr_vaK1b.js} +1 -1
  96. package/_assets/{index-BRr_EKCC.js → index-CtwVaZjN.js} +1 -1
  97. package/_assets/{index-D7izat5n.js → index-CuJbAAma.js} +1 -1
  98. package/_assets/index-CxlN6NCL.js +519 -0
  99. package/_assets/{index-Dg35ZiF4.js → index-DAPvhTCu.js} +1 -1
  100. package/_assets/{index-B9oBk5HA.js → index-DBGfpyip.js} +1 -1
  101. package/_assets/{index-DZMkGxa1.js → index-DBkJBt2j.js} +2 -2
  102. package/_assets/{index-CoGa5SSH.js → index-DBwuf2dy.js} +1 -1
  103. package/_assets/{index-Dv_iHgrg.js → index-DDe_P04W.js} +1 -1
  104. package/_assets/{index-sTbvrDBI.js → index-DFAt726n.js} +1 -1
  105. package/_assets/{index-B5t_uF6K.js → index-DFCfS17C.js} +1 -1
  106. package/_assets/{index-jOzdgfRR.js → index-DIYqluqo.js} +3 -3
  107. package/_assets/{index-Ca53lSVK.js → index-DLrjz4Tx.js} +1 -1
  108. package/_assets/{index-BmNvCSoW.js → index-DOPim6Hs.js} +1 -1
  109. package/_assets/{index-DPS0nlZt.js → index-DYoWqsAK.js} +1 -1
  110. package/_assets/{index-BuJNwdV6.js → index-DZOsxVd8.js} +1 -1
  111. package/_assets/{index-GWS5y9G8.js → index-DhygeoM5.js} +3 -3
  112. package/_assets/{index-ClfJzt8j.js → index-DsSWYz9j.js} +1 -1
  113. package/_assets/{index-JQtE4iI3.js → index-DtS2WMUT.js} +1 -1
  114. package/_assets/{index-DV8-2bkd.js → index-Lb7odxFK.js} +1 -1
  115. package/_assets/{index-CsqetYWp.js → index-Vcg4k-hF.js} +1 -1
  116. package/_assets/{index-CdmR3BSr.js → index-WguW8tuP.js} +1 -1
  117. package/_assets/{index-i1mgkVNo.js → index-Wj_hpWlf.js} +1 -1
  118. package/_assets/{index-C7-Ojv7c.js → index-jjnXqv_1.js} +1 -1
  119. package/_assets/{index-yDlokE4U.js → index-o5wXH6k1.js} +1 -1
  120. package/_assets/{index-CfiGBXge.js → index-vZmAzias.js} +1 -1
  121. package/_assets/{index.es-B7FTFVs9.js → index.es-DRPff5jo.js} +1 -1
  122. package/_assets/{index.es-D3zyWO6O.js → index.es-Db0bppXh.js} +4 -4
  123. package/_assets/{index.es-Wz_yp4qN.js → index.es-vm3av0ZU.js} +1 -1
  124. package/_assets/{localBatchGatewayRequest-IY4oys4m.js → localBatchGatewayRequest-BT4bgYX3.js} +1 -1
  125. package/_assets/{networks-BebUw28a.js → networks-BjCyq87b.js} +1 -1
  126. package/_assets/{onramp-D2PuULiP.js → onramp-MxLeUwo5.js} +1 -1
  127. package/_assets/{openzeppelin-BtInW1Ne.js → openzeppelin-NiqHvD0o.js} +1 -1
  128. package/_assets/{parseNft-BbiDwhFE.js → parseNft-DXKUZt78.js} +2 -2
  129. package/_assets/{parseSignature-VUChb_Hq.js → parseSignature-CHSFJk_c.js} +1 -1
  130. package/_assets/{parseSignature-CZ5Ggg8p.js → parseSignature-JjWPQjiQ.js} +3 -3
  131. package/_assets/{passkeys-CrgnuTyv.js → passkeys-Dp5NPgWw.js} +1 -1
  132. package/_assets/{pay-with-exchange-DUrkH5ym.js → pay-with-exchange-CxuzzGwq.js} +1 -1
  133. package/_assets/{qr-overlay-ijYN5Vs4.js → qr-overlay-C29AmkL1.js} +1 -1
  134. package/_assets/{receive-Df4kzGm0.js → receive-BSxHY6Lk.js} +1 -1
  135. package/_assets/{resolveImplementation-DoFz-4vS.js → resolveImplementation-DBwFo6J8.js} +1 -1
  136. package/_assets/{rpc-BiHC0M3Z.js → rpc-B7hkwqRp.js} +1 -1
  137. package/_assets/{secp256k1-Ba1R5SHp.js → secp256k1-80kUQxfu.js} +1 -1
  138. package/_assets/{secp256k1-Hu9Q-jih.js → secp256k1-BmlNWGtD.js} +1 -1
  139. package/_assets/{secp256k1-CqT0-B8H.js → secp256k1-dBN4ORWU.js} +1 -1
  140. package/_assets/{send-Ca_D-CGF.js → send-C63T079L.js} +1 -1
  141. package/_assets/{send-batch-transaction-D5lSDwIa.js → send-batch-transaction-BkwLmlea.js} +1 -1
  142. package/_assets/{send-eip712-transaction-BsmSzzO5.js → send-eip712-transaction-6nm-uQAt.js} +2 -2
  143. package/_assets/{send-gasless-transaction-DzCl7yj5.js → send-gasless-transaction-ASekpRez.js} +2 -2
  144. package/_assets/{send-transaction-D_KZubhG.js → send-transaction-Bzhp2g8b.js} +2 -2
  145. package/_assets/{sendMetaTransaction-DcJMER59.js → sendMetaTransaction-BATUzHIf.js} +1 -1
  146. package/_assets/{sendRawTransaction-5I-l2w6Z.js → sendRawTransaction-_Kv849f3.js} +3 -3
  147. package/_assets/{serializeTransaction-a4pMp0ix.js → serializeTransaction-ZzhlS1TB.js} +1 -1
  148. package/_assets/{session-proposal-CjeffhTm.js → session-proposal-DzR3pRyS.js} +1 -1
  149. package/_assets/{session-request-KYwaaBai.js → session-request-VXo9pQwV.js} +2 -2
  150. package/_assets/{signing-BPM_yuD2.js → signing-CGrYz3PN.js} +3 -3
  151. package/_assets/{socials-CyoLEAYb.js → socials-B-JrWB2l.js} +1 -1
  152. package/_assets/styled-gTPQAN-Y.js +9 -0
  153. package/_assets/{swaps-CHWvOItb.js → swaps-CyAk4mTe.js} +1 -1
  154. package/_assets/{thirdweb-B3GtfZBZ.js → thirdweb-8szcRqMp.js} +3 -3
  155. package/_assets/{to-serializable-transaction-BCzBTrGx.js → to-serializable-transaction-CF8YxIRs.js} +2 -2
  156. package/_assets/{trade-encoding-Dg6aX8Te.js → trade-encoding-dpFoczNW.js} +1 -1
  157. package/_assets/{transactionReceipt-9LyDGJEz.js → transactionReceipt-CGVPV54W.js} +1 -1
  158. package/_assets/{transactions-YKwAIvIG.js → transactions-BIRi6SwZ.js} +1 -1
  159. package/_assets/{useCreditPacks-DsT6A2e-.js → useCreditPacks-B-X7zfCn.js} +1 -1
  160. package/_assets/{useImportable-CvtcuX0v.js → useImportable-C11MUaBr.js} +1 -1
  161. package/_assets/{useInfiniteGrid-BiMca1S0.js → useInfiniteGrid-6IGMMT5_.js} +1 -1
  162. package/_assets/{useTheme-BI7R38Jr.js → useTheme-BwoD3vEY.js} +1 -1
  163. package/_assets/{verifyHash-BsfyvwnN.js → verifyHash-C5CdkBh3.js} +1 -1
  164. package/_assets/{w3m-modal-OMDv8WwL.js → w3m-modal-B3F6Mnna.js} +1 -1
  165. package/_assets/{w3m-modal-Dv-jrE6G.js → w3m-modal-B3GHykWz.js} +1 -1
  166. package/_assets/{wait-for-tx-receipt-D5ZFHFzh.js → wait-for-tx-receipt-C_FjDUYj.js} +1 -1
  167. package/_assets/{wallets-NAyG3Q1E.js → wallets-DzQ1vri5.js} +5 -5
  168. package/_assets/{web-connector-5UlEROZA.js → web-connector-B4iFaMmt.js} +3 -3
  169. package/_assets/{writeContract-BOezSMv9.js → writeContract-DaZaDo8I.js} +1 -1
  170. package/_assets/{zoraTestnet-CsqEhrXT.js → zoraTestnet-W4T_ajaY.js} +1 -1
  171. package/index.html +11 -11
  172. package/package.json +2 -2
  173. package/_assets/Activity-CcCu8Od6.js +0 -384
  174. package/_assets/LazyEmoteControls-8b5UZhSs.js +0 -2
  175. package/_assets/index-BqhVw7jY.js +0 -476
  176. package/_assets/styled-DxV2l543.js +0 -9
@@ -1,4 +1,4 @@
1
- import{j as i,L as _,r as P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,o as D,q as F,d as e,k as G,v as O,I as b,w as B,n as w,x as K,c as Q,y as H,z as A,A as X,D as Z,E}from"./index-CzGc0rp2.js";import{d as J,f as U,b as V,h as Y,s as tt,a as it}from"./authorizations-C776tgTp.js";import{f as et}from"./builder-CsxZ_GQ8.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-C-i7myPZ.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DcJMER59.js";const nt=D`
1
+ import{j as i,L as _,r as P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,o as D,q as F,d as e,k as G,v as O,I as b,w as B,n as w,x as K,c as Q,y as H,z as A,A as X,D as Z,E}from"./index-4grC8vnQ.js";import{d as J,f as U,b as V,h as Y,s as tt,a as it}from"./authorizations-BJlchz9P.js";import{f as et}from"./builder-Db8kqGSp.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-CCUK8cBW.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-BATUzHIf.js";const nt=D`
2
2
  to { transform: rotate(360deg); }
3
3
  `,st=D`
4
4
  to { background-position: -200% 0; }
@@ -1,4 +1,4 @@
1
- import{j as e,L as $e,r as P,d as ta,b as aa}from"./react-DehiWSvs.js";import{t as ue,s as i,d as a,az as le,b5 as sa,ay as na,I as H,w as Mt,af as Ue,q as ia,Q as N,ah as dt,k as ra,l as oa,n as ca,b6 as da,x as la,b7 as ua,ai as ha,b8 as pa,b9 as lt,ba as ga,bb as xa,v as ma,bc as ut,S as G,bd as ht,be as fa,A as ae,r as ya,c as pt,bf as ba,e as va,bg as gt,bh as _e,bi as ye,bj as be,bk as xt,g as ve,a as wa,C as We,bl as Ca}from"./index-CzGc0rp2.js";import{M as ja,S as ka,C as Sa,H as $a,a as Ma,T as Ta,X as Ia,b as Pa,B as za,c as Aa,d as mt,e as Ea,f as ke,P as Tt,m as qa,g as Ba,h as Ra,i as _a,j as It,k as Se,L as Wa,l as Fa,n as ft,o as yt,W as La,p as Ka,q as Qa,A as Ua,r as Na,s as Ha,t as Oa,u as Va,v as Ga,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 Fe,N as is,O as rs,Q as os,R as cs,U as bt,V as vt,Y as ds,Z as ls,_ as us}from"./CollectionCarousel-DVB8xJEb.js";import{j as hs,k as ps,a as gs,n as xs,i as ms,A as fs}from"./authorizations-C776tgTp.js";import{g as ys,b as Le}from"./buy-BZ3zKYDO.js";import{b as bs,w as vs,S as wt,G as ws}from"./buy-gasless-eYZufj8D.js";import{u as Cs,M as js,R as we,r as ks,c as Ss,p as Ct}from"./useCreditPacks-DsT6A2e-.js";import{i as $s,a as Ms}from"./errors-C-i7myPZ.js";import{E as Ts}from"./ErrorNotice-CmE8Bw2a.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-Dg6aX8Te.js";import"./sendMetaTransaction-DcJMER59.js";const{colors:se,radius:Is}=ue,Ps=i.div`
1
+ import{j as e,L as $e,r as P,d as ta,b as aa}from"./react-DehiWSvs.js";import{t as ue,s as i,d as a,az as le,b5 as sa,ay as na,I as H,w as Mt,af as Ue,q as ia,Q as N,ah as dt,k as ra,l as oa,n as ca,b6 as da,x as la,b7 as ua,ai as ha,b8 as pa,b9 as lt,ba as ga,bb as xa,v as ma,bc as ut,S as G,bd as ht,be as fa,A as ae,r as ya,c as pt,bf as ba,e as va,bg as gt,bh as _e,bi as ye,bj as be,bk as xt,g as ve,a as wa,C as We,bl as Ca}from"./index-4grC8vnQ.js";import{M as ja,S as ka,C as Sa,H as $a,a as Ma,T as Ta,X as Ia,b as Pa,B as za,c as Aa,d as mt,e as Ea,f as ke,P as Tt,m as qa,g as Ba,h as Ra,i as _a,j as It,k as Se,L as Wa,l as Fa,n as ft,o as yt,W as La,p as Ka,q as Qa,A as Ua,r as Na,s as Ha,t as Oa,u as Va,v as Ga,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 Fe,N as is,O as rs,Q as os,R as cs,U as bt,V as vt,Y as ds,Z as ls,_ as us}from"./CollectionCarousel-3Ff7fmHM.js";import{j as hs,k as ps,a as gs,n as xs,i as ms,A as fs}from"./authorizations-BJlchz9P.js";import{g as ys,b as Le}from"./buy-DHqPe2Je.js";import{b as bs,w as vs,S as wt,G as ws}from"./buy-gasless-CvTXQoUY.js";import{u as Cs,M as js,R as we,r as ks,c as Ss,p as Ct}from"./useCreditPacks-B-X7zfCn.js";import{i as $s,a as Ms}from"./errors-CCUK8cBW.js";import{E as Ts}from"./ErrorNotice-Biw7jacR.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-dpFoczNW.js";import"./sendMetaTransaction-BATUzHIf.js";const{colors:se,radius:Is}=ue,Ps=i.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -58,7 +58,7 @@ import{j as e,L as $e,r as P,d as ta,b as aa}from"./react-DehiWSvs.js";import{t
58
58
  font-weight: 700;
59
59
  color: ${se.text};
60
60
  }
61
- `,Bs="https://cdn.decentraland.org/@dcl/shop/0.7.3-30998099552.commit-f7fa6e3/_assets/buy-error-22UunaPC.png";function Rs(o){const{phase:l,balanceCredits:I,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 e.jsxs(ja,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ka,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(Sa,{"data-tall":Y||void 0,children:[e.jsxs($a,{children:[e.jsxs(Ma,{children:[e.jsx(Ta,{children:D}),!W&&e.jsx(Ia,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(Pa,{})})]}),e.jsxs(za,{children:[e.jsx(Aa,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(mt,{}),e.jsx(Ea,{children:le(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(qs,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(mt,{}),le(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=qa(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(_s,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.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"&&e.jsxs(ke,{children:[e.jsxs(Ba,{"data-testid":"buy-error",children:[e.jsx(Ra,{src:Bs,alt:"",width:64,height:80}),e.jsxs(_a,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx(Se,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(Se,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function _s({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(ke,{"data-processing":!0,children:[e.jsx(Wa,{src:sa,alt:"",width:61,height:61}),e.jsx(Fa,{children:ne}),D?e.jsxs(Ps,{children:[e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(zs,{children:[l,"/",I]}):null]}):e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{})})]})}function Ws({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(ke,{children:[e.jsxs(La,{"data-testid":"nofunds-warning",children:[e.jsx(Ka,{}),e.jsxs(Qa,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(As,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Ua,{children:[e.jsx(Na,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ha,{children:[e.jsxs("div",{children:[e.jsxs(Oa,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?e.jsx(Es,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Va,{address:n.item.creator}):null]}),e.jsxs(Ga,{children:[e.jsx(Da,{}),e.jsx("span",{children:le(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Ya,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ja,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Xa,{}),e.jsx(Za,{children:le(n.credits)}),e.jsxs(es,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(ts,{children:[e.jsxs(as,{children:[e.jsx(ss,{}),e.jsx("span",{children:le((A==null?void 0:A.credits)??0)})]}),e.jsxs(ns,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(It,{children:[e.jsx(Se,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),e.jsx(Se,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Pt,radius:Z}=ue,zt="@media (max-width: 1080px)",T="@media (max-width: 880px)",jt=i.div`
61
+ `,Bs="https://cdn.decentraland.org/@dcl/shop/0.7.3-31002809274.commit-68e2004/_assets/buy-error-22UunaPC.png";function Rs(o){const{phase:l,balanceCredits:I,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 e.jsxs(ja,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ka,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(Sa,{"data-tall":Y||void 0,children:[e.jsxs($a,{children:[e.jsxs(Ma,{children:[e.jsx(Ta,{children:D}),!W&&e.jsx(Ia,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(Pa,{})})]}),e.jsxs(za,{children:[e.jsx(Aa,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(mt,{}),e.jsx(Ea,{children:le(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(qs,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(mt,{}),le(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=qa(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(_s,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.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"&&e.jsxs(ke,{children:[e.jsxs(Ba,{"data-testid":"buy-error",children:[e.jsx(Ra,{src:Bs,alt:"",width:64,height:80}),e.jsxs(_a,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx(Se,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(Se,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function _s({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(ke,{"data-processing":!0,children:[e.jsx(Wa,{src:sa,alt:"",width:61,height:61}),e.jsx(Fa,{children:ne}),D?e.jsxs(Ps,{children:[e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(zs,{children:[l,"/",I]}):null]}):e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{})})]})}function Ws({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(ke,{children:[e.jsxs(La,{"data-testid":"nofunds-warning",children:[e.jsx(Ka,{}),e.jsxs(Qa,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(As,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Ua,{children:[e.jsx(Na,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ha,{children:[e.jsxs("div",{children:[e.jsxs(Oa,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?e.jsx(Es,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Va,{address:n.item.creator}):null]}),e.jsxs(Ga,{children:[e.jsx(Da,{}),e.jsx("span",{children:le(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Ya,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ja,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Xa,{}),e.jsx(Za,{children:le(n.credits)}),e.jsxs(es,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(ts,{children:[e.jsxs(as,{children:[e.jsx(ss,{}),e.jsx("span",{children:le((A==null?void 0:A.credits)??0)})]}),e.jsxs(ns,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(It,{children:[e.jsx(Se,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),e.jsx(Se,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Pt,radius:Z}=ue,zt="@media (max-width: 1080px)",T="@media (max-width: 880px)",jt=i.div`
62
62
  max-width: 1510px;
63
63
  margin: 0 auto;
64
64
  /* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
@@ -1,4 +1,4 @@
1
- import{ab as N,ac as U,ad as o,ae as n,af as D,o as M}from"./index-CzGc0rp2.js";import{r as w,j as g}from"./react-DehiWSvs.js";import{g as z,a as E,c as I,b as F}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-DxV2l543.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
1
+ import{ab as N,ac as U,ad as o,ae as n,af as D,o as M}from"./index-4grC8vnQ.js";import{r as w,j as g}from"./react-DehiWSvs.js";import{g as z,a as E,c as I,b as F}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-gTPQAN-Y.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bm as ee,W as te,y as z,bn as ae,bo as oe,I as ie,d as a,c as re,A as se,n as ne,q as ce,e as le,ak as F,al as de,bp as pe,bq as xe}from"./index-CzGc0rp2.js";import{E as me}from"./ErrorNotice-CmE8Bw2a.js";import{d as he,P as ue,C as ge,a as be,b as fe,A as ve}from"./collectionPage.styles-CJq9b5Dn.js";import{S as L,C as ye,F as je,c as we,P as Ce,d as $e,H as ke,e as Ne}from"./categories-Bhx5AiD0.js";import{L as Ae}from"./LoadMore-CPMkfBBp.js";import{u as Pe}from"./useInfiniteGrid-BiMca1S0.js";import{G as Se}from"./grid.styles-CKmGs0rK.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const Me=s.section`
1
+ import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bm as ee,W as te,y as z,bn as ae,bo as oe,I as ie,d as a,c as re,A as se,n as ne,q as ce,e as le,ak as F,al as de,bp as pe,bq as xe}from"./index-4grC8vnQ.js";import{E as me}from"./ErrorNotice-Biw7jacR.js";import{d as he,P as ue,C as ge,a as be,b as fe,A as ve}from"./collectionPage.styles-Dmgr28GG.js";import{S as L,C as ye,F as je,c as we,P as Ce,d as $e,H as ke,e as Ne}from"./categories-BMCKe30t.js";import{L as Ae}from"./LoadMore-DMhOO7Nq.js";import{u as Pe}from"./useInfiniteGrid-6IGMMT5_.js";import{G as Se}from"./grid.styles-DH_ZretM.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const Me=s.section`
2
2
  position: relative;
3
3
  border-radius: ${b.radius.card};
4
4
  overflow: hidden;
@@ -1,4 +1,4 @@
1
- import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as k,az as j,bH as C,e as G,o as Y,I as Q,A as X,g as W,C as B,a as Z,a3 as J,bR as F,al as q}from"./index-CzGc0rp2.js";import{s as ee,i as H,A as U,g as K,r as te,m as ne,c as ae,M as ie,e as oe}from"./authorizations-C776tgTp.js";import{i as se}from"./errors-C-i7myPZ.js";import{E as re}from"./ErrorNotice-CmE8Bw2a.js";import{a as ce}from"./buy-BZ3zKYDO.js";import{g as de,a as le}from"./trade-encoding-Dg6aX8Te.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-DcJMER59.js";import{I as xe,C as ge}from"./ethers-CtNGBird.js";const R="shop:resume_after_signin",fe=900*1e3;function dt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function lt(a){let n;try{n=sessionStorage.getItem(R)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(R)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function pt(a){var b,y,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const d=n-i,m=be(d,n,s);l>=m&&c.push({method:"combined",creditsCents:i,manaWei:m})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,u=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:u}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function ht(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function M(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ut(a,n){return a.options.find(i=>i.method===n)??null}function xt(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",we=e.div`
1
+ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as k,az as j,bP as C,e as G,o as Y,I as Q,A as X,g as W,C as B,a as Z,a3 as J,bT as F,al as q}from"./index-4grC8vnQ.js";import{s as ee,i as U,A as H,g as K,r as te,m as ne,c as ae,M as ie,e as oe}from"./authorizations-BJlchz9P.js";import{i as se}from"./errors-CCUK8cBW.js";import{E as re}from"./ErrorNotice-Biw7jacR.js";import{a as ce}from"./buy-DHqPe2Je.js";import{g as de,a as le}from"./trade-encoding-dpFoczNW.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-BATUzHIf.js";import{I as xe,C as ge}from"./ethers-CtNGBird.js";const R="shop:resume_after_signin",fe=900*1e3;function dt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function lt(a){let n;try{n=sessionStorage.getItem(R)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(R)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function pt(a){var b,y,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const d=n-i,m=be(d,n,s);l>=m&&c.push({method:"combined",creditsCents:i,manaWei:m})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,u=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:u}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function ht(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function M(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ut(a,n){return a.options.find(i=>i.method===n)??null}function xt(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",we=e.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -289,10 +289,10 @@ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as
289
289
  @media (prefers-reduced-motion: reduce) {
290
290
  animation: none;
291
291
  }
292
- `;function mt({auth:a,signer:n,title:i,reason:s,name:l,image:c,icon:p,onAuthorized:x,onCancel:u,onClose:b}){const[y,w]=v.useState(!1),[d,m]=v.useState(null);async function $(){w(!0),m(null);try{await ee({auth:a,signer:n,active:!0}),x()}catch(h){se(h)?m(f("authorizeStep.errorRejected")):(X(h,{flow:"authorize_step",kind:a.kind}),m(f("authorizeStep.errorGeneric"))),w(!1)}}return t.jsx(ze,{onClick:y?void 0:b,role:"presentation",children:t.jsxs(Ae,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[t.jsxs(We,{children:[t.jsx(Ie,{children:i}),t.jsx(Se,{onClick:b,disabled:y,"aria-label":f("authorizeStep.close"),children:t.jsx(Q,{name:"close",className:"ico"})})]}),t.jsxs(Te,{"data-testid":"authorize-step-row",children:[t.jsx(Ne,{children:c?t.jsx("img",{src:c,alt:""}):p}),t.jsxs(Ee,{children:[t.jsx(Be,{title:l,children:l}),t.jsx(Re,{children:s})]})]}),t.jsx(Le,{children:f("authorizeStep.note")}),t.jsx(re,{message:d}),t.jsxs(Pe,{children:[t.jsx(Fe,{type:"button",onClick:u,disabled:y,children:f("authorizeStep.cancel")}),t.jsx(Ke,{type:"button","data-testid":"authorize-step-action",onClick:()=>void $(),disabled:y,children:y?t.jsxs(t.Fragment,{children:[t.jsx(De,{"aria-hidden":!0}),f("authorizeStep.authorizing")]}):f("authorizeStep.authorize")})]})]})})}async function bt(a){const[n]=await Qe({...a,trades:[a.trade]});return n}async function Qe(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a;if(n.length===0)throw new Error("No items to buy");const c=new Map;for(const x of n){const u=`${x.chainId}:${x.contract.toLowerCase()}`,b=c.get(u);b?b.push(x):c.set(u,[x])}const p=[];for(const x of c.values())p.push(await He({trades:x,buyer:i,signer:s,onSigned:l}));return p}async function He(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a,c=n[0],p=W(Z(c.contract),c.chainId),x=W(B.MANAToken,c.chainId);await H({auth:{kind:U.Allowance,contractAddress:x.address,spenderAddress:p.address,chainId:c.chainId},signer:s});const u=n.map(d=>de(d,i));if(K.enabled)try{const d=new xe(p.abi).encodeFunctionData("accept",[u]),m=te(),$=ne(s.provider,m),h=await pe($,m,d,p,{serverURL:K.relayerUrl});return l==null||l(),await ae(h,"the MANA purchase"),h}catch(d){if(d instanceof he&&d.code===ue.USER_DENIED||d instanceof ie)throw d;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",d)}await oe(s.provider,c.chainId);const y=await new ge(p.address,p.abi,s).accept(u,le(c.chainId));return l==null||l(),(await y.wait()).transactionHash}async function yt(a){const{trade:n,buyer:i,signer:s,credits:l,manaGapWei:c,onBroadcast:p,onReverted:x}=a;if(l.length===0)throw new Error("No credits to spend — use buyWithMana for a MANA-only purchase");if(c<=0n)throw new Error("No MANA gap to cover — use buyWithCredits for a credits-only purchase");const u=W(B.MANAToken,n.chainId),b=W(B.CreditsManager,n.chainId);await H({auth:{kind:U.Allowance,contractAddress:u.address,spenderAddress:b.address,chainId:n.chainId},signer:s});const w=(l.reduce((d,m)=>d+BigInt(m.availableAmount),0n)+c).toString();return ce({trade:n,buyer:i,signer:s,credits:l,maxCreditedValue:w,onBroadcast:p,onReverted:x})}function wt(a){return t.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...a,children:t.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function vt(a){return t.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,...a,children:[t.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),t.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),t.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]})}const{colors:r,gradients:O,radius:V,z:Ue}=o,kt=e.div`
292
+ `;function mt({auth:a,signer:n,title:i,reason:s,name:l,image:c,icon:p,onAuthorized:x,onCancel:u,onClose:b}){const[y,w]=v.useState(!1),[d,m]=v.useState(null);async function $(){w(!0),m(null);try{await ee({auth:a,signer:n,active:!0}),x()}catch(h){se(h)?m(f("authorizeStep.errorRejected")):(X(h,{flow:"authorize_step",kind:a.kind}),m(f("authorizeStep.errorGeneric"))),w(!1)}}return t.jsx(ze,{onClick:y?void 0:b,role:"presentation",children:t.jsxs(Ae,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[t.jsxs(We,{children:[t.jsx(Ie,{children:i}),t.jsx(Se,{onClick:b,disabled:y,"aria-label":f("authorizeStep.close"),children:t.jsx(Q,{name:"close",className:"ico"})})]}),t.jsxs(Te,{"data-testid":"authorize-step-row",children:[t.jsx(Ne,{children:c?t.jsx("img",{src:c,alt:""}):p}),t.jsxs(Ee,{children:[t.jsx(Be,{title:l,children:l}),t.jsx(Re,{children:s})]})]}),t.jsx(Le,{children:f("authorizeStep.note")}),t.jsx(re,{message:d}),t.jsxs(Pe,{children:[t.jsx(Fe,{type:"button",onClick:u,disabled:y,children:f("authorizeStep.cancel")}),t.jsx(Ke,{type:"button","data-testid":"authorize-step-action",onClick:()=>void $(),disabled:y,children:y?t.jsxs(t.Fragment,{children:[t.jsx(De,{"aria-hidden":!0}),f("authorizeStep.authorizing")]}):f("authorizeStep.authorize")})]})]})})}async function bt(a){const[n]=await Qe({...a,trades:[a.trade]});return n}async function Qe(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a;if(n.length===0)throw new Error("No items to buy");const c=new Map;for(const x of n){const u=`${x.chainId}:${x.contract.toLowerCase()}`,b=c.get(u);b?b.push(x):c.set(u,[x])}const p=[];for(const x of c.values())p.push(await Ue({trades:x,buyer:i,signer:s,onSigned:l}));return p}async function Ue(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a,c=n[0],p=W(Z(c.contract),c.chainId),x=W(B.MANAToken,c.chainId);await U({auth:{kind:H.Allowance,contractAddress:x.address,spenderAddress:p.address,chainId:c.chainId},signer:s});const u=n.map(d=>de(d,i));if(K.enabled)try{const d=new xe(p.abi).encodeFunctionData("accept",[u]),m=te(),$=ne(s.provider,m),h=await pe($,m,d,p,{serverURL:K.relayerUrl});return l==null||l(),await ae(h,"the MANA purchase"),h}catch(d){if(d instanceof he&&d.code===ue.USER_DENIED||d instanceof ie)throw d;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",d)}await oe(s.provider,c.chainId);const y=await new ge(p.address,p.abi,s).accept(u,le(c.chainId));return l==null||l(),(await y.wait()).transactionHash}async function yt(a){const{trade:n,buyer:i,signer:s,credits:l,manaGapWei:c,onBroadcast:p,onReverted:x}=a;if(l.length===0)throw new Error("No credits to spend — use buyWithMana for a MANA-only purchase");if(c<=0n)throw new Error("No MANA gap to cover — use buyWithCredits for a credits-only purchase");const u=W(B.MANAToken,n.chainId),b=W(B.CreditsManager,n.chainId);await U({auth:{kind:H.Allowance,contractAddress:u.address,spenderAddress:b.address,chainId:n.chainId},signer:s});const w=(l.reduce((d,m)=>d+BigInt(m.availableAmount),0n)+c).toString();return ce({trade:n,buyer:i,signer:s,credits:l,maxCreditedValue:w,onBroadcast:p,onReverted:x})}function wt(a){return t.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...a,children:t.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function vt(a){return t.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,...a,children:[t.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),t.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),t.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]})}const{colors:r,gradients:O,radius:V,z:He}=o,kt=e.div`
293
293
  position: fixed;
294
294
  inset: 0;
295
- z-index: ${Ue.overlay};
295
+ z-index: ${He.overlay};
296
296
  display: flex;
297
297
  overflow-y: auto;
298
298
  padding: 20px;
@@ -458,10 +458,10 @@ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as
458
458
  & b {
459
459
  font-weight: 700;
460
460
  }
461
- `,Ht=e.div`
461
+ `,Ut=e.div`
462
462
  display: flex;
463
463
  gap: 12px;
464
- `,Ut=e.button`
464
+ `,Ht=e.button`
465
465
  flex: 1;
466
466
  height: 109px;
467
467
  border: 1px solid ${r.muted2};
@@ -801,4 +801,4 @@ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,d as f,w as
801
801
  opacity: 1;
802
802
  transform: scale(1.1);
803
803
  }
804
- `;function ln({title:a,items:n,onViewAll:i}){const s=v.useRef(null),[l,c]=v.useState(1),[p,x]=v.useState(0),[u,b]=v.useState(!0),[y,w]=v.useState(!1),d=v.useCallback(()=>{const h=s.current;if(!h)return;const{scrollLeft:g,scrollWidth:L,clientWidth:S}=h,P=Math.max(1,Math.ceil(L/S));c(P),x(Math.min(P-1,Math.round(g/S))),b(g<=1),w(g+S>=L-1)},[]);if(v.useEffect(()=>{d();const h=s.current;if(h)return h.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),()=>{h.removeEventListener("scroll",d),window.removeEventListener("resize",d)}},[d,n.length]),n.length===0)return null;function m(h){const g=s.current;g&&g.scrollBy({left:h*g.clientWidth,behavior:"smooth"})}function $(h){const g=s.current;g&&g.scrollTo({left:h*g.clientWidth,behavior:"smooth"})}return t.jsxs(_e,{children:[t.jsxs(Oe,{children:[t.jsx(Ve,{children:a}),i?t.jsxs(Ge,{onClick:i,children:[f("collectionCarousel.viewAll"),t.jsx(Ye,{name:"chevron-down",size:16})]}):null]}),t.jsxs(Xe,{children:[t.jsx(D,{"data-side":"left",onClick:()=>m(-1),"aria-label":f("collectionCarousel.scrollLeft"),disabled:u,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})}),t.jsx(Ze,{ref:s,children:n.map(h=>t.jsx(q,{item:h},h.id))}),t.jsx(D,{"data-side":"right",onClick:()=>m(1),"aria-label":f("collectionCarousel.scrollRight"),disabled:y,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})})]}),l>1?t.jsx(Je,{"aria-label":f("collectionCarousel.pages"),children:Array.from({length:l}).map((h,g)=>t.jsx(qe,{"data-active":g===p||void 0,"aria-label":f("collectionCarousel.goToPage",{page:g+1}),"aria-current":g===p?"true":void 0,onClick:()=>$(g)},g))}):null]})}export{M as $,Et as A,Wt as B,jt as C,Ot as D,Vt as E,Gt as F,Yt as G,Ct as H,Xt as I,Zt as J,pt as K,en as L,kt as M,lt as N,ln as O,gt as P,mt as Q,T as R,$t as S,zt as T,dt as U,ft as V,Dt as W,At as X,Qe as Y,ht as Z,be as _,Mt as a,cn as a0,dn as a1,bt as a2,ut as a3,yt as a4,wt as b,It as c,St as d,Tt as e,Nt as f,tn as g,nn as h,an as i,Jt as j,qt as k,on as l,xt as m,sn as n,rn as o,vt as p,Qt as q,Bt as r,Rt as s,Lt as t,Pt as u,Ft as v,Kt as w,Ht as x,Ut as y,_t as z};
804
+ `;function ln({title:a,items:n,onViewAll:i}){const s=v.useRef(null),[l,c]=v.useState(1),[p,x]=v.useState(0),[u,b]=v.useState(!0),[y,w]=v.useState(!1),d=v.useCallback(()=>{const h=s.current;if(!h)return;const{scrollLeft:g,scrollWidth:L,clientWidth:S}=h,P=Math.max(1,Math.ceil(L/S));c(P),x(Math.min(P-1,Math.round(g/S))),b(g<=1),w(g+S>=L-1)},[]);if(v.useEffect(()=>{d();const h=s.current;if(h)return h.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),()=>{h.removeEventListener("scroll",d),window.removeEventListener("resize",d)}},[d,n.length]),n.length===0)return null;function m(h){const g=s.current;g&&g.scrollBy({left:h*g.clientWidth,behavior:"smooth"})}function $(h){const g=s.current;g&&g.scrollTo({left:h*g.clientWidth,behavior:"smooth"})}return t.jsxs(_e,{children:[t.jsxs(Oe,{children:[t.jsx(Ve,{children:a}),i?t.jsxs(Ge,{onClick:i,children:[f("collectionCarousel.viewAll"),t.jsx(Ye,{name:"chevron-down",size:16})]}):null]}),t.jsxs(Xe,{children:[t.jsx(D,{"data-side":"left",onClick:()=>m(-1),"aria-label":f("collectionCarousel.scrollLeft"),disabled:u,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})}),t.jsx(Ze,{ref:s,children:n.map(h=>t.jsx(q,{item:h},h.id))}),t.jsx(D,{"data-side":"right",onClick:()=>m(1),"aria-label":f("collectionCarousel.scrollRight"),disabled:y,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})})]}),l>1?t.jsx(Je,{"aria-label":f("collectionCarousel.pages"),children:Array.from({length:l}).map((h,g)=>t.jsx(qe,{"data-active":g===p||void 0,"aria-label":f("collectionCarousel.goToPage",{page:g+1}),"aria-current":g===p?"true":void 0,onClick:()=>$(g)},g))}):null]})}export{M as $,Et as A,Wt as B,jt as C,Ot as D,Vt as E,Gt as F,Yt as G,Ct as H,Xt as I,Zt as J,pt as K,en as L,kt as M,lt as N,ln as O,gt as P,mt as Q,T as R,$t as S,zt as T,dt as U,ft as V,Dt as W,At as X,Qe as Y,ht as Z,be as _,Mt as a,cn as a0,dn as a1,bt as a2,ut as a3,yt as a4,wt as b,It as c,St as d,Tt as e,Nt as f,tn as g,nn as h,an as i,Jt as j,qt as k,on as l,xt as m,sn as n,rn as o,vt as p,Qt as q,Bt as r,Rt as s,Lt as t,Pt as u,Ft as v,Kt as w,Ut as x,Ht as y,_t as z};
@@ -1,4 +1,4 @@
1
- import{d as pe,j as e,L as Re,u as Me,e as ze,r as g}from"./react-DehiWSvs.js";import{t as ge,G as Be,J as re,H as se,s as i,bI as We,ay as _e,bJ as Te,d as o,bK as De,bL as ie,B as Ge,af as fe,W as be,bm as Oe,k as Ke,y as we,bt as He,bn as Ue,bo as qe,I as ae,c as Ve,q as Je,n as Qe,ag as Ye,ai as Ze,aj as Xe,ak as A,al as ne,bM as le,bN as et}from"./index-CzGc0rp2.js";import{d as tt,P as ot,C as rt,a as st,b as it,A as at,c as nt,e as lt}from"./collectionPage.styles-CJq9b5Dn.js";import{g as ct,h as dt,i as ht,j as mt,k as ut,C as xt,l as pt,o as gt,m as ft,n as bt,M as wt,E as jt,p as vt,q as yt,r as Ct,s as kt,t as $t}from"./Assets.styles-BYFeJKPe.js";import{S as ce,R as St,F as Nt,e as Pt}from"./categories-Bhx5AiD0.js";import{L as de}from"./LoadMore-CPMkfBBp.js";import{u as he}from"./useInfiniteGrid-BiMca1S0.js";import{E as T}from"./ErrorNotice-CmE8Bw2a.js";import{G as me}from"./grid.styles-CKmGs0rK.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./Tooltip-Ca1xi18J.js";function Et(r){const{gridLoading:s,gridError:a,gridCount:n,baselinePending:l,baselineError:c,baselineCount:m}=r;return s?"skeletons":a?"error":n>0?"items":l?"skeletons":c?"error":m===0?"no-creations":"filters"}const{colors:b,radius:je,media:Ft}=ge,Lt=i.article`
1
+ import{d as pe,j as e,L as Ie,u as Me,e as ze,r as g}from"./react-DehiWSvs.js";import{t as ge,G as Be,J as re,H as se,s as i,bz as We,ay as _e,bA as Te,d as o,bB as De,bC as ie,B as Ge,af as fe,W as be,bm as Oe,k as Ke,y as we,bt as He,bn as Ue,bo as qe,I as ae,c as Ve,q as Je,n as Qe,ag as Ye,ai as Ze,aj as Xe,ak as A,al as ne,bD as le,bE as et}from"./index-4grC8vnQ.js";import{d as tt,P as ot,C as rt,a as st,b as it,A as at,c as nt,e as lt}from"./collectionPage.styles-Dmgr28GG.js";import{g as ct,h as dt,i as ht,j as mt,k as ut,C as xt,l as pt,o as gt,m as ft,n as bt,M as wt,E as jt,p as vt,q as yt,r as Ct,s as kt,t as $t}from"./Assets.styles-DiCnesUC.js";import{S as ce,R as St,F as Nt,e as Et}from"./categories-BMCKe30t.js";import{L as de}from"./LoadMore-DMhOO7Nq.js";import{u as he}from"./useInfiniteGrid-6IGMMT5_.js";import{E as T}from"./ErrorNotice-Biw7jacR.js";import{G as me}from"./grid.styles-DH_ZretM.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./Tooltip-DIS1AoSo.js";function Pt(r){const{gridLoading:s,gridError:a,gridCount:n,baselinePending:l,baselineError:c,baselineCount:m}=r;return s?"skeletons":a?"error":n>0?"items":l?"skeletons":c?"error":m===0?"no-creations":"filters"}const{colors:b,radius:je,media:Ft}=ge,Lt=i.article`
2
2
  height: 300px;
3
3
  background: ${b.bg};
4
4
  border-radius: ${je.card};
@@ -44,12 +44,12 @@ import{d as pe,j as e,L as Re,u as Me,e as ze,r as g}from"./react-DehiWSvs.js";i
44
44
  min-height: 0;
45
45
  background: ${b.media};
46
46
  overflow: hidden;
47
- `,It=i.img`
47
+ `,Rt=i.img`
48
48
  width: 100%;
49
49
  height: 100%;
50
50
  object-fit: cover;
51
51
  display: block;
52
- `,Rt=i(We)`
52
+ `,It=i(We)`
53
53
  & [data-testid='coll-thumb-cell'] img {
54
54
  object-fit: contain;
55
55
  padding: 10px;
@@ -135,7 +135,7 @@ import{d as pe,j as e,L as Re,u as Me,e as ze,r as g}from"./react-DehiWSvs.js";i
135
135
  &:active {
136
136
  background: ${b.accentActive};
137
137
  }
138
- `;function Ot({collection:r,cover:s,itemCount:a}){const n=pe(),{contractAddress:l,name:c,creator:m}=r,C=s==null||a==null,{data:u}=Te(l,C),j=s==null?(u==null?void 0:u.items)??[]:[],f=a??(u==null?void 0:u.total);function w(){n(`/collection/${l}`)}return e.jsxs(Lt,{"data-testid":"coll-card",role:"link",tabIndex:0,onClick:w,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),w())},children:[e.jsx(At,{children:s?e.jsx(It,{"data-testid":"coll-card-img",src:s,alt:"",loading:"lazy"}):j.length>0?e.jsx(Rt,{items:j,tinted:!1}):null}),e.jsxs(Mt,{children:[e.jsx(zt,{title:c,children:c}),e.jsxs(Bt,{children:[e.jsxs(Wt,{"data-meta":!0,"data-testid":"coll-card-meta",children:[m?e.jsx(_t,{address:m,linkToProfile:!0}):e.jsx(Tt,{children:" "}),e.jsx(Dt,{children:f==null?"…":o("collectionCard.itemCount",{count:f})})]}),e.jsx(Gt,{"data-view":!0,"data-testid":"coll-card-view",onClick:x=>{x.stopPropagation(),w()},tabIndex:-1,children:o("collectionCard.viewCollection")})]})]})]})}function Kt({address:r,className:s=""}){const a=De(),n=ie(c=>c.followed.includes(r.toLowerCase())),l=ie(c=>c.toggle);return!a||!r?null:e.jsx(Ge,{type:"button",size:"sm",variant:n?"ghost":"outline",className:s||void 0,"data-testid":"follow-button","aria-pressed":n,title:n?o("creator.unfollowTitle"):o("creator.followTitle"),onClick:()=>l(r),children:n?o("creator.following"):o("creator.follow")})}const{colors:y,radius:ve,media:v}=ge,ye=fe`
138
+ `;function Ot({collection:r,cover:s,itemCount:a}){const n=pe(),{contractAddress:l,name:c,creator:m}=r,C=s==null||a==null,{data:u}=Te(l,C),j=s==null?(u==null?void 0:u.items)??[]:[],f=a??(u==null?void 0:u.total);function w(){n(`/collection/${l}`)}return e.jsxs(Lt,{"data-testid":"coll-card",role:"link",tabIndex:0,onClick:w,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),w())},children:[e.jsx(At,{children:s?e.jsx(Rt,{"data-testid":"coll-card-img",src:s,alt:"",loading:"lazy"}):j.length>0?e.jsx(It,{items:j,tinted:!1}):null}),e.jsxs(Mt,{children:[e.jsx(zt,{title:c,children:c}),e.jsxs(Bt,{children:[e.jsxs(Wt,{"data-meta":!0,"data-testid":"coll-card-meta",children:[m?e.jsx(_t,{address:m,linkToProfile:!0}):e.jsx(Tt,{children:" "}),e.jsx(Dt,{children:f==null?"…":o("collectionCard.itemCount",{count:f})})]}),e.jsx(Gt,{"data-view":!0,"data-testid":"coll-card-view",onClick:x=>{x.stopPropagation(),w()},tabIndex:-1,children:o("collectionCard.viewCollection")})]})]})]})}function Kt({address:r,className:s=""}){const a=De(),n=ie(c=>c.followed.includes(r.toLowerCase())),l=ie(c=>c.toggle);return!a||!r?null:e.jsx(Ge,{type:"button",size:"sm",variant:n?"ghost":"outline",className:s||void 0,"data-testid":"follow-button","aria-pressed":n,title:n?o("creator.unfollowTitle"):o("creator.followTitle"),onClick:()=>l(r),children:n?o("creator.following"):o("creator.follow")})}const{colors:y,radius:ve,media:v}=ge,ye=fe`
139
139
  display: inline-flex;
140
140
  align-items: center;
141
141
  justify-content: center;
@@ -219,7 +219,7 @@ import{d as pe,j as e,L as Re,u as Me,e as ze,r as g}from"./react-DehiWSvs.js";i
219
219
  }
220
220
  `,Qt=i.a`
221
221
  ${Ce};
222
- `,Yt=i(Re)`
222
+ `,Yt=i(Ie)`
223
223
  ${Ce};
224
224
  width: 32px;
225
225
  height: 32px;
@@ -303,4 +303,4 @@ import{d as pe,j as e,L as Re,u as Me,e as ze,r as g}from"./react-DehiWSvs.js";i
303
303
  &:hover {
304
304
  background: rgba(255, 255, 255, 0.14);
305
305
  }
306
- `,ro={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function so({address:r}){var x,k;const{data:s}=be(r),{data:a}=Oe(r),n=Ke(d=>{var $;return($=d.session)==null?void 0:$.address}),l=!!n&&n.toLowerCase()===r.toLowerCase(),c=(s==null?void 0:s.name)||we(r),m=(k=(x=s==null?void 0:s.avatar)==null?void 0:x.snapshots)==null?void 0:k.face256,C=(a==null?void 0:a.cover)||tt,u=a==null?void 0:a.description,j=`${Ve.profileUrl}/${r}`,f=He.filter(d=>a==null?void 0:a.links[d]),w=Ue(qe({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??r}));return e.jsxs(Ht,{"aria-label":`${c} storefront`,children:[e.jsxs(Ut,{children:[e.jsx(qt,{src:C,alt:"",loading:"eager"}),e.jsx(Vt,{"aria-hidden":!0})]}),(f.length>0||l)&&e.jsxs(Jt,{children:[f.map(d=>e.jsx(Qt,{"data-testid":"creator-hero-link",href:(a==null?void 0:a.links[d])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${d}`),"aria-label":o(`creator.link.${d}`),children:e.jsx(ae,{name:ro[d]})},d)),l&&e.jsx(Yt,{to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx(ae,{name:"pen"})})]}),e.jsxs(Zt,{children:[m?e.jsx(ue,{src:m,alt:"",loading:"eager",style:{backgroundColor:w}}):e.jsx(ue,{as:"span","aria-hidden":!0,style:{backgroundColor:w}}),e.jsxs("div",{children:[e.jsx(Xt,{children:c}),u?e.jsx(eo,{children:u}):null]}),e.jsxs(to,{children:[e.jsx(oo,{"data-testid":"creator-hero-view",href:j,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Kt,{address:r,className:"creator-hero__follow"})]})]})]})}const xe=48;function jo(){var te,oe;const{address:r}=Me(),s=pe(),[a]=ze(),n=a.has("collections"),{data:l}=be(r),c=(l==null?void 0:l.name)||(r?we(r):o("creator.fallbackName"));Je({title:c,description:o("seo.creator.description",{name:c}),image:(oe=(te=l==null?void 0:l.avatar)==null?void 0:te.snapshots)==null?void 0:oe.face256});const[m,C]=g.useState("all"),[u,j]=g.useState(null),[f,w]=g.useState([]),[x,k]=g.useState(""),[d,$]=g.useState(""),[N,I]=g.useState("all"),[R,M]=g.useState(!1),[D,ke]=g.useState("newest"),[E,P]=g.useState(!1);g.useEffect(()=>{if(!E)return;const t=_=>{_.key==="Escape"&&P(!1)};document.addEventListener("keydown",t);const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=h}},[E]);const G=x&&!Number.isNaN(Number(x))?Number(x):void 0,O=d&&!Number.isNaN(Number(d))?Number(d):void 0,$e=u?Pt[u]:void 0,Se=(ce.find(t=>t.key===D)??ce[0]).server,K={creator:r,category:m,rarities:f.length?f:void 0,wearableCategories:$e,minPriceCredits:G,maxPriceCredits:O,isWearableSmart:R||void 0,isOnSale:N==="all"?void 0:N==="on_sale",sortBy:Se},{items:z,total:Ne,isLoading:Pe,isPlaceholderData:Ee,error:H,hasNextPage:Fe,isFetchingNextPage:U,isFetchNextPageError:Le,fetchNextPage:Ae}=he(["creator-items",K],t=>le({...K,first:xe,skip:t}),{enabled:!!r&&!n}),F=Qe({queryKey:["creator-item-count",r],queryFn:()=>le({creator:r,first:1}).then(t=>t.total),enabled:!!r}),p=he(["creator-collections",r],t=>et(r,{first:xe,skip:t}).then(h=>({items:h.collections,total:h.total})),{enabled:!!r&&n});function q(t){C(t),j(null),n&&V()}function V(){const t=new URLSearchParams(a);t.delete("collections");const h=t.toString();s({search:h?`?${h}`:""},{replace:!0})}function Ie(){if(n){V();return}const t=new URLSearchParams(a);t.delete("collections");const h=t.toString();s({search:h?`?${h}&collections`:"?collections"},{replace:!0})}function J(t){w(h=>h.includes(t)?h.filter(_=>_!==t):[...h,t])}function Q(){C("all"),j(null),w([]),k(""),$(""),I("all"),M(!1)}const S=[];(m==="wearable"||m==="emote")&&S.push({key:"category",label:o(m==="emote"?"categories.emotes":"categories.wearables"),onRemove:()=>q("all")}),(G!=null||O!=null)&&S.push({key:"price",label:o("filter.price"),onRemove:()=>{k(""),$("")}});for(const t of St)f.includes(t)&&S.push({key:`rarity-${t}`,label:Ye(t),onRemove:()=>J(t)});R&&S.push({key:"smart",label:o("filter.smart"),onRemove:()=>M(!1)}),N!=="all"&&S.push({key:"status",label:N==="on_sale"?o("filter.onSale"):o("filter.notForSale"),onRemove:()=>I("all")});const L=Et({gridLoading:Pe||Ee,gridError:!!H,gridCount:z.length,baselinePending:F.isPending,baselineError:F.isError,baselineCount:F.data}),B=L==="skeletons",{data:Y}=Ze(),Z=g.useMemo(()=>z.map(t=>({...t,priceCredits:Xe(t,Y)})),[z,Y]),X=t=>t.priceCredits>0||!!t.manaWei,ee=Z.filter(X),W=L==="items"||L==="skeletons"?null:L;return e.jsxs(ot,{children:[e.jsxs(rt,{"aria-label":o("creator.breadcrumbAria"),children:[e.jsx(st,{onClick:()=>s("/items"),children:o("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(it,{children:c})]}),r?e.jsx(so,{address:r}):null,!n&&!B&&ee.length>0?e.jsx(at,{items:ee,source:"creator"}):null,e.jsxs(ct,{children:[E?e.jsx(dt,{onClick:()=>P(!1),"aria-hidden":!0}):null,e.jsxs(ht,{"data-open":E||void 0,"data-testid":"creator-sidebar",children:[e.jsxs(mt,{children:[e.jsx(ut,{children:o("assets.filters")}),e.jsx(xt,{onClick:()=>P(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(pt,{children:e.jsx(gt,{category:m,subCategory:u,onCategory:q,onSub:j,priceMin:x,priceMax:d,onPriceMin:k,onPriceMax:$,rarities:f,onToggleRarity:J,status:N,onStatus:I,smart:R,onSmart:M,hideNames:!0,collections:n,onCollections:Ie})}),e.jsx(ft,{children:e.jsx(bt,{type:"button",onClick:()=>P(!1),children:o("assets.showItems")})})]}),e.jsx(wt,{children:n?e.jsxs(e.Fragment,{children:[e.jsx(nt,{children:e.jsx(lt,{children:p.isLoading?"…":o("creator.collectionsCount",{count:p.total})})}),p.error?e.jsx(T,{message:o("creator.error")}):null,e.jsx(me,{"data-variant":"collections",children:p.isLoading?e.jsx(A,{count:9}):e.jsxs(e.Fragment,{children:[p.items.map(t=>e.jsx(Ot,{collection:t,itemCount:t.itemCount},t.contractAddress)),p.isFetchingNextPage?e.jsx(A,{count:6}):null]})}),e.jsx(de,{hasNextPage:p.hasNextPage,isFetching:p.isFetchingNextPage,isError:p.isFetchNextPageError,onLoadMore:()=>void p.fetchNextPage()}),!p.isLoading&&!p.error&&p.items.length===0?e.jsx("p",{className:"muted",children:o("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Nt,{sort:D,onSort:ke,total:Ne,loading:B,onOpenFilters:()=>P(!0),chips:S,onClearChips:Q}),H?e.jsx(T,{message:o("creator.error"),testId:"creator-error"}):null,e.jsx(me,{"data-testid":"creator-grid",children:B?e.jsx(A,{count:15}):e.jsxs(e.Fragment,{children:[Z.map(t=>X(t)?e.jsx(ne,{item:t},t.id):e.jsx(ne,{item:t,mode:"view"},t.id)),U?e.jsx(A,{count:6}):null]})}),e.jsx(de,{hasNextPage:Fe,isFetching:U,isError:Le,onLoadMore:()=>void Ae()}),W==="error"?e.jsx(T,{message:o("creator.error"),testId:"creator-empty-error"}):W==="no-creations"?e.jsx("p",{className:"muted","data-testid":"creator-empty-none",children:o("creator.emptyNoCreations")}):W==="filters"?e.jsxs(jt,{"data-testid":"creator-empty-filters",children:[e.jsxs(vt,{children:[e.jsx(yt,{children:o("creator.emptyFilters.title")}),e.jsx(Ct,{children:o("creator.emptyFilters.body",{count:F.data??0})})]}),e.jsx(kt,{children:e.jsx($t,{type:"button",onClick:Q,children:o("filterBar.clearAll")})})]}):null]})})]})]})}export{jo as Creator,jo as default};
306
+ `,ro={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function so({address:r}){var x,k;const{data:s}=be(r),{data:a}=Oe(r),n=Ke(d=>{var $;return($=d.session)==null?void 0:$.address}),l=!!n&&n.toLowerCase()===r.toLowerCase(),c=(s==null?void 0:s.name)||we(r),m=(k=(x=s==null?void 0:s.avatar)==null?void 0:x.snapshots)==null?void 0:k.face256,C=(a==null?void 0:a.cover)||tt,u=a==null?void 0:a.description,j=`${Ve.profileUrl}/${r}`,f=He.filter(d=>a==null?void 0:a.links[d]),w=Ue(qe({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??r}));return e.jsxs(Ht,{"aria-label":`${c} storefront`,children:[e.jsxs(Ut,{children:[e.jsx(qt,{src:C,alt:"",loading:"eager"}),e.jsx(Vt,{"aria-hidden":!0})]}),(f.length>0||l)&&e.jsxs(Jt,{children:[f.map(d=>e.jsx(Qt,{"data-testid":"creator-hero-link",href:(a==null?void 0:a.links[d])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${d}`),"aria-label":o(`creator.link.${d}`),children:e.jsx(ae,{name:ro[d]})},d)),l&&e.jsx(Yt,{to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx(ae,{name:"pen"})})]}),e.jsxs(Zt,{children:[m?e.jsx(ue,{src:m,alt:"",loading:"eager",style:{backgroundColor:w}}):e.jsx(ue,{as:"span","aria-hidden":!0,style:{backgroundColor:w}}),e.jsxs("div",{children:[e.jsx(Xt,{children:c}),u?e.jsx(eo,{children:u}):null]}),e.jsxs(to,{children:[e.jsx(oo,{"data-testid":"creator-hero-view",href:j,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Kt,{address:r,className:"creator-hero__follow"})]})]})]})}const xe=48;function jo(){var te,oe;const{address:r}=Me(),s=pe(),[a]=ze(),n=a.has("collections"),{data:l}=be(r),c=(l==null?void 0:l.name)||(r?we(r):o("creator.fallbackName"));Je({title:c,description:o("seo.creator.description",{name:c}),image:(oe=(te=l==null?void 0:l.avatar)==null?void 0:te.snapshots)==null?void 0:oe.face256});const[m,C]=g.useState("all"),[u,j]=g.useState(null),[f,w]=g.useState([]),[x,k]=g.useState(""),[d,$]=g.useState(""),[N,R]=g.useState("all"),[I,M]=g.useState(!1),[D,ke]=g.useState("newest"),[P,E]=g.useState(!1);g.useEffect(()=>{if(!P)return;const t=_=>{_.key==="Escape"&&E(!1)};document.addEventListener("keydown",t);const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=h}},[P]);const G=x&&!Number.isNaN(Number(x))?Number(x):void 0,O=d&&!Number.isNaN(Number(d))?Number(d):void 0,$e=u?Et[u]:void 0,Se=(ce.find(t=>t.key===D)??ce[0]).server,K={creator:r,category:m,rarities:f.length?f:void 0,wearableCategories:$e,minPriceCredits:G,maxPriceCredits:O,isWearableSmart:I||void 0,isOnSale:N==="all"?void 0:N==="on_sale",sortBy:Se},{items:z,total:Ne,isLoading:Ee,isPlaceholderData:Pe,error:H,hasNextPage:Fe,isFetchingNextPage:U,isFetchNextPageError:Le,fetchNextPage:Ae}=he(["creator-items",K],t=>le({...K,first:xe,skip:t}),{enabled:!!r&&!n}),F=Qe({queryKey:["creator-item-count",r],queryFn:()=>le({creator:r,first:1}).then(t=>t.total),enabled:!!r}),p=he(["creator-collections",r],t=>et(r,{first:xe,skip:t}).then(h=>({items:h.collections,total:h.total})),{enabled:!!r&&n});function q(t){C(t),j(null),n&&V()}function V(){const t=new URLSearchParams(a);t.delete("collections");const h=t.toString();s({search:h?`?${h}`:""},{replace:!0})}function Re(){if(n){V();return}const t=new URLSearchParams(a);t.delete("collections");const h=t.toString();s({search:h?`?${h}&collections`:"?collections"},{replace:!0})}function J(t){w(h=>h.includes(t)?h.filter(_=>_!==t):[...h,t])}function Q(){C("all"),j(null),w([]),k(""),$(""),R("all"),M(!1)}const S=[];(m==="wearable"||m==="emote")&&S.push({key:"category",label:o(m==="emote"?"categories.emotes":"categories.wearables"),onRemove:()=>q("all")}),(G!=null||O!=null)&&S.push({key:"price",label:o("filter.price"),onRemove:()=>{k(""),$("")}});for(const t of St)f.includes(t)&&S.push({key:`rarity-${t}`,label:Ye(t),onRemove:()=>J(t)});I&&S.push({key:"smart",label:o("filter.smart"),onRemove:()=>M(!1)}),N!=="all"&&S.push({key:"status",label:N==="on_sale"?o("filter.onSale"):o("filter.notForSale"),onRemove:()=>R("all")});const L=Pt({gridLoading:Ee||Pe,gridError:!!H,gridCount:z.length,baselinePending:F.isPending,baselineError:F.isError,baselineCount:F.data}),B=L==="skeletons",{data:Y}=Ze(),Z=g.useMemo(()=>z.map(t=>({...t,priceCredits:Xe(t,Y)})),[z,Y]),X=t=>t.priceCredits>0||!!t.manaWei,ee=Z.filter(X),W=L==="items"||L==="skeletons"?null:L;return e.jsxs(ot,{children:[e.jsxs(rt,{"aria-label":o("creator.breadcrumbAria"),children:[e.jsx(st,{onClick:()=>s("/items"),children:o("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(it,{children:c})]}),r?e.jsx(so,{address:r}):null,!n&&!B&&ee.length>0?e.jsx(at,{items:ee,source:"creator"}):null,e.jsxs(ct,{children:[P?e.jsx(dt,{onClick:()=>E(!1),"aria-hidden":!0}):null,e.jsxs(ht,{"data-open":P||void 0,"data-testid":"creator-sidebar",children:[e.jsxs(mt,{children:[e.jsx(ut,{children:o("assets.filters")}),e.jsx(xt,{onClick:()=>E(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(pt,{children:e.jsx(gt,{category:m,subCategory:u,onCategory:q,onSub:j,priceMin:x,priceMax:d,onPriceMin:k,onPriceMax:$,rarities:f,onToggleRarity:J,status:N,onStatus:R,smart:I,onSmart:M,hideNames:!0,collections:n,onCollections:Re})}),e.jsx(ft,{children:e.jsx(bt,{type:"button",onClick:()=>E(!1),children:o("assets.showItems")})})]}),e.jsx(wt,{children:n?e.jsxs(e.Fragment,{children:[e.jsx(nt,{children:e.jsx(lt,{children:p.isLoading?"…":o("creator.collectionsCount",{count:p.total})})}),p.error?e.jsx(T,{message:o("creator.error")}):null,e.jsx(me,{"data-variant":"collections",children:p.isLoading?e.jsx(A,{count:9}):e.jsxs(e.Fragment,{children:[p.items.map(t=>e.jsx(Ot,{collection:t,itemCount:t.itemCount},t.contractAddress)),p.isFetchingNextPage?e.jsx(A,{count:6}):null]})}),e.jsx(de,{hasNextPage:p.hasNextPage,isFetching:p.isFetchingNextPage,isError:p.isFetchNextPageError,onLoadMore:()=>void p.fetchNextPage()}),!p.isLoading&&!p.error&&p.items.length===0?e.jsx("p",{className:"muted",children:o("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Nt,{sort:D,onSort:ke,total:Ne,loading:B,onOpenFilters:()=>E(!0),chips:S,onClearChips:Q}),H?e.jsx(T,{message:o("creator.error"),testId:"creator-error"}):null,e.jsx(me,{"data-testid":"creator-grid",children:B?e.jsx(A,{count:15}):e.jsxs(e.Fragment,{children:[Z.map(t=>X(t)?e.jsx(ne,{item:t},t.id):e.jsx(ne,{item:t,mode:"view"},t.id)),U?e.jsx(A,{count:6}):null]})}),e.jsx(de,{hasNextPage:Fe,isFetching:U,isError:Le,onLoadMore:()=>void Ae()}),W==="error"?e.jsx(T,{message:o("creator.error"),testId:"creator-empty-error"}):W==="no-creations"?e.jsx("p",{className:"muted","data-testid":"creator-empty-none",children:o("creator.emptyNoCreations")}):W==="filters"?e.jsxs(jt,{"data-testid":"creator-empty-filters",children:[e.jsxs(vt,{children:[e.jsx(yt,{children:o("creator.emptyFilters.title")}),e.jsx(Ct,{children:o("creator.emptyFilters.body",{count:F.data??0})})]}),e.jsx(kt,{children:e.jsx($t,{type:"button",onClick:Q,children:o("filterBar.clearAll")})})]}):null]})})]})]})}export{jo as Creator,jo as default};
@@ -1 +1 @@
1
- import{j as r}from"./react-DehiWSvs.js";import{I as i}from"./index-CzGc0rp2.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
1
+ import{j as r}from"./react-DehiWSvs.js";import{I as i}from"./index-4grC8vnQ.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
@@ -1 +1 @@
1
- import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-FyX1W-1Y.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-jOzdgfRR.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=P.bigNumber(e.amount??0).round(8),n=P.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw A.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await W({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=l.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=E.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?E.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};
1
+ import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-Bn14TsAB.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-DIYqluqo.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=P.bigNumber(e.amount??0).round(8),n=P.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw A.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await W({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=l.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=E.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?E.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};
@@ -1,4 +1,4 @@
1
- import{r as h,j as o}from"./react-DehiWSvs.js";import{t as e,s as a,d as r,I as w}from"./index-CzGc0rp2.js";const b=a.section`
1
+ import{r as h,j as o}from"./react-DehiWSvs.js";import{t as e,s as a,d as r,I as w}from"./index-4grC8vnQ.js";const b=a.section`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 36px;
@@ -1,4 +1,4 @@
1
- import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t as e,o as q,q as ge,d as n,e as h,k as fe,x as me,S as g,bb as be,A as G,bk as N,bO as we,b5 as H,w as re,I as ye,bP as Q}from"./index-CzGc0rp2.js";import{F as ke}from"./Faq-mPkwptjW.js";import{R as O}from"./resume-buy-Bf0zIH7y.js";import{u as ve,a as Ce,R as $e,c as je,i as Se,b as Pe}from"./useCreditPacks-DsT6A2e-.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const P="https://cdn.decentraland.org/@dcl/shop/0.7.3-30998099552.commit-f7fa6e3/_assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.7.3-30998099552.commit-f7fa6e3/_assets/pack-stacks-D-V2jSHW.webp",se="https://cdn.decentraland.org/@dcl/shop/0.7.3-30998099552.commit-f7fa6e3/_assets/pack-chest-BX_j84xW.webp",Ae="https://cdn.decentraland.org/@dcl/shop/0.7.3-30998099552.commit-f7fa6e3/_assets/credit-coin-CmcTCd5i.webp",Re="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",Te="https://cdn.decentraland.org/@dcl/shop/0.7.3-30998099552.commit-f7fa6e3/_assets/packs-backdrop-BcXiUPeP.webp",D="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",_e=i.div`
1
+ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t as e,o as q,q as ge,d as n,e as h,k as fe,x as me,S as g,bb as be,A as G,bk as N,bQ as we,b5 as Q,w as re,I as ye,bR as H}from"./index-4grC8vnQ.js";import{F as ke}from"./Faq-CYehw8Xd.js";import{R as D}from"./resume-buy-Bf0zIH7y.js";import{u as ve,a as Ce,R as $e,c as je,i as Se,b as Ae}from"./useCreditPacks-B-X7zfCn.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const A="https://cdn.decentraland.org/@dcl/shop/0.7.3-31002809274.commit-68e2004/_assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.7.3-31002809274.commit-68e2004/_assets/pack-stacks-D-V2jSHW.webp",se="https://cdn.decentraland.org/@dcl/shop/0.7.3-31002809274.commit-68e2004/_assets/pack-chest-BX_j84xW.webp",Pe="https://cdn.decentraland.org/@dcl/shop/0.7.3-31002809274.commit-68e2004/_assets/credit-coin-CmcTCd5i.webp",Re="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",Te="https://cdn.decentraland.org/@dcl/shop/0.7.3-31002809274.commit-68e2004/_assets/packs-backdrop-BcXiUPeP.webp",K="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",_e=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 24px;
@@ -144,7 +144,7 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
144
144
  line-height: 1.6;
145
145
  color: ${e.colors.media};
146
146
  text-align: center;
147
- `,K=i.div`
147
+ `,O=i.div`
148
148
  display: grid;
149
149
  grid-template-columns: repeat(4, minmax(0, 1fr));
150
150
  gap: 24px;
@@ -199,9 +199,9 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
199
199
  inset: 0;
200
200
  border-radius: inherit;
201
201
  pointer-events: none;
202
- -webkit-mask: ${D};
202
+ -webkit-mask: ${K};
203
203
  -webkit-mask-composite: xor;
204
- mask: ${D};
204
+ mask: ${K};
205
205
  mask-composite: exclude;
206
206
  transition: opacity 0.15s ease;
207
207
  }
@@ -314,7 +314,7 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
314
314
  align-items: center;
315
315
  gap: 12px;
316
316
  width: 100%;
317
- `,He=i.span`
317
+ `,Qe=i.span`
318
318
  display: flex;
319
319
  align-items: center;
320
320
  gap: 8px;
@@ -331,7 +331,7 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
331
331
  height: 24.81px;
332
332
  }
333
333
  }
334
- `,Qe=i.span`
334
+ `,He=i.span`
335
335
  font-family: ${e.font.sans};
336
336
  font-size: 40px;
337
337
  font-weight: 800;
@@ -342,7 +342,7 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
342
342
  font-size: 32px;
343
343
  line-height: 24px;
344
344
  }
345
- `,Oe=i.span`
345
+ `,De=i.span`
346
346
  font-family: ${e.font.sans};
347
347
  font-size: 20px;
348
348
  font-weight: 500;
@@ -354,7 +354,7 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
354
354
  font-size: 16px;
355
355
  line-height: 12px;
356
356
  }
357
- `,De=i.span`
357
+ `,Ke=i.span`
358
358
  display: block;
359
359
  width: 70%;
360
360
  aspect-ratio: 1;
@@ -365,7 +365,7 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
365
365
  height: 100%;
366
366
  object-fit: contain;
367
367
  }
368
- `,Ke=i.span`
368
+ `,Oe=i.span`
369
369
  display: flex;
370
370
  align-items: center;
371
371
  justify-content: center;
@@ -393,7 +393,7 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
393
393
  to {
394
394
  background-position: -200% 0;
395
395
  }
396
- `,A=i.span`
396
+ `,P=i.span`
397
397
  display: block;
398
398
  background: linear-gradient(
399
399
  100deg,
@@ -407,7 +407,7 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
407
407
  @media (prefers-reduced-motion: reduce) {
408
408
  animation: none;
409
409
  }
410
- `,Ve=i(A)`
410
+ `,Ve=i(P)`
411
411
  width: 60%;
412
412
  height: 30px;
413
413
  border-radius: ${e.radius.chip};
@@ -415,7 +415,7 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
415
415
  ${e.media.maxWidth("mobile")} {
416
416
  height: 24px;
417
417
  }
418
- `,Xe=i(A)`
418
+ `,Xe=i(P)`
419
419
  width: 36%;
420
420
  height: 15px;
421
421
  border-radius: ${e.radius.chip};
@@ -423,11 +423,11 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
423
423
  ${e.media.maxWidth("mobile")} {
424
424
  height: 12px;
425
425
  }
426
- `,Ze=i(A)`
426
+ `,Ze=i(P)`
427
427
  width: 70%;
428
428
  aspect-ratio: 1;
429
429
  border-radius: 16px;
430
- `,Je=i(A)`
430
+ `,Je=i(P)`
431
431
  width: 100%;
432
432
  height: 48px;
433
433
  border-radius: ${e.radius.card};
@@ -703,4 +703,4 @@ import{d as ue,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t a
703
703
  margin: 0;
704
704
  font-family: ${e.font.sans};
705
705
  color: ${e.colors.err};
706
- `,C=Se()?"mock":"stripe",te=[P,P,ne,se],jt={pack_5:P,pack_10:P,pack_25:ne,pack_50:se};function ae(d,s){return jt[d.id]??te[s%te.length]}function St(d,s){return d.artUrl??ae(d,s)}const Pt=[{question:"faq.buyers.whatAreQ",answer:"faq.buyers.whatAreA"},{question:"faq.buyers.whatCanIBuyQ",answer:"faq.buyers.whatCanIBuyA"},{question:"faq.buyers.whereBuyQ",answer:"faq.buyers.whereBuyA"},{question:"faq.buyers.whereUseQ",answer:"faq.buyers.whereUseA"},{question:"faq.buyers.expireQ",answer:"faq.buyers.expireA"},{question:"faq.buyers.transferQ",answer:"faq.buyers.transferA"}];function ie(d){const s=d;if((s==null?void 0:s.name)==="AbortError")return n("getCredits.errorCanceled");const f=((s==null?void 0:s.message)??"").toLowerCase();return f.includes("sign in")?n("getCredits.errorSignIn",{currency:h.name}):f.includes("timed out")?n("getCredits.errorTimeout",{currency:h.name}):n("getCredits.errorGeneric")}function Wt(){var L;ge({title:n("nav.getCredits",{currency:h.name}),noindex:!0});const d=ue(),{session:s,signIn:f}=fe(),o=me(),[m,b]=xe(),{packs:$,isLoading:y}=ve(),[u,p]=l.useState("select"),[c,F]=l.useState(null),[j,E]=l.useState(null),de=(j!=null?(L=$.find(r=>r.credits===j))==null?void 0:L.artUrl:void 0)??Ae,[ce,k]=l.useState(null),[le,R]=l.useState(!1),T=l.useRef(null);l.useEffect(()=>()=>{var r;return(r=T.current)==null?void 0:r.abort()},[]);const I=l.useCallback(()=>{b(r=>{const a=new URLSearchParams(r);return a.delete("order"),a.delete("canceled"),a},{replace:!0})},[b]),_=l.useCallback(async r=>{p("processing");const a=new AbortController;T.current=a;try{const x=await Ce(r,{signal:a.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});if(x.status==="credited"){const w=x.creditsGranted??(c==null?void 0:c.credits)??0;E(w>0?w:null),p("success"),g("Shop Completed Buy Credits",{order_id:r,pack_usd:(c==null?void 0:c.usd)??null,credits:w>0?w:null,provider:C}),o.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem($e)){const S={resumeCheckout:!0,...w>0?{creditsAdded:w}:{}};d("/cart",{state:S});return}}catch{}try{const S=sessionStorage.getItem(O);if(S){sessionStorage.removeItem(O);const U=JSON.parse(S),M=be(U);if(M){d(M,{state:{item:U,resumeBuy:!0}});return}}}catch{}}else x.status==="pending"?(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(c==null?void 0:c.usd)??null}),o.invalidateQueries({queryKey:["usd-balance"]}),p("pending")):(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(c==null?void 0:c.usd)??null}),k(x.error??n("getCredits.errorGrant",{currency:h.name})),p("error"))}catch(x){G(x,{flow:"get_credits",step:"grant",order_id:r}),g("Shop Buy Credits Failed",{step:"grant",error_code:N(x),pack_usd:(c==null?void 0:c.usd)??null}),k(ie(x)),p("error")}},[c,s,o,d]),pe=l.useCallback(async r=>{if(!s){f();return}k(null),R(!1),F(r),p(C==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:r.usd,credits:r.credits,provider:C});try{const a=await je(r.id,{address:s.address,identity:s.identity});if(a.mock)_(a.orderId);else if(a.url)g("Shop Redirected To Stripe",{order_id:a.orderId,pack_usd:r.usd,credits:r.credits}),window.location.href=a.url;else throw new Error("Checkout did not return a redirect url")}catch(a){G(a,{flow:"get_credits",step:"checkout",provider:C}),g("Shop Buy Credits Failed",{step:"checkout",error_code:N(a),pack_usd:r.usd}),k(ie(a)),p("error")}},[s,f,_]),B=l.useRef(!1),W=l.useRef(null);l.useEffect(()=>{if(B.current)return;const r=m.get("order");if(m.get("canceled")!=null){B.current=!0,g("Shop Buy Credits Cancelled",{order_id:r,provider:C}),r&&s&&we(r,s.identity),I(),R(!0),p("select");return}r&&(p("processing"),s&&(B.current=!0,I(),_(r)))},[m,s]);function z(){var r;(r=T.current)==null||r.abort(),p("select"),F(null),E(null),k(null),R(!1)}function he(){const r=W.current;if(!r)return;const a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;r.scrollIntoView({behavior:a?"auto":"smooth",block:"center"}),r.focus({preventScroll:!0})}return t.jsxs(_e,{children:[(u==="select"||u==="redirecting")&&t.jsxs(Be,{"data-testid":"credits-hero",children:[t.jsx(ze,{"aria-hidden":!0}),t.jsxs(qe,{children:[t.jsxs(Ee,{$hidden:u==="redirecting",children:[t.jsxs(Ie,{children:[t.jsx(We,{children:n("getCredits.title")}),t.jsxs(Le,{children:[t.jsx(Ue,{children:n("getCredits.subtitle")}),t.jsx(Me,{type:"button",onClick:he,"data-testid":"credits-learn-more",children:n("getCredits.learnMore")})]})]}),le&&t.jsx(Ge,{role:"status",children:n("getCredits.canceledNote")}),t.jsx(At,{packs:$,loading:y,onSelect:r=>void pe(r)})]}),u==="redirecting"&&t.jsxs(tt,{role:"status","aria-live":"polite",children:[t.jsx(st,{src:H,alt:"",width:72,height:72}),t.jsx(it,{children:n("getCredits.redirecting")})]})]}),t.jsx(Fe,{ref:W,tabIndex:-1,"data-testid":"credits-faq",children:t.jsx(ke,{title:"faq.title",entries:Pt,tone:"on-dark"})})]}),u==="processing"&&t.jsxs(nt,{role:"status","aria-live":"polite",children:[t.jsx(oe,{src:H,alt:"",width:61,height:61}),t.jsxs(ot,{children:[t.jsxs(at,{children:[t.jsx("strong",{children:n("getCredits.processing")}),"…"]}),t.jsxs(dt,{"aria-hidden":!0,children:[t.jsx(lt,{children:t.jsx(pt,{})}),t.jsx(ht,{children:"1/1"})]})]})]}),u==="success"&&t.jsxs(ut,{role:"status","aria-live":"polite",children:[t.jsxs(xt,{children:[t.jsx(gt,{src:Re,alt:"",width:60,height:60}),t.jsxs(ft,{children:[t.jsx("strong",{children:n("getCredits.successTitle")})," ",n("getCredits.successBody",{currency:h.name})]})]}),j!=null&&t.jsx(mt,{children:t.jsxs(bt,{children:[t.jsx(wt,{src:de,alt:"",width:93,height:93}),t.jsxs(yt,{children:[t.jsx(re,{}),t.jsxs("span",{children:[t.jsx(kt,{children:n("getCredits.creditsAmount",{credits:j,currency:h.name})})," ",t.jsx(vt,{children:n("getCredits.creditsAdded")})]})]})]})}),t.jsxs(Ct,{children:[t.jsx(v,{"data-variant":"outline",onClick:z,children:n("getCredits.buyMore",{currency:h.name})}),t.jsx(v,{onClick:()=>d("/items"),children:n("getCredits.startShopping")})]})]}),u==="pending"&&t.jsxs(Z,{role:"status","aria-live":"polite",children:[t.jsx(J,{children:n("getCredits.pendingTitle",{currency:h.name})}),t.jsx(et,{children:n("getCredits.pendingBody")}),t.jsxs(ee,{children:[t.jsx(v,{onClick:()=>d("/items"),children:n("getCredits.startShopping")}),t.jsx(v,{"data-variant":"outline",onClick:z,children:n("getCredits.done")})]})]}),u==="error"&&t.jsxs(Z,{role:"alert",children:[t.jsx(J,{"data-tone":"error",children:n("getCredits.errorTitle")}),t.jsx($t,{children:ce}),t.jsx(ee,{children:t.jsx(v,{onClick:z,children:n("getCredits.tryAgain")})})]})]})}function At({packs:d,loading:s,onSelect:f}){return s?t.jsx(K,{"aria-busy":"true","aria-label":n("getCredits.packsLoading",{currency:h.name}),children:[0,1,2,3].map(o=>t.jsxs(Y,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(V,{children:[t.jsxs(X,{children:[t.jsx(Ve,{}),t.jsx(Xe,{})]}),t.jsx(Ze,{})]}),t.jsx(Je,{})]},o))}):t.jsx(K,{children:d.map((o,m)=>{const b=Pe(o,d);return t.jsxs(Y,{type:"button","data-testid":"pack","data-best":o.bestValue?"true":void 0,onClick:()=>f(o),"aria-label":b?n("getCredits.packAriaBonus",{amount:Q(o.credits),usd:o.usd,bonus:b.bonus,baseline:b.baseline}):n("getCredits.packAria",{amount:Q(o.credits),usd:o.usd}),children:[o.bestValue&&t.jsxs(Ne,{children:[t.jsx(ye,{name:"star-rounded"}),n("getCredits.packBadge")]}),t.jsxs(V,{children:[t.jsxs(X,{children:[t.jsxs(He,{children:[t.jsx(re,{}),t.jsx(Qe,{children:o.credits})]}),t.jsx(Oe,{children:n("getCredits.packUnit",{currency:h.name})})]}),t.jsx(De,{children:t.jsx("img",{src:St(o,m),alt:"",loading:"lazy",width:507,height:507,onError:$=>{const y=$.currentTarget;y.dataset.artFallback||(y.dataset.artFallback="done",y.src=ae(o,m))}})})]}),t.jsxs(Ke,{children:["$",o.usd.toFixed(2)]})]},o.id)})})}export{Wt as GetCredits,Wt as default};
706
+ `,C=Se()?"mock":"stripe",te=[A,A,ne,se],jt={pack_5:A,pack_10:A,pack_25:ne,pack_50:se};function ae(d,s){return jt[d.id]??te[s%te.length]}function St(d,s){return d.artUrl??ae(d,s)}const At=[{question:"faq.buyers.whatAreQ",answer:"faq.buyers.whatAreA"},{question:"faq.buyers.whatCanIBuyQ",answer:"faq.buyers.whatCanIBuyA"},{question:"faq.buyers.whereBuyQ",answer:"faq.buyers.whereBuyA"},{question:"faq.buyers.whereUseQ",answer:"faq.buyers.whereUseA"},{question:"faq.buyers.expireQ",answer:"faq.buyers.expireA"},{question:"faq.buyers.transferQ",answer:"faq.buyers.transferA"}];function ie(d){const s=d;if((s==null?void 0:s.name)==="AbortError")return n("getCredits.errorCanceled");const f=((s==null?void 0:s.message)??"").toLowerCase();return f.includes("sign in")?n("getCredits.errorSignIn",{currency:h.name}):f.includes("timed out")?n("getCredits.errorTimeout",{currency:h.name}):n("getCredits.errorGeneric")}function Wt(){var L;ge({title:n("nav.getCredits",{currency:h.name}),noindex:!0});const d=ue(),{session:s,signIn:f}=fe(),o=me(),[m,b]=xe(),{packs:$,isLoading:y}=ve(),[u,p]=l.useState("select"),[c,F]=l.useState(null),[j,E]=l.useState(null),de=(j!=null?(L=$.find(r=>r.credits===j))==null?void 0:L.artUrl:void 0)??Pe,[ce,k]=l.useState(null),[le,R]=l.useState(!1),T=l.useRef(null);l.useEffect(()=>()=>{var r;return(r=T.current)==null?void 0:r.abort()},[]);const I=l.useCallback(()=>{b(r=>{const a=new URLSearchParams(r);return a.delete("order"),a.delete("canceled"),a},{replace:!0})},[b]),_=l.useCallback(async r=>{p("processing");const a=new AbortController;T.current=a;try{const x=await Ce(r,{signal:a.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});if(x.status==="credited"){const w=x.creditsGranted??(c==null?void 0:c.credits)??0;E(w>0?w:null),p("success"),g("Shop Completed Buy Credits",{order_id:r,pack_usd:(c==null?void 0:c.usd)??null,credits:w>0?w:null,provider:C}),o.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem($e)){const S={resumeCheckout:!0,...w>0?{creditsAdded:w}:{}};d("/cart",{state:S});return}}catch{}try{const S=sessionStorage.getItem(D);if(S){sessionStorage.removeItem(D);const U=JSON.parse(S),M=be(U);if(M){d(M,{state:{item:U,resumeBuy:!0}});return}}}catch{}}else x.status==="pending"?(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(c==null?void 0:c.usd)??null}),o.invalidateQueries({queryKey:["usd-balance"]}),p("pending")):(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(c==null?void 0:c.usd)??null}),k(x.error??n("getCredits.errorGrant",{currency:h.name})),p("error"))}catch(x){G(x,{flow:"get_credits",step:"grant",order_id:r}),g("Shop Buy Credits Failed",{step:"grant",error_code:N(x),pack_usd:(c==null?void 0:c.usd)??null}),k(ie(x)),p("error")}},[c,s,o,d]),pe=l.useCallback(async r=>{if(!s){f();return}k(null),R(!1),F(r),p(C==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:r.usd,credits:r.credits,provider:C});try{const a=await je(r.id,{address:s.address,identity:s.identity});if(a.mock)_(a.orderId);else if(a.url)g("Shop Redirected To Stripe",{order_id:a.orderId,pack_usd:r.usd,credits:r.credits}),window.location.href=a.url;else throw new Error("Checkout did not return a redirect url")}catch(a){G(a,{flow:"get_credits",step:"checkout",provider:C}),g("Shop Buy Credits Failed",{step:"checkout",error_code:N(a),pack_usd:r.usd}),k(ie(a)),p("error")}},[s,f,_]),B=l.useRef(!1),W=l.useRef(null);l.useEffect(()=>{if(B.current)return;const r=m.get("order");if(m.get("canceled")!=null){B.current=!0,g("Shop Buy Credits Cancelled",{order_id:r,provider:C}),r&&s&&we(r,s.identity),I(),R(!0),p("select");return}r&&(p("processing"),s&&(B.current=!0,I(),_(r)))},[m,s]);function z(){var r;(r=T.current)==null||r.abort(),p("select"),F(null),E(null),k(null),R(!1)}function he(){const r=W.current;if(!r)return;const a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;r.scrollIntoView({behavior:a?"auto":"smooth",block:"center"}),r.focus({preventScroll:!0})}return t.jsxs(_e,{children:[(u==="select"||u==="redirecting")&&t.jsxs(Be,{"data-testid":"credits-hero",children:[t.jsx(ze,{"aria-hidden":!0}),t.jsxs(qe,{children:[t.jsxs(Ee,{$hidden:u==="redirecting",children:[t.jsxs(Ie,{children:[t.jsx(We,{children:n("getCredits.title")}),t.jsxs(Le,{children:[t.jsx(Ue,{children:n("getCredits.subtitle")}),t.jsx(Me,{type:"button",onClick:he,"data-testid":"credits-learn-more",children:n("getCredits.learnMore")})]})]}),le&&t.jsx(Ge,{role:"status",children:n("getCredits.canceledNote")}),t.jsx(Pt,{packs:$,loading:y,onSelect:r=>void pe(r)})]}),u==="redirecting"&&t.jsxs(tt,{role:"status","aria-live":"polite",children:[t.jsx(st,{src:Q,alt:"",width:72,height:72}),t.jsx(it,{children:n("getCredits.redirecting")})]})]}),t.jsx(Fe,{ref:W,tabIndex:-1,"data-testid":"credits-faq",children:t.jsx(ke,{title:"faq.title",entries:At,tone:"on-dark"})})]}),u==="processing"&&t.jsxs(nt,{role:"status","aria-live":"polite",children:[t.jsx(oe,{src:Q,alt:"",width:61,height:61}),t.jsxs(ot,{children:[t.jsxs(at,{children:[t.jsx("strong",{children:n("getCredits.processing")}),"…"]}),t.jsxs(dt,{"aria-hidden":!0,children:[t.jsx(lt,{children:t.jsx(pt,{})}),t.jsx(ht,{children:"1/1"})]})]})]}),u==="success"&&t.jsxs(ut,{role:"status","aria-live":"polite",children:[t.jsxs(xt,{children:[t.jsx(gt,{src:Re,alt:"",width:60,height:60}),t.jsxs(ft,{children:[t.jsx("strong",{children:n("getCredits.successTitle")})," ",n("getCredits.successBody",{currency:h.name})]})]}),j!=null&&t.jsx(mt,{children:t.jsxs(bt,{children:[t.jsx(wt,{src:de,alt:"",width:93,height:93}),t.jsxs(yt,{children:[t.jsx(re,{}),t.jsxs("span",{children:[t.jsx(kt,{children:n("getCredits.creditsAmount",{credits:j,currency:h.name})})," ",t.jsx(vt,{children:n("getCredits.creditsAdded")})]})]})]})}),t.jsxs(Ct,{children:[t.jsx(v,{"data-variant":"outline",onClick:z,children:n("getCredits.buyMore",{currency:h.name})}),t.jsx(v,{onClick:()=>d("/items"),children:n("getCredits.startShopping")})]})]}),u==="pending"&&t.jsxs(Z,{role:"status","aria-live":"polite",children:[t.jsx(J,{children:n("getCredits.pendingTitle",{currency:h.name})}),t.jsx(et,{children:n("getCredits.pendingBody")}),t.jsxs(ee,{children:[t.jsx(v,{onClick:()=>d("/items"),children:n("getCredits.startShopping")}),t.jsx(v,{"data-variant":"outline",onClick:z,children:n("getCredits.done")})]})]}),u==="error"&&t.jsxs(Z,{role:"alert",children:[t.jsx(J,{"data-tone":"error",children:n("getCredits.errorTitle")}),t.jsx($t,{children:ce}),t.jsx(ee,{children:t.jsx(v,{onClick:z,children:n("getCredits.tryAgain")})})]})]})}function Pt({packs:d,loading:s,onSelect:f}){return s?t.jsx(O,{"aria-busy":"true","aria-label":n("getCredits.packsLoading",{currency:h.name}),children:[0,1,2,3].map(o=>t.jsxs(Y,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(V,{children:[t.jsxs(X,{children:[t.jsx(Ve,{}),t.jsx(Xe,{})]}),t.jsx(Ze,{})]}),t.jsx(Je,{})]},o))}):t.jsx(O,{children:d.map((o,m)=>{const b=Ae(o,d);return t.jsxs(Y,{type:"button","data-testid":"pack","data-best":o.bestValue?"true":void 0,onClick:()=>f(o),"aria-label":b?n("getCredits.packAriaBonus",{amount:H(o.credits),usd:o.usd,bonus:b.bonus,baseline:b.baseline}):n("getCredits.packAria",{amount:H(o.credits),usd:o.usd}),children:[o.bestValue&&t.jsxs(Ne,{children:[t.jsx(ye,{name:"star-rounded"}),n("getCredits.packBadge")]}),t.jsxs(V,{children:[t.jsxs(X,{children:[t.jsxs(Qe,{children:[t.jsx(re,{}),t.jsx(He,{children:o.credits})]}),t.jsx(De,{children:n("getCredits.packUnit",{currency:h.name})})]}),t.jsx(Ke,{children:t.jsx("img",{src:St(o,m),alt:"",loading:"lazy",width:507,height:507,onError:$=>{const y=$.currentTarget;y.dataset.artFallback||(y.dataset.artFallback="done",y.src=ae(o,m))}})})]}),t.jsxs(Oe,{children:["$",o.usd.toFixed(2)]})]},o.id)})})}export{Wt as GetCredits,Wt as default};