@dcl/shop 0.1.0-29941568358.commit-de47e56 → 0.1.0-29942650568.commit-3cdb6da

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 (234) hide show
  1. package/assets/{AnimatedBackground-cMeJUDnS.js → AnimatedBackground-CysLhvvU.js} +3 -3
  2. package/assets/{Assets-D4bmQvg2.js → Assets-DsvJ5f0v.js} +15 -15
  3. package/assets/{Assets.styles-JIZQe0rQ.js → Assets.styles-CA7lhkqC.js} +28 -29
  4. package/assets/{Authorizations-Bxum5Ckz.js → Authorizations-vnz0r2Ax.js} +3 -3
  5. package/assets/Cart-CTQAeaCb.js +3 -0
  6. package/assets/{CircularProgress-DVvK_YYJ.js → CircularProgress-BoWkcKSM.js} +5 -5
  7. package/assets/{Collection-CCeBHPqN.js → Collection-DFg8H4cI.js} +1 -1
  8. package/assets/{CollectionCarousel-CfEwak3h.js → CollectionCarousel-BgmGp9gP.js} +1 -1
  9. package/assets/{ConstantsUtil-CPwpahR3.js → ConstantsUtil-DO6FyoSW.js} +1 -1
  10. package/assets/{ContentClient-DWUTshFt.js → ContentClient-Xp597FfN.js} +1 -1
  11. package/assets/Creator-DpJL7xsg.js +1 -0
  12. package/assets/{CssVarsProvider-CaTQjQty.js → CssVarsProvider-CVkDPUQi.js} +3 -3
  13. package/assets/{DeploymentBuilder-BeZK0qfR.js → DeploymentBuilder-Ba-Y42wz.js} +1 -1
  14. package/assets/{ErrorNotice-DDr3KjIH.js → ErrorNotice-BDH9xoG4.js} +1 -1
  15. package/assets/{ExchangeController-ZePEIh3m.js → ExchangeController-XYLG0Onl.js} +1 -1
  16. package/assets/{GetCredits-BcaMNIRG.js → GetCredits-C41Akzju.js} +1 -1
  17. package/assets/{HelpersUtil-CRTK_83W.js → HelpersUtil-CXmyL-9f.js} +1 -1
  18. package/assets/{ImportListings-9YfzHduB.js → ImportListings-DL4qvnkm.js} +1 -1
  19. package/assets/ItemDetail-8kxMVjol.js +78 -0
  20. package/assets/{LoadMore-BK9c312B.js → LoadMore-DwH_uJJ9.js} +1 -1
  21. package/assets/{MarketCheckout-BxM5rUvM.js → MarketCheckout-0NCiBi_9.js} +2 -2
  22. package/assets/MyAssets-ChdfSyve.js +258 -0
  23. package/assets/{MyFavorites-DWjt5m8Z.js → MyFavorites-BAgv7K26.js} +1 -1
  24. package/assets/{MyPurchases--MUfwO_U.js → MyPurchases-DlfJ7xtX.js} +4 -4
  25. package/assets/{NetworkUtil-CM7JZPbs.js → NetworkUtil-BGlQiKvg.js} +1 -1
  26. package/assets/{NotFound-DVZ9W5Hr.js → NotFound-uK-Ostnl.js} +1 -1
  27. package/assets/PrimaryListModal-Bm7Lx1a1.js +1 -0
  28. package/assets/{StoreSettings-CpeZPPkb.js → StoreSettings-jeamoHJO.js} +6 -6
  29. package/assets/Success-IAIc5xBC.js +4 -0
  30. package/assets/{SwapController-BH4rWo6P.js → SwapController-B81AJRRn.js} +1 -1
  31. package/assets/{Tooltip-zazDSBbm.js → Tooltip-CYItdKnL.js} +1 -1
  32. package/assets/{TradeService-IuqYxWb8.js → TradeService-BxBTy4_C.js} +1 -1
  33. package/assets/{W3MFrameProviderSingleton-CFGfbV9-.js → W3MFrameProviderSingleton-WHc1zToo.js} +3 -3
  34. package/assets/{WebCryptoP256-ByM1YcL4.js → WebCryptoP256-BQQeByzz.js} +1 -1
  35. package/assets/{authorizations-CsduRV0X.js → authorizations-C600xDT9.js} +1 -1
  36. package/assets/{basic-BMJtBJ3f.js → basic-CaSER4PW.js} +1 -1
  37. package/assets/{biconomy-WqxLiteU.js → biconomy-nsDuvr1X.js} +1 -1
  38. package/assets/{browser-7Z6Tx7yC.js → browser-Cad_aDY9.js} +1 -1
  39. package/assets/{browser-ponyfill-C_hn4Jen.js → browser-ponyfill-CQ0GHmxr.js} +1 -1
  40. package/assets/browser-ponyfill-vZOvKb_B.js +1 -0
  41. package/assets/{buy-CN2rC9a0.js → buy-C5J6mAtx.js} +1 -1
  42. package/assets/{buy-gasless-iZXsoGZN.js → buy-gasless-Sy6Gurph.js} +1 -1
  43. package/assets/{cart-checkout-CLMqKMCz.js → cart-checkout-BwJruvi6.js} +1 -1
  44. package/assets/{categories-D7_Qudaw.js → categories-CQMvcQ_A.js} +5 -5
  45. package/assets/{ccip-DLXgNS3N.js → ccip-CVFd9-T6.js} +1 -1
  46. package/assets/{ccip-Be5Dn1Zo.js → ccip-C_DKTuDg.js} +1 -1
  47. package/assets/{chains-DOpzCPsr.js → chains-C1bwVnfj.js} +1 -1
  48. package/assets/collection-BButATLz.js +1 -0
  49. package/assets/{common-BO9A6Obt.js → common-yfho93wI.js} +1 -1
  50. package/assets/{controller-CDv5xjYs.js → controller-C4IlqRFi.js} +2 -2
  51. package/assets/{core-B1vdvz8J.js → core-Bsb1vtZ6.js} +4 -4
  52. package/assets/{custom-3-JWbHeB.js → custom-B2_bVLxh.js} +1 -1
  53. package/assets/{data-capture-B9u0j-_M.js → data-capture-CeCg7Ckv.js} +1 -1
  54. package/assets/{decimals-z4vOxece.js → decimals-B36bI5dA.js} +1 -1
  55. package/assets/decimals-BPDUTKfa.js +1 -0
  56. package/assets/{detectExtension-Cvy4AYwr.js → detectExtension-CKplVZ9K.js} +1 -1
  57. package/assets/{email-Bu0wLP5a.js → email-DGWqulOs.js} +1 -1
  58. package/assets/{embedded-wallet-DALUv36Z.js → embedded-wallet-BDA__pmu.js} +1 -1
  59. package/assets/emotion-styled.browser.esm-Of0yAmXP.js +1 -0
  60. package/assets/{engine-COZjF6GN.js → engine-COT4y3N6.js} +1 -1
  61. package/assets/{errors-BuvqNt2H.js → errors-B2rT3Gvo.js} +1 -1
  62. package/assets/estimate-l1-fee-DSG403IA.js +1 -0
  63. package/assets/eth_estimateGas-BeErQaun.js +1 -0
  64. package/assets/{eth_getStorageAt-CqeWdstl.js → eth_getStorageAt-C0E8Vng5.js} +1 -1
  65. package/assets/eth_getTransactionCount-kFIWL36y.js +1 -0
  66. package/assets/{ethereum-C3MAoMFC.js → ethereum-C5kfwN9D.js} +1 -1
  67. package/assets/{ethers-Dpp9c5As.js → ethers-CLB2z3On.js} +1 -1
  68. package/assets/{execute-DVE3v1AF.js → execute-zpOqUNic.js} +2 -2
  69. package/assets/{extractIPFS-HvQvYdM-.js → extractIPFS-CsawLTu6.js} +1 -1
  70. package/assets/{features-CqkOcXXU.js → features-CMZ-QMXf.js} +1 -1
  71. package/assets/{fetchTokenMetadata-CZAPbDmS.js → fetchTokenMetadata-CZyR6DMv.js} +2 -2
  72. package/assets/{fortmatic-udOxQk4J.js → fortmatic-DwISA9k4.js} +1 -1
  73. package/assets/{get-bytecode-mfFuNYuc.js → get-bytecode-nwWHW248.js} +1 -1
  74. package/assets/get-ecosystem-wallet-info-Cll7wRD7.js +1 -0
  75. package/assets/{getBalance-BawNMn6h.js → getBalance-BlSTzNnh.js} +2 -2
  76. package/assets/{getInstalledModules-BNHlcIGs.js → getInstalledModules-fBSGgSis.js} +1 -1
  77. package/assets/{getNFT-BnfoPCmO.js → getNFT-bAbPTgKN.js} +2 -2
  78. package/assets/getNFT-yZahXefO.js +1 -0
  79. package/assets/{getOverlayAlpha-DAstUi74.js → getOverlayAlpha-CH1E19pc.js} +1 -1
  80. package/assets/{hashTypedData-CKhs32SE.js → hashTypedData-BjKHZJt2.js} +1 -1
  81. package/assets/{hashTypedData-Cb3dj8Vj.js → hashTypedData-CoI7qham.js} +1 -1
  82. package/assets/{import-D2QUSpyp.js → import-B-7LIWfg.js} +1 -1
  83. package/assets/{in-app-Dy6198Ub.js → in-app-DuAkMaop.js} +1 -1
  84. package/assets/{in-app-wallet-calls-Df8xMcoL.js → in-app-wallet-calls-VVaW7dWC.js} +1 -1
  85. package/assets/{index-DPTvpJzS.js → index-2LZVA_H9.js} +1 -1
  86. package/assets/{index-DgYBZU4A.js → index-B14E9dDt.js} +1 -1
  87. package/assets/{index-BhfJUYAQ.js → index-B2VkMi-_.js} +1 -1
  88. package/assets/{index-DIpMchso.js → index-B5bMVqc5.js} +1 -1
  89. package/assets/{index-CIfdS8Db.js → index-BC--wvbP.js} +1 -1
  90. package/assets/{index-B83hIo9e.js → index-BCa080Jk.js} +1 -1
  91. package/assets/{index-CRSMETpm.js → index-BEKwTyL9.js} +1 -1
  92. package/assets/{index-DPp2bhUs.js → index-BEL4KhCu.js} +1 -1
  93. package/assets/{index-B4Jw07i3.js → index-BSSPgvD1.js} +1 -1
  94. package/assets/{index-V1lpWoC-.js → index-BUzglYPe.js} +1 -1
  95. package/assets/{index-Cz1Suly9.js → index-BaDAgjcA.js} +1 -1
  96. package/assets/{index-Cnmgw5PF.js → index-BlnhiyW1.js} +1 -1
  97. package/assets/{index-DoxUiIoZ.js → index-BmwayVyG.js} +3 -3
  98. package/assets/{index-CjTTlJEo.js → index-Bn-EvtCB.js} +1 -1
  99. package/assets/{index-DP9-yadx.js → index-BsY45tr2.js} +1 -1
  100. package/assets/{index-CaOpng6c.js → index-Bwtbao7B.js} +1 -1
  101. package/assets/{index-BsI3EWcy.js → index-Bzlo07t4.js} +1 -1
  102. package/assets/{index-BcuysZka.js → index-C0_U8Amn.js} +1 -1
  103. package/assets/{index-B0SpA1TA.js → index-C0utXQ6l.js} +1 -1
  104. package/assets/{index-CEhWolV_.js → index-C2JrnQDe.js} +1 -1
  105. package/assets/{index-C2-W1jZ1.js → index-C4vAJ3fL.js} +1 -1
  106. package/assets/{index-4DPFDe86.js → index-CBhum_yI.js} +1 -1
  107. package/assets/index-CD_HpB6P.js +1 -0
  108. package/assets/{index-uTPBgRyq.js → index-CJs5gUNJ.js} +3 -3
  109. package/assets/{index-DIGUl9iX.js → index-CRZSv11U.js} +1 -1
  110. package/assets/{index-Tfh0IyJl.js → index-CUV4Rf3F.js} +1 -1
  111. package/assets/{index-CbxN7Krq.js → index-ChF-gCVV.js} +1 -1
  112. package/assets/{index-Ct22HWuE.js → index-CiH0W5Hj.js} +1 -1
  113. package/assets/{index-BIulqLQL.js → index-Cj8JMZ6F.js} +1 -1
  114. package/assets/{index-Cq0eRfqs.js → index-CjBPO58E.js} +1 -1
  115. package/assets/{index-D8me2ig5.js → index-CjnhvTx0.js} +1 -1
  116. package/assets/{index-Bi4zgWjQ.js → index-CkTptFnK.js} +2 -2
  117. package/assets/{index-rFCcyY0H.js → index-ClDUuLhd.js} +1 -1
  118. package/assets/{index-DJVoIGkn.js → index-CnFuk6fK.js} +1 -1
  119. package/assets/{index-BzcxFNUz.js → index-Cok_sFK3.js} +1 -1
  120. package/assets/{index-BpbWCyB4.js → index-CvIOskBU.js} +1 -1
  121. package/assets/{index-85kWMWjg.js → index-CyMsSal1.js} +2 -2
  122. package/assets/{index-C2ZtkYpB.js → index-CzOo8tvO.js} +2 -2
  123. package/assets/{index-BlBcCTXj.js → index-D2i7N7FD.js} +1 -1
  124. package/assets/{index-BItUV6PM.js → index-D4mGcEtB.js} +1 -1
  125. package/assets/{index-BRKyx7oU.js → index-D7J0TuHz.js} +2 -2
  126. package/assets/{index-FFhK2B90.js → index-DIZEbKwM.js} +1 -1
  127. package/assets/{index-D0xvd_Dp.js → index-DIusB22U.js} +2 -2
  128. package/assets/{index-BRNsIe3m.js → index-DJCp8uIp.js} +1 -1
  129. package/assets/index-DYDor-ZM.css +1 -0
  130. package/assets/{index-BCWp_6cV.js → index-DcAG03_T.js} +1 -1
  131. package/assets/{index-DtYBJNaS.js → index-DdAgdwh_.js} +1 -1
  132. package/assets/{index-CJRmkopy.js → index-DeO2Srep.js} +2 -2
  133. package/assets/{index-sN6H-jhd.js → index-Dfv7PJQh.js} +1 -1
  134. package/assets/{index-CQbgtHPx.js → index-DjQcD_Sm.js} +1 -1
  135. package/assets/{index-cjI3Jxw7.js → index-DmSOW0PY.js} +1 -1
  136. package/assets/{index-CXgtaw1w.js → index-Dp2XIou0.js} +1 -1
  137. package/assets/{index-BmlDboHr.js → index-DsttSp14.js} +3 -3
  138. package/assets/{index-CIHaBruC.js → index-DuM3vKAV.js} +1 -1
  139. package/assets/{index-DlvbN_Av.js → index-DvbuNJKq.js} +1 -1
  140. package/assets/{index-CNpvozfL.js → index-DxHb67V2.js} +1 -1
  141. package/assets/index-Q9d0V8TZ.js +289 -0
  142. package/assets/{index-DoaLV6gK.js → index-VrPb_Zz5.js} +1 -1
  143. package/assets/{index-D_Osq35D.js → index-Wkl8TG1w.js} +1 -1
  144. package/assets/{index-BPKqBTdV.js → index-ZjDtH0Hr.js} +1 -1
  145. package/assets/{index-cA2ARKGJ.js → index-gcnUvFrd.js} +1 -1
  146. package/assets/{index-CPs7rZSr.js → index-riVFlKIa.js} +1 -1
  147. package/assets/{index-HRvlJsjj.js → index-tAmGgcla.js} +1 -1
  148. package/assets/{index-kbFINusp.js → index-uk-CfnlL.js} +1 -1
  149. package/assets/{index-BDN6djsw.js → index-zvLgVYhW.js} +1 -1
  150. package/assets/{index.es-BqAU2pak.js → index.es-BzMx-nup.js} +4 -4
  151. package/assets/{index.es-DLc2fyYi.js → index.es-DAd9yxMt.js} +1 -1
  152. package/assets/{index.es-C7FJOZk9.js → index.es-fI5nPWfV.js} +1 -1
  153. package/assets/{linkAccount-Coo42zCf.js → linkAccount-DKoZKguc.js} +1 -1
  154. package/assets/{localBatchGatewayRequest-aE453fG9.js → localBatchGatewayRequest-BIFDJTSD.js} +1 -1
  155. package/assets/{mana-rate-CFrZfrxV.js → mana-rate-CC-yyhWK.js} +1 -1
  156. package/assets/{native-0dhyeu0o.js → native-t1vLKS11.js} +1 -1
  157. package/assets/{networks-DYw-qqg1.js → networks-DkdE2sZd.js} +1 -1
  158. package/assets/{onramp-Dv5XffT1.js → onramp-C_i59kJR.js} +1 -1
  159. package/assets/{openzeppelin-DY9zonpF.js → openzeppelin-BMNh5qua.js} +1 -1
  160. package/assets/{ownerOf-DZ5adWxQ.js → ownerOf-Cl_sRHvA.js} +1 -1
  161. package/assets/{parseNft-BoqFzz1w.js → parseNft-CW-hWGBI.js} +2 -2
  162. package/assets/{parseSignature-_8ci0C1c.js → parseSignature-C3GhRBL-.js} +3 -3
  163. package/assets/{parseSignature-DLqUl44D.js → parseSignature-NZopg6IG.js} +1 -1
  164. package/assets/{passkeys-9jKCllXJ.js → passkeys-DuQQbJhZ.js} +1 -1
  165. package/assets/{pay-with-exchange-q2w3TOV5.js → pay-with-exchange-DH6Kt6OD.js} +1 -1
  166. package/assets/{prepare-contract-call-C3igYCn_.js → prepare-contract-call-DmYPUPWz.js} +1 -1
  167. package/assets/{qr-overlay-kE0-Tb5Q.js → qr-overlay-u2BzHEzf.js} +3 -3
  168. package/assets/{react-BMZSDQJw.js → react-BrLDncxD.js} +1 -1
  169. package/assets/{receive-BlDcpWqy.js → receive-D2V6X2tA.js} +1 -1
  170. package/assets/{resolveImplementation-u5UN_seG.js → resolveImplementation-BsuIKFkz.js} +1 -1
  171. package/assets/{rpc-hzBSsIuq.js → rpc-BIhelmqB.js} +1 -1
  172. package/assets/{secp256k1-DogjvjtS.js → secp256k1-BHmvTUzO.js} +1 -1
  173. package/assets/{secp256k1-CIm5iUJu.js → secp256k1-BtgeD6jy.js} +1 -1
  174. package/assets/{secp256k1-D_XLFIAD.js → secp256k1-hNsXkUex.js} +1 -1
  175. package/assets/{send-33Lvo35v.js → send-DkPpjCf1.js} +1 -1
  176. package/assets/{send-batch-transaction-DxqLfBgo.js → send-batch-transaction-Bt9-Q0FO.js} +1 -1
  177. package/assets/{send-eip712-transaction-BWi3gkm3.js → send-eip712-transaction-CJ8Dr-eb.js} +2 -2
  178. package/assets/send-gasless-transaction-D5eQ85CY.js +2 -0
  179. package/assets/{send-transaction-DN1HyeTa.js → send-transaction-BK1KmPMR.js} +2 -2
  180. package/assets/{sendRawTransaction-DqtJOwfz.js → sendRawTransaction-Ddh_tSjE.js} +3 -3
  181. package/assets/{sentry-8SzFotJj.js → sentry-DYZXk5O5.js} +1 -1
  182. package/assets/{serializeTransaction-DOUpHqmp.js → serializeTransaction-f04zsBlb.js} +1 -1
  183. package/assets/{session-proposal-BtkIO7cP.js → session-proposal-r1mPrmCX.js} +1 -1
  184. package/assets/{session-request-lsymM3l6.js → session-request-Cfr7jp2h.js} +2 -2
  185. package/assets/{sha256-CDuVPJMW.js → sha256-DM_yyL1v.js} +1 -1
  186. package/assets/{signing-Bskb_x4I.js → signing-C-mKTJFW.js} +3 -3
  187. package/assets/{socials-BrDjbXdD.js → socials-pmAt6WyL.js} +1 -1
  188. package/assets/{swaps-BcWPrBSV.js → swaps-XKJYQXAz.js} +1 -1
  189. package/assets/{thirdweb-Cpf8EN89.js → thirdweb-B_kKfwse.js} +3 -3
  190. package/assets/{to-serializable-transaction-gyjNAfk6.js → to-serializable-transaction-rhTmQPEU.js} +2 -2
  191. package/assets/{totalSupply-qMyfSB-2.js → totalSupply-DKYveUeg.js} +1 -1
  192. package/assets/{trade-encoding-vTSEXgN1.js → trade-encoding-CaZYjVNs.js} +1 -1
  193. package/assets/{transaction-DiMmwD2W.js → transaction-HL8b44XJ.js} +1 -1
  194. package/assets/{transactionReceipt-Bum6hzjL.js → transactionReceipt-BcU054L-.js} +1 -1
  195. package/assets/{transactions-D-Z-vxC7.js → transactions-lrp4i700.js} +1 -1
  196. package/assets/useCreditPacks-Be9cG5vr.js +1 -0
  197. package/assets/{useInfiniteGrid-COXciuKu.js → useInfiniteGrid-8c-8xSTi.js} +1 -1
  198. package/assets/{useStore-cTXMZhwG.js → useStore-Ccbed9Z-.js} +2 -2
  199. package/assets/useTheme-7-Mr4FFJ.js +1 -0
  200. package/assets/useTheme-C3YHg0O0.js +1 -0
  201. package/assets/{utils-DLyVQGg1.js → utils-5mrprTVL.js} +1 -1
  202. package/assets/{verifyHash-DOsO5RNA.js → verifyHash-z4q1c5J1.js} +1 -1
  203. package/assets/{w3m-modal-oBw-UuhI.js → w3m-modal-2GWsHPDh.js} +1 -1
  204. package/assets/{w3m-modal-D1Pu_W_3.js → w3m-modal-DUSXSzQv.js} +1 -1
  205. package/assets/{wait-for-tx-receipt-BYt5Gcy_.js → wait-for-tx-receipt-CAc2Bmoi.js} +1 -1
  206. package/assets/{wallets-uu9PjeR0.js → wallets-BD_QGCV9.js} +5 -5
  207. package/assets/{web-connector-Vwf5Urnw.js → web-connector-Da5xZh52.js} +3 -3
  208. package/assets/{writeContract-iaip-T2H.js → writeContract-zNHMPW7R.js} +1 -1
  209. package/assets/{zora-sepolia-sSAsjV_j.js → zora-sepolia-Bef01XwU.js} +1 -1
  210. package/assets/{zoraTestnet-EJHbKpn0.js → zoraTestnet-Csb8JMNL.js} +1 -1
  211. package/index.html +11 -11
  212. package/package.json +2 -2
  213. package/assets/Cart-pFVN5ROM.js +0 -3
  214. package/assets/Creator-DyLgE_Lq.js +0 -1
  215. package/assets/ItemDetail-BSqp8w-l.js +0 -78
  216. package/assets/MyAssets-BA5zCiVR.js +0 -258
  217. package/assets/PrimaryListModal-CQHoY5iG.js +0 -1
  218. package/assets/Success-CxrAGNmd.js +0 -98
  219. package/assets/browser-ponyfill-iWQHRc9C.js +0 -1
  220. package/assets/collection-DbmjhyjW.js +0 -1
  221. package/assets/decimals-8h3d0d0Q.js +0 -1
  222. package/assets/emotion-styled.browser.esm-rI_2ZiJm.js +0 -1
  223. package/assets/estimate-l1-fee-y9SYh7nZ.js +0 -1
  224. package/assets/eth_estimateGas-BhQqpdnq.js +0 -1
  225. package/assets/eth_getTransactionCount-Ca9PbmYY.js +0 -1
  226. package/assets/get-ecosystem-wallet-info-CSMzgHAT.js +0 -1
  227. package/assets/getNFT-yjjewJwo.js +0 -1
  228. package/assets/index-BA2L6eSl.css +0 -1
  229. package/assets/index-BsYYLNpm.js +0 -1
  230. package/assets/index-V0hMC6mZ.js +0 -289
  231. package/assets/send-gasless-transaction-CC-pEfDw.js +0 -2
  232. package/assets/useCreditPacks-BJp5mEnq.js +0 -1
  233. package/assets/useTheme-Cv3anIxV.js +0 -1
  234. package/assets/useTheme-DmdtRbZb.js +0 -1
@@ -1,11 +1,11 @@
1
- import{r as l,j as v}from"./react-BMZSDQJw.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/assets/DCL_LogoPattern-BryBPc3d.png",U=`
1
+ import{r as l,j as v}from"./react-BrLDncxD.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/DCL_LogoPattern-BryBPc3d.png",b=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
5
5
  v_uv = a_position * 0.5 + 0.5;
6
6
  gl_Position = vec4(a_position, 0.0, 1.0);
7
7
  }
8
- `,b=`
8
+ `,U=`
9
9
  precision highp float;
10
10
 
11
11
  uniform float u_time;
@@ -77,4 +77,4 @@ void main() {
77
77
 
78
78
  gl_FragColor = result;
79
79
  }
80
- `;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,U),c=g(e,e.FRAGMENT_SHADER,b);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const n=P(e,o,c);if(!n){e.deleteShader(o),e.deleteShader(c);return}const u=e.getAttribLocation(n,"a_position"),_=e.getUniformLocation(n,"u_time"),R=e.getUniformLocation(n,"u_resolution"),y=e.getUniformLocation(n,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let m=!1;const d=D(e,S,()=>m),A=()=>{const i=window.devicePixelRatio||1,x=r.clientWidth*i,E=r.clientHeight*i;(r.width!==x||r.height!==E)&&(r.width=x,r.height=E)},p=performance.now()/1e3,f=()=>{A(),e.viewport(0,0,r.width,r.height),e.useProgram(n),e.uniform1f(_,performance.now()/1e3-p),e.uniform2f(R,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.uniform1i(y,0),e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),a.current=requestAnimationFrame(f)},T=i=>{i.preventDefault(),cancelAnimationFrame(a.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),a.current=requestAnimationFrame(f),()=>{m=!0,cancelAnimationFrame(a.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(n),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(d)}},[]),v.jsxs("div",{className:"AnimatedBackground","aria-hidden":!0,children:[v.jsx("div",{className:"AnimatedBackground__fallback",style:{backgroundImage:`url(${w})`}}),v.jsx("canvas",{ref:t,className:"AnimatedBackground__canvas"})]})}export{L as default};
80
+ `;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,b),c=g(e,e.FRAGMENT_SHADER,U);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const n=P(e,o,c);if(!n){e.deleteShader(o),e.deleteShader(c);return}const u=e.getAttribLocation(n,"a_position"),_=e.getUniformLocation(n,"u_time"),R=e.getUniformLocation(n,"u_resolution"),y=e.getUniformLocation(n,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let m=!1;const d=D(e,S,()=>m),A=()=>{const i=window.devicePixelRatio||1,x=r.clientWidth*i,E=r.clientHeight*i;(r.width!==x||r.height!==E)&&(r.width=x,r.height=E)},p=performance.now()/1e3,f=()=>{A(),e.viewport(0,0,r.width,r.height),e.useProgram(n),e.uniform1f(_,performance.now()/1e3-p),e.uniform2f(R,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.uniform1i(y,0),e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),a.current=requestAnimationFrame(f)},T=i=>{i.preventDefault(),cancelAnimationFrame(a.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),a.current=requestAnimationFrame(f),()=>{m=!0,cancelAnimationFrame(a.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(n),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(d)}},[]),v.jsxs("div",{className:"AnimatedBackground","aria-hidden":!0,children:[v.jsx("div",{className:"AnimatedBackground__fallback",style:{backgroundImage:`url(${w})`}}),v.jsx("canvas",{ref:t,className:"AnimatedBackground__canvas"})]})}export{L as default};
@@ -1,4 +1,4 @@
1
- import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o as Qe,k as Ze,a3 as Xe,s,y as t,g as Te,h as Ye,j as ze,am as Ie,J as et,t as o,I as z,l as B,n as pe,q as D,r as tt,v as nt,u as Ne,z as st,A as K,aA as ot,aB as it}from"./index-V0hMC6mZ.js";import{r as rt,a as at,m as Ae}from"./mana-rate-CFrZfrxV.js";import{u as _e,M as lt}from"./MarketCheckout-BxM5rUvM.js";import{g as ct,h as dt,i as ft,j as pt,k as ut,C as xt,l as ht,o as mt,m as gt,n as bt,M as yt}from"./Assets.styles-JIZQe0rQ.js";import{d as ue,R as wt,F as jt,S as xe,b as vt}from"./categories-D7_Qudaw.js";import{L as $t}from"./LoadMore-BK9c312B.js";import{u as Ct}from"./useInfiniteGrid-COXciuKu.js";import{E as kt}from"./ErrorNotice-DDr3KjIH.js";import{d as St}from"./dcl-schemas-BICTSpB5.js";import{u as Rt,G as Et,w as Tt,S as zt}from"./buy-gasless-iZXsoGZN.js";import{s as It}from"./buy-CN2rC9a0.js";import{h as Nt}from"./trade-encoding-vTSEXgN1.js";import{f as At}from"./errors-BuvqNt2H.js";import{J as _t,C as Pt,B as ne}from"./ethers-Dpp9c5As.js";import{l as Mt}from"./loader-logo-BzY9EKdC.js";import{n as Lt}from"./emotion-CSxEP8yM.js";import"./sentry-8SzFotJj.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";import"./Tooltip-zazDSBbm.js";import"./authorizations-CsduRV0X.js";function J(n){const i=n.source??"item",f=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${i}:${f}`}const W="100000000000000000000",Pe=2,V=15,Bt=/^[a-zA-Z0-9]+$/;function he(n){const i=n.trim();return i.length===0?{ok:!1,reason:"empty"}:Bt.test(i)?i.length<Pe?{ok:!1,reason:"too-short"}:i.length>V?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Ft(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,V)}const Wt=["function available(string _subdomain) view returns (bool)"],me={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Ht(){return F.chainId===St.ChainId.MATIC_MAINNET?me.mainnet:me.sepolia}async function Ut(n,i={}){var d;const{rpc:f,address:u}=Ht(),l=new _t(f),c=new Pt(u,Wt,l);console.info(`[names] availability check → DCLRegistrar(${u}).available("${n}") on ${f}`);const x=await c.available(n);if((d=i.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${x}`),x?"available":"taken"}const Ot="https://app.across.to/api";class Me extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function qt(n){return at(W,n)}async function Gt(n,i,f={}){var d;const u=f.chainId??F.chainId,l=f.provider??"across",c=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${u}&provider=${l}`,x=await Xe(c,{method:"GET",identity:n,metadata:{}});if(!x.ok){let a;try{a=(d=await x.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Me:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function Dt(n,i){const f=ne.from(n.availableAmount),l=ne.from(W).sub(f);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:Nt(n.id)}],creditsSignatures:[n.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:W}}async function Vt(n,i={}){const f=Ot,u=i.intervalMs??1e4,l=i.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const d=await fetch(`${f}/deposit/status?originChainId=137&depositTxHash=${n}`);if(d.ok){const a=await d.json(),m=(a.status??"pending").toLowerCase(),w=a.fillTx??a.fillTxnRef??null,y=a.actionsSucceeded!==!1;if(m==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:y};if(m==="refunded"||m==="expired")return{status:m,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:w,actionsSucceeded:y}}}catch{}x<l-1&&await new Promise(d=>setTimeout(d,u))}return c}async function Kt(n){const{name:i,identity:f,signer:u}=n,l=n.chainId??F.chainId,c=n.provider??"across",x=(n.beneficiary??await u.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:i,buyer:x,chainId:l,provider:c});try{const m=await rt(l),w=qt(m);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:m});const y=await Gt(f,i,{chainId:l,provider:c});console.info("[names] step 2/6 route fetched",{target:y.externalCall.target,selector:y.externalCall.selector,provider:y.provider,quoteId:y.quoteId});const j=await Qe(f,w);if(d=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),ne.from(j.maxCreditedValue).lt(W))throw new Error("Credit under-sized for the name price");const C=Dt(j.credit,y);let h;try{h=await Rt({chainId:l,buyer:x,signer:u,args:C})}catch(b){if(!(b instanceof Et))throw b;h=await It(l,C,u)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:h}),await Tt(h),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:h}),c==="across"){const b=await Vt(h,n.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:h};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:h,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:h}}catch(m){if(console.error("[names] register failed — raw error:",m,{name:i,buyer:x,originConfirmed:a}),m instanceof zt)return{status:"pending",originTxHash:m.txHash};throw d&&!a&&await Ze(f,[d]).catch(()=>{}),m instanceof Me?m:new Error(At(m,"Couldn't register the name. Please try again.",{sale:!0}))}}const Jt=s.div`
1
+ import{a as Ke,r as p,j as e,b as Qe}from"./react-BrLDncxD.js";import{c as F,w as Ze,q as Je,L as Xe,s,F as t,d as Te,n as Ye,o as ze,j as Ie,e as et,t as o,I as z,h as B,v as pe,x as D,y as tt,z as nt,u as Ne,G as st,A as K,au as ot,av as it}from"./index-Q9d0V8TZ.js";import{r as rt,a as at,m as _e}from"./mana-rate-CC-yyhWK.js";import{u as Ae,M as lt}from"./MarketCheckout-0NCiBi_9.js";import{g as ct,h as dt,i as ft,j as pt,k as ut,C as xt,l as ht,o as mt,m as gt,n as bt,M as yt}from"./Assets.styles-CA7lhkqC.js";import{d as ue,R as wt,F as vt,S as xe,b as jt}from"./categories-CQMvcQ_A.js";import{L as $t}from"./LoadMore-DwH_uJJ9.js";import{u as Ct}from"./useInfiniteGrid-8c-8xSTi.js";import{E as kt}from"./ErrorNotice-BDH9xoG4.js";import{d as St}from"./dcl-schemas-BICTSpB5.js";import{u as Rt,G as Et,w as Tt,S as zt}from"./buy-gasless-Sy6Gurph.js";import{s as It}from"./buy-C5J6mAtx.js";import{h as Nt}from"./trade-encoding-CaZYjVNs.js";import{f as _t}from"./errors-B2rT3Gvo.js";import{J as At,C as Pt,B as ne}from"./ethers-CLB2z3On.js";import{l as Mt}from"./loader-logo-BzY9EKdC.js";import{n as Lt}from"./emotion-CSxEP8yM.js";import"./sentry-DYZXk5O5.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";import"./Tooltip-CYItdKnL.js";import"./authorizations-C600xDT9.js";function Q(n){const i=n.source??"item",f=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${i}:${f}`}const W="100000000000000000000",Pe=2,V=15,Bt=/^[a-zA-Z0-9]+$/;function he(n){const i=n.trim();return i.length===0?{ok:!1,reason:"empty"}:Bt.test(i)?i.length<Pe?{ok:!1,reason:"too-short"}:i.length>V?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Ft(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,V)}const Wt=["function available(string _subdomain) view returns (bool)"],me={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Ht(){return F.chainId===St.ChainId.MATIC_MAINNET?me.mainnet:me.sepolia}async function Ut(n,i={}){var d;const{rpc:f,address:u}=Ht(),l=new At(f),c=new Pt(u,Wt,l);console.info(`[names] availability check → DCLRegistrar(${u}).available("${n}") on ${f}`);const x=await c.available(n);if((d=i.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${x}`),x?"available":"taken"}const Ot="https://app.across.to/api";class Me extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Gt(n){return at(W,n)}async function qt(n,i,f={}){var d;const u=f.chainId??F.chainId,l=f.provider??"across",c=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${u}&provider=${l}`,x=await Xe(c,{method:"GET",identity:n,metadata:{}});if(!x.ok){let a;try{a=(d=await x.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Me:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function Dt(n,i){const f=ne.from(n.availableAmount),l=ne.from(W).sub(f);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:Nt(n.id)}],creditsSignatures:[n.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:W}}async function Vt(n,i={}){const f=Ot,u=i.intervalMs??1e4,l=i.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const d=await fetch(`${f}/deposit/status?originChainId=137&depositTxHash=${n}`);if(d.ok){const a=await d.json(),m=(a.status??"pending").toLowerCase(),w=a.fillTx??a.fillTxnRef??null,y=a.actionsSucceeded!==!1;if(m==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:y};if(m==="refunded"||m==="expired")return{status:m,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:w,actionsSucceeded:y}}}catch{}x<l-1&&await new Promise(d=>setTimeout(d,u))}return c}async function Kt(n){const{name:i,identity:f,signer:u}=n,l=n.chainId??F.chainId,c=n.provider??"across",x=(n.beneficiary??await u.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:i,buyer:x,chainId:l,provider:c});try{const m=await rt(l),w=Gt(m);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:m});const y=await qt(f,i,{chainId:l,provider:c});console.info("[names] step 2/6 route fetched",{target:y.externalCall.target,selector:y.externalCall.selector,provider:y.provider,quoteId:y.quoteId});const v=await Ze(f,w);if(d=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),ne.from(v.maxCreditedValue).lt(W))throw new Error("Credit under-sized for the name price");const C=Dt(v.credit,y);let h;try{h=await Rt({chainId:l,buyer:x,signer:u,args:C})}catch(b){if(!(b instanceof Et))throw b;h=await It(l,C,u)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:h}),await Tt(h),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:h}),c==="across"){const b=await Vt(h,n.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:h};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:h,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:h}}catch(m){if(console.error("[names] register failed — raw error:",m,{name:i,buyer:x,originConfirmed:a}),m instanceof zt)return{status:"pending",originTxHash:m.txHash};throw d&&!a&&await Je(f,[d]).catch(()=>{}),m instanceof Me?m:new Error(_t(m,"Couldn't register the name. Please try again.",{sale:!0}))}}const Qt=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -7,7 +7,7 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
7
7
  justify-content: center;
8
8
  padding: 16px;
9
9
  background: rgba(22, 21, 24, 0.55);
10
- `,Qt=s.div`
10
+ `,Zt=s.div`
11
11
  width: 560px;
12
12
  max-width: 100%;
13
13
  max-height: 92vh;
@@ -69,11 +69,11 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
69
69
  height: 16px;
70
70
  color: ${t.colors.brandViolet};
71
71
  }
72
- `,je=s.hr`
72
+ `,ve=s.hr`
73
73
  border: 0;
74
74
  border-top: 1px solid ${t.colors.line};
75
75
  margin: 16px 0;
76
- `,ve=s.div`
76
+ `,je=s.div`
77
77
  display: flex;
78
78
  align-items: center;
79
79
  gap: 16px;
@@ -127,7 +127,7 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
127
127
  height: 22px;
128
128
  color: ${t.colors.brandViolet};
129
129
  }
130
- `,Zt=s.div`
130
+ `,Jt=s.div`
131
131
  margin-top: 16px;
132
132
  padding: 16px;
133
133
  border-radius: 12px;
@@ -366,10 +366,10 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
366
366
  flex: none;
367
367
  color: ${t.colors.dclRed};
368
368
  }
369
- `;function bn({name:n,priceCredits:i,onClose:f}){const{session:u}=Te(),{data:l,isError:c}=Ye(u),x=ze(),d=Ke(),[a,m]=p.useState("confirm"),[w,y]=p.useState(""),[j,C]=p.useState(null),h=p.useRef(!1),b=w.trim().toLowerCase()===n.toLowerCase(),v=a==="completing",S=i!=null?Ie(i):"—";p.useEffect(()=>{const g=N=>{N.key==="Escape"&&!v&&f()};document.addEventListener("keydown",g);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=H}},[v,f]);async function k(){if(!(!u||!b||h.current)){h.current=!0,m("completing"),C(null);try{await Kt({name:n,identity:u.identity,signer:u.signer}),D("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null}),x.invalidateQueries({queryKey:["usd-balance"]}),m("success")}catch(g){D(nt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:tt(g),purchase_type:"name"}),C((g==null?void 0:g.message)||o("names.errorGeneric")),m("error")}finally{h.current=!1}}}const I=a!=="success",R=et(u==null?void 0:u.providerType);return e.jsx(Jt,{onClick:v?void 0:f,role:"presentation",children:e.jsxs(Qt,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[I&&e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(be,{children:a==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(ye,{onClick:f,disabled:v,"aria-label":o("buyModal.close"),children:e.jsx(z,{name:"close"})})]}),e.jsxs(we,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",pe(l,c)]}),e.jsx(je,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ve,{children:[e.jsx($e,{"aria-hidden":!0,children:"@"}),e.jsxs(Ce,{children:[e.jsxs(ke,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Se,{children:o("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(B,{}),S]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(gn,{children:[e.jsx(z,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ee,{onClick:()=>m("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Zt,{children:[e.jsx(Xt,{children:o("names.confirmTitle")}),e.jsx(Yt,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${yn(n)}</b>`})}}),e.jsxs(en,{children:[e.jsx(tn,{"aria-hidden":!0,children:"@"}),e.jsx(nn,{value:w,onChange:g=>y(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(sn,{children:".dcl.eth"})]})]}),e.jsx(Ee,{onClick:()=>void k(),disabled:!b||!u,children:o("names.buyCta")})]})]}),a==="completing"&&e.jsxs(on,{children:[e.jsx(rn,{src:Mt,alt:"",width:56,height:56}),e.jsx(an,{children:R?o("names.confirming"):o("names.completing")}),e.jsxs(ln,{children:[e.jsx(cn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(dn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(be,{children:o("names.successHeaderTitle")}),e.jsx(ye,{onClick:f,"aria-label":o("buyModal.close"),children:e.jsx(z,{name:"close"})})]}),e.jsxs(we,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",pe(l,c)]}),e.jsx(je,{}),e.jsxs(fn,{children:[e.jsx(pn,{"aria-hidden":!0,children:e.jsx(z,{name:"check"})}),e.jsxs(un,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(ve,{style:{marginTop:20},children:[e.jsx($e,{"aria-hidden":!0,children:"@"}),e.jsxs(Ce,{children:[e.jsxs(ke,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Se,{children:o("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(B,{}),S]})]}),e.jsxs(xn,{children:[e.jsx(hn,{onClick:()=>{f(),d("/my-assets")},children:o("names.myItems")}),e.jsx(mn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function yn(n){return n.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i])}const wn=s.div`
369
+ `;function bn({name:n,priceCredits:i,onClose:f}){const{session:u}=Te(),{data:l,isError:c}=Ye(u),x=ze(),d=Ke(),[a,m]=p.useState("confirm"),[w,y]=p.useState(""),[v,C]=p.useState(null),h=p.useRef(!1),b=w.trim().toLowerCase()===n.toLowerCase(),j=a==="completing",S=i!=null?Ie(i):"—";p.useEffect(()=>{const g=N=>{N.key==="Escape"&&!j&&f()};document.addEventListener("keydown",g);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=H}},[j,f]);async function k(){if(!(!u||!b||h.current)){h.current=!0,m("completing"),C(null);try{await Kt({name:n,identity:u.identity,signer:u.signer}),D("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null}),x.invalidateQueries({queryKey:["usd-balance"]}),m("success")}catch(g){D(nt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:tt(g),purchase_type:"name"}),C((g==null?void 0:g.message)||o("names.errorGeneric")),m("error")}finally{h.current=!1}}}const I=a!=="success",R=et(u==null?void 0:u.providerType);return e.jsx(Qt,{onClick:j?void 0:f,role:"presentation",children:e.jsxs(Zt,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[I&&e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(be,{children:a==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(ye,{onClick:f,disabled:j,"aria-label":o("buyModal.close"),children:e.jsx(z,{name:"close"})})]}),e.jsxs(we,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",pe(l,c)]}),e.jsx(ve,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(je,{children:[e.jsx($e,{"aria-hidden":!0,children:"@"}),e.jsxs(Ce,{children:[e.jsxs(ke,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Se,{children:o("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(B,{}),S]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(gn,{children:[e.jsx(z,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(Ee,{onClick:()=>m("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Jt,{children:[e.jsx(Xt,{children:o("names.confirmTitle")}),e.jsx(Yt,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${yn(n)}</b>`})}}),e.jsxs(en,{children:[e.jsx(tn,{"aria-hidden":!0,children:"@"}),e.jsx(nn,{value:w,onChange:g=>y(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(sn,{children:".dcl.eth"})]})]}),e.jsx(Ee,{onClick:()=>void k(),disabled:!b||!u,children:o("names.buyCta")})]})]}),a==="completing"&&e.jsxs(on,{children:[e.jsx(rn,{src:Mt,alt:"",width:56,height:56}),e.jsx(an,{children:R?o("names.confirming"):o("names.completing")}),e.jsxs(ln,{children:[e.jsx(cn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(dn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(be,{children:o("names.successHeaderTitle")}),e.jsx(ye,{onClick:f,"aria-label":o("buyModal.close"),children:e.jsx(z,{name:"close"})})]}),e.jsxs(we,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",pe(l,c)]}),e.jsx(ve,{}),e.jsxs(fn,{children:[e.jsx(pn,{"aria-hidden":!0,children:e.jsx(z,{name:"check"})}),e.jsxs(un,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(je,{style:{marginTop:20},children:[e.jsx($e,{"aria-hidden":!0,children:"@"}),e.jsxs(Ce,{children:[e.jsxs(ke,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Se,{children:o("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(B,{}),S]})]}),e.jsxs(xn,{children:[e.jsx(hn,{onClick:()=>{f(),d("/my-assets")},children:o("names.myItems")}),e.jsx(mn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function yn(n){return n.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i])}const wn=s.div`
370
370
  width: 100%;
371
371
  min-width: 0;
372
- `,jn=s.nav`
372
+ `,vn=s.nav`
373
373
  display: flex;
374
374
  align-items: center;
375
375
  gap: 6px;
@@ -378,7 +378,7 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
378
378
  font-size: 12px;
379
379
  line-height: 1;
380
380
  color: ${t.colors.muted};
381
- `,vn=s.button`
381
+ `,jn=s.button`
382
382
  border: 0;
383
383
  background: none;
384
384
  padding: 0;
@@ -491,7 +491,7 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
491
491
  ${t.media.down("mobile")} {
492
492
  font-size: 16px;
493
493
  }
494
- `,An=s.div`
494
+ `,_n=s.div`
495
495
  position: absolute;
496
496
  top: calc(100% + 8px);
497
497
  left: 0;
@@ -516,7 +516,7 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
516
516
  align-items: flex-start;
517
517
  flex-wrap: wrap;
518
518
  }
519
- `,_n=s.a`
519
+ `,An=s.a`
520
520
  display: inline-flex;
521
521
  align-items: center;
522
522
  gap: 2px;
@@ -645,7 +645,7 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
645
645
  width: 16px;
646
646
  height: 16px;
647
647
  }
648
- `,Q=s.div`
648
+ `,Z=s.div`
649
649
  display: flex;
650
650
  align-items: center;
651
651
  gap: 8px;
@@ -686,7 +686,7 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
686
686
  ${t.media.down("mobile")} {
687
687
  font-size: 22px;
688
688
  }
689
- `,qn=s.div`
689
+ `,Gn=s.div`
690
690
  display: flex;
691
691
  gap: 48px;
692
692
  align-items: stretch;
@@ -695,7 +695,7 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
695
695
  flex-direction: column;
696
696
  gap: 24px;
697
697
  }
698
- `,Z=s.article`
698
+ `,J=s.article`
699
699
  flex: 1 0 0;
700
700
  min-width: 0;
701
701
  display: flex;
@@ -723,7 +723,7 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
723
723
  font-size: 14px;
724
724
  line-height: 1.57;
725
725
  color: ${t.colors.text};
726
- `,Gn=s.a`
726
+ `,qn=s.a`
727
727
  display: inline-flex;
728
728
  align-items: center;
729
729
  gap: 4px;
@@ -755,4 +755,4 @@ import{u as Ke,r as p,j as e,a as Je}from"./react-BMZSDQJw.js";import{c as F,o a
755
755
  clip: rect(0, 0, 0, 0);
756
756
  white-space: nowrap;
757
757
  border: 0;
758
- `,Kn="https://docs.decentraland.org/creator/worlds/about/";function Jn(n){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function Qn({onBack:n}){Ne({title:o("seo.names.title"),description:o("seo.names.description")});const{session:i,signIn:f}=Te(),{data:u}=_e(),l=u?Ae(W,u):null,[c,x]=p.useState(""),[d,a]=p.useState("idle"),[m,w]=p.useState(!1),y=p.useRef(null),[j,C]=p.useState(void 0);p.useLayoutEffect(()=>{y.current&&C(y.current.offsetWidth)},[c]),p.useEffect(()=>{if(!he(c).ok){a(c.length===0?"idle":"invalid");return}a("checking");const I=new AbortController,R=setTimeout(()=>{(async()=>{try{const g=await Ut(c,{signal:I.signal});a(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(R),I.abort()}},[c]);const h=he(c),b=h.ok&&(d==="available"||d==="error");function v(){if(b){if(!i){f();return}w(!0)}}const S=e.jsxs(e.Fragment,{children:[o("names.claim"),l!=null?e.jsxs(Hn,{children:[e.jsx(B,{}),Ie(l)]}):null]});return e.jsxs(wn,{"data-testid":"names-page",children:[e.jsxs(jn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(vn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx($n,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Cn,{children:[e.jsxs(kn,{children:[e.jsxs(Sn,{children:[e.jsx(Rn,{children:o("names.heroTitle")}),e.jsx(En,{children:o("names.heroSubtitle")})]}),e.jsxs(Tn,{children:[e.jsxs(zn,{children:[e.jsxs(In,{invalid:d==="taken",children:[e.jsxs(Pn,{children:[e.jsx(Mn,{"aria-hidden":!0,children:"@"}),e.jsx(Ln,{value:c,onChange:k=>x(Ft(k.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:V,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Nn,{ref:y,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(Bn,{children:o("names.suffix")})]}),c.length>0?e.jsxs(Fn,{"aria-hidden":!0,children:[c.length,"/",V]}):null,e.jsx(Le,{onClick:v,disabled:!b,"data-testid":"names-claim",children:S})]}),d==="taken"?e.jsxs(An,{role:"status","data-testid":"names-taken",children:[e.jsx(z,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(_n,{href:Jn(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(z,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Wn,{onClick:v,disabled:!b,children:S}),d==="checking"?e.jsx(Q,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):d==="error"?e.jsx(Q,{tone:"muted",role:"status",children:o("names.checkError")}):d==="invalid"&&!h.ok&&h.reason==="too-short"?e.jsx(Q,{tone:"muted",role:"status",children:o("names.tooShort",{min:Pe})}):null,e.jsx(Vn,{role:"status","aria-live":"polite",children:d==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(Un,{children:[e.jsx(On,{children:o("names.whyTitle")}),e.jsxs(qn,{children:[e.jsxs(Z,{children:[e.jsx(X,{"aria-hidden":!0}),e.jsx(Y,{children:e.jsx(ee,{children:o("names.why1")})})]}),e.jsxs(Z,{children:[e.jsx(X,{"aria-hidden":!0}),e.jsxs(Y,{children:[e.jsx(ee,{children:o("names.why2")}),e.jsxs(Gn,{href:Kn,target:"_blank",rel:"noopener noreferrer",children:[o("names.why2Link"),e.jsx(z,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(Z,{children:[e.jsx(X,{"aria-hidden":!0}),e.jsxs(Y,{children:[e.jsx(ee,{children:o("names.why3")}),e.jsx(Dn,{children:o("names.why3Link")})]})]})]})]})]}),m?e.jsx(bn,{name:c,priceCredits:l,onClose:()=>w(!1)}):null]})}const te=48;function Zn(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function ws(){const[n]=Je(),i=(n.get("q")??"").trim().toLowerCase(),f=ze(),u=(n.get("q")??"").trim();Ne({title:u?o("seo.collectibles.searchTitle",{query:u}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[l,c]=p.useState("wearable"),[x,d]=p.useState(null),[a,m]=p.useState([]),[w,y]=p.useState(""),[j,C]=p.useState(""),[h,b]=p.useState("on_sale"),[v,S]=p.useState(!1),[k,I]=p.useState("newest"),[R,g]=p.useState(!1),[H,N]=p.useState(null);p.useEffect(()=>{if(!R)return;const r=L=>{L.key==="Escape"&&g(!1)};document.addEventListener("keydown",r);const $=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=$}},[R]);const U=h==="on_sale",A=w&&!Number.isNaN(Number(w))?Number(w):void 0,_=j&&!Number.isNaN(Number(j))?Number(j):void 0,se=x?vt[x]:void 0,oe=(ue.find(r=>r.key===k)??ue[0]).server,ie={category:l,rarities:a.length?a:void 0,wearableCategories:se,minPriceCredits:A,maxPriceCredits:_,search:i||void 0,sortBy:oe,isSmart:v||void 0,onSale:!0},re={category:l,rarities:a.length?a:void 0,wearableCategories:se,search:i||void 0,sortBy:oe,isWearableSmart:v||void 0,isOnSale:h==="not_for_sale"?!1:void 0},{items:P,total:ae,isLoading:E,isPlaceholderData:T,error:Be,hasNextPage:Fe,isFetchingNextPage:le,fetchNextPage:We}=Ct(U?["unified-listings",ie]:["catalog-items",re],r=>U?ot({...ie,first:te,skip:r}):it({...re,first:te,skip:r}),{enabled:l!=="names"}),O=ae,He=E||T,Ue=E?15:Math.min(Math.max(P.length,1),te),{data:q,isError:Oe}=_e(),qe=r=>q&&r.manaWei?Ae(r.manaWei,q):null,ce=p.useRef(null);p.useEffect(()=>{E||T||!i||ce.current===i||(ce.current=i,D("Shop Searched",{query:i,result_count:O}))},[i,E,T,O]);const G=p.useRef("__init__");p.useEffect(()=>{if(E||T)return;const r=JSON.stringify({category:l,subCategory:x,rarities:a,min:A,max:_,sort:k,status:h,smart:v});if(G.current==="__init__"||G.current===r){G.current=r;return}G.current=r,D("Shop Applied Filter",{filters:{category:l,sub_category:x,rarities:a,min_price_credits:A??null,max_price_credits:_??null,status:h,smart:v,sort:k},result_count:O})},[l,x,a,A,_,k,h,v,E,T,O]);function de(r){c(r),d(null)}function fe(r){m($=>$.includes(r)?$.filter(L=>L!==r):[...$,r])}function Ge(){c("wearable"),d(null),m([]),y(""),C(""),b("on_sale"),S(!1)}function De(r){const $=P.find(L=>L.id===r.id);$&&$.source==="legacy"&&$.manaWei&&N(Zn($))}function Ve(){f.invalidateQueries({queryKey:["unified-listings"]})}const M=[];(A!=null||_!=null)&&M.push({key:"price",label:o("filter.price"),onRemove:()=>{y(""),C("")}});for(const r of wt)a.includes(r)&&M.push({key:`rarity-${r}`,label:st(r),onRemove:()=>fe(r)});return v&&M.push({key:"smart",label:o("filter.smart"),onRemove:()=>S(!1)}),h!=="on_sale"&&M.push({key:"status",label:h==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>b("on_sale")}),e.jsxs(ct,{"data-testid":"browse",children:[l!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(dt,{onClick:()=>g(!1),"aria-hidden":!0}):null,e.jsxs(ft,{className:R?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(pt,{children:[e.jsx(ut,{children:o("assets.filters")}),e.jsx(xt,{onClick:()=>g(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(ht,{children:e.jsx(mt,{category:l,subCategory:x,onCategory:de,onSub:d,priceMin:w,priceMax:j,onPriceMin:y,onPriceMax:C,rarities:a,onToggleRarity:fe,status:h,onStatus:b,smart:v,onSmart:S})}),e.jsx(gt,{children:e.jsx(bt,{type:"button",onClick:()=>g(!1),children:o("assets.showItems")})})]})]}),e.jsx(yt,{children:l==="names"?e.jsx(Qn,{onBack:()=>de("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(jt,{sort:k,onSort:I,total:ae,loading:E||T,query:i,onOpenFilters:()=>g(!0),chips:M,onClearChips:Ge}),Oe&&U&&P.some(r=>r.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,Be?e.jsx(kt,{message:o("assets.loadError"),testId:"browse-error"}):null,e.jsx("div",{className:"grid","data-testid":"grid",children:He?e.jsx(xe,{count:Ue}):e.jsxs(e.Fragment,{children:[P.map(r=>{if(!U)return e.jsx(K,{item:r,mode:"view"},J(r));const $=r;return $.source==="legacy"?e.jsx(K,{item:$,mode:"market",marketPriceCredits:qe($),onBuyNow:De},J(r)):e.jsx(K,{item:r},J(r))}),le?e.jsx(xe,{count:6}):null]})}),e.jsx($t,{hasNextPage:Fe,isFetching:le,onLoadMore:()=>void We()}),!E&&!T&&P.length===0?e.jsx("p",{className:"muted",children:o("assets.noItems")}):null]})}),H&&q?e.jsx(lt,{listing:H,rate:q,onClose:()=>N(null),onSold:()=>{N(null),Ve()}}):null]})}export{ws as Assets};
758
+ `,Kn="https://docs.decentraland.org/creator/worlds/about/";function Qn(n){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function Zn({onBack:n}){Ne({title:o("seo.names.title"),description:o("seo.names.description")});const{session:i,signIn:f}=Te(),{data:u}=Ae(),l=u?_e(W,u):null,[c,x]=p.useState(""),[d,a]=p.useState("idle"),[m,w]=p.useState(!1),y=p.useRef(null),[v,C]=p.useState(void 0);p.useLayoutEffect(()=>{y.current&&C(y.current.offsetWidth)},[c]),p.useEffect(()=>{if(!he(c).ok){a(c.length===0?"idle":"invalid");return}a("checking");const I=new AbortController,R=setTimeout(()=>{(async()=>{try{const g=await Ut(c,{signal:I.signal});a(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(R),I.abort()}},[c]);const h=he(c),b=h.ok&&(d==="available"||d==="error");function j(){if(b){if(!i){f();return}w(!0)}}const S=e.jsxs(e.Fragment,{children:[o("names.claim"),l!=null?e.jsxs(Hn,{children:[e.jsx(B,{}),Ie(l)]}):null]});return e.jsxs(wn,{"data-testid":"names-page",children:[e.jsxs(vn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(jn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx($n,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Cn,{children:[e.jsxs(kn,{children:[e.jsxs(Sn,{children:[e.jsx(Rn,{children:o("names.heroTitle")}),e.jsx(En,{children:o("names.heroSubtitle")})]}),e.jsxs(Tn,{children:[e.jsxs(zn,{children:[e.jsxs(In,{invalid:d==="taken",children:[e.jsxs(Pn,{children:[e.jsx(Mn,{"aria-hidden":!0,children:"@"}),e.jsx(Ln,{value:c,onChange:k=>x(Ft(k.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:V,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Nn,{ref:y,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(Bn,{children:o("names.suffix")})]}),c.length>0?e.jsxs(Fn,{"aria-hidden":!0,children:[c.length,"/",V]}):null,e.jsx(Le,{onClick:j,disabled:!b,"data-testid":"names-claim",children:S})]}),d==="taken"?e.jsxs(_n,{role:"status","data-testid":"names-taken",children:[e.jsx(z,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(An,{href:Qn(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(z,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Wn,{onClick:j,disabled:!b,children:S}),d==="checking"?e.jsx(Z,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):d==="error"?e.jsx(Z,{tone:"muted",role:"status",children:o("names.checkError")}):d==="invalid"&&!h.ok&&h.reason==="too-short"?e.jsx(Z,{tone:"muted",role:"status",children:o("names.tooShort",{min:Pe})}):null,e.jsx(Vn,{role:"status","aria-live":"polite",children:d==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(Un,{children:[e.jsx(On,{children:o("names.whyTitle")}),e.jsxs(Gn,{children:[e.jsxs(J,{children:[e.jsx(X,{"aria-hidden":!0}),e.jsx(Y,{children:e.jsx(ee,{children:o("names.why1")})})]}),e.jsxs(J,{children:[e.jsx(X,{"aria-hidden":!0}),e.jsxs(Y,{children:[e.jsx(ee,{children:o("names.why2")}),e.jsxs(qn,{href:Kn,target:"_blank",rel:"noopener noreferrer",children:[o("names.why2Link"),e.jsx(z,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(J,{children:[e.jsx(X,{"aria-hidden":!0}),e.jsxs(Y,{children:[e.jsx(ee,{children:o("names.why3")}),e.jsx(Dn,{children:o("names.why3Link")})]})]})]})]})]}),m?e.jsx(bn,{name:c,priceCredits:l,onClose:()=>w(!1)}):null]})}const te=48;function Jn(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function ws(){const[n]=Qe(),i=(n.get("q")??"").trim().toLowerCase(),f=ze(),u=(n.get("q")??"").trim();Ne({title:u?o("seo.collectibles.searchTitle",{query:u}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[l,c]=p.useState("wearable"),[x,d]=p.useState(null),[a,m]=p.useState([]),[w,y]=p.useState(""),[v,C]=p.useState(""),[h,b]=p.useState("on_sale"),[j,S]=p.useState(!1),[k,I]=p.useState("newest"),[R,g]=p.useState(!1),[H,N]=p.useState(null);p.useEffect(()=>{if(!R)return;const r=L=>{L.key==="Escape"&&g(!1)};document.addEventListener("keydown",r);const $=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=$}},[R]);const U=h==="on_sale",_=w&&!Number.isNaN(Number(w))?Number(w):void 0,A=v&&!Number.isNaN(Number(v))?Number(v):void 0,se=x?jt[x]:void 0,oe=(ue.find(r=>r.key===k)??ue[0]).server,ie={category:l,rarities:a.length?a:void 0,wearableCategories:se,minPriceCredits:_,maxPriceCredits:A,search:i||void 0,sortBy:oe,isSmart:j||void 0,onSale:!0},re={category:l,rarities:a.length?a:void 0,wearableCategories:se,search:i||void 0,sortBy:oe,isWearableSmart:j||void 0,isOnSale:h==="not_for_sale"?!1:void 0},{items:P,total:ae,isLoading:E,isPlaceholderData:T,error:Be,hasNextPage:Fe,isFetchingNextPage:le,fetchNextPage:We}=Ct(U?["unified-listings",ie]:["catalog-items",re],r=>U?ot({...ie,first:te,skip:r}):it({...re,first:te,skip:r}),{enabled:l!=="names"}),O=ae,He=E||T,Ue=E?15:Math.min(Math.max(P.length,1),te),{data:G,isError:Oe}=Ae(),Ge=r=>G&&r.manaWei?_e(r.manaWei,G):null,ce=p.useRef(null);p.useEffect(()=>{E||T||!i||ce.current===i||(ce.current=i,D("Shop Searched",{query:i,result_count:O}))},[i,E,T,O]);const q=p.useRef("__init__");p.useEffect(()=>{if(E||T)return;const r=JSON.stringify({category:l,subCategory:x,rarities:a,min:_,max:A,sort:k,status:h,smart:j});if(q.current==="__init__"||q.current===r){q.current=r;return}q.current=r,D("Shop Applied Filter",{filters:{category:l,sub_category:x,rarities:a,min_price_credits:_??null,max_price_credits:A??null,status:h,smart:j,sort:k},result_count:O})},[l,x,a,_,A,k,h,j,E,T,O]);function de(r){c(r),d(null)}function fe(r){m($=>$.includes(r)?$.filter(L=>L!==r):[...$,r])}function qe(){c("wearable"),d(null),m([]),y(""),C(""),b("on_sale"),S(!1)}function De(r){const $=P.find(L=>L.id===r.id);$&&$.source==="legacy"&&$.manaWei&&N(Jn($))}function Ve(){f.invalidateQueries({queryKey:["unified-listings"]})}const M=[];(_!=null||A!=null)&&M.push({key:"price",label:o("filter.price"),onRemove:()=>{y(""),C("")}});for(const r of wt)a.includes(r)&&M.push({key:`rarity-${r}`,label:st(r),onRemove:()=>fe(r)});return j&&M.push({key:"smart",label:o("filter.smart"),onRemove:()=>S(!1)}),h!=="on_sale"&&M.push({key:"status",label:h==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>b("on_sale")}),e.jsxs(ct,{"data-testid":"browse",children:[l!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(dt,{onClick:()=>g(!1),"aria-hidden":!0}):null,e.jsxs(ft,{className:R?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(pt,{children:[e.jsx(ut,{children:o("assets.filters")}),e.jsx(xt,{onClick:()=>g(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(ht,{children:e.jsx(mt,{category:l,subCategory:x,onCategory:de,onSub:d,priceMin:w,priceMax:v,onPriceMin:y,onPriceMax:C,rarities:a,onToggleRarity:fe,status:h,onStatus:b,smart:j,onSmart:S})}),e.jsx(gt,{children:e.jsx(bt,{type:"button",onClick:()=>g(!1),children:o("assets.showItems")})})]})]}),e.jsx(yt,{children:l==="names"?e.jsx(Zn,{onBack:()=>de("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(vt,{sort:k,onSort:I,total:ae,loading:E||T,query:i,onOpenFilters:()=>g(!0),chips:M,onClearChips:qe}),Oe&&U&&P.some(r=>r.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,Be?e.jsx(kt,{message:o("assets.loadError"),testId:"browse-error"}):null,e.jsx("div",{className:"grid","data-testid":"grid",children:He?e.jsx(xe,{count:Ue}):e.jsxs(e.Fragment,{children:[P.map(r=>{if(!U)return e.jsx(K,{item:r,mode:"view"},Q(r));const $=r;return $.source==="legacy"?e.jsx(K,{item:$,mode:"market",marketPriceCredits:Ge($),onBuyNow:De},Q(r)):e.jsx(K,{item:r},Q(r))}),le?e.jsx(xe,{count:6}):null]})}),e.jsx($t,{hasNextPage:Fe,isFetching:le,onLoadMore:()=>void We()}),!E&&!T&&P.length===0?e.jsx("p",{className:"muted",children:o("assets.noItems")}):null]})}),H&&G?e.jsx(lt,{listing:H,rate:G,onClose:()=>N(null),onSold:()=>{N(null),Ve()}}):null]})}export{ws as Assets};
@@ -1,9 +1,9 @@
1
- import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c as se}from"./categories-D7_Qudaw.js";import{T as ne}from"./Tooltip-zazDSBbm.js";import{y as e,s as o,I as u,t as n,z as re,C as v}from"./index-V0hMC6mZ.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
1
+ import{r as y,j as t}from"./react-BrLDncxD.js";import{R as z,a as oe,C as ie,c as ne}from"./categories-CQMvcQ_A.js";import{T as se}from"./Tooltip-CYItdKnL.js";import{F as e,s as o,I as m,t as s,G as re,C as v}from"./index-Q9d0V8TZ.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
5
5
  width: 100%;
6
- `,j=o.div`
6
+ `,k=o.div`
7
7
  height: 1px;
8
8
  background: ${e.colors.media};
9
9
  width: 100%;
@@ -59,7 +59,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
59
59
  ${e.media.up("lg")} {
60
60
  display: none;
61
61
  }
62
- `,xe=o("p",c("desktopHidden"))`
62
+ `,he=o("p",c("desktopHidden"))`
63
63
  margin: 0;
64
64
  padding: 0 4px 4px;
65
65
  font-family: ${e.font.sans};
@@ -70,7 +70,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
70
70
  text-transform: capitalize;
71
71
 
72
72
  ${({desktopHidden:i})=>i?`${e.media.up("lg")} { display: none; }`:""}
73
- `,he=o("div",c("open","desktopStatic"))`
73
+ `,xe=o("div",c("open","desktopStatic"))`
74
74
  display: grid;
75
75
  grid-template-rows: ${({open:i})=>i?"1fr":"0fr"};
76
76
  transition: grid-template-rows 0.22s ease;
@@ -83,7 +83,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
83
83
  `,ge=o.div`
84
84
  overflow: hidden;
85
85
  min-height: 0;
86
- `,ue=o.div`
86
+ `,me=o.div`
87
87
  display: flex;
88
88
  align-items: flex-end;
89
89
  justify-content: center;
@@ -100,7 +100,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
100
100
  font-weight: 400;
101
101
  font-size: 12px;
102
102
  color: ${e.colors.muted};
103
- `,P=o.span`
103
+ `,F=o.span`
104
104
  display: flex;
105
105
  align-items: center;
106
106
  gap: 4px;
@@ -113,7 +113,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
113
113
  &:focus-within {
114
114
  border-color: ${e.rarities.epic};
115
115
  }
116
- `,F=o(u)`
116
+ `,P=o(m)`
117
117
  width: 16px;
118
118
  height: 16px;
119
119
  color: ${e.colors.rarity};
@@ -135,7 +135,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
135
135
  -webkit-appearance: none;
136
136
  margin: 0;
137
137
  }
138
- `,me=o.span`
138
+ `,ue=o.span`
139
139
  padding-bottom: 12px;
140
140
  color: ${e.colors.text};
141
141
  font-family: ${e.font.sans};
@@ -196,7 +196,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
196
196
  box-shadow: 0 1px 3px rgba(22, 21, 24, 0.25);
197
197
  cursor: pointer;
198
198
  }
199
- `,ye=o.div`
199
+ `,$e=o.div`
200
200
  display: flex;
201
201
  align-items: center;
202
202
  justify-content: space-between;
@@ -208,11 +208,11 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
208
208
  font-family: ${e.font.sans};
209
209
  font-size: 13px;
210
210
  color: ${e.colors.text};
211
- `,D=o(u)`
211
+ `,D=o(m)`
212
212
  width: 16px;
213
213
  height: 16px;
214
214
  color: ${e.colors.text};
215
- `,$e=o.div`
215
+ `,ye=o.div`
216
216
  display: flex;
217
217
  flex-wrap: wrap;
218
218
  gap: 12px;
@@ -238,14 +238,14 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
238
238
  outline: 2px solid ${e.colors.accent};
239
239
  outline-offset: 2px;
240
240
  }
241
- `,je=o("span",c("color"))`
241
+ `,ke=o("span",c("color"))`
242
242
  position: relative;
243
243
  width: 16px;
244
244
  height: 16px;
245
245
  border-radius: 4px;
246
246
  background: ${({color:i})=>i};
247
247
  flex: none;
248
- `,ke=o(u)`
248
+ `,je=o(m)`
249
249
  position: absolute;
250
250
  inset: 0;
251
251
  width: 16px;
@@ -300,7 +300,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
300
300
  display: flex;
301
301
  align-items: center;
302
302
  gap: 6px;
303
- `,Pe=o(u)`
303
+ `,Fe=o(m)`
304
304
  width: 14px;
305
305
  height: 14px;
306
306
  color: ${e.colors.text};
@@ -309,7 +309,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
309
309
  width: 16px;
310
310
  height: 16px;
311
311
  }
312
- `,Fe=o.span`
312
+ `,Pe=o.span`
313
313
  font-family: ${e.font.sans};
314
314
  font-weight: 600;
315
315
  font-size: 14px;
@@ -322,7 +322,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
322
322
  ${e.media.down("lg")} {
323
323
  font-size: 16px;
324
324
  }
325
- `,Ie=o(u)`
325
+ `,Ie=o(m)`
326
326
  width: 12px;
327
327
  height: 12px;
328
328
  color: ${e.colors.muted2};
@@ -367,7 +367,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
367
367
  height: 18px;
368
368
  left: ${({on:i})=>i?"calc(100% - 18px)":"2px"};
369
369
  }
370
- `,d=1e5;function De(i){var l;for(const h of ie){const p=(l=h.subs)==null?void 0:l.find(r=>r.key===i);if(p)return n(p.labelKey)}return i}function k({title:i,open:l,onToggle:h,summary:p,desktopStatic:r,headerTestId:x,headerAria:m,children:f}){const g=t.jsx(se,{up:l,size:24,color:"var(--text)"});return t.jsxs(le,{children:[t.jsxs(ce,{type:"button",desktopStatic:r,onClick:h,"aria-expanded":l,"aria-label":m,"data-testid":x,children:[t.jsx(de,{children:i}),r?t.jsx(pe,{children:g}):g]}),!l&&p?t.jsx(xe,{desktopHidden:r,children:p}):null,t.jsx(he,{open:l,desktopStatic:r,children:t.jsx(ge,{children:f})})]})}function Ye({category:i,subCategory:l,onCategory:h,onSub:p,priceMin:r,priceMax:x,onPriceMin:m,onPriceMax:f,rarities:g,onToggleRarity:E,status:S,onStatus:_,smart:b,onSmart:L}){const[M,O]=$.useState(!0),[Y,B]=$.useState(!0),[K,W]=$.useState(!1),[G,U]=$.useState(!0),R=r&&!Number.isNaN(Number(r))?Number(r):void 0,C=x&&!Number.isNaN(Number(x))?Number(x):void 0,w=R!=null?Math.min(R,d):0,y=C!=null?Math.min(C,d):d,V=w/d*100,X=y/d*100;function q(s){const a=Math.min(s,y);m(a<=0?"":String(a))}function J(s){const a=Math.max(s,w);f(a>=d?"":String(a))}const Q=l?De(l):i!=="wearable"?n(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",Z=R!=null||C!=null?`${r||"0"}-${x||"∞"}`:"",ee=z.filter(s=>g.includes(s)).map(re).join(", "),te=S==="on_sale"?n("filter.onSale"):S==="not_for_sale"?n("filter.notForSale"):"";return t.jsxs(ae,{children:[t.jsx(k,{title:n("assets.category"),open:M,onToggle:()=>O(s=>!s),summary:Q,desktopStatic:!0,children:t.jsx(oe,{category:i,subCategory:l,onCategory:h,onSub:p})}),t.jsx(j,{}),t.jsxs(k,{title:n("filter.price"),open:Y,onToggle:()=>B(s=>!s),summary:Z,desktopStatic:!0,children:[t.jsxs(ue,{children:[t.jsxs(T,{children:[t.jsx(N,{children:n("assets.min")}),t.jsxs(P,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":n("assets.minPriceAria"),placeholder:"0",value:r,onChange:s=>m(s.target.value)})]})]}),t.jsx(me,{children:n("assets.priceTo")}),t.jsxs(T,{children:[t.jsx(N,{children:n("assets.max")}),t.jsxs(P,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":n("assets.maxPriceAria"),placeholder:"0",value:x,onChange:s=>f(s.target.value)})]})]})]}),t.jsxs(fe,{children:[t.jsx(be,{"aria-hidden":!0}),t.jsx(we,{minPct:V,maxPct:X,"aria-hidden":!0}),t.jsx(A,{type:"range",min:0,max:d,value:w,"aria-label":n("assets.minPriceSliderAria"),onChange:s=>q(Number(s.target.value))}),t.jsx(A,{type:"range",min:0,max:d,value:y,"aria-label":n("assets.maxPriceSliderAria"),onChange:s=>J(Number(s.target.value))})]}),t.jsxs(ye,{children:[t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),y.toLocaleString()]})]})]}),t.jsx(j,{}),t.jsx(k,{title:n("assets.rarity"),open:K,onToggle:()=>W(s=>!s),summary:ee,headerTestId:"sidebar-section-toggle",children:t.jsx($e,{"data-testid":"rarity-filter",children:z.map(s=>{const a=g.includes(s);return t.jsxs(ve,{type:"button",selected:a,"aria-pressed":a,onClick:()=>E(s),"data-testid":"rarity-filter-check",children:[t.jsx(je,{color:e.rarities[s],children:a?t.jsx(ke,{name:"check","aria-hidden":!0}):null}),t.jsx(Se,{selected:a,children:s})]},s)})})}),t.jsx(j,{}),t.jsx(k,{title:n("filter.status"),open:G,onToggle:()=>U(s=>!s),summary:te,children:[["all",n("filter.statusAll")],["on_sale",n("filter.onSale")],["not_for_sale",n("filter.notForSale")]].map(([s,a])=>t.jsxs(Re,{children:[t.jsx(Ce,{type:"radio",name:"shop-status",checked:S===s,onChange:()=>_(s)}),t.jsx(ze,{children:a})]},s))}),t.jsx(j,{}),t.jsxs(Te,{children:[t.jsxs(Ne,{children:[t.jsx(Pe,{name:"smart","aria-hidden":!0}),t.jsx(Fe,{children:n("filter.smart")}),t.jsx(ne,{content:n("filter.smartHint"),placement:"bottom",children:t.jsx(Ie,{name:"info",role:"img","aria-label":n("filter.smartHint"),tabIndex:0})})]}),t.jsx(Ae,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":n("filter.smart"),onClick:()=>L(!b),children:t.jsx(He,{on:b})})]})]})}const Be=o.div`
370
+ `,d=1e5;function De(i){var l;for(const x of ie){const p=(l=x.subs)==null?void 0:l.find(r=>r.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:x,summary:p,desktopStatic:r,headerTestId:h,headerAria:u,children:f}){const g=t.jsx(ne,{up:l,size:24,color:"var(--text)"});return t.jsxs(le,{children:[t.jsxs(ce,{type:"button",desktopStatic:r,onClick:x,"aria-expanded":l,"aria-label":u,"data-testid":h,children:[t.jsx(de,{children:i}),r?t.jsx(pe,{children:g}):g]}),!l&&p?t.jsx(he,{desktopHidden:r,children:p}):null,t.jsx(xe,{open:l,desktopStatic:r,children:t.jsx(ge,{children:f})})]})}function Me({category:i,subCategory:l,onCategory:x,onSub:p,priceMin:r,priceMax:h,onPriceMin:u,onPriceMax:f,rarities:g,onToggleRarity:E,status:S,onStatus:L,smart:b,onSmart:O}){const[_,Y]=y.useState(!0),[M,B]=y.useState(!0),[G,K]=y.useState(!1),[U,W]=y.useState(!0),R=r&&!Number.isNaN(Number(r))?Number(r):void 0,C=h&&!Number.isNaN(Number(h))?Number(h):void 0,w=R!=null?Math.min(R,d):0,$=C!=null?Math.min(C,d):d,V=w/d*100,X=$/d*100;function q(n){const a=Math.min(n,$);u(a<=0?"":String(a))}function J(n){const a=Math.max(n,w);f(a>=d?"":String(a))}const Q=l?De(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",Z=R!=null||C!=null?`${r||"0"}-${h||"∞"}`:"",ee=z.filter(n=>g.includes(n)).map(re).join(", "),te=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(ae,{children:[t.jsx(j,{title:s("assets.category"),open:_,onToggle:()=>Y(n=>!n),summary:Q,desktopStatic:!0,children:t.jsx(oe,{category:i,subCategory:l,onCategory:x,onSub:p})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:M,onToggle:()=>B(n=>!n),summary:Z,desktopStatic:!0,children:[t.jsxs(me,{children:[t.jsxs(T,{children:[t.jsx(N,{children:s("assets.min")}),t.jsxs(F,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:r,onChange:n=>u(n.target.value)})]})]}),t.jsx(ue,{children:s("assets.priceTo")}),t.jsxs(T,{children:[t.jsx(N,{children:s("assets.max")}),t.jsxs(F,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:h,onChange:n=>f(n.target.value)})]})]})]}),t.jsxs(fe,{children:[t.jsx(be,{"aria-hidden":!0}),t.jsx(we,{minPct:V,maxPct:X,"aria-hidden":!0}),t.jsx(A,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>q(Number(n.target.value))}),t.jsx(A,{type:"range",min:0,max:d,value:$,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>J(Number(n.target.value))})]}),t.jsxs($e,{children:[t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),$.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:G,onToggle:()=>K(n=>!n),summary:ee,headerTestId:"sidebar-section-toggle",children:t.jsx(ye,{"data-testid":"rarity-filter",children:z.map(n=>{const a=g.includes(n);return t.jsxs(ve,{type:"button",selected:a,"aria-pressed":a,onClick:()=>E(n),"data-testid":"rarity-filter-check",children:[t.jsx(ke,{color:e.rarities[n],children:a?t.jsx(je,{name:"check","aria-hidden":!0}):null}),t.jsx(Se,{selected:a,children:n})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:U,onToggle:()=>W(n=>!n),summary:te,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,a])=>t.jsxs(Re,{children:[t.jsx(Ce,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>L(n)}),t.jsx(ze,{children:a})]},n))}),t.jsx(k,{}),t.jsxs(Te,{children:[t.jsxs(Ne,{children:[t.jsx(Fe,{name:"smart","aria-hidden":!0}),t.jsx(Pe,{children:s("filter.smart")}),t.jsx(se,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Ie,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0})})]}),t.jsx(Ae,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>O(!b),children:t.jsx(He,{on:b})})]})]})}const Be=o.div`
371
371
  position: relative;
372
372
  display: flex;
373
373
  gap: 32px;
@@ -376,14 +376,14 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
376
376
  ${e.media.down("lg")} {
377
377
  display: block;
378
378
  }
379
- `,Ke=o.div`
379
+ `,Ge=o.div`
380
380
  flex: 1;
381
381
  min-width: 0;
382
382
 
383
383
  ${e.media.down("lg")} {
384
384
  width: 100%;
385
385
  }
386
- `,We=o.aside`
386
+ `,Ke=o.aside`
387
387
  flex: none;
388
388
  width: 265px;
389
389
 
@@ -404,12 +404,13 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
404
404
  /* Reserve the scrollbar gutter so revealing the bar on hover doesn't shift the filter content. */
405
405
  scrollbar-gutter: stable;
406
406
 
407
- /* Hover-only scrollbar: hidden while the catalog scrolls, revealed only when the cursor is over the
408
- filters column (so a subtle bar appears just as you try to scroll within it). Stays scrollable
409
- throughout only the bar's visibility changes. Matches the subtle cart-list treatment (cart.css). */
410
- scrollbar-width: none;
407
+ /* Subtle scrollbar (matches the cart scroll list). The track width is reserved CONSTANTLY — the same
408
+ 8px at rest and on hover so revealing the scrollbar never consumes space and pushes the sidebar
409
+ content left. Only the THUMB fades in on hover; at rest both thumb and track are transparent, so
410
+ the gutter is invisible but its space is already held. Firefox keeps scrollbar-width: thin (not
411
+ none -> thin, which would also shift) and just recolours the thumb on hover. */
412
+ scrollbar-width: thin;
411
413
  scrollbar-color: transparent transparent;
412
- transition: scrollbar-color 0.2s ease;
413
414
  &::-webkit-scrollbar {
414
415
  width: 8px;
415
416
  }
@@ -421,9 +422,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
421
422
  border-radius: 8px;
422
423
  transition: background 0.2s ease;
423
424
  }
424
-
425
425
  &:hover {
426
- scrollbar-width: thin;
427
426
  scrollbar-color: ${e.colors.muted2} transparent;
428
427
  }
429
428
  &:hover::-webkit-scrollbar-thumb {
@@ -455,7 +454,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
455
454
  visibility: visible;
456
455
  }
457
456
  }
458
- `,Ge=o.div`
457
+ `,Ue=o.div`
459
458
  ${e.media.down("lg")} {
460
459
  flex: 1;
461
460
  min-height: 0;
@@ -463,7 +462,7 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
463
462
  /* Room so the last filter row clears the sticky "Show items" bar (Figma bottom bar). */
464
463
  padding-bottom: 24px;
465
464
  }
466
- `,Ue=o.div`
465
+ `,We=o.div`
467
466
  position: fixed;
468
467
  inset: 0;
469
468
  z-index: 9998;
@@ -544,4 +543,4 @@ import{r as $,j as t}from"./react-BMZSDQJw.js";import{R as z,a as oe,C as ie,c a
544
543
  outline: 2px solid ${e.colors.accent};
545
544
  outline-offset: 2px;
546
545
  }
547
- `;export{qe as C,j as D,k as F,Ke as M,$e as R,Re as S,ve as a,je as b,ke as c,Se as d,Ce as e,ze as f,Be as g,Ue as h,We as i,Ve as j,Xe as k,Ge as l,Je as m,Qe as n,Ye as o};
546
+ `;export{qe as C,k as D,j as F,Ge as M,ye as R,Re as S,ve as a,ke as b,je as c,Se as d,Ce as e,ze as f,Be as g,We as h,Ke as i,Ve as j,Xe as k,Ue as l,Je as m,Qe as n,Me as o};
@@ -1,4 +1,4 @@
1
- import{j as t,L as R,r as D}from"./react-BMZSDQJw.js";import{s as a,B as L,y as e,H as q,u as B,t as i,g as N,J as F,I as x,l as G,e as A,j as H,c as Q,E as y,x as K,D as z}from"./index-V0hMC6mZ.js";import{g as M,a as W,s as J,b as O}from"./authorizations-CsduRV0X.js";import{f as P}from"./errors-BuvqNt2H.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-8SzFotJj.js";import"./ethers-Dpp9c5As.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";const X=q`
1
+ import{j as t,L as R,r as L}from"./react-BrLDncxD.js";import{s as a,B as N,F as e,N as q,u as B,t as i,d as D,e as F,I as x,h as G,m as A,o as H,c as Q,J as y,E as K,H as z}from"./index-Q9d0V8TZ.js";import{g as M,a as W,s as J,b as O}from"./authorizations-C600xDT9.js";import{f as P}from"./errors-B2rT3Gvo.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DYZXk5O5.js";import"./ethers-CLB2z3On.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";const X=q`
2
2
  to { transform: rotate(360deg); }
3
3
  `,U=a.section`
4
4
  width: 100%;
@@ -158,6 +158,6 @@ import{j as t,L as R,r as D}from"./react-BMZSDQJw.js";import{s as a,B as L,y as
158
158
  font-size: 22px;
159
159
  font-weight: 700;
160
160
  margin: 6px 0 0;
161
- `,ct=a(L)`
161
+ `,ct=a(N)`
162
162
  margin-top: 12px;
163
- `;function C({descriptor:o,owner:n,signer:l,name:s,description:d,image:r,icon:u}){const T=H(),[m,g]=D.useState(!1),{data:c,isLoading:p,refetch:E}=A({queryKey:["authorization",o.id,n],queryFn:()=>O(o,n),staleTime:3e4});async function I(){if(m||p)return;const h=!c;g(!0);try{await J({auth:o,signer:l,active:h}),await E(),T.setQueryData(["authorization",o.id,n],h),y.success(h?i("authorizations.toastActivated",{name:s}):i("authorizations.toastDeactivated",{name:s}))}catch(f){K(f,{flow:"authorizations",step:h?"grant":"revoke"}),y.error(P(f,i("authorizations.errorGeneric")))}finally{g(!1)}}const S=p?i("authorizations.checking"):c?i("authorizations.active"):i("authorizations.inactive");return t.jsxs(_,{"data-testid":`authorization-${o.id}`,"data-active":!!c,children:[t.jsx(tt,{children:r?t.jsx("img",{src:r,alt:""}):u}),t.jsxs(it,{children:[t.jsx(ot,{title:s,children:s}),t.jsx(et,{children:d})]}),t.jsxs(st,{children:[t.jsx(at,{"data-active":!!c,children:S}),m?t.jsx(rt,{"aria-label":i("authorizations.working")}):t.jsx(nt,{type:"button","data-testid":`authorization-toggle-${o.id}`,"data-active":!!c,role:"switch","aria-checked":!!c,"aria-label":c?i("authorizations.deactivateAria",{name:s}):i("authorizations.activateAria",{name:s}),disabled:p,onClick:()=>void I()})]})]})}function lt(o){return A({queryKey:["owned-collections",o],enabled:!!o,staleTime:6e4,queryFn:async()=>{const[n,l]=await Promise.all([z(o,{category:"wearable",first:96}),z(o,{category:"emote",first:96})]),s=new Map;for(const d of[...n.assets,...l.assets]){const r=d.contractAddress.toLowerCase();s.has(r)||s.set(r,d)}return[...s.values()]}})}function zt(){B({title:i("authorizations.title"),noindex:!0});const{session:o}=N(),n=Q.chainId,l=F(o==null?void 0:o.providerType),{data:s,isLoading:d}=lt(l?o==null?void 0:o.address:void 0);if(!o)return t.jsxs($,{children:[t.jsx(x,{name:"info",size:40,color:"var(--muted-2)"}),t.jsx(k,{children:i("authorizations.signInTitle")}),t.jsx("p",{className:"muted",children:i("authorizations.signInBody")})]});if(!l)return t.jsxs($,{children:[t.jsx(x,{name:"check",size:40,color:"var(--ok)"}),t.jsx(k,{children:i("authorizations.managedTitle")}),t.jsx("p",{className:"muted",children:i("authorizations.managedBody")}),t.jsx(ct,{as:R,to:"/assets",variant:"purple",children:i("authorizations.managedCta")})]});const r=M(n);return t.jsxs(U,{children:[t.jsxs(V,{children:[t.jsx(Y,{children:i("authorizations.title")}),t.jsx(Z,{children:i("authorizations.intro")})]}),t.jsxs(j,{children:[t.jsx(w,{children:i("authorizations.buyingTitle")}),t.jsx(b,{children:t.jsx(C,{descriptor:r,owner:o.address,signer:o.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:t.jsx(G,{className:"ccy-mark"})})})]}),t.jsxs(j,{children:[t.jsx(w,{children:i("authorizations.sellingTitle")}),d?t.jsx(v,{children:i("authorizations.checking")}):s&&s.length>0?t.jsx(b,{children:s.map(u=>t.jsx(C,{descriptor:W(u.contractAddress,n),owner:o.address,signer:o.signer,name:u.name||i("authorizations.collectionFallback"),description:i("authorizations.sellingDesc"),image:u.image,icon:t.jsx(x,{name:"pen",size:18})},u.contractAddress))}):t.jsx(v,{children:i("authorizations.sellingEmpty")})]})]})}export{zt as Authorizations};
163
+ `;function C({descriptor:o,owner:n,signer:l,name:s,description:d,image:r,icon:u}){const T=H(),[m,g]=L.useState(!1),{data:c,isLoading:p,refetch:E}=A({queryKey:["authorization",o.id,n],queryFn:()=>O(o,n),staleTime:3e4});async function I(){if(m||p)return;const h=!c;g(!0);try{await J({auth:o,signer:l,active:h}),await E(),T.setQueryData(["authorization",o.id,n],h),y.success(h?i("authorizations.toastActivated",{name:s}):i("authorizations.toastDeactivated",{name:s}))}catch(f){K(f,{flow:"authorizations",step:h?"grant":"revoke"}),y.error(P(f,i("authorizations.errorGeneric")))}finally{g(!1)}}const S=p?i("authorizations.checking"):c?i("authorizations.active"):i("authorizations.inactive");return t.jsxs(_,{"data-testid":`authorization-${o.id}`,"data-active":!!c,children:[t.jsx(tt,{children:r?t.jsx("img",{src:r,alt:""}):u}),t.jsxs(it,{children:[t.jsx(ot,{title:s,children:s}),t.jsx(et,{children:d})]}),t.jsxs(st,{children:[t.jsx(at,{"data-active":!!c,children:S}),m?t.jsx(rt,{"aria-label":i("authorizations.working")}):t.jsx(nt,{type:"button","data-testid":`authorization-toggle-${o.id}`,"data-active":!!c,role:"switch","aria-checked":!!c,"aria-label":c?i("authorizations.deactivateAria",{name:s}):i("authorizations.activateAria",{name:s}),disabled:p,onClick:()=>void I()})]})]})}function lt(o){return A({queryKey:["owned-collections",o],enabled:!!o,staleTime:6e4,queryFn:async()=>{const[n,l]=await Promise.all([z(o,{category:"wearable",first:96}),z(o,{category:"emote",first:96})]),s=new Map;for(const d of[...n.assets,...l.assets]){const r=d.contractAddress.toLowerCase();s.has(r)||s.set(r,d)}return[...s.values()]}})}function zt(){B({title:i("authorizations.title"),noindex:!0});const{session:o}=D(),n=Q.chainId,l=F(o==null?void 0:o.providerType),{data:s,isLoading:d}=lt(l?o==null?void 0:o.address:void 0);if(!o)return t.jsxs($,{children:[t.jsx(x,{name:"info",size:40,color:"var(--muted-2)"}),t.jsx(k,{children:i("authorizations.signInTitle")}),t.jsx("p",{className:"muted",children:i("authorizations.signInBody")})]});if(!l)return t.jsxs($,{children:[t.jsx(x,{name:"check",size:40,color:"var(--ok)"}),t.jsx(k,{children:i("authorizations.managedTitle")}),t.jsx("p",{className:"muted",children:i("authorizations.managedBody")}),t.jsx(ct,{as:R,to:"/assets",variant:"purple",children:i("authorizations.managedCta")})]});const r=M(n);return t.jsxs(U,{children:[t.jsxs(V,{children:[t.jsx(Y,{children:i("authorizations.title")}),t.jsx(Z,{children:i("authorizations.intro")})]}),t.jsxs(j,{children:[t.jsx(w,{children:i("authorizations.buyingTitle")}),t.jsx(b,{children:t.jsx(C,{descriptor:r,owner:o.address,signer:o.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:t.jsx(G,{className:"ccy-mark"})})})]}),t.jsxs(j,{children:[t.jsx(w,{children:i("authorizations.sellingTitle")}),d?t.jsx(v,{children:i("authorizations.checking")}):s&&s.length>0?t.jsx(b,{children:s.map(u=>t.jsx(C,{descriptor:W(u.contractAddress,n),owner:o.address,signer:o.signer,name:u.name||i("authorizations.collectionFallback"),description:i("authorizations.sellingDesc"),image:u.image,icon:t.jsx(x,{name:"pen",size:18})},u.contractAddress))}):t.jsx(v,{children:i("authorizations.sellingEmpty")})]})]})}export{zt as Authorizations};
@@ -0,0 +1,3 @@
1
+ import{j as e,r as x,a as Me,u as Ee,L as Z}from"./react-BrLDncxD.js";import{t as a,h as L,j as H,u as Pe,af as v,a as le,d as qe,m as Te,n as Ie,o as Le,I,g as Fe,e as Be,x as G,ah as de,ai as Re,E as A,s as Ae,B as Ue,C as We,w as ze,q as ue,aj as $e,z as he,y as Qe,ak as Ke}from"./index-Q9d0V8TZ.js";import{a as me}from"./buy-C5J6mAtx.js";import{g as Oe,a as Ge,w as De,S as He,G as Je}from"./buy-gasless-Sy6Gurph.js";import{R as D,r as Ve}from"./cart-checkout-BwJruvi6.js";import{u as Ye,c as Xe}from"./useCreditPacks-Be9cG5vr.js";import{l as Ze}from"./loader-logo-BzY9EKdC.js";import{i as es,a as ss}from"./errors-B2rT3Gvo.js";import{E as as}from"./ErrorNotice-BDH9xoG4.js";import{C as ts}from"./CollectionCarousel-BgmGp9gP.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DYZXk5O5.js";import"./ethers-CLB2z3On.js";import"./intl-CBcMB1D2.js";import"./authorizations-C600xDT9.js";import"./index-HN6Rk25C.js";import"./trade-encoding-CaZYjVNs.js";const rs="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/buy-error-22UunaPC.png";function cs(r){const{phase:n,balanceCredits:h,onClose:m}=r,C=n==="processing",w=n==="error"?a("cartCheckout.errorTitle"):n==="nofunds"?a("cartCheckout.titleNoFunds"):a("cartCheckout.titleBuy"),S=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:C?void 0:m,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${S?" 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:w}),!C&&e.jsx("button",{className:"buy-modal__x",onClick:m,"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(L,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:H(h)})]})]}),n==="processing"&&e.jsx(ns,{stage:r.stage??"reserving",step:r.step??1,total:r.total??1,isSelfCustody:!!r.isSelfCustody}),n==="nofunds"&&e.jsx(is,{lines:r.lines??[],shortfallCredits:r.shortfallCredits??0,packs:r.packs??[],selectedPack:r.selectedPack??"",onSelectPack:r.onSelectPack??(()=>{}),onBuyPacks:r.onBuyPacks??(()=>{}),onCancel:m}),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:rs,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:m,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--purple",onClick:r.onRetry??m,children:a("cartCheckout.tryAgain")})]})]})]})]})}function ns({stage:r,step:n,total:h,isSelfCustody:m}){const C=r==="reserving",w=h>0?Math.min(100,Math.round(n/h*100)):0,S=r==="awaiting-signature"?m?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:Ze,alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:S}),C?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:`${w}%`}})}),h>1?e.jsxs("span",{className:"cart-checkout__step",children:[n,"/",h]}):null]}):e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]})}function is({lines:r,shortfallCredits:n,packs:h,selectedPack:m,onSelectPack:C,onBuyPacks:w,onCancel:S}){const N=h.find(t=>t.id===m),J=r.reduce((t,_)=>t+(_.quantity??1),0);return e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:"buy-modal__warning-ico",children:[e.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]}),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:J})]})]}),e.jsx("div",{className:"cart-checkout__scroll",children:r.map(t=>{const _=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"),_>1?e.jsx("span",{className:"cart-checkout__qty-tag",children:a("cartCheckout.qty",{count:_})}):null]}),t.item.creator?e.jsx("div",{className:"buy-modal__asset-creator",children:a("search.byCreator",{name:t.item.creator})}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(L,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:H(t.priceCredits*_)})]})]})]},t.item.id)})}),e.jsx("div",{className:"buy-modal__packs",children:h.map(t=>{const _=t.id===m;return e.jsxs("button",{className:`buy-modal__pack${_?" buy-modal__pack--on":""}`,onClick:()=>C(t.id),children:[e.jsx(L,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:H(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(L,{className:"buy-modal__total-ico"}),e.jsx("span",{children:H((N==null?void 0:N.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",((N==null?void 0:N.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:S,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:w,children:a("buyModal.buy")})]})]})}const os=Ae(Ue)`
2
+ margin-top: 12px;
3
+ `;function _e(r){if(es(r))return a("errors.rejected");const n=(r.message??"").toLowerCase();return n.includes("insufficient")?a("cart.error.insufficient",{currency:We.name}):n.includes("no active listing")||n.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const ls=12e4;function ds(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 ye=r=>r.reduce((n,h)=>n+h.priceCredits*h.quantity,0),us=r=>r.flatMap(n=>Array.from({length:n.quantity},()=>({...n,quantity:1})));function Es(){Pe({title:a("nav.cart"),noindex:!0});const r=v(s=>s.items),n=v(s=>s.remove),h=v(s=>s.increment),m=v(s=>s.decrement),C=v(s=>s.clear),w=v(s=>s.restore),S=v(s=>s.setFittingOpen),N=le(s=>s.items),J=le(s=>s.toggle),{session:t}=qe(),_=Ye().packs.slice(0,3);x.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const pe=r.some(s=>s.category!=="emote"),{data:V}=Te({queryKey:["upsell-listings"],queryFn:()=>Ke({first:40}),staleTime:6e4}),{data:F}=Ie(t),U=Le(),W=Me(),{state:T}=Ee(),[ee,B]=x.useState(null),[be,M]=x.useState(null),[se,z]=x.useState(null),[ge,E]=x.useState(!1),[f,R]=x.useState(null),ae=x.useRef(0),[l,k]=x.useState(null),[Y,te]=x.useState(""),xe=r.reduce((s,c)=>s+c.priceCredits*c.quantity,0),re=r.reduce((s,c)=>s+c.quantity,0),fe=f?f.liveTotalCredits:xe,ke=new Set(r.map(s=>s.id)),ce=((V==null?void 0:V.items)??[]).filter(s=>!ke.has(s.id)).slice(0,12),je=new Map(f==null?void 0:f.buyable.map(s=>[s.item.id,s])),$=(F==null?void 0:F.credits)??0,ve=Re;function Q(s){s(),R(null),z(null),M(null)}function Ce(){k(null),E(!1)}function ne(s){const c=ye(s),i=Math.max(0,c-$),p=_.find(d=>d.credits>=i)??_[_.length-1];te(p.id),G("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:c,credits_balance:$,shortfall:i}),k({phase:"nofunds",lines:s.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:i}),E(!1)}async function Ne(s){if(!t||s.length===0)return;const c=us(s),i=c.map(o=>({...o.item,priceCredits:o.priceCredits})),p=s.map(o=>({...o.item,priceCredits:o.priceCredits,quantity:o.quantity})),d=[];let j="authorize",O=!1;k({phase:"processing",stage:"reserving",step:1,total:c.length});try{const o=[];for(let u=0;u<c.length;u++){const q=c[u];k({phase:"processing",stage:"reserving",step:u+1,total:c.length});try{const{credit:y,maxCreditedValue:X}=await ze(t.identity,q.usdCents,q.trade.id);d.push(y.id),o.push({trade:q.trade,credits:[y],maxCreditedValue:X})}catch(y){if(ss(y)){if(d.length){try{await ue(t.identity,d)}catch(X){A(X,{flow:"cart_checkout",step:"release"})}U.invalidateQueries({queryKey:["usd-balance"]})}ne(s);return}throw y}}j="submit";const b=()=>k({phase:"processing",stage:"settling",step:c.length,total:c.length});k({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});let g=[];if(Oe())try{g=await Ge({purchases:o,buyer:t.address,signer:t.signer,onSigned:b});const q=(await Promise.allSettled(g.map(y=>De(y)))).flatMap(y=>y.status==="rejected"?[y.reason]:[]);if(q.length&&!q.some(y=>y instanceof He))throw q[0];O=!0}catch(u){if(!(u instanceof Je))throw u;g=await me({purchases:o,buyer:t.address,signer:t.signer,onSigned:b})}else g=await me({purchases:o,buyer:t.address,signer:t.signer});s.forEach(u=>n(u.item.id)),R(null),G("Shop Completed Purchase",{...$e(i),payment_type:"credits",no_crypto_step:O,transaction_hash:g[0]??null}),U.invalidateQueries({queryKey:["usd-balance"]}),k(null),E(!1),W("/success",{state:{items:p,txHash:g[0]??void 0,settled:!0},replace:!0})}catch(o){if(he(o)||A(o,{flow:"cart_checkout",step:j,cart_size:s.length}),G(he(o)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:j,error_code:Qe(o),value_usd:de(i.reduce((b,g)=>b+g.priceCredits,0)),cart_size:c.length}),d.length){try{await ue(t.identity,d)}catch(b){A(b,{flow:"cart_checkout",step:"release"})}U.invalidateQueries({queryKey:["usd-balance"]})}k({phase:"error",message:_e(o)})}}function ie(s){const c=ye(s);if(F!=null&&F.credits<c){ne(s);return}Ne(s)}async function K(){if(!t){M(a("buyModal.signInToCheckout"));return}const s=v.getState().items;if(s.length===0)return;M(null),z(null),E(!0);const c=s.reduce((i,p)=>i+p.priceCredits*p.quantity,0);G("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:de(c),has_sufficient_credits:$>=c});try{B(a("cart.status.reviewing"));const i=await Ve(s,t.address,ve),p=[...i.unavailable,...i.own];if(p.length&&(p.forEach(d=>n(d.id)),z(ds(i))),i.buyable.length===0){M(a("cart.error.noneAvailable")),R(null),B(null);return}if(i.orderChanged){R(i),ae.current=Date.now(),B(null);return}B(null),ie(i.buyable)}catch(i){A(i,{flow:"cart_checkout",step:"review",cart_size:s.length}),M(_e(i)),B(null)}finally{E(!1)}}async function we(){if(f){if(!t){M(a("buyModal.signInToCheckout"));return}if(Date.now()-ae.current>ls){R(null),z(null),await K();return}M(null),ie(f.buyable)}}async function Se(){if(Y){try{sessionStorage.setItem(D,JSON.stringify(v.getState().items))}catch{}E(!0);try{const s=await Xe(Y,t?{address:t.address,identity:t.identity}:void 0);if(s.url){window.location.href=s.url;return}W("/credits")}catch(s){try{sessionStorage.removeItem(D)}catch{}A(s,{flow:"cart_buy_credits"}),k({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{E(!1)}}}const oe=x.useRef(!1);x.useEffect(()=>{if(!(T!=null&&T.resumeCheckout)||oe.current)return;oe.current=!0;try{const c=sessionStorage.getItem(D);if(c){sessionStorage.removeItem(D);const i=JSON.parse(c);Array.isArray(i)&&i.length&&w(i)}}catch{}U.invalidateQueries({queryKey:["usd-balance"]});const s=setTimeout(()=>void K(),0);return()=>clearTimeout(s)},[T==null?void 0:T.resumeCheckout]);const P=ge||(l==null?void 0:l.phase)==="processing";return r.length===0&&!l?e.jsxs("div",{className:"cart cart--empty",children:[e.jsx(I,{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(os,{as:Z,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:()=>W(-1),type:"button",children:[e.jsx(I,{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:()=>W(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(I,{name:"arrow-left"})}),e.jsx("h1",{className:"checkout__panel-title",children:a("cart.panelTitle",{count:re})}),pe?e.jsxs("button",{className:"checkout__fitting",onClick:()=>S(!0),disabled:P,children:[e.jsx(I,{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=je.get(s.id),i=c?c.priceCredits:s.priceCredits,p=!!c&&c.priceCredits!==s.priceCredits,d=!s.tokenId,j=s.quantity,O=typeof s.available=="number"&&j>=s.available,o=i*j,b=!!N[s.id],g=s.tokenId??s.itemId,u=s.contractAddress&&g?`/item/${s.contractAddress}/${g}`:null;return e.jsxs("div",{className:"checkout__card",children:[e.jsxs("div",{className:"checkout__thumb",children:[u?e.jsx(Z,{className:"checkout__thumb-link",to:u,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:[u?e.jsx(Z,{className:"checkout__name",to:u,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(Fe,{address:s.creator,className:"checkout__creator",linkToProfile:!0}):null]}),e.jsxs("div",{className:"checkout__foot",children:[d?e.jsxs("div",{className:"checkout__stepper",children:[e.jsx("button",{className:"checkout__step",onClick:()=>Q(()=>m(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:()=>Q(()=>h(s.id)),disabled:P||O,"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(L,{className:"checkout__price-ico"})," ",o,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${b?" is-on":""}`,onClick:()=>J(s),"aria-label":b?a("cart.removeFromFavorites",{name:s.name}):a("cart.addToFavorites",{name:s.name}),title:b?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(I,{name:b?"heart-solid":"heart"})}),e.jsx("button",{className:"checkout__remove",onClick:()=>Q(()=>n(s.id)),disabled:P,"aria-label":a("cart.remove",{name:s.name}),title:a("cart.removeTitle"),children:e.jsx(I,{name:"trash",size:24})})]})]},s.id)})}),e.jsx("div",{className:"checkout__utils",children:e.jsx("button",{className:"link",onClick:()=>Q(C),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:re})}),e.jsxs("span",{className:"checkout__total-value",children:[e.jsx(L,{className:"checkout__total-ico"})," ",fe]})]}),e.jsx("button",{className:"checkout__cta",onClick:()=>void(f?we():K()),disabled:P,children:P?a("cart.working"):f?a("marketCheckout.confirmPurchase"):a("assetCard.buyNow")}),f?e.jsx("p",{className:"muted checkout__msg",children:a("cart.priceChanged")}):null,se?e.jsx("p",{className:"muted checkout__msg",children:se}):null,ee?e.jsx("p",{className:"muted checkout__msg",children:ee}):null,e.jsx(as,{message:be,className:"checkout__msg"})]})]})]})]}),ce.length>0?e.jsx("div",{className:"cart-upsell",children:e.jsx(ts,{title:a("cart.youMightAlsoLike"),items:ce})}):null,l?e.jsx(cs,{phase:l.phase,balanceCredits:$,onClose:Ce,stage:l.phase==="processing"?l.stage:void 0,step:l.phase==="processing"?l.step:void 0,total:l.phase==="processing"?l.total:void 0,isSelfCustody:Be(t==null?void 0:t.providerType),lines:l.phase==="nofunds"?l.lines:void 0,shortfallCredits:l.phase==="nofunds"?l.shortfall:void 0,packs:_,selectedPack:Y,onSelectPack:te,onBuyPacks:()=>void Se(),message:l.phase==="error"?l.message:void 0,onRetry:()=>void K()}):null]})}export{Es as Cart};
@@ -1,4 +1,4 @@
1
- import{K as N,L as U,M as w,N as z,O as o,P as E,Q as c,R as I,S as g,U as D,H as M}from"./index-V0hMC6mZ.js";import{r as K,j as v}from"./react-BMZSDQJw.js";function F(r){return N("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const L=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,S,b,$;const t=44,W=M(P||(P=l`
1
+ import{O as N,P as U,Q as w,R as z,S as o,U as E,V as c,W as I,X as g,Y as D,N as R}from"./index-Q9d0V8TZ.js";import{r as W,j as v}from"./react-BrLDncxD.js";function F(r){return N("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const K=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,S,b,$;const t=44,V=R(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -6,7 +6,7 @@ import{K as N,L as U,M as w,N as z,O as o,P as E,Q as c,R as I,S as g,U as D,H a
6
6
  100% {
7
7
  transform: rotate(360deg);
8
8
  }
9
- `)),B=M(S||(S=l`
9
+ `)),B=R(S||(S=l`
10
10
  0% {
11
11
  stroke-dasharray: 1px, 200px;
12
12
  stroke-dashoffset: 0;
@@ -21,8 +21,8 @@ import{K as N,L as U,M as w,N as z,O as o,P as E,Q as c,R as I,S as g,U as D,H a
21
21
  stroke-dasharray: 100px, 200px;
22
22
  stroke-dashoffset: -125px;
23
23
  }
24
- `)),G=r=>{const{classes:e,variant:s,color:a,disableShrink:d}=r,u={root:["root",s,`color${c(a)}`],svg:["svg"],circle:["circle",`circle${c(s)}`,d&&"circleDisableShrink"]};return I(u,F,e)},H=g("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.root,e[s.variant],e[`color${c(s.color)}`]]}})(({ownerState:r,theme:e})=>o({display:"inline-block"},r.variant==="determinate"&&{transition:e.transitions.create("transform")},r.color!=="inherit"&&{color:(e.vars||e).palette[r.color].main}),({ownerState:r})=>r.variant==="indeterminate"&&D(b||(b=l`
24
+ `)),G=r=>{const{classes:e,variant:s,color:a,disableShrink:d}=r,u={root:["root",s,`color${c(a)}`],svg:["svg"],circle:["circle",`circle${c(s)}`,d&&"circleDisableShrink"]};return I(u,F,e)},L=g("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.root,e[s.variant],e[`color${c(s.color)}`]]}})(({ownerState:r,theme:e})=>o({display:"inline-block"},r.variant==="determinate"&&{transition:e.transitions.create("transform")},r.color!=="inherit"&&{color:(e.vars||e).palette[r.color].main}),({ownerState:r})=>r.variant==="indeterminate"&&D(b||(b=l`
25
25
  animation: ${0} 1.4s linear infinite;
26
- `),W)),O=g("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(r,e)=>e.svg})({display:"block"}),Q=g("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.circle,e[`circle${c(s.variant)}`],s.disableShrink&&e.circleDisableShrink]}})(({ownerState:r,theme:e})=>o({stroke:"currentColor"},r.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},r.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:r})=>r.variant==="indeterminate"&&!r.disableShrink&&D($||($=l`
26
+ `),V)),O=g("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(r,e)=>e.svg})({display:"block"}),Q=g("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.circle,e[`circle${c(s.variant)}`],s.disableShrink&&e.circleDisableShrink]}})(({ownerState:r,theme:e})=>o({stroke:"currentColor"},r.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},r.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:r})=>r.variant==="indeterminate"&&!r.disableShrink&&D($||($=l`
27
27
  animation: ${0} 1.4s ease-in-out infinite;
28
- `),B)),q=K.forwardRef(function(e,s){const a=w({props:e,name:"MuiCircularProgress"}),{className:d,color:u="primary",disableShrink:R=!1,size:m=40,style:_,thickness:i=3.6,value:p=0,variant:k="indeterminate"}=a,j=z(a,L),n=o({},a,{color:u,disableShrink:R,size:m,thickness:i,value:p,variant:k}),f=G(n),h={},x={},y={};if(k==="determinate"){const C=2*Math.PI*((t-i)/2);h.strokeDasharray=C.toFixed(3),y["aria-valuenow"]=Math.round(p),h.strokeDashoffset=`${((100-p)/100*C).toFixed(3)}px`,x.transform="rotate(-90deg)"}return v.jsx(H,o({className:E(f.root,d),style:o({width:m,height:m},x,_),ownerState:n,ref:s,role:"progressbar"},y,j,{children:v.jsx(O,{className:f.svg,ownerState:n,viewBox:`${t/2} ${t/2} ${t} ${t}`,children:v.jsx(Q,{className:f.circle,style:h,ownerState:n,cx:t,cy:t,r:(t-i)/2,fill:"none",strokeWidth:i})})}))});export{q as C};
28
+ `),B)),Z=W.forwardRef(function(e,s){const a=w({props:e,name:"MuiCircularProgress"}),{className:d,color:u="primary",disableShrink:M=!1,size:m=40,style:_,thickness:i=3.6,value:p=0,variant:k="indeterminate"}=a,j=z(a,K),n=o({},a,{color:u,disableShrink:M,size:m,thickness:i,value:p,variant:k}),f=G(n),h={},x={},y={};if(k==="determinate"){const C=2*Math.PI*((t-i)/2);h.strokeDasharray=C.toFixed(3),y["aria-valuenow"]=Math.round(p),h.strokeDashoffset=`${((100-p)/100*C).toFixed(3)}px`,x.transform="rotate(-90deg)"}return v.jsx(L,o({className:E(f.root,d),style:o({width:m,height:m},x,_),ownerState:n,ref:s,role:"progressbar"},y,j,{children:v.jsx(O,{className:f.svg,ownerState:n,viewBox:`${t/2} ${t/2} ${t} ${t}`,children:v.jsx(Q,{className:f.circle,style:h,ownerState:n,cx:t,cy:t,r:(t-i)/2,fill:"none",strokeWidth:i})})}))});export{Z as C};