@dcl/shop 0.2.0 → 0.2.1-30916078746.commit-989f656

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 (178) hide show
  1. package/_assets/{Activity-DEjmHBhk.js → Activity-CQaltjiY.js} +3 -3
  2. package/_assets/{AnimatedBackground-CHvLpzUf.js → AnimatedBackground-DykVDDEL.js} +1 -1
  3. package/_assets/{Assets-DEojVtHO.js → Assets-D-OZRxeT.js} +2 -2
  4. package/_assets/{Assets.styles-B1LMem3Q.js → Assets.styles-Cp5E53TW.js} +1 -1
  5. package/_assets/{Authorizations-CTaaCZXi.js → Authorizations-DYNGMfu5.js} +1 -1
  6. package/_assets/{Cart-AX3HGlh3.js → Cart-vdTvrb1T.js} +2 -2
  7. package/_assets/{CircularProgress-BZ7NQch9.js → CircularProgress-CCdQsv8A.js} +1 -1
  8. package/_assets/{Collection-BcbP4dPg.js → Collection-BXT5TK4k.js} +1 -1
  9. package/_assets/{CollectionCarousel-jmGi2U05.js → CollectionCarousel-C88U7Rbz.js} +1 -1
  10. package/_assets/{Creator-CC2tlDlW.js → Creator-umbV4MLL.js} +1 -1
  11. package/_assets/{ErrorNotice-BSIjN9FY.js → ErrorNotice-BwAPlZ6y.js} +1 -1
  12. package/_assets/{ExchangeController-Yl7Xs6qB.js → ExchangeController-g8wn2fKk.js} +1 -1
  13. package/_assets/{GetCredits-Bq1y_1so.js → GetCredits-CBSwYuVI.js} +1 -1
  14. package/_assets/{HelpersUtil-1_9JDXYM.js → HelpersUtil-Cpjvvf7m.js} +1 -1
  15. package/_assets/{ImportListings-BOHhSYaD.js → ImportListings-BJwxygaC.js} +1 -1
  16. package/_assets/{ItemDetail-CI8vL8MT.js → ItemDetail-CvunBWyN.js} +3 -3
  17. package/_assets/{ItemPreview.styles-Ct9P1B-d.js → ItemPreview.styles-WfFUfSEV.js} +1 -1
  18. package/_assets/{LoadMore-DD6-EqBS.js → LoadMore-Dmv_9BPG.js} +1 -1
  19. package/_assets/{ManaPricingBanner.styles-CW9IN_dA.js → ManaPricingBanner.styles-B9a44w0w.js} +1 -1
  20. package/_assets/{MenuList-BccS2Xcz.js → MenuList-B6_AtDDA.js} +1 -1
  21. package/_assets/{MyAssets-8_cluEwM.js → MyAssets-ClniNvkB.js} +1 -1
  22. package/_assets/{MyFavorites-D2hqTVxj.js → MyFavorites-CLUcEh3u.js} +1 -1
  23. package/_assets/{NotFound-DhsUg-9v.js → NotFound-BMKZ9oJq.js} +1 -1
  24. package/_assets/{NotificationsBell-DL2DHZkV.js → NotificationsBell-CnKPRAUE.js} +1 -1
  25. package/_assets/{OutfitDetail-CTE9Y2YI.js → OutfitDetail-BZCHdXWK.js} +1 -1
  26. package/_assets/{OutfitPreview-DTexJcaC.js → OutfitPreview-CDPITsPV.js} +1 -1
  27. package/_assets/{OutfitStudio-IUKANtS4.js → OutfitStudio-KoKLjCti.js} +1 -1
  28. package/_assets/{StoreSettings-D8nBhr1U.js → StoreSettings-CUyPa9A2.js} +1 -1
  29. package/_assets/{Success-R1I0qHV7.js → Success-OzJBN4dV.js} +1 -1
  30. package/_assets/{SwapController-BaLokWQK.js → SwapController-W50LrDpI.js} +1 -1
  31. package/_assets/{Tooltip-8Rn2EQnm.js → Tooltip-Dtw4IyxU.js} +1 -1
  32. package/_assets/{TradeService-DgaMlENs.js → TradeService-BTP6M2Cr.js} +1 -1
  33. package/_assets/{W3MFrameProviderSingleton-BefcEwHF.js → W3MFrameProviderSingleton-BI_TOfLF.js} +3 -3
  34. package/_assets/{WebCryptoP256-CJnbpGC3.js → WebCryptoP256-Bm3o4NbU.js} +1 -1
  35. package/_assets/{authorizations-C1shI8qN.js → authorizations-DbQrG6Db.js} +1 -1
  36. package/_assets/{basic-B3K2S7qT.js → basic-DC72Lhzk.js} +1 -1
  37. package/_assets/{biconomy-DZYrYjn_.js → biconomy-BUC9LDmo.js} +1 -1
  38. package/_assets/{browseLayout.styles-CdBFJnD1.js → browseLayout.styles-CxS8iNjf.js} +1 -1
  39. package/_assets/{builder-CxQSxnbg.js → builder-CfEOD9tN.js} +1 -1
  40. package/_assets/{buy-gasless-Bgmi9EE6.js → buy-gasless-D7NJzDMT.js} +1 -1
  41. package/_assets/{buy-7YNy1Ky6.js → buy-ncwLOesB.js} +1 -1
  42. package/_assets/{categories-fdqQ1jGj.js → categories-BmPNPsb3.js} +1 -1
  43. package/_assets/{ccip-D_tGl3BV.js → ccip-ORA4oqQC.js} +1 -1
  44. package/_assets/{ccip-B3flptay.js → ccip-km2wYbp6.js} +1 -1
  45. package/_assets/{clsx-DqDJX0Wu.js → clsx-HIGn_cGX.js} +1 -1
  46. package/_assets/{controller-B_iikB1D.js → controller-C0d8rAWe.js} +2 -2
  47. package/_assets/{core-BU7SnNlk.js → core-5Wp9HrjK.js} +4 -4
  48. package/_assets/{createSvgIcon-CtLGC3hn.js → createSvgIcon-BmHsfCd-.js} +1 -1
  49. package/_assets/{custom-BEjNfCl9.js → custom-BSvJI1CW.js} +1 -1
  50. package/_assets/{data-capture-B1VhMeC7.js → data-capture-11vj00ow.js} +1 -1
  51. package/_assets/{email-B57omyQe.js → email-yMdgJov_.js} +1 -1
  52. package/_assets/{embedded-wallet-CQkZ1oq_.js → embedded-wallet-f2VuX_Ba.js} +1 -1
  53. package/_assets/{emotion-styled.browser.esm-D2394E6D.js → emotion-styled.browser.esm-LdWFzTF_.js} +1 -1
  54. package/_assets/{engine-C2DdTaY7.js → engine-BISng9P1.js} +1 -1
  55. package/_assets/{errors-D_opMycA.js → errors-CDxB6Bde.js} +1 -1
  56. package/_assets/{estimate-l1-fee-D8xs9cx5.js → estimate-l1-fee-Dupi50zV.js} +1 -1
  57. package/_assets/{execute-CGo5AyiA.js → execute-Sk9grUoC.js} +2 -2
  58. package/_assets/{features-D-9rXGGv.js → features-CDAzG09c.js} +1 -1
  59. package/_assets/{fetchTokenMetadata-B7bmvVVs.js → fetchTokenMetadata-BDffXmB-.js} +2 -2
  60. package/_assets/{field.styles-CRXnbqs7.js → field.styles-BqkhGo_h.js} +1 -1
  61. package/_assets/{get-ecosystem-wallet-info-B_YL7NbP.js → get-ecosystem-wallet-info-D4ngQg60.js} +1 -1
  62. package/_assets/{getBalance-DobpCh21.js → getBalance-B1-dion7.js} +1 -1
  63. package/_assets/{getNFT-CE2BQKXd.js → getNFT-BBBlgO1C.js} +1 -1
  64. package/_assets/{getNFT-XA7-jTvL.js → getNFT-BmKoYqQJ.js} +1 -1
  65. package/_assets/{getThemeProps-CtBrmvfh.js → getThemeProps-jLK1b2Tq.js} +1 -1
  66. package/_assets/{grid.styles-qz7ti9Zv.js → grid.styles-DVxxH3aB.js} +1 -1
  67. package/_assets/{hashTypedData-CVAaL5pV.js → hashTypedData-CBiIuCVc.js} +1 -1
  68. package/_assets/{hashTypedData-DBdbd6qS.js → hashTypedData-CKuz2aVt.js} +1 -1
  69. package/_assets/{in-app-8uY3gq10.js → in-app-DcNtj5Xf.js} +1 -1
  70. package/_assets/{in-app-wallet-calls-DUYtkUWV.js → in-app-wallet-calls-U7iYBP7P.js} +1 -1
  71. package/_assets/{index-0k_Ix9-y.js → index-1uEqxM3l.js} +1 -1
  72. package/_assets/{index-CnJpbFSz.js → index-6GjaXl23.js} +1 -1
  73. package/_assets/{index-kK-ziiji.js → index-8fiSAahQ.js} +1 -1
  74. package/_assets/{index-D5CV5tma.js → index-BB5cWZJ7.js} +1 -1
  75. package/_assets/{index-bK2MzhZQ.js → index-BB6uvg7H.js} +1 -1
  76. package/_assets/{index-BcLl5Pcj.js → index-BGP6XJ6r.js} +1 -1
  77. package/_assets/{index-BdNZtyJQ.js → index-BVEcrjSI.js} +1 -1
  78. package/_assets/{index-D5sgkVGL.js → index-BgHFMsKp.js} +1 -1
  79. package/_assets/{index-BeU8m41Y.js → index-Boq2MAgc.js} +1 -1
  80. package/_assets/{index-mT-oF00r.js → index-BvsJ1ITB.js} +1 -1
  81. package/_assets/{index-y4_ULjVF.js → index-C-UihQWz.js} +3 -3
  82. package/_assets/{index-DvuYfHQP.js → index-C-r1JIF1.js} +2 -2
  83. package/_assets/{index-C2rfWYTU.js → index-CAFU7lWi.js} +1 -1
  84. package/_assets/{index-B6UcUowD.js → index-CEkldQl_.js} +1 -1
  85. package/_assets/{index-C9P3L7ig.js → index-CEoJjnxL.js} +2 -2
  86. package/_assets/{index-DsVYdq6J.js → index-CSayWKDg.js} +1 -1
  87. package/_assets/{index-El7E7gyC.js → index-CZUmrJQF.js} +1 -1
  88. package/_assets/{index-SEqhKb6L.js → index-C_Ihlx92.js} +1 -1
  89. package/_assets/{index-DyqgsK_t.js → index-CcPSHB7t.js} +1 -1
  90. package/_assets/{index-BfiiGRPB.js → index-CgFzmzgX.js} +1 -1
  91. package/_assets/{index-B3cBw-D7.js → index-Cj8gk05j.js} +1 -1
  92. package/_assets/{index-BfMJozQN.js → index-CkyGmZQo.js} +1 -1
  93. package/_assets/index-CnG2Xd4V.js +3488 -0
  94. package/_assets/{index-DoSPE-Ha.js → index-Cs-6860O.js} +1 -1
  95. package/_assets/{index-C3Y7EEOn.js → index-CyRlG-Pt.js} +1 -1
  96. package/_assets/{index-Nm_gGcV-.js → index-DA6GN-Db.js} +1 -1
  97. package/_assets/{index-xBX71Czg.js → index-DAm4Gv1_.js} +1 -1
  98. package/_assets/{index-CnyZnOze.js → index-DDRf5d3O.js} +1 -1
  99. package/_assets/{index-RGElQJQM.js → index-DKJyAQAA.js} +1 -1
  100. package/_assets/{index-DcYRP6nf.js → index-DOxFNsoK.js} +1 -1
  101. package/_assets/{index-B52GuR9b.js → index-D_2aPTiB.js} +1 -1
  102. package/_assets/{index-Cm0V-kfI.js → index-DaRzHoEw.js} +1 -1
  103. package/_assets/{index-C6oNJ6-K.js → index-DhcnvapZ.js} +1 -1
  104. package/_assets/{index-ClWeiLd5.js → index-DhzsXLVu.js} +1 -1
  105. package/_assets/{index-5BrpwK2E.js → index-Di2R91qn.js} +3 -3
  106. package/_assets/{index-vju3bcbC.js → index-Dpgvm87a.js} +1 -1
  107. package/_assets/{index-LyvizffK.js → index-DrJMdewM.js} +1 -1
  108. package/_assets/{index-CQSjY0Du.js → index-Dsgk5YeS.js} +1 -1
  109. package/_assets/{index-bxCEY1Kz.js → index-Dw0feoKt.js} +1 -1
  110. package/_assets/{index-HTR5wu9m.js → index-Dxrd4kNb.js} +2 -2
  111. package/_assets/{index-CCG1GoIN.js → index-Dy-7dgf2.js} +1 -1
  112. package/_assets/{index-4yxKINQG.js → index-Dy9gdJSt.js} +1 -1
  113. package/_assets/{index-OkR1-K6e.js → index-E4Vv2B-y.js} +1 -1
  114. package/_assets/{index-C3OMForh.js → index-MJsXL1L_.js} +1 -1
  115. package/_assets/{index-BhjYUrg0.js → index-U0qUGjk7.js} +1 -1
  116. package/_assets/{index-C1p-YzYG.js → index-Vgun69Mk.js} +1 -1
  117. package/_assets/{index-DTr5GHSv.js → index-d9t-2lof.js} +1 -1
  118. package/_assets/{index-eUea8kWn.js → index-f7Sd2SDd.js} +1 -1
  119. package/_assets/{index-CjXgzl0R.js → index-ipRgknyO.js} +3 -3
  120. package/_assets/{index-Ce7FXMH6.js → index-mU-K9kj3.js} +1 -1
  121. package/_assets/{index-DV0qYwPA.js → index-r2TSIBxl.js} +1 -1
  122. package/_assets/{index.es-CKWyDo1q.js → index.es-BXjppxwS.js} +4 -4
  123. package/_assets/{index.es-ClPouKQg.js → index.es-DChg2mKP.js} +1 -1
  124. package/_assets/{index.es-DF60f2Mp.js → index.es-DKsHjh1R.js} +1 -1
  125. package/_assets/{localBatchGatewayRequest-OBBcAlGv.js → localBatchGatewayRequest-7FI2GJ0g.js} +1 -1
  126. package/_assets/{mana-convert-CmDEKake.js → mana-convert--3TPFouV.js} +1 -1
  127. package/_assets/{mana-rate-BjVix_kr.js → mana-rate-Bede0UMr.js} +1 -1
  128. package/_assets/{networks-wsAhf300.js → networks-Cflv25kF.js} +1 -1
  129. package/_assets/{onramp-Dm1zvxjw.js → onramp-CUAIypvs.js} +1 -1
  130. package/_assets/{openzeppelin-DBTB-nhA.js → openzeppelin-BzYLrAgZ.js} +1 -1
  131. package/_assets/{parseNft-Be2Jf_xO.js → parseNft-BYWTDAIA.js} +2 -2
  132. package/_assets/{parseSignature-BgK0HNBL.js → parseSignature-BBiGryaG.js} +3 -3
  133. package/_assets/{parseSignature-DUi_JbiE.js → parseSignature-DGzjGvOo.js} +1 -1
  134. package/_assets/{passkeys-Cn_zbnFu.js → passkeys-CxPHPoqy.js} +1 -1
  135. package/_assets/{pay-with-exchange-BPDG4vuK.js → pay-with-exchange-CLrQ1nB8.js} +1 -1
  136. package/_assets/{qr-overlay-YaY3yjB-.js → qr-overlay-DXd6Ykqa.js} +1 -1
  137. package/_assets/{receive-TvYb15EC.js → receive-DkT3Hj18.js} +1 -1
  138. package/_assets/{resolveImplementation-CQV2GLf_.js → resolveImplementation-1zhF6aFr.js} +1 -1
  139. package/_assets/{rpc-CItoFNEp.js → rpc-C3tAhXNy.js} +1 -1
  140. package/_assets/{secp256k1-ivKnCo4o.js → secp256k1-B7N6bwzz.js} +1 -1
  141. package/_assets/{secp256k1-zoeEVUd9.js → secp256k1-BK54m-Gt.js} +1 -1
  142. package/_assets/{secp256k1-DRdrrq5M.js → secp256k1-Cmukinmx.js} +1 -1
  143. package/_assets/{send-KyJXgfEP.js → send-CtVAEXrQ.js} +1 -1
  144. package/_assets/{send-batch-transaction-CMIoWgH_.js → send-batch-transaction-B1C9OTs3.js} +1 -1
  145. package/_assets/{send-eip712-transaction-DFA_NvME.js → send-eip712-transaction-udw-zOvI.js} +2 -2
  146. package/_assets/{send-gasless-transaction-rpDMTChs.js → send-gasless-transaction-BGJmJVoh.js} +2 -2
  147. package/_assets/{send-transaction-Bdxf4mR-.js → send-transaction-DMZ95iWn.js} +2 -2
  148. package/_assets/{sendMetaTransaction-Bj0jdOFW.js → sendMetaTransaction-5i0Mv0tj.js} +1 -1
  149. package/_assets/{sendRawTransaction-BsxjE4-g.js → sendRawTransaction-DhYnxQWd.js} +3 -3
  150. package/_assets/{serializeTransaction-1erxN0sJ.js → serializeTransaction-bMhqP7E9.js} +1 -1
  151. package/_assets/{session-proposal-B0iDzfRA.js → session-proposal-IA1AKlb1.js} +1 -1
  152. package/_assets/{session-request-BjhyRLM9.js → session-request-BkPdWJgm.js} +2 -2
  153. package/_assets/{signing-CRKINztP.js → signing-B4gLkfiP.js} +3 -3
  154. package/_assets/{socials-1JjCJX93.js → socials-DFJ1w8fR.js} +1 -1
  155. package/_assets/{swaps-xl0imKPc.js → swaps-C61OUWYJ.js} +1 -1
  156. package/_assets/{thirdweb-EjaBlMwG.js → thirdweb-DOCHhNkG.js} +3 -3
  157. package/_assets/{to-serializable-transaction-BJbueh8D.js → to-serializable-transaction-Cf5xKymd.js} +2 -2
  158. package/_assets/{trade-encoding-BnDgi1QQ.js → trade-encoding-DnT4n-4b.js} +1 -1
  159. package/_assets/{transactionReceipt-BoDpuYqv.js → transactionReceipt-DOYRbTI1.js} +1 -1
  160. package/_assets/{transactions-mUAXsl3e.js → transactions-wR1ibP_x.js} +1 -1
  161. package/_assets/{useCreditPacks--aSgsJ92.js → useCreditPacks-1JCLw1fK.js} +1 -1
  162. package/_assets/{useInfiniteGrid-Ct3kWony.js → useInfiniteGrid-C87CcLUH.js} +1 -1
  163. package/_assets/useManaRate--yo-xwQf.js +1 -0
  164. package/_assets/{useSecondarySales-CaN1WkpM.js → useSecondarySales-pbD8MHXU.js} +1 -1
  165. package/_assets/{useStore-ChkmZ3qe.js → useStore-B52W6lZt.js} +1 -1
  166. package/_assets/{useTheme-DO90qBa1.js → useTheme-CPZgbEEt.js} +1 -1
  167. package/_assets/{verifyHash-B-yVKa3W.js → verifyHash-D0TBEeBk.js} +1 -1
  168. package/_assets/{w3m-modal-BLrIcOlj.js → w3m-modal-3ljJOlRA.js} +1 -1
  169. package/_assets/{w3m-modal-CLMDYpCW.js → w3m-modal-inhp6iRR.js} +1 -1
  170. package/_assets/{wait-for-tx-receipt-D1H6U1pd.js → wait-for-tx-receipt-BzjeCD4B.js} +1 -1
  171. package/_assets/{wallets-BOa-d8wQ.js → wallets-Bicov52W.js} +5 -5
  172. package/_assets/{web-connector-BqHFvU2z.js → web-connector-BQQbNDWY.js} +3 -3
  173. package/_assets/{writeContract-BEWlchIW.js → writeContract-DIHVeRVL.js} +1 -1
  174. package/_assets/{zoraTestnet-CKnxxXEw.js → zoraTestnet-D5VxqDUA.js} +1 -1
  175. package/index.html +11 -11
  176. package/package.json +2 -2
  177. package/_assets/index-I4EEqchH.js +0 -3260
  178. package/_assets/useManaRate-Cfp1rcnf.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as j,j as e,L as Q,a as dt}from"./react-DehiWSvs.js";import{bl as lt,s as l,t as o,k as ut,B as ht,m as xt,e as d,n as pt,u as v,I as f,bm as G,bn as K,bo as mt,p as k,bp as gt,b1 as T,ao as ft,bq as bt,br as C}from"./index-I4EEqchH.js";import{a as yt}from"./mana-convert-CmDEKake.js";import{u as jt}from"./useManaRate-Cfp1rcnf.js";import{L as vt}from"./LoadMore-DD6-EqBS.js";import{u as b}from"./useInfiniteGrid-Ct3kWony.js";import{m as X}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./mana-rate-BjVix_kr.js";const kt=15e3;function It(t,n){return t.txHash&&n.txHash?t.txHash===n.txHash:t.txHash||n.txHash?!1:t.status===n.status&&Math.abs(t.createdAt-n.createdAt)<=kt}function At(t){const n=[...t].sort((i,a)=>a.createdAt-i.createdAt),s=[];for(const i of n){const a=s[s.length-1];a&&It(a[a.length-1],i)?a.push(i):s.push([i])}return s.map(i=>{var a;return{id:((a=i.find(c=>c.txHash))==null?void 0:a.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,h)=>c+h.credits,0),lines:i}})}function wt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function $t(t){const n=[],s=new Map;for(const i of t){const a=wt(i);if(!a){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=s.get(a);if(c){c.quantity+=1,c.credits+=i.credits;continue}const h={key:a,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};s.set(a,h),n.push(h)}return n}function Pt(t,n){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:n?yt(t.manaWei,n):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Lt(t){const s=At(t.purchases.filter(r=>r.status!=="EXPIRED")).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),i=t.sales.map(r=>{const x=Pt(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),a=(t.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(t.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...i,...a,...h].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Nt(t,n){return n==="all"?t:n==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const Z=t=>t.trim().toLowerCase();function Et(t){const n=new Map;for(const s of t??[]){const i=Z(s.txHash??"");if(!i)continue;const a=n.get(i);a?a.push(s):n.set(i,[s])}return n}function Tt(t,n,s=Date.now()){const i=n.txHash?t.get(Z(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const a=i.length===1?Ct(i[0].netCents):null,c=i.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:a};const h=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:a,availableAt:h}}function Ct(t){return lt(t)}const Ft="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/credits-product-vs4Q6u6l.svg",F=ut`
1
+ import{r as j,j as e,L as Q,a as dt}from"./react-DehiWSvs.js";import{bl as lt,s as l,t as o,k as ut,B as ht,m as xt,e as d,n as mt,u as v,I as f,bm as G,bn as K,bo as pt,p as k,bp as gt,b1 as T,ao as ft,bq as bt,br as C}from"./index-CnG2Xd4V.js";import{a as yt}from"./mana-convert--3TPFouV.js";import{u as jt}from"./useManaRate--yo-xwQf.js";import{L as vt}from"./LoadMore-Dmv_9BPG.js";import{u as b}from"./useInfiniteGrid-C87CcLUH.js";import{m as X}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./mana-rate-Bede0UMr.js";const kt=15e3;function It(t,n){return t.txHash&&n.txHash?t.txHash===n.txHash:t.txHash||n.txHash?!1:t.status===n.status&&Math.abs(t.createdAt-n.createdAt)<=kt}function At(t){const n=[...t].sort((i,a)=>a.createdAt-i.createdAt),s=[];for(const i of n){const a=s[s.length-1];a&&It(a[a.length-1],i)?a.push(i):s.push([i])}return s.map(i=>{var a;return{id:((a=i.find(c=>c.txHash))==null?void 0:a.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,h)=>c+h.credits,0),lines:i}})}function wt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function $t(t){const n=[],s=new Map;for(const i of t){const a=wt(i);if(!a){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=s.get(a);if(c){c.quantity+=1,c.credits+=i.credits;continue}const h={key:a,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};s.set(a,h),n.push(h)}return n}function Pt(t,n){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:n?yt(t.manaWei,n):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Lt(t){const s=At(t.purchases.filter(r=>r.status!=="EXPIRED")).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),i=t.sales.map(r=>{const x=Pt(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),a=(t.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(t.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...i,...a,...h].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Nt(t,n){return n==="all"?t:n==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const Z=t=>t.trim().toLowerCase();function Et(t){const n=new Map;for(const s of t??[]){const i=Z(s.txHash??"");if(!i)continue;const a=n.get(i);a?a.push(s):n.set(i,[s])}return n}function Tt(t,n,s=Date.now()){const i=n.txHash?t.get(Z(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const a=i.length===1?Ct(i[0].netCents):null,c=i.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:a};const h=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:a,availableAt:h}}function Ct(t){return lt(t)}const Ft="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/credits-product-vs4Q6u6l.svg",F=ut`
2
2
  0% { background-position: 200% 0; }
3
3
  100% { background-position: -200% 0; }
4
4
  `,St=l.section`
@@ -133,7 +133,7 @@ import{r as j,j as e,L as Q,a as dt}from"./react-DehiWSvs.js";import{bl as lt,s
133
133
  background: rgba(214, 61, 61, 0.14);
134
134
  color: #b02a2a;
135
135
  }
136
- `,p=l.div`
136
+ `,m=l.div`
137
137
  display: flex;
138
138
  align-items: center;
139
139
  gap: 5px;
@@ -288,4 +288,4 @@ import{r as j,j as e,L as Q,a as dt}from"./react-DehiWSvs.js";import{bl as lt,s
288
288
  margin: 6px 0 0;
289
289
  `,Rt=l(ht)`
290
290
  margin-top: 12px;
291
- `,W=E.withComponent(Q),y=24,Gt=["all","purchases","sales"];function g(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const n=j.useRef(null),[s,i]=j.useState(null),a=()=>{var h;const c=(h=n.current)==null?void 0:h.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(Ot,{ref:n,tabIndex:0,onMouseEnter:a,onMouseLeave:()=>i(null),onFocus:a,onBlur:()=>i(null),children:[t,s?dt.createPortal(e.jsx(Wt,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Kt({item:t}){const n=!!t.contractAddress&&!!t.itemId,s=!!t.tradeId||n,{data:i,isLoading:a}=v({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?bt(t.tradeId):C(t.contractAddress,{itemId:t.itemId}),enabled:s,staleTime:5*6e4}),c=s&&a,h=(i==null?void 0:i.name)??d("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",x=T({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,m=e.jsxs(e.Fragment,{children:[c?e.jsx(D,{}):e.jsx(M,{children:r?e.jsx("img",{src:r,alt:h}):e.jsx(f,{name:"cart",size:20})}),e.jsxs(H,{children:[c?e.jsx(q,{}):e.jsx(z,{title:h,children:h}),t.quantity>1?e.jsx(O,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(Bt,{children:[e.jsx(k,{className:"ccy-mark"})," ",t.credits]})]});return x?e.jsx(W,{to:x,"data-link":"true",children:m}):e.jsx(E,{children:m})}function _t({order:t}){const n=$t(t.lines),s=n.reduce((i,a)=>i+a.quantity,0);return e.jsxs(I,{"data-testid":"purchase-order",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsxs(P,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(p,{children:[e.jsx(k,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(S,{children:n.map(i=>e.jsx(Kt,{item:i},i.key))})]})}function Ut({sale:t}){const{data:n,isLoading:s}=v({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>C(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??d("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",c=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(D,{}):e.jsx(M,{children:a?e.jsx("img",{src:a,alt:i}):e.jsx(f,{name:"offer",size:20})}),e.jsxs(H,{children:[s?e.jsx(q,{}):e.jsx(z,{title:i,children:i}),e.jsx(O,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(I,{"data-testid":"activity-mana-purchase",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsx(P,{children:d("activity.paidWithMana")})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(p,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(J,{src:X,alt:"MANA"})})]})]})]}),e.jsx(S,{children:c?e.jsx(W,{to:c,"data-link":"true",children:h}):e.jsx(E,{children:h})})]})}function Qt({sale:t,payout:n}){const{data:s,isLoading:i}=v({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>C(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(s==null?void 0:s.name)??d("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",h=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[i?e.jsx(D,{}):e.jsx(M,{children:c?e.jsx("img",{src:c,alt:a}):e.jsx(f,{name:"offer",size:20})}),e.jsxs(H,{children:[i?e.jsx(q,{}):e.jsx(z,{title:a,children:a}),e.jsxs(O,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),n.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:g(n.availableAt)})}`:""]})]})]});return e.jsxs(I,{"data-testid":"activity-sale",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsx(P,{children:d("activity.saleLabel")})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),n.kind==="direct"?e.jsxs(p,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(J,{src:X,alt:"MANA"})})]}):n.credits!==null?e.jsxs(p,{"data-kind":"income",children:[e.jsx(k,{className:"ccy-mark"})," +",ft(n.credits)]}):e.jsx(p,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(S,{children:h?e.jsx(W,{to:h,"data-link":"true",children:r}):e.jsx(E,{children:r})})]})}function Xt({order:t}){const n=`$${(t.usdCents/100).toFixed(2)}`,s=gt(t.status),i=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(I,{"data-testid":"credit-order",children:e.jsxs(A,{children:[e.jsx(qt,{children:e.jsx("img",{src:Ft,alt:"","aria-hidden":!0})}),e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsxs(P,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:n})]})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":s,children:i}),e.jsxs(p,{"data-kind":"income",children:["+",e.jsx(k,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Zt({filter:t}){const n={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(V,{children:[e.jsx(f,{name:n.icon,size:40,color:o.colors.muted2}),e.jsx(Y,{children:n.title}),e.jsx("p",{className:"muted",children:n.body}),t!=="sales"?e.jsx(Rt,{as:Q,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function de(){xt({title:d("nav.activity"),noindex:!0});const{session:t}=pt(),[n,s]=j.useState("all"),i=!!t&&n!=="sales",a=!!t&&n!=="purchases",c=b(["purchases",t==null?void 0:t.address],u=>mt(t.address,t.identity,{first:y,skip:u}),{enabled:i}),h=b(["sales",t==null?void 0:t.address],u=>G(t.address,{role:"seller",first:y,skip:u}),{enabled:a}),r=b(["credit-orders",t==null?void 0:t.address],u=>K(t.address,t.identity,{first:y,skip:u}),{enabled:i}),x=b(["mana-purchases",t==null?void 0:t.address],u=>G(t.address,{role:"buyer",first:y,skip:u}),{enabled:i}),{data:m}=v({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>K(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:a,staleTime:6e4}),nt=j.useMemo(()=>Et(m),[m]),{data:st}=jt(a);if(!t)return e.jsxs(V,{children:[e.jsx(f,{name:"clock",size:40,color:o.colors.muted2}),e.jsx(Y,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const B=Nt(Lt({purchases:i?c.items:[],sales:a?h.items:[],creditOrders:i?r.items:[],manaPurchases:i?x.items:[],rate:st}),n),at=i&&(c.isLoading||r.isLoading||x.isLoading)||a&&h.isLoading,R=i&&(c.isFetchingNextPage||r.isFetchingNextPage||x.isFetchingNextPage)||a&&h.isFetchingNextPage,rt=i&&(c.hasNextPage||r.hasNextPage||x.hasNextPage)||a&&h.hasNextPage;function ot(){i&&c.hasNextPage&&c.fetchNextPage(),i&&r.hasNextPage&&r.fetchNextPage(),i&&x.hasNextPage&&x.fetchNextPage(),a&&h.hasNextPage&&h.fetchNextPage()}return e.jsxs(St,{children:[e.jsx(Mt,{children:e.jsx(Dt,{children:d("nav.activity")})}),e.jsx(Ht,{role:"tablist","aria-label":d("nav.activity"),children:Gt.map(u=>e.jsx(zt,{type:"button",role:"tab","aria-selected":n===u,"data-active":n===u,"data-testid":`activity-filter-${u}`,onClick:()=>s(u),children:d(`activity.filter.${u}`)},u))}),at?e.jsx(_,{children:Array.from({length:5}).map((u,ct)=>e.jsx(U,{},ct))}):B.length===0?e.jsx(Zt,{filter:n}):e.jsxs(e.Fragment,{children:[e.jsxs(_,{children:[B.map(u=>u.kind==="purchase"?e.jsx(_t,{order:u.order},u.id):u.kind==="credit"?e.jsx(Xt,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ut,{sale:u.sale},u.id):e.jsx(Qt,{sale:u.sale,payout:Tt(nt,u.sale)},u.id)),R?e.jsx(U,{}):null]}),e.jsx(vt,{hasNextPage:rt,isFetching:R,onLoadMore:ot})]})]})}export{de as Activity};
291
+ `,W=E.withComponent(Q),y=24,Gt=["all","purchases","sales"];function g(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const n=j.useRef(null),[s,i]=j.useState(null),a=()=>{var h;const c=(h=n.current)==null?void 0:h.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(Ot,{ref:n,tabIndex:0,onMouseEnter:a,onMouseLeave:()=>i(null),onFocus:a,onBlur:()=>i(null),children:[t,s?dt.createPortal(e.jsx(Wt,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Kt({item:t}){const n=!!t.contractAddress&&!!t.itemId,s=!!t.tradeId||n,{data:i,isLoading:a}=v({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?bt(t.tradeId):C(t.contractAddress,{itemId:t.itemId}),enabled:s,staleTime:5*6e4}),c=s&&a,h=(i==null?void 0:i.name)??d("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",x=T({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,p=e.jsxs(e.Fragment,{children:[c?e.jsx(D,{}):e.jsx(M,{children:r?e.jsx("img",{src:r,alt:h}):e.jsx(f,{name:"cart",size:20})}),e.jsxs(H,{children:[c?e.jsx(q,{}):e.jsx(z,{title:h,children:h}),t.quantity>1?e.jsx(O,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(Bt,{children:[e.jsx(k,{className:"ccy-mark"})," ",t.credits]})]});return x?e.jsx(W,{to:x,"data-link":"true",children:p}):e.jsx(E,{children:p})}function _t({order:t}){const n=$t(t.lines),s=n.reduce((i,a)=>i+a.quantity,0);return e.jsxs(I,{"data-testid":"purchase-order",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsxs(P,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(m,{children:[e.jsx(k,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(S,{children:n.map(i=>e.jsx(Kt,{item:i},i.key))})]})}function Ut({sale:t}){const{data:n,isLoading:s}=v({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>C(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??d("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",c=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(D,{}):e.jsx(M,{children:a?e.jsx("img",{src:a,alt:i}):e.jsx(f,{name:"offer",size:20})}),e.jsxs(H,{children:[s?e.jsx(q,{}):e.jsx(z,{title:i,children:i}),e.jsx(O,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(I,{"data-testid":"activity-mana-purchase",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsx(P,{children:d("activity.paidWithMana")})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(m,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(J,{src:X,alt:"MANA"})})]})]})]}),e.jsx(S,{children:c?e.jsx(W,{to:c,"data-link":"true",children:h}):e.jsx(E,{children:h})})]})}function Qt({sale:t,payout:n}){const{data:s,isLoading:i}=v({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>C(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(s==null?void 0:s.name)??d("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",h=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[i?e.jsx(D,{}):e.jsx(M,{children:c?e.jsx("img",{src:c,alt:a}):e.jsx(f,{name:"offer",size:20})}),e.jsxs(H,{children:[i?e.jsx(q,{}):e.jsx(z,{title:a,children:a}),e.jsxs(O,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),n.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:g(n.availableAt)})}`:""]})]})]});return e.jsxs(I,{"data-testid":"activity-sale",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsx(P,{children:d("activity.saleLabel")})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),n.kind==="direct"?e.jsxs(m,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(J,{src:X,alt:"MANA"})})]}):n.credits!==null?e.jsxs(m,{"data-kind":"income",children:[e.jsx(k,{className:"ccy-mark"})," +",ft(n.credits)]}):e.jsx(m,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(S,{children:h?e.jsx(W,{to:h,"data-link":"true",children:r}):e.jsx(E,{children:r})})]})}function Xt({order:t}){const n=`$${(t.usdCents/100).toFixed(2)}`,s=gt(t.status),i=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(I,{"data-testid":"credit-order",children:e.jsxs(A,{children:[e.jsx(qt,{children:e.jsx("img",{src:Ft,alt:"","aria-hidden":!0})}),e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsxs(P,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:n})]})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":s,children:i}),e.jsxs(m,{"data-kind":"income",children:["+",e.jsx(k,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Zt({filter:t}){const n={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(V,{children:[e.jsx(f,{name:n.icon,size:40,color:o.colors.muted2}),e.jsx(Y,{children:n.title}),e.jsx("p",{className:"muted",children:n.body}),t!=="sales"?e.jsx(Rt,{as:Q,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function de(){xt({title:d("nav.activity"),noindex:!0});const{session:t}=mt(),[n,s]=j.useState("all"),i=!!t&&n!=="sales",a=!!t&&n!=="purchases",c=b(["purchases",t==null?void 0:t.address],u=>pt(t.address,t.identity,{first:y,skip:u}),{enabled:i}),h=b(["sales",t==null?void 0:t.address],u=>G(t.address,{role:"seller",first:y,skip:u}),{enabled:a}),r=b(["credit-orders",t==null?void 0:t.address],u=>K(t.address,t.identity,{first:y,skip:u}),{enabled:i}),x=b(["mana-purchases",t==null?void 0:t.address],u=>G(t.address,{role:"buyer",first:y,skip:u}),{enabled:i}),{data:p}=v({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>K(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:a,staleTime:6e4}),nt=j.useMemo(()=>Et(p),[p]),{data:st}=jt(a);if(!t)return e.jsxs(V,{children:[e.jsx(f,{name:"clock",size:40,color:o.colors.muted2}),e.jsx(Y,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const B=Nt(Lt({purchases:i?c.items:[],sales:a?h.items:[],creditOrders:i?r.items:[],manaPurchases:i?x.items:[],rate:st}),n),at=i&&(c.isLoading||r.isLoading||x.isLoading)||a&&h.isLoading,R=i&&(c.isFetchingNextPage||r.isFetchingNextPage||x.isFetchingNextPage)||a&&h.isFetchingNextPage,rt=i&&(c.hasNextPage||r.hasNextPage||x.hasNextPage)||a&&h.hasNextPage;function ot(){i&&c.hasNextPage&&c.fetchNextPage(),i&&r.hasNextPage&&r.fetchNextPage(),i&&x.hasNextPage&&x.fetchNextPage(),a&&h.hasNextPage&&h.fetchNextPage()}return e.jsxs(St,{children:[e.jsx(Mt,{children:e.jsx(Dt,{children:d("nav.activity")})}),e.jsx(Ht,{role:"tablist","aria-label":d("nav.activity"),children:Gt.map(u=>e.jsx(zt,{type:"button",role:"tab","aria-selected":n===u,"data-active":n===u,"data-testid":`activity-filter-${u}`,onClick:()=>s(u),children:d(`activity.filter.${u}`)},u))}),at?e.jsx(_,{children:Array.from({length:5}).map((u,ct)=>e.jsx(U,{},ct))}):B.length===0?e.jsx(Zt,{filter:n}):e.jsxs(e.Fragment,{children:[e.jsxs(_,{children:[B.map(u=>u.kind==="purchase"?e.jsx(_t,{order:u.order},u.id):u.kind==="credit"?e.jsx(Xt,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ut,{sale:u.sale},u.id):e.jsx(Qt,{sale:u.sale,payout:Tt(nt,u.sale)},u.id)),R?e.jsx(U,{}):null]}),e.jsx(vt,{hasNextPage:rt,isFetching:R,onLoadMore:ot})]})]})}export{de as Activity};
@@ -1,4 +1,4 @@
1
- import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-I4EEqchH.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
1
+ import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-CnG2Xd4V.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -1,4 +1,4 @@
1
- import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b6 as Xe,b7 as Ye,d as et,s,t,n as Be,aZ as tt,q as nt,ao as ge,e as n,o as st,I as S,p as M,bu as ne,aY as ot,O as Y,ba as it,b9 as rt,m as Fe,aa as at,ac as Te,ad as q,aq as lt,bv as ct}from"./index-I4EEqchH.js";import{u as dt}from"./useSecondarySales-CaN1WkpM.js";import{m as pt,a as Le}from"./mana-convert-CmDEKake.js";import{u as Ue}from"./useManaRate-Cfp1rcnf.js";import{g as ht,h as xt,i as ft,j as mt,k as ut,C as gt,l as bt,o as yt,m as wt,n as jt,M as vt,p as $t,E as Ct,q as kt,r as St,s as Et,t as Rt,u as Tt,v as _t}from"./Assets.styles-B1LMem3Q.js";import{S as _e,R as zt,F as It,e as At}from"./categories-fdqQ1jGj.js";import{L as Nt}from"./LoadMore-DD6-EqBS.js";import{u as Mt}from"./useInfiniteGrid-Ct3kWony.js";import{E as Pt}from"./ErrorNotice-BSIjN9FY.js";import{d as Wt}from"./dcl-schemas-Dr9BTjb7.js";import{s as Bt,G as Ft,w as Lt,S as Ut}from"./buy-gasless-Bgmi9EE6.js";import{s as Ht}from"./buy-7YNy1Ky6.js";import{i as Ot}from"./trade-encoding-BnDgi1QQ.js";import{r as Gt}from"./mana-rate-BjVix_kr.js";import{f as Dt}from"./errors-D_opMycA.js";import{J as qt,C as Vt,B as be}from"./ethers-CtNGBird.js";import{n as Zt}from"./Tooltip-8Rn2EQnm.js";import{G as Kt}from"./grid.styles-qz7ti9Zv.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-C1shI8qN.js";import"./sendMetaTransaction-Bj0jdOFW.js";function V(o){const i=o.source??"item",a=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${a}`}const L="100000000000000000000",He=2,ee=15,Jt=/^[a-zA-Z0-9]+$/;function ze(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:Jt.test(i)?i.length<He?{ok:!1,reason:"too-short"}:i.length>ee?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Xt=["function available(string _subdomain) view returns (bool)"],Ie={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return F.chainId===Number(Wt.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function en(o,i={}){var p;const{rpc:a,address:h}=Yt(),l=new qt(a),d=new Vt(h,Xt,l);console.info(`[names] availability check → DCLRegistrar(${h}).available("${o}") on ${a}`);const x=await d.available(o);if((p=i.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${x}`),x?"available":"taken"}const tn="https://app.across.to/api";class ye extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(o){return pt(L,o)}async function sn(o,i,a={}){var p;const h=a.chainId??F.chainId,l=a.provider??"across",d=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${h}&provider=${l}`,x=await et(d,{method:"GET",identity:o,metadata:{}});if(!x.ok){let r;try{r=(p=await x.json())==null?void 0:p.code}catch{}throw r==="ROUTE_COST_TOO_HIGH"?new ye:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function on(o,i){const a=be.from(o.availableAmount),l=be.from(L).sub(a);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Ot(o.id)}],creditsSignatures:[o.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:L}}async function rn(o,i={}){const a=tn,h=i.intervalMs??1e4,l=i.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const p=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${o}`);if(p.ok){const r=await p.json(),u=(r.status??"pending").toLowerCase(),g=r.fillTx??r.fillTxnRef??null,w=r.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:w}}}catch{}x<l-1&&await new Promise(p=>setTimeout(p,h))}return d}async function an(o){const{name:i,identity:a,signer:h}=o,l=o.chainId??F.chainId,d=o.provider??"across",x=(o.beneficiary??await h.getAddress()).toLowerCase();let p=null,r=!1;console.info("[names] register start",{name:i,buyer:x,chainId:l,provider:d});try{const u=await Gt(l),g=nn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await sn(a,i,{chainId:l,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(a,g);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(L))throw new Error("Credit under-sized for the name price");const k=on(j.credit,w);let f;try{f=await Bt({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Ft))throw b;f=await Ht(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Lt(f),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const b=await rn(f,o.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:i,buyer:x,originConfirmed:r}),u instanceof Ut)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Ye(a,[p]).catch(()=>{}),u instanceof ye)throw u;const g=new Error(Dt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=u,g}}const ln=s.div`
1
+ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b6 as Xe,b7 as Ye,d as et,s,t,n as Be,aZ as tt,q as nt,ao as ge,e as n,o as st,I as S,p as M,bu as ne,aY as ot,O as Y,ba as it,b9 as rt,m as Fe,aa as at,ac as Te,ad as q,aq as lt,bv as ct}from"./index-CnG2Xd4V.js";import{u as dt}from"./useSecondarySales-pbD8MHXU.js";import{m as pt,a as Le}from"./mana-convert--3TPFouV.js";import{u as Ue}from"./useManaRate--yo-xwQf.js";import{g as ht,h as xt,i as ft,j as mt,k as ut,C as gt,l as bt,o as yt,m as wt,n as jt,M as vt,p as $t,E as Ct,q as kt,r as St,s as Et,t as Rt,u as Tt,v as _t}from"./Assets.styles-Cp5E53TW.js";import{S as _e,R as zt,F as It,e as At}from"./categories-BmPNPsb3.js";import{L as Nt}from"./LoadMore-Dmv_9BPG.js";import{u as Mt}from"./useInfiniteGrid-C87CcLUH.js";import{E as Pt}from"./ErrorNotice-BwAPlZ6y.js";import{d as Wt}from"./dcl-schemas-Dr9BTjb7.js";import{s as Bt,G as Ft,w as Lt,S as Ut}from"./buy-gasless-D7NJzDMT.js";import{s as Ht}from"./buy-ncwLOesB.js";import{i as Ot}from"./trade-encoding-DnT4n-4b.js";import{r as Gt}from"./mana-rate-Bede0UMr.js";import{f as Dt}from"./errors-CDxB6Bde.js";import{J as qt,C as Vt,B as be}from"./ethers-CtNGBird.js";import{n as Zt}from"./Tooltip-Dtw4IyxU.js";import{G as Kt}from"./grid.styles-DVxxH3aB.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-DbQrG6Db.js";import"./sendMetaTransaction-5i0Mv0tj.js";function V(o){const i=o.source??"item",a=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${a}`}const L="100000000000000000000",He=2,ee=15,Jt=/^[a-zA-Z0-9]+$/;function ze(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:Jt.test(i)?i.length<He?{ok:!1,reason:"too-short"}:i.length>ee?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Xt=["function available(string _subdomain) view returns (bool)"],Ie={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return F.chainId===Number(Wt.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function en(o,i={}){var p;const{rpc:a,address:h}=Yt(),l=new qt(a),d=new Vt(h,Xt,l);console.info(`[names] availability check → DCLRegistrar(${h}).available("${o}") on ${a}`);const x=await d.available(o);if((p=i.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${x}`),x?"available":"taken"}const tn="https://app.across.to/api";class ye extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(o){return pt(L,o)}async function sn(o,i,a={}){var p;const h=a.chainId??F.chainId,l=a.provider??"across",d=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${h}&provider=${l}`,x=await et(d,{method:"GET",identity:o,metadata:{}});if(!x.ok){let r;try{r=(p=await x.json())==null?void 0:p.code}catch{}throw r==="ROUTE_COST_TOO_HIGH"?new ye:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function on(o,i){const a=be.from(o.availableAmount),l=be.from(L).sub(a);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Ot(o.id)}],creditsSignatures:[o.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:L}}async function rn(o,i={}){const a=tn,h=i.intervalMs??1e4,l=i.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const p=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${o}`);if(p.ok){const r=await p.json(),u=(r.status??"pending").toLowerCase(),g=r.fillTx??r.fillTxnRef??null,w=r.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:w}}}catch{}x<l-1&&await new Promise(p=>setTimeout(p,h))}return d}async function an(o){const{name:i,identity:a,signer:h}=o,l=o.chainId??F.chainId,d=o.provider??"across",x=(o.beneficiary??await h.getAddress()).toLowerCase();let p=null,r=!1;console.info("[names] register start",{name:i,buyer:x,chainId:l,provider:d});try{const u=await Gt(l),g=nn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await sn(a,i,{chainId:l,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(a,g);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(L))throw new Error("Credit under-sized for the name price");const k=on(j.credit,w);let f;try{f=await Bt({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Ft))throw b;f=await Ht(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Lt(f),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const b=await rn(f,o.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:i,buyer:x,originConfirmed:r}),u instanceof Ut)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Ye(a,[p]).catch(()=>{}),u instanceof ye)throw u;const g=new Error(Dt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=u,g}}const ln=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -379,7 +379,7 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b6
379
379
  color: ${t.colors.accent};
380
380
  }
381
381
  }
382
- `;function En({name:o,priceCredits:i,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=m.useState("confirm"),[g,w]=m.useState(""),[j,k]=m.useState(null),f=m.useRef(!1),b=g.trim().toLowerCase()===o.toLowerCase(),v=r==="completing",E=i!=null?ge(i):"—",C=i==null,_=l==null?void 0:l.credits,R=i!=null&&_!=null?i-_:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;m.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||f.current)){f.current=!0,u("completing"),k(null);try{const y=await an({name:o,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:it(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{f.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ie,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(o)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(fe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ot,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:n("names.pendingHeaderTitle")}),e.jsx(ie,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(fe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-assets")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:n("names.successHeaderTitle")}),e.jsx(ie,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-assets")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(o){return o.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i])}const Tn="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/identity-B4DXDuJP.webp",_n="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/governance-DnazlIjy.webp",An=s.div`
382
+ `;function En({name:o,priceCredits:i,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=m.useState("confirm"),[g,w]=m.useState(""),[j,k]=m.useState(null),f=m.useRef(!1),b=g.trim().toLowerCase()===o.toLowerCase(),v=r==="completing",E=i!=null?ge(i):"—",C=i==null,_=l==null?void 0:l.credits,R=i!=null&&_!=null?i-_:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;m.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||f.current)){f.current=!0,u("completing"),k(null);try{const y=await an({name:o,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:it(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{f.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ie,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(o)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(fe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ot,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:n("names.pendingHeaderTitle")}),e.jsx(ie,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(fe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-assets")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:n("names.successHeaderTitle")}),e.jsx(ie,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-assets")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(o){return o.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i])}const Tn="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/identity-B4DXDuJP.webp",_n="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/governance-DnazlIjy.webp",An=s.div`
383
383
  width: 100%;
384
384
  min-width: 0;
385
385
  `,Nn=s.nav`
@@ -1,4 +1,4 @@
1
- import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-fdqQ1jGj.js";import{n as c,T as se}from"./Tooltip-8Rn2EQnm.js";import{t as e,s as o,I as g,e as s,aa as ae,f as v}from"./index-I4EEqchH.js";const re=o.div`
1
+ import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-BmPNPsb3.js";import{n as c,T as se}from"./Tooltip-Dtw4IyxU.js";import{t as e,s as o,I as g,e as s,aa as ae,f as v}from"./index-CnG2Xd4V.js";const re=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -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,k as R,m as F,e,n as G,o as O,I as z,p as B,u as w,q as K,c as Q,v as H,w as A,l as X,x as Z,y as T}from"./index-I4EEqchH.js";import{a as J,b as U,c as V,d as Y,s as tt,f as it}from"./authorizations-C1shI8qN.js";import{f as et}from"./builder-CxQSxnbg.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-D_opMycA.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Bj0jdOFW.js";const nt=R`
1
+ import{j as i,L as _,r as P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,k as R,m as F,e,n as G,o as O,I as z,p as B,u as w,q as K,c as Q,v as H,w as A,l as X,x as Z,y as T}from"./index-CnG2Xd4V.js";import{a as J,b as U,c as V,d as Y,s as tt,f as it}from"./authorizations-DbQrG6Db.js";import{f as et}from"./builder-CfEOD9tN.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-CDxB6Bde.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-5i0Mv0tj.js";const nt=R`
2
2
  to { transform: rotate(360deg); }
3
3
  `,st=R`
4
4
  to { background-position: -200% 0; }
@@ -1,4 +1,4 @@
1
- import{j as e,L as Se,r as P,d as ea,b as ta}from"./react-DehiWSvs.js";import{t as le,s as i,e as s,ao as de,aY as aa,an as sa,I as O,p as Mt,a9 as Ne,m as na,L as Q,ab as dt,n as ia,u as ra,aZ as oa,q as ca,a_ as da,a$ as la,b0 as ua,b1 as ha,o as pa,b2 as lt,O as G,b3 as ut,b4 as ga,l as ae,c as ht,b5 as xa,f as ma,b6 as pt,b7 as Re,b8 as ye,b9 as be,ba as gt,a as ve,b as fa,C as We,bb as ya}from"./index-I4EEqchH.js";import{M as ba,S as va,C as wa,H as Ca,a as ja,T as ka,X as $a,b as Sa,B as Ma,c as Ta,d as xt,e as Ia,f as ke,P as Tt,m as Pa,g as za,h as Aa,i as Ea,j as It,k as $e,L as qa,l as _a,n as mt,o as ft,W as Ba,p as Ra,q as Wa,A as Fa,r as La,s as Ka,t as Ua,u as Na,v as Qa,w as Oa,x as Ha,y as Va,z as Ga,D as Ya,E as Da,F as Ja,G as Xa,I as Za,J as es,K as Fe,N as ts,O as as,Q as ss,R as ns,U as yt,V as bt,Y as is,Z as rs,_ as os}from"./CollectionCarousel-jmGi2U05.js";import{u as cs}from"./useManaRate-Cfp1rcnf.js";import{r as ds}from"./mana-rate-BjVix_kr.js";import{i as ls,j as us,f as hs,n as ps,h as gs,A as xs}from"./authorizations-C1shI8qN.js";import{g as ms,b as Le}from"./buy-7YNy1Ky6.js";import{b as fs,w as ys,S as vt,G as bs}from"./buy-gasless-Bgmi9EE6.js";import{u as vs,M as ws,R as we,r as Cs,c as js,p as wt}from"./useCreditPacks--aSgsJ92.js";import{i as ks,a as $s}from"./errors-D_opMycA.js";import{E as Ss}from"./ErrorNotice-BSIjN9FY.js";import{u as Ct}from"./mana-convert-CmDEKake.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-BnDgi1QQ.js";import"./sendMetaTransaction-Bj0jdOFW.js";const{colors:se,radius:Ms}=le,Ts=i.div`
1
+ import{j as e,L as Se,r as P,d as ea,b as ta}from"./react-DehiWSvs.js";import{t as le,s as i,e as s,ao as de,aY as aa,an as sa,I as O,p as Mt,a9 as Ne,m as na,L as Q,ab as dt,n as ia,u as ra,aZ as oa,q as ca,a_ as da,a$ as la,b0 as ua,b1 as ha,o as pa,b2 as lt,O as G,b3 as ut,b4 as ga,l as ae,c as ht,b5 as xa,f as ma,b6 as pt,b7 as Re,b8 as ye,b9 as be,ba as gt,a as ve,b as fa,C as We,bb as ya}from"./index-CnG2Xd4V.js";import{M as ba,S as va,C as wa,H as Ca,a as ja,T as ka,X as $a,b as Sa,B as Ma,c as Ta,d as xt,e as Ia,f as ke,P as Tt,m as Pa,g as za,h as Aa,i as Ea,j as It,k as $e,L as qa,l as _a,n as mt,o as ft,W as Ba,p as Ra,q as Wa,A as Fa,r as La,s as Ka,t as Ua,u as Na,v as Qa,w as Oa,x as Ha,y as Va,z as Ga,D as Ya,E as Da,F as Ja,G as Xa,I as Za,J as es,K as Fe,N as ts,O as as,Q as ss,R as ns,U as yt,V as bt,Y as is,Z as rs,_ as os}from"./CollectionCarousel-C88U7Rbz.js";import{u as cs}from"./useManaRate--yo-xwQf.js";import{r as ds}from"./mana-rate-Bede0UMr.js";import{i as ls,j as us,f as hs,n as ps,h as gs,A as xs}from"./authorizations-DbQrG6Db.js";import{g as ms,b as Le}from"./buy-ncwLOesB.js";import{b as fs,w as ys,S as vt,G as bs}from"./buy-gasless-D7NJzDMT.js";import{u as vs,M as ws,R as we,r as Cs,c as js,p as wt}from"./useCreditPacks-1JCLw1fK.js";import{i as ks,a as $s}from"./errors-CDxB6Bde.js";import{E as Ss}from"./ErrorNotice-BwAPlZ6y.js";import{u as Ct}from"./mana-convert--3TPFouV.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-DnT4n-4b.js";import"./sendMetaTransaction-5i0Mv0tj.js";const{colors:se,radius:Ms}=le,Ts=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 Se,r as P,d as ea,b as ta}from"./react-DehiWSvs.js";import{t
58
58
  font-weight: 700;
59
59
  color: ${se.text};
60
60
  }
61
- `,Es="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/buy-error-22UunaPC.png";function qs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",Y=l==="error"?s("cartCheckout.errorTitle"):l==="nofunds"?s("cartCheckout.titleNoFunds"):l==="choose"?s("buyModal.choosePayment"):s("cartCheckout.titleBuy"),D=l==="processing";return e.jsxs(ba,{role:"dialog","aria-modal":"true","aria-label":s("cartCheckout.dialogAria"),children:[e.jsx(va,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(wa,{"data-tall":D||void 0,children:[e.jsxs(Ca,{children:[e.jsxs(ja,{children:[e.jsx(ka,{children:Y}),!W&&e.jsx($a,{onClick:z,"aria-label":s("buyModal.close"),children:e.jsx(Sa,{})})]}),e.jsxs(Ma,{children:[e.jsx(Ta,{children:l==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(xt,{}),e.jsx(Ia,{children:de(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(As,{children:[e.jsx("span",{children:s("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(xt,{}),de(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Pa(o.totalCents??0,o.totalManaWei??0n);return A!=null?s("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(Bs,{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(za,{"data-testid":"buy-error",children:[e.jsx(Aa,{src:Es,alt:"",width:64,height:80}),e.jsxs(Ea,{children:[e.jsx("b",{children:s("cartCheckout.errorHeadline")})," ",o.message??s("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:z,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"purple",onClick:o.onRetry??z,children:s("cartCheckout.tryAgain")})]})]})]})]})}function _s({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const Y=o==="reserving",D=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?s("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):s("buyModal.confirmToContinue"):s("buyModal.completingTransaction"):o==="settling"?s("buyModal.completingTransaction"):s("cartCheckout.preparing");return e.jsxs(ke,{"data-processing":!0,children:[e.jsx(qa,{src:aa,alt:"",width:61,height:61}),e.jsx(_a,{children:ne}),Y?e.jsxs(Ts,{children:[e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{"data-step":!0,style:{width:`${D}%`}})}),I>1?e.jsxs(Is,{children:[l,"/",I]}):null]}):e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{})})]})}function Bs({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:Y,onCancel:D}){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(Ba,{"data-testid":"nofunds-warning",children:[e.jsx(Ra,{}),e.jsxs(Wa,{children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",s("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(Ps,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Fa,{children:[e.jsx(La,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ka,{children:[e.jsxs("div",{children:[e.jsxs(Ua,{title:n.item.name,children:[n.item.name||s("buyModal.itemFallback"),L>1?e.jsx(zs,{children:s("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Na,{address:n.item.creator}):null]}),e.jsxs(Qa,{children:[e.jsx(Oa,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Ha,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Va,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Ga,{}),e.jsx(Ya,{children:de(n.credits)}),e.jsxs(Da,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(Ja,{children:[e.jsxs(Xa,{children:[e.jsx(Za,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(es,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:D,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"gradient",onClick:Y,children:s("buyModal.buy")})]})]})}const{colors:r,gradients:Pt,radius:Z}=le,zt="@media (max-width: 1080px)",T="@media (max-width: 880px)",jt=i.div`
61
+ `,Es="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/buy-error-22UunaPC.png";function qs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",Y=l==="error"?s("cartCheckout.errorTitle"):l==="nofunds"?s("cartCheckout.titleNoFunds"):l==="choose"?s("buyModal.choosePayment"):s("cartCheckout.titleBuy"),D=l==="processing";return e.jsxs(ba,{role:"dialog","aria-modal":"true","aria-label":s("cartCheckout.dialogAria"),children:[e.jsx(va,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(wa,{"data-tall":D||void 0,children:[e.jsxs(Ca,{children:[e.jsxs(ja,{children:[e.jsx(ka,{children:Y}),!W&&e.jsx($a,{onClick:z,"aria-label":s("buyModal.close"),children:e.jsx(Sa,{})})]}),e.jsxs(Ma,{children:[e.jsx(Ta,{children:l==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(xt,{}),e.jsx(Ia,{children:de(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(As,{children:[e.jsx("span",{children:s("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(xt,{}),de(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Pa(o.totalCents??0,o.totalManaWei??0n);return A!=null?s("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(Bs,{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(za,{"data-testid":"buy-error",children:[e.jsx(Aa,{src:Es,alt:"",width:64,height:80}),e.jsxs(Ea,{children:[e.jsx("b",{children:s("cartCheckout.errorHeadline")})," ",o.message??s("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:z,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"purple",onClick:o.onRetry??z,children:s("cartCheckout.tryAgain")})]})]})]})]})}function _s({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const Y=o==="reserving",D=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?s("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):s("buyModal.confirmToContinue"):s("buyModal.completingTransaction"):o==="settling"?s("buyModal.completingTransaction"):s("cartCheckout.preparing");return e.jsxs(ke,{"data-processing":!0,children:[e.jsx(qa,{src:aa,alt:"",width:61,height:61}),e.jsx(_a,{children:ne}),Y?e.jsxs(Ts,{children:[e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{"data-step":!0,style:{width:`${D}%`}})}),I>1?e.jsxs(Is,{children:[l,"/",I]}):null]}):e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{})})]})}function Bs({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:Y,onCancel:D}){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(Ba,{"data-testid":"nofunds-warning",children:[e.jsx(Ra,{}),e.jsxs(Wa,{children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",s("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(Ps,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Fa,{children:[e.jsx(La,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ka,{children:[e.jsxs("div",{children:[e.jsxs(Ua,{title:n.item.name,children:[n.item.name||s("buyModal.itemFallback"),L>1?e.jsx(zs,{children:s("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Na,{address:n.item.creator}):null]}),e.jsxs(Qa,{children:[e.jsx(Oa,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Ha,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Va,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Ga,{}),e.jsx(Ya,{children:de(n.credits)}),e.jsxs(Da,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(Ja,{children:[e.jsxs(Xa,{children:[e.jsx(Za,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(es,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:D,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"gradient",onClick:Y,children:s("buyModal.buy")})]})]})}const{colors:r,gradients:Pt,radius:Z}=le,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{a5 as N,a6 as U,a7 as o,a8 as n,a9 as D,k as M}from"./index-I4EEqchH.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,s as v}from"./clsx-DqDJX0Wu.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 a=44,B=M(P||(P=l`
1
+ import{a5 as N,a6 as U,a7 as o,a8 as n,a9 as D,k as M}from"./index-CnG2Xd4V.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,s as v}from"./clsx-HIGn_cGX.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 a=44,B=M(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as e,r as m,u as Z,d as J}from"./react-DehiWSvs.js";import{t as v,s as c,R as X,v as E,I as ee,e as a,c as te,l as ae,u as re,m as oe,f as ie,ac as F,ad as se,aT as ne,aU as ce}from"./index-I4EEqchH.js";import{E as le}from"./ErrorNotice-BSIjN9FY.js";import{d as de,g as pe,a as xe,P as ue,C as me,b as ge,c as he,B as be,S as fe,M as je,A as ve}from"./browseLayout.styles-CdBFJnD1.js";import{u as ye}from"./useStore-ChkmZ3qe.js";import{S as z,C as Ce,F as we,c as Ne,P as Se,d as ke,H as Pe,e as $e}from"./categories-fdqQ1jGj.js";import{L as Ae}from"./LoadMore-DD6-EqBS.js";import{u as Me}from"./useInfiniteGrid-Ct3kWony.js";import{G as Re}from"./grid.styles-qz7ti9Zv.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const Te=c.section`
1
+ import{j as e,r as m,u as Z,d as J}from"./react-DehiWSvs.js";import{t as v,s as c,R as X,v as E,I as ee,e as a,c as te,l as ae,u as re,m as oe,f as ie,ac as F,ad as se,aT as ne,aU as ce}from"./index-CnG2Xd4V.js";import{E as le}from"./ErrorNotice-BwAPlZ6y.js";import{d as de,g as pe,a as xe,P as ue,C as me,b as ge,c as he,B as be,S as fe,M as je,A as ve}from"./browseLayout.styles-CxS8iNjf.js";import{u as ye}from"./useStore-B52W6lZt.js";import{S as z,C as Ce,F as we,c as Ne,P as Se,d as ke,H as Pe,e as $e}from"./categories-BmPNPsb3.js";import{L as Ae}from"./LoadMore-Dmv_9BPG.js";import{u as Me}from"./useInfiniteGrid-C87CcLUH.js";import{G as Re}from"./grid.styles-DVxxH3aB.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const Te=c.section`
2
2
  position: relative;
3
3
  border-radius: ${v.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,e as g,p as k,ao as j,bs as C,f as Y,k as G,I as Q,l as X,a as W,C as E,b as Z,Y as J,bQ as F,ad as q}from"./index-I4EEqchH.js";import{s as ee,h as U,A as H,g as K,r as te,m as ne,e as ae}from"./authorizations-C1shI8qN.js";import{i as ie}from"./errors-D_opMycA.js";import{E as oe}from"./ErrorNotice-BSIjN9FY.js";import{a as se}from"./buy-7YNy1Ky6.js";import{g as re,a as ce}from"./trade-encoding-BnDgi1QQ.js";import{s as de,M as le,E as pe}from"./sendMetaTransaction-Bj0jdOFW.js";import{I as he,C as ue}from"./ethers-CtNGBird.js";const R="shop:resume_after_signin",xe=900*1e3;function rt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function ct(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>xe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function ge(a,n){return(a+n-1n)/n}function fe(a,n,i){return a<=0||n<=0?0n:a>=n?i:ge(i*BigInt(a),BigInt(n))}function dt(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,d=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 l=n-i,f=fe(l,n,s);d>=f&&c.push({method:"combined",creditsCents:i,manaWei:f})}s>0n&&d>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(l=>l.method==="credits"))==null?void 0:b.method)??((y=c.find(l=>l.method==="combined"))==null?void 0:y.method)??((w=c.find(l=>l.method==="mana"))==null?void 0:w.method)??null,m=!c.some(l=>l.method==="mana"||l.method==="combined")&&s>0n&&d>0n?{manaWei:d,manaCents:me(d,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:m}}function me(a,n,i){return Number(a*BigInt(n)/i)}function lt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const d=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(d,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function pt(a,n){return a.options.find(i=>i.method===n)??null}function ht(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",be=e.div`
1
+ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,e as g,p as k,ao as j,bs as C,f as Y,k as G,I as Q,l as X,a as W,C as E,b as Z,Y as J,bQ as F,ad as q}from"./index-CnG2Xd4V.js";import{s as ee,h as U,A as H,g as K,r as te,m as ne,e as ae}from"./authorizations-DbQrG6Db.js";import{i as ie}from"./errors-CDxB6Bde.js";import{E as oe}from"./ErrorNotice-BwAPlZ6y.js";import{a as se}from"./buy-ncwLOesB.js";import{g as re,a as ce}from"./trade-encoding-DnT4n-4b.js";import{s as de,M as le,E as pe}from"./sendMetaTransaction-5i0Mv0tj.js";import{I as he,C as ue}from"./ethers-CtNGBird.js";const R="shop:resume_after_signin",xe=900*1e3;function rt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function ct(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>xe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function ge(a,n){return(a+n-1n)/n}function fe(a,n,i){return a<=0||n<=0?0n:a>=n?i:ge(i*BigInt(a),BigInt(n))}function dt(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,d=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 l=n-i,f=fe(l,n,s);d>=f&&c.push({method:"combined",creditsCents:i,manaWei:f})}s>0n&&d>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(l=>l.method==="credits"))==null?void 0:b.method)??((y=c.find(l=>l.method==="combined"))==null?void 0:y.method)??((w=c.find(l=>l.method==="mana"))==null?void 0:w.method)??null,m=!c.some(l=>l.method==="mana"||l.method==="combined")&&s>0n&&d>0n?{manaWei:d,manaCents:me(d,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:m}}function me(a,n,i){return Number(a*BigInt(n)/i)}function lt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const d=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(d,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function pt(a,n){return a.options.find(i=>i.method===n)??null}function ht(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",be=e.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -1,4 +1,4 @@
1
- import{d as Y,j as e,L as be,u as fe,e as we,r as y}from"./react-DehiWSvs.js";import{t as Z,A as je,E as I,D as _,s as r,bc as ve,an as Ce,bd as ye,e as t,be as $e,bf as W,B as ke,a9 as q,R as J,n as Ne,v as Q,I as T,c as Pe,m as Se,ac as S,f as Le,ad as Ae,bb as Ee,bg as Fe}from"./index-I4EEqchH.js";import{d as Me,g as ze,a as Be,P as Re,C as Ie,b as _e,c as We,A as Te,B as He,S as Ue,M as De,e as Ge,f as Ke}from"./browseLayout.styles-CdBFJnD1.js";import{u as Oe,L as Ve}from"./useStore-ChkmZ3qe.js";import{S as H,C as Ye,F as Ze,c as qe,P as Je,d as Qe,H as Xe,e as et}from"./categories-fdqQ1jGj.js";import{L as U}from"./LoadMore-DD6-EqBS.js";import{u as D}from"./useInfiniteGrid-Ct3kWony.js";import{E as G}from"./ErrorNotice-BSIjN9FY.js";import{G as K}from"./grid.styles-qz7ti9Zv.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const{colors:u,radius:X,media:tt}=Z,it=r.article`
1
+ import{d as Y,j as e,L as be,u as fe,e as we,r as y}from"./react-DehiWSvs.js";import{t as Z,A as je,E as I,D as _,s as r,bc as ve,an as Ce,bd as ye,e as t,be as $e,bf as W,B as ke,a9 as q,R as J,n as Ne,v as Q,I as T,c as Pe,m as Se,ac as S,f as Le,ad as Ae,bb as Ee,bg as Fe}from"./index-CnG2Xd4V.js";import{d as Me,g as ze,a as Be,P as Re,C as Ie,b as _e,c as We,A as Te,B as He,S as Ue,M as De,e as Ge,f as Ke}from"./browseLayout.styles-CxS8iNjf.js";import{u as Oe,L as Ve}from"./useStore-B52W6lZt.js";import{S as H,C as Ye,F as Ze,c as qe,P as Je,d as Qe,H as Xe,e as et}from"./categories-BmPNPsb3.js";import{L as U}from"./LoadMore-Dmv_9BPG.js";import{u as D}from"./useInfiniteGrid-C87CcLUH.js";import{E as G}from"./ErrorNotice-BwAPlZ6y.js";import{G as K}from"./grid.styles-DVxxH3aB.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const{colors:u,radius:X,media:tt}=Z,it=r.article`
2
2
  height: 300px;
3
3
  background: ${u.bg};
4
4
  border-radius: ${X.card};
@@ -1 +1 @@
1
- import{j as r}from"./react-DehiWSvs.js";import{I as i}from"./index-I4EEqchH.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-CnG2Xd4V.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-BefcEwHF.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-5BrpwK2E.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-BI_TOfLF.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-Di2R91qn.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{d as he,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t as e,k as E,m as ue,e as r,f as p,n as ge,q as fe,O as f,b1 as me,l as H,ba as N,I as re,aY as D,p as B,bt as O}from"./index-I4EEqchH.js";import{R as K}from"./resume-buy-Bf0zIH7y.js";import{u as be,a as we,R as ye,c as ke,i as Ce,b as ve}from"./useCreditPacks--aSgsJ92.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./mana-convert-CmDEKake.js";const P="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/pack-stacks-D-V2jSHW.webp",oe="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/pack-chest-BX_j84xW.webp",je="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/credit-coin-CmcTCd5i.webp",$e="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",Se="https://cdn.decentraland.org/@dcl/shop/0.2.0/_assets/packs-backdrop-BcXiUPeP.webp",Y="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Pe=i.div`
1
+ import{d as he,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t as e,k as E,m as ue,e as r,f as p,n as ge,q as fe,O as f,b1 as me,l as H,ba as N,I as re,aY as D,p as B,bt as O}from"./index-CnG2Xd4V.js";import{R as K}from"./resume-buy-Bf0zIH7y.js";import{u as be,a as we,R as ye,c as ke,i as Ce,b as ve}from"./useCreditPacks-1JCLw1fK.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./mana-convert--3TPFouV.js";const P="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/pack-stacks-D-V2jSHW.webp",oe="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/pack-chest-BX_j84xW.webp",je="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/credit-coin-CmcTCd5i.webp",$e="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",Se="https://cdn.decentraland.org/@dcl/shop/0.2.1-30916078746.commit-989f656/_assets/packs-backdrop-BcXiUPeP.webp",Y="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Pe=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 24px;
@@ -1,4 +1,4 @@
1
- import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-D5sgkVGL.js";import{d as g,r as v}from"./index-5BrpwK2E.js";import{C as c}from"./ConstantsUtil-Di3dRDAF.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-BefcEwHF.js";import{au as y}from"./NetworkUtil-EoWQDMpU.js";const b=g`
1
+ import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-BgHFMsKp.js";import{d as g,r as v}from"./index-Di2R91qn.js";import{C as c}from"./ConstantsUtil-Di3dRDAF.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-BI_TOfLF.js";import{au as y}from"./NetworkUtil-EoWQDMpU.js";const b=g`
2
2
  :host {
3
3
  display: flex;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{j as e,d as se,r as w,L as ae}from"./react-DehiWSvs.js";import{t as Q,s as t,k as re,o as oe,e as n,f as _,B as S,p as de,O as le,aX as F,l as D,F as ce,m as pe,n as xe,q as he,u as ge,aa as me,I as K,Z as ue,a1 as fe,a2 as we,bs as ye,w as je}from"./index-I4EEqchH.js";import{i as be,b as ve,S as ke,C as $e,c as W,f as Ie}from"./ManaPricingBanner.styles-CW9IN_dA.js";import{u as Ce}from"./useSecondarySales-CaN1WkpM.js";import{C as U}from"./field.styles-CRXnbqs7.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-7YNy1Ky6.js";import"./authorizations-C1shI8qN.js";import"./sendMetaTransaction-Bj0jdOFW.js";import"./trade-encoding-BnDgi1QQ.js";import"./mana-rate-BjVix_kr.js";import"./mana-convert-CmDEKake.js";function O({size:a=12,...v}){return e.jsx("svg",{viewBox:"0 0 20 20",width:a,height:a,fill:"none","aria-hidden":!0,focusable:"false",...v,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:L,radius:Se,z:Le}=Q,Te=re`
1
+ import{j as e,d as se,r as w,L as ae}from"./react-DehiWSvs.js";import{t as Q,s as t,k as re,o as oe,e as n,f as _,B as S,p as de,O as le,aX as F,l as D,F as ce,m as pe,n as xe,q as he,u as ge,aa as me,I as K,Z as ue,a1 as fe,a2 as we,bs as ye,w as je}from"./index-CnG2Xd4V.js";import{i as be,b as ve,S as ke,C as $e,c as W,f as Ie}from"./ManaPricingBanner.styles-B9a44w0w.js";import{u as Ce}from"./useSecondarySales-pbD8MHXU.js";import{C as U}from"./field.styles-BqkhGo_h.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-ncwLOesB.js";import"./authorizations-DbQrG6Db.js";import"./sendMetaTransaction-5i0Mv0tj.js";import"./trade-encoding-DnT4n-4b.js";import"./mana-rate-Bede0UMr.js";import"./mana-convert--3TPFouV.js";function O({size:a=12,...v}){return e.jsx("svg",{viewBox:"0 0 20 20",width:a,height:a,fill:"none","aria-hidden":!0,focusable:"false",...v,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:L,radius:Se,z:Le}=Q,Te=re`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0;