@dcl/shop 0.1.0-30341552356.commit-1157de5 → 0.1.0-30341633105.commit-bfa7613

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 (171) hide show
  1. package/assets/{Activity-Dj44bwKw.js → Activity-DUQW_Z22.js} +2 -2
  2. package/assets/{AnimatedBackground-CwKlLPU1.js → AnimatedBackground-D5TaGH4y.js} +3 -3
  3. package/assets/{Assets-DWnYTXCo.js → Assets-B4NCA-FL.js} +5 -5
  4. package/assets/{Assets.styles-BhE61g54.js → Assets.styles-CE4c2s9w.js} +1 -1
  5. package/assets/{Authorizations-BwJDLOap.js → Authorizations-FSevrZuz.js} +1 -1
  6. package/assets/{Button-B3EWO6NJ.js → Button-CVXKA5VS.js} +1 -1
  7. package/assets/Cart-Bwa3a9Hp.js +1 -0
  8. package/assets/{CircularProgress-Be2BeSsu.js → CircularProgress-B7WalF_4.js} +1 -1
  9. package/assets/{Collection-CZEi_EO2.js → Collection-DdHzXaav.js} +1 -1
  10. package/assets/CollectionCarousel-BLfBmiC7.js +292 -0
  11. package/assets/{Creator-DgBS8-4a.js → Creator-B9a3v2rB.js} +1 -1
  12. package/assets/{ExchangeController-BkfKxSM1.js → ExchangeController-DTUPu5lZ.js} +1 -1
  13. package/assets/{GetCredits-D4_gPu7y.js → GetCredits-CEruTT5O.js} +1 -1
  14. package/assets/{HelpersUtil-nSm_BMK5.js → HelpersUtil-DY1hA3MT.js} +1 -1
  15. package/assets/{ImportListings-0xT85_lg.js → ImportListings-CUNQkt5i.js} +1 -1
  16. package/assets/{ItemDetail-Dq6IJ40V.js → ItemDetail-gPIjOR_D.js} +130 -130
  17. package/assets/{LoadMore-Cbr521EF.js → LoadMore-K8EfO7If.js} +1 -1
  18. package/assets/{MarketCheckout-CEZ0wtt0.js → MarketCheckout-BlfeUpjX.js} +1 -1
  19. package/assets/{MenuList-BYXPwoXC.js → MenuList-DPrUOTQw.js} +1 -1
  20. package/assets/{MyAssets-Y32vTL95.js → MyAssets-qLOA_5tD.js} +1 -1
  21. package/assets/{MyFavorites-DQ-5zeBc.js → MyFavorites-C1SUs-Jy.js} +1 -1
  22. package/assets/{NotFound-9u0kqnXS.js → NotFound-hEgIvZDQ.js} +1 -1
  23. package/assets/{NotificationsBell-Bh-SEbDn.js → NotificationsBell-BPdngTao.js} +1 -1
  24. package/assets/{StoreSettings-DnEI4N7v.js → StoreSettings-BvrwDCuq.js} +5 -5
  25. package/assets/{Success-jGqc-yIA.js → Success-DfPUnbUp.js} +1 -1
  26. package/assets/{SwapController-DXwEV4tc.js → SwapController-Cvanu67b.js} +1 -1
  27. package/assets/{Tooltip-CkfT0XKM.js → Tooltip-8SR8hseo.js} +1 -1
  28. package/assets/{TradeService-BP9td6am.js → TradeService-DH4vjiAB.js} +1 -1
  29. package/assets/{W3MFrameProviderSingleton-DOHwgNRJ.js → W3MFrameProviderSingleton-DtrTVFth.js} +3 -3
  30. package/assets/{WebCryptoP256-xSGFEHUn.js → WebCryptoP256-B_JP0jDJ.js} +1 -1
  31. package/assets/{authorizations-DVHH9Rgu.js → authorizations-Dtu8Ye0y.js} +1 -1
  32. package/assets/{basic-jN1vb_0X.js → basic-DljOvbvB.js} +1 -1
  33. package/assets/{biconomy-CnJ3HxGY.js → biconomy-ik7MjMyj.js} +1 -1
  34. package/assets/{builder--u_mLwLg.js → builder-BsAwBvGZ.js} +1 -1
  35. package/assets/{buy-DsK3JvBE.js → buy-CyhVI8ih.js} +1 -1
  36. package/assets/{buy-gasless-B0tydfop.js → buy-gasless-D6tjB5nW.js} +1 -1
  37. package/assets/{cart-checkout-B_ayyHRb.js → cart-checkout-Bp3fmOrE.js} +1 -1
  38. package/assets/{categories-CnryCWCq.js → categories-Jh3tfbEa.js} +1 -1
  39. package/assets/{ccip-CpnrZcJR.js → ccip-Dn5CKGMr.js} +1 -1
  40. package/assets/{ccip-DSWWT7QA.js → ccip-fs__7FtW.js} +1 -1
  41. package/assets/{collection-DvprT8Ak.js → collection-Cbl5FMco.js} +1 -1
  42. package/assets/{controller-DcyNYMS1.js → controller-CFA_t_aX.js} +2 -2
  43. package/assets/{core-BjxuDLc2.js → core-bscEUkDr.js} +4 -4
  44. package/assets/{custom-BXO5l2GN.js → custom-CBNtVqpj.js} +1 -1
  45. package/assets/{data-capture-CNmHScYc.js → data-capture-OumUBjqI.js} +1 -1
  46. package/assets/{email-CeHIxnKR.js → email-Psj4ILkk.js} +1 -1
  47. package/assets/{embedded-wallet-DFRpG2QT.js → embedded-wallet-8Rn02F-5.js} +1 -1
  48. package/assets/{emotion-styled.browser.esm-BAKrhA-T.js → emotion-styled.browser.esm-D1IYcc-A.js} +1 -1
  49. package/assets/{engine-QHP5dbJN.js → engine-FKONhXUm.js} +1 -1
  50. package/assets/{errors-CxK78Ezc.js → errors-C_tFJwwX.js} +1 -1
  51. package/assets/{estimate-l1-fee-DJZ2ykvP.js → estimate-l1-fee-CQQK05Yj.js} +1 -1
  52. package/assets/{execute-BxL0u7cZ.js → execute-DvgHhaNY.js} +2 -2
  53. package/assets/{features-D-1vXo09.js → features-C_I0ed0g.js} +1 -1
  54. package/assets/{fetchTokenMetadata-Bmh-GAy2.js → fetchTokenMetadata-DXP5pKit.js} +2 -2
  55. package/assets/{get-ecosystem-wallet-info-gP16_3M9.js → get-ecosystem-wallet-info-CojUzYKW.js} +1 -1
  56. package/assets/{getBalance-Cy11zY8o.js → getBalance-Bi0yMf6a.js} +1 -1
  57. package/assets/{getNFT-D8_d_43-.js → getNFT-CebGWsfS.js} +1 -1
  58. package/assets/{getNFT-CLM4lOgZ.js → getNFT-uBr4IPr-.js} +1 -1
  59. package/assets/{getThemeProps-Db0LqBsH.js → getThemeProps-D9znDKcF.js} +1 -1
  60. package/assets/{hashTypedData-DlhCxtnU.js → hashTypedData-CmwGgOTV.js} +1 -1
  61. package/assets/{hashTypedData-CyLnrmuM.js → hashTypedData-CvnET0ek.js} +1 -1
  62. package/assets/{import-xj2dmpRb.js → import-5htnR-24.js} +1 -1
  63. package/assets/{in-app-Ca1mMARX.js → in-app-CXNVMtY6.js} +1 -1
  64. package/assets/{in-app-wallet-calls-CW5YIAy_.js → in-app-wallet-calls-CL_h73Vx.js} +1 -1
  65. package/assets/{index-DaGxFfPe.js → index-B8HPZU8G.js} +1 -1
  66. package/assets/{index-DTUefcrq.js → index-BBFf3j9R.js} +1 -1
  67. package/assets/{index-BRqkHqJo.js → index-BEwgqhCL.js} +1 -1
  68. package/assets/{index-DMKg8lh3.js → index-BF0jg5eX.js} +1 -1
  69. package/assets/{index-hTjbV6vV.js → index-BUuFv1bp.js} +1 -1
  70. package/assets/{index-n8GCu-Rn.js → index-BZVhR8G8.js} +1 -1
  71. package/assets/{index-BS5Ceouq.js → index-BaeTuT24.js} +1 -1
  72. package/assets/{index-_B4jXVuv.js → index-BjJBV4qL.js} +1 -1
  73. package/assets/{index-Dyl6gCDy.js → index-BksD36hR.js} +1 -1
  74. package/assets/{index-DidAGC-b.js → index-BofIoUki.js} +1 -1
  75. package/assets/{index-CYe6NA33.js → index-BqdSTJ_h.js} +1 -1
  76. package/assets/{index-DG5yd0Hy.js → index-BwVcZ3vw.js} +1 -1
  77. package/assets/{index-Cog4X8JZ.js → index-C-3NWHgA.js} +1 -1
  78. package/assets/{index-CaZpvuaJ.js → index-C-dFvnUH.js} +1 -1
  79. package/assets/{index-CJ85TtZ8.js → index-C1Tsxo3r.js} +1 -1
  80. package/assets/{index-DcgPlZHV.js → index-C1UJcewJ.js} +1 -1
  81. package/assets/{index-DHAtTfUI.js → index-C4GKDkj4.js} +1 -1
  82. package/assets/{index-DPvzgx_y.js → index-C5V5wALq.js} +1 -1
  83. package/assets/{index-qJN3KuXC.js → index-CAPIrEyl.js} +1 -1
  84. package/assets/{index-D4GTMW1w.js → index-CBgD93CB.js} +1 -1
  85. package/assets/{index-B-_1QhtU.js → index-CFnxUGBP.js} +1 -1
  86. package/assets/{index-tNNieLvH.js → index-CIRaZxV0.js} +1 -1
  87. package/assets/{index-BZ-ADUaA.js → index-CLiiVHBN.js} +1 -1
  88. package/assets/{index-G557eOOZ.js → index-CSdulB00.js} +3 -3
  89. package/assets/{index-cdg92wTF.js → index-CkYGCiA-.js} +1 -1
  90. package/assets/{index-BWqSG2Zp.js → index-Cp-efrxt.js} +1 -1
  91. package/assets/{index-CEvsvVpf.js → index-Cq9m0rf1.js} +1 -1
  92. package/assets/{index-DE80LSux.js → index-CvxSD2TZ.js} +1 -1
  93. package/assets/{index-CBJiZL2c.js → index-D-BpvO4i.js} +1 -1
  94. package/assets/{index-CR6dp-n2.js → index-D3MkM_Ow.js} +2 -2
  95. package/assets/{index-B8QWKyIQ.js → index-D9zmC2OF.js} +1 -1
  96. package/assets/{index-Bw8dL1iq.js → index-DTjLQDJj.js} +3 -3
  97. package/assets/{index-D3sOF6Ef.js → index-DVCrh7RP.js} +1 -1
  98. package/assets/{index-ShBnagKs.js → index-DXqFhRIG.js} +2 -2
  99. package/assets/{index-C3ZPHWQF.js → index-D_GOecnW.js} +1 -1
  100. package/assets/{index-BPlewML_.js → index-Dcx57z9h.js} +1 -1
  101. package/assets/{index-CwJPZDQg.js → index-De5m0zpT.js} +1 -1
  102. package/assets/{index-CRQc7aFW.js → index-DhbTDQu0.js} +1 -1
  103. package/assets/{index-CUAbfX_G.js → index-DiarXSIn.js} +1 -1
  104. package/assets/{index-Ik8KJlRB.js → index-Dlw2S5cF.js} +3 -3
  105. package/assets/{index-LI2Gp3bz.js → index-Ds0rGqyb.js} +1 -1
  106. package/assets/{index-CB1uzRfI.js → index-Ds6dHrLZ.js} +1 -1
  107. package/assets/{index-D3S3ylBv.js → index-DsV59IEv.js} +1 -1
  108. package/assets/{index-Boi8OWdb.js → index-VchcND_n.js} +11 -11
  109. package/assets/{index-Ct3-9z3S.js → index-VdY2qv1p.js} +1 -1
  110. package/assets/{index-a3vLcVip.js → index-aP6PSm0J.js} +1 -1
  111. package/assets/{index-CgEZpoUf.js → index-lJWah8De.js} +1 -1
  112. package/assets/{index-CXOudy9H.js → index-sW-sKm0x.js} +1 -1
  113. package/assets/{index-BFMPeJUP.js → index-scsn5pcE.js} +1 -1
  114. package/assets/{index-BAHZtt4N.js → index-tf9y--bx.js} +1 -1
  115. package/assets/{index-DMzXLpFX.js → index-zLpiSX4V.js} +2 -2
  116. package/assets/{index.es-Do8tEs_c.js → index.es-9B4hUsAR.js} +1 -1
  117. package/assets/{index.es-86Q_KSh8.js → index.es-9Zrxu-nr.js} +4 -4
  118. package/assets/{index.es-Pf3_VMB1.js → index.es-BwS14sFg.js} +1 -1
  119. package/assets/{localBatchGatewayRequest-Q9ISf7xV.js → localBatchGatewayRequest-BHik-cdx.js} +1 -1
  120. package/assets/{mana-rate-Dr5e3Fsu.js → mana-rate-CY9tOCr1.js} +1 -1
  121. package/assets/{networks-DH11TI3P.js → networks-Ddkp84aU.js} +1 -1
  122. package/assets/{onramp-fUReVnH1.js → onramp-CeSaj6Aa.js} +1 -1
  123. package/assets/{openzeppelin-BMoHmYeO.js → openzeppelin-CDpkjcS1.js} +1 -1
  124. package/assets/{parseNft-Bsnv7LY2.js → parseNft-ChsA4Coa.js} +2 -2
  125. package/assets/{parseSignature-WQa_Z13b.js → parseSignature--QSaxzyZ.js} +3 -3
  126. package/assets/{parseSignature-vnzc0TWx.js → parseSignature-DFSq1jun.js} +1 -1
  127. package/assets/{passkeys-DcSb_2bY.js → passkeys-CUsQnAGE.js} +1 -1
  128. package/assets/{pay-with-exchange-BSvTA-vL.js → pay-with-exchange-DD3fWFhp.js} +1 -1
  129. package/assets/{qr-overlay-Cxia7TxD.js → qr-overlay-FXDRFg86.js} +1 -1
  130. package/assets/{receive-C7U2pw1b.js → receive-YGf7MQMM.js} +1 -1
  131. package/assets/{resolveImplementation-B0oFFgdO.js → resolveImplementation-ChZxSPSt.js} +1 -1
  132. package/assets/{rpc-CPkDSng_.js → rpc-DcocuHbv.js} +1 -1
  133. package/assets/{secp256k1-B8iTaWun.js → secp256k1-2n6IN3fh.js} +1 -1
  134. package/assets/{secp256k1-BG_xdWRK.js → secp256k1-B6R4GN3D.js} +1 -1
  135. package/assets/{secp256k1-9B-GuXCR.js → secp256k1-Da2UK_yU.js} +1 -1
  136. package/assets/{send-HIK1lDa_.js → send-DM7q2CKX.js} +1 -1
  137. package/assets/{send-batch-transaction-DlA-mriP.js → send-batch-transaction-BQiw5Eds.js} +1 -1
  138. package/assets/{send-eip712-transaction-BKSgmtge.js → send-eip712-transaction-D9_VwAnb.js} +2 -2
  139. package/assets/{send-gasless-transaction-CaZ9Bdzc.js → send-gasless-transaction-fl9Lqf73.js} +2 -2
  140. package/assets/{send-transaction-IH4G-3ve.js → send-transaction-lapcUIfe.js} +2 -2
  141. package/assets/{sendMetaTransaction-CoMlUn3U.js → sendMetaTransaction-CydgYVdt.js} +1 -1
  142. package/assets/{sendRawTransaction-Bl9YcsnP.js → sendRawTransaction-CkQeCcPa.js} +3 -3
  143. package/assets/{serializeTransaction-lddISawN.js → serializeTransaction-CiKWV5oi.js} +1 -1
  144. package/assets/{session-proposal-DnwQ3Izq.js → session-proposal-C1hZCkvv.js} +1 -1
  145. package/assets/{session-request-BlxbeFMn.js → session-request-BTvx34S0.js} +2 -2
  146. package/assets/{signing-CMF-guhc.js → signing-clXGZp7N.js} +3 -3
  147. package/assets/{socials-oKTNFCc_.js → socials-Djo-_tRh.js} +1 -1
  148. package/assets/{swaps-DKTQ0Qks.js → swaps-BwoxWJmp.js} +1 -1
  149. package/assets/{thirdweb-CleLzSpa.js → thirdweb-DIYiKqri.js} +3 -3
  150. package/assets/{to-serializable-transaction-Dmnj9hOd.js → to-serializable-transaction-_IYF-b5r.js} +2 -2
  151. package/assets/{trade-encoding-CJ445Q0f.js → trade-encoding-DbssSNOL.js} +1 -1
  152. package/assets/{transactionReceipt-wJvnMFcL.js → transactionReceipt-dAN1T4b9.js} +1 -1
  153. package/assets/{transactions-CwbwJTBm.js → transactions-V175lLd8.js} +1 -1
  154. package/assets/{useCreditPacks-DslICYvP.js → useCreditPacks-B8su_g3G.js} +1 -1
  155. package/assets/{useInfiniteGrid-BsvaZzST.js → useInfiniteGrid-S2Upf1Ae.js} +1 -1
  156. package/assets/useManaRate-CCWK1pxl.js +1 -0
  157. package/assets/{useStore-D4BwFx3W.js → useStore-BEtv4alq.js} +1 -1
  158. package/assets/{useTheme-C3x6r6Lw.js → useTheme-BoNUL1hb.js} +1 -1
  159. package/assets/{verifyHash-Cw5VgEE4.js → verifyHash-CSBAlIiR.js} +1 -1
  160. package/assets/{w3m-modal-Btpx7WOs.js → w3m-modal-CXjKWsrV.js} +1 -1
  161. package/assets/{w3m-modal-C3TYSgnM.js → w3m-modal-DVav-Ijf.js} +1 -1
  162. package/assets/{wait-for-tx-receipt-PVsjRORl.js → wait-for-tx-receipt-CRuc-ylw.js} +1 -1
  163. package/assets/{wallets-CawAcOqK.js → wallets-C2Qy7KSV.js} +5 -5
  164. package/assets/{web-connector-g3y9yAdS.js → web-connector-D4itPEVN.js} +3 -3
  165. package/assets/{writeContract-CkNfH9sB.js → writeContract-BR9KO0Ok.js} +1 -1
  166. package/assets/{zoraTestnet-D5vdVlTL.js → zoraTestnet-VaouiZC2.js} +1 -1
  167. package/index.html +11 -11
  168. package/package.json +2 -2
  169. package/assets/Cart-C048yxEZ.js +0 -1
  170. package/assets/CollectionCarousel-B4KoClM7.js +0 -292
  171. package/assets/useManaRate-BrpK_vbN.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as j,j as e,L as _,e as dt}from"./react-B36MyIP_.js";import{n as l,K as o,R as lt,B as ht,h as ut,t as d,e as xt,u as b,I as g,aG as G,aH as B,aI as pt,k as v,an as E,S as X,m as mt,aJ as gt,aK as Q}from"./index-Boi8OWdb.js";import{m as ft}from"./mana-rate-Dr5e3Fsu.js";import{u as yt}from"./useManaRate-BrpK_vbN.js";import{L as jt}from"./LoadMore-Cbr521EF.js";import{u as f}from"./useInfiniteGrid-BsvaZzST.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";const bt=15e3;function vt(t,i){return t.txHash&&i.txHash?t.txHash===i.txHash:t.txHash||i.txHash?!1:t.status===i.status&&Math.abs(t.createdAt-i.createdAt)<=bt}function kt(t){const i=[...t].sort((n,a)=>a.createdAt-n.createdAt),r=[];for(const n of i){const a=r[r.length-1];a&&vt(a[a.length-1],n)?a.push(n):r.push([n])}return r.map(n=>{var a;return{id:((a=n.find(c=>c.txHash))==null?void 0:a.txHash)??n[n.length-1].id,createdAt:Math.max(...n.map(c=>c.createdAt)),status:n.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:n.reduce((c,u)=>c+u.credits,0),lines:n}})}function wt(t){const i=[],r=new Map;for(const n of t)if(n.tradeId){const a=r.get(n.tradeId);if(a){a.quantity+=1,a.credits+=n.credits;continue}const c={key:n.tradeId,tradeId:n.tradeId,quantity:1,credits:n.credits};r.set(n.tradeId,c),i.push(c)}else i.push({key:n.id,tradeId:null,quantity:1,credits:n.credits});return i}function It(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?ft(t.manaWei,i):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function $t(t){const r=kt(t.purchases.filter(s=>s.status!=="EXPIRED")).map(s=>({kind:"purchase",id:`purchase:${s.id}`,createdAt:s.createdAt,order:s})),n=t.sales.map(s=>{const x=It(s,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),a=(t.creditOrders??[]).filter(s=>s.status!=="EXPIRED").map(s=>({kind:"credit",id:`credit:${s.id}`,createdAt:s.createdAt,order:s})),c=new Set(t.purchases.filter(s=>s.txHash).map(s=>s.txHash.toLowerCase())),u=(t.manaPurchases??[]).filter(s=>!c.has(s.txHash.toLowerCase())).map(s=>({kind:"mana-purchase",id:`mana-purchase:${s.id}`,createdAt:s.createdAt,sale:s}));return[...r,...n,...a,...u].sort((s,x)=>x.createdAt-s.createdAt||(s.id<x.id?-1:1))}function At(t,i){return i==="all"?t:i==="sales"?t.filter(r=>r.kind==="sale"):t.filter(r=>r.kind==="purchase"||r.kind==="credit"||r.kind==="mana-purchase")}const J=t=>t.trim().toLowerCase();function Pt(t){const i=new Map;for(const r of t??[]){const n=J(r.txHash??"");if(!n)continue;const a=i.get(n);a?a.push(r):i.set(n,[r])}return i}function Nt(t,i,r=Date.now()){const n=i.txHash?t.get(J(i.txHash)):void 0;if(!n||n.length===0)return{kind:"direct"};const a=n.length===1?Lt(n[0].netCents):null,c=n.filter(s=>!s.available&&s.availableAt>r);if(c.length===0)return{kind:"credited",credits:a};const u=c.reduce((s,x)=>Math.max(s,x.availableAt),0);return{kind:"pending",credits:a,availableAt:u}}function Lt(t){return Math.floor(t/10)}const Et="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341552356.commit-1157de5/assets/credits-product-vs4Q6u6l.svg",T=lt`
1
+ import{r as b,j as e,L as _,e as dt}from"./react-B36MyIP_.js";import{n as l,K as o,R as lt,B as ht,h as ut,t as d,e as xt,u as j,I as g,aG as G,aH as B,aI as pt,k as v,an as E,S as X,m as mt,aJ as gt,aK as Q}from"./index-VchcND_n.js";import{m as ft}from"./mana-rate-CY9tOCr1.js";import{u as yt}from"./useManaRate-CCWK1pxl.js";import{L as bt}from"./LoadMore-K8EfO7If.js";import{u as f}from"./useInfiniteGrid-S2Upf1Ae.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";const jt=15e3;function vt(t,i){return t.txHash&&i.txHash?t.txHash===i.txHash:t.txHash||i.txHash?!1:t.status===i.status&&Math.abs(t.createdAt-i.createdAt)<=jt}function kt(t){const i=[...t].sort((n,a)=>a.createdAt-n.createdAt),r=[];for(const n of i){const a=r[r.length-1];a&&vt(a[a.length-1],n)?a.push(n):r.push([n])}return r.map(n=>{var a;return{id:((a=n.find(c=>c.txHash))==null?void 0:a.txHash)??n[n.length-1].id,createdAt:Math.max(...n.map(c=>c.createdAt)),status:n.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:n.reduce((c,u)=>c+u.credits,0),lines:n}})}function wt(t){const i=[],r=new Map;for(const n of t)if(n.tradeId){const a=r.get(n.tradeId);if(a){a.quantity+=1,a.credits+=n.credits;continue}const c={key:n.tradeId,tradeId:n.tradeId,quantity:1,credits:n.credits};r.set(n.tradeId,c),i.push(c)}else i.push({key:n.id,tradeId:null,quantity:1,credits:n.credits});return i}function It(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?ft(t.manaWei,i):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function $t(t){const r=kt(t.purchases.filter(s=>s.status!=="EXPIRED")).map(s=>({kind:"purchase",id:`purchase:${s.id}`,createdAt:s.createdAt,order:s})),n=t.sales.map(s=>{const x=It(s,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),a=(t.creditOrders??[]).filter(s=>s.status!=="EXPIRED").map(s=>({kind:"credit",id:`credit:${s.id}`,createdAt:s.createdAt,order:s})),c=new Set(t.purchases.filter(s=>s.txHash).map(s=>s.txHash.toLowerCase())),u=(t.manaPurchases??[]).filter(s=>!c.has(s.txHash.toLowerCase())).map(s=>({kind:"mana-purchase",id:`mana-purchase:${s.id}`,createdAt:s.createdAt,sale:s}));return[...r,...n,...a,...u].sort((s,x)=>x.createdAt-s.createdAt||(s.id<x.id?-1:1))}function At(t,i){return i==="all"?t:i==="sales"?t.filter(r=>r.kind==="sale"):t.filter(r=>r.kind==="purchase"||r.kind==="credit"||r.kind==="mana-purchase")}const J=t=>t.trim().toLowerCase();function Pt(t){const i=new Map;for(const r of t??[]){const n=J(r.txHash??"");if(!n)continue;const a=i.get(n);a?a.push(r):i.set(n,[r])}return i}function Nt(t,i,r=Date.now()){const n=i.txHash?t.get(J(i.txHash)):void 0;if(!n||n.length===0)return{kind:"direct"};const a=n.length===1?Lt(n[0].netCents):null,c=n.filter(s=>!s.available&&s.availableAt>r);if(c.length===0)return{kind:"credited",credits:a};const u=c.reduce((s,x)=>Math.max(s,x.availableAt),0);return{kind:"pending",credits:a,availableAt:u}}function Lt(t){return Math.floor(t/10)}const Et="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/credits-product-vs4Q6u6l.svg",T=lt`
2
2
  0% { background-position: 200% 0; }
3
3
  100% { background-position: -200% 0; }
4
4
  `,Tt=l.section`
@@ -284,4 +284,4 @@ import{r as j,j as e,L as _,e as dt}from"./react-B36MyIP_.js";import{n as l,K as
284
284
  margin: 6px 0 0;
285
285
  `,Ot=l(ht)`
286
286
  margin-top: 12px;
287
- `,q=L.withComponent(_),y=24,Rt=["all","purchases","sales"];function m(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 i=Number(t)/1e18;return Number.isFinite(i)?i.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const i=j.useRef(null),[r,n]=j.useState(null),a=()=>{var u;const c=(u=i.current)==null?void 0:u.getBoundingClientRect();c&&n({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(Ht,{ref:i,tabIndex:0,onMouseEnter:a,onMouseLeave:()=>n(null),onFocus:a,onBlur:()=>n(null),children:[t,r?dt.createPortal(e.jsx(zt,{style:{top:r.top,left:r.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Wt({item:t}){const{data:i,isLoading:r}=b({queryKey:["trade-display",t.tradeId],queryFn:()=>gt(t.tradeId),enabled:!!t.tradeId,staleTime:3e5}),n=!!t.tradeId&&r,a=(i==null?void 0:i.name)??d("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",u=E({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,s=e.jsxs(e.Fragment,{children:[n?e.jsx(F,{}):e.jsx(S,{children:c?e.jsx("img",{src:c,alt:a}):e.jsx(g,{name:"cart",size:20})}),e.jsxs(M,{children:[n?e.jsx(H,{}):e.jsx(D,{title:a,children:a}),t.quantity>1?e.jsx(z,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(qt,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]});return u?e.jsx(q,{to:u,"data-link":"true",children:s}):e.jsx(L,{children:s})}function Gt({order:t}){const i=wt(t.lines),r=i.reduce((n,a)=>n+a.quantity,0);return e.jsxs(k,{"data-testid":"purchase-order",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx($,{children:m(t.createdAt)}),e.jsxs(A,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:r})]})]}),e.jsxs(P,{children:[e.jsx(N,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(p,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(C,{children:i.map(n=>e.jsx(Wt,{item:n},n.key))})]})}function Bt({sale:t}){const{data:i,isLoading:r}=b({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>Q(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),n=(i==null?void 0:i.name)??d("activity.itemFallback"),a=(i==null?void 0:i.thumbnail)??"",c=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,u=e.jsxs(e.Fragment,{children:[r?e.jsx(F,{}):e.jsx(S,{children:a?e.jsx("img",{src:a,alt:n}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[r?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),e.jsx(z,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(k,{"data-testid":"activity-mana-purchase",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx($,{children:m(t.createdAt)}),e.jsx(A,{children:d("activity.paidWithMana")})]}),e.jsxs(P,{children:[e.jsx(N,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(p,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:X,alt:"MANA"})})]})]})]}),e.jsx(C,{children:c?e.jsx(q,{to:c,"data-link":"true",children:u}):e.jsx(L,{children:u})})]})}function Kt({sale:t,payout:i}){const{data:r,isLoading:n}=b({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>Q(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(r==null?void 0:r.name)??d("activity.itemFallback"),c=(r==null?void 0:r.thumbnail)??"",u=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,s=e.jsxs(e.Fragment,{children:[n?e.jsx(F,{}):e.jsx(S,{children:c?e.jsx("img",{src:c,alt:a}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[n?e.jsx(H,{}):e.jsx(D,{title:a,children:a}),e.jsxs(z,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),i.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:m(i.availableAt)})}`:""]})]})]});return e.jsxs(k,{"data-testid":"activity-sale",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx($,{children:m(t.createdAt)}),e.jsx(A,{children:d("activity.saleLabel")})]}),e.jsxs(P,{children:[e.jsx(N,{"data-status":i.kind==="pending"?"PENDING":"SOLD",children:i.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),i.kind==="direct"?e.jsxs(p,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:X,alt:"MANA"})})]}):i.credits!==null?e.jsxs(p,{"data-kind":"income",children:[e.jsx(v,{className:"ccy-mark"})," +",mt(i.credits)]}):e.jsx(p,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(C,{children:u?e.jsx(q,{to:u,"data-link":"true",children:s}):e.jsx(L,{children:s})})]})}function Ut({order:t}){const i=`$${(t.usdCents/100).toFixed(2)}`;return e.jsx(k,{"data-testid":"credit-order",children:e.jsxs(w,{children:[e.jsx(Dt,{children:e.jsx("img",{src:Et,alt:"","aria-hidden":!0})}),e.jsxs(I,{children:[e.jsx($,{children:m(t.createdAt)}),e.jsxs(A,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:i})]})]}),e.jsxs(P,{children:[e.jsx(N,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(p,{"data-kind":"income",children:["+",e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]})]})})}function _t({filter:t}){const i={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(g,{name:i.icon,size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:i.title}),e.jsx("p",{className:"muted",children:i.body}),t!=="sales"?e.jsx(Ot,{as:_,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function ae(){ut({title:d("nav.activity"),noindex:!0});const{session:t}=xt(),[i,r]=j.useState("all"),n=!!t&&i!=="sales",a=!!t&&i!=="purchases",c=f(["purchases",t==null?void 0:t.address],h=>pt(t.address,t.identity,{first:y,skip:h}),{enabled:n}),u=f(["sales",t==null?void 0:t.address],h=>G(t.address,{role:"seller",first:y,skip:h}),{enabled:a}),s=f(["credit-orders",t==null?void 0:t.address],h=>B(t.address,t.identity,{first:y,skip:h}),{enabled:n}),x=f(["mana-purchases",t==null?void 0:t.address],h=>G(t.address,{role:"buyer",first:y,skip:h}),{enabled:n}),{data:O}=b({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>B(t.address,t.identity,{first:200}).then(h=>h.payouts),enabled:a,staleTime:6e4}),nt=j.useMemo(()=>Pt(O),[O]),{data:at}=yt(a);if(!t)return e.jsxs(V,{children:[e.jsx(g,{name:"clock",size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const R=At($t({purchases:n?c.items:[],sales:a?u.items:[],creditOrders:n?s.items:[],manaPurchases:n?x.items:[],rate:at}),i),st=n&&(c.isLoading||s.isLoading||x.isLoading)||a&&u.isLoading,W=n&&(c.isFetchingNextPage||s.isFetchingNextPage||x.isFetchingNextPage)||a&&u.isFetchingNextPage,rt=n&&(c.hasNextPage||s.hasNextPage||x.hasNextPage)||a&&u.hasNextPage;function ot(){n&&c.hasNextPage&&c.fetchNextPage(),n&&s.hasNextPage&&s.fetchNextPage(),n&&x.hasNextPage&&x.fetchNextPage(),a&&u.hasNextPage&&u.fetchNextPage()}return e.jsxs(Tt,{children:[e.jsx(Ct,{children:e.jsx(St,{children:d("nav.activity")})}),e.jsx(Ft,{role:"tablist","aria-label":d("nav.activity"),children:Rt.map(h=>e.jsx(Mt,{type:"button",role:"tab","aria-selected":i===h,"data-active":i===h,"data-testid":`activity-filter-${h}`,onClick:()=>r(h),children:d(`activity.filter.${h}`)},h))}),st?e.jsx(K,{children:Array.from({length:5}).map((h,ct)=>e.jsx(U,{},ct))}):R.length===0?e.jsx(_t,{filter:i}):e.jsxs(e.Fragment,{children:[e.jsxs(K,{children:[R.map(h=>h.kind==="purchase"?e.jsx(Gt,{order:h.order},h.id):h.kind==="credit"?e.jsx(Ut,{order:h.order},h.id):h.kind==="mana-purchase"?e.jsx(Bt,{sale:h.sale},h.id):e.jsx(Kt,{sale:h.sale,payout:Nt(nt,h.sale)},h.id)),W?e.jsx(U,{}):null]}),e.jsx(jt,{hasNextPage:rt,isFetching:W,onLoadMore:ot})]})]})}export{ae as Activity};
287
+ `,q=L.withComponent(_),y=24,Rt=["all","purchases","sales"];function m(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 i=Number(t)/1e18;return Number.isFinite(i)?i.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const i=b.useRef(null),[r,n]=b.useState(null),a=()=>{var u;const c=(u=i.current)==null?void 0:u.getBoundingClientRect();c&&n({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(Ht,{ref:i,tabIndex:0,onMouseEnter:a,onMouseLeave:()=>n(null),onFocus:a,onBlur:()=>n(null),children:[t,r?dt.createPortal(e.jsx(zt,{style:{top:r.top,left:r.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Wt({item:t}){const{data:i,isLoading:r}=j({queryKey:["trade-display",t.tradeId],queryFn:()=>gt(t.tradeId),enabled:!!t.tradeId,staleTime:3e5}),n=!!t.tradeId&&r,a=(i==null?void 0:i.name)??d("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",u=E({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,s=e.jsxs(e.Fragment,{children:[n?e.jsx(F,{}):e.jsx(S,{children:c?e.jsx("img",{src:c,alt:a}):e.jsx(g,{name:"cart",size:20})}),e.jsxs(M,{children:[n?e.jsx(H,{}):e.jsx(D,{title:a,children:a}),t.quantity>1?e.jsx(z,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(qt,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]});return u?e.jsx(q,{to:u,"data-link":"true",children:s}):e.jsx(L,{children:s})}function Gt({order:t}){const i=wt(t.lines),r=i.reduce((n,a)=>n+a.quantity,0);return e.jsxs(k,{"data-testid":"purchase-order",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx($,{children:m(t.createdAt)}),e.jsxs(A,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:r})]})]}),e.jsxs(P,{children:[e.jsx(N,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(p,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(C,{children:i.map(n=>e.jsx(Wt,{item:n},n.key))})]})}function Bt({sale:t}){const{data:i,isLoading:r}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>Q(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),n=(i==null?void 0:i.name)??d("activity.itemFallback"),a=(i==null?void 0:i.thumbnail)??"",c=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,u=e.jsxs(e.Fragment,{children:[r?e.jsx(F,{}):e.jsx(S,{children:a?e.jsx("img",{src:a,alt:n}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[r?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),e.jsx(z,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(k,{"data-testid":"activity-mana-purchase",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx($,{children:m(t.createdAt)}),e.jsx(A,{children:d("activity.paidWithMana")})]}),e.jsxs(P,{children:[e.jsx(N,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(p,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:X,alt:"MANA"})})]})]})]}),e.jsx(C,{children:c?e.jsx(q,{to:c,"data-link":"true",children:u}):e.jsx(L,{children:u})})]})}function Kt({sale:t,payout:i}){const{data:r,isLoading:n}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>Q(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(r==null?void 0:r.name)??d("activity.itemFallback"),c=(r==null?void 0:r.thumbnail)??"",u=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,s=e.jsxs(e.Fragment,{children:[n?e.jsx(F,{}):e.jsx(S,{children:c?e.jsx("img",{src:c,alt:a}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[n?e.jsx(H,{}):e.jsx(D,{title:a,children:a}),e.jsxs(z,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),i.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:m(i.availableAt)})}`:""]})]})]});return e.jsxs(k,{"data-testid":"activity-sale",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx($,{children:m(t.createdAt)}),e.jsx(A,{children:d("activity.saleLabel")})]}),e.jsxs(P,{children:[e.jsx(N,{"data-status":i.kind==="pending"?"PENDING":"SOLD",children:i.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),i.kind==="direct"?e.jsxs(p,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:X,alt:"MANA"})})]}):i.credits!==null?e.jsxs(p,{"data-kind":"income",children:[e.jsx(v,{className:"ccy-mark"})," +",mt(i.credits)]}):e.jsx(p,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(C,{children:u?e.jsx(q,{to:u,"data-link":"true",children:s}):e.jsx(L,{children:s})})]})}function Ut({order:t}){const i=`$${(t.usdCents/100).toFixed(2)}`;return e.jsx(k,{"data-testid":"credit-order",children:e.jsxs(w,{children:[e.jsx(Dt,{children:e.jsx("img",{src:Et,alt:"","aria-hidden":!0})}),e.jsxs(I,{children:[e.jsx($,{children:m(t.createdAt)}),e.jsxs(A,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:i})]})]}),e.jsxs(P,{children:[e.jsx(N,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(p,{"data-kind":"income",children:["+",e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]})]})})}function _t({filter:t}){const i={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(g,{name:i.icon,size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:i.title}),e.jsx("p",{className:"muted",children:i.body}),t!=="sales"?e.jsx(Ot,{as:_,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function ae(){ut({title:d("nav.activity"),noindex:!0});const{session:t}=xt(),[i,r]=b.useState("all"),n=!!t&&i!=="sales",a=!!t&&i!=="purchases",c=f(["purchases",t==null?void 0:t.address],h=>pt(t.address,t.identity,{first:y,skip:h}),{enabled:n}),u=f(["sales",t==null?void 0:t.address],h=>G(t.address,{role:"seller",first:y,skip:h}),{enabled:a}),s=f(["credit-orders",t==null?void 0:t.address],h=>B(t.address,t.identity,{first:y,skip:h}),{enabled:n}),x=f(["mana-purchases",t==null?void 0:t.address],h=>G(t.address,{role:"buyer",first:y,skip:h}),{enabled:n}),{data:O}=j({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>B(t.address,t.identity,{first:200}).then(h=>h.payouts),enabled:a,staleTime:6e4}),nt=b.useMemo(()=>Pt(O),[O]),{data:at}=yt(a);if(!t)return e.jsxs(V,{children:[e.jsx(g,{name:"clock",size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const R=At($t({purchases:n?c.items:[],sales:a?u.items:[],creditOrders:n?s.items:[],manaPurchases:n?x.items:[],rate:at}),i),st=n&&(c.isLoading||s.isLoading||x.isLoading)||a&&u.isLoading,W=n&&(c.isFetchingNextPage||s.isFetchingNextPage||x.isFetchingNextPage)||a&&u.isFetchingNextPage,rt=n&&(c.hasNextPage||s.hasNextPage||x.hasNextPage)||a&&u.hasNextPage;function ot(){n&&c.hasNextPage&&c.fetchNextPage(),n&&s.hasNextPage&&s.fetchNextPage(),n&&x.hasNextPage&&x.fetchNextPage(),a&&u.hasNextPage&&u.fetchNextPage()}return e.jsxs(Tt,{children:[e.jsx(Ct,{children:e.jsx(St,{children:d("nav.activity")})}),e.jsx(Ft,{role:"tablist","aria-label":d("nav.activity"),children:Rt.map(h=>e.jsx(Mt,{type:"button",role:"tab","aria-selected":i===h,"data-active":i===h,"data-testid":`activity-filter-${h}`,onClick:()=>r(h),children:d(`activity.filter.${h}`)},h))}),st?e.jsx(K,{children:Array.from({length:5}).map((h,ct)=>e.jsx(U,{},ct))}):R.length===0?e.jsx(_t,{filter:i}):e.jsxs(e.Fragment,{children:[e.jsxs(K,{children:[R.map(h=>h.kind==="purchase"?e.jsx(Gt,{order:h.order},h.id):h.kind==="credit"?e.jsx(Ut,{order:h.order},h.id):h.kind==="mana-purchase"?e.jsx(Bt,{sale:h.sale},h.id):e.jsx(Kt,{sale:h.sale,payout:Nt(nt,h.sale)},h.id)),W?e.jsx(U,{}):null]}),e.jsx(bt,{hasNextPage:rt,isFetching:W,onLoadMore:ot})]})]})}export{ae as Activity};
@@ -1,11 +1,11 @@
1
- import{r as l,j as v}from"./react-B36MyIP_.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341552356.commit-1157de5/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341552356.commit-1157de5/assets/DCL_LogoPattern-BryBPc3d.png",U=`
1
+ import{r as l,j as v}from"./react-B36MyIP_.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/DCL_LogoPattern-BryBPc3d.png",b=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
5
5
  v_uv = a_position * 0.5 + 0.5;
6
6
  gl_Position = vec4(a_position, 0.0, 1.0);
7
7
  }
8
- `,b=`
8
+ `,U=`
9
9
  precision highp float;
10
10
 
11
11
  uniform float u_time;
@@ -77,4 +77,4 @@ void main() {
77
77
 
78
78
  gl_FragColor = result;
79
79
  }
80
- `;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,U),c=g(e,e.FRAGMENT_SHADER,b);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const n=P(e,o,c);if(!n){e.deleteShader(o),e.deleteShader(c);return}const u=e.getAttribLocation(n,"a_position"),_=e.getUniformLocation(n,"u_time"),R=e.getUniformLocation(n,"u_resolution"),y=e.getUniformLocation(n,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let m=!1;const d=D(e,S,()=>m),A=()=>{const i=window.devicePixelRatio||1,x=r.clientWidth*i,E=r.clientHeight*i;(r.width!==x||r.height!==E)&&(r.width=x,r.height=E)},p=performance.now()/1e3,f=()=>{A(),e.viewport(0,0,r.width,r.height),e.useProgram(n),e.uniform1f(_,performance.now()/1e3-p),e.uniform2f(R,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.uniform1i(y,0),e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),a.current=requestAnimationFrame(f)},T=i=>{i.preventDefault(),cancelAnimationFrame(a.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),a.current=requestAnimationFrame(f),()=>{m=!0,cancelAnimationFrame(a.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(n),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(d)}},[]),v.jsxs("div",{className:"AnimatedBackground","aria-hidden":!0,children:[v.jsx("div",{className:"AnimatedBackground__fallback",style:{backgroundImage:`url(${w})`}}),v.jsx("canvas",{ref:t,className:"AnimatedBackground__canvas"})]})}export{L as default};
80
+ `;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,b),c=g(e,e.FRAGMENT_SHADER,U);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const n=P(e,o,c);if(!n){e.deleteShader(o),e.deleteShader(c);return}const u=e.getAttribLocation(n,"a_position"),_=e.getUniformLocation(n,"u_time"),R=e.getUniformLocation(n,"u_resolution"),y=e.getUniformLocation(n,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let m=!1;const d=D(e,S,()=>m),A=()=>{const i=window.devicePixelRatio||1,x=r.clientWidth*i,E=r.clientHeight*i;(r.width!==x||r.height!==E)&&(r.width=x,r.height=E)},p=performance.now()/1e3,f=()=>{A(),e.viewport(0,0,r.width,r.height),e.useProgram(n),e.uniform1f(_,performance.now()/1e3-p),e.uniform2f(R,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.uniform1i(y,0),e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),a.current=requestAnimationFrame(f)},T=i=>{i.preventDefault(),cancelAnimationFrame(a.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),a.current=requestAnimationFrame(f),()=>{m=!0,cancelAnimationFrame(a.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(n),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(d)}},[]),v.jsxs("div",{className:"AnimatedBackground","aria-hidden":!0,children:[v.jsx("div",{className:"AnimatedBackground__fallback",style:{backgroundImage:`url(${w})`}}),v.jsx("canvas",{ref:t,className:"AnimatedBackground__canvas"})]})}export{L as default};
@@ -1,4 +1,4 @@
1
- import{a as Fe,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D as nt,y as st,s as ot,n as s,K as t,e as ie,w as rt,x as Le,m as Be,j as it,t as o,I as T,k as B,A as ye,E as J,F as at,G as lt,h as We,L as ct,M as te,aN as dt,aO as pt}from"./index-Boi8OWdb.js";import{u as ft,M as ht}from"./MarketCheckout-CEZ0wtt0.js";import{r as xt,a as ut,m as He}from"./mana-rate-Dr5e3Fsu.js";import{u as Oe}from"./useManaRate-BrpK_vbN.js";import{g as mt,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as Ct,m as $t,n as kt,M as St,E as Et,p as Tt,q as It,r as _t,s as Rt,t as zt,u as At}from"./Assets.styles-BhE61g54.js";import{d as we,R as Nt,F as Mt,S as je,b as Pt}from"./categories-CnryCWCq.js";import{L as Ft}from"./LoadMore-Cbr521EF.js";import{u as Lt}from"./useInfiniteGrid-BsvaZzST.js";import{E as Bt}from"./ErrorNotice-D_Z5OVFI.js";import{d as Wt}from"./dcl-schemas-BICTSpB5.js";import{u as Ht,G as Ot,w as Ut,S as Dt}from"./buy-gasless-B0tydfop.js";import{s as Gt}from"./buy-DsK3JvBE.js";import{i as qt}from"./trade-encoding-CJ445Q0f.js";import{f as Vt}from"./errors-CxK78Ezc.js";import{J as Kt,C as Zt,B as re}from"./ethers-BteKixT0.js";import{l as Qt}from"./loader-logo-BzY9EKdC.js";import{n as Jt}from"./emotion-CSxEP8yM.js";import"./sentry-gZJVwIqQ.js";import"./intl-CBcMB1D2.js";import"./authorizations-DVHH9Rgu.js";import"./sendMetaTransaction-CoMlUn3U.js";import"./Tooltip-CkfT0XKM.js";function ne(n){const r=n.source??"item",l=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${r}:${l}`}const H="100000000000000000000",Ue=2,X=15,Xt=/^[a-zA-Z0-9]+$/;function ve(n){const r=n.trim();return r.length===0?{ok:!1,reason:"empty"}:Xt.test(r)?r.length<Ue?{ok:!1,reason:"too-short"}:r.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Yt(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const en=["function available(string _subdomain) view returns (bool)"],Ce={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function tn(){return W.chainId===Wt.ChainId.MATIC_MAINNET?Ce.mainnet:Ce.sepolia}async function nn(n,r={}){var a;const{rpc:l,address:h}=tn(),u=new Kt(l),c=new Zt(h,en,u);console.info(`[names] availability check → DCLRegistrar(${h}).available("${n}") on ${l}`);const x=await c.available(n);if((a=r.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${x}`),x?"available":"taken"}const sn="https://app.across.to/api";class De extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function on(n){return ut(H,n)}async function rn(n,r,l={}){var a;const h=l.chainId??W.chainId,u=l.provider??"across",c=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${h}&provider=${u}`,x=await ot(c,{method:"GET",identity:n,metadata:{}});if(!x.ok){let d;try{d=(a=await x.json())==null?void 0:a.code}catch{}throw d==="ROUTE_COST_TOO_HIGH"?new De:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function an(n,r){const l=re.from(n.availableAmount),u=re.from(H).sub(l);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:qt(n.id)}],creditsSignatures:[n.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:u.isNegative()?"0":u.toString(),maxCreditedValue:H}}async function ln(n,r={}){const l=sn,h=r.intervalMs??1e4,u=r.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<u;x++){try{const a=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${n}`);if(a.ok){const d=await a.json(),p=(d.status??"pending").toLowerCase(),w=d.fillTx??d.fillTxnRef??null,m=d.actionsSucceeded!==!1;if(p==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:m};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:w,actionsSucceeded:m}}}catch{}x<u-1&&await new Promise(a=>setTimeout(a,h))}return c}async function cn(n){const{name:r,identity:l,signer:h}=n,u=n.chainId??W.chainId,c=n.provider??"across",x=(n.beneficiary??await h.getAddress()).toLowerCase();let a=null,d=!1;console.info("[names] register start",{name:r,buyer:x,chainId:u,provider:c});try{const p=await xt(u),w=on(p);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:p});const m=await rn(l,r,{chainId:u,provider:c});console.info("[names] step 2/6 route fetched",{target:m.externalCall.target,selector:m.externalCall.selector,provider:m.provider,quoteId:m.quoteId});const C=await nt(l,w);if(a=C.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:C.credit.id,maxCreditedValue:C.maxCreditedValue}),re.from(C.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const $=an(C.credit,m);let b;try{b=await Ht({chainId:u,buyer:x,signer:h,args:$})}catch(y){if(!(y instanceof Ot))throw y;b=await Gt(u,$,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:b}),await Ut(b),d=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:b}),c==="across"){const y=await ln(b,n.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:b};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:b,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:b}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:r,buyer:x,originConfirmed:d}),p instanceof Dt)return{status:"pending",originTxHash:p.txHash};throw a&&!d&&await st(l,[a]).catch(()=>{}),p instanceof De?p:new Error(Vt(p,"Couldn't register the name. Please try again.",{sale:!0}))}}const dn=s.div`
1
+ import{a as Le,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D as nt,y as st,s as ot,n as s,K as t,e as ie,w as rt,x as Fe,m as Be,j as it,t as o,I as T,k as B,A as ye,E as J,F as at,G as lt,h as We,L as ct,M as te,aL as dt,aM as pt}from"./index-VchcND_n.js";import{u as ft,M as ht}from"./MarketCheckout-BlfeUpjX.js";import{r as xt,a as ut,m as He}from"./mana-rate-CY9tOCr1.js";import{u as Ue}from"./useManaRate-CCWK1pxl.js";import{g as mt,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as Ct,m as $t,n as kt,M as St,E as Et,p as Tt,q as It,r as _t,s as Rt,t as zt,u as At}from"./Assets.styles-CE4c2s9w.js";import{d as we,R as Nt,F as Mt,S as je,b as Pt}from"./categories-Jh3tfbEa.js";import{L as Lt}from"./LoadMore-K8EfO7If.js";import{u as Ft}from"./useInfiniteGrid-S2Upf1Ae.js";import{E as Bt}from"./ErrorNotice-D_Z5OVFI.js";import{d as Wt}from"./dcl-schemas-BICTSpB5.js";import{u as Ht,G as Ut,w as Ot,S as Dt}from"./buy-gasless-D6tjB5nW.js";import{s as Gt}from"./buy-CyhVI8ih.js";import{i as qt}from"./trade-encoding-DbssSNOL.js";import{f as Vt}from"./errors-C_tFJwwX.js";import{J as Kt,C as Zt,B as re}from"./ethers-BteKixT0.js";import{l as Qt}from"./loader-logo-BzY9EKdC.js";import{n as Jt}from"./emotion-CSxEP8yM.js";import"./sentry-gZJVwIqQ.js";import"./intl-CBcMB1D2.js";import"./authorizations-Dtu8Ye0y.js";import"./sendMetaTransaction-CydgYVdt.js";import"./Tooltip-8SR8hseo.js";function ne(n){const r=n.source??"item",l=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${r}:${l}`}const H="100000000000000000000",Oe=2,X=15,Xt=/^[a-zA-Z0-9]+$/;function ve(n){const r=n.trim();return r.length===0?{ok:!1,reason:"empty"}:Xt.test(r)?r.length<Oe?{ok:!1,reason:"too-short"}:r.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Yt(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const en=["function available(string _subdomain) view returns (bool)"],Ce={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function tn(){return W.chainId===Wt.ChainId.MATIC_MAINNET?Ce.mainnet:Ce.sepolia}async function nn(n,r={}){var a;const{rpc:l,address:h}=tn(),u=new Kt(l),c=new Zt(h,en,u);console.info(`[names] availability check → DCLRegistrar(${h}).available("${n}") on ${l}`);const x=await c.available(n);if((a=r.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${x}`),x?"available":"taken"}const sn="https://app.across.to/api";class De extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function on(n){return ut(H,n)}async function rn(n,r,l={}){var a;const h=l.chainId??W.chainId,u=l.provider??"across",c=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${h}&provider=${u}`,x=await ot(c,{method:"GET",identity:n,metadata:{}});if(!x.ok){let d;try{d=(a=await x.json())==null?void 0:a.code}catch{}throw d==="ROUTE_COST_TOO_HIGH"?new De:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function an(n,r){const l=re.from(n.availableAmount),u=re.from(H).sub(l);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:qt(n.id)}],creditsSignatures:[n.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:u.isNegative()?"0":u.toString(),maxCreditedValue:H}}async function ln(n,r={}){const l=sn,h=r.intervalMs??1e4,u=r.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<u;x++){try{const a=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${n}`);if(a.ok){const d=await a.json(),p=(d.status??"pending").toLowerCase(),w=d.fillTx??d.fillTxnRef??null,m=d.actionsSucceeded!==!1;if(p==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:m};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:w,actionsSucceeded:m}}}catch{}x<u-1&&await new Promise(a=>setTimeout(a,h))}return c}async function cn(n){const{name:r,identity:l,signer:h}=n,u=n.chainId??W.chainId,c=n.provider??"across",x=(n.beneficiary??await h.getAddress()).toLowerCase();let a=null,d=!1;console.info("[names] register start",{name:r,buyer:x,chainId:u,provider:c});try{const p=await xt(u),w=on(p);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:p});const m=await rn(l,r,{chainId:u,provider:c});console.info("[names] step 2/6 route fetched",{target:m.externalCall.target,selector:m.externalCall.selector,provider:m.provider,quoteId:m.quoteId});const C=await nt(l,w);if(a=C.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:C.credit.id,maxCreditedValue:C.maxCreditedValue}),re.from(C.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const $=an(C.credit,m);let b;try{b=await Ht({chainId:u,buyer:x,signer:h,args:$})}catch(y){if(!(y instanceof Ut))throw y;b=await Gt(u,$,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:b}),await Ot(b),d=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:b}),c==="across"){const y=await ln(b,n.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:b};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:b,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:b}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:r,buyer:x,originConfirmed:d}),p instanceof Dt)return{status:"pending",originTxHash:p.txHash};throw a&&!d&&await st(l,[a]).catch(()=>{}),p instanceof De?p:new Error(Vt(p,"Couldn't register the name. Please try again.",{sale:!0}))}}const dn=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -366,7 +366,7 @@ import{a as Fe,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D a
366
366
  flex: none;
367
367
  color: ${t.colors.dclRed};
368
368
  }
369
- `;function zn({name:n,priceCredits:r,onClose:l}){const{session:h}=ie(),{data:u,isError:c}=rt(h),x=Le(),a=Fe(),[d,p]=f.useState("confirm"),[w,m]=f.useState(""),[C,$]=f.useState(null),b=f.useRef(!1),y=w.trim().toLowerCase()===n.toLowerCase(),S=d==="completing",j=r!=null?Be(r):"—";f.useEffect(()=>{const g=R=>{R.key==="Escape"&&!S&&l()};document.addEventListener("keydown",g);const Y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=Y}},[S,l]);async function E(){if(!(!h||!y||b.current)){b.current=!0,p("completing"),$(null);try{await cn({name:n,identity:h.identity,signer:h.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),p("success")}catch(g){J(lt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:at(g),purchase_type:"name"}),$((g==null?void 0:g.message)||o("names.errorGeneric")),p("error")}finally{b.current=!1}}}const k=d!=="success",I=it(h==null?void 0:h.providerType);return e.jsx(dn,{onClick:S?void 0:l,role:"presentation",children:e.jsxs(pn,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[k&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:d==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(Se,{onClick:l,disabled:S,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",ye(u,c)]}),e.jsx(Te,{})]}),(d==="confirm"||d==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(Ie,{children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(B,{}),j]})]}),d==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),e.jsx(Me,{onClick:()=>p("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(fn,{children:[e.jsx(hn,{children:o("names.confirmTitle")}),e.jsx(xn,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${An(n)}</b>`})}}),e.jsxs(un,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(gn,{value:w,onChange:g=>m(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(bn,{children:".dcl.eth"})]})]}),e.jsx(Me,{onClick:()=>void E(),disabled:!y||!h,children:o("names.buyCta")})]})]}),d==="completing"&&e.jsxs(yn,{children:[e.jsx(wn,{src:Qt,alt:"",width:56,height:56}),e.jsx(jn,{children:I?o("names.confirming"):o("names.completing")}),e.jsxs(vn,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx($n,{children:"1/1"})]})]}),d==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:o("names.successHeaderTitle")}),e.jsx(Se,{onClick:l,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",ye(u,c)]}),e.jsx(Te,{}),e.jsxs(kn,{children:[e.jsx(Sn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(En,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(Ie,{style:{marginTop:20},children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(B,{}),j]})]}),e.jsxs(Tn,{children:[e.jsx(In,{onClick:()=>{l(),a("/my-assets")},children:o("names.myItems")}),e.jsx(_n,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function An(n){return n.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341552356.commit-1157de5/assets/identity-B4DXDuJP.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341552356.commit-1157de5/assets/world-B-9aPlxu.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341552356.commit-1157de5/assets/invite-BfwIhP2C.webp",Fn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341552356.commit-1157de5/assets/governance-DnazlIjy.webp",Ln=s.div`
369
+ `;function zn({name:n,priceCredits:r,onClose:l}){const{session:h}=ie(),{data:u,isError:c}=rt(h),x=Fe(),a=Le(),[d,p]=f.useState("confirm"),[w,m]=f.useState(""),[C,$]=f.useState(null),b=f.useRef(!1),y=w.trim().toLowerCase()===n.toLowerCase(),S=d==="completing",j=r!=null?Be(r):"—";f.useEffect(()=>{const g=R=>{R.key==="Escape"&&!S&&l()};document.addEventListener("keydown",g);const Y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=Y}},[S,l]);async function E(){if(!(!h||!y||b.current)){b.current=!0,p("completing"),$(null);try{await cn({name:n,identity:h.identity,signer:h.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),p("success")}catch(g){J(lt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:at(g),purchase_type:"name"}),$((g==null?void 0:g.message)||o("names.errorGeneric")),p("error")}finally{b.current=!1}}}const k=d!=="success",I=it(h==null?void 0:h.providerType);return e.jsx(dn,{onClick:S?void 0:l,role:"presentation",children:e.jsxs(pn,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[k&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:d==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(Se,{onClick:l,disabled:S,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",ye(u,c)]}),e.jsx(Te,{})]}),(d==="confirm"||d==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(Ie,{children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(B,{}),j]})]}),d==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),e.jsx(Me,{onClick:()=>p("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(fn,{children:[e.jsx(hn,{children:o("names.confirmTitle")}),e.jsx(xn,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${An(n)}</b>`})}}),e.jsxs(un,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(gn,{value:w,onChange:g=>m(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(bn,{children:".dcl.eth"})]})]}),e.jsx(Me,{onClick:()=>void E(),disabled:!y||!h,children:o("names.buyCta")})]})]}),d==="completing"&&e.jsxs(yn,{children:[e.jsx(wn,{src:Qt,alt:"",width:56,height:56}),e.jsx(jn,{children:I?o("names.confirming"):o("names.completing")}),e.jsxs(vn,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx($n,{children:"1/1"})]})]}),d==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:o("names.successHeaderTitle")}),e.jsx(Se,{onClick:l,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",ye(u,c)]}),e.jsx(Te,{}),e.jsxs(kn,{children:[e.jsx(Sn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(En,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(Ie,{style:{marginTop:20},children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(B,{}),j]})]}),e.jsxs(Tn,{children:[e.jsx(In,{onClick:()=>{l(),a("/my-assets")},children:o("names.myItems")}),e.jsx(_n,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function An(n){return n.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/identity-B4DXDuJP.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/world-B-9aPlxu.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/invite-BfwIhP2C.webp",Ln="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/governance-DnazlIjy.webp",Fn=s.div`
370
370
  width: 100%;
371
371
  min-width: 0;
372
372
  `,Bn=s.nav`
@@ -396,7 +396,7 @@ import{a as Fe,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D a
396
396
  `,Hn=s.span`
397
397
  font-weight: 700;
398
398
  color: ${t.colors.muted};
399
- `,On=s.div`
399
+ `,Un=s.div`
400
400
  display: flex;
401
401
  flex-direction: column;
402
402
  gap: 48px;
@@ -409,7 +409,7 @@ import{a as Fe,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D a
409
409
  gap: 32px;
410
410
  padding-bottom: 32px;
411
411
  }
412
- `,Un=s.div`
412
+ `,On=s.div`
413
413
  position: relative;
414
414
  border-radius: ${t.radius.banner};
415
415
  overflow: hidden;
@@ -784,4 +784,4 @@ import{a as Fe,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D a
784
784
  clip: rect(0, 0, 0, 0);
785
785
  white-space: nowrap;
786
786
  border: 0;
787
- `,hs="https://docs.decentraland.org/creator/worlds/about/",xs="https://governance.decentraland.org";function us(n){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function ms({onBack:n}){We({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:l}=ie(),{data:h}=Oe(),u=h?He(H,h):null,[c,x]=f.useState(""),[a,d]=f.useState("idle"),[p,w]=f.useState(!1),m=f.useRef(null),[C,$]=f.useState(void 0);f.useLayoutEffect(()=>{m.current&&$(m.current.offsetWidth)},[c]),f.useEffect(()=>{if(!ve(c).ok){d(c.length===0?"idle":"invalid");return}d("checking");const k=new AbortController,I=setTimeout(()=>{(async()=>{try{const g=await nn(c,{signal:k.signal});d(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(I),k.abort()}},[c]);const b=ve(c),y=b.ok&&(a==="available"||a==="error");function S(){if(y){if(!r){l();return}w(!0)}}const j=e.jsxs(e.Fragment,{children:[o("names.claim"),u!=null?e.jsxs(rs,{children:[e.jsx(B,{}),Be(u)]}):null]});return e.jsxs(Ln,{"data-testid":"names-page",children:[e.jsxs(Bn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Wn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Hn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(On,{children:[e.jsxs(Un,{children:[e.jsxs(Dn,{children:[e.jsx(Gn,{children:o("names.heroTitle")}),e.jsx(qn,{children:o("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Kn,{children:[e.jsxs(Zn,{invalid:a==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:c,onChange:E=>x(Yt(E.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Qn,{ref:m,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(ns,{children:o("names.suffix")})]}),c.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Ge,{onClick:S,disabled:!y,"data-testid":"names-claim",children:j})]}),a==="taken"?e.jsxs(Jn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Xn,{href:us(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(os,{onClick:S,disabled:!y,children:j}),a==="checking"?e.jsx(se,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):a==="error"?e.jsx(se,{tone:"muted",role:"status",children:o("names.checkError")}):a==="invalid"&&!b.ok&&b.reason==="too-short"?e.jsx(se,{tone:"muted",role:"status",children:o("names.tooShort",{min:Ue})}):null,e.jsx(fs,{role:"status","aria-live":"polite",children:a==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:o("names.whyTitle")}),e.jsx(cs,{children:o("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Nn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why1Title")}),e.jsx(Q,{children:o("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Mn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why2Title")}),e.jsxs(Q,{children:[o("names.why2")," ",e.jsx(ps,{children:o("names.why2Address")})]}),e.jsxs(Pe,{href:hs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Pn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why3Title")}),e.jsx(Q,{children:o("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Fn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why4Title")}),e.jsx(Q,{children:o("names.why4")}),e.jsxs(Pe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(zn,{name:c,priceCredits:u,onClose:()=>w(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",oe=48;function bs(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Os(){const[n]=tt(),r=Fe(),l=(n.get("q")??"").trim().toLowerCase(),h=Le(),{session:u,signIn:c}=ie(),x=(n.get("q")??"").trim();We({title:x?o("seo.collectibles.searchTitle",{query:x}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[a,d]=f.useState("wearable"),[p,w]=f.useState(null),[m,C]=f.useState([]),[$,b]=f.useState(""),[y,S]=f.useState(""),[j,E]=f.useState("on_sale"),[k,I]=f.useState(!1),[g,Y]=f.useState("newest"),[R,A]=f.useState(!1),[ae,ee]=f.useState(null);f.useEffect(()=>{if(!R)return;const i=L=>{L.key==="Escape"&&A(!1)};document.addEventListener("keydown",i);const v=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=v}},[R]);const O=j==="on_sale",N=$&&!Number.isNaN(Number($))?Number($):void 0,M=y&&!Number.isNaN(Number(y))?Number(y):void 0,qe=ft(),le=p?Pt[p]:void 0,ce=(we.find(i=>i.key===g)??we[0]).server,de={category:a,rarities:m.length?m:void 0,wearableCategories:le,minPriceCredits:N,maxPriceCredits:M,search:l||void 0,sortBy:ce,isSmart:k||void 0,onSale:!0,listingType:qe?void 0:"primary"},pe={category:a,rarities:m.length?m:void 0,wearableCategories:le,search:l||void 0,sortBy:ce,isWearableSmart:k||void 0,isOnSale:j==="not_for_sale"?!1:void 0},{items:P,total:fe,isLoading:_,isPlaceholderData:z,error:he,hasNextPage:Ve,isFetchingNextPage:xe,fetchNextPage:Ke}=Lt(O?["shop-items",de]:["catalog-items",pe],i=>O?dt({...de,first:oe,skip:i}):pt({...pe,first:oe,skip:i}),{enabled:a!=="names"}),U=fe,ue=_||z,Ze=_?15:Math.min(Math.max(P.length,1),oe),{data:D,isError:Qe}=Oe(),Je=i=>D&&i.manaWei?He(i.manaWei,D):null,me=f.useRef(null);f.useEffect(()=>{_||z||!l||me.current===l||(me.current=l,J("Shop Searched",{query:l,result_count:U}))},[l,_,z,U]);const G=f.useRef("__init__");f.useEffect(()=>{if(_||z)return;const i=JSON.stringify({category:a,subCategory:p,rarities:m,min:N,max:M,sort:g,status:j,smart:k});if(G.current==="__init__"||G.current===i){G.current=i;return}G.current=i,J("Shop Applied Filter",{filters:{category:a,sub_category:p,rarities:m,min_price_credits:N??null,max_price_credits:M??null,status:j,smart:k,sort:g},result_count:U})},[a,p,m,N,M,g,j,k,_,z,U]);function ge(i){d(i),w(null)}function be(i){C(v=>v.includes(i)?v.filter(L=>L!==i):[...v,i])}function Xe(){d("wearable"),w(null),C([]),b(""),S(""),E("on_sale"),I(!1)}function Ye(i){const v=P.find(L=>L.id===i.id);if(!(!v||v.source!=="legacy"||!v.manaWei)){if(!u){c();return}ee(bs(v))}}function et(){h.invalidateQueries({queryKey:["shop-items"]})}const F=[];(N!=null||M!=null)&&F.push({key:"price",label:o("filter.price"),onRemove:()=>{b(""),S("")}});for(const i of Nt)m.includes(i)&&F.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>be(i)});return k&&F.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),j!=="on_sale"&&F.push({key:"status",label:j==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>E("on_sale")}),e.jsxs(mt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(gt,{onClick:()=>A(!1),"aria-hidden":!0}):null,e.jsxs(bt,{className:R?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:o("assets.filters")}),e.jsx(jt,{onClick:()=>A(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:a,subCategory:p,onCategory:ge,onSub:w,priceMin:$,priceMax:y,onPriceMin:b,onPriceMax:S,rarities:m,onToggleRarity:be,status:j,onStatus:E,smart:k,onSmart:I})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>A(!1),children:o("assets.showItems")})})]})]}),e.jsx(St,{children:a==="names"?e.jsx(ms,{onBack:()=>ge("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Mt,{sort:g,onSort:Y,total:fe,loading:_||z,query:l,onOpenFilters:()=>A(!0),chips:F,onClearChips:Xe}),Qe&&O&&P.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,he?e.jsx(Bt,{message:o("assets.loadError"),testId:"browse-error"}):null,!ue&&P.length===0&&!he?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(Tt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(_t,{children:o("assets.empty.title")}),e.jsx(Rt,{children:x?e.jsxs(e.Fragment,{children:[o("assets.empty.searchBefore"),e.jsx("b",{children:x}),o("assets.empty.searchAfter")]}):o("assets.empty.filters")})]}),e.jsx(zt,{children:e.jsx(At,{type:"button",onClick:()=>r("/overview"),children:o("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid","data-testid":"grid",children:ue?e.jsx(je,{count:Ze}):e.jsxs(e.Fragment,{children:[P.map(i=>{if(!O)return e.jsx(te,{item:i,mode:"view"},ne(i));const v=i;return v.source==="legacy"?e.jsx(te,{item:v,mode:"market",marketPriceCredits:Je(v),onBuyNow:Ye},ne(i)):e.jsx(te,{item:i},ne(i))}),xe?e.jsx(je,{count:6}):null]})}),e.jsx(Ft,{hasNextPage:Ve,isFetching:xe,onLoadMore:()=>void Ke()})]})]})}),ae&&D?e.jsx(ht,{listing:ae,rate:D,onClose:()=>ee(null),onSold:()=>{ee(null),et()}}):null]})}export{Os as Assets};
787
+ `,hs="https://docs.decentraland.org/creator/worlds/about/",xs="https://governance.decentraland.org";function us(n){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function ms({onBack:n}){We({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:l}=ie(),{data:h}=Ue(),u=h?He(H,h):null,[c,x]=f.useState(""),[a,d]=f.useState("idle"),[p,w]=f.useState(!1),m=f.useRef(null),[C,$]=f.useState(void 0);f.useLayoutEffect(()=>{m.current&&$(m.current.offsetWidth)},[c]),f.useEffect(()=>{if(!ve(c).ok){d(c.length===0?"idle":"invalid");return}d("checking");const k=new AbortController,I=setTimeout(()=>{(async()=>{try{const g=await nn(c,{signal:k.signal});d(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(I),k.abort()}},[c]);const b=ve(c),y=b.ok&&(a==="available"||a==="error");function S(){if(y){if(!r){l();return}w(!0)}}const j=e.jsxs(e.Fragment,{children:[o("names.claim"),u!=null?e.jsxs(rs,{children:[e.jsx(B,{}),Be(u)]}):null]});return e.jsxs(Fn,{"data-testid":"names-page",children:[e.jsxs(Bn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Wn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Hn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Un,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{children:[e.jsx(Gn,{children:o("names.heroTitle")}),e.jsx(qn,{children:o("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Kn,{children:[e.jsxs(Zn,{invalid:a==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:c,onChange:E=>x(Yt(E.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Qn,{ref:m,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(ns,{children:o("names.suffix")})]}),c.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Ge,{onClick:S,disabled:!y,"data-testid":"names-claim",children:j})]}),a==="taken"?e.jsxs(Jn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Xn,{href:us(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(os,{onClick:S,disabled:!y,children:j}),a==="checking"?e.jsx(se,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):a==="error"?e.jsx(se,{tone:"muted",role:"status",children:o("names.checkError")}):a==="invalid"&&!b.ok&&b.reason==="too-short"?e.jsx(se,{tone:"muted",role:"status",children:o("names.tooShort",{min:Oe})}):null,e.jsx(fs,{role:"status","aria-live":"polite",children:a==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:o("names.whyTitle")}),e.jsx(cs,{children:o("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Nn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why1Title")}),e.jsx(Q,{children:o("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Mn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why2Title")}),e.jsxs(Q,{children:[o("names.why2")," ",e.jsx(ps,{children:o("names.why2Address")})]}),e.jsxs(Pe,{href:hs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Pn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why3Title")}),e.jsx(Q,{children:o("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Ln,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why4Title")}),e.jsx(Q,{children:o("names.why4")}),e.jsxs(Pe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(zn,{name:c,priceCredits:u,onClose:()=>w(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",oe=48;function bs(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Us(){const[n]=tt(),r=Le(),l=(n.get("q")??"").trim().toLowerCase(),h=Fe(),{session:u,signIn:c}=ie(),x=(n.get("q")??"").trim();We({title:x?o("seo.collectibles.searchTitle",{query:x}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[a,d]=f.useState("wearable"),[p,w]=f.useState(null),[m,C]=f.useState([]),[$,b]=f.useState(""),[y,S]=f.useState(""),[j,E]=f.useState("on_sale"),[k,I]=f.useState(!1),[g,Y]=f.useState("newest"),[R,A]=f.useState(!1),[ae,ee]=f.useState(null);f.useEffect(()=>{if(!R)return;const i=F=>{F.key==="Escape"&&A(!1)};document.addEventListener("keydown",i);const v=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=v}},[R]);const U=j==="on_sale",N=$&&!Number.isNaN(Number($))?Number($):void 0,M=y&&!Number.isNaN(Number(y))?Number(y):void 0,qe=ft(),le=p?Pt[p]:void 0,ce=(we.find(i=>i.key===g)??we[0]).server,de={category:a,rarities:m.length?m:void 0,wearableCategories:le,minPriceCredits:N,maxPriceCredits:M,search:l||void 0,sortBy:ce,isSmart:k||void 0,onSale:!0,listingType:qe?void 0:"primary"},pe={category:a,rarities:m.length?m:void 0,wearableCategories:le,search:l||void 0,sortBy:ce,isWearableSmart:k||void 0,isOnSale:j==="not_for_sale"?!1:void 0},{items:P,total:fe,isLoading:_,isPlaceholderData:z,error:he,hasNextPage:Ve,isFetchingNextPage:xe,fetchNextPage:Ke}=Ft(U?["shop-items",de]:["catalog-items",pe],i=>U?dt({...de,first:oe,skip:i}):pt({...pe,first:oe,skip:i}),{enabled:a!=="names"}),O=fe,ue=_||z,Ze=_?15:Math.min(Math.max(P.length,1),oe),{data:D,isError:Qe}=Ue(),Je=i=>D&&i.manaWei?He(i.manaWei,D):null,me=f.useRef(null);f.useEffect(()=>{_||z||!l||me.current===l||(me.current=l,J("Shop Searched",{query:l,result_count:O}))},[l,_,z,O]);const G=f.useRef("__init__");f.useEffect(()=>{if(_||z)return;const i=JSON.stringify({category:a,subCategory:p,rarities:m,min:N,max:M,sort:g,status:j,smart:k});if(G.current==="__init__"||G.current===i){G.current=i;return}G.current=i,J("Shop Applied Filter",{filters:{category:a,sub_category:p,rarities:m,min_price_credits:N??null,max_price_credits:M??null,status:j,smart:k,sort:g},result_count:O})},[a,p,m,N,M,g,j,k,_,z,O]);function ge(i){d(i),w(null)}function be(i){C(v=>v.includes(i)?v.filter(F=>F!==i):[...v,i])}function Xe(){d("wearable"),w(null),C([]),b(""),S(""),E("on_sale"),I(!1)}function Ye(i){const v=P.find(F=>F.id===i.id);if(!(!v||v.source!=="legacy"||!v.manaWei)){if(!u){c();return}ee(bs(v))}}function et(){h.invalidateQueries({queryKey:["shop-items"]})}const L=[];(N!=null||M!=null)&&L.push({key:"price",label:o("filter.price"),onRemove:()=>{b(""),S("")}});for(const i of Nt)m.includes(i)&&L.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>be(i)});return k&&L.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),j!=="on_sale"&&L.push({key:"status",label:j==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>E("on_sale")}),e.jsxs(mt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(gt,{onClick:()=>A(!1),"aria-hidden":!0}):null,e.jsxs(bt,{className:R?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:o("assets.filters")}),e.jsx(jt,{onClick:()=>A(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:a,subCategory:p,onCategory:ge,onSub:w,priceMin:$,priceMax:y,onPriceMin:b,onPriceMax:S,rarities:m,onToggleRarity:be,status:j,onStatus:E,smart:k,onSmart:I})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>A(!1),children:o("assets.showItems")})})]})]}),e.jsx(St,{children:a==="names"?e.jsx(ms,{onBack:()=>ge("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Mt,{sort:g,onSort:Y,total:fe,loading:_||z,query:l,onOpenFilters:()=>A(!0),chips:L,onClearChips:Xe}),Qe&&U&&P.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,he?e.jsx(Bt,{message:o("assets.loadError"),testId:"browse-error"}):null,!ue&&P.length===0&&!he?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(Tt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(_t,{children:o("assets.empty.title")}),e.jsx(Rt,{children:x?e.jsxs(e.Fragment,{children:[o("assets.empty.searchBefore"),e.jsx("b",{children:x}),o("assets.empty.searchAfter")]}):o("assets.empty.filters")})]}),e.jsx(zt,{children:e.jsx(At,{type:"button",onClick:()=>r("/overview"),children:o("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid","data-testid":"grid",children:ue?e.jsx(je,{count:Ze}):e.jsxs(e.Fragment,{children:[P.map(i=>{if(!U)return e.jsx(te,{item:i,mode:"view"},ne(i));const v=i;return v.source==="legacy"?e.jsx(te,{item:v,mode:"market",marketPriceCredits:Je(v),onBuyNow:Ye},ne(i)):e.jsx(te,{item:i},ne(i))}),xe?e.jsx(je,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:xe,onLoadMore:()=>void Ke()})]})]})}),ae&&D?e.jsx(ht,{listing:ae,rate:D,onClose:()=>ee(null),onSold:()=>{ee(null),et()}}):null]})}export{Us as Assets};
@@ -1,4 +1,4 @@
1
- import{r as $,j as t}from"./react-B36MyIP_.js";import{R as C,a as oe,C as ie,c as ne}from"./categories-CnryCWCq.js";import{T as se}from"./Tooltip-CkfT0XKM.js";import{K as e,n as o,I as m,t as s,L as re,b as v}from"./index-Boi8OWdb.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
1
+ import{r as $,j as t}from"./react-B36MyIP_.js";import{R as C,a as oe,C as ie,c as ne}from"./categories-Jh3tfbEa.js";import{T as se}from"./Tooltip-8SR8hseo.js";import{K as e,n as o,I as m,t as s,L as re,b as v}from"./index-VchcND_n.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -1,4 +1,4 @@
1
- import{j as t,L as q,r as D}from"./react-B36MyIP_.js";import{n as a,B as M,K as o,R as I,h as B,t as e,e as F,j as K,I as f,k as G,S as P,u as w,x as Q,c as H,U as k,J as O,N as $}from"./index-Boi8OWdb.js";import{b as W,c as _,d as J,f as U,s as X,h as V}from"./authorizations-DVHH9Rgu.js";import{a as Y}from"./builder--u_mLwLg.js";import{f as Z}from"./errors-CxK78Ezc.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CoMlUn3U.js";const tt=I`
1
+ import{j as t,L as q,r as D}from"./react-B36MyIP_.js";import{n as a,B as M,K as o,R as I,h as B,t as e,e as F,j as K,I as f,k as G,S as P,u as w,x as Q,c as H,U as k,J as O,N as $}from"./index-VchcND_n.js";import{b as W,c as _,d as J,f as U,s as X,h as V}from"./authorizations-Dtu8Ye0y.js";import{a as Y}from"./builder-BsAwBvGZ.js";import{f as Z}from"./errors-C_tFJwwX.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CydgYVdt.js";const tt=I`
2
2
  to { transform: rotate(360deg); }
3
3
  `,it=I`
4
4
  to { background-position: -200% 0; }
@@ -1,4 +1,4 @@
1
- import{bb as Xe,bc as Ye,q as Ge,bd as qe,Y as G,Z as b,$ as z,W as ee,X as se,be as Ze,a2 as H,R as le,V as Ce,bf as be,bg as we,bh as w,a1 as Re,bi as Je,T as Qe,aT as eo,r as oo,a0 as B,bj as to,bk as J}from"./index-Boi8OWdb.js";import{r as l,j as T,R as Y}from"./react-B36MyIP_.js";function Me(e){var o,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(t=Me(e[o]))&&(i&&(i+=" "),i+=t)}else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function no(){for(var e,o,t=0,i="",n=arguments.length;t<n;t++)(e=arguments[t])&&(o=Me(e))&&(i&&(i+=" "),i+=o);return i}const io=["className","component"];function ao(e={}){const{themeId:o,defaultTheme:t,defaultClassName:i="MuiBox-root",generateClassName:n}=e,a=Xe("div",{shouldForwardProp:u=>u!=="theme"&&u!=="sx"&&u!=="as"})(Ye);return l.forwardRef(function(c,p){const f=Ge(t),g=qe(c),{className:m,component:v="div"}=g,h=G(g,io);return T.jsx(a,b({as:v,ref:p,className:no(m,n?n(i):i),theme:o&&f[o]||f},h))})}function ae(e,o){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ae(e,o)}function ro(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,ae(e,o)}const ge=Y.createContext(null);function so(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ce(e,o){var t=function(a){return o&&l.isValidElement(a)?o(a):a},i=Object.create(null);return e&&l.Children.map(e,function(n){return n}).forEach(function(n){i[n.key]=t(n)}),i}function lo(e,o){e=e||{},o=o||{};function t(f){return f in o?o[f]:e[f]}var i=Object.create(null),n=[];for(var a in e)a in o?n.length&&(i[a]=n,n=[]):n.push(a);var r,u={};for(var c in o){if(i[c])for(r=0;r<i[c].length;r++){var p=i[c][r];u[i[c][r]]=t(p)}u[c]=t(c)}for(r=0;r<n.length;r++)u[n[r]]=t(n[r]);return u}function A(e,o,t){return t[o]!=null?t[o]:e.props[o]}function co(e,o){return ce(e.children,function(t){return l.cloneElement(t,{onExited:o.bind(null,t),in:!0,appear:A(t,"appear",e),enter:A(t,"enter",e),exit:A(t,"exit",e)})})}function uo(e,o,t){var i=ce(e.children),n=lo(o,i);return Object.keys(n).forEach(function(a){var r=n[a];if(l.isValidElement(r)){var u=a in o,c=a in i,p=o[a],f=l.isValidElement(p)&&!p.props.in;c&&(!u||f)?n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:!0,exit:A(r,"exit",e),enter:A(r,"enter",e)}):!c&&u&&!f?n[a]=l.cloneElement(r,{in:!1}):c&&u&&l.isValidElement(p)&&(n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:p.props.in,exit:A(r,"exit",e),enter:A(r,"enter",e)}))}}),n}var po=Object.values||function(e){return Object.keys(e).map(function(o){return e[o]})},fo={component:"div",childFactory:function(o){return o}},ue=(function(e){ro(o,e);function o(i,n){var a;a=e.call(this,i,n)||this;var r=a.handleExited.bind(so(a));return a.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},a}var t=o.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},o.getDerivedStateFromProps=function(n,a){var r=a.children,u=a.handleExited,c=a.firstRender;return{children:c?co(n,u):uo(n,r,u),firstRender:!1}},t.handleExited=function(n,a){var r=ce(this.props.children);n.key in r||(n.props.onExited&&n.props.onExited(a),this.mounted&&this.setState(function(u){var c=b({},u.children);return delete c[n.key],{children:c}}))},t.render=function(){var n=this.props,a=n.component,r=n.childFactory,u=G(n,["component","childFactory"]),c=this.state.contextValue,p=po(this.state.children).map(r);return delete u.appear,delete u.enter,delete u.exit,a===null?Y.createElement(ge.Provider,{value:c},p):Y.createElement(ge.Provider,{value:c},Y.createElement(a,u,p))},o})(Y.Component);ue.propTypes={};ue.defaultProps=fo;function ho(e){const{className:o,classes:t,pulsate:i=!1,rippleX:n,rippleY:a,rippleSize:r,in:u,onExited:c,timeout:p}=e,[f,g]=l.useState(!1),m=z(o,t.ripple,t.rippleVisible,i&&t.ripplePulsate),v={width:r,height:r,top:-(r/2)+a,left:-(r/2)+n},h=z(t.child,f&&t.childLeaving,i&&t.childPulsate);return!u&&!f&&g(!0),l.useEffect(()=>{if(!u&&c!=null){const C=setTimeout(c,p);return()=>{clearTimeout(C)}}},[c,u,p]),T.jsx("span",{className:m,style:v,children:T.jsx("span",{className:h})})}const E=ee("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),bo=["center","classes","className"];let oe=e=>e,me,xe,ve,ye;const re=550,go=80,mo=le(me||(me=oe`
1
+ import{bb as Xe,bc as Ye,q as Ge,bd as qe,Y as G,Z as b,$ as z,W as ee,X as se,be as Ze,a2 as H,R as le,V as Ce,bf as be,bg as we,bh as w,a1 as Re,bi as Je,T as Qe,aT as eo,r as oo,a0 as B,bj as to,bk as J}from"./index-VchcND_n.js";import{r as l,j as T,R as Y}from"./react-B36MyIP_.js";function Me(e){var o,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(t=Me(e[o]))&&(i&&(i+=" "),i+=t)}else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function no(){for(var e,o,t=0,i="",n=arguments.length;t<n;t++)(e=arguments[t])&&(o=Me(e))&&(i&&(i+=" "),i+=o);return i}const io=["className","component"];function ao(e={}){const{themeId:o,defaultTheme:t,defaultClassName:i="MuiBox-root",generateClassName:n}=e,a=Xe("div",{shouldForwardProp:u=>u!=="theme"&&u!=="sx"&&u!=="as"})(Ye);return l.forwardRef(function(c,p){const f=Ge(t),g=qe(c),{className:m,component:v="div"}=g,h=G(g,io);return T.jsx(a,b({as:v,ref:p,className:no(m,n?n(i):i),theme:o&&f[o]||f},h))})}function ae(e,o){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ae(e,o)}function ro(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,ae(e,o)}const ge=Y.createContext(null);function so(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ce(e,o){var t=function(a){return o&&l.isValidElement(a)?o(a):a},i=Object.create(null);return e&&l.Children.map(e,function(n){return n}).forEach(function(n){i[n.key]=t(n)}),i}function lo(e,o){e=e||{},o=o||{};function t(f){return f in o?o[f]:e[f]}var i=Object.create(null),n=[];for(var a in e)a in o?n.length&&(i[a]=n,n=[]):n.push(a);var r,u={};for(var c in o){if(i[c])for(r=0;r<i[c].length;r++){var p=i[c][r];u[i[c][r]]=t(p)}u[c]=t(c)}for(r=0;r<n.length;r++)u[n[r]]=t(n[r]);return u}function A(e,o,t){return t[o]!=null?t[o]:e.props[o]}function co(e,o){return ce(e.children,function(t){return l.cloneElement(t,{onExited:o.bind(null,t),in:!0,appear:A(t,"appear",e),enter:A(t,"enter",e),exit:A(t,"exit",e)})})}function uo(e,o,t){var i=ce(e.children),n=lo(o,i);return Object.keys(n).forEach(function(a){var r=n[a];if(l.isValidElement(r)){var u=a in o,c=a in i,p=o[a],f=l.isValidElement(p)&&!p.props.in;c&&(!u||f)?n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:!0,exit:A(r,"exit",e),enter:A(r,"enter",e)}):!c&&u&&!f?n[a]=l.cloneElement(r,{in:!1}):c&&u&&l.isValidElement(p)&&(n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:p.props.in,exit:A(r,"exit",e),enter:A(r,"enter",e)}))}}),n}var po=Object.values||function(e){return Object.keys(e).map(function(o){return e[o]})},fo={component:"div",childFactory:function(o){return o}},ue=(function(e){ro(o,e);function o(i,n){var a;a=e.call(this,i,n)||this;var r=a.handleExited.bind(so(a));return a.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},a}var t=o.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},o.getDerivedStateFromProps=function(n,a){var r=a.children,u=a.handleExited,c=a.firstRender;return{children:c?co(n,u):uo(n,r,u),firstRender:!1}},t.handleExited=function(n,a){var r=ce(this.props.children);n.key in r||(n.props.onExited&&n.props.onExited(a),this.mounted&&this.setState(function(u){var c=b({},u.children);return delete c[n.key],{children:c}}))},t.render=function(){var n=this.props,a=n.component,r=n.childFactory,u=G(n,["component","childFactory"]),c=this.state.contextValue,p=po(this.state.children).map(r);return delete u.appear,delete u.enter,delete u.exit,a===null?Y.createElement(ge.Provider,{value:c},p):Y.createElement(ge.Provider,{value:c},Y.createElement(a,u,p))},o})(Y.Component);ue.propTypes={};ue.defaultProps=fo;function ho(e){const{className:o,classes:t,pulsate:i=!1,rippleX:n,rippleY:a,rippleSize:r,in:u,onExited:c,timeout:p}=e,[f,g]=l.useState(!1),m=z(o,t.ripple,t.rippleVisible,i&&t.ripplePulsate),v={width:r,height:r,top:-(r/2)+a,left:-(r/2)+n},h=z(t.child,f&&t.childLeaving,i&&t.childPulsate);return!u&&!f&&g(!0),l.useEffect(()=>{if(!u&&c!=null){const C=setTimeout(c,p);return()=>{clearTimeout(C)}}},[c,u,p]),T.jsx("span",{className:m,style:v,children:T.jsx("span",{className:h})})}const E=ee("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),bo=["center","classes","className"];let oe=e=>e,me,xe,ve,ye;const re=550,go=80,mo=le(me||(me=oe`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0.1;
@@ -0,0 +1 @@
1
+ import{j as e,r as j,a as pa,u as _a,L as te}from"./react-B36MyIP_.js";import{t,k as K,m as G,ak as ga,h as ba,ai as P,Q as Ue,e as fa,u as va,w as xa,x as Ca,al as ja,am as ka,I as A,an as Na,l as wa,j as Ma,ao as Oe,E as B,ap as $e,aq as Sa,J as O,b as qa,D as Ve,y as pe,ar as _e,G as se,F as De,g as ne,a as Pa,C as ge,c as Ge,as as Aa}from"./index-VchcND_n.js";import{P as Ye,m as Xe,W as Ia,c as be,t as Ra,C as Fa,A as Ta,a as Ea,s as He,i as Wa,b as La,d as Ba,e as Ka}from"./CollectionCarousel-BLfBmiC7.js";import{u as Qa}from"./useManaRate-CCWK1pxl.js";import{u as Je,r as za}from"./mana-rate-CY9tOCr1.js";import{a as Ua,j as Oa,h as $a,n as Va,i as Da,A as Ga}from"./authorizations-Dtu8Ye0y.js";import{a as fe}from"./buy-CyhVI8ih.js";import{a as Ha,w as Ja,S as Ya,G as Xa}from"./buy-gasless-D6tjB5nW.js";import{R as re,r as Za}from"./cart-checkout-Bp3fmOrE.js";import{u as et,M as at,c as tt}from"./useCreditPacks-B8su_g3G.js";import{l as st}from"./loader-logo-BzY9EKdC.js";import{i as nt,a as rt}from"./errors-C_tFJwwX.js";import{E as ct}from"./ErrorNotice-D_Z5OVFI.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-DbssSNOL.js";import"./sendMetaTransaction-CydgYVdt.js";const it="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/buy-error-22UunaPC.png";function ot(c){const{phase:o,balanceCredits:C,onClose:N}=c,I=o==="processing",T=o==="error"?t("cartCheckout.errorTitle"):o==="nofunds"?t("cartCheckout.titleNoFunds"):o==="choose"?t("buyModal.choosePayment"):t("cartCheckout.titleBuy"),E=o==="processing";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":t("cartCheckout.dialogAria"),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:I?void 0:N,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${E?" buy-modal__card--tall":""}`,children:[e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:T}),!I&&e.jsx("button",{className:"buy-modal__x",onClick:N,"aria-label":t("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:o==="nofunds"?t("buyModal.dclBalance"):t("buyModal.myCreditsBalance")}),e.jsx(K,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:G(C)})]})]}),o==="choose"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"cart-checkout__choose-total",children:[e.jsx("span",{children:t("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(K,{className:"buy-modal__balance-ico"}),G(c.totalCredits??0)]})]}),e.jsx(Ye,{options:c.options??[],totalCents:c.totalCents??0,onPay:c.onPay??(()=>{}),rateNote:(()=>{const M=Xe(c.totalCents??0,c.totalManaWei??0n);return M!=null?t("buyModal.manaRate",{mana:M.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),o==="processing"&&e.jsx(lt,{stage:c.stage??"reserving",step:c.step??1,total:c.total??1,isSelfCustody:!!c.isSelfCustody}),o==="nofunds"&&e.jsx(dt,{lines:c.lines??[],shortfallCredits:c.shortfallCredits??0,packs:c.packs??[],selectedPack:c.selectedPack??"",onSelectPack:c.onSelectPack??(()=>{}),onBuyPacks:c.onBuyPacks??(()=>{}),onCancel:N}),o==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-error",children:[e.jsx("img",{className:"buy-error__art",src:it,alt:"",width:64,height:80}),e.jsxs("p",{className:"buy-error__text",children:[e.jsx("b",{children:t("cartCheckout.errorHeadline")})," ",t("cartCheckout.errorBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:N,children:t("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--purple",onClick:c.onRetry??N,children:t("cartCheckout.tryAgain")})]})]})]})]})}function lt({stage:c,step:o,total:C,isSelfCustody:N}){const I=c==="reserving",T=C>0?Math.min(100,Math.round(o/C*100)):0,E=c==="awaiting-signature"?N?t("buyModal.confirmToContinue"):t("buyModal.completingTransaction"):c==="settling"?t("buyModal.completingTransaction"):t("cartCheckout.preparing");return e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:st,alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:E}),I?e.jsxs("div",{className:"cart-checkout__progress-row",children:[e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill buy-modal__progress-fill--step",style:{width:`${T}%`}})}),C>1?e.jsxs("span",{className:"cart-checkout__step",children:[o,"/",C]}):null]}):e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]})}function dt({lines:c,shortfallCredits:o,packs:C,selectedPack:N,onSelectPack:I,onBuyPacks:T,onCancel:E}){const M=C.find(n=>n.id===N),ie=c.reduce((n,q)=>n+(q.quantity??1),0);return e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsx(Ia,{className:"buy-modal__warning-ico"}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:t("buyModal.insufficientFunds")})," ",t("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:t("buyModal.warningCreditsAmount",{count:Math.max(0,o)})})," ",t("buyModal.warningToPurchase",{count:ie})]})]}),e.jsx("div",{className:"cart-checkout__scroll",children:c.map(n=>{const q=n.quantity??1;return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"buy-modal__asset-name",title:n.item.name,children:[n.item.name||t("buyModal.itemFallback"),q>1?e.jsx("span",{className:"cart-checkout__qty-tag",children:t("cartCheckout.qty",{count:q})}):null]}),n.item.creator?e.jsx(ga,{address:n.item.creator,className:"buy-modal__asset-creator"}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(K,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:G(n.priceCredits*q)})]})]})]},n.item.id)})}),e.jsx("div",{className:"buy-modal__packs",children:C.map(n=>{const q=n.id===N;return e.jsxs("button",{className:`buy-modal__pack${q?" buy-modal__pack--on":""}`,onClick:()=>I(n.id),children:[e.jsx(K,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:G(n.credits)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(K,{className:"buy-modal__total-ico"}),e.jsx("span",{children:G((M==null?void 0:M.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",((M==null?void 0:M.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:E,children:t("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:T,children:t("buyModal.buy")})]})]})}function ve(c){if(nt(c))return t("errors.rejected");const o=(c.message??"").toLowerCase();return o.includes("insufficient")?t("cart.error.insufficient",{currency:qa.name}):o.includes("no active listing")||o.includes("your own listing")?t("cart.error.listingChanged"):t("marketCheckout.error.generic")}const ut=12e4;function ht(c){const o=[];return c.unavailable.length&&o.push(t("cart.drop.unavailable",{count:c.unavailable.length})),c.own.length&&o.push(t("cart.drop.own",{count:c.own.length})),t("cart.drop.removed",{items:o.join(` ${t("cart.drop.and")} `)})}const xe=c=>c.reduce((o,C)=>o+C.priceCredits*C.quantity,0),ce=c=>c.flatMap(o=>Array.from({length:o.quantity},()=>({...o,quantity:1})));function It(){ba({title:t("nav.cart"),noindex:!0});const c=P(a=>a.items),o=P(a=>a.remove),C=P(a=>a.increment),N=P(a=>a.decrement),I=P(a=>a.clear),T=P(a=>a.restore),E=P(a=>a.setFittingOpen),M=Ue(a=>a.items),ie=Ue(a=>a.toggle),{session:n,signIn:q}=fa(),H=et().packs.slice(0,at);j.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Ze=c.some(a=>a.category!=="emote"),{data:oe}=va({queryKey:["upsell-listings"],queryFn:()=>Aa({first:40}),staleTime:6e4}),{data:f}=xa(n),y=Ca(),Q=pa(),{state:W}=_a(),[ea,$]=j.useState(null),[Ce,J]=j.useState(null),[aa,S]=j.useState(!1),[w,L]=j.useState(null),je=j.useRef(0),[u,g]=j.useState(null),{data:V}=ja(n),{data:le}=Qa(!0),[de,ke]=j.useState(""),D=j.useRef(null),Ne=ka(c),we=a=>Oe(Ne[a.id]),ue=c.filter(we),he=c.length>0&&ue.length===0,ta=ue.reduce((a,s)=>a+s.priceCredits*s.quantity,0),sa=c.reduce((a,s)=>a+s.quantity,0),na=ue.reduce((a,s)=>a+s.quantity,0),Me=w?w.liveTotalCredits:ta,ra=new Set(c.map(a=>a.id)),Se=((oe==null?void 0:oe.items)??[]).filter(a=>!ra.has(a.id)).slice(0,12),ca=new Map(w==null?void 0:w.buyable.map(a=>[a.item.id,a])),Y=(f==null?void 0:f.credits)??0,X=Me*10,qe=le?Je(X,le):0n,Z=be({priceCents:X,priceManaWei:qe,balanceCents:(f==null?void 0:f.balanceCents)??0,manaBalanceWei:V??0n}),Pe=Xe(X,qe),Ae=Pe!=null?t("buyModal.manaRate",{mana:Pe.toLocaleString("en",{maximumFractionDigits:2})}):null,ia=Sa;function ee(a){a(),L(null),J(null),$(null)}function oa(){g(null),S(!1)}function Ie(a){const s=xe(a),i=Math.max(0,s-Y),r=H.find(l=>l.credits>=i)??H[H.length-1];ke(r.id),B("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:Y,shortfall:i}),g({phase:"nofunds",lines:a.map(l=>({item:l.item,priceCredits:l.priceCredits,quantity:l.quantity})),shortfall:i}),S(!1)}async function me(a){if(!n||a.length===0)return;const s=ce(a),i=s.map(m=>({...m.item,priceCredits:m.priceCredits})),r=a.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),l=[];let d="authorize",p=!1;g({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[];for(let x=0;x<s.length;x++){const b=s[x];g({phase:"processing",stage:"reserving",step:x+1,total:s.length});try{const{credit:v,maxCreditedValue:U}=await Ve(n.identity,b.usdCents,b.trade.id);l.push(v.id),m.push({trade:b.trade,credits:[v],maxCreditedValue:U})}catch(v){if(rt(v)){if(l.length){try{await pe(n.identity,l)}catch(U){O(U,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}Ie(a);return}throw v}}d="submit";const k=()=>g({phase:"processing",stage:"settling",step:s.length,total:s.length});g({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});let _=[];if(Ua())try{_=await Ha({purchases:m,buyer:n.address,signer:n.signer,onSigned:k});const b=(await Promise.allSettled(_.map(v=>Ja(v)))).flatMap(v=>v.status==="rejected"?[v.reason]:[]);if(b.length&&!b.some(v=>v instanceof Ya))throw b[0];p=!0}catch(x){if(!(x instanceof Xa))throw x;_=await fe({purchases:m,buyer:n.address,signer:n.signer,onSigned:k})}else _=await fe({purchases:m,buyer:n.address,signer:n.signer});a.forEach(x=>o(x.item.id)),L(null),B("Shop Completed Purchase",{..._e(i),payment_type:"credits",no_crypto_step:p,transaction_hash:_[0]??null}),Wa(y);const h=D.current;D.current=null,g(null),S(!1);const F={items:r,txHash:_[0]??void 0,settled:!0,...h?{creditsAdded:h}:{}};Q("/success",{state:F,replace:!0})}catch(m){if(se(m)||O(m,{flow:"cart_checkout",step:d,cart_size:a.length}),B(se(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:d,error_code:De(m),value_usd:$e(i.reduce((k,_)=>k+_.priceCredits,0)),cart_size:s.length}),l.length){try{await pe(n.identity,l)}catch(k){O(k,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}g({phase:"error",message:ve(m)})}}function Re(a,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const i=D.current;D.current=null,g(null),S(!1);const r={items:a,txHash:s[0]??void 0,settled:!0,...i?{creditsAdded:i}:{}};Q("/success",{state:r,replace:!0})}function Fe(a,s){se(a)||O(a,{flow:s,step:"submit"}),B(se(a)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:De(a)}),g({phase:"error",message:ve(a)}),S(!1)}async function la(a,s){const i=ne(ge.MANAToken,s),r=ne(ge.CreditsManager,s);await Da({auth:{kind:Ga.Allowance,contractAddress:i.address,spenderAddress:r.address,chainId:s},signer:a})}async function da(a){const s=ce(a).reduce((d,p)=>d+p.usdCents,0),i=(V??0n)>0n;let r=le;if(!r&&i)try{r=await y.fetchQuery({queryKey:["mana-rate",Ge.chainId],queryFn:()=>za(Ge.chainId),staleTime:6e4})}catch{r=void 0}const l=r?Je(s,r):0n;return{totalCents:s,manaWei:l}}async function Te(a,s){const i=xe(a),{totalCents:r,manaWei:l}=await da(a),d=be({priceCents:r,priceManaWei:l,balanceCents:(f==null?void 0:f.balanceCents)??0,manaBalanceWei:V??0n});if(s&&d.options.some(p=>p.method===s)){if(s==="credits"){me(a);return}const{spender:p,chainId:m}=Ee(s,a);await We(p,m,()=>s==="mana"?void Le(a):void Be(a,r,l));return}if(d.options.some(p=>p.method==="mana"||p.method==="combined")){g({phase:"choose",lines:a,totalCents:r,manaWei:l}),S(!1);return}if(f!=null&&f.credits<i){Ie(a);return}me(a)}function ua(a){return be({priceCents:a.totalCents,priceManaWei:a.manaWei,balanceCents:(f==null?void 0:f.balanceCents)??0,manaBalanceWei:V??0n})}const[ye,ae]=j.useState(null);function Ee(a,s){const i=s[0].trade;return{spender:a==="mana"?ne(Pa(i.contract),i.chainId).address:ne(ge.CreditsManager,i.chainId).address,chainId:i.chainId}}async function We(a,s,i){const r=Oa(s,a),l=n?await $a(r,n.address).catch(()=>!0):!0;if(Va(n==null?void 0:n.providerType,l)){S(!1),ae({auth:r,run:i});return}i()}function ha(a){if((u==null?void 0:u.phase)!=="choose")return;const{lines:s,totalCents:i,manaWei:r}=u;if(a==="credits"){me(s);return}const{spender:l,chainId:d}=Ee(a,s);We(l,d,()=>a==="mana"?void Le(s):void Be(s,i,r))}async function Le(a){if(!n||a.length===0)return;const s=ce(a),i=s.map(d=>({...d.item,priceCredits:d.priceCredits})),r=a.map(d=>({...d.item,priceCredits:d.priceCredits,quantity:d.quantity})),l=()=>g({phase:"processing",stage:"settling",step:s.length,total:s.length});g({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});try{const d=await La({trades:s.map(p=>p.trade),buyer:n.address,signer:n.signer,onSigned:l});a.forEach(p=>o(p.item.id)),L(null),B("Shop Completed Purchase",{..._e(i),payment_type:"mana",transaction_hash:d[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Re(r,d)}catch(d){Fe(d,"buy_cart_mana")}}async function Be(a,s,i){if(!n||a.length===0)return;const r=ce(a),l=r.map(h=>({...h.item,priceCredits:h.priceCredits})),d=a.map(h=>({...h.item,priceCredits:h.priceCredits,quantity:h.quantity})),p=Ba(r.map(h=>h.usdCents),(f==null?void 0:f.balanceCents)??0),m=p.reduce((h,F)=>h+F,0),k=Ka(Math.max(0,s-m),s,i),_=[];g({phase:"processing",stage:"reserving",step:1,total:r.length});try{const h=[];for(let b=0;b<r.length;b++){const v=p[b];if(v<=0)continue;g({phase:"processing",stage:"reserving",step:b+1,total:r.length});const{credit:U,maxCreditedValue:ya}=await Ve(n.identity,v,r[b].trade.id);_.push(U.id),h.push({trade:r[b].trade,credits:[U],maxCreditedValue:ya})}r.forEach((b,v)=>{p[v]<=0&&h.push({trade:b.trade,credits:[],maxCreditedValue:"0"})}),h[0]={...h[0],maxCreditedValue:(BigInt(h[0].maxCreditedValue)+k).toString()},await la(n.signer,r[0].trade.chainId);const F=()=>g({phase:"processing",stage:"settling",step:r.length,total:r.length});g({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const x=await fe({purchases:h,buyer:n.address,signer:n.signer,onSigned:F});a.forEach(b=>o(b.item.id)),L(null),B("Shop Completed Purchase",{..._e(l),payment_type:"credits_and_mana",transaction_hash:x[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Re(d,x)}catch(h){_.length&&(pe(n.identity,_).catch(()=>{}),y.invalidateQueries({queryKey:["usd-balance"]})),Fe(h,"buy_cart_combined")}}async function z(a){if(!n){He({type:"cart-checkout"}),q();return}const s=P.getState().items.filter(we);if(s.length===0)return;$(null),J(null),S(!0);const i=s.reduce((r,l)=>r+l.priceCredits*l.quantity,0);B("Shop Started Checkout",{cart_size:s.length,cart_value_credits:i,cart_value_usd:$e(i),has_sufficient_credits:Y>=i});try{const r=await Za(s,n.address,ia),l=[...r.unavailable,...r.own];if(l.length&&(l.forEach(d=>o(d.id)),J(ht(r))),r.buyable.length===0){$(t("cart.error.noneAvailable")),L(null);return}if(r.orderChanged){L(r),je.current=Date.now();return}await Te(r.buyable,a)}catch(r){O(r,{flow:"cart_checkout",step:"review",cart_size:s.length}),$(ve(r))}finally{S(!1)}}async function Ke(){if(w){if(!n){He({type:"cart-checkout"}),q();return}if(Date.now()-je.current>ut){L(null),J(null),await z();return}$(null),Te(w.buyable)}}async function ma(){if(de){try{sessionStorage.setItem(re,JSON.stringify(P.getState().items))}catch{}S(!0);try{const a=await tt(de,n?{address:n.address,identity:n.identity}:void 0);if(a.url){window.location.href=a.url;return}Q("/credits")}catch(a){try{sessionStorage.removeItem(re)}catch{}O(a,{flow:"cart_buy_credits"}),g({phase:"error",message:t("buyModal.error.creditsCheckout")})}finally{S(!1)}}}const Qe=j.useRef(!1);j.useEffect(()=>{if(!n||Qe.current||!Ra("cart-checkout"))return;Qe.current=!0;const a=setTimeout(()=>void z(),0);return()=>clearTimeout(a)},[n]);const ze=j.useRef(!1);j.useEffect(()=>{if(!(W!=null&&W.resumeCheckout)||ze.current)return;ze.current=!0,D.current=W.creditsAdded??null;try{const s=sessionStorage.getItem(re);if(s){sessionStorage.removeItem(re);const i=JSON.parse(s);Array.isArray(i)&&i.length&&T(i)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const a=setTimeout(()=>void z(),0);return()=>clearTimeout(a)},[W==null?void 0:W.resumeCheckout]);const R=aa||(u==null?void 0:u.phase)==="processing";return c.length===0&&!u?e.jsx("div",{className:"checkout checkout--empty",children:e.jsxs("div",{className:"checkout__top",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>Q(-1),type:"button",children:[e.jsx(A,{name:"arrow-left"}),t("nav.cart")]}),e.jsxs("section",{className:"checkout__panel cart-empty","data-testid":"cart-empty",children:[e.jsx(A,{name:"cart-plus",size:110,className:"cart-empty__icon"}),e.jsxs("div",{className:"cart-empty__text",children:[e.jsx("p",{className:"cart-empty__title",children:t("cart.empty.title")}),e.jsx("p",{className:"cart-empty__body",children:t("cart.empty.body")})]}),e.jsx(te,{className:"cart-empty__cta",to:"/assets",children:t("cart.empty.cta")})]})]})}):e.jsxs("div",{className:"checkout",children:[e.jsxs("div",{className:"checkout__top",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>Q(-1),type:"button",children:[e.jsx(A,{name:"arrow-left"}),t("nav.cart")]}),e.jsxs("div",{className:"checkout__body",children:[e.jsxs("div",{className:"checkout__left",children:[e.jsxs("div",{className:"checkout__head-card",children:[e.jsx("button",{className:"checkout__panel-back",onClick:()=>Q(-1),type:"button","aria-label":t("cart.goBack"),children:e.jsx(A,{name:"arrow-left"})}),e.jsx("h1",{className:"checkout__panel-title",children:t("cart.panelTitle",{count:sa})}),Ze?e.jsxs("button",{className:"checkout__fitting",onClick:()=>E(!0),disabled:R,children:[e.jsx(A,{name:"fitting-room"}),t("cart.fittingRoom")]}):null]}),e.jsxs("section",{className:"checkout__panel",children:[e.jsx("div",{className:"checkout__list",children:c.map(a=>{const s=ca.get(a.id),i=s?s.priceCredits:a.priceCredits,r=!!s&&s.priceCredits!==a.priceCredits,l=!a.tokenId,d=a.quantity,p=typeof a.available=="number"&&d>=a.available,m=i*d,k=!!M[a.id],_=Na(a),h=Ne[a.id],F=!Oe(h),x=h==="sold-out"?t("cart.availability.soldOut"):t("cart.availability.unavailable");return e.jsxs("div",{className:`checkout__card${F?" is-unavailable":""}`,children:[e.jsxs("div",{className:"checkout__thumb",children:[_?e.jsx(te,{className:"checkout__thumb-link",to:_,state:{item:a,tradeId:a.tradeId},"aria-label":a.name,children:a.thumbnail?e.jsx("img",{src:a.thumbnail,alt:a.name}):null}):a.thumbnail?e.jsx("img",{src:a.thumbnail,alt:a.name}):null,e.jsx("span",{className:"checkout__thumb-check","aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs("div",{className:"checkout__info",children:[e.jsxs("div",{className:"checkout__desc",children:[_?e.jsx(te,{className:"checkout__name",to:_,state:{item:a,tradeId:a.tradeId},title:a.name,children:a.name}):e.jsx("div",{className:"checkout__name",title:a.name,children:a.name}),a.creator?e.jsx(wa,{address:a.creator,className:"checkout__creator",linkToProfile:!0}):null,l?e.jsxs("span",{className:"checkout__creator-tag","data-testid":"cart-creator-tag",children:[e.jsx(A,{name:"buy-from-creator",className:"checkout__creator-tag-ico","aria-hidden":!0}),t("cart.creatorTag")]}):null]}),e.jsx("div",{className:"checkout__foot",children:F?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"checkout__unavailable",children:[e.jsx(A,{name:"warning-fill",size:24,className:"checkout__warn","aria-hidden":!0}),x]}),_?e.jsx(te,{className:"checkout__resales",to:_,state:{item:a,tradeId:a.tradeId},children:t("cart.availability.viewResales")}):null]}):e.jsxs(e.Fragment,{children:[l?e.jsxs("div",{className:"checkout__stepper",children:[e.jsx("button",{className:"checkout__step",onClick:()=>ee(()=>N(a.id)),disabled:R||d<=1,"aria-label":t("cart.decreaseQuantity",{name:a.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx("span",{className:"checkout__qty",children:d}),e.jsx("button",{className:"checkout__step",onClick:()=>ee(()=>C(a.id)),disabled:R||p,"aria-label":t("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs("div",{className:"checkout__price",children:[e.jsx(K,{className:"checkout__price-ico"})," ",m,r?e.jsx("span",{className:"checkout__price-was",children:a.priceCredits*d}):null]})]})})]}),e.jsxs("div",{className:"checkout__actions",children:[e.jsx("button",{className:`checkout__fav${k?" is-on":""}`,onClick:()=>ie(a),"aria-label":k?t("cart.removeFromFavorites",{name:a.name}):t("cart.addToFavorites",{name:a.name}),title:k?t("assetCard.removeFromFavorites"):t("assetCard.addToFavorites"),children:e.jsx(A,{name:k?"heart-solid":"heart"})}),e.jsx("button",{className:"checkout__remove",onClick:()=>ee(()=>o(a.id)),disabled:R,"aria-label":t("cart.remove",{name:a.name}),title:t("cart.removeTitle"),children:e.jsx(A,{name:"trash",size:24})})]})]},a.id)})}),e.jsx("div",{className:"checkout__utils",children:e.jsx("button",{className:"link",onClick:()=>ee(I),disabled:R,children:t("cart.clearCart")})})]})]}),e.jsxs("aside",{className:"checkout__summary",children:[e.jsx("h2",{className:"checkout__summary-title",children:t("cart.purchaseSummary")}),e.jsxs("div",{className:"checkout__summary-body",children:[e.jsxs("div",{className:"checkout__total-line",children:[e.jsx("span",{className:"checkout__total-label",children:t("cart.totalItems",{count:na})}),e.jsxs("span",{className:"checkout__total-side",children:[e.jsxs("span",{className:"checkout__total-value",children:[e.jsx(K,{className:"checkout__total-ico"})," ",Me]}),Ae&&(V??0n)>0n?e.jsx("span",{className:"checkout__total-rate","data-testid":"cart-mana-rate",children:Ae}):null]})]}),Z.options.length>0||Z.manaShortfall?e.jsx(Ye,{options:Z.options,totalCents:X,shortfall:Z.manaShortfall,creditsLabel:w?t("marketCheckout.confirmPurchase"):t("cart.buyWithCredits"),busy:R||he,onPay:a=>void(w?Ke():z(a))}):e.jsx("button",{className:"checkout__cta",onClick:()=>void(w?Ke():z()),disabled:R||he,children:R?t("cart.working"):w?t("marketCheckout.confirmPurchase"):t("assetCard.buyNow")}),he?e.jsx("p",{className:"muted checkout__msg",children:t("cart.allUnavailable")}):null,n?null:e.jsx("p",{className:"muted checkout__msg",children:t("cart.signInHint")}),w?e.jsx("p",{className:"muted checkout__msg",children:t("cart.priceChanged")}):null,Ce?e.jsx("p",{className:"muted checkout__msg",children:Ce}):null,e.jsx(ct,{message:ea,className:"checkout__msg"})]})]})]})]}),Se.length>0?e.jsx("div",{className:"cart-upsell",children:e.jsx(Fa,{title:t("cart.youMightAlsoLike"),items:Se})}):null,ye&&n?e.jsx(Ta,{auth:ye.auth,signer:n.signer,title:t("authorizeStep.manaTitle"),name:t("authorizeStep.manaName"),reason:t("authorizeStep.manaReason"),icon:e.jsx("img",{src:Ea,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:a}=ye;ae(null),a()},onCancel:()=>ae(null),onClose:()=>ae(null)}):null,u?e.jsx(ot,{phase:u.phase,balanceCredits:Y,onClose:oa,stage:u.phase==="processing"?u.stage:void 0,step:u.phase==="processing"?u.step:void 0,total:u.phase==="processing"?u.total:void 0,isSelfCustody:Ma(n==null?void 0:n.providerType),options:u.phase==="choose"?ua(u).options:void 0,onPay:ha,totalCents:u.phase==="choose"?u.totalCents:void 0,totalManaWei:u.phase==="choose"?u.manaWei:void 0,totalCredits:u.phase==="choose"?xe(u.lines):void 0,lines:u.phase==="nofunds"?u.lines:void 0,shortfallCredits:u.phase==="nofunds"?u.shortfall:void 0,packs:H,selectedPack:de,onSelectPack:ke,onBuyPacks:()=>void ma(),message:u.phase==="error"?u.message:void 0,onRetry:()=>void z()}):null]})}export{It as Cart};
@@ -1,4 +1,4 @@
1
- import{V as N,W as U,X as w,Y as z,Z as o,$ as E,a0 as c,a1 as I,a2 as g,a3 as D,R}from"./index-Boi8OWdb.js";import{r as W,j as v}from"./react-B36MyIP_.js";function F(r){return N("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const K=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,S,b,$;const t=44,V=R(P||(P=l`
1
+ import{V as N,W as U,X as w,Y as z,Z as o,$ as E,a0 as c,a1 as I,a2 as g,a3 as D,R}from"./index-VchcND_n.js";import{r as W,j as v}from"./react-B36MyIP_.js";function F(r){return N("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const K=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,S,b,$;const t=44,V=R(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as e,r as p,d as O,a as Q}from"./react-B36MyIP_.js";import{K as N,n as v,ay as Y,az as E,I as Z,t,c as V,J as W,u as X,h as ee,M as ae,aA as te,b as re,aB as se}from"./index-Boi8OWdb.js";import{E as oe}from"./ErrorNotice-D_Z5OVFI.js";import{d as ie,g as ce,a as ne,A as le}from"./collection-DvprT8Ak.js";import{u as de}from"./useStore-D4BwFx3W.js";import{d as F,a as me,F as pe,e as ue,S as R,b as ge}from"./categories-CnryCWCq.js";import{L as xe}from"./LoadMore-Cbr521EF.js";import{u as he}from"./useInfiniteGrid-BsvaZzST.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";import"./emotion-CSxEP8yM.js";const be=v.section`
1
+ import{j as e,r as p,d as O,a as Q}from"./react-B36MyIP_.js";import{K as N,n as v,ay as Y,az as E,I as Z,t,c as V,J as W,u as X,h as ee,M as ae,aA as te,b as re,aB as se}from"./index-VchcND_n.js";import{E as oe}from"./ErrorNotice-D_Z5OVFI.js";import{d as ie,g as ce,a as ne,A as le}from"./collection-Cbl5FMco.js";import{u as de}from"./useStore-BEtv4alq.js";import{d as F,a as me,F as pe,e as ue,S as R,b as ge}from"./categories-Jh3tfbEa.js";import{L as xe}from"./LoadMore-K8EfO7If.js";import{u as he}from"./useInfiniteGrid-S2Upf1Ae.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";import"./emotion-CSxEP8yM.js";const be=v.section`
2
2
  position: relative;
3
3
  border-radius: ${N.radius.card};
4
4
  overflow: hidden;