@dcl/shop 0.1.0-30043940031.commit-1a0b88f → 0.1.0-30098548645.commit-d41f1c2

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 (244) hide show
  1. package/assets/Activity-BqXTjVty.js +244 -0
  2. package/assets/{AnimatedBackground-DKAviRVb.js → AnimatedBackground-B1wSbdZF.js} +3 -3
  3. package/assets/{Assets-CbIX010b.js → Assets-uNZ9-jka.js} +11 -11
  4. package/assets/{Assets.styles-C5zpZCUK.js → Assets.styles-C-xsD5dl.js} +6 -6
  5. package/assets/Authorizations-W1UUdrPD.js +175 -0
  6. package/assets/Cart-Blw7vVhV.js +3 -0
  7. package/assets/{CircularProgress-CeVjKviE.js → CircularProgress-BFfCy1Hd.js} +1 -1
  8. package/assets/{Collection-CdFvuhxV.js → Collection-DQPRvrkF.js} +2 -2
  9. package/assets/CollectionCarousel-D2Bi7Sgm.js +1 -0
  10. package/assets/{ConstantsUtil-CJUlyS7R.js → ConstantsUtil-DamObtDN.js} +1 -1
  11. package/assets/{ContentClient-DtuNqgIp.js → ContentClient-JBAwNjZ1.js} +1 -1
  12. package/assets/Creator-DPwgF8OQ.js +1 -0
  13. package/assets/{CssVarsProvider-B0QPJ9UY.js → CssVarsProvider-Cp4XcbYa.js} +3 -3
  14. package/assets/{DeploymentBuilder-Bt5zjBVh.js → DeploymentBuilder-Ch1YSyjd.js} +1 -1
  15. package/assets/{ErrorNotice-C7soUjRV.js → ErrorNotice-Cmr8aXJs.js} +1 -1
  16. package/assets/{ExchangeController-aeqEXROB.js → ExchangeController-DdMMOoWf.js} +1 -1
  17. package/assets/GetCredits-BbXMUpEL.js +1 -0
  18. package/assets/{HelpersUtil-fELrO7Xi.js → HelpersUtil-CQPNVThh.js} +1 -1
  19. package/assets/ImportListings-DvBSRPqC.js +5 -0
  20. package/assets/ItemDetail--8GO0Wno.css +1 -0
  21. package/assets/ItemDetail-CVK9Pwv2.js +1437 -0
  22. package/assets/{LoadMore-CHlPzPXC.js → LoadMore-Co82ACWq.js} +1 -1
  23. package/assets/{MarketCheckout-dyTQT0v3.js → MarketCheckout-CXF5RWuK.js} +1 -1
  24. package/assets/MyAssets-BPoXrFd-.js +258 -0
  25. package/assets/{MyFavorites-B7HUqvEe.js → MyFavorites-BLOtKEJq.js} +1 -1
  26. package/assets/{NetworkUtil-Xp0fNa8X.js → NetworkUtil-xdrSr8Td.js} +1 -1
  27. package/assets/{NotFound-DgN5Ojh9.js → NotFound-B-Y9Dm45.js} +1 -1
  28. package/assets/PrimaryListModal-cAIZGy2D.js +320 -0
  29. package/assets/{StoreSettings-Bx7T9d4h.js → StoreSettings-Bos_AZlO.js} +3 -3
  30. package/assets/{StoreSettings-Bk5IXwNu.css → StoreSettings-qz4M138c.css} +1 -1
  31. package/assets/{Success-B45Qtg3D.js → Success-DNHF9FcH.js} +1 -1
  32. package/assets/{SwapController-qtGuRSFp.js → SwapController-Bk4YDtlv.js} +1 -1
  33. package/assets/{Tooltip-BjVKL7Fw.js → Tooltip-CMiyDsYT.js} +1 -1
  34. package/assets/{TradeService-DWfELVYz.js → TradeService-B-E0tJaw.js} +1 -1
  35. package/assets/{W3MFrameProviderSingleton-BYvOktGz.js → W3MFrameProviderSingleton-B4WegxTX.js} +3 -3
  36. package/assets/{WebCryptoP256-BaA8puph.js → WebCryptoP256-CIN8LP5I.js} +1 -1
  37. package/assets/authorizations-xecfPSH8.js +1 -0
  38. package/assets/{basic-Ceg7-rw5.js → basic-DrYgU33R.js} +1 -1
  39. package/assets/{biconomy-dWuJAVG6.js → biconomy-BkGZoSRG.js} +1 -1
  40. package/assets/{browser-9oFjBwrz.js → browser-EKOgZpqm.js} +1 -1
  41. package/assets/browser-ponyfill-CjkfloA2.js +1 -0
  42. package/assets/{browser-ponyfill-DMgE6PM5.js → browser-ponyfill-sXwzu6Qj.js} +1 -1
  43. package/assets/builder-CdMpbqLu.js +1 -0
  44. package/assets/buy-DnDBBIJp.js +1 -0
  45. package/assets/{buy-gasless-C7VsNrLp.js → buy-gasless-DITQks7J.js} +1 -1
  46. package/assets/{cart-checkout-QeMYLp4l.js → cart-checkout-DldS-zcM.js} +1 -1
  47. package/assets/{categories-DDZgtl6y.js → categories-q4cmLb4w.js} +5 -5
  48. package/assets/{ccip-D1vE27l0.js → ccip-6xULYkiQ.js} +1 -1
  49. package/assets/{ccip-O9QIlP6E.js → ccip-Iagv6b6U.js} +1 -1
  50. package/assets/{chains-Bzau33xB.js → chains-Ce3mOHm7.js} +1 -1
  51. package/assets/collection-9XqBYepL.js +1 -0
  52. package/assets/{common-BaN-pXG4.js → common-D_VcNXlU.js} +1 -1
  53. package/assets/{controller-BDtPSPmx.js → controller-CGXADiD7.js} +2 -2
  54. package/assets/{core-LjTvFg1D.js → core-ClJQ0SHg.js} +4 -4
  55. package/assets/{custom-COtXL8aP.js → custom-CRZtbdh1.js} +1 -1
  56. package/assets/{data-capture-CXZOXZ6B.js → data-capture-Brtecicz.js} +1 -1
  57. package/assets/decimals-Br2WcHKo.js +1 -0
  58. package/assets/{decimals-DaU_ek4_.js → decimals-DIRnQ_Ef.js} +1 -1
  59. package/assets/{detectExtension-C2ped1rb.js → detectExtension-DBVDFtUM.js} +1 -1
  60. package/assets/{email-BS7ZREiA.js → email-Dc521KI9.js} +1 -1
  61. package/assets/{embedded-wallet-CWaQUjgL.js → embedded-wallet-qO37cv4b.js} +1 -1
  62. package/assets/{emotion-styled.browser.esm-c2FFx3DR.js → emotion-styled.browser.esm-CdNioFJM.js} +1 -1
  63. package/assets/{engine-bGCn900B.js → engine-C38d94-_.js} +1 -1
  64. package/assets/{errors-D2EYBG38.js → errors-BHedmHUe.js} +1 -1
  65. package/assets/estimate-l1-fee-BIFy_-EC.js +1 -0
  66. package/assets/eth_estimateGas-DhEvfMK1.js +1 -0
  67. package/assets/{eth_getStorageAt-CvOhghFe.js → eth_getStorageAt-C5DWgtYS.js} +1 -1
  68. package/assets/eth_getTransactionCount-CYnx77q9.js +1 -0
  69. package/assets/{ethereum-B_IIMsg0.js → ethereum-C11g7mpZ.js} +1 -1
  70. package/assets/{ethers-w5dOkonM.js → ethers-BJDbBwOP.js} +1 -1
  71. package/assets/{execute-DySDEvjB.js → execute-CxvgrSL8.js} +2 -2
  72. package/assets/{extractIPFS-mhjpSq1K.js → extractIPFS-CvNdY0iH.js} +1 -1
  73. package/assets/{features-DLc5WZYN.js → features-CLCrkR7s.js} +1 -1
  74. package/assets/{fetchTokenMetadata-C9wYmfXl.js → fetchTokenMetadata-ChVieTUE.js} +2 -2
  75. package/assets/{fortmatic-DhmlcDbL.js → fortmatic-bc1cz1bJ.js} +1 -1
  76. package/assets/{get-bytecode-D38h1G96.js → get-bytecode-B9DXJUIQ.js} +1 -1
  77. package/assets/get-ecosystem-wallet-info-zShJZuFf.js +1 -0
  78. package/assets/{getBalance-j6TTPwxJ.js → getBalance-D426yGLP.js} +2 -2
  79. package/assets/{getInstalledModules-3Q5HYxkN.js → getInstalledModules-_oxiIuvc.js} +1 -1
  80. package/assets/getNFT-DDdhWmh5.js +1 -0
  81. package/assets/{getNFT-BJKaB30S.js → getNFT-DbYpgeGV.js} +2 -2
  82. package/assets/{getOverlayAlpha-Dgr3elr3.js → getOverlayAlpha-DF26uj8z.js} +1 -1
  83. package/assets/{hashTypedData-C3LWcJNr.js → hashTypedData-DBErsqac.js} +1 -1
  84. package/assets/{hashTypedData-B3ueg2tO.js → hashTypedData-ZQ4gFkel.js} +1 -1
  85. package/assets/{import-CT__rglP.js → import-ZCCl3Kgl.js} +1 -1
  86. package/assets/{in-app-eO_XP67Y.js → in-app-CpdkUQeY.js} +1 -1
  87. package/assets/{in-app-wallet-calls-CaxSZMND.js → in-app-wallet-calls-dlczJBmg.js} +1 -1
  88. package/assets/index-B-GW8Cic.js +1 -0
  89. package/assets/{index-LLNcsqnt.js → index-BCFHpbdv.js} +1 -1
  90. package/assets/{index-D7KDT9M9.js → index-BH2TijWz.js} +1 -1
  91. package/assets/{index-CqYbCFw1.js → index-BJ8Gi1m8.js} +1 -1
  92. package/assets/{index-BfnFZQqu.js → index-BKypSXDA.js} +1 -1
  93. package/assets/{index-BNz2c_gH.js → index-BPE4c8Hm.js} +1 -1
  94. package/assets/{index-DTVGIjcC.js → index-BTEpBP4F.js} +1 -1
  95. package/assets/{index-Bt4sSx0j.js → index-BUxPYCpI.js} +1 -1
  96. package/assets/{index-Chf28tkX.js → index-BYL4Amcw.js} +1 -1
  97. package/assets/{index-BLif3fcT.js → index-Be_wjnpZ.js} +1 -1
  98. package/assets/{index-D-DOtIYj.js → index-BfgxxLyc.js} +1 -1
  99. package/assets/{index-I60bR1z0.js → index-BmClkpNO.js} +1 -1
  100. package/assets/{index-B7mff2o2.js → index-BoQpPvsJ.js} +3 -3
  101. package/assets/{index-BLHU8DgF.js → index-BpsxTpFt.js} +1 -1
  102. package/assets/{index-CoBli9XK.js → index-BqBeehVu.js} +1 -1
  103. package/assets/{index-D2Lec10t.js → index-BwP2pQ92.js} +1 -1
  104. package/assets/{index-Dp3Py-Ws.js → index-C1J0uyJU.js} +1 -1
  105. package/assets/{index-C6h_WU9m.js → index-C8X5uQxK.js} +1 -1
  106. package/assets/{index-B6KO-WXc.js → index-C8gW1uS_.js} +1 -1
  107. package/assets/{index-lVvjFIjk.js → index-CBz9QBMp.js} +1 -1
  108. package/assets/{index-BcatoSfw.js → index-CIVsEPCC.js} +1 -1
  109. package/assets/{index-BR4zrdA9.js → index-CO8EAj61.js} +2 -2
  110. package/assets/index-CUtMWqIp.css +1 -0
  111. package/assets/{index-Ck1Cgm82.js → index-C_3MXGQ5.js} +1 -1
  112. package/assets/{index-UvWrbkyR.js → index-C_96F6p3.js} +1 -1
  113. package/assets/{index-dVV4LZRn.js → index-Cf3Ptwp7.js} +1 -1
  114. package/assets/{index-FmAwtPUy.js → index-CmFvRPK_.js} +1 -1
  115. package/assets/{index-BzQBX2p-.js → index-CnNzrERF.js} +1 -1
  116. package/assets/{index-CI_Eucnr.js → index-CtyVceSL.js} +3 -3
  117. package/assets/{index-BgEzTrtV.js → index-CwuYCSTt.js} +1 -1
  118. package/assets/{index-DRB-gQiu.js → index-D0UaCvc1.js} +1 -1
  119. package/assets/{index-BLLuYu72.js → index-D9WRMnJQ.js} +1 -1
  120. package/assets/{index-D84f1SZS.js → index-DCT6sOxM.js} +1 -1
  121. package/assets/{index-CSlkMlP4.js → index-DHqnjZXk.js} +1 -1
  122. package/assets/{index-Bk6ayCIs.js → index-DL1-u2m5.js} +1 -1
  123. package/assets/{index-DQ1f3JN6.js → index-DTFks6GD.js} +1 -1
  124. package/assets/{index-BTO-tMff.js → index-DTSWcrXA.js} +1 -1
  125. package/assets/{index-BCdiIcLt.js → index-DUHukso9.js} +1 -1
  126. package/assets/{index-DPeNzqnx.js → index-DWo6WByw.js} +1 -1
  127. package/assets/{index-QTjwITlm.js → index-DXsS9lM4.js} +1 -1
  128. package/assets/{index-D4SQVwZS.js → index-DZWZ4ZjC.js} +3 -3
  129. package/assets/{index-DtCbj4Bu.js → index-DjNqY58Q.js} +1 -1
  130. package/assets/{index-ahfZZDfz.js → index-DkV39niV.js} +2 -2
  131. package/assets/{index-yeRgwVVL.js → index-Dkdo-C-7.js} +2 -2
  132. package/assets/{index-DGOaB47n.js → index-DsEcY3jS.js} +1 -1
  133. package/assets/{index-Cfbe2Qvo.js → index-DsmEu83d.js} +2 -2
  134. package/assets/{index-CPhNis9E.js → index-Dum_hwGS.js} +1 -1
  135. package/assets/{index-BgKrxOfP.js → index-Dw9WIdKs.js} +1 -1
  136. package/assets/{index-B7P0UO1e.js → index-Dz6EILW5.js} +1 -1
  137. package/assets/{index-Bi7dtaTz.js → index-FfFqAJ3l.js} +1 -1
  138. package/assets/{index-DDk8aurE.js → index-GYAvpxvp.js} +1 -1
  139. package/assets/{index-6eUPFQAl.js → index-GctTWB_u.js} +1 -1
  140. package/assets/{index-BbfDA6Q2.js → index-Ix0aAVOz.js} +1 -1
  141. package/assets/{index-DFwKLiGe.js → index-LwWUxbJ1.js} +1 -1
  142. package/assets/index-N282EqWL.js +289 -0
  143. package/assets/{index-DhuOONXr.js → index-PtVfNA02.js} +1 -1
  144. package/assets/{index-DSY1kJ-n.js → index-SeXxQE7d.js} +1 -1
  145. package/assets/{index-QMzB_9kT.js → index-cm1yskAO.js} +1 -1
  146. package/assets/{index-CLZOJwm_.js → index-dOPjS08E.js} +3 -3
  147. package/assets/{index-DnjriEQ8.js → index-dc-VQ6_u.js} +1 -1
  148. package/assets/{index-F4KCRFXO.js → index-ej1HeaVq.js} +1 -1
  149. package/assets/{index-RYFuERlG.js → index-hSbfPxTM.js} +1 -1
  150. package/assets/{index-BAbZ1oMa.js → index-oDGz3alu.js} +1 -1
  151. package/assets/{index-CoY6w5ve.js → index-uRCNAkhD.js} +1 -1
  152. package/assets/{index-DTEyrFW2.js → index-xEDt5tK0.js} +2 -2
  153. package/assets/{index.es-DcggvVah.js → index.es-8l4m8O48.js} +1 -1
  154. package/assets/{index.es-pkeG3qQo.js → index.es-BAkCd3hx.js} +4 -4
  155. package/assets/{index.es-BxDkRG0j.js → index.es-mQdmYoWw.js} +1 -1
  156. package/assets/{linkAccount-e50lqdUE.js → linkAccount-Dt1RoiMg.js} +1 -1
  157. package/assets/{localBatchGatewayRequest-B7VW_3F8.js → localBatchGatewayRequest-C-QF008k.js} +1 -1
  158. package/assets/{mana-rate-Ez6IlT0x.js → mana-rate-B5qogWAy.js} +1 -1
  159. package/assets/{native-BMBZUPnx.js → native-8psXkTNV.js} +1 -1
  160. package/assets/{networks-CuAkQzro.js → networks-DTf6JA_i.js} +1 -1
  161. package/assets/{onramp-C5uxESKn.js → onramp-C6_Jmv_4.js} +1 -1
  162. package/assets/{openzeppelin-CEEpXs6H.js → openzeppelin-BI3jzvYe.js} +1 -1
  163. package/assets/{ownerOf-dLmWQ3QZ.js → ownerOf-CGV4XkwU.js} +1 -1
  164. package/assets/{parseNft-CjnCetmp.js → parseNft-BJiElQOd.js} +2 -2
  165. package/assets/{parseSignature-CjHHoeVW.js → parseSignature-BTArmdp-.js} +1 -1
  166. package/assets/{parseSignature-Ba1mhqh5.js → parseSignature-YsYfChHW.js} +3 -3
  167. package/assets/{passkeys-DKJW-FEa.js → passkeys-ClpAr2XQ.js} +1 -1
  168. package/assets/{pay-with-exchange-yOexVTa_.js → pay-with-exchange-BrMLcJvy.js} +1 -1
  169. package/assets/{prepare-contract-call-aT1l2NVg.js → prepare-contract-call-CWZtwOpY.js} +1 -1
  170. package/assets/{qr-overlay-CurN-_cO.js → qr-overlay-DFoBAvax.js} +3 -3
  171. package/assets/{react-C51i12iP.js → react-BXazHbBy.js} +1 -1
  172. package/assets/{receive-Bvf5SspN.js → receive-2v3kqZfq.js} +1 -1
  173. package/assets/{resolveImplementation-BMaNFS8w.js → resolveImplementation-Cz7jydx-.js} +1 -1
  174. package/assets/{rpc-Bclh4OVX.js → rpc-DcYX9vLT.js} +1 -1
  175. package/assets/{secp256k1-B7PtKdKr.js → secp256k1-CRO1xSNd.js} +1 -1
  176. package/assets/{secp256k1-BznDUTmG.js → secp256k1-D0kj9oiG.js} +1 -1
  177. package/assets/{secp256k1---Cfb5Gr.js → secp256k1-Du_5cnvk.js} +1 -1
  178. package/assets/{send-BxN6VGCE.js → send-EHrmCt5p.js} +1 -1
  179. package/assets/{send-batch-transaction-BY7yHkGa.js → send-batch-transaction-DrLYa7mf.js} +1 -1
  180. package/assets/{send-eip712-transaction-RXT3aSSm.js → send-eip712-transaction-DWQC0CYI.js} +2 -2
  181. package/assets/send-gasless-transaction-DraXgpfw.js +2 -0
  182. package/assets/{send-transaction-BvCcEvFd.js → send-transaction-Di96Go1T.js} +2 -2
  183. package/assets/{sendRawTransaction-BJZ0BEjt.js → sendRawTransaction-CzOwT9zB.js} +3 -3
  184. package/assets/{sentry-DKBoGDXH.js → sentry-CLqlZ0dX.js} +1 -1
  185. package/assets/{serializeTransaction-CRJP65Ad.js → serializeTransaction-BVfMAhW_.js} +1 -1
  186. package/assets/{session-proposal-Dvj-F2wQ.js → session-proposal-DQbScMFK.js} +1 -1
  187. package/assets/{session-request-Ce-DwiYu.js → session-request-BSJWiNx1.js} +2 -2
  188. package/assets/{sha256-BcAs0Y4r.js → sha256-CHkDhyAO.js} +1 -1
  189. package/assets/{signing-BCzW8Yh4.js → signing-BTj_vr30.js} +3 -3
  190. package/assets/{socials-2qO6GWvx.js → socials-Ca0m8Bc6.js} +1 -1
  191. package/assets/{swaps-Byx37cWK.js → swaps-Bxufbu_7.js} +1 -1
  192. package/assets/{thirdweb-Bzinkygh.js → thirdweb-BSXHM0bk.js} +3 -3
  193. package/assets/{to-serializable-transaction-BPYyQKxa.js → to-serializable-transaction-BiEB81zL.js} +2 -2
  194. package/assets/{totalSupply-BCBM6uY2.js → totalSupply-D7o26vFv.js} +1 -1
  195. package/assets/{trade-encoding-Bq9nPTSy.js → trade-encoding-6_dO5FYh.js} +1 -1
  196. package/assets/{transaction-Db6pntE5.js → transaction-B7gL56RA.js} +1 -1
  197. package/assets/{transactionReceipt-7aTE2Yz3.js → transactionReceipt-WUy2-DIs.js} +1 -1
  198. package/assets/{transactions-Y7mX5hPf.js → transactions-Ddu0qS1y.js} +1 -1
  199. package/assets/{useCreditPacks-CG7L_UQ4.js → useCreditPacks-BXDDD38Z.js} +1 -1
  200. package/assets/{useInfiniteGrid-H1sfBdhy.js → useInfiniteGrid-BokrX5YA.js} +1 -1
  201. package/assets/useManaRate-CtZMBb6a.js +1 -0
  202. package/assets/{useStore-Cbt7cLyp.js → useStore-DL2tZW7o.js} +2 -2
  203. package/assets/useTheme-B-xHZMoE.js +1 -0
  204. package/assets/{useTheme-CauhIIJq.js → useTheme-Tgfl6yPv.js} +1 -1
  205. package/assets/{utils-DBnU1jhd.js → utils-CPrJV6vP.js} +1 -1
  206. package/assets/{verifyHash-BzzdH-JT.js → verifyHash-DEKVRRCg.js} +1 -1
  207. package/assets/{w3m-modal-R9G6tUSA.js → w3m-modal-BOayHahj.js} +1 -1
  208. package/assets/{w3m-modal-Uf8zuJST.js → w3m-modal-DGk65SCN.js} +1 -1
  209. package/assets/{wait-for-tx-receipt-UIT99Yyq.js → wait-for-tx-receipt-C-yyIlse.js} +1 -1
  210. package/assets/{wallets-CgBIBei6.js → wallets-CKstZZYA.js} +5 -5
  211. package/assets/{web-connector-B1ptdbTS.js → web-connector-Df1Nw4jg.js} +3 -3
  212. package/assets/{writeContract-aQQPNQN6.js → writeContract-EXXVPkwI.js} +1 -1
  213. package/assets/{zora-sepolia-Bwjy_6bk.js → zora-sepolia-DQJtwyvj.js} +1 -1
  214. package/assets/{zoraTestnet-BxMHEDAV.js → zoraTestnet-Dj9qFBkp.js} +1 -1
  215. package/index.html +11 -11
  216. package/package.json +2 -2
  217. package/assets/Activity-CnoF6F3Z.js +0 -243
  218. package/assets/Authorizations-4u2_v7qf.js +0 -163
  219. package/assets/Cart-C1woE131.js +0 -3
  220. package/assets/CollectionCarousel-BC4r8J9j.js +0 -1
  221. package/assets/Creator-Cpw9Qy_r.js +0 -1
  222. package/assets/GetCredits-BfCzeAeD.js +0 -1
  223. package/assets/ImportListings-CxJDA8Su.js +0 -5
  224. package/assets/ItemDetail-BF1WOMVU.css +0 -1
  225. package/assets/ItemDetail-D1Xe6t7i.js +0 -82
  226. package/assets/MyAssets-C_wlVXNb.js +0 -258
  227. package/assets/PrimaryListModal-vBauRE_Q.js +0 -1
  228. package/assets/address-DrURAr9O.js +0 -1
  229. package/assets/authorizations-BdVBiEr7.js +0 -1
  230. package/assets/browser-ponyfill-Djb5Py6a.js +0 -1
  231. package/assets/buy-B_TXfJF4.js +0 -1
  232. package/assets/collection-d97cPr3w.js +0 -1
  233. package/assets/decimals-HChuNAkm.js +0 -1
  234. package/assets/estimate-l1-fee-CEy_ASr7.js +0 -1
  235. package/assets/eth_estimateGas-DcV1bi0C.js +0 -1
  236. package/assets/eth_getTransactionCount-BNyI69eR.js +0 -1
  237. package/assets/get-ecosystem-wallet-info-B4KRbr6l.js +0 -1
  238. package/assets/getNFT-B7SHBqxZ.js +0 -1
  239. package/assets/index-CkvNUeW9.css +0 -1
  240. package/assets/index-DH3Yzbz3.js +0 -1
  241. package/assets/index-k1Bog_tr.js +0 -289
  242. package/assets/send-gasless-transaction-DDPuuxQ-.js +0 -2
  243. package/assets/useManaRate-BO1b19Qr.js +0 -1
  244. package/assets/useTheme-TzAV5P1-.js +0 -1
package/index.html CHANGED
@@ -16,10 +16,10 @@
16
16
  <link rel="canonical" href="https://shop.decentraland.org/" />
17
17
 
18
18
  <!-- Favicon: the Decentraland mark (same as the marketplace). -->
19
- <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/favicon.ico" sizes="16x16 32x32 48x48" />
20
- <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/apple-touch-icon.png" />
19
+ <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/favicon.ico" sizes="16x16 32x32 48x48" />
20
+ <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/apple-touch-icon.png" />
21
21
  <meta name="apple-mobile-web-app-title" content="DCL Shop" />
22
- <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/site.webmanifest" />
22
+ <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/site.webmanifest" />
23
23
 
24
24
  <!-- Open Graph -->
25
25
  <meta property="og:type" content="website" />
@@ -48,7 +48,7 @@
48
48
  <meta name="twitter:image:alt" content="Decentraland Shop — wearables and emotes for your avatar" />
49
49
 
50
50
  <!-- Sitemap -->
51
- <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/sitemap.xml" />
51
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/sitemap.xml" />
52
52
 
53
53
  <!-- Warm the 3D preview / fonts -->
54
54
  <link rel="preconnect" href="https://fonts.googleapis.com" />
@@ -60,13 +60,13 @@
60
60
  <link rel="preconnect" href="https://wearable-preview.decentraland.org" />
61
61
  <link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
62
62
  <link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
63
- <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/index-k1Bog_tr.js"></script>
64
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/react-C51i12iP.js">
65
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/dcl-schemas-BICTSpB5.js">
66
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/sentry-DKBoGDXH.js">
67
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/ethers-w5dOkonM.js">
68
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/intl-CBcMB1D2.js">
69
- <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/index-CkvNUeW9.css">
63
+ <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/assets/index-N282EqWL.js"></script>
64
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/assets/react-BXazHbBy.js">
65
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/assets/dcl-schemas-BICTSpB5.js">
66
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/assets/sentry-CLqlZ0dX.js">
67
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/assets/ethers-BJDbBwOP.js">
68
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/assets/intl-CBcMB1D2.js">
69
+ <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/assets/index-CUtMWqIp.css">
70
70
  </head>
71
71
  <body>
72
72
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/shop",
3
- "version": "0.1.0-30043940031.commit-1a0b88f",
3
+ "version": "0.1.0-30098548645.commit-d41f1c2",
4
4
  "main": "index.js",
5
5
  "author": "Decentraland",
6
6
  "license": "Apache-2.0",
@@ -8,5 +8,5 @@
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/decentraland/shop.git"
10
10
  },
11
- "commit": "1a0b88f5f4a128ebf9cfccd90759a73edd97dabc"
11
+ "commit": "d41f1c29674f1a74cf0450a85f2f92fd4e432dc6"
12
12
  }
@@ -1,243 +0,0 @@
1
- import{r as Q,j as e,L as $}from"./react-C51i12iP.js";import{s as o,F as a,N as V,B as X,m as Z,t as c,u as J,I as h,af as Y,ag as tt,C as m,o as w,ah as et,ai as it}from"./index-k1Bog_tr.js";import{a as st}from"./mana-rate-Ez6IlT0x.js";import{u as nt}from"./useManaRate-BO1b19Qr.js";import{L as at}from"./LoadMore-CHlPzPXC.js";import{u as b}from"./useInfiniteGrid-H1sfBdhy.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";const rt=15e3;function ot(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)<=rt}function ct(t){const i=[...t].sort((s,n)=>n.createdAt-s.createdAt),d=[];for(const s of i){const n=d[d.length-1];n&&ot(n[n.length-1],s)?n.push(s):d.push([s])}return d.map(s=>{var n;return{id:((n=s.find(r=>r.txHash))==null?void 0:n.txHash)??s[s.length-1].id,createdAt:Math.max(...s.map(r=>r.createdAt)),status:s.some(r=>r.status==="PENDING")?"PENDING":"SETTLED",totalCredits:s.reduce((r,u)=>r+u.credits,0),lines:s}})}function dt(t){const i=[],d=new Map;for(const s of t)if(s.tradeId){const n=d.get(s.tradeId);if(n){n.quantity+=1,n.credits+=s.credits;continue}const r={key:s.tradeId,tradeId:s.tradeId,quantity:1,credits:s.credits};d.set(s.tradeId,r),i.push(r)}else i.push({key:s.id,tradeId:null,quantity:1,credits:s.credits});return i}function lt(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?st(t.manaWei,i):null,createdAt:t.createdAt}}function ut(t){const d=ct(t.purchases.filter(n=>n.status!=="EXPIRED")).map(n=>({kind:"purchase",id:`purchase:${n.id}`,createdAt:n.createdAt,order:n})),s=t.sales.map(n=>{const r=lt(n,t.rate);return{kind:"sale",id:`sale:${r.id}`,createdAt:r.createdAt,sale:r}});return[...d,...s].sort((n,r)=>r.createdAt-n.createdAt||(n.id<r.id?-1:1))}function pt(t,i){if(i==="all")return t;const d=i==="purchases"?"purchase":"sale";return t.filter(s=>s.kind===d)}const g=V`
2
- 0% { background-position: 200% 0; }
3
- 100% { background-position: -200% 0; }
4
- `,xt=o.section`
5
- width: 100%;
6
- min-width: 0;
7
- `,ht=o.div`
8
- display: flex;
9
- align-items: baseline;
10
- gap: 12px;
11
- margin-bottom: 20px;
12
- `,mt=o.h1`
13
- font-family: ${a.font.sans};
14
- margin: 0;
15
- `;o.span`
16
- color: ${a.colors.muted};
17
- font-size: 14px;
18
- `;const gt=o.div`
19
- display: flex;
20
- gap: 8px;
21
- margin-bottom: 20px;
22
- flex-wrap: wrap;
23
- `,ft=o.button`
24
- appearance: none;
25
- border: 1px solid ${a.colors.line};
26
- background: ${a.colors.white};
27
- color: ${a.colors.text};
28
- font-family: ${a.font.sans};
29
- font-size: 14px;
30
- font-weight: 600;
31
- padding: 8px 16px;
32
- min-height: 40px;
33
- border-radius: ${a.radius.pill};
34
- cursor: pointer;
35
- transition:
36
- background 0.15s,
37
- border-color 0.15s,
38
- color 0.15s;
39
-
40
- &:hover {
41
- background: ${a.colors.media};
42
- }
43
- &:focus-visible {
44
- outline: 2px solid ${a.colors.accent};
45
- outline-offset: 2px;
46
- }
47
- &[data-active='true'] {
48
- background: ${a.colors.accent};
49
- border-color: ${a.colors.accent};
50
- color: ${a.colors.white};
51
- }
52
- `,j=o.div`
53
- display: flex;
54
- flex-direction: column;
55
- gap: 16px;
56
- max-width: 760px;
57
- `,I=o.div`
58
- background: ${a.colors.white};
59
- border: 1px solid ${a.colors.line};
60
- border-radius: 16px;
61
- overflow: hidden;
62
- `,A=o.div`
63
- display: flex;
64
- align-items: center;
65
- justify-content: space-between;
66
- gap: 12px;
67
- padding: 14px 18px;
68
- background: ${a.colors.softWhite};
69
- border-bottom: 1px solid ${a.colors.line};
70
-
71
- ${a.media.down("mobile")} {
72
- flex-wrap: wrap;
73
- }
74
- `,L=o.div`
75
- display: flex;
76
- flex-direction: column;
77
- gap: 2px;
78
- min-width: 0;
79
- `,N=o.span`
80
- font-weight: 700;
81
- color: ${a.colors.text};
82
- `,P=o.span`
83
- font-size: 13px;
84
- color: ${a.colors.muted};
85
- `,E=o.div`
86
- display: flex;
87
- align-items: center;
88
- gap: 14px;
89
- `,T=o.span`
90
- font-size: 11px;
91
- font-weight: 700;
92
- text-transform: uppercase;
93
- letter-spacing: 0.03em;
94
- padding: 4px 10px;
95
- border-radius: ${a.radius.pill};
96
- white-space: nowrap;
97
-
98
- &[data-status='SETTLED'] {
99
- background: rgba(30, 166, 114, 0.14);
100
- color: ${a.colors.okStrong};
101
- }
102
- &[data-status='PENDING'] {
103
- background: rgba(245, 166, 35, 0.16);
104
- color: #b5790a;
105
- }
106
- &[data-status='SOLD'] {
107
- background: rgba(103, 58, 183, 0.14);
108
- color: ${a.colors.accent};
109
- }
110
- `,S=o.div`
111
- display: flex;
112
- align-items: center;
113
- gap: 5px;
114
- font-weight: 800;
115
- color: ${a.colors.text};
116
- white-space: nowrap;
117
-
118
- .ccy-mark {
119
- width: 16px;
120
- height: 16px;
121
- }
122
-
123
- // Money received (a sale) reads as income in the shop's success green.
124
- &[data-kind='income'] {
125
- color: ${a.colors.okStrong};
126
- }
127
- `,C=o.div`
128
- display: flex;
129
- flex-direction: column;
130
- `,f=o.div`
131
- display: grid;
132
- grid-template-columns: 52px 1fr auto;
133
- align-items: center;
134
- gap: 14px;
135
- padding: 12px 18px;
136
- text-decoration: none;
137
- color: inherit;
138
-
139
- & + & {
140
- border-top: 1px solid ${a.colors.line};
141
- }
142
-
143
- &[data-link='true'] {
144
- transition: background 0.15s;
145
- }
146
- &[data-link='true']:hover {
147
- background: ${a.colors.media};
148
- }
149
- &[data-link='true']:focus-visible {
150
- outline: 2px solid ${a.colors.accent};
151
- outline-offset: -2px;
152
- }
153
- `,D=o.div`
154
- width: 52px;
155
- height: 52px;
156
- border-radius: 10px;
157
- background: ${a.colors.media};
158
- overflow: hidden;
159
- display: flex;
160
- align-items: center;
161
- justify-content: center;
162
- color: ${a.colors.muted2};
163
-
164
- img {
165
- width: 100%;
166
- height: 100%;
167
- object-fit: contain;
168
- }
169
- `,F=o.div`
170
- width: 52px;
171
- height: 52px;
172
- border-radius: 10px;
173
- background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
174
- background-size: 200% 100%;
175
- animation: ${g} 1.3s infinite linear;
176
-
177
- @media (prefers-reduced-motion: reduce) {
178
- animation: none;
179
- }
180
- `,z=o.div`
181
- min-width: 0;
182
- display: flex;
183
- flex-direction: column;
184
- gap: 2px;
185
- `,H=o.span`
186
- font-weight: 700;
187
- white-space: nowrap;
188
- overflow: hidden;
189
- text-overflow: ellipsis;
190
- `,q=o.span`
191
- display: inline-block;
192
- width: 140px;
193
- max-width: 60%;
194
- height: 12px;
195
- border-radius: 6px;
196
- background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
197
- background-size: 200% 100%;
198
- animation: ${g} 1.3s infinite linear;
199
-
200
- @media (prefers-reduced-motion: reduce) {
201
- animation: none;
202
- }
203
- `,M=o.span`
204
- font-size: 13px;
205
- color: ${a.colors.muted};
206
- `,yt=o.div`
207
- display: flex;
208
- align-items: center;
209
- gap: 4px;
210
- font-weight: 700;
211
- color: ${a.colors.text};
212
- white-space: nowrap;
213
-
214
- .ccy-mark {
215
- width: 14px;
216
- height: 14px;
217
- }
218
- `,v=o.div`
219
- height: 132px;
220
- border-radius: 16px;
221
- border: 1px solid transparent;
222
- background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
223
- background-size: 200% 100%;
224
- animation: ${g} 1.3s infinite linear;
225
-
226
- @media (prefers-reduced-motion: reduce) {
227
- animation: none;
228
- }
229
- `,O=o.div`
230
- display: flex;
231
- flex-direction: column;
232
- align-items: center;
233
- gap: 8px;
234
- text-align: center;
235
- padding: 90px 20px;
236
- min-height: 50vh;
237
- `,G=o.p`
238
- font-size: 22px;
239
- font-weight: 700;
240
- margin: 6px 0 0;
241
- `,bt=o(X)`
242
- margin-top: 12px;
243
- `,B=f.withComponent($),k=24,jt=["all","purchases","sales"];function R(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function vt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function kt({item:t}){const{data:i,isLoading:d}=w({queryKey:["trade-display",t.tradeId],queryFn:()=>et(t.tradeId),enabled:!!t.tradeId,staleTime:3e5}),s=!!t.tradeId&&d,n=(i==null?void 0:i.name)??c("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",u=(i==null?void 0:i.tokenId)??(i==null?void 0:i.itemId)??"",p=i!=null&&i.contractAddress&&u?`/item/${i.contractAddress}/${u}`:void 0,x=e.jsxs(e.Fragment,{children:[s?e.jsx(F,{}):e.jsx(D,{children:r?e.jsx("img",{src:r,alt:n}):e.jsx(h,{name:"cart",size:20})}),e.jsxs(z,{children:[s?e.jsx(q,{}):e.jsx(H,{title:n,children:n}),t.quantity>1?e.jsx(M,{children:c("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(yt,{children:[e.jsx(m,{className:"ccy-mark"})," ",t.credits]})]});return p?e.jsx(B,{to:p,"data-link":"true",children:x}):e.jsx(f,{children:x})}function $t({order:t}){const i=dt(t.lines),d=i.reduce((s,n)=>s+n.quantity,0);return e.jsxs(I,{"data-testid":"purchase-order",children:[e.jsxs(A,{children:[e.jsxs(L,{children:[e.jsx(N,{children:R(t.createdAt)}),e.jsxs(P,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:d})]})]}),e.jsxs(E,{children:[e.jsx(T,{"data-status":t.status,children:t.status==="PENDING"?c("activity.processing"):c("activity.completed")}),e.jsxs(S,{children:[e.jsx(m,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(C,{children:i.map(s=>e.jsx(kt,{item:s},s.key))})]})}function wt({sale:t}){const{data:i,isLoading:d}=w({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>it(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),s=(i==null?void 0:i.name)??c("activity.itemFallback"),n=(i==null?void 0:i.thumbnail)??"",r=t.tokenId||t.itemId||"",u=t.contractAddress&&r?`/item/${t.contractAddress}/${r}`:void 0,p=e.jsxs(e.Fragment,{children:[d?e.jsx(F,{}):e.jsx(D,{children:n?e.jsx("img",{src:n,alt:s}):e.jsx(h,{name:"offer",size:20})}),e.jsxs(z,{children:[d?e.jsx(q,{}):e.jsx(H,{title:s,children:s}),e.jsx(M,{children:c("activity.soldTo",{account:vt(t.counterparty)})})]})]});return e.jsxs(I,{"data-testid":"activity-sale",children:[e.jsxs(A,{children:[e.jsxs(L,{children:[e.jsx(N,{children:R(t.createdAt)}),e.jsx(P,{children:c("activity.saleLabel")})]}),e.jsxs(E,{children:[e.jsx(T,{"data-status":"SOLD",children:c("activity.sold")}),t.credits!=null?e.jsxs(S,{"data-kind":"income",title:c("activity.approxValue"),children:["+",e.jsx(m,{className:"ccy-mark"})," ",t.credits]}):null]})]}),e.jsx(C,{children:u?e.jsx(B,{to:u,"data-link":"true",children:p}):e.jsx(f,{children:p})})]})}function It({filter:t}){const i={all:{icon:"clock",title:c("activity.emptyAllTitle"),body:c("activity.emptyAllBody")},purchases:{icon:"cart",title:c("activity.emptyPurchasesTitle"),body:c("activity.emptyPurchasesBody")},sales:{icon:"offer",title:c("activity.emptySalesTitle"),body:c("activity.emptySalesBody")}}[t];return e.jsxs(O,{children:[e.jsx(h,{name:i.icon,size:40,color:"var(--muted-2)"}),e.jsx(G,{children:i.title}),e.jsx("p",{className:"muted",children:i.body}),t!=="sales"?e.jsx(bt,{as:$,to:"/assets",variant:"purple",children:c("notFound.cta")}):null]})}function Ht(){Z({title:c("nav.activity"),noindex:!0});const{session:t}=J(),[i,d]=Q.useState("all"),s=!!t&&i!=="sales",n=!!t&&i!=="purchases",r=b(["purchases",t==null?void 0:t.address],l=>tt(t.address,t.identity,{first:k,skip:l}),{enabled:s}),u=b(["sales",t==null?void 0:t.address],l=>Y(t.address,{role:"seller",first:k,skip:l}),{enabled:n}),{data:p}=nt(n);if(!t)return e.jsxs(O,{children:[e.jsx(h,{name:"clock",size:40,color:"var(--muted-2)"}),e.jsx(G,{children:c("activity.signInTitle")}),e.jsx("p",{className:"muted",children:c("activity.signInBody")})]});const x=pt(ut({purchases:s?r.items:[],sales:n?u.items:[],rate:p}),i),W=s&&r.isLoading||n&&u.isLoading,y=s&&r.isFetchingNextPage||n&&u.isFetchingNextPage,_=s&&r.hasNextPage||n&&u.hasNextPage;function U(){s&&r.hasNextPage&&r.fetchNextPage(),n&&u.hasNextPage&&u.fetchNextPage()}return e.jsxs(xt,{children:[e.jsx(ht,{children:e.jsx(mt,{children:c("nav.activity")})}),e.jsx(gt,{role:"tablist","aria-label":c("nav.activity"),children:jt.map(l=>e.jsx(ft,{type:"button",role:"tab","aria-selected":i===l,"data-active":i===l,"data-testid":`activity-filter-${l}`,onClick:()=>d(l),children:c(`activity.filter.${l}`)},l))}),W?e.jsx(j,{children:Array.from({length:3}).map((l,K)=>e.jsx(v,{},K))}):x.length===0?e.jsx(It,{filter:i}):e.jsxs(e.Fragment,{children:[e.jsxs(j,{children:[x.map(l=>l.kind==="purchase"?e.jsx($t,{order:l.order},l.id):e.jsx(wt,{sale:l.sale},l.id)),y?e.jsx(v,{}):null]}),e.jsx(at,{hasNextPage:_,isFetching:y,onLoadMore:U})]})]})}export{Ht as Activity};
@@ -1,163 +0,0 @@
1
- import{j as t,L,r as N}from"./react-C51i12iP.js";import{s,B as q,F as e,N as B,m as D,t as i,u as F,v as G,I as m,C as H,o as I,b as Q,p as K,J as z,E as M,H as j}from"./index-k1Bog_tr.js";import{b as W,c as J,s as O,d as P}from"./authorizations-BdVBiEr7.js";import{f as X}from"./errors-D2EYBG38.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";import"./sendMetaTransaction-CiO3jI6F.js";const U=B`
2
- to { transform: rotate(360deg); }
3
- `,V=s.section`
4
- width: 100%;
5
- min-width: 0;
6
- max-width: 760px;
7
- `,Y=s.div`
8
- display: flex;
9
- flex-direction: column;
10
- gap: 6px;
11
- margin-bottom: 24px;
12
- `,Z=s.h1`
13
- font-family: ${e.font.sans};
14
- margin: 0;
15
- `,_=s.p`
16
- color: ${e.colors.muted};
17
- font-size: 14px;
18
- margin: 0;
19
- max-width: 60ch;
20
- `,w=s.div`
21
- margin-bottom: 28px;
22
- `,b=s.h2`
23
- font-family: ${e.font.sans};
24
- font-size: 15px;
25
- font-weight: 700;
26
- color: ${e.colors.text};
27
- margin: 0 0 10px;
28
- `,v=s.div`
29
- display: flex;
30
- flex-direction: column;
31
- gap: 12px;
32
- `,tt=s.div`
33
- display: grid;
34
- grid-template-columns: 44px 1fr auto;
35
- align-items: center;
36
- gap: 14px;
37
- padding: 14px 18px;
38
- background: ${e.colors.white};
39
- border: 1px solid ${e.colors.line};
40
- border-radius: 16px;
41
-
42
- ${e.media.down("mobile")} {
43
- grid-template-columns: 44px 1fr;
44
- grid-row-gap: 10px;
45
- }
46
- `,it=s.div`
47
- width: 44px;
48
- height: 44px;
49
- border-radius: 10px;
50
- background: ${e.colors.media};
51
- overflow: hidden;
52
- display: flex;
53
- align-items: center;
54
- justify-content: center;
55
- color: ${e.colors.muted2};
56
-
57
- img {
58
- width: 100%;
59
- height: 100%;
60
- object-fit: contain;
61
- }
62
- `,ot=s.div`
63
- min-width: 0;
64
- display: flex;
65
- flex-direction: column;
66
- gap: 3px;
67
- `,et=s.span`
68
- font-weight: 700;
69
- color: ${e.colors.text};
70
- white-space: nowrap;
71
- overflow: hidden;
72
- text-overflow: ellipsis;
73
- `,st=s.span`
74
- font-size: 13px;
75
- color: ${e.colors.muted};
76
- `,at=s.span`
77
- font-size: 12px;
78
- font-weight: 700;
79
- color: ${e.colors.muted2};
80
-
81
- &[data-active='true'] {
82
- color: ${e.colors.okStrong};
83
- }
84
- `,nt=s.div`
85
- display: flex;
86
- align-items: center;
87
- gap: 10px;
88
- justify-self: end;
89
-
90
- ${e.media.down("mobile")} {
91
- grid-column: 1 / -1;
92
- justify-self: start;
93
- }
94
- `,rt=s.button`
95
- position: relative;
96
- width: 46px;
97
- height: 26px;
98
- flex: 0 0 auto;
99
- border-radius: ${e.radius.pill};
100
- border: none;
101
- background: ${e.colors.gray4};
102
- cursor: pointer;
103
- transition: background 0.15s;
104
- padding: 0;
105
-
106
- &::after {
107
- content: '';
108
- position: absolute;
109
- top: 3px;
110
- left: 3px;
111
- width: 20px;
112
- height: 20px;
113
- border-radius: 50%;
114
- background: ${e.colors.white};
115
- transition: transform 0.15s;
116
- }
117
-
118
- &[data-active='true'] {
119
- background: ${e.colors.accent};
120
- }
121
- &[data-active='true']::after {
122
- transform: translateX(20px);
123
- }
124
-
125
- &:disabled {
126
- cursor: default;
127
- opacity: 0.6;
128
- }
129
-
130
- &:focus-visible {
131
- outline: 2px solid ${e.colors.accent};
132
- outline-offset: 2px;
133
- }
134
- `,ct=s.span`
135
- width: 16px;
136
- height: 16px;
137
- border-radius: 50%;
138
- border: 2px solid ${e.colors.gray4};
139
- border-top-color: ${e.colors.accent};
140
- animation: ${U} 0.7s linear infinite;
141
-
142
- @media (prefers-reduced-motion: reduce) {
143
- animation: none;
144
- }
145
- `,$=s.p`
146
- color: ${e.colors.muted};
147
- font-size: 14px;
148
- margin: 0;
149
- `,k=s.div`
150
- display: flex;
151
- flex-direction: column;
152
- align-items: center;
153
- gap: 8px;
154
- text-align: center;
155
- padding: 90px 20px;
156
- min-height: 50vh;
157
- `,C=s.p`
158
- font-size: 22px;
159
- font-weight: 700;
160
- margin: 6px 0 0;
161
- `,A=s(q)`
162
- margin-top: 12px;
163
- `;function T({descriptor:o,owner:r,signer:d,name:a,description:n,image:c,icon:h}){const u=Q(),[g,f]=N.useState(!1),{data:l,isLoading:x,refetch:E}=I({queryKey:["authorization",o.id,r],queryFn:()=>P(o,r),staleTime:3e4});async function S(){if(g||x)return;const p=!l;f(!0);try{await O({auth:o,signer:d,active:p}),await E(),u.setQueryData(["authorization",o.id,r],p),z.success(p?i("authorizations.toastActivated",{name:a}):i("authorizations.toastDeactivated",{name:a}))}catch(y){M(y,{flow:"authorizations",step:p?"grant":"revoke"}),z.error(X(y,i("authorizations.errorGeneric")))}finally{f(!1)}}const R=x?i("authorizations.checking"):l?i("authorizations.active"):i("authorizations.inactive");return t.jsxs(tt,{"data-testid":`authorization-${o.id}`,"data-active":!!l,children:[t.jsx(it,{children:c?t.jsx("img",{src:c,alt:""}):h}),t.jsxs(ot,{children:[t.jsx(et,{title:a,children:a}),t.jsx(st,{children:n})]}),t.jsxs(nt,{children:[t.jsx(at,{"data-active":!!l,children:R}),g?t.jsx(ct,{"aria-label":i("authorizations.working")}):t.jsx(rt,{type:"button","data-testid":`authorization-toggle-${o.id}`,"data-active":!!l,role:"switch","aria-checked":!!l,"aria-label":l?i("authorizations.deactivateAria",{name:a}):i("authorizations.activateAria",{name:a}),disabled:x,onClick:()=>void S()})]})]})}function lt(o){return I({queryKey:["owned-collections",o],enabled:!!o,staleTime:6e4,queryFn:async()=>{const[r,d]=await Promise.all([j(o,{category:"wearable",first:96}),j(o,{category:"emote",first:96})]),a=new Map;for(const n of[...r.assets,...d.assets]){const c=n.contractAddress.toLowerCase();a.has(c)||a.set(c,n)}return[...a.values()]}})}function jt(){D({title:i("authorizations.title"),noindex:!0});const{session:o,signIn:r}=F(),d=K.chainId,a=G(o==null?void 0:o.providerType),{data:n,isLoading:c}=lt(a?o==null?void 0:o.address:void 0);if(!o)return t.jsxs(k,{children:[t.jsx(m,{name:"info",size:40,color:"var(--muted-2)"}),t.jsx(C,{children:i("authorizations.signInTitle")}),t.jsx("p",{className:"muted",children:i("authorizations.signInBody")}),t.jsx(A,{variant:"purple",onClick:()=>r(),children:i("storeSettings.signIn")})]});if(!a)return t.jsxs(k,{children:[t.jsx(m,{name:"check",size:40,color:"var(--ok)"}),t.jsx(C,{children:i("authorizations.managedTitle")}),t.jsx("p",{className:"muted",children:i("authorizations.managedBody")}),t.jsx(A,{as:L,to:"/assets",variant:"purple",children:i("authorizations.managedCta")})]});const h=W(d);return t.jsxs(V,{children:[t.jsxs(Y,{children:[t.jsx(Z,{children:i("authorizations.title")}),t.jsx(_,{children:i("authorizations.intro")})]}),t.jsxs(w,{children:[t.jsx(b,{children:i("authorizations.buyingTitle")}),t.jsx(v,{children:t.jsx(T,{descriptor:h,owner:o.address,signer:o.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:t.jsx(H,{className:"ccy-mark"})})})]}),t.jsxs(w,{children:[t.jsx(b,{children:i("authorizations.sellingTitle")}),c?t.jsx($,{children:i("authorizations.checking")}):n&&n.length>0?t.jsx(v,{children:n.map(u=>t.jsx(T,{descriptor:J(u.contractAddress,d),owner:o.address,signer:o.signer,name:u.name||i("authorizations.collectionFallback"),description:i("authorizations.sellingDesc"),image:u.image,icon:t.jsx(m,{name:"pen",size:18})},u.contractAddress))}):t.jsx($,{children:i("authorizations.sellingEmpty")})]})]})}export{jt as Authorizations};
@@ -1,3 +0,0 @@
1
- import{j as e,r as h,u as Qe,a as Ue,L as re}from"./react-C51i12iP.js";import{t as a,C as F,x as Y,m as We,ad as C,n as pe,u as $e,o as ze,a as Oe,b as Ge,aj as He,I as T,w as De,v as Je,ak as ge,j as J,al as ve,am as Ve,E as U,s as Ye,B as Xe,e as Ze,h as es,c as fe,an as ss,l as xe,k as as,ao as ts}from"./index-k1Bog_tr.js";import{W as rs,C as cs,t as ns,a as is,s as ke}from"./CollectionCarousel-BC4r8J9j.js";import{a as je}from"./buy-B_TXfJF4.js";import{a as ls,w as os,S as ds,G as us}from"./buy-gasless-C7VsNrLp.js";import{R as V,r as hs}from"./cart-checkout-QeMYLp4l.js";import{g as ms}from"./authorizations-BdVBiEr7.js";import{u as _s,M as ys,c as bs}from"./useCreditPacks-CG7L_UQ4.js";import{l as ps}from"./loader-logo-BzY9EKdC.js";import{i as gs,a as vs}from"./errors-D2EYBG38.js";import{E as fs}from"./ErrorNotice-C7soUjRV.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./address-DrURAr9O.js";import"./trade-encoding-Bq9nPTSy.js";import"./index-HN6Rk25C.js";import"./sendMetaTransaction-CiO3jI6F.js";const xs="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/buy-error-22UunaPC.png";function ks(r){const{phase:n,balanceCredits:u,onClose:y}=r,w=n==="processing",M=n==="error"?a("cartCheckout.errorTitle"):n==="nofunds"?a("cartCheckout.titleNoFunds"):a("cartCheckout.titleBuy"),q=n==="processing";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:w?void 0:y,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${q?" 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:M}),!w&&e.jsx("button",{className:"buy-modal__x",onClick:y,"aria-label":a("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:n==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(F,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:Y(u)})]})]}),n==="processing"&&e.jsx(js,{stage:r.stage??"reserving",step:r.step??1,total:r.total??1,isSelfCustody:!!r.isSelfCustody}),n==="nofunds"&&e.jsx(Ns,{lines:r.lines??[],shortfallCredits:r.shortfallCredits??0,packs:r.packs??[],selectedPack:r.selectedPack??"",onSelectPack:r.onSelectPack??(()=>{}),onBuyPacks:r.onBuyPacks??(()=>{}),onCancel:y}),n==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-error",children:[e.jsx("img",{className:"buy-error__art",src:xs,alt:"",width:64,height:80}),e.jsxs("p",{className:"buy-error__text",children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",a("cartCheckout.errorBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:y,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--purple",onClick:r.onRetry??y,children:a("cartCheckout.tryAgain")})]})]})]})]})}function js({stage:r,step:n,total:u,isSelfCustody:y}){const w=r==="reserving",M=u>0?Math.min(100,Math.round(n/u*100)):0,q=r==="awaiting-signature"?y?a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):r==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:ps,alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:q}),w?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:`${M}%`}})}),u>1?e.jsxs("span",{className:"cart-checkout__step",children:[n,"/",u]}):null]}):e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]})}function Ns({lines:r,shortfallCredits:n,packs:u,selectedPack:y,onSelectPack:w,onBuyPacks:M,onCancel:q}){const S=u.find(t=>t.id===y),X=r.reduce((t,f)=>t+(f.quantity??1),0);return e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsx(rs,{className:"buy-modal__warning-ico"}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,n)})})," ",a("buyModal.warningToPurchase",{count:X})]})]}),e.jsx("div",{className:"cart-checkout__scroll",children:r.map(t=>{const f=t.quantity??1;return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:t.item.thumbnail?e.jsx("img",{src:t.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:t.item.name,children:[t.item.name||a("buyModal.itemFallback"),f>1?e.jsx("span",{className:"cart-checkout__qty-tag",children:a("cartCheckout.qty",{count:f})}):null]}),t.item.creator?e.jsx(cs,{address:t.item.creator,className:"buy-modal__asset-creator"}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(F,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:Y(t.priceCredits*f)})]})]})]},t.item.id)})}),e.jsx("div",{className:"buy-modal__packs",children:u.map(t=>{const f=t.id===y;return e.jsxs("button",{className:`buy-modal__pack${f?" buy-modal__pack--on":""}`,onClick:()=>w(t.id),children:[e.jsx(F,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:Y(t.credits)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",t.usd.toFixed(2),")"]})]},t.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(F,{className:"buy-modal__total-ico"}),e.jsx("span",{children:Y((S==null?void 0:S.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",((S==null?void 0:S.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:q,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:M,children:a("buyModal.buy")})]})]})}const Cs=Ye(Xe)`
2
- margin-top: 12px;
3
- `;function Ne(r){if(gs(r))return a("errors.rejected");const n=(r.message??"").toLowerCase();return n.includes("insufficient")?a("cart.error.insufficient",{currency:Ze.name}):n.includes("no active listing")||n.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const ws=12e4;function Ss(r){const n=[];return r.unavailable.length&&n.push(a("cart.drop.unavailable",{count:r.unavailable.length})),r.own.length&&n.push(a("cart.drop.own",{count:r.own.length})),a("cart.drop.removed",{items:n.join(` ${a("cart.drop.and")} `)})}const Ce=r=>r.reduce((n,u)=>n+u.priceCredits*u.quantity,0),Ms=r=>r.flatMap(n=>Array.from({length:n.quantity},()=>({...n,quantity:1})));function Ds(){We({title:a("nav.cart"),noindex:!0});const r=C(s=>s.items),n=C(s=>s.remove),u=C(s=>s.increment),y=C(s=>s.decrement),w=C(s=>s.clear),M=C(s=>s.restore),q=C(s=>s.setFittingOpen),S=pe(s=>s.items),X=pe(s=>s.toggle),{session:t,signIn:f}=$e(),W=_s().packs.slice(0,ys);h.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const we=r.some(s=>s.category!=="emote"),{data:Z}=ze({queryKey:["upsell-listings"],queryFn:()=>ts({first:40}),staleTime:6e4}),{data:B}=Oe(t),m=Ge(),$=Qe(),{state:E}=Ue(),[ce,A]=h.useState(null),[Se,L]=h.useState(null),[ne,z]=h.useState(null),[Me,I]=h.useState(!1),[x,K]=h.useState(null),ie=h.useRef(0),[o,k]=h.useState(null),[ee,le]=h.useState(""),se=h.useRef(null),oe=He(r),de=s=>ge(oe[s.id]),ae=r.filter(de),ue=r.length>0&&ae.length===0,qe=ae.reduce((s,c)=>s+c.priceCredits*c.quantity,0),Ee=r.reduce((s,c)=>s+c.quantity,0),Ie=ae.reduce((s,c)=>s+c.quantity,0),Pe=x?x.liveTotalCredits:qe,Re=new Set(r.map(s=>s.id)),he=((Z==null?void 0:Z.items)??[]).filter(s=>!Re.has(s.id)).slice(0,12),Te=new Map(x==null?void 0:x.buyable.map(s=>[s.item.id,s])),O=(B==null?void 0:B.credits)??0,Fe=Ve;function G(s){s(),K(null),z(null),L(null)}function Be(){k(null),I(!1)}function me(s){const c=Ce(s),i=Math.max(0,c-O),p=W.find(d=>d.credits>=i)??W[W.length-1];le(p.id),J("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:c,credits_balance:O,shortfall:i}),k({phase:"nofunds",lines:s.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:i}),I(!1)}async function Ae(s){if(!t||s.length===0)return;const c=Ms(s),i=c.map(l=>({...l.item,priceCredits:l.priceCredits})),p=s.map(l=>({...l.item,priceCredits:l.priceCredits,quantity:l.quantity})),d=[];let j="authorize",H=!1;k({phase:"processing",stage:"reserving",step:1,total:c.length});try{const l=[];for(let _=0;_<c.length;_++){const N=c[_];k({phase:"processing",stage:"reserving",step:_+1,total:c.length});try{const{credit:b,maxCreditedValue:te}=await es(t.identity,N.usdCents,N.trade.id);d.push(b.id),l.push({trade:N.trade,credits:[b],maxCreditedValue:te})}catch(b){if(vs(b)){if(d.length){try{await fe(t.identity,d)}catch(te){U(te,{flow:"cart_checkout",step:"release"})}m.invalidateQueries({queryKey:["usd-balance"]})}me(s);return}throw b}}j="submit";const g=()=>k({phase:"processing",stage:"settling",step:c.length,total:c.length});k({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});let v=[];if(ms())try{v=await ls({purchases:l,buyer:t.address,signer:t.signer,onSigned:g});const N=(await Promise.allSettled(v.map(b=>os(b)))).flatMap(b=>b.status==="rejected"?[b.reason]:[]);if(N.length&&!N.some(b=>b instanceof ds))throw N[0];H=!0}catch(_){if(!(_ instanceof us))throw _;v=await je({purchases:l,buyer:t.address,signer:t.signer,onSigned:g})}else v=await je({purchases:l,buyer:t.address,signer:t.signer});s.forEach(_=>n(_.item.id)),K(null),J("Shop Completed Purchase",{...ss(i),payment_type:"credits",no_crypto_step:H,transaction_hash:v[0]??null}),m.invalidateQueries({queryKey:["usd-balance"]}),m.invalidateQueries({queryKey:["detail-trade"]}),m.invalidateQueries({queryKey:["shop-item"]}),m.invalidateQueries({queryKey:["owned-token"]}),m.invalidateQueries({queryKey:["public-token"]}),m.invalidateQueries({queryKey:["item-resales"]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["purchases"]});const R=se.current;se.current=null,k(null),I(!1);const D={items:p,txHash:v[0]??void 0,settled:!0,...R?{creditsAdded:R}:{}};$("/success",{state:D,replace:!0})}catch(l){if(xe(l)||U(l,{flow:"cart_checkout",step:j,cart_size:s.length}),J(xe(l)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:j,error_code:as(l),value_usd:ve(i.reduce((g,v)=>g+v.priceCredits,0)),cart_size:c.length}),d.length){try{await fe(t.identity,d)}catch(g){U(g,{flow:"cart_checkout",step:"release"})}m.invalidateQueries({queryKey:["usd-balance"]})}k({phase:"error",message:Ne(l)})}}function _e(s){const c=Ce(s);if(B!=null&&B.credits<c){me(s);return}Ae(s)}async function Q(){if(!t){ke({type:"cart-checkout"}),f();return}const s=C.getState().items.filter(de);if(s.length===0)return;L(null),z(null),I(!0);const c=s.reduce((i,p)=>i+p.priceCredits*p.quantity,0);J("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:ve(c),has_sufficient_credits:O>=c});try{A(a("cart.status.reviewing"));const i=await hs(s,t.address,Fe),p=[...i.unavailable,...i.own];if(p.length&&(p.forEach(d=>n(d.id)),z(Ss(i))),i.buyable.length===0){L(a("cart.error.noneAvailable")),K(null),A(null);return}if(i.orderChanged){K(i),ie.current=Date.now(),A(null);return}A(null),_e(i.buyable)}catch(i){U(i,{flow:"cart_checkout",step:"review",cart_size:s.length}),L(Ne(i)),A(null)}finally{I(!1)}}async function Le(){if(x){if(!t){ke({type:"cart-checkout"}),f();return}if(Date.now()-ie.current>ws){K(null),z(null),await Q();return}L(null),_e(x.buyable)}}async function Ke(){if(ee){try{sessionStorage.setItem(V,JSON.stringify(C.getState().items))}catch{}I(!0);try{const s=await bs(ee,t?{address:t.address,identity:t.identity}:void 0);if(s.url){window.location.href=s.url;return}$("/credits")}catch(s){try{sessionStorage.removeItem(V)}catch{}U(s,{flow:"cart_buy_credits"}),k({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{I(!1)}}}const ye=h.useRef(!1);h.useEffect(()=>{if(!t||ye.current||!ns("cart-checkout"))return;ye.current=!0;const s=setTimeout(()=>void Q(),0);return()=>clearTimeout(s)},[t]);const be=h.useRef(!1);h.useEffect(()=>{if(!(E!=null&&E.resumeCheckout)||be.current)return;be.current=!0,se.current=E.creditsAdded??null;try{const c=sessionStorage.getItem(V);if(c){sessionStorage.removeItem(V);const i=JSON.parse(c);Array.isArray(i)&&i.length&&M(i)}}catch{}m.invalidateQueries({queryKey:["usd-balance"]});const s=setTimeout(()=>void Q(),0);return()=>clearTimeout(s)},[E==null?void 0:E.resumeCheckout]);const P=Me||(o==null?void 0:o.phase)==="processing";return r.length===0&&!o?e.jsxs("div",{className:"cart cart--empty",children:[e.jsx(T,{name:"cart",size:44,color:"var(--muted-2)"}),e.jsx("p",{className:"cart-empty__title",children:a("cart.empty.title")}),e.jsx("p",{className:"muted",children:a("cart.empty.body")}),e.jsx(Cs,{as:re,to:"/assets",variant:"purple",children:a("cart.empty.cta")})]}):e.jsxs("div",{className:"checkout",children:[e.jsxs("div",{className:"checkout__top",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>$(-1),type:"button",children:[e.jsx(T,{name:"arrow-left"}),a("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:()=>$(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(T,{name:"arrow-left"})}),e.jsx("h1",{className:"checkout__panel-title",children:a("cart.panelTitle",{count:Ee})}),we?e.jsxs("button",{className:"checkout__fitting",onClick:()=>q(!0),disabled:P,children:[e.jsx(T,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs("section",{className:"checkout__panel",children:[e.jsx("div",{className:"checkout__list",children:r.map(s=>{const c=Te.get(s.id),i=c?c.priceCredits:s.priceCredits,p=!!c&&c.priceCredits!==s.priceCredits,d=!s.tokenId,j=s.quantity,H=typeof s.available=="number"&&j>=s.available,l=i*j,g=!!S[s.id],v=s.tokenId??s.itemId,R=s.contractAddress&&v?`/item/${s.contractAddress}/${v}`:null,D=oe[s.id],_=!ge(D),N=D==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs("div",{className:`checkout__card${_?" is-unavailable":""}`,children:[e.jsxs("div",{className:"checkout__thumb",children:[R?e.jsx(re,{className:"checkout__thumb-link",to:R,state:{item:s,tradeId:s.tradeId},"aria-label":s.name,children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}):s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.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:[R?e.jsx(re,{className:"checkout__name",to:R,state:{item:s,tradeId:s.tradeId},title:s.name,children:s.name}):e.jsx("div",{className:"checkout__name",title:s.name,children:s.name}),s.creator?e.jsx(De,{address:s.creator,className:"checkout__creator",linkToProfile:!0}):null]}),e.jsx("div",{className:"checkout__foot",children:_?e.jsx("span",{className:"checkout__unavailable",children:N}):e.jsxs(e.Fragment,{children:[d?e.jsxs("div",{className:"checkout__stepper",children:[e.jsx("button",{className:"checkout__step",onClick:()=>G(()=>y(s.id)),disabled:P||j<=1,"aria-label":a("cart.decreaseQuantity",{name:s.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:j}),e.jsx("button",{className:"checkout__step",onClick:()=>G(()=>u(s.id)),disabled:P||H,"aria-label":a("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(F,{className:"checkout__price-ico"})," ",l,p?e.jsx("span",{className:"checkout__price-was",children:s.priceCredits*j}):null]})]})})]}),e.jsxs("div",{className:"checkout__actions",children:[e.jsx("button",{className:`checkout__fav${g?" is-on":""}`,onClick:()=>X(s),"aria-label":g?a("cart.removeFromFavorites",{name:s.name}):a("cart.addToFavorites",{name:s.name}),title:g?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(T,{name:g?"heart-solid":"heart"})}),e.jsx("button",{className:"checkout__remove",onClick:()=>G(()=>n(s.id)),disabled:P,"aria-label":a("cart.remove",{name:s.name}),title:a("cart.removeTitle"),children:e.jsx(T,{name:"trash",size:24})})]})]},s.id)})}),e.jsx("div",{className:"checkout__utils",children:e.jsx("button",{className:"link",onClick:()=>G(w),disabled:P,children:a("cart.clearCart")})})]})]}),e.jsxs("aside",{className:"checkout__summary",children:[e.jsx("h2",{className:"checkout__summary-title",children:a("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:a("cart.totalItems",{count:Ie})}),e.jsxs("span",{className:"checkout__total-value",children:[e.jsx(F,{className:"checkout__total-ico"})," ",Pe]})]}),e.jsx("button",{className:"checkout__cta",onClick:()=>void(x?Le():Q()),disabled:P||ue,children:P?a("cart.working"):x?a("marketCheckout.confirmPurchase"):a("assetCard.buyNow")}),ue?e.jsx("p",{className:"muted checkout__msg",children:a("cart.allUnavailable")}):null,t?null:e.jsx("p",{className:"muted checkout__msg",children:a("cart.signInHint")}),x?e.jsx("p",{className:"muted checkout__msg",children:a("cart.priceChanged")}):null,ne?e.jsx("p",{className:"muted checkout__msg",children:ne}):null,ce?e.jsx("p",{className:"muted checkout__msg",children:ce}):null,e.jsx(fs,{message:Se,className:"checkout__msg"})]})]})]})]}),he.length>0?e.jsx("div",{className:"cart-upsell",children:e.jsx(is,{title:a("cart.youMightAlsoLike"),items:he})}):null,o?e.jsx(ks,{phase:o.phase,balanceCredits:O,onClose:Be,stage:o.phase==="processing"?o.stage:void 0,step:o.phase==="processing"?o.step:void 0,total:o.phase==="processing"?o.total:void 0,isSelfCustody:Je(t==null?void 0:t.providerType),lines:o.phase==="nofunds"?o.lines:void 0,shortfallCredits:o.phase==="nofunds"?o.shortfall:void 0,packs:W,selectedPack:ee,onSelectPack:le,onBuyPacks:()=>void Ke(),message:o.phase==="error"?o.message:void 0,onRetry:()=>void Q()}):null]})}export{Ds as Cart};
@@ -1 +0,0 @@
1
- import{j as e,r as l}from"./react-C51i12iP.js";import{ar as C,G as N,t as i,I as E,au as x,A as S}from"./index-k1Bog_tr.js";import{s as A}from"./address-DrURAr9O.js";const h="shop:resume_after_signin",I=900*1e3;function R(a){try{sessionStorage.setItem(h,JSON.stringify({...a,at:Date.now()}))}catch{}}function P(a){let o;try{o=sessionStorage.getItem(h)}catch{return null}if(!o)return null;try{sessionStorage.removeItem(h)}catch{}let r;try{r=JSON.parse(o)}catch{return null}return!r||r.type!==a||typeof r.at!="number"||Date.now()-r.at>I?null:r.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:r.path}}function z({address:a,className:o}){const{data:r}=C(a),c=r!=null&&r.name?N(r.name):A(a);return e.jsx("div",{className:o,children:i("search.byCreator",{name:c})})}function B({className:a}){return e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:a,children:[e.jsx("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"#691fa9",strokeWidth:"1.8"}),e.jsx("path",{d:"M12 7v6",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"16.5",r:"1.1",fill:"#691fa9"})]})}function D({title:a,items:o,onViewAll:r}){const c=l.useRef(null),[d,g]=l.useState(1),[m,v]=l.useState(0),[j,k]=l.useState(!0),[w,y]=l.useState(!1),n=l.useCallback(()=>{const s=c.current;if(!s)return;const{scrollLeft:t,scrollWidth:_,clientWidth:u}=s,p=Math.max(1,Math.ceil(_/u));g(p),v(Math.min(p-1,Math.round(t/u))),k(t<=1),y(t+u>=_-1)},[]);if(l.useEffect(()=>{n();const s=c.current;if(s)return s.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n),()=>{s.removeEventListener("scroll",n),window.removeEventListener("resize",n)}},[n,o.length]),o.length===0)return null;function f(s){const t=c.current;t&&t.scrollBy({left:s*t.clientWidth,behavior:"smooth"})}function b(s){const t=c.current;t&&t.scrollTo({left:s*t.clientWidth,behavior:"smooth"})}return e.jsxs("section",{className:"collection-carousel",children:[e.jsxs("div",{className:"collection-carousel__head",children:[e.jsx("h2",{className:"collection-carousel__title",children:a}),r?e.jsxs("button",{className:"collection-carousel__viewall",onClick:r,children:[i("collectionCarousel.viewAll"),e.jsx(E,{name:"chevron-down",size:16,className:"collection-carousel__viewall-ico"})]}):null]}),e.jsxs("div",{className:"collection-carousel__viewport",children:[e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--left",onClick:()=>f(-1),"aria-label":i("collectionCarousel.scrollLeft"),disabled:j,children:e.jsx("img",{src:x,alt:"","aria-hidden":!0})}),e.jsx("div",{className:"collection-carousel__track",ref:c,children:o.map(s=>e.jsx(S,{item:s},s.id))}),e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--right",onClick:()=>f(1),"aria-label":i("collectionCarousel.scrollRight"),disabled:w,children:e.jsx("img",{src:x,alt:"","aria-hidden":!0})})]}),d>1?e.jsx("div",{className:"collection-carousel__dots","aria-label":i("collectionCarousel.pages"),children:Array.from({length:d}).map((s,t)=>e.jsx("button",{className:`collection-carousel__dot${t===m?" is-active":""}`,"aria-label":i("collectionCarousel.goToPage",{page:t+1}),"aria-current":t===m?"true":void 0,onClick:()=>b(t)},t))}):null]})}export{z as C,B as W,D as a,R as s,P as t};
@@ -1 +0,0 @@
1
- import{u as K,j as e,L as re,d as se,b as te,r as j}from"./react-C51i12iP.js";import{av as oe,aw as ce,w as le,t as a,ax as E,B as ne,ar as D,u as ie,I,p as de,m as me,A as ue,ao as he,ay as ge,e as xe}from"./index-k1Bog_tr.js";import{d as _e,g as pe,a as Ne,A as je}from"./collection-d97cPr3w.js";import{u as be,L as fe}from"./useStore-Cbt7cLyp.js";import{s as O}from"./address-DrURAr9O.js";import{d as $,a as ve,S as w,F as Ce,e as we,b as ke}from"./categories-DDZgtl6y.js";import{L as B}from"./LoadMore-CHlPzPXC.js";import{u as R}from"./useInfiniteGrid-H1sfBdhy.js";import{E as T}from"./ErrorNotice-C7soUjRV.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./emotion-CSxEP8yM.js";function Pe({collection:t,cover:r,itemCount:o}){const n=K(),{contractAddress:m,name:g,creator:x}=t,N=r==null||o==null,{data:i}=oe(m,N),p=r==null?(i==null?void 0:i.items)??[]:[],h=o??(i==null?void 0:i.total);function _(){n(`/collection/${m}`)}return e.jsxs("article",{className:"coll-card",role:"link",tabIndex:0,onClick:_,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),_())},children:[e.jsx("div",{className:"coll-card__media",children:r?e.jsx("img",{className:"coll-card__img","data-testid":"coll-card-img",src:r,alt:"",loading:"lazy"}):p.length>0?e.jsx(ce,{items:p,className:"coll-card__cover"}):null}),e.jsxs("div",{className:"coll-card__body",children:[e.jsx("h3",{className:"coll-card__name",title:g,children:g}),e.jsxs("div",{className:"coll-card__meta",children:[x?e.jsx(le,{address:x,className:"coll-card__creator",linkToProfile:!0}):e.jsx("span",{className:"coll-card__creator",children:" "}),e.jsx("span",{className:"coll-card__count",children:h==null?"…":a("collectionCard.itemCount",{count:h})})]}),e.jsx("button",{className:"coll-card__view",onClick:d=>{d.stopPropagation(),_()},tabIndex:-1,children:a("collectionCard.viewCollection")})]})]})}function ye({address:t,className:r=""}){const o=E(m=>m.followed.includes(t.toLowerCase())),n=E(m=>m.toggle);return t?e.jsx(ne,{type:"button",size:"sm",variant:o?"ghost":"outline",className:r||void 0,"aria-pressed":o,title:o?a("creator.unfollowTitle"):a("creator.followTitle"),onClick:()=>n(t),children:o?a("creator.following"):a("creator.follow")}):null}const Se={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Le({address:t}){var d,b;const{data:r}=D(t),{data:o}=be(t),n=ie(l=>{var f;return(f=l.session)==null?void 0:f.address}),m=!!n&&n.toLowerCase()===t.toLowerCase(),g=(r==null?void 0:r.name)||O(t),x=(b=(d=r==null?void 0:r.avatar)==null?void 0:d.snapshots)==null?void 0:b.face256,N=(o==null?void 0:o.cover)||_e,i=o==null?void 0:o.description,p=`${de.profileUrl}/${t}`,h=fe.filter(l=>o==null?void 0:o.links[l]),_=pe(Ne({name:r==null?void 0:r.name,hasClaimedName:r==null?void 0:r.hasClaimedName,ethAddress:(r==null?void 0:r.ethAddress)??t}));return e.jsxs("section",{className:"creator-hero","aria-label":`${g} storefront`,children:[e.jsxs("div",{className:"creator-hero__cover",children:[e.jsx("img",{className:"creator-hero__cover-img",src:N,alt:"",loading:"eager"}),e.jsx("div",{className:"creator-hero__scrim","aria-hidden":!0})]}),(h.length>0||m)&&e.jsxs("div",{className:"creator-hero__links",children:[h.map(l=>e.jsx("a",{className:"creator-hero__link","data-testid":"creator-hero-link",href:(o==null?void 0:o.links[l])??"",target:"_blank",rel:"noopener noreferrer",title:a(`creator.link.${l}`),"aria-label":a(`creator.link.${l}`),children:e.jsx(I,{name:Se[l]})},l)),m&&e.jsx(re,{className:"creator-hero__link creator-hero__edit",to:"/store-settings",title:a("creator.editStore"),"aria-label":a("creator.editStore"),children:e.jsx(I,{name:"pen"})})]}),e.jsxs("div",{className:"creator-hero__body",children:[x?e.jsx("img",{className:"creator-hero__ava",src:x,alt:"",loading:"eager",style:{backgroundColor:_}}):e.jsx("span",{className:"creator-hero__ava creator-hero__ava--ph","aria-hidden":!0,style:{backgroundColor:_}}),e.jsxs("div",{children:[e.jsx("h2",{className:"creator-hero__name",children:g}),i?e.jsx("p",{className:"creator-hero__desc",children:i}):null]}),e.jsxs("div",{className:"creator-hero__actions",children:[e.jsx("a",{className:"creator-hero__view","data-testid":"creator-hero-view",href:p,target:"_blank",rel:"noopener noreferrer",children:a("creator.viewProfile")}),e.jsx(ye,{address:t,className:"creator-hero__follow"})]})]})]})}const U=48;function Ge(){const{address:t}=se(),r=K(),[o]=te(),n=o.has("collections"),{data:m}=D(t),g=(m==null?void 0:m.name)||(t?O(t):a("creator.fallbackName"));me({title:g,description:a("seo.creator.description",{name:g})});const[x,N]=j.useState("wearable"),[i,p]=j.useState(null),[h,_]=j.useState([]),[d,b]=j.useState(""),[l,f]=j.useState(""),[P,z]=j.useState("newest"),y=d&&!Number.isNaN(Number(d))?Number(d):void 0,S=l&&!Number.isNaN(Number(l))?Number(l):void 0,G=i?ke[i]:void 0,H=($.find(s=>s.key===P)??$[0]).server,L={creator:t,category:x,rarities:h.length?h:void 0,wearableCategories:G,minPriceCredits:y,maxPriceCredits:S,sortBy:H},{items:v,total:Y,isLoading:C,error:A,hasNextPage:W,isFetchingNextPage:F,fetchNextPage:Z}=R(["creator-listings",L],s=>he({...L,first:U,skip:s}),{enabled:!!t&&!n}),u=R(["creator-collections",t],s=>ge(t,{first:U,skip:s}).then(c=>({items:c.collections,total:c.total})),{enabled:!!t&&n});function q(s){N(s),p(null),n&&M()}function M(){const s=new URLSearchParams(o);s.delete("collections");const c=s.toString();r({search:c?`?${c}`:""},{replace:!0})}function J(){if(n){M();return}const s=new URLSearchParams(o);s.delete("collections");const c=s.toString();r({search:c?`?${c}&collections`:"?collections"},{replace:!0})}function Q(s){_(c=>c.includes(s)?c.filter(ae=>ae!==s):[...c,s])}function V(){N("wearable"),p(null),_([]),b(""),f("")}const k=!!(y||S),X=k?`${d||"0"}–${l||"∞"}`:a("filter.price"),ee=x!=="wearable"||!!i||h.length>0||k;return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":a("creator.breadcrumbAria"),children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>r("/assets"),children:a("creator.breadcrumb")}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:g})]}),t?e.jsx(Le,{address:t}):null,!n&&!C&&v.length>0?e.jsx(je,{items:v,source:"creator"}):null,e.jsxs("div",{className:"browse browse--sidebar",children:[e.jsx("aside",{className:"browse__sidebar",children:e.jsx(ve,{category:x,subCategory:i,onCategory:q,onSub:p,title:a("creator.category"),flat:!0,collections:n,onCollections:J})}),e.jsx("div",{className:"browse__main",children:n?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"creator-collections__bar",children:e.jsx("span",{className:"assets__count",children:u.isLoading?"…":a("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(T,{message:a("creator.error")}):null,e.jsx("div",{className:"grid grid--collections",children:u.isLoading?e.jsx(w,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(s=>e.jsx(Pe,{collection:s,itemCount:s.itemCount},s.contractAddress)),u.isFetchingNextPage?e.jsx(w,{count:6}):null]})}),e.jsx(B,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx("p",{className:"muted",children:a("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Ce,{rarities:h,onToggleRarity:Q,sort:P,onSort:z,total:Y,loading:C,anyActive:ee,onClear:V,renderTrailing:s=>e.jsx(we,{panelKey:"price",label:X,active:k,panel:s,children:e.jsxs("div",{className:"filter-pop filter-pop--price",children:[e.jsxs("div",{className:"filter-pop__price-row",children:[e.jsx("input",{type:"number",min:"0","aria-label":a("creator.priceMin"),placeholder:a("creator.priceMinPlaceholder"),value:d,onChange:c=>b(c.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":a("creator.priceMax"),placeholder:a("creator.priceMaxPlaceholder"),value:l,onChange:c=>f(c.target.value)})]}),e.jsx("p",{className:"filter-pop__hint",children:a("creator.priceHint",{currency:xe.name})})]})})}),A?e.jsx(T,{message:a("creator.error")}):null,e.jsx("div",{className:"grid",children:C?e.jsx(w,{count:15}):e.jsxs(e.Fragment,{children:[v.map(s=>e.jsx(ue,{item:s},s.id)),F?e.jsx(w,{count:6}):null]})}),e.jsx(B,{hasNextPage:W,isFetching:F,onLoadMore:()=>void Z()}),!C&&!A&&v.length===0?e.jsx("p",{className:"muted",children:a("creator.empty")}):null]})})]})]})}export{Ge as Creator,Ge as default};
@@ -1 +0,0 @@
1
- import{u as $,b as q,r as i,j as e}from"./react-C51i12iP.js";import{m as H,t as s,u as Q,b as V,j as g,e as d,E as P,k as I,C as W,f as z}from"./index-k1Bog_tr.js";import{R as G}from"./resume-buy-Bf0zIH7y.js";import{R as D}from"./cart-checkout-QeMYLp4l.js";import{l as J}from"./loader-logo-BzY9EKdC.js";import{u as Z,p as X,c as ee,i as se}from"./useCreditPacks-CG7L_UQ4.js";import{C as te}from"./CircularProgress-CeVjKviE.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";const j="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/pack-chips--HnOpf5U.webp",re="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/credit-coin-CmcTCd5i.webp",ae="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",x=se()?"mock":"stripe",ce={pack_5:j,pack_10:j,pack_25:j,pack_50:j},ne="https://docs.decentraland.org";function M(l){const r=l;if((r==null?void 0:r.name)==="AbortError")return s("getCredits.errorCanceled");const m=((r==null?void 0:r.message)??"").toLowerCase();return m.includes("sign in")?s("getCredits.errorSignIn",{currency:d.name}):m.includes("timed out")?s("getCredits.errorTimeout",{currency:d.name}):s("getCredits.errorGeneric")}function je(){H({title:s("nav.getCredits",{currency:d.name}),noindex:!0});const l=$(),{session:r,signIn:m}=Q(),n=V(),[N,w]=q(),{packs:F,isLoading:T}=Z(),[p,o]=i.useState("select"),[c,E]=i.useState(null),[R,L]=i.useState(null),[U,h]=i.useState(null),[K,f]=i.useState(!1),b=i.useRef(null);i.useEffect(()=>()=>{var t;return(t=b.current)==null?void 0:t.abort()},[]);const A=i.useCallback(()=>{w(t=>{const a=new URLSearchParams(t);return a.delete("order"),a.delete("canceled"),a},{replace:!0})},[w]),y=i.useCallback(async t=>{o("processing");const a=new AbortController;b.current=a;try{const u=await X(t,{signal:a.signal,address:r==null?void 0:r.address,identity:r==null?void 0:r.identity});if(u.status==="credited"){const _=u.creditsGranted??(c==null?void 0:c.credits)??0;L(_>0?_:null),o("success"),g("Shop Completed Buy Credits",{order_id:t,pack_usd:(c==null?void 0:c.usd)??null,credits:_>0?_:null,provider:x}),n.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(D)){const k={resumeCheckout:!0,..._>0?{creditsAdded:_}:{}};l("/cart",{state:k});return}}catch{}try{const k=sessionStorage.getItem(G);if(k){sessionStorage.removeItem(G);const C=JSON.parse(k),B=C.tokenId??C.itemId;if(C.contractAddress&&B){l(`/item/${C.contractAddress}/${B}`,{state:{item:C,resumeBuy:!0}});return}}}catch{}}else u.status==="pending"?(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(c==null?void 0:c.usd)??null}),n.invalidateQueries({queryKey:["usd-balance"]}),o("pending")):(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(c==null?void 0:c.usd)??null}),h(u.error??s("getCredits.errorGrant",{currency:d.name})),o("error"))}catch(u){P(u,{flow:"get_credits",step:"grant",order_id:t}),g("Shop Buy Credits Failed",{step:"grant",error_code:I(u),pack_usd:(c==null?void 0:c.usd)??null}),h(M(u)),o("error")}},[c,r,n,l]),O=i.useCallback(async t=>{if(!r){m();return}h(null),f(!1),E(t),o(x==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:t.usd,credits:t.credits,provider:x});try{const a=await ee(t.id,{address:r.address,identity:r.identity});if(a.mock)y(a.orderId);else if(a.url)g("Shop Redirected To Stripe",{order_id:a.orderId,pack_usd:t.usd,credits:t.credits}),window.location.href=a.url;else throw new Error("Checkout did not return a redirect url")}catch(a){P(a,{flow:"get_credits",step:"checkout",provider:x}),g("Shop Buy Credits Failed",{step:"checkout",error_code:I(a),pack_usd:t.usd}),h(M(a)),o("error")}},[r,m,y]),v=i.useRef(!1);i.useEffect(()=>{if(v.current)return;const t=N.get("order");if(N.get("canceled")!=null){v.current=!0,g("Shop Buy Credits Cancelled",{order_id:t,provider:x}),A(),f(!0),o("select");return}t&&(o("processing"),r&&(v.current=!0,A(),y(t)))},[N,r]);function S(){var t;(t=b.current)==null||t.abort(),o("select"),E(null),L(null),h(null),f(!1)}const Y=p==="select";return e.jsxs("div",{className:"getcredits",children:[Y&&e.jsxs("header",{className:"getcredits__head",children:[e.jsx("h1",{className:"getcredits__title",children:s("getCredits.title",{currency:d.name})}),e.jsxs("p",{className:"getcredits__sub",children:[s("getCredits.subtitle",{currency:d.name})," ",e.jsxs("a",{className:"getcredits__learn",href:ne,target:"_blank",rel:"noreferrer",children:[s("getCredits.learnMore"),e.jsxs("svg",{className:"getcredits__learn-ico",viewBox:"0 0 13 13","aria-hidden":!0,fill:"none",children:[e.jsx("path",{d:"M4 2h7v7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M11 2 2 11",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})]}),p==="select"&&e.jsxs(e.Fragment,{children:[K&&e.jsx("p",{className:"getcredits__note muted",role:"status",children:s("getCredits.canceledNote")}),e.jsx(ie,{packs:F,loading:T,onSelect:t=>void O(t)})]}),p==="redirecting"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(te,{size:32}),e.jsx("p",{className:"muted",children:s("getCredits.redirecting")})]}),p==="processing"&&e.jsxs("div",{className:"gc-processing",role:"status","aria-live":"polite",children:[e.jsx("img",{className:"gc-processing__logo",src:J,alt:"",width:61,height:61}),e.jsxs("div",{className:"gc-processing__body",children:[e.jsxs("p",{className:"gc-processing__title",children:[e.jsx("strong",{children:s("getCredits.processing")}),"…"]}),e.jsxs("div",{className:"gc-progress","aria-hidden":!0,children:[e.jsx("span",{className:"gc-progress__track",children:e.jsx("span",{className:"gc-progress__fill"})}),e.jsx("span",{className:"gc-progress__count",children:"1/1"})]})]})]}),p==="success"&&e.jsxs("div",{className:"gc-success",role:"status","aria-live":"polite",children:[e.jsxs("div",{className:"gc-banner",children:[e.jsx("img",{className:"gc-banner__icon",src:ae,alt:"",width:60,height:60}),e.jsxs("p",{className:"gc-banner__text",children:[e.jsx("strong",{children:s("getCredits.successTitle")})," ",s("getCredits.successBody",{currency:d.name})]})]}),R!=null&&e.jsx("div",{className:"gc-credits",children:e.jsxs("div",{className:"gc-credits__row",children:[e.jsx("img",{className:"gc-credits__coin",src:re,alt:"",width:93,height:93}),e.jsxs("p",{className:"gc-credits__text",children:[e.jsx(W,{className:"gc-credits__diamond"}),e.jsxs("span",{children:[e.jsx("strong",{className:"gc-credits__amount",children:s("getCredits.creditsAmount",{credits:R,currency:d.name})})," ",e.jsx("span",{className:"gc-credits__added",children:s("getCredits.creditsAdded")})]})]})]})}),e.jsxs("div",{className:"gc-actions",children:[e.jsx("button",{className:"gc-actions__btn gc-actions__btn--outline",onClick:S,children:s("getCredits.buyMore",{currency:d.name})}),e.jsx("button",{className:"gc-actions__btn gc-actions__btn--solid",onClick:()=>l("/assets"),children:s("getCredits.startShopping")})]})]}),p==="pending"&&e.jsxs("div",{className:"gc-status",role:"status","aria-live":"polite",children:[e.jsx("p",{className:"gc-status__title",children:s("getCredits.pendingTitle",{currency:d.name})}),e.jsx("p",{className:"muted",children:s("getCredits.pendingBody")}),e.jsxs("div",{className:"gc-status__actions",children:[e.jsx("button",{className:"gc-actions__btn gc-actions__btn--solid",onClick:()=>l("/assets"),children:s("getCredits.startShopping")}),e.jsx("button",{className:"gc-actions__btn gc-actions__btn--outline",onClick:S,children:s("getCredits.done")})]})]}),p==="error"&&e.jsxs("div",{className:"gc-status gc-status--err",role:"alert",children:[e.jsx("p",{className:"gc-status__title",children:s("getCredits.errorTitle")}),e.jsx("p",{className:"error",children:U}),e.jsx("div",{className:"gc-status__actions",children:e.jsx("button",{className:"gc-actions__btn gc-actions__btn--solid",onClick:S,children:s("getCredits.tryAgain")})})]})]})}function ie({packs:l,loading:r,onSelect:m}){return r?e.jsx("div",{className:"packs","aria-busy":"true","aria-label":s("getCredits.packsLoading",{currency:d.name}),children:[0,1,2,3].map(n=>e.jsx("div",{className:"pack pack--skeleton","aria-hidden":!0,children:e.jsxs("span",{className:"pack__inner",children:[e.jsx("span",{className:"skeleton pack__label-sk"}),e.jsx("span",{className:"skeleton pack__art-sk"}),e.jsx("span",{className:"skeleton pack__cta-sk"})]})},n))}):e.jsx("div",{className:"packs",children:l.map(n=>e.jsxs("button",{type:"button",className:`pack${n.bestValue?" pack--best":""}`,"data-testid":"pack",onClick:()=>m(n),"aria-label":s("getCredits.packAria",{amount:z(n.credits),usd:n.usd}),children:[n.bestValue&&e.jsx("span",{className:"pack__badge",children:s("getCredits.packBadge")}),e.jsxs("span",{className:"pack__inner",children:[e.jsx("span",{className:"pack__label",children:s("getCredits.creditsAmount",{credits:n.credits,currency:d.name})}),e.jsx("span",{className:"pack__art",children:e.jsx("img",{src:ce[n.id]??j,alt:"",loading:"lazy"})}),e.jsx("span",{className:"pack__cta-wrap",children:e.jsxs("span",{className:"pack__cta",children:["$",n.usd.toFixed(2)]})})]})]},n.id))})}export{je as GetCredits,je as default};
@@ -1,5 +0,0 @@
1
- import{u as R,r as h,j as e,L as B}from"./react-C51i12iP.js";import{v as $,t as s,e as S,B as k,C as L,j as P,E as Q,m as U,u as W,b as O,o as z,s as F,J}from"./index-k1Bog_tr.js";import{i as Y,R as D,f as G}from"./import-CT__rglP.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./buy-B_TXfJF4.js";import"./authorizations-BdVBiEr7.js";import"./index-HN6Rk25C.js";import"./sendMetaTransaction-CiO3jI6F.js";import"./trade-encoding-Bq9nPTSy.js";import"./mana-rate-Ez6IlT0x.js";function H({queue:n,session:T,onClose:j,onDone:o}){const N=R(),d=$(T.providerType),[m,f]=h.useState(()=>n.map(()=>"pending")),[I,E]=h.useState("running"),w=h.useRef(!1);h.useEffect(()=>{if(w.current)return;w.current=!0;let t=!1;return(async()=>{for(let r=0;r<n.length;r++){if(t)return;f(u=>u.map((g,p)=>p===r?"active":g));try{await Y(n[r].item,n[r].priceCredits,T),P("Shop Migrated Listing",{item_id:n[r].item.itemId??n[r].item.oldTradeId??null,contract_address:n[r].item.contractAddress,new_price_credits:n[r].priceCredits,new_price_usd:n[r].priceCredits/10}),t||f(u=>u.map((g,p)=>p===r?"done":g))}catch(u){if(u instanceof D)Q(u,{flow:"import_listing",step:"relist",itemId:n[r].item.itemId??n[r].item.oldTradeId}),t||f(g=>g.map((p,b)=>b===r?"unlisted":p));else{const g=u,p=g.code===4001||/reject|denied|cancel/i.test(g.message??"");p||Q(u,{flow:"import_listing",itemId:n[r].item.itemId??n[r].item.oldTradeId}),t||f(b=>b.map((a,l)=>l===r?p?"skipped":"failed":a))}}}t||E("finished")})(),()=>{t=!0}},[]);const _=m.filter(t=>t==="done").length,v=m.findIndex(t=>t==="active"),x=Math.round(m.filter(t=>t!=="pending"&&t!=="active").length/n.length*100);function y(){o(),j()}if(I==="finished"){const t=m.filter(r=>r==="skipped"||r==="failed").length,c=m.filter(r=>r==="unlisted").length;return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal modal--success",role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:_>0?s("migrate.successTitle"):s("migrate.nothingTitle")}),e.jsxs("p",{className:"muted",style:{margin:0},children:[_>0?s("migrate.listedSummary",{count:_,currency:S.name}):s("migrate.noneListed"),t>0?" "+s("migrate.skippedSummary",{count:t}):"",c>0?" "+s("migrate.unlistedSummary",{count:c}):""]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx(k,{variant:"ghost",onClick:y,children:s("getCredits.done")}),c>0?e.jsx(k,{variant:"purple",onClick:()=>{o(),j(),N("/my-assets")},children:s("migrate.goToMyAssets")}):_>0?e.jsx(k,{variant:"purple",onClick:()=>{o(),j(),N("/assets")},children:s("migrate.viewInShop")}):null]})]})})}return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal migrate","data-testid":"modal",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx("h2",{className:"modal__title",children:s("migrate.listingTitle")}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[d?s("migrate.subConfirm"):s("migrate.subManaged")," ",v>=0?s("migrate.progressCount",{current:v+1,total:n.length}):""]}),e.jsx("div",{className:"migrate__progress",children:e.jsx("div",{className:"migrate__bar",style:{width:`${x}%`}})}),e.jsx("ul",{className:"migrate__list",children:n.map((t,c)=>e.jsxs("li",{className:`migrate__row migrate__row--${m[c]}`,children:[e.jsx("span",{className:"migrate__thumb",children:t.item.thumbnail?e.jsx("img",{src:t.item.thumbnail,alt:""}):null}),e.jsx("span",{className:"migrate__name",title:t.item.name,children:t.item.name||s("migrate.itemFallback")}),e.jsxs("span",{className:"migrate__price",children:[e.jsx(L,{className:"ccy-mark"})," ",t.priceCredits.toLocaleString()]}),e.jsx("span",{className:"migrate__status",children:m[c]==="active"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner migrate__spin","aria-hidden":!0})," ",d?s("migrate.statusConfirm"):s("migrate.statusAdding")]}):m[c]==="done"?e.jsx("span",{className:"migrate__tick",children:"✓"}):m[c]==="skipped"?e.jsx("span",{className:"migrate__skip",children:s("migrate.statusSkipped")}):m[c]==="failed"?e.jsx("span",{className:"migrate__skip",children:s("migrate.statusFailed")}):m[c]==="unlisted"?e.jsx("span",{className:"migrate__skip",title:s("migrate.unlistedTooltip"),children:s("migrate.statusUnlisted")}):e.jsx("span",{className:"migrate__wait",children:s("migrate.statusWaiting")})})]},t.item.oldTradeId))}),e.jsx("p",{className:"muted small migrate__hint",children:d?s("migrate.hintConfirm"):s("migrate.hintManaged")})]})})}const A=F(k)`
2
- margin-top: 10px;
3
- `,V=F(k)`
4
- padding: 13px 24px;
5
- `,X=[{key:"creations",title:"importListings.creations.title",sub:"importListings.creations.sub"},{key:"owned",title:"importListings.owned.title",sub:"importListings.owned.sub"}];function oe(){U({title:s("seo.import.title"),noindex:!0});const{session:n,signIn:T,restore:j}=W(),o=O(),N=n==null?void 0:n.address;h.useEffect(()=>{j()},[j]);const{data:d,isLoading:m}=z({queryKey:["importable",N],queryFn:()=>G(N),enabled:!!N}),[f,I]=h.useState({}),[E,w]=h.useState(new Set),[_,v]=h.useState(null),x=h.useMemo(()=>[...(d==null?void 0:d.creations)??[],...(d==null?void 0:d.owned)??[]],[d]);h.useEffect(()=>{x.length&&I(a=>{const l={...a};for(const i of x)l[i.oldTradeId]==null&&(l[i.oldTradeId]=i.suggestedCredits);return l})},[x]);const y=a=>!E.has(a),t=a=>f[a.oldTradeId]??a.suggestedCredits,c=x.filter(a=>y(a.oldTradeId)),r=c.reduce((a,l)=>a+t(l),0);function u(a,l){const i=l.replace(/[^\d]/g,"");I(C=>({...C,[a]:i===""?0:parseInt(i,10)}))}function g(a){w(l=>{const i=new Set(l);return i.has(a)?i.delete(a):i.add(a),i})}function p(a){return a.map(l=>({item:l,priceCredits:Math.max(1,t(l))}))}function b(){o.invalidateQueries({queryKey:["importable"]}),o.invalidateQueries({queryKey:["shop-items"]}),o.invalidateQueries({queryKey:["catalog-items"]}),o.invalidateQueries({queryKey:["overview-listings"]}),o.invalidateQueries({queryKey:["upsell-listings"]}),o.invalidateQueries({queryKey:["my-assets"]}),o.invalidateQueries({queryKey:["collection-sale-state"]}),J.success(s("importListings.toastUpdated"))}return n?!m&&x.length===0?e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"✨"}),e.jsx("h1",{className:"imp-empty__title",children:s("importListings.emptyTitle")}),e.jsx("p",{className:"muted",children:s("importListings.emptyBody")}),e.jsx(A,{as:B,to:"/my-assets",variant:"purple",children:s("importListings.goToMyAssets")})]}):e.jsxs("div",{className:"imp",children:[e.jsxs("header",{className:"imp__head",children:[e.jsx("span",{className:"imp__eyebrow",children:s("importListings.eyebrow")}),e.jsxs("h1",{className:"imp__title",children:[s("importListings.titleLead")," ",e.jsx("span",{className:"imp__grad",children:s("importListings.titleAccent")})]}),e.jsx("p",{className:"imp__lede",children:s("importListings.lede",{currency:S.name})})]}),e.jsxs("div",{className:"imp__ratebar",children:[e.jsx(L,{className:"ccy-mark imp__diamond"})," ",s("importListings.rate",{currency:S.nameSingular})]}),m?e.jsx("div",{className:"imp__list",children:Array.from({length:4}).map((a,l)=>e.jsx("div",{className:"imp-row imp-row--skeleton"},l))}):X.map(a=>{const l=(d==null?void 0:d[a.key])??[];return l.length===0?null:e.jsxs("section",{className:"imp__section",children:[e.jsxs("div",{className:"imp__section-head",children:[e.jsx("h2",{className:"imp__section-title",children:s(a.title)}),e.jsx("span",{className:"imp__section-sub",children:s(a.sub)})]}),e.jsx("div",{className:"imp__list",children:l.map(i=>{const C=t(i),K=C!==i.suggestedCredits;return e.jsxs("article",{className:`imp-row${y(i.oldTradeId)?"":" is-off"}`,children:[e.jsx("input",{type:"checkbox",className:"imp-check",checked:y(i.oldTradeId),onChange:()=>g(i.oldTradeId),"aria-label":s("importListings.includeItem",{name:i.name})}),e.jsx("div",{className:"imp-thumb",children:i.thumbnail?e.jsx("img",{src:i.thumbnail,alt:""}):null}),e.jsxs("div",{className:"imp-meta",children:[e.jsx("div",{className:"imp-name",title:i.name,children:i.name||s("importListings.itemFallback")}),e.jsx("span",{className:"imp-chip",children:i.rarity})]}),e.jsxs("div",{className:"imp-price",children:[e.jsxs("div",{className:"imp-price__field",children:[e.jsx(L,{className:"ccy-mark imp-price__diamond"}),e.jsx("input",{className:"imp-price__input","data-testid":"imp-price-input",inputMode:"numeric",value:C.toLocaleString(),onChange:M=>u(i.oldTradeId,M.target.value),"aria-label":s("importListings.priceAria",{currency:S.name,name:i.name})})]}),e.jsxs("div",{className:"imp-price__sub",children:[e.jsxs("span",{children:["$",(C*.1).toFixed(2)]}),K?e.jsxs("button",{className:"imp-price__reset",onClick:()=>I(M=>({...M,[i.oldTradeId]:i.suggestedCredits})),children:[s("importListings.resetTo")," ",e.jsx(L,{className:"ccy-mark"}),i.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx("div",{className:"imp-action",children:e.jsx(k,{size:"sm",className:"imp-row__list",disabled:!y(i.oldTradeId),onClick:()=>v(p([i])),children:s("importListings.list")})})]},i.oldTradeId)})})]},a.key)}),e.jsx("div",{className:"imp-dock",children:e.jsxs("div",{className:"imp-dock__inner",children:[e.jsxs("div",{className:"imp-dock__summary",children:[e.jsxs("div",{className:"imp-dock__total",children:[e.jsx(L,{className:"ccy-mark imp__diamond"})," ",r.toLocaleString()]}),e.jsx("div",{className:"imp-dock__sub",children:s("importListings.selectedSummary",{count:c.length,usd:(r*.1).toFixed(2)})})]}),e.jsx("span",{className:"imp-dock__spacer"}),e.jsx(V,{variant:"purple",disabled:c.length===0,onClick:()=>v(p(c)),children:s("importListings.listAll",{count:c.length})})]})}),_&&n?e.jsx(H,{queue:_,session:n,onClose:()=>v(null),onDone:b}):null]}):e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"📦"}),e.jsx("h1",{className:"imp-empty__title",children:s("importListings.signInTitle")}),e.jsx("p",{className:"muted",children:s("importListings.signInBody")}),e.jsx(A,{variant:"purple",onClick:()=>T(),children:s("storeSettings.signIn")})]})}export{oe as ImportListings};