@dcl/shop 1.14.1-35731809173.commit-aacaccc → 1.14.1-35741939881.commit-2c07d5a

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 (417) hide show
  1. package/_assets/{Activity-BfwfgGnZ.js → Activity-CNS_JCe9.js} +9 -9
  2. package/_assets/{AnimatedBackground-DyESN2EF.js → AnimatedBackground-CR4y0wnf.js} +3 -3
  3. package/_assets/{Assets-CCqVPM9r.js → Assets-1J4XfIwm.js} +11 -11
  4. package/_assets/{Cart-CUaOl7By.js → Cart-DIIL5HsZ.js} +6 -6
  5. package/_assets/{Collection-BxtI6x1r.js → Collection-CvJiHZVa.js} +10 -10
  6. package/_assets/{CollectionCarousel-B6ArqOAS.js → CollectionCarousel-DPYm9Mco.js} +3 -3
  7. package/_assets/Confetti-C2sCoHqz.js +18 -0
  8. package/_assets/{ConstantsUtil-DExs3a1x.js → ConstantsUtil-CtK55tBM.js} +2 -2
  9. package/_assets/{ContentClient-BMmckfUm.js → ContentClient---ThWfq5.js} +2 -2
  10. package/_assets/{Creator-2EgxZy08.js → Creator-DtK2YAcr.js} +9 -9
  11. package/_assets/{CreditPackPicker-CeZveWAG.js → CreditPackPicker-Bu7lfEt0.js} +7 -7
  12. package/_assets/{DeploymentBuilder-B2obmhxl.js → DeploymentBuilder-DX9hm6Vx.js} +3 -3
  13. package/_assets/{EmotePlaybackBar-SSBx53aR.js → EmotePlaybackBar-VJrZBuv1.js} +19 -19
  14. package/_assets/{ErrorNotice-DesrOehz.js → ErrorNotice-CnnV8mz4.js} +2 -2
  15. package/_assets/Event-DeFE0sxr.js +72 -0
  16. package/_assets/{ExchangeController-CY68JvcO.js → ExchangeController-DpQvYCRl.js} +2 -2
  17. package/_assets/{Faq-B02SfIQG.js → Faq-DE6qzdtq.js} +2 -2
  18. package/_assets/Filters-CTxYIYUu.js +823 -0
  19. package/_assets/{GetCredits-Ct32lqFb.js → GetCredits-BJOzT-T5.js} +5 -5
  20. package/_assets/{Grow-DBgNwlTm.js → Grow-D3m23BkN.js} +2 -2
  21. package/_assets/{HelpersUtil-D-BCuO3u.js → HelpersUtil-MbfsN3d3.js} +4 -4
  22. package/_assets/{ItemDetail-BY5OJrUh.js → ItemDetail-CqLjVfgA.js} +43 -43
  23. package/_assets/{LoadMore-CuRa22jR.js → LoadMore-BEamihJl.js} +2 -2
  24. package/_assets/{ManaPricingBanner.styles-CyIPwTGY.js → ManaPricingBanner.styles-CGR_Legr.js} +6 -6
  25. package/_assets/{MyAssets-BeFh58qL.js → MyAssets-BZY0f14N.js} +5 -5
  26. package/_assets/{MyFavorites-Do9g3YfI.js → MyFavorites-Ch49eCTH.js} +3 -3
  27. package/_assets/{MyStore-CgKB15fb.js → MyStore-BdnpBoag.js} +10 -10
  28. package/_assets/{NetworkUtil-BcliLUUF.js → NetworkUtil-dIjLfCHL.js} +2 -2
  29. package/_assets/{NotFound-Ch1p876j.js → NotFound-BFMIcZXu.js} +2 -2
  30. package/_assets/{NotificationsBell-eGhl5PiH.js → NotificationsBell-Bq2ZZ4gw.js} +2 -2
  31. package/_assets/{OutfitDetail-BdiYEIG1.js → OutfitDetail-BqhmZYIW.js} +2 -2
  32. package/_assets/OutfitPreview-DlvPgFcr.js +7 -0
  33. package/_assets/{OutfitStudio-B_21DHCU.js → OutfitStudio-JaenoEiq.js} +11 -11
  34. package/_assets/{PaymentMethodStep-B4zFfOAs.js → PaymentMethodStep-CoESxGqg.js} +5 -5
  35. package/_assets/{PhArrowCircleDown-BgP2jbf5.js → PhArrowCircleDown-oZRgIV6I.js} +3 -3
  36. package/_assets/{PhArrowClockwise-CuNU0iSl.js → PhArrowClockwise-D6H6uB8s.js} +2 -2
  37. package/_assets/{PhArrowDown-BrLks3Uz.js → PhArrowDown-CRBvhObC.js} +4 -4
  38. package/_assets/{PhArrowLeft-BbZGSN_s.js → PhArrowLeft-iC7ALVz_.js} +5 -5
  39. package/_assets/{PhArrowRight-DqLi6_uj.js → PhArrowRight-BMhSphsR.js} +4 -4
  40. package/_assets/{PhArrowSquareOut-CX0ZRgNC.js → PhArrowSquareOut-BGOFtcYV.js} +4 -4
  41. package/_assets/{PhArrowUp-D9ugstgK.js → PhArrowUp-DaOakyLF.js} +3 -3
  42. package/_assets/{PhArrowUpRight-Bpfn12eW.js → PhArrowUpRight-Dv-X4w2R.js} +4 -4
  43. package/_assets/{PhArrowsClockwise-CRZyQVpN.js → PhArrowsClockwise-DnI7mFlV.js} +4 -4
  44. package/_assets/{PhArrowsDownUp-CV1NqVLb.js → PhArrowsDownUp-BT1rp80C.js} +4 -4
  45. package/_assets/{PhArrowsLeftRight-DvGI6Nto.js → PhArrowsLeftRight-3JEyJt0N.js} +5 -5
  46. package/_assets/{PhBank-BRxdKSKq.js → PhBank-DlTySila.js} +5 -5
  47. package/_assets/{PhBrowser-C_wNKcTe.js → PhBrowser-CxUZLRbi.js} +5 -5
  48. package/_assets/PhCaretDown-Co8viBJv.js +15 -0
  49. package/_assets/{PhCaretLeft-Cad__LUx.js → PhCaretLeft-ScH02zvv.js} +3 -3
  50. package/_assets/{PhCaretRight-CuRYBcM2.js → PhCaretRight-CG-ZCjvT.js} +3 -3
  51. package/_assets/PhCaretUp-SXVNZaJo.js +15 -0
  52. package/_assets/{PhCheck-y4MOxgof.js → PhCheck-DETGkRRi.js} +5 -5
  53. package/_assets/{PhCircleHalf-xlPKmtS7.js → PhCircleHalf-BN36Nweh.js} +4 -4
  54. package/_assets/{PhClock-BBNMhMKw.js → PhClock-DPd3K2DL.js} +4 -4
  55. package/_assets/{PhCompass-DpAl_LfZ.js → PhCompass-F0g-SfuH.js} +5 -5
  56. package/_assets/{PhCopy-D4HwCqa2.js → PhCopy-CzpD7rrG.js} +5 -5
  57. package/_assets/{PhCreditCard-CD12JEEL.js → PhCreditCard-NnI7YcNP.js} +3 -3
  58. package/_assets/{PhCurrencyDollar-DPFX6nyR.js → PhCurrencyDollar-Bst29vzW.js} +2 -2
  59. package/_assets/{PhDesktop-CNhh70Hf.js → PhDesktop-CFSSNEkS.js} +3 -3
  60. package/_assets/{PhDeviceMobile-DQgHhtB0.js → PhDeviceMobile-Dd2ijltg.js} +5 -5
  61. package/_assets/{PhDotsThree-B1gOaArE.js → PhDotsThree-CI5y9TIg.js} +4 -4
  62. package/_assets/{PhEnvelope-CGnM9AiA.js → PhEnvelope-DrQ5vbHf.js} +4 -4
  63. package/_assets/{PhFunnelSimple-D8YZwX53.js → PhFunnelSimple-CI4FOzkp.js} +4 -4
  64. package/_assets/{PhGlobe-CXtg_GcB.js → PhGlobe-DR2SpSWA.js} +4 -4
  65. package/_assets/{PhIdentificationCard-oMtubY4C.js → PhIdentificationCard-5YfSRHO7.js} +3 -3
  66. package/_assets/{PhImage-DKp6-EHn.js → PhImage-D7dVXxCI.js} +2 -2
  67. package/_assets/{PhInfo-CPd-HNhu.js → PhInfo-DNTh1xhU.js} +5 -5
  68. package/_assets/{PhLightbulb-C47afrxR.js → PhLightbulb-BfCndXXI.js} +5 -5
  69. package/_assets/{PhMagnifyingGlass-DBaqb5ff.js → PhMagnifyingGlass-DB41rFTM.js} +2 -2
  70. package/_assets/{PhPaperPlaneRight-FQGhQUrW.js → PhPaperPlaneRight-D6oxeO8G.js} +4 -4
  71. package/_assets/{PhPlus-B_CxFvZS.js → PhPlus-B90Q_jSC.js} +4 -4
  72. package/_assets/{PhPower-DRTSLLeY.js → PhPower-B3OeVFPP.js} +4 -4
  73. package/_assets/{PhPuzzlePiece-zlHiPdqx.js → PhPuzzlePiece-DMvneE8o.js} +4 -4
  74. package/_assets/{PhQrCode-riEgpq80.js → PhQrCode-B1ogONq9.js} +4 -4
  75. package/_assets/{PhQuestion-DHYK7o0G.js → PhQuestion-BGPtjzO3.js} +3 -3
  76. package/_assets/{PhQuestionMark-ZgOsaVvK.js → PhQuestionMark-Bx5KlE6e.js} +4 -4
  77. package/_assets/{PhSealCheck-B5VE_9Jt.js → PhSealCheck-kDiKrn8v.js} +3 -3
  78. package/_assets/{PhSignOut-DKQOfDHS.js → PhSignOut-C40w8abk.js} +4 -4
  79. package/_assets/{PhSpinner-B3k7aAJt.js → PhSpinner-BnCR7oBU.js} +4 -4
  80. package/_assets/{PhTrash-CD2fhMLB.js → PhTrash-Dx6EnoNj.js} +3 -3
  81. package/_assets/{PhUser-BeKUoVY6.js → PhUser-BMrVwUFx.js} +2 -2
  82. package/_assets/{PhVault-DC9QjU0-.js → PhVault-CJhJgRMl.js} +5 -5
  83. package/_assets/{PhWallet-djswo-CG.js → PhWallet-DUAwnObx.js} +3 -3
  84. package/_assets/{PhWarning-B4g8NvcF.js → PhWarning-DQNslokT.js} +4 -4
  85. package/_assets/{PhWarningCircle-xLZ7sbu0.js → PhWarningCircle-p1EFi5p4.js} +5 -5
  86. package/_assets/{PhX-BVzMqBjL.js → PhX-cY2Ff_Gl.js} +5 -5
  87. package/_assets/{SaleCountdown-BhwRjP1h.js → SaleCountdown-0FKwUs64.js} +2 -2
  88. package/_assets/{Spinner-BZ4nkWND.js → Spinner-DKAtbYs_.js} +2 -2
  89. package/_assets/{StoreSettings-CfBQz8QV.js → StoreSettings-ClPP6EVN.js} +5 -5
  90. package/_assets/{Success-Cm7UIruT.js → Success-FfIv1cKr.js} +2 -2
  91. package/_assets/{SwapController-Cj2caX_A.js → SwapController-vzfIBCB9.js} +2 -2
  92. package/_assets/{Tooltip-CAbr028E.js → Tooltip-CAzvjIL5.js} +2 -2
  93. package/_assets/{TradeService-BFd6IthP.js → TradeService-BVxpRrNq.js} +2 -2
  94. package/_assets/{W3MFrameProviderSingleton-BJ4K_qd6.js → W3MFrameProviderSingleton-DNYk5G4L.js} +4 -4
  95. package/_assets/{WebCryptoP256-udCoUFid.js → WebCryptoP256-CCC68jvZ.js} +2 -2
  96. package/_assets/{add-C46RTTNX.js → add-WhTS4Lmx.js} +3 -3
  97. package/_assets/{all-wallets-byTNDEq1.js → all-wallets-BjG4VftA.js} +2 -2
  98. package/_assets/{app-store-CaKIhI-8.js → app-store-BU7T42Cx.js} +2 -2
  99. package/_assets/{apple-DAMB_3Lk.js → apple-CawmhmSa.js} +3 -3
  100. package/_assets/{arrow-bottom-Cx66u8_t.js → arrow-bottom-CnNmrvB7.js} +2 -2
  101. package/_assets/{arrow-bottom-circle-Bv2eZVEF.js → arrow-bottom-circle-4Fk8ZSin.js} +2 -2
  102. package/_assets/{arrow-left-D0I0JXz4.js → arrow-left-CfMYQlcz.js} +3 -3
  103. package/_assets/arrow-right-QKHuTr9a.js +9 -0
  104. package/_assets/{arrow-top-uM_hNW8Z.js → arrow-top-B19eH9mc.js} +3 -3
  105. package/_assets/{async-directive-CeCQAQEH.js → async-directive-BTrBVINo.js} +4 -4
  106. package/_assets/{bank-CQUOEuRq.js → bank-CvCwnNxT.js} +2 -2
  107. package/_assets/{basic-B6XNAYD-.js → basic-042ceHB8.js} +2 -2
  108. package/_assets/{biconomy-MypCEtqM.js → biconomy-DEYIdKlV.js} +2 -2
  109. package/_assets/{browseLayout.styles-Dphi8OG5.js → browseLayout.styles-CKYDua24.js} +2 -2
  110. package/_assets/{browser-ByH7jhVr.js → browser-C20Uc0wQ.js} +2 -2
  111. package/_assets/{browser-Bh67F6hL.js → browser-D_6XKzYg.js} +3 -3
  112. package/_assets/{browser-ponyfill-D-42_L0r.js → browser-ponyfill-Dtf1Z5ay.js} +2 -2
  113. package/_assets/{browser-DHokOE3q.js → browser-v7KHsLbj.js} +2 -2
  114. package/_assets/buy-DYrx5sw7.js +2 -0
  115. package/_assets/{buy-gasless-j60oO94R.js → buy-gasless-CRa4-QEX.js} +2 -2
  116. package/_assets/{card-DcQ1wkCr.js → card-Bs7vF3ws.js} +2 -2
  117. package/_assets/{ccip-BoU8UHEb.js → ccip-DVu2orY5.js} +2 -2
  118. package/_assets/{ccip-CoDzUnzp.js → ccip-Fhp20WyW.js} +2 -2
  119. package/_assets/{chains-Bez_lzzX.js → chains-DUpjct7u.js} +2 -2
  120. package/_assets/{checkmark-bold-B-Sg0XJy.js → checkmark-bold-CwL3zpGi.js} +3 -3
  121. package/_assets/{checkmark-GDL9YfL4.js → checkmark-e3BzxNSm.js} +2 -2
  122. package/_assets/chevron-bottom-DVpGPQvJ.js +9 -0
  123. package/_assets/chevron-left-CSISn9Tl.js +9 -0
  124. package/_assets/chevron-right-D0n7Onzs.js +9 -0
  125. package/_assets/chevron-top-BSRcfV5m.js +9 -0
  126. package/_assets/{chrome-store-s39Q_LJM.js → chrome-store-B9E5S_r1.js} +3 -3
  127. package/_assets/{class-map-BxMzgOIb.js → class-map-BaReYv7k.js} +5 -5
  128. package/_assets/{clock-DmJj-grN.js → clock-98t-BkG5.js} +2 -2
  129. package/_assets/close-BnCucYZG.js +9 -0
  130. package/_assets/{coinPlaceholder-VDdmV3rm.js → coinPlaceholder-rH-MsidA.js} +2 -2
  131. package/_assets/collectionPage.styles-Dvxboaj-.js +41 -0
  132. package/_assets/common-ELx210Ky.js +2 -0
  133. package/_assets/{compass-O2jaVbub.js → compass-C4iPyfoB.js} +3 -3
  134. package/_assets/{controller-kSBOJbso.js → controller-Cjd4OjdS.js} +3 -3
  135. package/_assets/{copy-D2eE3KCY.js → copy-Db_EXK-k.js} +3 -3
  136. package/_assets/{core-Blrzs_6J.js → core-BpMZF3ge.js} +5 -5
  137. package/_assets/{createSvgIcon-DF-M8wxO.js → createSvgIcon-BNygoSPD.js} +6 -6
  138. package/_assets/{crumbs.styles-GdG1_iLJ.js → crumbs.styles-C28o2CCY.js} +2 -2
  139. package/_assets/{cursor-DSrN7SuI.js → cursor-BLyA32Y6.js} +3 -3
  140. package/_assets/{cursor-transparent-DxuBEx9O.js → cursor-transparent-is8_6H5o.js} +2 -2
  141. package/_assets/{custom-xAOpfUeg.js → custom-C6Byy1b3.js} +2 -2
  142. package/_assets/{data-capture-DCIbfyfD.js → data-capture-Cs_WMhaC.js} +2 -2
  143. package/_assets/{dcl-schemas-C-x6e7cM.js → dcl-schemas-DWx78xmt.js} +2 -2
  144. package/_assets/decimals-BKdb11Fi.js +2 -0
  145. package/_assets/decimals-DjcFJVYC.js +2 -0
  146. package/_assets/{desktop-DwZtv9fm.js → desktop-w7YXG_JM.js} +2 -2
  147. package/_assets/detectExtension-jIQJV_Bd.js +2 -0
  148. package/_assets/{disconnect-BbwiqFJ2.js → disconnect-BoVeWInH.js} +3 -3
  149. package/_assets/{discord-qWAUKbRO.js → discord-CmXuPXeB.js} +3 -3
  150. package/_assets/{disposePreview-PaXb_9Av.js → disposePreview-DPRAT5n5.js} +2 -2
  151. package/_assets/{email-BkQgEiQT.js → email-DRrE_OJ9.js} +4 -4
  152. package/_assets/{embedded-wallet-RCPBf8aK.js → embedded-wallet-DgiJiiRa.js} +2 -2
  153. package/_assets/{emotion-styled.browser.esm-FOc3Pbci.js → emotion-styled.browser.esm-VoGqX4jC.js} +2 -2
  154. package/_assets/{engine-DRvawz3n.js → engine-CdY_avUc.js} +2 -2
  155. package/_assets/{errors-DRLtkokf.js → errors-BL1_71KQ.js} +2 -2
  156. package/_assets/estimate-l1-fee-D5JoQx1d.js +2 -0
  157. package/_assets/eth_estimateGas-B3hkW1x0.js +2 -0
  158. package/_assets/eth_getStorageAt-3qPhHseU.js +2 -0
  159. package/_assets/eth_getTransactionCount-C6-gv120.js +2 -0
  160. package/_assets/ethereum-HpOsaaRE.js +2 -0
  161. package/_assets/{ethers-BCdPj9kp.js → ethers-CrJ5ldNF.js} +2 -2
  162. package/_assets/{etherscan-TUQ32gbU.js → etherscan-C6oDVSRT.js} +2 -2
  163. package/_assets/{events-BW5Jz76D.js → events-DwKtG9g7.js} +2 -2
  164. package/_assets/{exclamation-triangle-ETkxexlo.js → exclamation-triangle-DeoEkpAd.js} +2 -2
  165. package/_assets/{execute-yCOq6Ata.js → execute-kM7s7QXx.js} +3 -3
  166. package/_assets/{extension-DoOVmXmT.js → extension-BC4u9PFt.js} +3 -3
  167. package/_assets/external-link-D1_8iC7n.js +9 -0
  168. package/_assets/{extractIPFS-CbHGXyvP.js → extractIPFS-DBi5jtHG.js} +2 -2
  169. package/_assets/{facebook-BmPLPVaB.js → facebook-BfvFcXpk.js} +3 -3
  170. package/_assets/{farcaster-BLIAglQl.js → farcaster-DBSK9Oxt.js} +2 -2
  171. package/_assets/{features-T8-LWfbN.js → features-CMw82QKz.js} +2 -2
  172. package/_assets/{fetchTokenMetadata-AjC8OtFM.js → fetchTokenMetadata-GSOzOasE.js} +3 -3
  173. package/_assets/{field.styles-D44TP7jS.js → field.styles-o4tjas-4.js} +2 -2
  174. package/_assets/{filters-DWaFeZ95.js → filters-Bx7yqePJ.js} +3 -3
  175. package/_assets/{fortmatic-CuiQPJMC.js → fortmatic-5N4Im3cl.js} +2 -2
  176. package/_assets/{get-bytecode-CJfB4Pzr.js → get-bytecode-BqPeAoLV.js} +2 -2
  177. package/_assets/get-ecosystem-wallet-info-Gv6nN833.js +2 -0
  178. package/_assets/{getBalance-DzGXIMnz.js → getBalance-DUHH390H.js} +3 -3
  179. package/_assets/{getInstalledModules-DtRANZuN.js → getInstalledModules-DLyGZ8jg.js} +2 -2
  180. package/_assets/getNFT-DFH8hAui.js +2 -0
  181. package/_assets/{getNFT-NWLH5sUg.js → getNFT-HkoXU_Sv.js} +3 -3
  182. package/_assets/{github-BiA5cQMJ.js → github-Bir9JlcK.js} +3 -3
  183. package/_assets/{google-CsF9xgle.js → google-BlkSyDA4.js} +3 -3
  184. package/_assets/{grid.styles-B_SYfKbL.js → grid.styles-uxy9NCd3.js} +2 -2
  185. package/_assets/{hashTypedData-BhIEfUI7.js → hashTypedData-D37ZWtGa.js} +2 -2
  186. package/_assets/{hashTypedData-rczDkChp.js → hashTypedData-PrQTswCW.js} +2 -2
  187. package/_assets/{help-circle-Bwgxn3Vn.js → help-circle-DA-n1pkO.js} +3 -3
  188. package/_assets/{id-O5raZ1NS.js → id-UrGKP3rm.js} +2 -2
  189. package/_assets/{image-CbhOQpP5.js → image-D3PTNca-.js} +2 -2
  190. package/_assets/{import-DxM1FBAo.js → import-D3eNER_R.js} +2 -2
  191. package/_assets/{in-app-C05LybrX.js → in-app-JHO5rkZY.js} +2 -2
  192. package/_assets/{in-app-wallet-calls-bMCEqdh8.js → in-app-wallet-calls-gXtDRTf0.js} +2 -2
  193. package/_assets/{index-B1mRJj2N.js → index-0y8Zn0zG.js} +3 -3
  194. package/_assets/{index-BM_pyFwk.js → index-B1qQUgCw.js} +3 -3
  195. package/_assets/{index-axxJtz4m.js → index-B2yMpaxe.js} +2 -2
  196. package/_assets/{index-DIsgwwY8.js → index-B65so4Ch.js} +3 -3
  197. package/_assets/{index-CcbkD4de.js → index-BLSQoUoe.js} +2 -2
  198. package/_assets/{index-DFk23JOU.js → index-BOgQlMmh.js} +3 -3
  199. package/_assets/{index-D-BFaWfQ.js → index-BPmksklK.js} +2 -2
  200. package/_assets/{index-CnCQLaFO.js → index-BRfMKHFe.js} +3 -3
  201. package/_assets/{index-BGx4_qmh.js → index-BTOs8fTb.js} +2 -2
  202. package/_assets/{index-BSr5uLjJ.js → index-BcZtRIMz.js} +6 -6
  203. package/_assets/{index-BIzT-wv6.js → index-Be-SnCqN.js} +2 -2
  204. package/_assets/{index-CJrZiV6S.js → index-Bey6qSFK.js} +2 -2
  205. package/_assets/{index-XGfjQWLd.js → index-BeyWzenD.js} +4 -4
  206. package/_assets/{index-Dj3u_bYz.js → index-Bj_QPTWr.js} +3 -3
  207. package/_assets/{index-DVBgBIet.js → index-ByQD8hxM.js} +3 -3
  208. package/_assets/{index-xq9CDVcw.js → index-BzFw2S12.js} +2 -2
  209. package/_assets/{index-B5TeKkvi.js → index-C82dLsVC.js} +2 -2
  210. package/_assets/{index-CTIQcWvi.js → index-C9aZT1A5.js} +2 -2
  211. package/_assets/{index-CpaD9gAl.js → index-C9s4xn8h.js} +4 -4
  212. package/_assets/{index-CL5nbX5c.js → index-CF_-f4j7.js} +4 -4
  213. package/_assets/{index-DNTfnlfv.js → index-CGKHdy5-.js} +6 -6
  214. package/_assets/{index-vtfDF7Ts.js → index-CNrT3lXq.js} +4 -4
  215. package/_assets/{index-CTA3vGDF.js → index-CNvXNEae.js} +3 -3
  216. package/_assets/{index-Wd8TOb4J.js → index-CQj_DDMA.js} +7 -7
  217. package/_assets/{index-BSS0zxeU.js → index-CSDxQwAJ.js} +2 -2
  218. package/_assets/{index-DkUIro3E.js → index-CSsPrmzp.js} +4 -4
  219. package/_assets/{index-IPbQf9uE.js → index-CTKEbHxo.js} +2 -2
  220. package/_assets/{index-DoJLnq5q.js → index-CU2NjxXk.js} +5 -5
  221. package/_assets/{index-CvY4gY5a.js → index-CUAWJbIm.js} +2 -2
  222. package/_assets/{index-Cef-wgOf.js → index-CbRvrdpb.js} +7 -7
  223. package/_assets/{index-BjYDAZbE.js → index-CdKjm78V.js} +2 -2
  224. package/_assets/{index-BtB2k6Sc.js → index-CotIjV-5.js} +4 -4
  225. package/_assets/{index-C0x3zH9F.js → index-CrTtW7ib.js} +4 -4
  226. package/_assets/{index-B75sAX61.js → index-CvPhrKMB.js} +2 -2
  227. package/_assets/{index-bSR15ZuH.js → index-CxP0J4UQ.js} +4 -4
  228. package/_assets/index-Cz1gkPqp.js +4310 -0
  229. package/_assets/index-D54ZVV5p.js +2 -0
  230. package/_assets/{index-haBkL6Jh.js → index-DAaq8AAl.js} +2 -2
  231. package/_assets/{index-BZxPU8KF.js → index-DD2xWUfC.js} +2 -2
  232. package/_assets/{index-DcxUlEAC.js → index-DFumJ4wf.js} +2 -2
  233. package/_assets/{index-CXZXpnbw.js → index-DNEdUu87.js} +2 -2
  234. package/_assets/{index-Cklgk0Q_.js → index-DQo_kR-X.js} +2 -2
  235. package/_assets/{index-BOAQ-AOx.js → index-DR7TXHQp.js} +4 -4
  236. package/_assets/{index-CiYRBiPA.js → index-DUYz3I7I.js} +2 -2
  237. package/_assets/{index-DHNyauFt.js → index-DZjqAtGF.js} +3 -3
  238. package/_assets/{index-Bh-VtU9r.js → index-De5oqThi.js} +2 -2
  239. package/_assets/{index-i3P0mRh0.js → index-DgqLfZEx.js} +3 -3
  240. package/_assets/{index-DspOR9s6.css → index-DjZoOGNQ.css} +1 -1
  241. package/_assets/{index-BNfBKfYg.js → index-Dl65QUwJ.js} +2 -2
  242. package/_assets/{index-CZX2hdSu.js → index-Dq92ujA0.js} +2 -2
  243. package/_assets/{index-CCxkv-Xn.js → index-Dquscgns.js} +2 -2
  244. package/_assets/{index-Dt3IB23c.js → index-Fnnr52Zo.js} +4 -4
  245. package/_assets/{index-DpDO-WIV.js → index-H1ONtXq_.js} +2 -2
  246. package/_assets/{index-9DzhsG7M.js → index-IpyVKu2H.js} +2 -2
  247. package/_assets/{index-BdFqn3Yn.js → index-M2lOtr-r.js} +2 -2
  248. package/_assets/{index-CnpBhsd4.js → index-PT9fH4r2.js} +2 -2
  249. package/_assets/{index-4Qt6beZq.js → index-RDj3L4o1.js} +2 -2
  250. package/_assets/{index-CKlbOc6k.js → index-S_xxRX5B.js} +2 -2
  251. package/_assets/{index-XW-WjpVU.js → index-VuiHTTj-.js} +2 -2
  252. package/_assets/{index-BSBKG4BK.js → index-Yppwvypt.js} +2 -2
  253. package/_assets/index-eGYVHii2.js +2 -0
  254. package/_assets/{index-CA8Fetyr.js → index-hp5MSBBj.js} +2 -2
  255. package/_assets/{index-C6wJcQNp.js → index-rhQ-eDQn.js} +6 -6
  256. package/_assets/{index-CtyYd7Um.js → index-tml2q7sp.js} +4 -4
  257. package/_assets/{index-OmDH9Dts.js → index-vzfAJ0fY.js} +4 -4
  258. package/_assets/{index-Bvltq2nA.js → index-wdBXuJRn.js} +3 -3
  259. package/_assets/{index-C3LqEUSB.js → index-wr1WVuLg.js} +2 -2
  260. package/_assets/{index-Dfxis0Cp.js → index-zQqguv9E.js} +3 -3
  261. package/_assets/{index.es-E4aqsh4a.js → index.es-1pbYt5cr.js} +2 -2
  262. package/_assets/{index.es-DuewOYzm.js → index.es-C8XHt6Ti.js} +5 -5
  263. package/_assets/{index.es-UW_qEtkd.js → index.es-CMyjZAO0.js} +2 -2
  264. package/_assets/{index.es-B5TTyCeq.js → index.es-CdNfmFUV.js} +2 -2
  265. package/_assets/{info-B91xCNqh.js → info-Dsmi8VWW.js} +3 -3
  266. package/_assets/info-circle-CppZa7vK.js +13 -0
  267. package/_assets/{items-empty-CiUgWrW2.js → items-empty-DgC6LQFu.js} +2 -2
  268. package/_assets/jsxRuntime.module-Q9HBaTr-.js +2 -0
  269. package/_assets/{jump-Bbjw5Lcv.js → jump-DWlz3CUP.js} +2 -2
  270. package/_assets/{lightbulb-ByedgZqO.js → lightbulb-B2s8QgKQ.js} +3 -3
  271. package/_assets/{linkAccount-DRoKpQ9o.js → linkAccount-Ckt0HAx3.js} +2 -2
  272. package/_assets/loader-logo-Csjy-m2Q.js +2 -0
  273. package/_assets/{localBatchGatewayRequest-Wcu6xC6M.js → localBatchGatewayRequest-Dhy5qVCX.js} +2 -2
  274. package/_assets/{mail-B2wBPliw.js → mail-CZ9ghbH-.js} +2 -2
  275. package/_assets/{mobile-COGIkuHo.js → mobile-D7KL87qI.js} +2 -2
  276. package/_assets/{modal.styles-DD97ixMS.js → modal.styles-CUKE11GW.js} +2 -2
  277. package/_assets/{more-zcriamqw.js → more-C1vsI2Vu.js} +2 -2
  278. package/_assets/{native-DfHseqH2.js → native-DcmWBWd5.js} +2 -2
  279. package/_assets/{network-placeholder-Cm-6akxX.js → network-placeholder-C6sglFRh.js} +2 -2
  280. package/_assets/{networks-CyyUaA0n.js → networks-bpRU9a50.js} +2 -2
  281. package/_assets/{nftPlaceholder-vZdYCYRL.js → nftPlaceholder-ByX0V9oA.js} +2 -2
  282. package/_assets/off-B5vm0egN.js +9 -0
  283. package/_assets/{onramp-DJvJnLIF.js → onramp-Dpy9tH4d.js} +2 -2
  284. package/_assets/openzeppelin-1GQzXJg9.js +2 -0
  285. package/_assets/ownerOf-C6pMzSB4.js +2 -0
  286. package/_assets/parseNft-Cu4IvFmn.js +3 -0
  287. package/_assets/{parseSignature-BMymJPfi.js → parseSignature-BzrTvLuZ.js} +2 -2
  288. package/_assets/{parseSignature-y_E043E5.js → parseSignature-WQFjTLMm.js} +4 -4
  289. package/_assets/{passkeys-Bm5mQQf5.js → passkeys-TsrXpJb1.js} +2 -2
  290. package/_assets/{pay-with-exchange-D7LRHkOW.js → pay-with-exchange-DD4ENO4_.js} +2 -2
  291. package/_assets/{play-store-CAbJYmXD.js → play-store-BBusJ15a.js} +2 -2
  292. package/_assets/{plus-DWQF9t2p.js → plus-QdPNUgRE.js} +3 -3
  293. package/_assets/{prepare-contract-call-BGUyrJWh.js → prepare-contract-call-DtSHEo_3.js} +2 -2
  294. package/_assets/{qr-code-Br4VphwV.js → qr-code-SdYLFk2z.js} +2 -2
  295. package/_assets/{qr-overlay-xvc2Siyo.js → qr-overlay-lmwEVI8k.js} +6 -6
  296. package/_assets/{react-EC0gZ8rD.js → react-CIQLPMFg.js} +2 -2
  297. package/_assets/{receive-BKmPKIld.js → receive-C5DczZDN.js} +2 -2
  298. package/_assets/{recycle-horizontal-DdAImjTL.js → recycle-horizontal-SCXYOpJq.js} +3 -3
  299. package/_assets/{ref-D90CCjlU.js → ref-DRxYb1N1.js} +2 -2
  300. package/_assets/{refresh-S-H2nzPq.js → refresh-eticwJ3S.js} +2 -2
  301. package/_assets/{reown-logo-D5L2QY4i.js → reown-logo-C2dHPSrm.js} +3 -3
  302. package/_assets/{resolveImplementation-B5jGshNo.js → resolveImplementation-BOuZpujm.js} +2 -2
  303. package/_assets/{resume-buy-C9f4_CsR.js → resume-buy--KfQKYR6.js} +2 -2
  304. package/_assets/{resume-name-WleboE2d.js → resume-name-DcFKejtP.js} +2 -2
  305. package/_assets/{rpc-BgsGkh8A.js → rpc-CpN-UZfC.js} +2 -2
  306. package/_assets/{sales-empty-Dml0vN-8.js → sales-empty-yNT_UofY.js} +2 -2
  307. package/_assets/{search-f6j421fJ.js → search-CeQ1H1CU.js} +3 -3
  308. package/_assets/{search-empty-D5DLeEKI.js → search-empty-DyNrMjf7.js} +2 -2
  309. package/_assets/{secp256k1-BkBwlPf4.js → secp256k1-BBb9sif7.js} +2 -2
  310. package/_assets/{secp256k1-Cb_GjQmJ.js → secp256k1-BPN7BIom.js} +2 -2
  311. package/_assets/{secp256k1-3rzIZApQ.js → secp256k1-CDYbbxrE.js} +2 -2
  312. package/_assets/{send-BAUrBF6z.js → send-Bo03Ql2I.js} +3 -3
  313. package/_assets/{send-DJYzWVMk.js → send-CRh2vZW2.js} +2 -2
  314. package/_assets/send-batch-transaction-DVXcUI5O.js +2 -0
  315. package/_assets/{send-eip712-transaction-CG-h2X9a.js → send-eip712-transaction-DW1F2yZt.js} +3 -3
  316. package/_assets/send-gasless-transaction-gDOIIkDc.js +3 -0
  317. package/_assets/send-transaction-KJII67U1.js +3 -0
  318. package/_assets/{sendMetaTransaction-C6Nhv1ek.js → sendMetaTransaction-TqW_X_rn.js} +2 -2
  319. package/_assets/{sendRawTransaction-mjINd6AT.js → sendRawTransaction-CsinkY_q.js} +4 -4
  320. package/_assets/{sentry-Cb74VndH.js → sentry-BLkqPRre.js} +3 -3
  321. package/_assets/{serializeTransaction-JhftRTwj.js → serializeTransaction-96z6-C8p.js} +2 -2
  322. package/_assets/{session-proposal-CjaKL53H.js → session-proposal-DEKXCk4o.js} +2 -2
  323. package/_assets/{session-request-CHKBqS1N.js → session-request-Dw2PW8Aa.js} +3 -3
  324. package/_assets/{sha256-CHhtlSrf.js → sha256-D1sg_FYq.js} +2 -2
  325. package/_assets/sha3-xHGanBJ2.js +2 -0
  326. package/_assets/signin-empty-DWHxLN5Z.js +2 -0
  327. package/_assets/{signing-17T07uJ_.js → signing-C11hELiu.js} +4 -4
  328. package/_assets/{skeleton.styles-Df0jIOwp.js → skeleton.styles-D6CyJhvn.js} +2 -2
  329. package/_assets/{socials-Bi0NQvE0.js → socials-D3SwHCBa.js} +2 -2
  330. package/_assets/{styled-4Ia3cH-v.js → styled-B09X0nfq.js} +3 -3
  331. package/_assets/{swapHorizontal-BXjIGAcZ.js → swapHorizontal-C6GakaRf.js} +2 -2
  332. package/_assets/{swapHorizontalBold-BzueHopN.js → swapHorizontalBold-oeP-_O-R.js} +2 -2
  333. package/_assets/{swapHorizontalMedium-DLFo4hRx.js → swapHorizontalMedium-C64EXSWD.js} +2 -2
  334. package/_assets/{swapHorizontalRoundedBold-BddBy7OL.js → swapHorizontalRoundedBold-CHgP6XK-.js} +2 -2
  335. package/_assets/{swapVertical-DYkySTmy.js → swapVertical-8SLU7RpO.js} +3 -3
  336. package/_assets/{swaps-DCtzhgv-.js → swaps-DJf-P7SE.js} +8 -8
  337. package/_assets/{telegram-D8ymSABf.js → telegram-CF91ES6s.js} +2 -2
  338. package/_assets/{thirdweb-DyxjDgvW.js → thirdweb-CRUHF8UW.js} +4 -4
  339. package/_assets/{three-dots-CiS9iH0H.js → three-dots-BsCoLPC9.js} +2 -2
  340. package/_assets/{to-serializable-transaction-CDYrTMn4.js → to-serializable-transaction-Dlsw6UR3.js} +3 -3
  341. package/_assets/totalSupply-CE6xv02e.js +2 -0
  342. package/_assets/{trade-encoding-BKjm4pbk.js → trade-encoding-DxJLtadh.js} +2 -2
  343. package/_assets/{transaction-DcgOiSBk.js → transaction-CBhR-RZ-.js} +2 -2
  344. package/_assets/transactionReceipt-CZ8aixVn.js +2 -0
  345. package/_assets/transactions-BXw96qhh.js +17 -0
  346. package/_assets/{twitch-BJQCmiGz.js → twitch-BranWKeM.js} +2 -2
  347. package/_assets/{twitterIcon-B78o99Zv.js → twitterIcon-BfIWT5DS.js} +2 -2
  348. package/_assets/{useCreatorSales-Cb4A658a.js → useCreatorSales-CuvNT76-.js} +2 -2
  349. package/_assets/{useInfiniteGrid-DheMz6c1.js → useInfiniteGrid-BVnan2j4.js} +2 -2
  350. package/_assets/{useStore-xMX0SCw6.js → useStore-B3U8zy8P.js} +3 -3
  351. package/_assets/{useTheme-BupTcwye.js → useTheme-CUWyjFJw.js} +2 -2
  352. package/_assets/{utils-8YzhWhI4.js → utils-CXCRpUYB.js} +2 -2
  353. package/_assets/{verify-CrYE2kna.js → verify-DcO5QuX7.js} +3 -3
  354. package/_assets/{verify-filled-CwwnY5h6.js → verify-filled-CKp8XQqI.js} +3 -3
  355. package/_assets/{verifyHash-DPUQC_yg.js → verifyHash-CShFZGYi.js} +2 -2
  356. package/_assets/{w3m-modal-DLtR8WjU.js → w3m-modal-Dvm-syzo.js} +2 -2
  357. package/_assets/{w3m-modal-B497G8Tj.js → w3m-modal-nRNzH_yB.js} +2 -2
  358. package/_assets/wait-for-tx-receipt-C1d78DSP.js +2 -0
  359. package/_assets/{wallet-EosqBoq7.js → wallet-BHCiGpYx.js} +3 -3
  360. package/_assets/{wallet-placeholder-DL8kIY2O.js → wallet-placeholder-BVguMNEt.js} +3 -3
  361. package/_assets/{walletconnect-CauX9cVK.js → walletconnect-9t1WJh4k.js} +4 -4
  362. package/_assets/{wallets-Dnwy6cWk.js → wallets-ofrUKkM4.js} +6 -6
  363. package/_assets/{warning-circle-BrcBx24p.js → warning-circle-II7Vcaxs.js} +3 -3
  364. package/_assets/{web-connector-DsSDJS-4.js → web-connector-DLcUxWtU.js} +4 -4
  365. package/_assets/{writeContract-BLy6M4-l.js → writeContract-P05P_hf3.js} +2 -2
  366. package/_assets/x-D0s8LW19.js +13 -0
  367. package/_assets/{zora-sepolia-CUCxS5yu.js → zora-sepolia-z0_IZNrm.js} +2 -2
  368. package/_assets/{zoraTestnet-MZjEzcsS.js → zoraTestnet-s146C09S.js} +2 -2
  369. package/index.html +12 -11
  370. package/package.json +2 -2
  371. package/_assets/Confetti-Cq7xlf_X.js +0 -18
  372. package/_assets/Event-DAbN9OIZ.js +0 -72
  373. package/_assets/Filters-BipHXxnJ.js +0 -823
  374. package/_assets/OutfitPreview-DhrknwF7.js +0 -7
  375. package/_assets/PhCaretDown-DBNFm85V.js +0 -15
  376. package/_assets/PhCaretUp-DE2FiuTS.js +0 -15
  377. package/_assets/arrow-right-BHc70exa.js +0 -9
  378. package/_assets/buy-C81jyIOD.js +0 -2
  379. package/_assets/cart-checkout-DkfOoncV.js +0 -2
  380. package/_assets/categories-DgBMiYtZ.js +0 -2
  381. package/_assets/chevron-bottom-CLuKI9LQ.js +0 -9
  382. package/_assets/chevron-left-B_RU4s1F.js +0 -9
  383. package/_assets/chevron-right-C6ckznAo.js +0 -9
  384. package/_assets/chevron-top-CJOmtrv2.js +0 -9
  385. package/_assets/close-D4d1U5NV.js +0 -9
  386. package/_assets/collectionPage.styles-B7rtIk6J.js +0 -41
  387. package/_assets/common-CCoQZA5E.js +0 -2
  388. package/_assets/decimals-BvDI7b0k.js +0 -2
  389. package/_assets/decimals-DDCxC5c9.js +0 -2
  390. package/_assets/detectExtension-DKvdIAc4.js +0 -2
  391. package/_assets/estimate-l1-fee-S5b3zNLC.js +0 -2
  392. package/_assets/eth_estimateGas-DWeTQSR3.js +0 -2
  393. package/_assets/eth_getStorageAt-DZCdNLkY.js +0 -2
  394. package/_assets/eth_getTransactionCount-DvIglEHk.js +0 -2
  395. package/_assets/ethereum-CIkPKMxG.js +0 -2
  396. package/_assets/external-link-BEPN-Y2j.js +0 -9
  397. package/_assets/get-ecosystem-wallet-info-QF10ZErA.js +0 -2
  398. package/_assets/getNFT-B5QRqaiw.js +0 -2
  399. package/_assets/index-C53Cx_Kg.js +0 -2
  400. package/_assets/index-CUIg8HdV.js +0 -4422
  401. package/_assets/index-zN0D7p14.js +0 -2
  402. package/_assets/info-circle-DtEY-DDD.js +0 -13
  403. package/_assets/jsxRuntime.module-BUzu5v1_.js +0 -2
  404. package/_assets/off-CLF8R11w.js +0 -9
  405. package/_assets/openzeppelin-B65USuL7.js +0 -2
  406. package/_assets/ownerOf-BpFsZCP3.js +0 -2
  407. package/_assets/parseNft-DyMNYtvp.js +0 -3
  408. package/_assets/send-batch-transaction-CQlrVyL6.js +0 -2
  409. package/_assets/send-gasless-transaction-CLF9j93P.js +0 -3
  410. package/_assets/send-transaction-BGnLy_CJ.js +0 -3
  411. package/_assets/sha3-DSPBiO5H.js +0 -2
  412. package/_assets/signin-empty-D1LO9Xts.js +0 -2
  413. package/_assets/totalSupply-BFDsc9M1.js +0 -2
  414. package/_assets/transactionReceipt-yxtcKZnQ.js +0 -2
  415. package/_assets/transactions-BLBNqZ1l.js +0 -17
  416. package/_assets/wait-for-tx-receipt-Cv5SjIHT.js +0 -2
  417. package/_assets/x-CwtQDczS.js +0 -13
@@ -1,4 +1,4 @@
1
- import{j as e,L as Xt,r as T,b as Sa,a as $a}from"./react-EC0gZ8rD.js";import{s as i,a as z,t as a,z as Ie,F as pe,W as Fe,C as Me,bi as Ma,E as Le,bj as Ta,A as Ia,I as Y,n as Je,B as Aa,ag as H,X as Tt,x as Ea,y as Pa,w as za,bk as Ra,aL as Ba,bl as _a,Y as qa,bm as Wa,bn as Fa,bo as La,bp as It,$ as Ka,bq as Na,br as Qa,bs as Ua,as as Ke,a0 as Ga,D as Oa,bt as At,O as V,bu as Et,bv as Ha,bw as Da,l as ie,bx as Va,by as Ya,bz as Xa,bA as Ne,bf as Ja,bB as we,bC as Ce,bD as Pt,bE as Za,h as zt,j as Rt,bF as es}from"./index-CUIg8HdV.js";import{C as ts,b as as,t as ss,a as ns,A as is,s as Bt,r as _t,i as qt,m as rs,c as os,p as Wt,d as cs}from"./CollectionCarousel-B6ArqOAS.js";import{M as ls,S as ds,C as us,H as hs,a as ps,T as gs,X as fs,B as xs,b as ms,c as Ft,d as bs,e as Ae,f as ys,g as vs,h as ws,i as Xe,j as he,L as Cs,P as js,k as Lt,l as Kt,W as ks,m as Ss,n as $s,o as Ms,A as Ts,p as Is,q as As,r as Es,s as Ps,t as zs,u as Rs,v as Bs,w as Qe,x as _s,y as qs}from"./CreditPackPicker-CeZveWAG.js";import{m as Te}from"./mana-matic-light-Bl5duieC.js";import{q as Ws,s as Fs,g as Ls,t as Ks,u as Ns,A as Qs}from"./trade-encoding-BKjm4pbk.js";import{p as Nt,g as Us,a as Ue}from"./buy-C81jyIOD.js";import{w as Gs,S as Ge,b as Os,G as Hs}from"./buy-gasless-j60oO94R.js";import{u as Ds,M as Vs,R as je,o as Ys,r as Xs,c as Js,g as Zs,a as en,p as Qt,b as Oe}from"./cart-checkout-DkfOoncV.js";import{i as tn,a as an}from"./errors-DRLtkokf.js";import{E as sn}from"./ErrorNotice-DesrOehz.js";import"./dcl-schemas-C-x6e7cM.js";import"./sentry-Cb74VndH.js";import"./ethers-BCdPj9kp.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-C6Nhv1ek.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new n.Error().stack;d&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[d]="7ba03a46-b52b-4fa4-a2e3-1ef81259b959",n._sentryDebugIdIdentifier="sentry-dbid-7ba03a46-b52b-4fa4-a2e3-1ef81259b959")}catch{}})();const nn=i.div`
1
+ import{j as e,L as Xt,r as T,b as Sa,a as $a}from"./react-CIQLPMFg.js";import{s as i,a as z,t as a,z as Ie,F as pe,W as Fe,C as Me,E as Le,bi as Ma,A as Ta,I as Y,n as Je,B as Ia,ag as H,X as Tt,x as Aa,y as Ea,w as Pa,bj as za,aG as Ra,bk as Ba,Y as _a,bl as qa,bm as Wa,bn as Fa,bo as It,$ as La,bp as Ka,bq as Na,br as Qa,as as Ke,a0 as Ua,D as Ga,bs as At,O as V,bt as Et,bu as Oa,bv as Ha,l as ie,bw as Da,bx as Va,by as Ya,bz as Ne,bf as Xa,bA as we,bB as Ce,bC as Pt,bD as Ja,h as zt,j as Rt,bE as Za}from"./index-Cz1gkPqp.js";import{C as es,b as ts,t as as,a as ss,A as ns,s as Bt,r as _t,i as qt,m as is,c as rs,p as Wt,d as os}from"./CollectionCarousel-DPYm9Mco.js";import{M as cs,S as ls,C as ds,H as us,a as hs,T as ps,X as gs,B as xs,b as fs,c as Ft,d as ms,e as Ae,f as bs,g as ys,h as vs,i as Xe,j as he,L as ws,P as Cs,k as Lt,l as Kt,W as js,m as ks,n as Ss,o as $s,A as Ms,p as Ts,q as Is,r as As,s as Es,t as Ps,u as zs,v as Rs,w as Qe,x as Bs,y as _s}from"./CreditPackPicker-Bu7lfEt0.js";import{m as Te}from"./mana-matic-light-Bl5duieC.js";import{q as qs,s as Ws,g as Fs,t as Ls,u as Ks,A as Ns}from"./trade-encoding-DxJLtadh.js";import{p as Nt,g as Qs,a as Ue}from"./buy-DYrx5sw7.js";import{w as Us,S as Ge,b as Gs,G as Os}from"./buy-gasless-CRa4-QEX.js";import{l as Hs,u as Ds,M as Vs,R as je,o as Ys,r as Xs,c as Js,g as Zs,a as en,p as Qt,b as Oe}from"./loader-logo-Csjy-m2Q.js";import{i as tn,a as an}from"./errors-BL1_71KQ.js";import{E as sn}from"./ErrorNotice-CnnV8mz4.js";import"./dcl-schemas-DWx78xmt.js";import"./sentry-BLkqPRre.js";import"./ethers-CrJ5ldNF.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-TqW_X_rn.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new n.Error().stack;d&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[d]="838111de-5f62-4dd5-897c-30e60c021b32",n._sentryDebugIdIdentifier="sentry-dbid-838111de-5f62-4dd5-897c-30e60c021b32")}catch{}})();const nn=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -161,7 +161,7 @@ import{j as e,L as Xt,r as T,b as Sa,a as $a}from"./react-EC0gZ8rD.js";import{s
161
161
  font-weight: 700;
162
162
  color: ${re.text};
163
163
  }
164
- `,fn=i.p`
164
+ `,xn=i.p`
165
165
  margin: 12px 0 0;
166
166
  background: rgba(255, 162, 90, 0.3);
167
167
  border-radius: ${z.radius.btn};
@@ -170,7 +170,7 @@ import{j as e,L as Xt,r as T,b as Sa,a as $a}from"./react-EC0gZ8rD.js";import{s
170
170
  font-size: 14px;
171
171
  line-height: 1.334;
172
172
  color: ${z.colors.text2};
173
- `;function xn(n){const{phase:d,balanceCredits:k,onClose:S}=n,R=d==="processing",U=d==="error"?a("cartCheckout.errorTitle"):d==="nofunds"?a("cartCheckout.titleNoFunds"):d==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),G=d==="processing";return e.jsxs(ls,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ds,{onClick:R?void 0:S,"aria-hidden":!0}),e.jsxs(us,{"data-tall":G||void 0,children:[e.jsxs(hs,{children:[e.jsxs(ps,{children:[e.jsx(gs,{children:U}),!R&&e.jsx(fs,{onClick:S,"aria-label":a("buyModal.close"),children:e.jsx(ts,{})})]}),e.jsxs(xs,{children:[e.jsx(ms,{children:d==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(Ft,{}),e.jsx(bs,{children:pe(k)})]}),n.heldCreditsCount&&(d==="choose"||d==="nofunds")?e.jsx(fn,{"data-testid":"cart-held-notice",children:a("buyModal.heldExplainer",{credits:n.heldCreditsCount,currency:Me.name})}):null]}),d==="choose"&&e.jsxs(Ae,{children:[e.jsxs(gn,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(Ft,{}),pe(n.totalCredits??0)]})]}),e.jsx(Zt,{options:n.options??[],totalCents:n.totalCents??0,shortfall:n.shortfall,onPay:n.onPay??(()=>{})})]}),d==="processing"&&e.jsx(mn,{stage:n.stage??"reserving",step:n.step??1,total:n.total??1,isSelfCustody:!!n.isSelfCustody,signatures:n.signatures}),d==="nofunds"&&e.jsx(bn,{lines:n.lines??[],shortfallCredits:n.shortfallCredits??0,packs:n.packs??[],selectedPack:n.selectedPack??"",onSelectPack:n.onSelectPack??(()=>{}),onBuyPacks:n.onBuyPacks??(()=>{}),onCancel:S}),d==="error"&&e.jsxs(Ae,{children:[e.jsxs(ys,{"data-testid":"buy-error",children:[e.jsx(vs,{src:as,alt:"",width:64,height:80}),e.jsxs(ws,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",n.heldCredits?e.jsxs(e.Fragment,{children:[n.message?e.jsxs(e.Fragment,{children:[n.message," "]}):null,a("cartCheckout.heldLead",{currency:Me.name}),e.jsx("b",{children:a("cartCheckout.heldBold")}),a("cartCheckout.heldTail",{currency:Me.name})]}):n.message??a("cartCheckout.errorBody")]})]}),n.heldCredits?e.jsx(Xe,{children:e.jsx(he,{"data-variant":"purple","data-full":!0,onClick:S,children:a("cartCheckout.gotIt")})}):e.jsxs(Xe,{children:[e.jsx(he,{"data-variant":"outline",onClick:S,children:a("buyModal.cancel")}),e.jsx(he,{"data-variant":"purple",onClick:n.onRetry??S,children:a("cartCheckout.tryAgain")})]})]})]})]})}function mn({stage:n,step:d,total:k,isSelfCustody:S,signatures:R}){const U=n==="reserving",G=k>0?Math.min(100,Math.round(d/k*100)):0,O=S&&R&&R.total>1,M=n==="awaiting-signature"?S?O?a("cartCheckout.confirmMultiple",{current:R.current,total:R.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):n==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(Ae,{"data-processing":!0,children:[e.jsx(Cs,{src:Ma,alt:"",width:61,height:61}),e.jsx(js,{children:M}),U?e.jsxs(dn,{children:[e.jsx(Lt,{"aria-hidden":!0,children:e.jsx(Kt,{"data-step":!0,style:{width:`${G}%`}})}),k>1?e.jsxs(un,{children:[d,"/",k]}):null]}):e.jsx(Lt,{"aria-hidden":!0,children:e.jsx(Kt,{})})]})}function bn({lines:n,shortfallCredits:d,packs:k,selectedPack:S,onSelectPack:R,onBuyPacks:U,onCancel:G}){const O=n.reduce((M,r)=>M+(r.quantity??1),0);return e.jsxs(Ae,{children:[e.jsxs(ks,{"data-testid":"nofunds-warning",children:[e.jsx(Ss,{}),e.jsxs($s,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,d)})})," ",a("buyModal.warningToPurchase",{count:O}),Le()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Ms,{href:Ta("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]})]}),e.jsx(hn,{children:n.map(M=>{const r=M.quantity??1;return e.jsxs(Ts,{children:[e.jsx(Is,{children:M.item.thumbnail?e.jsx("img",{src:M.item.thumbnail,alt:""}):null}),e.jsxs(As,{children:[e.jsxs("div",{children:[e.jsxs(Es,{title:M.item.name,children:[M.item.name||a("buyModal.itemFallback"),r>1?e.jsx(pn,{children:a("cartCheckout.qty",{count:r})}):null]}),M.item.creator?e.jsx(Ps,{address:M.item.creator}):null]}),e.jsxs(zs,{children:[e.jsx(Rs,{}),e.jsx("span",{children:pe(M.priceCredits*r)})]})]})]},M.item.id)})}),Le()?null:e.jsx(e.Fragment,{children:e.jsx(Bs,{packs:k,selectedId:S||void 0,onSelect:R})}),e.jsxs(Xe,{children:[e.jsx(he,{"data-variant":"outline",onClick:G,children:a("buyModal.cancel")}),Le()?null:e.jsx(he,{"data-variant":"gradient",onClick:U,children:a("buyModal.buy")})]})]})}const{colors:l,gradients:yn,radius:oe}=z,ea="@media (max-width: 1080px)",E="@media (max-width: 880px)",Gt=i.div`
173
+ `;function fn(n){const{phase:d,balanceCredits:k,onClose:S}=n,R=d==="processing",U=d==="error"?a("cartCheckout.errorTitle"):d==="nofunds"?a("cartCheckout.titleNoFunds"):d==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),G=d==="processing";return e.jsxs(cs,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ls,{onClick:R?void 0:S,"aria-hidden":!0}),e.jsxs(ds,{"data-tall":G||void 0,children:[e.jsxs(us,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:U}),!R&&e.jsx(gs,{onClick:S,"aria-label":a("buyModal.close"),children:e.jsx(es,{})})]}),e.jsxs(xs,{children:[e.jsx(fs,{children:d==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(Ft,{}),e.jsx(ms,{children:pe(k)})]}),n.heldCreditsCount&&(d==="choose"||d==="nofunds")?e.jsx(xn,{"data-testid":"cart-held-notice",children:a("buyModal.heldExplainer",{credits:n.heldCreditsCount,currency:Me.name})}):null]}),d==="choose"&&e.jsxs(Ae,{children:[e.jsxs(gn,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(Ft,{}),pe(n.totalCredits??0)]})]}),e.jsx(Zt,{options:n.options??[],totalCents:n.totalCents??0,shortfall:n.shortfall,onPay:n.onPay??(()=>{})})]}),d==="processing"&&e.jsx(mn,{stage:n.stage??"reserving",step:n.step??1,total:n.total??1,isSelfCustody:!!n.isSelfCustody,signatures:n.signatures}),d==="nofunds"&&e.jsx(bn,{lines:n.lines??[],shortfallCredits:n.shortfallCredits??0,packs:n.packs??[],selectedPack:n.selectedPack??"",onSelectPack:n.onSelectPack??(()=>{}),onBuyPacks:n.onBuyPacks??(()=>{}),onCancel:S}),d==="error"&&e.jsxs(Ae,{children:[e.jsxs(bs,{"data-testid":"buy-error",children:[e.jsx(ys,{src:ts,alt:"",width:64,height:80}),e.jsxs(vs,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",n.heldCredits?e.jsxs(e.Fragment,{children:[n.message?e.jsxs(e.Fragment,{children:[n.message," "]}):null,a("cartCheckout.heldLead",{currency:Me.name}),e.jsx("b",{children:a("cartCheckout.heldBold")}),a("cartCheckout.heldTail",{currency:Me.name})]}):n.message??a("cartCheckout.errorBody")]})]}),n.heldCredits?e.jsx(Xe,{children:e.jsx(he,{"data-variant":"purple","data-full":!0,onClick:S,children:a("cartCheckout.gotIt")})}):e.jsxs(Xe,{children:[e.jsx(he,{"data-variant":"outline",onClick:S,children:a("buyModal.cancel")}),e.jsx(he,{"data-variant":"purple",onClick:n.onRetry??S,children:a("cartCheckout.tryAgain")})]})]})]})]})}function mn({stage:n,step:d,total:k,isSelfCustody:S,signatures:R}){const U=n==="reserving",G=k>0?Math.min(100,Math.round(d/k*100)):0,O=S&&R&&R.total>1,M=n==="awaiting-signature"?S?O?a("cartCheckout.confirmMultiple",{current:R.current,total:R.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):n==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(Ae,{"data-processing":!0,children:[e.jsx(ws,{src:Hs,alt:"",width:61,height:61}),e.jsx(Cs,{children:M}),U?e.jsxs(dn,{children:[e.jsx(Lt,{"aria-hidden":!0,children:e.jsx(Kt,{"data-step":!0,style:{width:`${G}%`}})}),k>1?e.jsxs(un,{children:[d,"/",k]}):null]}):e.jsx(Lt,{"aria-hidden":!0,children:e.jsx(Kt,{})})]})}function bn({lines:n,shortfallCredits:d,packs:k,selectedPack:S,onSelectPack:R,onBuyPacks:U,onCancel:G}){const O=n.reduce((M,r)=>M+(r.quantity??1),0);return e.jsxs(Ae,{children:[e.jsxs(js,{"data-testid":"nofunds-warning",children:[e.jsx(ks,{}),e.jsxs(Ss,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,d)})})," ",a("buyModal.warningToPurchase",{count:O}),Le()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx($s,{href:Ma("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]})]}),e.jsx(hn,{children:n.map(M=>{const r=M.quantity??1;return e.jsxs(Ms,{children:[e.jsx(Ts,{children:M.item.thumbnail?e.jsx("img",{src:M.item.thumbnail,alt:""}):null}),e.jsxs(Is,{children:[e.jsxs("div",{children:[e.jsxs(As,{title:M.item.name,children:[M.item.name||a("buyModal.itemFallback"),r>1?e.jsx(pn,{children:a("cartCheckout.qty",{count:r})}):null]}),M.item.creator?e.jsx(Es,{address:M.item.creator}):null]}),e.jsxs(Ps,{children:[e.jsx(zs,{}),e.jsx("span",{children:pe(M.priceCredits*r)})]})]})]},M.item.id)})}),Le()?null:e.jsx(e.Fragment,{children:e.jsx(Rs,{packs:k,selectedId:S||void 0,onSelect:R})}),e.jsxs(Xe,{children:[e.jsx(he,{"data-variant":"outline",onClick:G,children:a("buyModal.cancel")}),Le()?null:e.jsx(he,{"data-variant":"gradient",onClick:U,children:a("buyModal.buy")})]})]})}const{colors:l,gradients:yn,radius:oe}=z,ea="@media (max-width: 1080px)",E="@media (max-width: 880px)",Gt=i.div`
174
174
  max-width: 1510px;
175
175
  margin: 0 auto;
176
176
  /* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
@@ -465,7 +465,7 @@ import{j as e,L as Xt,r as T,b as Sa,a as $a}from"./react-EC0gZ8rD.js";import{s
465
465
  ${ta};
466
466
  `,_n=i(Xt)`
467
467
  ${ta};
468
- `,qn=i(Ia)`
468
+ `,qn=i(Ta)`
469
469
  font-size: 10px;
470
470
  line-height: 1.43;
471
471
  color: ${l.muted};
@@ -744,5 +744,5 @@ import{j as e,L as Xt,r as T,b as Sa,a as $a}from"./react-EC0gZ8rD.js";import{s
744
744
  & section {
745
745
  margin-top: 0;
746
746
  }
747
- `;function Ve(n){if(tn(n))return a("errors.rejected");const d=(n.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Me.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const oi=12e4;function ci(n){const d=[];return n.unavailable.length&&d.push(a("cart.drop.unavailable",{count:n.unavailable.length})),n.own.length&&d.push(a("cart.drop.own",{count:n.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Ye=n=>n.reduce((d,k)=>d+k.priceCredits*k.quantity,0),$e=n=>n.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1}))),Yt=8;function Si(){var St,$t,Mt;Aa({title:a("nav.cart"),noindex:!0});const n=H(t=>t.items),d=H(t=>t.remove),k=H(t=>t.increment),S=H(t=>t.decrement),R=H(t=>t.clear),U=H(t=>t.restore),G=H(t=>t.setFittingOpen),O=Tt(t=>t.items),M=Tt(t=>t.toggle),{session:r,signIn:Ze}=Ea(),na=Pa(),ge=Ds().packs.slice(0,Vs);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const ia=n.some(t=>t.category!=="emote"),{data:Ee}=za({queryKey:["upsell-listings"],queryFn:()=>es({first:40}),staleTime:6e4}),{data:j}=Ra(r),y=Ba(),X=Sa(),{state:B}=$a(),[ra,ce]=T.useState(null),[et,fe]=T.useState(null),[oa,q]=T.useState(!1),[W,D]=T.useState(null),tt=T.useRef(0),[u,$]=T.useState(null),{data:xe}=_a(r),{data:le}=qa(!0),[Pe,at]=T.useState(""),de=T.useRef(null),st=Wa(n),nt=t=>At(st[t.id]),ze=n.filter(nt),it=n.length>0&&ze.length===0,ca=ze.reduce((t,s)=>t+s.priceCredits*s.quantity,0),la=n.reduce((t,s)=>t+s.quantity,0),da=ze.reduce((t,s)=>t+s.quantity,0),rt=W?W.liveTotalCredits:ca,ua=new Set(n.map(t=>t.id)),ot=((Ee==null?void 0:Ee.items)??[]).filter(t=>!ua.has(t.id)).slice(0,12),ct=T.useMemo(()=>n.map(t=>t.contractAddress&&t.itemId?`${t.contractAddress.toLowerCase()}-${t.itemId}`:null).filter(t=>t!==null),[n]),te=Fa(Yt,{exclude:ct}),lt=La({enabled:te.enabled,hasSignal:te.hasSignal,isLoading:te.isLoading,isError:te.isError,personalized:(St=te.result)==null?void 0:St.personalized,rowCount:(($t=te.result)==null?void 0:$t.data.length)??0}),ha=new Map(W==null?void 0:W.buyable.map(t=>[t.item.id,t])),me=(j==null?void 0:j.credits)??0,Re=rt*10,pa=le?It(Re,le):0n,Be=Qe({priceCents:Re,priceManaWei:pa,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:xe??0n}),ga=t=>t.flatMap(s=>{const o=Oe(s);return o.kind==="store"?[o.mint]:[]}),fa=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),xa=t=>Object.fromEntries(t.flatMap(s=>s.acquisition==="trade"&&s.coupon?[[s.trade.id,s.coupon]]:[])),ma=Ha,ba=t=>Ya(t.contractAddress,String(t.itemId));function be(t){t(),D(null),fe(null),ce(null)}function ya(){$(null),q(!1)}function dt(t){const s=Ye(t),o=Math.max(0,s-me),c=ge.find(h=>h.credits>=o)??ge[ge.length-1];at(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:o}),$({phase:"nofunds",lines:t.map(h=>({item:h.item,priceCredits:h.priceCredits,quantity:h.quantity})),shortfall:o}),q(!1)}async function _e(t){if(!r||t.length===0)return;const s=$e(t),o=s.map(m=>({...m.item,priceCredits:m.priceCredits})),c=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),h=[];let v="authorize";const f=new Set,I=new Set,L=new Set,F=[];let w=!1;$({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[],P=Zs(s,Nt);let K=0;for(const p of P){$({phase:"processing",stage:"reserving",step:K+1,total:s.length});try{const{credit:x,maxCreditedValue:b}=await Xa(r.identity,p.units.map(en));p.units.forEach((Q,ne)=>{h.push({salt:x.id,itemId:Q.item.id}),m.push({...p.drafts[ne],credits:[x],maxCreditedValue:b})}),K+=p.units.length}catch(x){if(an(x)){if(h.length){try{await Ne(r.identity,[...new Set(h.map(b=>b.salt))])}catch(b){ie(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}dt(t);return}throw x}}h.length&&y.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const N=Us(m).length,ee=p=>N>1?{current:p,total:N}:void 0,_=(p,x)=>$({phase:"processing",stage:p,step:s.length,total:s.length,signatures:ee(x)}),C=p=>p<N?_("awaiting-signature",p+1):_("settling",N);_("awaiting-signature",1);let g=[];const A=new Map,ae=async p=>{const x=await Promise.allSettled(p.map(b=>Gs(b)));return x.forEach((b,Q)=>{const ne=A.get(p[Q])??[];b.status==="fulfilled"?(ne.forEach(We=>I.add(We)),F.push(p[Q])):b.reason instanceof Ge||ne.forEach(We=>L.add(We))}),x.flatMap(b=>b.status==="rejected"?[b.reason]:[])};if(Ws())try{let p=0;g=await Os({purchases:m,buyer:r.address,signer:r.signer,identity:r.identity,onSigned:()=>_("settling",Math.min(p+1,N)),onBroadcast:({txHash:b,salts:Q})=>{p+=1,A.set(b,Q),Q.forEach(ne=>f.add(ne))},onGroupSettling:({settled:b})=>_("settling",b)});const x=await ae(g);if(x.length&&!x.some(b=>b instanceof Ge))throw x[0];w=!0}catch(p){if(p instanceof Ge)throw await ae([...A.keys()]),p;if(!(p instanceof Hs)||!Ja(r.providerType))throw p;g=await Ue({purchases:m,buyer:r.address,signer:r.signer,onSigned:C,onBroadcast:({salts:x})=>x.forEach(b=>f.add(b)),onSettled:({txHash:x,salts:b})=>{b.forEach(Q=>I.add(Q)),F.push(x)},onReverted:({salts:x})=>x.forEach(b=>L.add(b))})}else g=await Ue({purchases:m,buyer:r.address,signer:r.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(x=>f.add(x)),onSettled:({txHash:p,salts:x})=>{x.forEach(b=>I.add(b)),F.push(p)},onReverted:({salts:p})=>p.forEach(x=>L.add(x))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...we(o),payment_type:"credits",no_crypto_step:w,transaction_hash:g[0]??null}),_t(o.map(p=>p.coupon)),qt(y);const ve=de.current;de.current=null,$(null),q(!1);const se={items:c,txHash:g[0]??void 0,txHashes:g,settled:!0,...ve?{creditsAdded:ve}:{}};X("/success",{state:se,replace:!0})}catch(m){Ce(m)||ie(m,{flow:"cart_checkout",step:v,cart_size:t.length});const P=new Set([...f].filter(g=>!L.has(g))),{toRelease:K,boughtItemIds:N}=Qt({reservations:h,spent:P,settled:I}),ee=[...P].some(g=>!I.has(g)),_=o.filter(g=>N.includes(g.id)),C=o.filter(g=>!N.includes(g.id));if(V(Ce(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Pt(m),value_usd:Et(C.reduce((g,A)=>g+A.priceCredits,0)),cart_size:s.length,partial:_.length>0}),K.length)try{await Ne(r.identity,K)}catch(g){ie(g,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),_.length>0){N.forEach(g=>d(g)),D(null),_t(_.map(g=>g.coupon)),qt(y),V("Shop Completed Purchase",{...we(_),payment_type:"credits",no_crypto_step:w,transaction_hash:F[0]??null,partial:!0}),$({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:ee}),q(!1);return}$({phase:"error",message:ee?void 0:Ve(m),heldCredits:ee})}}function ut(t,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const o=de.current;de.current=null,$(null),q(!1);const c={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...o?{creditsAdded:o}:{}};X("/success",{state:c,replace:!0})}function ht(t,s){Ce(t)||ie(t,{flow:s,step:"submit"}),V(Ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Pt(t)}),$({phase:"error",message:Ve(t)}),q(!1)}async function va(t,s,o){const c=zt(Rt.MANAToken,s),h=zt(Rt.CreditsManager,s);await Ns({auth:{kind:Qs.Allowance,contractAddress:c.address,spenderAddress:h.address,chainId:s},signer:t,requiredWei:o})}async function pt(){if(le)return le;try{return await y.fetchQuery(Va())}catch{return}}async function wa(t){const s=$e(t).reduce((v,f)=>v+f.usdCents,0),c=(xe??0n)>0n?await pt():le,h=c?It(s,c):0n;return{totalCents:s,manaWei:h}}async function gt(t,s){const o=Ye(t),{totalCents:c,manaWei:h}=await wa(t),v=Qe({priceCents:c,priceManaWei:h,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:xe??0n});if(s&&v.options.some(f=>f.method===s)){if(s==="credits"){_e(t);return}const f=bt(v,s);await xt(ft(s,t),f,()=>s==="mana"?void yt(t,f):void vt(t,c,h));return}if(v.options.some(f=>f.method==="mana"||f.method==="combined")){$({phase:"choose",lines:t,totalCents:c,manaWei:h}),q(!1);return}if(j!=null&&j.credits<o){dt(t);return}_e(t)}function qe(t){return Qe({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:xe??0n})}const[ue,ye]=T.useState(null);function ft(t,s){const o=new Map;for(const c of s){const h=rs(t,Oe(c));o.set(`${h.chainId}:${h.spender.toLowerCase()}`,h)}return[...o.values()]}async function xt(t,s,o){const c=[];for(const{spender:h,chainId:v}of t){const f=Fs(v,h),I=r?await Ls(f,r.address,s).catch(()=>!0):!0;Ks(r==null?void 0:r.providerType,I)&&c.push(f)}if(c.length===0){o();return}q(!1),mt(c,0,o)}function mt(t,s,o){ye({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?mt(t,s+1,o):o()})}function bt(t,s){var o;return((o=t.options.find(c=>c.method===s))==null?void 0:o.manaWei)??0n}function Ca(t){if((u==null?void 0:u.phase)!=="choose")return;const{lines:s,totalCents:o,manaWei:c}=u;if(t==="credits"){_e(s);return}const h=bt(qe(u),t);xt(ft(t,s),h,()=>t==="mana"?void yt(s,h):void vt(s,o,c))}async function yt(t,s){if(!r||t.length===0)return;const o=$e(t),c=o.map(f=>({...f.item,priceCredits:f.priceCredits})),h=t.map(f=>({...f.item,priceCredits:f.priceCredits,quantity:f.quantity})),v=()=>$({phase:"processing",stage:"settling",step:o.length,total:o.length});$({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});try{const f=await os({trades:fa(o),coupons:xa(o),mints:ga(o),buyer:r.address,signer:r.signer,onSigned:v,manaWei:s});t.forEach(I=>d(I.item.id)),D(null),V("Shop Completed Purchase",{...we(c),payment_type:"mana",transaction_hash:f[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(h,f)}catch(f){ht(f,"buy_cart_mana")}}async function vt(t,s,o){if(!r||t.length===0)return;const c=$e(t),h=c.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),f=_s(c.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),I=[],L=new Set,F=new Set;$({phase:"processing",stage:"reserving",step:1,total:c.length});try{const w=c.map(Oe),m=[],P=new Map,K=new Map;for(let C=0;C<c.length;C++){const g=c[C],A=w[C],ae=f[C],ve=qs(Math.max(0,g.usdCents-ae),s,o);let se;if(ae<=0)se=Wt(A,[],"0");else{$({phase:"processing",stage:"reserving",step:C+1,total:c.length});const x=g.item,{credit:b,maxCreditedValue:Q}=await Za(r.identity,ae,A.kind==="trade"?A.trade.id:void 0,x.contractAddress&&x.itemId!=null?{contractAddress:x.contractAddress,itemId:String(x.itemId)}:void 0);I.push({salt:b.id,itemId:x.id}),se=Wt(A,[b],Q)}const p=Nt(se);P.set(p,(P.get(p)??0n)+ve),K.has(p)||K.set(p,m.length),m.push(se)}I.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,g]of P){const A=K.get(C);A==null||g<=0n||(m[A]={...m[A],maxCreditedValue:(BigInt(m[A].maxCreditedValue)+g).toString()})}const N=[...P.values()].reduce((C,g)=>C+g,0n);await va(r.signer,cs(w[0]),N);const ee=()=>$({phase:"processing",stage:"settling",step:c.length,total:c.length});$({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const _=await Ue({purchases:m,buyer:r.address,signer:r.signer,onSigned:ee,onBroadcast:({salts:C})=>C.forEach(g=>L.add(g)),onReverted:({salts:C})=>C.forEach(g=>F.add(g))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...we(h),payment_type:"credits_and_mana",transaction_hash:_[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(v,_)}catch(w){const{toRelease:m}=Qt({reservations:I,spent:new Set([...L].filter(P=>!F.has(P))),settled:new Set});m.length&&Ne(r.identity,m).catch(()=>{}),I.length&&y.invalidateQueries({queryKey:["usd-balance"]}),ht(w,"buy_cart_combined")}}async function J(t){if(!r){Bt({type:"cart-checkout"}),Ze();return}const s=H.getState().items.filter(nt);if(s.length===0)return;ce(null),fe(null),q(!0);const o=s.reduce((c,h)=>c+h.priceCredits*h.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:o,cart_value_usd:Et(o),has_sufficient_credits:me>=o});try{const c=await Xs(s,r.address,ma,await pt(),ba,Da),h=[...c.unavailable,...c.own];if(h.length&&(h.forEach(v=>d(v.id)),fe(ci(c))),c.buyable.length===0){ce(a("cart.error.noneAvailable")),D(null);return}if(c.orderChanged){D(c),tt.current=Date.now();return}await gt(c.buyable,t)}catch(c){ie(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),ce(Ve(c))}finally{q(!1)}}async function wt(){if(W){if(!r){Bt({type:"cart-checkout"}),Ze();return}if(Date.now()-tt.current>oi){D(null),fe(null),await J();return}ce(null),gt(W.buyable)}}async function ja(){if(Pe){try{sessionStorage.setItem(je,JSON.stringify(H.getState().items))}catch{}q(!0);try{const t=await Js(Pe,r?{address:r.address,identity:r.identity}:void 0);if(t.url){window.location.href=t.url;return}if(!t.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");X(`/credits?order=${encodeURIComponent(t.orderId)}`)}catch(t){try{sessionStorage.removeItem(je)}catch{}ie(t,{flow:"cart_buy_credits"}),$({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const Ct=T.useRef(!1);T.useEffect(()=>{if(!r||Ct.current||!ss("cart-checkout"))return;Ct.current=!0;const t=setTimeout(()=>void J(),0);return()=>clearTimeout(t)},[r]);const jt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||jt.current)return;jt.current=!0,de.current=B.creditsAdded??null;try{const s=sessionStorage.getItem(je);if(s){sessionStorage.removeItem(je);const o=JSON.parse(s);Array.isArray(o)&&o.length&&U(o)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void J(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const kt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.startCheckout)||kt.current)return;kt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void J(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const Z=oa||(u==null?void 0:u.phase)==="processing";if(n.length===0&&!u)return e.jsx(Gt,{children:e.jsxs(Ht,{children:[e.jsxs(Ot,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(kn,{children:e.jsx(Ka,{variant:"light",testId:"cart-empty",icon:Na,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})});const ka=Ys(ge,(u==null?void 0:u.phase)==="nofunds"?u.shortfall:0).packs;return e.jsxs(Gt,{children:[e.jsxs(Ht,{children:[e.jsxs(Ot,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(vn,{children:[e.jsxs(wn,{children:[e.jsxs(Cn,{children:[e.jsx(Sn,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx($n,{children:a("cart.panelTitle",{count:la})}),ia?e.jsxs(Mn,{onClick:()=>G(!0),disabled:Z,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(jn,{children:[e.jsx(Tn,{children:n.map(t=>{const s=ha.get(t.id),o=s?s.priceCredits:t.priceCredits,c=!!s&&s.priceCredits!==t.priceCredits,h=!t.tokenId,v=t.quantity,f=typeof t.available=="number"&&v>=t.available,I=o*v,L=Qa(t),F=!!L&&!!O[L],w=Ua(t),m=st[t.id],P=!At(m),K=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(In,{"data-unavailable":P||void 0,children:[e.jsxs(An,{"data-thumb":!0,children:[w?e.jsx(En,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Pn,{"data-check":!0,"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(zn,{children:[e.jsxs(Rn,{"data-desc":!0,children:[w?e.jsx(_n,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Bn,{title:t.name,children:t.name}),t.creator?e.jsx(qn,{address:t.creator,linkToProfile:!0}):null,na&&h?e.jsxs(Hn,{"data-testid":"cart-creator-tag",children:[e.jsx(Dn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Wn,{children:P?e.jsxs(Gn,{children:[e.jsx(On,{name:"warning-fill",size:24}),K]}):e.jsxs(e.Fragment,{children:[h?e.jsxs(Fn,{children:[e.jsx(Dt,{onClick:()=>be(()=>S(t.id)),disabled:Z||v<=1,"aria-label":a("cart.decreaseQuantity",{name:t.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(Ln,{children:v}),e.jsx(Dt,{onClick:()=>be(()=>k(t.id)),disabled:Z||f,"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(Kn,{children:[e.jsx(Nn,{})," ",e.jsx(Ke,{credits:I}),c?e.jsx(Qn,{children:e.jsx(Ke,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Un,{children:[L?e.jsx(Vn,{"data-on":F||void 0,onClick:()=>M(t),"aria-label":F?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:F?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:F?"heart-solid":"heart"})}):null,e.jsx(Yn,{onClick:()=>be(()=>d(t.id)),disabled:Z,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(Y,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(Xn,{children:e.jsx("button",{className:"link",onClick:()=>be(R),disabled:Z,children:a("cart.clearCart")})})]})]}),e.jsxs(Jn,{children:[e.jsx(Zn,{children:a("cart.purchaseSummary")}),e.jsxs(ei,{children:[e.jsxs(ti,{children:[e.jsx(ai,{children:a("cart.totalItems",{count:da})}),e.jsx(ni,{children:e.jsxs(si,{children:[e.jsx(ii,{})," ",e.jsx(Ke,{credits:rt})]})})]}),e.jsx(Zt,{options:Be.options,totalCents:Re,shortfall:Be.manaShortfall,showCreditsAmount:!1,creditsLabel:W?a("marketCheckout.confirmPurchase"):Be.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:Z||it,onPay:t=>void(W?wt():J(t)),creditsFallback:{label:Z?a("cart.working"):W?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(W?wt():J())}}),it?e.jsx(Se,{className:"muted",children:a("cart.allUnavailable")}):null,r?null:e.jsx(Se,{className:"muted",children:a("cart.signInHint")}),W?e.jsx(Se,{className:"muted",children:a("cart.priceChanged")}):null,et?e.jsx(Se,{className:"muted",children:et}):null,e.jsx(ri,{message:ra})]})]})]})]}),lt===null&&e.jsx(Vt,{"data-testid":"cart-personal-upsell",children:e.jsx(Ga,{exclude:ct,title:a("cart.suggestedTitle"),surface:"cart",first:Yt})}),lt!==null&&ot.length>0?e.jsx(Vt,{children:e.jsx(ns,{title:a("cart.youMightAlsoLike"),items:ot})}):null,ue&&r?e.jsx(is,{auth:ue.auth,signer:r.signer,step:{index:ue.index,total:ue.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Te,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=ue;ye(null),t()},onCancel:()=>ye(null),onClose:()=>ye(null)}):null,u?e.jsx(xn,{phase:u.phase,balanceCredits:me,heldCreditsCount:((Mt=j==null?void 0:j.held)==null?void 0:Mt.credits)??null,onClose:ya,stage:u.phase==="processing"?u.stage:void 0,step:u.phase==="processing"?u.step:void 0,total:u.phase==="processing"?u.total:void 0,isSelfCustody:Oa(r==null?void 0:r.providerType),signatures:u.phase==="processing"?u.signatures:void 0,options:u.phase==="choose"?qe(u).options:void 0,shortfall:u.phase==="choose"?qe(u).manaShortfall:void 0,onPay:Ca,totalCents:u.phase==="choose"?u.totalCents:void 0,totalManaWei:u.phase==="choose"?u.manaWei:void 0,totalCredits:u.phase==="choose"?Ye(u.lines):void 0,lines:u.phase==="nofunds"?u.lines:void 0,shortfallCredits:u.phase==="nofunds"?u.shortfall:void 0,packs:ka,selectedPack:Pe,onSelectPack:at,onBuyPacks:()=>void ja(),message:u.phase==="error"?u.message:void 0,heldCredits:u.phase==="error"&&!!u.heldCredits,onRetry:()=>void J()}):null]})}export{Si as Cart};
748
- //# sourceMappingURL=Cart-CUaOl7By.js.map
747
+ `;function Ve(n){if(tn(n))return a("errors.rejected");const d=(n.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Me.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const oi=12e4;function ci(n){const d=[];return n.unavailable.length&&d.push(a("cart.drop.unavailable",{count:n.unavailable.length})),n.own.length&&d.push(a("cart.drop.own",{count:n.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Ye=n=>n.reduce((d,k)=>d+k.priceCredits*k.quantity,0),$e=n=>n.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1}))),Yt=8;function Si(){var St,$t,Mt;Ia({title:a("nav.cart"),noindex:!0});const n=H(t=>t.items),d=H(t=>t.remove),k=H(t=>t.increment),S=H(t=>t.decrement),R=H(t=>t.clear),U=H(t=>t.restore),G=H(t=>t.setFittingOpen),O=Tt(t=>t.items),M=Tt(t=>t.toggle),{session:r,signIn:Ze}=Aa(),na=Ea(),ge=Ds().packs.slice(0,Vs);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const ia=n.some(t=>t.category!=="emote"),{data:Ee}=Pa({queryKey:["upsell-listings"],queryFn:()=>Za({first:40}),staleTime:6e4}),{data:j}=za(r),y=Ra(),X=Sa(),{state:B}=$a(),[ra,ce]=T.useState(null),[et,xe]=T.useState(null),[oa,q]=T.useState(!1),[W,D]=T.useState(null),tt=T.useRef(0),[u,$]=T.useState(null),{data:fe}=Ba(r),{data:le}=_a(!0),[Pe,at]=T.useState(""),de=T.useRef(null),st=qa(n),nt=t=>At(st[t.id]),ze=n.filter(nt),it=n.length>0&&ze.length===0,ca=ze.reduce((t,s)=>t+s.priceCredits*s.quantity,0),la=n.reduce((t,s)=>t+s.quantity,0),da=ze.reduce((t,s)=>t+s.quantity,0),rt=W?W.liveTotalCredits:ca,ua=new Set(n.map(t=>t.id)),ot=((Ee==null?void 0:Ee.items)??[]).filter(t=>!ua.has(t.id)).slice(0,12),ct=T.useMemo(()=>n.map(t=>t.contractAddress&&t.itemId?`${t.contractAddress.toLowerCase()}-${t.itemId}`:null).filter(t=>t!==null),[n]),te=Wa(Yt,{exclude:ct}),lt=Fa({enabled:te.enabled,hasSignal:te.hasSignal,isLoading:te.isLoading,isError:te.isError,personalized:(St=te.result)==null?void 0:St.personalized,rowCount:(($t=te.result)==null?void 0:$t.data.length)??0}),ha=new Map(W==null?void 0:W.buyable.map(t=>[t.item.id,t])),me=(j==null?void 0:j.credits)??0,Re=rt*10,pa=le?It(Re,le):0n,Be=Qe({priceCents:Re,priceManaWei:pa,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),ga=t=>t.flatMap(s=>{const o=Oe(s);return o.kind==="store"?[o.mint]:[]}),xa=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),fa=t=>Object.fromEntries(t.flatMap(s=>s.acquisition==="trade"&&s.coupon?[[s.trade.id,s.coupon]]:[])),ma=Oa,ba=t=>Va(t.contractAddress,String(t.itemId));function be(t){t(),D(null),xe(null),ce(null)}function ya(){$(null),q(!1)}function dt(t){const s=Ye(t),o=Math.max(0,s-me),c=ge.find(h=>h.credits>=o)??ge[ge.length-1];at(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:o}),$({phase:"nofunds",lines:t.map(h=>({item:h.item,priceCredits:h.priceCredits,quantity:h.quantity})),shortfall:o}),q(!1)}async function _e(t){if(!r||t.length===0)return;const s=$e(t),o=s.map(m=>({...m.item,priceCredits:m.priceCredits})),c=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),h=[];let v="authorize";const x=new Set,I=new Set,L=new Set,F=[];let w=!1;$({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[],P=Zs(s,Nt);let K=0;for(const p of P){$({phase:"processing",stage:"reserving",step:K+1,total:s.length});try{const{credit:f,maxCreditedValue:b}=await Ya(r.identity,p.units.map(en));p.units.forEach((Q,ne)=>{h.push({salt:f.id,itemId:Q.item.id}),m.push({...p.drafts[ne],credits:[f],maxCreditedValue:b})}),K+=p.units.length}catch(f){if(an(f)){if(h.length){try{await Ne(r.identity,[...new Set(h.map(b=>b.salt))])}catch(b){ie(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}dt(t);return}throw f}}h.length&&y.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const N=Qs(m).length,ee=p=>N>1?{current:p,total:N}:void 0,_=(p,f)=>$({phase:"processing",stage:p,step:s.length,total:s.length,signatures:ee(f)}),C=p=>p<N?_("awaiting-signature",p+1):_("settling",N);_("awaiting-signature",1);let g=[];const A=new Map,ae=async p=>{const f=await Promise.allSettled(p.map(b=>Us(b)));return f.forEach((b,Q)=>{const ne=A.get(p[Q])??[];b.status==="fulfilled"?(ne.forEach(We=>I.add(We)),F.push(p[Q])):b.reason instanceof Ge||ne.forEach(We=>L.add(We))}),f.flatMap(b=>b.status==="rejected"?[b.reason]:[])};if(qs())try{let p=0;g=await Gs({purchases:m,buyer:r.address,signer:r.signer,identity:r.identity,onSigned:()=>_("settling",Math.min(p+1,N)),onBroadcast:({txHash:b,salts:Q})=>{p+=1,A.set(b,Q),Q.forEach(ne=>x.add(ne))},onGroupSettling:({settled:b})=>_("settling",b)});const f=await ae(g);if(f.length&&!f.some(b=>b instanceof Ge))throw f[0];w=!0}catch(p){if(p instanceof Ge)throw await ae([...A.keys()]),p;if(!(p instanceof Os)||!Xa(r.providerType))throw p;g=await Ue({purchases:m,buyer:r.address,signer:r.signer,onSigned:C,onBroadcast:({salts:f})=>f.forEach(b=>x.add(b)),onSettled:({txHash:f,salts:b})=>{b.forEach(Q=>I.add(Q)),F.push(f)},onReverted:({salts:f})=>f.forEach(b=>L.add(b))})}else g=await Ue({purchases:m,buyer:r.address,signer:r.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(f=>x.add(f)),onSettled:({txHash:p,salts:f})=>{f.forEach(b=>I.add(b)),F.push(p)},onReverted:({salts:p})=>p.forEach(f=>L.add(f))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...we(o),payment_type:"credits",no_crypto_step:w,transaction_hash:g[0]??null}),_t(o.map(p=>p.coupon)),qt(y);const ve=de.current;de.current=null,$(null),q(!1);const se={items:c,txHash:g[0]??void 0,txHashes:g,settled:!0,...ve?{creditsAdded:ve}:{}};X("/success",{state:se,replace:!0})}catch(m){Ce(m)||ie(m,{flow:"cart_checkout",step:v,cart_size:t.length});const P=new Set([...x].filter(g=>!L.has(g))),{toRelease:K,boughtItemIds:N}=Qt({reservations:h,spent:P,settled:I}),ee=[...P].some(g=>!I.has(g)),_=o.filter(g=>N.includes(g.id)),C=o.filter(g=>!N.includes(g.id));if(V(Ce(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Pt(m),value_usd:Et(C.reduce((g,A)=>g+A.priceCredits,0)),cart_size:s.length,partial:_.length>0}),K.length)try{await Ne(r.identity,K)}catch(g){ie(g,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),_.length>0){N.forEach(g=>d(g)),D(null),_t(_.map(g=>g.coupon)),qt(y),V("Shop Completed Purchase",{...we(_),payment_type:"credits",no_crypto_step:w,transaction_hash:F[0]??null,partial:!0}),$({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:ee}),q(!1);return}$({phase:"error",message:ee?void 0:Ve(m),heldCredits:ee})}}function ut(t,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const o=de.current;de.current=null,$(null),q(!1);const c={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...o?{creditsAdded:o}:{}};X("/success",{state:c,replace:!0})}function ht(t,s){Ce(t)||ie(t,{flow:s,step:"submit"}),V(Ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Pt(t)}),$({phase:"error",message:Ve(t)}),q(!1)}async function va(t,s,o){const c=zt(Rt.MANAToken,s),h=zt(Rt.CreditsManager,s);await Ks({auth:{kind:Ns.Allowance,contractAddress:c.address,spenderAddress:h.address,chainId:s},signer:t,requiredWei:o})}async function pt(){if(le)return le;try{return await y.fetchQuery(Da())}catch{return}}async function wa(t){const s=$e(t).reduce((v,x)=>v+x.usdCents,0),c=(fe??0n)>0n?await pt():le,h=c?It(s,c):0n;return{totalCents:s,manaWei:h}}async function gt(t,s){const o=Ye(t),{totalCents:c,manaWei:h}=await wa(t),v=Qe({priceCents:c,priceManaWei:h,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n});if(s&&v.options.some(x=>x.method===s)){if(s==="credits"){_e(t);return}const x=bt(v,s);await ft(xt(s,t),x,()=>s==="mana"?void yt(t,x):void vt(t,c,h));return}if(v.options.some(x=>x.method==="mana"||x.method==="combined")){$({phase:"choose",lines:t,totalCents:c,manaWei:h}),q(!1);return}if(j!=null&&j.credits<o){dt(t);return}_e(t)}function qe(t){return Qe({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[ue,ye]=T.useState(null);function xt(t,s){const o=new Map;for(const c of s){const h=is(t,Oe(c));o.set(`${h.chainId}:${h.spender.toLowerCase()}`,h)}return[...o.values()]}async function ft(t,s,o){const c=[];for(const{spender:h,chainId:v}of t){const x=Ws(v,h),I=r?await Fs(x,r.address,s).catch(()=>!0):!0;Ls(r==null?void 0:r.providerType,I)&&c.push(x)}if(c.length===0){o();return}q(!1),mt(c,0,o)}function mt(t,s,o){ye({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?mt(t,s+1,o):o()})}function bt(t,s){var o;return((o=t.options.find(c=>c.method===s))==null?void 0:o.manaWei)??0n}function Ca(t){if((u==null?void 0:u.phase)!=="choose")return;const{lines:s,totalCents:o,manaWei:c}=u;if(t==="credits"){_e(s);return}const h=bt(qe(u),t);ft(xt(t,s),h,()=>t==="mana"?void yt(s,h):void vt(s,o,c))}async function yt(t,s){if(!r||t.length===0)return;const o=$e(t),c=o.map(x=>({...x.item,priceCredits:x.priceCredits})),h=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),v=()=>$({phase:"processing",stage:"settling",step:o.length,total:o.length});$({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});try{const x=await rs({trades:xa(o),coupons:fa(o),mints:ga(o),buyer:r.address,signer:r.signer,onSigned:v,manaWei:s});t.forEach(I=>d(I.item.id)),D(null),V("Shop Completed Purchase",{...we(c),payment_type:"mana",transaction_hash:x[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(h,x)}catch(x){ht(x,"buy_cart_mana")}}async function vt(t,s,o){if(!r||t.length===0)return;const c=$e(t),h=c.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),x=Bs(c.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),I=[],L=new Set,F=new Set;$({phase:"processing",stage:"reserving",step:1,total:c.length});try{const w=c.map(Oe),m=[],P=new Map,K=new Map;for(let C=0;C<c.length;C++){const g=c[C],A=w[C],ae=x[C],ve=_s(Math.max(0,g.usdCents-ae),s,o);let se;if(ae<=0)se=Wt(A,[],"0");else{$({phase:"processing",stage:"reserving",step:C+1,total:c.length});const f=g.item,{credit:b,maxCreditedValue:Q}=await Ja(r.identity,ae,A.kind==="trade"?A.trade.id:void 0,f.contractAddress&&f.itemId!=null?{contractAddress:f.contractAddress,itemId:String(f.itemId)}:void 0);I.push({salt:b.id,itemId:f.id}),se=Wt(A,[b],Q)}const p=Nt(se);P.set(p,(P.get(p)??0n)+ve),K.has(p)||K.set(p,m.length),m.push(se)}I.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,g]of P){const A=K.get(C);A==null||g<=0n||(m[A]={...m[A],maxCreditedValue:(BigInt(m[A].maxCreditedValue)+g).toString()})}const N=[...P.values()].reduce((C,g)=>C+g,0n);await va(r.signer,os(w[0]),N);const ee=()=>$({phase:"processing",stage:"settling",step:c.length,total:c.length});$({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const _=await Ue({purchases:m,buyer:r.address,signer:r.signer,onSigned:ee,onBroadcast:({salts:C})=>C.forEach(g=>L.add(g)),onReverted:({salts:C})=>C.forEach(g=>F.add(g))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...we(h),payment_type:"credits_and_mana",transaction_hash:_[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(v,_)}catch(w){const{toRelease:m}=Qt({reservations:I,spent:new Set([...L].filter(P=>!F.has(P))),settled:new Set});m.length&&Ne(r.identity,m).catch(()=>{}),I.length&&y.invalidateQueries({queryKey:["usd-balance"]}),ht(w,"buy_cart_combined")}}async function J(t){if(!r){Bt({type:"cart-checkout"}),Ze();return}const s=H.getState().items.filter(nt);if(s.length===0)return;ce(null),xe(null),q(!0);const o=s.reduce((c,h)=>c+h.priceCredits*h.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:o,cart_value_usd:Et(o),has_sufficient_credits:me>=o});try{const c=await Xs(s,r.address,ma,await pt(),ba,Ha),h=[...c.unavailable,...c.own];if(h.length&&(h.forEach(v=>d(v.id)),xe(ci(c))),c.buyable.length===0){ce(a("cart.error.noneAvailable")),D(null);return}if(c.orderChanged){D(c),tt.current=Date.now();return}await gt(c.buyable,t)}catch(c){ie(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),ce(Ve(c))}finally{q(!1)}}async function wt(){if(W){if(!r){Bt({type:"cart-checkout"}),Ze();return}if(Date.now()-tt.current>oi){D(null),xe(null),await J();return}ce(null),gt(W.buyable)}}async function ja(){if(Pe){try{sessionStorage.setItem(je,JSON.stringify(H.getState().items))}catch{}q(!0);try{const t=await Js(Pe,r?{address:r.address,identity:r.identity}:void 0);if(t.url){window.location.href=t.url;return}if(!t.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");X(`/credits?order=${encodeURIComponent(t.orderId)}`)}catch(t){try{sessionStorage.removeItem(je)}catch{}ie(t,{flow:"cart_buy_credits"}),$({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const Ct=T.useRef(!1);T.useEffect(()=>{if(!r||Ct.current||!as("cart-checkout"))return;Ct.current=!0;const t=setTimeout(()=>void J(),0);return()=>clearTimeout(t)},[r]);const jt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||jt.current)return;jt.current=!0,de.current=B.creditsAdded??null;try{const s=sessionStorage.getItem(je);if(s){sessionStorage.removeItem(je);const o=JSON.parse(s);Array.isArray(o)&&o.length&&U(o)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void J(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const kt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.startCheckout)||kt.current)return;kt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void J(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const Z=oa||(u==null?void 0:u.phase)==="processing";if(n.length===0&&!u)return e.jsx(Gt,{children:e.jsxs(Ht,{children:[e.jsxs(Ot,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(kn,{children:e.jsx(La,{variant:"light",testId:"cart-empty",icon:Ka,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})});const ka=Ys(ge,(u==null?void 0:u.phase)==="nofunds"?u.shortfall:0).packs;return e.jsxs(Gt,{children:[e.jsxs(Ht,{children:[e.jsxs(Ot,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(vn,{children:[e.jsxs(wn,{children:[e.jsxs(Cn,{children:[e.jsx(Sn,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx($n,{children:a("cart.panelTitle",{count:la})}),ia?e.jsxs(Mn,{onClick:()=>G(!0),disabled:Z,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(jn,{children:[e.jsx(Tn,{children:n.map(t=>{const s=ha.get(t.id),o=s?s.priceCredits:t.priceCredits,c=!!s&&s.priceCredits!==t.priceCredits,h=!t.tokenId,v=t.quantity,x=typeof t.available=="number"&&v>=t.available,I=o*v,L=Na(t),F=!!L&&!!O[L],w=Qa(t),m=st[t.id],P=!At(m),K=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(In,{"data-unavailable":P||void 0,children:[e.jsxs(An,{"data-thumb":!0,children:[w?e.jsx(En,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Pn,{"data-check":!0,"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(zn,{children:[e.jsxs(Rn,{"data-desc":!0,children:[w?e.jsx(_n,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Bn,{title:t.name,children:t.name}),t.creator?e.jsx(qn,{address:t.creator,linkToProfile:!0}):null,na&&h?e.jsxs(Hn,{"data-testid":"cart-creator-tag",children:[e.jsx(Dn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Wn,{children:P?e.jsxs(Gn,{children:[e.jsx(On,{name:"warning-fill",size:24}),K]}):e.jsxs(e.Fragment,{children:[h?e.jsxs(Fn,{children:[e.jsx(Dt,{onClick:()=>be(()=>S(t.id)),disabled:Z||v<=1,"aria-label":a("cart.decreaseQuantity",{name:t.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(Ln,{children:v}),e.jsx(Dt,{onClick:()=>be(()=>k(t.id)),disabled:Z||x,"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(Kn,{children:[e.jsx(Nn,{})," ",e.jsx(Ke,{credits:I}),c?e.jsx(Qn,{children:e.jsx(Ke,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Un,{children:[L?e.jsx(Vn,{"data-on":F||void 0,onClick:()=>M(t),"aria-label":F?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:F?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:F?"heart-solid":"heart"})}):null,e.jsx(Yn,{onClick:()=>be(()=>d(t.id)),disabled:Z,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(Y,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(Xn,{children:e.jsx("button",{className:"link",onClick:()=>be(R),disabled:Z,children:a("cart.clearCart")})})]})]}),e.jsxs(Jn,{children:[e.jsx(Zn,{children:a("cart.purchaseSummary")}),e.jsxs(ei,{children:[e.jsxs(ti,{children:[e.jsx(ai,{children:a("cart.totalItems",{count:da})}),e.jsx(ni,{children:e.jsxs(si,{children:[e.jsx(ii,{})," ",e.jsx(Ke,{credits:rt})]})})]}),e.jsx(Zt,{options:Be.options,totalCents:Re,shortfall:Be.manaShortfall,showCreditsAmount:!1,creditsLabel:W?a("marketCheckout.confirmPurchase"):Be.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:Z||it,onPay:t=>void(W?wt():J(t)),creditsFallback:{label:Z?a("cart.working"):W?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(W?wt():J())}}),it?e.jsx(Se,{className:"muted",children:a("cart.allUnavailable")}):null,r?null:e.jsx(Se,{className:"muted",children:a("cart.signInHint")}),W?e.jsx(Se,{className:"muted",children:a("cart.priceChanged")}):null,et?e.jsx(Se,{className:"muted",children:et}):null,e.jsx(ri,{message:ra})]})]})]})]}),lt===null&&e.jsx(Vt,{"data-testid":"cart-personal-upsell",children:e.jsx(Ua,{exclude:ct,title:a("cart.suggestedTitle"),surface:"cart",first:Yt})}),lt!==null&&ot.length>0?e.jsx(Vt,{children:e.jsx(ss,{title:a("cart.youMightAlsoLike"),items:ot})}):null,ue&&r?e.jsx(ns,{auth:ue.auth,signer:r.signer,step:{index:ue.index,total:ue.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Te,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=ue;ye(null),t()},onCancel:()=>ye(null),onClose:()=>ye(null)}):null,u?e.jsx(fn,{phase:u.phase,balanceCredits:me,heldCreditsCount:((Mt=j==null?void 0:j.held)==null?void 0:Mt.credits)??null,onClose:ya,stage:u.phase==="processing"?u.stage:void 0,step:u.phase==="processing"?u.step:void 0,total:u.phase==="processing"?u.total:void 0,isSelfCustody:Ga(r==null?void 0:r.providerType),signatures:u.phase==="processing"?u.signatures:void 0,options:u.phase==="choose"?qe(u).options:void 0,shortfall:u.phase==="choose"?qe(u).manaShortfall:void 0,onPay:Ca,totalCents:u.phase==="choose"?u.totalCents:void 0,totalManaWei:u.phase==="choose"?u.manaWei:void 0,totalCredits:u.phase==="choose"?Ye(u.lines):void 0,lines:u.phase==="nofunds"?u.lines:void 0,shortfallCredits:u.phase==="nofunds"?u.shortfall:void 0,packs:ka,selectedPack:Pe,onSelectPack:at,onBuyPacks:()=>void ja(),message:u.phase==="error"?u.message:void 0,heldCredits:u.phase==="error"&&!!u.heldCredits,onRetry:()=>void J()}):null]})}export{Si as Cart};
748
+ //# sourceMappingURL=Cart-DIIL5HsZ.js.map
@@ -1,6 +1,6 @@
1
- import{j as e,r as h,e as oe,b as se}from"./react-EC0gZ8rD.js";import{a as b,s as m,l as re,I as ae,k as ie,t as r,a3 as q,bN as F,bO as ne,bP as ce,c as le,cc as de,w as me,B as ue,av as pe,$ as fe,a1 as W,a2 as he,bQ as xe,cd as be}from"./index-CUIg8HdV.js";import{E as ge}from"./ErrorNotice-DesrOehz.js";import{d as ye,P as ve,C as je,a as E,b as we,S as Ce}from"./collectionPage.styles-B7rtIk6J.js";import{u as ke}from"./useStore-xMX0SCw6.js";import{u as Se,S as G,R as $e,F as Ne,a as Ee}from"./Filters-BipHXxnJ.js";import{L as Ie}from"./LoadMore-CuRa22jR.js";import{u as Fe}from"./useInfiniteGrid-DheMz6c1.js";import{u as Me,s as Re}from"./search-empty-D5DLeEKI.js";import{S as Te}from"./categories-DgBMiYtZ.js";import{R as _e,S as Pe,a as Ae,D as De,b as Be,C as Le,c as Oe,d as ze,e as We,M as Ge}from"./browseLayout.styles-Dphi8OG5.js";import{G as Ue}from"./grid.styles-B_SYfKbL.js";import"./dcl-schemas-C-x6e7cM.js";import"./sentry-Cb74VndH.js";import"./ethers-BCdPj9kp.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-GdG1_iLJ.js";import"./Tooltip-CAbr028E.js";import"./skeleton.styles-Df0jIOwp.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="263a76e6-9a14-453c-9e45-6c6fe3b3fdac",s._sentryDebugIdIdentifier="sentry-dbid-263a76e6-9a14-453c-9e45-6c6fe3b3fdac")}catch{}})();const qe=m.section`
1
+ import{j as e,r as b,e as se,b as oe}from"./react-CIQLPMFg.js";import{a as x,s as m,l as re,I as ae,k as ie,t as r,a3 as q,bM as F,bN as ne,bO as ce,c as le,ce as de,w as me,B as ue,bP as pe,av as fe,$ as be,a1 as W,a2 as he,bQ as xe,bR as ge,cf as ye}from"./index-Cz1gkPqp.js";import{E as ve}from"./ErrorNotice-CnnV8mz4.js";import{d as je,P as we,C as Ce,a as E,b as ke,S as Se}from"./collectionPage.styles-Dvxboaj-.js";import{u as $e}from"./useStore-B3U8zy8P.js";import{u as Ne,S as G,F as Ee,a as Ie}from"./Filters-CTxYIYUu.js";import{L as Fe}from"./LoadMore-BEamihJl.js";import{u as Me}from"./useInfiniteGrid-BVnan2j4.js";import{u as Re,s as Te}from"./search-empty-DyNrMjf7.js";import{R as _e,S as Pe,a as Ae,D as De,b as Be,C as Le,c as Oe,d as ze,e as We,M as Ge}from"./browseLayout.styles-CKYDua24.js";import{G as Ue}from"./grid.styles-uxy9NCd3.js";import"./dcl-schemas-DWx78xmt.js";import"./sentry-BLkqPRre.js";import"./ethers-CrJ5ldNF.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-C28o2CCY.js";import"./Tooltip-CAzvjIL5.js";import"./skeleton.styles-D6CyJhvn.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="91641e34-661b-4b20-92a3-aed5cdecb9c6",o._sentryDebugIdIdentifier="sentry-dbid-91641e34-661b-4b20-92a3-aed5cdecb9c6")}catch{}})();const qe=m.section`
2
2
  position: relative;
3
- border-radius: ${b.radius.card};
3
+ border-radius: ${x.radius.card};
4
4
  overflow: hidden;
5
5
  margin-bottom: 24px;
6
6
  min-height: 200px;
@@ -8,7 +8,7 @@ import{j as e,r as h,e as oe,b as se}from"./react-EC0gZ8rD.js";import{a as b,s a
8
8
  align-items: center;
9
9
  justify-content: center;
10
10
 
11
- ${b.media.maxWidth("mobile")} {
11
+ ${x.media.maxWidth("mobile")} {
12
12
  min-height: 140px;
13
13
  }
14
14
  `,He=m.div`
@@ -30,7 +30,7 @@ import{j as e,r as h,e as oe,b as se}from"./react-EC0gZ8rD.js";import{a as b,s a
30
30
  margin: 0;
31
31
  padding: 32px 24px;
32
32
  text-align: center;
33
- color: ${b.colors.white};
33
+ color: ${x.colors.white};
34
34
  font-size: 40px;
35
35
  font-weight: 800;
36
36
  line-height: 1.2;
@@ -38,11 +38,11 @@ import{j as e,r as h,e as oe,b as se}from"./react-EC0gZ8rD.js";import{a as b,s a
38
38
  text-transform: uppercase;
39
39
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
40
40
 
41
- ${b.media.maxWidth("mobile")} {
41
+ ${x.media.maxWidth("mobile")} {
42
42
  padding: 24px 16px;
43
43
  font-size: 26px;
44
44
  }
45
- `;function Ze({name:s,creator:o}){const{data:i}=ke(o),c=(i==null?void 0:i.cover)||ye;return e.jsxs(qe,{"data-testid":"collection-hero","aria-label":s,children:[e.jsxs(He,{children:[e.jsx(Ke,{src:c,alt:"",loading:"eager"}),e.jsx(Qe,{"aria-hidden":!0})]}),e.jsx(Ve,{"data-testid":"collection-hero-title",children:s})]})}const Je=1500;function Xe(s){const[o,i]=h.useState(!1),c=h.useRef();h.useEffect(()=>()=>window.clearTimeout(c.current),[]);const a=h.useCallback(async u=>{try{await navigator.clipboard.writeText(u),i(!0),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i(!1),Je)}catch(d){re(d,{flow:s})}},[s]);return{copied:o,copy:a}}const{colors:I,radius:Ye}=b,et=ie`
45
+ `;function Ze({name:o,creator:s}){const{data:i}=$e(s),c=(i==null?void 0:i.cover)||je;return e.jsxs(qe,{"data-testid":"collection-hero","aria-label":o,children:[e.jsxs(He,{children:[e.jsx(Ke,{src:c,alt:"",loading:"eager"}),e.jsx(Qe,{"aria-hidden":!0})]}),e.jsx(Ve,{"data-testid":"collection-hero-title",children:o})]})}const Je=1500;function Xe(o){const[s,i]=b.useState(!1),c=b.useRef();b.useEffect(()=>()=>window.clearTimeout(c.current),[]);const a=b.useCallback(async u=>{try{await navigator.clipboard.writeText(u),i(!0),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i(!1),Je)}catch(d){re(d,{flow:o})}},[o]);return{copied:s,copy:a}}const{colors:I,radius:Ye}=x,et=ie`
46
46
  0% { transform: scale(0.6); opacity: 0; }
47
47
  60% { transform: scale(1.15); }
48
48
  100% { transform: scale(1); opacity: 1; }
@@ -70,14 +70,14 @@ import{j as e,r as h,e as oe,b as se}from"./react-EC0gZ8rD.js";import{a as b,s a
70
70
  outline: 2px solid ${I.softWhite};
71
71
  outline-offset: 2px;
72
72
  }
73
- `,ot=m(ae)`
73
+ `,st=m(ae)`
74
74
  flex: none;
75
75
  animation: ${et} 0.22s ease-out;
76
76
 
77
77
  @media (prefers-reduced-motion: reduce) {
78
78
  animation: none;
79
79
  }
80
- `;function st({value:s,children:o,label:i,flow:c="copy_to_clipboard",size:a=16,className:u,testId:d}){const{copied:n,copy:x}=Xe(c),f=n?r("common.copied"):i??r("common.copy");return e.jsxs(tt,{type:"button",onClick:()=>void x(s),title:f,"aria-label":f,"data-copied":n||void 0,className:u,"data-testid":d,children:[o,e.jsx(ot,{name:n?"check":"copy",size:a},n?"ok":"idle")]})}const{colors:j,radius:rt}=b,at=m.div`
80
+ `;function ot({value:o,children:s,label:i,flow:c="copy_to_clipboard",size:a=16,className:u,testId:d}){const{copied:n,copy:h}=Xe(c),f=n?r("common.copied"):i??r("common.copy");return e.jsxs(tt,{type:"button",onClick:()=>void h(o),title:f,"aria-label":f,"data-copied":n||void 0,className:u,"data-testid":d,children:[s,e.jsx(st,{name:n?"check":"copy",size:a},n?"ok":"idle")]})}const{colors:j,radius:rt}=x,at=m.div`
81
81
  display: flex;
82
82
  flex-direction: column;
83
83
  align-items: center;
@@ -130,5 +130,5 @@ import{j as e,r as h,e as oe,b as se}from"./react-EC0gZ8rD.js";import{a as b,s a
130
130
  &:hover {
131
131
  background: ${j.blackBtn};
132
132
  }
133
- `;function ct({address:s}){var d,n;const{data:o}=q(s);if(!s)return null;const i=(o==null?void 0:o.name)||F(s),c=(n=(d=o==null?void 0:o.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${le.profileUrl}/${s}`,u=ne(ce({name:o==null?void 0:o.name,hasClaimedName:o==null?void 0:o.hasClaimedName,ethAddress:(o==null?void 0:o.ethAddress)??s}));return e.jsxs(at,{"data-testid":"creator-card",children:[c?e.jsx(U,{src:c,alt:"",loading:"eager",style:{backgroundColor:u}}):e.jsx(U,{as:"span","aria-hidden":!0,style:{backgroundColor:u}}),e.jsx(it,{title:i,children:i}),e.jsx(st,{value:s,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(s)})}),e.jsx(nt,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const lt=48,dt=["all","on_sale","not_for_sale"];function Ft(){var z;const{contractAddress:s}=oe(),o=se(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[c,a]=Me(i),{category:u,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:M}=c,g=dt.includes(c.status)?c.status:"all",R=t=>a({status:t});Se(`${u}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=te=>{te.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=N}},[w]);const T=x&&!Number.isNaN(Number(x))?Number(x):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?Te[d]:void 0,K=(G.find(t=>t.key===M)??G[0]).server,P={contractAddress:s,category:u,rarities:n.length?n:void 0,wearableCategories:H,minPriceCredits:T,maxPriceCredits:_,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:Q,total:V,isLoading:k,error:A,hasNextPage:Z,isFetchingNextPage:D,isFetchNextPageError:J,fetchNextPage:X}=Fe(["collection-page",P],t=>xe({...P,first:lt,skip:t}),{enabled:!!s}),S=de(Q),{data:l}=me({queryKey:["collection-meta",s],queryFn:()=>be(s),enabled:!!s,staleTime:5*6e4}),B=(l==null?void 0:l.name)||r("collection.fallbackTitle");ue({title:l==null?void 0:l.name,description:l!=null&&l.name?r("seo.collection.description",{name:l.name}):void 0});const p=(l==null?void 0:l.creator)||((z=S[0])==null?void 0:z.creator),{data:$}=q(p),Y=($==null?void 0:$.name)||(p?F(p):"");function ee(t){a({category:t,subCategory:null})}function L(t){a({rarities:n.includes(t)?n.filter(N=>N!==t):[...n,t]})}function O(){a(i)}const v=[];(T!=null||_!=null)&&v.push({key:"price",label:r("filter.price"),onRemove:()=>{a({priceMin:"",priceMax:""})}});for(const t of $e)n.includes(t)&&v.push({key:`rarity-${t}`,label:pe(t),onRemove:()=>L(t)});return C&&v.push({key:"smart",label:r("filter.smart"),onRemove:()=>a({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(ve,{"data-testid":"collection-page",children:[e.jsxs(je,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(E,{onClick:()=>o("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>o(`/items/creator/${p}`),children:Y}),e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>o(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(we,{children:B})]}),e.jsx(Ze,{name:B,creator:p}),e.jsxs(_e,{"data-testid":"browse",children:[w?e.jsx(Pe,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(Ce,{children:[e.jsx(ct,{address:p}),e.jsxs(Ae,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(De,{children:[e.jsx(Be,{children:r("assets.filters")}),e.jsx(Le,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Oe,{children:e.jsx(Ne,{category:u,subCategory:d,onCategory:ee,onSub:t=>a({subCategory:t}),priceMin:x,priceMax:f,onPriceMin:t=>a({priceMin:t}),onPriceMax:t=>a({priceMax:t}),rarities:n,onToggleRarity:L,status:g,onStatus:R,smart:C,onSmart:t=>a({smart:t}),hideNames:!0})}),e.jsx(ze,{children:e.jsx(We,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(Ge,{children:[e.jsx(Ee,{sort:M,onSort:t=>a({sort:t}),total:V,loading:k,onOpenFilters:()=>y(!0),chips:v,onClearChips:O}),A?e.jsx(ge,{message:r("collection.error")}):null,!k&&!A&&S.length===0?e.jsx(fe,{testId:"collection-empty",icon:Re,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:O}}):e.jsxs(e.Fragment,{children:[e.jsx(Ue,{"data-testid":"grid",children:k?e.jsx(W,{count:15}):e.jsxs(e.Fragment,{children:[S.map(t=>e.jsx(he,{item:t},t.id)),D?e.jsx(W,{count:6}):null]})}),e.jsx(Ie,{hasNextPage:Z,isFetching:D,isError:J,onLoadMore:()=>void X()})]})]})]})]})}export{Ft as Collection,Ft as default};
134
- //# sourceMappingURL=Collection-BxtI6x1r.js.map
133
+ `;function ct({address:o}){var d,n;const{data:s}=q(o);if(!o)return null;const i=(s==null?void 0:s.name)||F(o),c=(n=(d=s==null?void 0:s.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${le.profileUrl}/${o}`,u=ne(ce({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??o}));return e.jsxs(at,{"data-testid":"creator-card",children:[c?e.jsx(U,{src:c,alt:"",loading:"eager",style:{backgroundColor:u}}):e.jsx(U,{as:"span","aria-hidden":!0,style:{backgroundColor:u}}),e.jsx(it,{title:i,children:i}),e.jsx(ot,{value:o,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(o)})}),e.jsx(nt,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const lt=48,dt=["all","on_sale","not_for_sale"];function It(){var z;const{contractAddress:o}=se(),s=oe(),i=b.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[c,a]=Re(i),{category:u,subCategory:d,rarities:n,priceMin:h,priceMax:f,smart:C,sort:M}=c,g=dt.includes(c.status)?c.status:"all",R=t=>a({status:t});Ne(`${u}:${d??""}`);const[w,y]=b.useState(!1);b.useEffect(()=>{if(!w)return;const t=te=>{te.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=N}},[w]);const T=h&&!Number.isNaN(Number(h))?Number(h):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?ge[d]:void 0,K=(G.find(t=>t.key===M)??G[0]).server,P={contractAddress:o,category:u,rarities:n.length?n:void 0,wearableCategories:H,minPriceCredits:T,maxPriceCredits:_,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:Q,total:V,isLoading:k,error:A,hasNextPage:Z,isFetchingNextPage:D,isFetchNextPageError:J,fetchNextPage:X}=Me(["collection-page",P],t=>xe({...P,first:lt,skip:t}),{enabled:!!o}),S=de(Q),{data:l}=me({queryKey:["collection-meta",o],queryFn:()=>ye(o),enabled:!!o,staleTime:5*6e4}),B=(l==null?void 0:l.name)||r("collection.fallbackTitle");ue({title:l==null?void 0:l.name,description:l!=null&&l.name?r("seo.collection.description",{name:l.name}):void 0});const p=(l==null?void 0:l.creator)||((z=S[0])==null?void 0:z.creator),{data:$}=q(p),Y=($==null?void 0:$.name)||(p?F(p):"");function ee(t){a({category:t,subCategory:null})}function L(t){a({rarities:n.includes(t)?n.filter(N=>N!==t):[...n,t]})}function O(){a(i)}const v=[];(T!=null||_!=null)&&v.push({key:"price",label:r("filter.price"),onRemove:()=>{a({priceMin:"",priceMax:""})}});for(const t of pe)n.includes(t)&&v.push({key:`rarity-${t}`,label:fe(t),onRemove:()=>L(t)});return C&&v.push({key:"smart",label:r("filter.smart"),onRemove:()=>a({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(we,{"data-testid":"collection-page",children:[e.jsxs(Ce,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(E,{onClick:()=>s("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}`),children:Y}),e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(ke,{children:B})]}),e.jsx(Ze,{name:B,creator:p}),e.jsxs(_e,{"data-testid":"browse",children:[w?e.jsx(Pe,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(Se,{children:[e.jsx(ct,{address:p}),e.jsxs(Ae,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(De,{children:[e.jsx(Be,{children:r("assets.filters")}),e.jsx(Le,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Oe,{children:e.jsx(Ee,{category:u,subCategory:d,onCategory:ee,onSub:t=>a({subCategory:t}),priceMin:h,priceMax:f,onPriceMin:t=>a({priceMin:t}),onPriceMax:t=>a({priceMax:t}),rarities:n,onToggleRarity:L,status:g,onStatus:R,smart:C,onSmart:t=>a({smart:t}),hideNames:!0})}),e.jsx(ze,{children:e.jsx(We,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(Ge,{children:[e.jsx(Ie,{sort:M,onSort:t=>a({sort:t}),total:V,loading:k,onOpenFilters:()=>y(!0),chips:v,onClearChips:O}),A?e.jsx(ve,{message:r("collection.error")}):null,!k&&!A&&S.length===0?e.jsx(be,{testId:"collection-empty",icon:Te,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:O}}):e.jsxs(e.Fragment,{children:[e.jsx(Ue,{"data-testid":"grid",children:k?e.jsx(W,{count:15}):e.jsxs(e.Fragment,{children:[S.map(t=>e.jsx(he,{item:t},t.id)),D?e.jsx(W,{count:6}):null]})}),e.jsx(Fe,{hasNextPage:Z,isFetching:D,isError:J,onLoadMore:()=>void X()})]})]})]})]})}export{It as Collection,It as default};
134
+ //# sourceMappingURL=Collection-CvJiHZVa.js.map
@@ -1,4 +1,4 @@
1
- import{r as k,j as o}from"./react-EC0gZ8rD.js";import{cw as Z,a as p,s as h,k as ee,t as v,I as U,l as E,h as C,j as A,L,bf as te,M as B,cx as re,cy as P,a2 as ae}from"./index-CUIg8HdV.js";import{v as ne,u as W,A as _,f as M,l as oe,w as se,x as ie,y as ce,r as G,n as Q,p as H,m as O,k as S,z as de,B as le}from"./trade-encoding-BKjm4pbk.js";import{i as ue}from"./errors-DRLtkokf.js";import{E as pe}from"./ErrorNotice-DesrOehz.js";import{d as he}from"./buy-C81jyIOD.js";import{a as fe,w as ge,S as xe,G as me}from"./buy-gasless-j60oO94R.js";import{M as N,E as D,s as q}from"./sendMetaTransaction-C6Nhv1ek.js";import{C as F}from"./ethers-BCdPj9kp.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ce639f98-55c2-432a-981a-6de17c30e62b",t._sentryDebugIdIdentifier="sentry-dbid-ce639f98-55c2-432a-981a-6de17c30e62b")}catch{}})();const z="shop:resume_after_signin",ye=900*1e3;function at(t){try{sessionStorage.setItem(z,JSON.stringify({...t,at:Date.now()}))}catch{}}function nt(t){let e;try{e=sessionStorage.getItem(z)}catch{return null}if(!e)return null;try{sessionStorage.removeItem(z)}catch{}let r;try{r=JSON.parse(e)}catch{return null}return!r||r.type!==t||typeof r.at!="number"||Date.now()-r.at>ye?null:r.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:r.path}}const V=Z(t=>({spent:{},record:(e,r=1)=>{!(e!=null&&e.id)||r<=0||t(a=>({spent:{...a.spent,[e.id]:Math.max(e.used??0,a.spent[e.id]??0)+r}}))},recordMany:e=>{const r=new Map;for(const a of e){if(!(a!=null&&a.id))continue;const c=r.get(a.id)??{coupon:a,count:0};c.count+=1,r.set(a.id,c)}t(a=>{const c={...a.spent};for(const{coupon:d,count:m}of r.values())c[d.id]=Math.max(d.used??0,c[d.id]??0)+m;return{spent:c}})},reset:()=>t({spent:{}})}));function ot(t,e){return e!=null&&e.id?Math.max(e.used??0,t[e.id]??0):(e==null?void 0:e.used)??0}const st=(t,e=1)=>V.getState().record(t,e),it=t=>V.getState().recordMany(t);function ct(t,e){const r=(a,...c)=>void t.invalidateQueries({queryKey:e?[a,...c]:[a]});t.invalidateQueries({queryKey:["usd-balance"]}),t.invalidateQueries({queryKey:["detail-trade"]}),t.invalidateQueries({queryKey:["shop-item"]}),r("owned-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),r("public-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),r("item-resales",e==null?void 0:e.contractAddress,e==null?void 0:e.itemId),t.invalidateQueries({queryKey:["shop-items"]}),t.invalidateQueries({queryKey:["catalog-items"]}),t.invalidateQueries({queryKey:["overview-listings"]}),t.invalidateQueries({queryKey:["upsell-listings"]}),t.invalidateQueries({queryKey:["my-assets"]}),t.invalidateQueries({queryKey:["purchases"]}),t.invalidateQueries({queryKey:["owned-item-count"]})}const be=ee`
1
+ import{r as k,j as o}from"./react-CIQLPMFg.js";import{cy as Z,a as p,s as h,k as ee,t as v,I as U,l as E,h as C,j as A,L,bf as te,M as B,cz as re,cA as P,a2 as ae}from"./index-Cz1gkPqp.js";import{v as ne,u as W,A as _,f as M,l as oe,w as se,x as ie,y as ce,r as G,n as Q,p as H,m as O,k as S,z as de,B as le}from"./trade-encoding-DxJLtadh.js";import{i as ue}from"./errors-BL1_71KQ.js";import{E as pe}from"./ErrorNotice-CnnV8mz4.js";import{d as he}from"./buy-DYrx5sw7.js";import{a as fe,w as ge,S as xe,G as me}from"./buy-gasless-CRa4-QEX.js";import{M as N,E as D,s as q}from"./sendMetaTransaction-TqW_X_rn.js";import{C as F}from"./ethers-CrJ5ldNF.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="9da069fa-ec81-4192-b040-bd7dddeab75f",t._sentryDebugIdIdentifier="sentry-dbid-9da069fa-ec81-4192-b040-bd7dddeab75f")}catch{}})();const z="shop:resume_after_signin",ye=900*1e3;function at(t){try{sessionStorage.setItem(z,JSON.stringify({...t,at:Date.now()}))}catch{}}function nt(t){let e;try{e=sessionStorage.getItem(z)}catch{return null}if(!e)return null;try{sessionStorage.removeItem(z)}catch{}let r;try{r=JSON.parse(e)}catch{return null}return!r||r.type!==t||typeof r.at!="number"||Date.now()-r.at>ye?null:r.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:r.path}}const V=Z(t=>({spent:{},record:(e,r=1)=>{!(e!=null&&e.id)||r<=0||t(a=>({spent:{...a.spent,[e.id]:Math.max(e.used??0,a.spent[e.id]??0)+r}}))},recordMany:e=>{const r=new Map;for(const a of e){if(!(a!=null&&a.id))continue;const c=r.get(a.id)??{coupon:a,count:0};c.count+=1,r.set(a.id,c)}t(a=>{const c={...a.spent};for(const{coupon:d,count:m}of r.values())c[d.id]=Math.max(d.used??0,c[d.id]??0)+m;return{spent:c}})},reset:()=>t({spent:{}})}));function ot(t,e){return e!=null&&e.id?Math.max(e.used??0,t[e.id]??0):(e==null?void 0:e.used)??0}const st=(t,e=1)=>V.getState().record(t,e),it=t=>V.getState().recordMany(t);function ct(t,e){const r=(a,...c)=>void t.invalidateQueries({queryKey:e?[a,...c]:[a]});t.invalidateQueries({queryKey:["usd-balance"]}),t.invalidateQueries({queryKey:["detail-trade"]}),t.invalidateQueries({queryKey:["shop-item"]}),r("owned-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),r("public-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),r("item-resales",e==null?void 0:e.contractAddress,e==null?void 0:e.itemId),t.invalidateQueries({queryKey:["shop-items"]}),t.invalidateQueries({queryKey:["catalog-items"]}),t.invalidateQueries({queryKey:["overview-listings"]}),t.invalidateQueries({queryKey:["upsell-listings"]}),t.invalidateQueries({queryKey:["my-assets"]}),t.invalidateQueries({queryKey:["purchases"]}),t.invalidateQueries({queryKey:["owned-item-count"]})}const be=ee`
2
2
  to { transform: rotate(360deg); }
3
3
  `,we=h.div`
4
4
  position: fixed;
@@ -184,7 +184,7 @@ import{r as k,j as o}from"./react-EC0gZ8rD.js";import{cw as Z,a as p,s as h,k as
184
184
  @media (prefers-reduced-motion: reduce) {
185
185
  animation: none;
186
186
  }
187
- `;function dt({auth:t,signer:e,step:r,title:a,reason:c,name:d,image:m,icon:f,onAuthorized:g,onCancel:y,onClose:b}){const[i,l]=k.useState(!1),[u,w]=k.useState(null);async function s(){l(!0),w(null);try{await ne({auth:t,signer:e,active:!0}),g()}catch(n){ue(n)?w(v("authorizeStep.errorRejected")):(E(n,{flow:"authorize_step",kind:t.kind}),w(v("authorizeStep.errorGeneric"))),l(!1)}}return o.jsx(we,{onClick:i?void 0:b,role:"presentation","data-testid":"authorize-step-scrim",children:o.jsxs(ve,{onClick:n=>n.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":a,children:[o.jsxs(ke,{children:[o.jsx(Ce,{children:a}),r&&r.total>1?o.jsx(je,{"data-testid":"authorize-step-count",children:v("authorizeStep.stepOf",{index:r.index,total:r.total})}):null,o.jsx(Ae,{onClick:b,disabled:i,"aria-label":v("authorizeStep.close"),children:o.jsx(U,{name:"close",className:"ico"})})]}),o.jsxs(Me,{"data-testid":"authorize-step-row",children:[o.jsx(Ie,{children:m?o.jsx("img",{src:m,alt:""}):f}),o.jsxs($e,{children:[o.jsx(Ee,{title:d,children:d}),o.jsx(Se,{children:c})]})]}),o.jsx(ze,{children:v("authorizeStep.note")}),o.jsx(pe,{message:u}),o.jsxs(We,{children:[o.jsx(_e,{type:"button",onClick:y,disabled:i,children:v("authorizeStep.cancel")}),o.jsx(Ne,{type:"button","data-testid":"authorize-step-action",onClick:()=>void s(),disabled:i,children:i?o.jsxs(o.Fragment,{children:[o.jsx(De,{"aria-hidden":!0}),v("authorizeStep.authorizing")]}):v("authorizeStep.authorize")})]})]})})}const lt="https://cdn.decentraland.org/@dcl/shop/1.14.1-35731809173.commit-aacaccc/_assets/buy-error-22UunaPC.png";async function ut(t){const[e]=await Y({...t,trades:[t.trade],coupons:t.coupon?{[t.trade.id]:t.coupon}:void 0});return e}async function pt(t){const[e]=await Y({...t,trades:[],mints:[t.mint]});return e}async function Y(t){const{trades:e,coupons:r,mints:a=[],buyer:c,signer:d,onSigned:m,manaWei:f}=t;if(e.length===0&&a.length===0)throw new Error("No items to buy");const g=new Map;for(const i of e){const l=`${i.chainId}:${i.contract.toLowerCase()}:${r!=null&&r[i.id]?"coupon":"plain"}`,u=g.get(l);u?u.push(i):g.set(l,[i])}const y=new Map;for(const i of a){const l=y.get(i.chainId);l?l.push(i):y.set(i.chainId,[i])}const b=[];for(const i of g.values()){const l=r?i.map(u=>r[u.id]).filter(u=>u!=null):[];b.push(await Te({trades:i,coupons:l.length?l:void 0,buyer:c,signer:d,onSigned:m,requiredManaWei:f}))}for(const[i,l]of y){const u=f??l.reduce((w,s)=>w+BigInt(s.item.priceWei),0n);b.push(await Re({mints:l,chainId:i,buyer:c,signer:d,onSigned:m,requiredManaWei:u}))}return b}async function Te(t){const{trades:e,coupons:r,buyer:a,signer:c,onSigned:d,requiredManaWei:m}=t,f=e[0],g=C(L(f.contract),f.chainId),y=C(A.MANAToken,f.chainId);await W({auth:{kind:_.Allowance,contractAddress:y.address,spenderAddress:g.address,chainId:f.chainId},signer:c,requiredWei:m});const b=e.map(s=>oe(s,a));if(r!=null&&r.length&&r.length!==e.length)throw new Error(`acceptWithCoupon needs one coupon per trade, got ${r.length} for ${e.length} trades`);const i=r!=null&&r.length?r.map((s,n)=>se(s,e[n].sent.length)):void 0;if(M.enabled)try{const{selector:s,data:n}=i?ie(e,r??[],a,g.abi):ce(e,a,g.abi),x=s+n.slice(2),j=G(),I=Q(c.provider,j),R=await q(I,j,x,g,{serverURL:M.relayerUrl});return d==null||d(),await H(R,"the MANA purchase"),R}catch(s){if(s instanceof N&&s.code===D.USER_DENIED||s instanceof O)throw s;E(s,{flow:"buy_mana",step:"gasless_fallback"})}await B(c.provider,f.chainId);const l=new F(g.address,g.abi,c),u=i?await l.acceptWithCoupon(b,i,S(f.chainId)):await l.accept(b,S(f.chainId));return d==null||d(),(await u.wait()).transactionHash}async function Re(t){const{mints:e,chainId:r,buyer:a,signer:c,onSigned:d,requiredManaWei:m}=t,f=C(A.CollectionStore,r),g=C(A.MANAToken,r),y=e.map(u=>u.item);if(await W({auth:{kind:_.Allowance,contractAddress:g.address,spenderAddress:f.address,chainId:r},signer:c,requiredWei:m}),M.enabled)try{const u=de(y,a,f.abi),w=G(),s=Q(c.provider,w),n=await q(s,w,u,f,{serverURL:M.relayerUrl});return d==null||d(),await H(n,"the MANA purchase"),n}catch(u){if(u instanceof N&&u.code===D.USER_DENIED||u instanceof O)throw u;E(u,{flow:"buy_mint_mana",step:"gasless_fallback"})}await B(c.provider,r);const i=await new F(f.address,f.abi,c).buy(le(y,a),S(r));return d==null||d(),(await i.wait()).transactionHash}async function ht(t){const{trade:e,coupon:r,...a}=t;return J({target:{kind:"trade",trade:e,coupon:r},...a})}async function ft(t){const{mint:e,...r}=t;return J({target:{kind:"store",mint:e},...r})}async function J(t){const{target:e,buyer:r,signer:a,credits:c,manaGapWei:d,providerType:m,onBroadcast:f,onReverted:g,onUnobservable:y}=t;if(c.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(d<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const b=X(e),i=C(A.MANAToken,b),l=C(A.CreditsManager,b);await W({auth:{kind:_.Allowance,contractAddress:i.address,spenderAddress:l.address,chainId:b},signer:a,requiredWei:d});const w=(c.reduce((n,x)=>n+BigInt(x.availableAmount),0n)+d).toString(),s=Pe(e,c,w);if(M.enabled){let n;try{return n=await fe({purchase:s,buyer:r,signer:a}),f==null||f({txHash:n}),await ge(n),n}catch(x){if(x instanceof N&&x.code===D.USER_DENIED||x instanceof xe)throw x;if(!(x instanceof me))throw n&&(g==null||g({txHash:n})),x;if(x.reason==="relayer-unreachable")throw y==null||y(),x;if(!te(m))throw x;E(x,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return he({purchase:s,buyer:r,signer:a,onBroadcast:f,onReverted:g})}function X(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Pe(t,e,r){return t.kind==="trade"?{kind:"trade",trade:t.trade,coupon:t.coupon,credits:e,maxCreditedValue:r}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:r}}function gt(t,e){const r=X(e);return t==="combined"?{spender:C(A.CreditsManager,r).address,chainId:r}:{spender:e.kind==="trade"?C(L(e.trade.contract),r).address:C(A.CollectionStore,r).address,chainId:r}}function xt(t){return o.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:o.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}const{colors:T,media:$}=p,Ke=h.section`
187
+ `;function dt({auth:t,signer:e,step:r,title:a,reason:c,name:d,image:m,icon:f,onAuthorized:g,onCancel:y,onClose:b}){const[i,l]=k.useState(!1),[u,w]=k.useState(null);async function s(){l(!0),w(null);try{await ne({auth:t,signer:e,active:!0}),g()}catch(n){ue(n)?w(v("authorizeStep.errorRejected")):(E(n,{flow:"authorize_step",kind:t.kind}),w(v("authorizeStep.errorGeneric"))),l(!1)}}return o.jsx(we,{onClick:i?void 0:b,role:"presentation","data-testid":"authorize-step-scrim",children:o.jsxs(ve,{onClick:n=>n.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":a,children:[o.jsxs(ke,{children:[o.jsx(Ce,{children:a}),r&&r.total>1?o.jsx(je,{"data-testid":"authorize-step-count",children:v("authorizeStep.stepOf",{index:r.index,total:r.total})}):null,o.jsx(Ae,{onClick:b,disabled:i,"aria-label":v("authorizeStep.close"),children:o.jsx(U,{name:"close",className:"ico"})})]}),o.jsxs(Me,{"data-testid":"authorize-step-row",children:[o.jsx(Ie,{children:m?o.jsx("img",{src:m,alt:""}):f}),o.jsxs($e,{children:[o.jsx(Ee,{title:d,children:d}),o.jsx(Se,{children:c})]})]}),o.jsx(ze,{children:v("authorizeStep.note")}),o.jsx(pe,{message:u}),o.jsxs(We,{children:[o.jsx(_e,{type:"button",onClick:y,disabled:i,children:v("authorizeStep.cancel")}),o.jsx(Ne,{type:"button","data-testid":"authorize-step-action",onClick:()=>void s(),disabled:i,children:i?o.jsxs(o.Fragment,{children:[o.jsx(De,{"aria-hidden":!0}),v("authorizeStep.authorizing")]}):v("authorizeStep.authorize")})]})]})})}const lt="https://cdn.decentraland.org/@dcl/shop/1.14.1-35741939881.commit-2c07d5a/_assets/buy-error-22UunaPC.png";async function ut(t){const[e]=await Y({...t,trades:[t.trade],coupons:t.coupon?{[t.trade.id]:t.coupon}:void 0});return e}async function pt(t){const[e]=await Y({...t,trades:[],mints:[t.mint]});return e}async function Y(t){const{trades:e,coupons:r,mints:a=[],buyer:c,signer:d,onSigned:m,manaWei:f}=t;if(e.length===0&&a.length===0)throw new Error("No items to buy");const g=new Map;for(const i of e){const l=`${i.chainId}:${i.contract.toLowerCase()}:${r!=null&&r[i.id]?"coupon":"plain"}`,u=g.get(l);u?u.push(i):g.set(l,[i])}const y=new Map;for(const i of a){const l=y.get(i.chainId);l?l.push(i):y.set(i.chainId,[i])}const b=[];for(const i of g.values()){const l=r?i.map(u=>r[u.id]).filter(u=>u!=null):[];b.push(await Te({trades:i,coupons:l.length?l:void 0,buyer:c,signer:d,onSigned:m,requiredManaWei:f}))}for(const[i,l]of y){const u=f??l.reduce((w,s)=>w+BigInt(s.item.priceWei),0n);b.push(await Re({mints:l,chainId:i,buyer:c,signer:d,onSigned:m,requiredManaWei:u}))}return b}async function Te(t){const{trades:e,coupons:r,buyer:a,signer:c,onSigned:d,requiredManaWei:m}=t,f=e[0],g=C(L(f.contract),f.chainId),y=C(A.MANAToken,f.chainId);await W({auth:{kind:_.Allowance,contractAddress:y.address,spenderAddress:g.address,chainId:f.chainId},signer:c,requiredWei:m});const b=e.map(s=>oe(s,a));if(r!=null&&r.length&&r.length!==e.length)throw new Error(`acceptWithCoupon needs one coupon per trade, got ${r.length} for ${e.length} trades`);const i=r!=null&&r.length?r.map((s,n)=>se(s,e[n].sent.length)):void 0;if(M.enabled)try{const{selector:s,data:n}=i?ie(e,r??[],a,g.abi):ce(e,a,g.abi),x=s+n.slice(2),j=G(),I=Q(c.provider,j),R=await q(I,j,x,g,{serverURL:M.relayerUrl});return d==null||d(),await H(R,"the MANA purchase"),R}catch(s){if(s instanceof N&&s.code===D.USER_DENIED||s instanceof O)throw s;E(s,{flow:"buy_mana",step:"gasless_fallback"})}await B(c.provider,f.chainId);const l=new F(g.address,g.abi,c),u=i?await l.acceptWithCoupon(b,i,S(f.chainId)):await l.accept(b,S(f.chainId));return d==null||d(),(await u.wait()).transactionHash}async function Re(t){const{mints:e,chainId:r,buyer:a,signer:c,onSigned:d,requiredManaWei:m}=t,f=C(A.CollectionStore,r),g=C(A.MANAToken,r),y=e.map(u=>u.item);if(await W({auth:{kind:_.Allowance,contractAddress:g.address,spenderAddress:f.address,chainId:r},signer:c,requiredWei:m}),M.enabled)try{const u=de(y,a,f.abi),w=G(),s=Q(c.provider,w),n=await q(s,w,u,f,{serverURL:M.relayerUrl});return d==null||d(),await H(n,"the MANA purchase"),n}catch(u){if(u instanceof N&&u.code===D.USER_DENIED||u instanceof O)throw u;E(u,{flow:"buy_mint_mana",step:"gasless_fallback"})}await B(c.provider,r);const i=await new F(f.address,f.abi,c).buy(le(y,a),S(r));return d==null||d(),(await i.wait()).transactionHash}async function ht(t){const{trade:e,coupon:r,...a}=t;return J({target:{kind:"trade",trade:e,coupon:r},...a})}async function ft(t){const{mint:e,...r}=t;return J({target:{kind:"store",mint:e},...r})}async function J(t){const{target:e,buyer:r,signer:a,credits:c,manaGapWei:d,providerType:m,onBroadcast:f,onReverted:g,onUnobservable:y}=t;if(c.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(d<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const b=X(e),i=C(A.MANAToken,b),l=C(A.CreditsManager,b);await W({auth:{kind:_.Allowance,contractAddress:i.address,spenderAddress:l.address,chainId:b},signer:a,requiredWei:d});const w=(c.reduce((n,x)=>n+BigInt(x.availableAmount),0n)+d).toString(),s=Pe(e,c,w);if(M.enabled){let n;try{return n=await fe({purchase:s,buyer:r,signer:a}),f==null||f({txHash:n}),await ge(n),n}catch(x){if(x instanceof N&&x.code===D.USER_DENIED||x instanceof xe)throw x;if(!(x instanceof me))throw n&&(g==null||g({txHash:n})),x;if(x.reason==="relayer-unreachable")throw y==null||y(),x;if(!te(m))throw x;E(x,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return he({purchase:s,buyer:r,signer:a,onBroadcast:f,onReverted:g})}function X(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Pe(t,e,r){return t.kind==="trade"?{kind:"trade",trade:t.trade,coupon:t.coupon,credits:e,maxCreditedValue:r}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:r}}function gt(t,e){const r=X(e);return t==="combined"?{spender:C(A.CreditsManager,r).address,chainId:r}:{spender:e.kind==="trade"?C(L(e.trade.contract),r).address:C(A.CollectionStore,r).address,chainId:r}}function xt(t){return o.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:o.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}const{colors:T,media:$}=p,Ke=h.section`
188
188
  margin-top: 40px;
189
189
  `,Ue=h.div`
190
190
  display: flex;
@@ -319,4 +319,4 @@ import{r as k,j as o}from"./react-EC0gZ8rD.js";import{cw as Z,a as p,s as h,k as
319
319
  transform: scale(1.1);
320
320
  }
321
321
  `;function mt({title:t,items:e,onViewAll:r}){const a=k.useRef(null),[c,d]=k.useState(1),[m,f]=k.useState(0),[g,y]=k.useState(!0),[b,i]=k.useState(!1),l=k.useCallback(()=>{const s=a.current;if(!s)return;const{scrollLeft:n,scrollWidth:x,clientWidth:j}=s,I=Math.max(1,Math.ceil(x/j));d(I),f(Math.min(I-1,Math.round(n/j))),y(n<=1),i(n+j>=x-1)},[]);if(k.useEffect(()=>{l();const s=a.current;if(s)return s.addEventListener("scroll",l,{passive:!0}),window.addEventListener("resize",l),()=>{s.removeEventListener("scroll",l),window.removeEventListener("resize",l)}},[l,e.length]),e.length===0)return null;function u(s){const n=a.current;n&&n.scrollBy({left:s*n.clientWidth,behavior:"smooth"})}function w(s){const n=a.current;n&&n.scrollTo({left:s*n.clientWidth,behavior:"smooth"})}return o.jsxs(Ke,{"data-testid":"carousel",children:[o.jsxs(Ue,{children:[o.jsx(Le,{children:t}),r?o.jsxs(Be,{onClick:r,children:[v("collectionCarousel.viewAll"),o.jsx(Ge,{name:"chevron-down",size:16})]}):null]}),o.jsxs(Qe,{children:[o.jsx(K,{"data-side":"left",onClick:()=>u(-1),"aria-label":v("collectionCarousel.scrollLeft"),disabled:g,children:o.jsx("img",{src:P,alt:"","aria-hidden":!0})}),o.jsx(He,{ref:a,children:e.map(s=>o.jsx(ae,{item:s},s.id))}),o.jsx(K,{"data-side":"right",onClick:()=>u(1),"aria-label":v("collectionCarousel.scrollRight"),disabled:b,children:o.jsx("img",{src:P,alt:"","aria-hidden":!0})})]}),c>1?o.jsx(Oe,{"aria-label":v("collectionCarousel.pages"),children:Array.from({length:c}).map((s,n)=>o.jsx(qe,{"data-active":n===m||void 0,"aria-label":v("collectionCarousel.goToPage",{page:n+1}),"aria-current":n===m?"true":void 0,onClick:()=>w(n)},n))}):null]})}export{dt as A,xt as C,mt as a,lt as b,Y as c,X as d,st as e,ut as f,pt as g,ht as h,ct as i,ft as j,ot as k,gt as m,Pe as p,it as r,at as s,nt as t,V as u};
322
- //# sourceMappingURL=CollectionCarousel-B6ArqOAS.js.map
322
+ //# sourceMappingURL=CollectionCarousel-DPYm9Mco.js.map
@@ -0,0 +1,18 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-CMyjZAO0.js","_assets/react-CIQLPMFg.js"])))=>i.map(i=>d[i]);
2
+ import{s as a,_ as s}from"./index-Cz1gkPqp.js";import{r as n,j as i}from"./react-CIQLPMFg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="63daf63f-db25-490a-9bf4-61bf15b0195c",t._sentryDebugIdIdentifier="sentry-dbid-63daf63f-db25-490a-9bf4-61bf15b0195c")}catch{}})();const o=a.div`
3
+ position: fixed;
4
+ inset: 0;
5
+ /**
6
+ * NEGATIVE, and that is the whole trick.
7
+ *
8
+ * This layer renders INSIDE Success's Root, so it shares that stacking context with the card: a positive or
9
+ * zero z-index paints it above every in-flow sibling no matter what the parent's own z-index is, which is
10
+ * why raising Root did nothing. Only a negative value puts a positioned child behind its parent's content.
11
+ *
12
+ * The parent must then form a stacking context (Root sets position/z-index), or -1 would escape past it and
13
+ * hide behind the page background instead.
14
+ */
15
+ z-index: -1;
16
+ pointer-events: none;
17
+ `,r=n.lazy(async()=>{const[{default:t},{default:e}]=await Promise.all([s(()=>import("./index.es-CMyjZAO0.js"),__vite__mapDeps([0,1])),s(()=>import("./confettiAnimation-Btd6HRFo.js"),[])]);return{default:()=>i.jsx(t,{animationData:e,loop:1})}});function l(){const[t]=n.useState(()=>{var e;return!((e=window.matchMedia)!=null&&e.call(window,"(prefers-reduced-motion: reduce)").matches)});return t?i.jsx(o,{"aria-hidden":!0,"data-testid":"confetti",children:i.jsx(n.Suspense,{fallback:null,children:i.jsx(r,{})})}):null}export{l as C};
18
+ //# sourceMappingURL=Confetti-C2sCoHqz.js.map
@@ -1,2 +1,2 @@
1
- import{p as o}from"./sentry-Cb74VndH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="212e6b2b-00bf-4961-b68b-1d32c6f901a6",e._sentryDebugIdIdentifier="sentry-dbid-212e6b2b-00bf-4961-b68b-1d32c6f901a6")}catch{}})();var n={};const r={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof o<"u"&&typeof n<"u"?n.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{r as C};
2
- //# sourceMappingURL=ConstantsUtil-DExs3a1x.js.map
1
+ import{p as o}from"./sentry-BLkqPRre.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="212e6b2b-00bf-4961-b68b-1d32c6f901a6",e._sentryDebugIdIdentifier="sentry-dbid-212e6b2b-00bf-4961-b68b-1d32c6f901a6")}catch{}})();var n={};const r={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof o<"u"&&typeof n<"u"?n.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{r as C};
2
+ //# sourceMappingURL=ConstantsUtil-CtK55tBM.js.map
@@ -1,2 +1,2 @@
1
- import{g as z}from"./react-EC0gZ8rD.js";import{r as W}from"./index-CKlbOc6k.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="c4e5caf1-0849-4f8f-a3ca-7e16f35c3d95",s._sentryDebugIdIdentifier="sentry-dbid-c4e5caf1-0849-4f8f-a3ca-7e16f35c3d95")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const P=d[F];if(typeof P!="string"&&!Array.isArray(P)){for(const f in P)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(P,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>P[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let b=null;try{g&&(b=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{b&&clearTimeout(b)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function P(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},b=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:b.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:b})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function P(){return F.version}s.getCurrentVersion=P;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new b(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new b(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=b.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=b.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class b{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new b(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=b})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,P,f){for(;P>0;)try{return await F()}catch(m){if(P--,P>0)console.info(`Failed to ${d}. Still have ${P} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function P(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=P;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function b(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await b([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:b,fetchEntityById:n,downloadContent:(t,a)=>P(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
2
- //# sourceMappingURL=ContentClient-BMmckfUm.js.map
1
+ import{g as z}from"./react-CIQLPMFg.js";import{r as W}from"./index-S_xxRX5B.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="5c7e8e77-ca22-479e-a409-899db371af9e",s._sentryDebugIdIdentifier="sentry-dbid-5c7e8e77-ca22-479e-a409-899db371af9e")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const P=d[F];if(typeof P!="string"&&!Array.isArray(P)){for(const f in P)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(P,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>P[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let b=null;try{g&&(b=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{b&&clearTimeout(b)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function P(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},b=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:b.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:b})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function P(){return F.version}s.getCurrentVersion=P;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new b(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new b(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=b.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=b.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class b{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new b(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=b})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,P,f){for(;P>0;)try{return await F()}catch(m){if(P--,P>0)console.info(`Failed to ${d}. Still have ${P} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function P(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=P;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function b(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await b([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:b,fetchEntityById:n,downloadContent:(t,a)=>P(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
2
+ //# sourceMappingURL=ContentClient---ThWfq5.js.map
@@ -1,4 +1,4 @@
1
- import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-EC0gZ8rD.js";import{u as _e,s as Re}from"./search-empty-D5DLeEKI.js";import{u as Ae,S as Z,R as ze,F as Te,a as Be}from"./Filters-BipHXxnJ.js";import{a as de,bI as De,a9 as J,a8 as X,s,bJ as We,A as Oe,bK as Ke,t as o,bL as Ue,bM as ee,H as Ge,n as he,a3 as ue,x as He,bN as me,bO as Ve,bP as qe,I as te,c as Qe,B as Ye,w as Ze,av as Je,Y as Xe,Z as et,a1 as M,$ as A,a2 as oe,bQ as re,bR as tt}from"./index-CUIg8HdV.js";import{T as pe}from"./skeleton.styles-Df0jIOwp.js";import{d as ot,P as rt,C as it,a as st,b as at,c as nt,e as lt}from"./collectionPage.styles-B7rtIk6J.js";import{u as ct,L as dt}from"./useStore-xMX0SCw6.js";import{L as ie}from"./LoadMore-CuRa22jR.js";import{u as se}from"./useInfiniteGrid-DheMz6c1.js";import{S as ht}from"./categories-DgBMiYtZ.js";import{E as z}from"./ErrorNotice-DesrOehz.js";import{c as ut,i as mt}from"./items-empty-CiUgWrW2.js";import{R as pt,S as xt,a as gt,D as ft,b as bt,C as wt,c as yt,d as vt,e as jt,M as Ct}from"./browseLayout.styles-Dphi8OG5.js";import{G as ae}from"./grid.styles-B_SYfKbL.js";import"./Tooltip-CAbr028E.js";import"./dcl-schemas-C-x6e7cM.js";import"./sentry-Cb74VndH.js";import"./ethers-BCdPj9kp.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-GdG1_iLJ.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new r.Error().stack;i&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[i]="272255a2-7f19-45b8-9910-e88bf4e4b66c",r._sentryDebugIdIdentifier="sentry-dbid-272255a2-7f19-45b8-9910-e88bf4e4b66c")}catch{}})();function kt(r){const{gridLoading:i,gridError:a,gridCount:l,baselinePending:c,baselineError:d,baselineCount:b}=r;return i?"skeletons":a?"error":l>0?"items":c?"skeletons":d?"error":b===0?"no-creations":"filters"}const{colors:w,radius:$,media:$t}=de,St=s.article`
1
+ import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-CIQLPMFg.js";import{u as _e,s as Ae}from"./search-empty-DyNrMjf7.js";import{u as Re,S as Z,F as ze,a as Te}from"./Filters-CTxYIYUu.js";import{a as de,bH as Be,a9 as J,a8 as X,s,bI as De,A as We,bJ as Oe,t as o,bK as Ke,bL as ee,H as Ue,n as he,a3 as ue,x as Ge,bM as me,bN as He,bO as Ve,I as te,c as qe,B as Qe,w as Ye,bP as Ze,av as Je,Y as Xe,Z as et,a1 as M,$ as R,a2 as oe,bQ as re,bR as tt,bS as ot}from"./index-Cz1gkPqp.js";import{T as pe}from"./skeleton.styles-D6CyJhvn.js";import{d as rt,P as it,C as st,a as at,b as nt,c as lt,e as ct}from"./collectionPage.styles-Dvxboaj-.js";import{u as dt,L as ht}from"./useStore-B3U8zy8P.js";import{L as ie}from"./LoadMore-BEamihJl.js";import{u as se}from"./useInfiniteGrid-BVnan2j4.js";import{E as z}from"./ErrorNotice-CnnV8mz4.js";import{c as ut,i as mt}from"./items-empty-DgC6LQFu.js";import{R as pt,S as xt,a as gt,D as ft,b as bt,C as wt,c as yt,d as vt,e as jt,M as Ct}from"./browseLayout.styles-CKYDua24.js";import{G as ae}from"./grid.styles-uxy9NCd3.js";import"./Tooltip-CAzvjIL5.js";import"./dcl-schemas-DWx78xmt.js";import"./sentry-BLkqPRre.js";import"./ethers-CrJ5ldNF.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-C28o2CCY.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new r.Error().stack;i&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[i]="6a7c1c15-0e28-450c-b5d9-9fcfbaa6676a",r._sentryDebugIdIdentifier="sentry-dbid-6a7c1c15-0e28-450c-b5d9-9fcfbaa6676a")}catch{}})();function kt(r){const{gridLoading:i,gridError:a,gridCount:l,baselinePending:c,baselineError:d,baselineCount:b}=r;return i?"skeletons":a?"error":l>0?"items":c?"skeletons":d?"error":b===0?"no-creations":"filters"}const{colors:w,radius:$,media:$t}=de,St=s.article`
2
2
  height: 300px;
3
3
  /* No fill of its own (Figma 922:183803): the mosaic covers the top and the footer paints its own
4
4
  translucent black, so the page field is what shows through the corners. */
@@ -12,7 +12,7 @@ import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-EC0gZ8rD.js";i
12
12
  transition: box-shadow 0.15s ease;
13
13
 
14
14
  &::after {
15
- ${De};
15
+ ${Be};
16
16
  }
17
17
 
18
18
  &:focus-visible {
@@ -54,7 +54,7 @@ import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-EC0gZ8rD.js";i
54
54
  height: 100%;
55
55
  object-fit: cover;
56
56
  display: block;
57
- `,Pt=s(We)`
57
+ `,Pt=s(De)`
58
58
  & [data-testid='coll-thumb-cell'] img {
59
59
  object-fit: contain;
60
60
  padding: 10px;
@@ -96,7 +96,7 @@ import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-EC0gZ8rD.js";i
96
96
  align-items: center;
97
97
  justify-content: space-between;
98
98
  gap: 10px;
99
- `,_t=s(Oe)`
99
+ `,_t=s(We)`
100
100
  min-width: 0;
101
101
  color: ${w.gray4};
102
102
 
@@ -111,9 +111,9 @@ import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-EC0gZ8rD.js";i
111
111
  color: ${w.white};
112
112
  font-weight: 600;
113
113
  }
114
- `,Rt=s.span`
115
- min-width: 0;
116
114
  `,At=s.span`
115
+ min-width: 0;
116
+ `,Rt=s.span`
117
117
  flex: none;
118
118
  color: ${w.gray4};
119
119
  font-weight: 600;
@@ -141,7 +141,7 @@ import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-EC0gZ8rD.js";i
141
141
  &:active {
142
142
  background: ${w.text2};
143
143
  }
144
- `;function Tt({collection:r,cover:i,itemCount:a}){const l=ce(),{contractAddress:c,name:d,creator:b}=r,j=i==null||a==null,{data:n}=Ke(c,j),g=i==null?(n==null?void 0:n.items)??[]:[],f=a??(n==null?void 0:n.total);function h(){l(`/collection/${c}`)}return e.jsxs(St,{"data-testid":"coll-card",role:"link",tabIndex:0,onClick:h,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),h())},children:[e.jsx(Nt,{children:i?e.jsx(Et,{"data-testid":"coll-card-img",src:i,alt:"",loading:"lazy"}):g.length>0?e.jsx(Pt,{items:g}):null}),e.jsxs(It,{children:[e.jsx(Ft,{title:d,children:d}),e.jsxs(Lt,{children:[e.jsxs(Mt,{"data-meta":!0,"data-testid":"coll-card-meta",children:[b?e.jsx(_t,{address:b,linkToProfile:!0}):e.jsx(Rt,{children:" "}),e.jsx(At,{"data-testid":"coll-card-count","aria-busy":f==null||void 0,children:f==null?e.jsx(pe,{className:"skeleton",width:54,"data-testid":"coll-card-count-skeleton","aria-hidden":!0}):o("collectionCard.itemCount",{count:f})})]}),e.jsx(zt,{"data-view":!0,"data-testid":"coll-card-view",onClick:m=>{m.stopPropagation(),h()},tabIndex:-1,children:o("collectionCard.viewCollection")})]})]})]})}function Bt({address:r,className:i=""}){const a=Ue(),l=ee(d=>d.followed.includes(r.toLowerCase())),c=ee(d=>d.toggle);return!a||!r?null:e.jsx(Ge,{type:"button",size:"sm",variant:l?"ghost":"outline",className:i||void 0,"data-testid":"follow-button","aria-pressed":l,title:l?o("creator.unfollowTitle"):o("creator.followTitle"),onClick:()=>c(r),children:l?o("creator.following"):o("creator.follow")})}const{colors:y,radius:xe,media:v}=de,ge=he`
144
+ `;function Tt({collection:r,cover:i,itemCount:a}){const l=ce(),{contractAddress:c,name:d,creator:b}=r,j=i==null||a==null,{data:n}=Oe(c,j),g=i==null?(n==null?void 0:n.items)??[]:[],f=a??(n==null?void 0:n.total);function h(){l(`/collection/${c}`)}return e.jsxs(St,{"data-testid":"coll-card",role:"link",tabIndex:0,onClick:h,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),h())},children:[e.jsx(Nt,{children:i?e.jsx(Et,{"data-testid":"coll-card-img",src:i,alt:"",loading:"lazy"}):g.length>0?e.jsx(Pt,{items:g}):null}),e.jsxs(It,{children:[e.jsx(Ft,{title:d,children:d}),e.jsxs(Lt,{children:[e.jsxs(Mt,{"data-meta":!0,"data-testid":"coll-card-meta",children:[b?e.jsx(_t,{address:b,linkToProfile:!0}):e.jsx(At,{children:" "}),e.jsx(Rt,{"data-testid":"coll-card-count","aria-busy":f==null||void 0,children:f==null?e.jsx(pe,{className:"skeleton",width:54,"data-testid":"coll-card-count-skeleton","aria-hidden":!0}):o("collectionCard.itemCount",{count:f})})]}),e.jsx(zt,{"data-view":!0,"data-testid":"coll-card-view",onClick:m=>{m.stopPropagation(),h()},tabIndex:-1,children:o("collectionCard.viewCollection")})]})]})]})}function Bt({address:r,className:i=""}){const a=Ke(),l=ee(d=>d.followed.includes(r.toLowerCase())),c=ee(d=>d.toggle);return!a||!r?null:e.jsx(Ue,{type:"button",size:"sm",variant:l?"ghost":"outline",className:i||void 0,"data-testid":"follow-button","aria-pressed":l,title:l?o("creator.unfollowTitle"):o("creator.followTitle"),onClick:()=>c(r),children:l?o("creator.following"):o("creator.follow")})}const{colors:y,radius:xe,media:v}=de,ge=he`
145
145
  display: inline-flex;
146
146
  align-items: center;
147
147
  justify-content: center;
@@ -308,5 +308,5 @@ import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-EC0gZ8rD.js";i
308
308
  &:hover {
309
309
  background: ${y.blackBtn};
310
310
  }
311
- `,Jt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Xt({address:r}){var m,C;const{data:i}=ue(r),{data:a}=ct(r),l=He(p=>{var S;return(S=p.session)==null?void 0:S.address}),c=!!l&&l.toLowerCase()===r.toLowerCase(),d=(i==null?void 0:i.name)||me(r),b=(C=(m=i==null?void 0:i.avatar)==null?void 0:m.snapshots)==null?void 0:C.face256,j=(a==null?void 0:a.cover)||ot,n=a==null?void 0:a.description,g=`${Qe.profileUrl}/${r}`,f=dt.filter(p=>a==null?void 0:a.links[p]),h=Ve(qe({name:i==null?void 0:i.name,hasClaimedName:i==null?void 0:i.hasClaimedName,ethAddress:(i==null?void 0:i.ethAddress)??r}));return e.jsxs(Dt,{"aria-label":`${d} storefront`,children:[e.jsxs(Wt,{children:[e.jsx(Ot,{src:j,alt:"",loading:"eager"}),e.jsx(Kt,{"aria-hidden":!0})]}),(f.length>0||c)&&e.jsxs(Ut,{children:[f.map(p=>e.jsx(Gt,{"data-testid":"creator-hero-link",href:(a==null?void 0:a.links[p])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${p}`),"aria-label":o(`creator.link.${p}`),children:e.jsx(te,{name:Jt[p]})},p)),c&&e.jsx(Ht,{to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx(te,{name:"pen"})})]}),e.jsxs(Vt,{children:[b?e.jsx(ne,{src:b,alt:"",loading:"eager",style:{backgroundColor:h}}):e.jsx(ne,{as:"span","aria-hidden":!0,style:{backgroundColor:h}}),e.jsxs("div",{children:[e.jsx(qt,{children:d}),n?e.jsx(Qt,{children:n}):null]}),e.jsxs(Yt,{children:[e.jsx(Zt,{"data-testid":"creator-hero-view",href:g,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Bt,{address:r,className:"creator-hero__follow"})]})]})]})}const eo=["all","on_sale","not_for_sale"],le=48;function jo(){var Q,Y;const{address:r}=Le(),i=ce(),[a]=Me(),l=a.has("collections"),{data:c}=ue(r),d=(c==null?void 0:c.name)||(r?me(r):o("creator.fallbackName"));Ye({title:d,description:o("seo.creator.description",{name:d}),image:(Y=(Q=c==null?void 0:c.avatar)==null?void 0:Q.snapshots)==null?void 0:Y.face256});const b=L.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[j,n]=_e(b),{category:g,subCategory:f,rarities:h,priceMin:m,priceMax:C,smart:p,sort:S}=j,N=eo.includes(j.status)?j.status:"all",T=t=>n({status:t});Ae(`${l}:${g}:${f??""}`);const[P,E]=L.useState(!1);L.useEffect(()=>{if(!P)return;const t=Ie=>{Ie.key==="Escape"&&E(!1)};document.addEventListener("keydown",t);const x=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=x}},[P]);const B=m&&!Number.isNaN(Number(m))?Number(m):void 0,D=C&&!Number.isNaN(Number(C))?Number(C):void 0,be=f?ht[f]:void 0,we=(Z.find(t=>t.key===S)??Z[0]).server,W={creator:r,category:g,rarities:h.length?h:void 0,wearableCategories:be,minPriceCredits:B,maxPriceCredits:D,isWearableSmart:p||void 0,isOnSale:N==="all"?void 0:N==="on_sale",sortBy:we},{items:_,total:ye,isLoading:ve,isPlaceholderData:je,error:O,hasNextPage:Ce,isFetchingNextPage:K,isFetchNextPageError:ke,fetchNextPage:$e}=se(["creator-items",W],t=>re({...W,first:le,skip:t}),{enabled:!!r&&!l}),I=Ze({queryKey:["creator-item-count",r],queryFn:()=>re({creator:r,first:1}).then(t=>t.total),enabled:!!r}),u=se(["creator-collections",r],t=>tt(r,{first:le,skip:t}).then(x=>({items:x.collections,total:x.total})),{enabled:!!r&&l});function U(t){n({category:t,subCategory:null},{drop:l?["collections"]:void 0})}function Se(){const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();i({search:x?`?${x}`:""},{replace:!0})}function Ne(){if(l){Se();return}const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();i({search:x?`?${x}&collections`:"?collections"},{replace:!0})}function G(t){n({rarities:h.includes(t)?h.filter(x=>x!==t):[...h,t]})}function H(){n(b)}const k=[];(g==="wearable"||g==="emote")&&k.push({key:"category",label:o(g==="emote"?"categories.emotes":"categories.wearables"),onRemove:()=>U("all")}),(B!=null||D!=null)&&k.push({key:"price",label:o("filter.price"),onRemove:()=>{n({priceMin:"",priceMax:""})}});for(const t of ze)h.includes(t)&&k.push({key:`rarity-${t}`,label:Je(t),onRemove:()=>G(t)});p&&k.push({key:"smart",label:o("filter.smart"),onRemove:()=>n({smart:!1})}),N!=="all"&&k.push({key:"status",label:N==="on_sale"?o("filter.onSale"):o("filter.notForSale"),onRemove:()=>T("all")});const F=kt({gridLoading:ve||je,gridError:!!O,gridCount:_.length,baselinePending:I.isPending,baselineError:I.isError,baselineCount:I.data}),V=F==="skeletons",{data:q}=Xe(),Ee=L.useMemo(()=>_.map(t=>({...t,priceCredits:et(t,q)})),[_,q]),Pe=t=>t.priceCredits>0||!!t.manaWei,R=F==="items"||F==="skeletons"?null:F;return e.jsxs(rt,{children:[e.jsxs(it,{"aria-label":o("creator.breadcrumbAria"),children:[e.jsx(st,{onClick:()=>i("/items"),children:o("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(at,{children:d})]}),r?e.jsx(Xt,{address:r}):null,e.jsxs(pt,{children:[P?e.jsx(xt,{onClick:()=>E(!1),"aria-hidden":!0}):null,e.jsxs(gt,{"data-open":P||void 0,"data-testid":"creator-sidebar",children:[e.jsxs(ft,{children:[e.jsx(bt,{children:o("assets.filters")}),e.jsx(wt,{onClick:()=>E(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(yt,{children:e.jsx(Te,{category:g,subCategory:f,onCategory:U,onSub:t=>n({subCategory:t}),priceMin:m,priceMax:C,onPriceMin:t=>n({priceMin:t}),onPriceMax:t=>n({priceMax:t}),rarities:h,onToggleRarity:G,status:N,onStatus:T,smart:p,onSmart:t=>n({smart:t}),hideNames:!0,collections:l,onCollections:Ne})}),e.jsx(vt,{children:e.jsx(jt,{type:"button",onClick:()=>E(!1),children:o("assets.showItems")})})]}),e.jsx(Ct,{children:l?e.jsxs(e.Fragment,{children:[e.jsx(nt,{children:e.jsx(lt,{"data-testid":"creator-collections-count","aria-busy":u.isLoading||void 0,children:u.isLoading?e.jsx(pe,{className:"skeleton",width:72,"data-testid":"creator-collections-count-skeleton","aria-hidden":!0}):o("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(z,{message:o("creator.error")}):null,e.jsx(ae,{"data-variant":"collections",children:u.isLoading?e.jsx(M,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(t=>e.jsx(Tt,{collection:t,itemCount:t.itemCount},t.contractAddress)),u.isFetchingNextPage?e.jsx(M,{count:6}):null]})}),e.jsx(ie,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,isError:u.isFetchNextPageError,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx(A,{testId:"creator-collections-empty",icon:ut,title:o("creator.collectionsEmptyTitle"),body:o("creator.collectionsEmpty"),cta:{label:o("assets.empty.cta"),to:"/items"}}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Be,{sort:S,onSort:t=>n({sort:t}),total:ye,loading:V,onOpenFilters:()=>E(!0),chips:k,onClearChips:H}),O?e.jsx(z,{message:o("creator.error"),testId:"creator-error"}):null,e.jsx(ae,{"data-testid":"creator-grid",children:V?e.jsx(M,{count:15}):e.jsxs(e.Fragment,{children:[Ee.map(t=>Pe(t)?e.jsx(oe,{item:t},t.id):e.jsx(oe,{item:t,mode:"view"},t.id)),K?e.jsx(M,{count:6}):null]})}),e.jsx(ie,{hasNextPage:Ce,isFetching:K,isError:ke,onLoadMore:()=>void $e()}),R==="error"?e.jsx(z,{message:o("creator.error"),testId:"creator-empty-error"}):R==="no-creations"?e.jsx(A,{testId:"creator-empty-none",icon:mt,title:o("creator.emptyNoCreationsTitle"),body:o("creator.emptyNoCreations"),cta:{label:o("assets.empty.cta"),to:"/items"}}):R==="filters"?e.jsx(A,{testId:"creator-empty-filters",icon:Re,title:o("creator.emptyFilters.title"),body:o("creator.emptyFilters.body",{count:I.data??0}),cta:{label:o("filterBar.clearAll"),onClick:H}}):null]})})]})]})}export{jo as Creator,jo as default};
312
- //# sourceMappingURL=Creator-2EgxZy08.js.map
311
+ `,Jt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Xt({address:r}){var m,C;const{data:i}=ue(r),{data:a}=dt(r),l=Ge(p=>{var S;return(S=p.session)==null?void 0:S.address}),c=!!l&&l.toLowerCase()===r.toLowerCase(),d=(i==null?void 0:i.name)||me(r),b=(C=(m=i==null?void 0:i.avatar)==null?void 0:m.snapshots)==null?void 0:C.face256,j=(a==null?void 0:a.cover)||rt,n=a==null?void 0:a.description,g=`${qe.profileUrl}/${r}`,f=ht.filter(p=>a==null?void 0:a.links[p]),h=He(Ve({name:i==null?void 0:i.name,hasClaimedName:i==null?void 0:i.hasClaimedName,ethAddress:(i==null?void 0:i.ethAddress)??r}));return e.jsxs(Dt,{"aria-label":`${d} storefront`,children:[e.jsxs(Wt,{children:[e.jsx(Ot,{src:j,alt:"",loading:"eager"}),e.jsx(Kt,{"aria-hidden":!0})]}),(f.length>0||c)&&e.jsxs(Ut,{children:[f.map(p=>e.jsx(Gt,{"data-testid":"creator-hero-link",href:(a==null?void 0:a.links[p])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${p}`),"aria-label":o(`creator.link.${p}`),children:e.jsx(te,{name:Jt[p]})},p)),c&&e.jsx(Ht,{to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx(te,{name:"pen"})})]}),e.jsxs(Vt,{children:[b?e.jsx(ne,{src:b,alt:"",loading:"eager",style:{backgroundColor:h}}):e.jsx(ne,{as:"span","aria-hidden":!0,style:{backgroundColor:h}}),e.jsxs("div",{children:[e.jsx(qt,{children:d}),n?e.jsx(Qt,{children:n}):null]}),e.jsxs(Yt,{children:[e.jsx(Zt,{"data-testid":"creator-hero-view",href:g,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Bt,{address:r,className:"creator-hero__follow"})]})]})]})}const eo=["all","on_sale","not_for_sale"],le=48;function vo(){var Q,Y;const{address:r}=Le(),i=ce(),[a]=Me(),l=a.has("collections"),{data:c}=ue(r),d=(c==null?void 0:c.name)||(r?me(r):o("creator.fallbackName"));Qe({title:d,description:o("seo.creator.description",{name:d}),image:(Y=(Q=c==null?void 0:c.avatar)==null?void 0:Q.snapshots)==null?void 0:Y.face256});const b=L.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[j,n]=_e(b),{category:g,subCategory:f,rarities:h,priceMin:m,priceMax:C,smart:p,sort:S}=j,N=eo.includes(j.status)?j.status:"all",T=t=>n({status:t});Re(`${l}:${g}:${f??""}`);const[P,E]=L.useState(!1);L.useEffect(()=>{if(!P)return;const t=Ie=>{Ie.key==="Escape"&&E(!1)};document.addEventListener("keydown",t);const x=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=x}},[P]);const B=m&&!Number.isNaN(Number(m))?Number(m):void 0,D=C&&!Number.isNaN(Number(C))?Number(C):void 0,be=f?tt[f]:void 0,we=(Z.find(t=>t.key===S)??Z[0]).server,W={creator:r,category:g,rarities:h.length?h:void 0,wearableCategories:be,minPriceCredits:B,maxPriceCredits:D,isWearableSmart:p||void 0,isOnSale:N==="all"?void 0:N==="on_sale",sortBy:we},{items:_,total:ye,isLoading:ve,isPlaceholderData:je,error:O,hasNextPage:Ce,isFetchingNextPage:K,isFetchNextPageError:ke,fetchNextPage:$e}=se(["creator-items",W],t=>re({...W,first:le,skip:t}),{enabled:!!r&&!l}),I=Ye({queryKey:["creator-item-count",r],queryFn:()=>re({creator:r,first:1}).then(t=>t.total),enabled:!!r}),u=se(["creator-collections",r],t=>ot(r,{first:le,skip:t}).then(x=>({items:x.collections,total:x.total})),{enabled:!!r&&l});function U(t){n({category:t,subCategory:null},{drop:l?["collections"]:void 0})}function Se(){const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();i({search:x?`?${x}`:""},{replace:!0})}function Ne(){if(l){Se();return}const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();i({search:x?`?${x}&collections`:"?collections"},{replace:!0})}function G(t){n({rarities:h.includes(t)?h.filter(x=>x!==t):[...h,t]})}function H(){n(b)}const k=[];(g==="wearable"||g==="emote")&&k.push({key:"category",label:o(g==="emote"?"categories.emotes":"categories.wearables"),onRemove:()=>U("all")}),(B!=null||D!=null)&&k.push({key:"price",label:o("filter.price"),onRemove:()=>{n({priceMin:"",priceMax:""})}});for(const t of Ze)h.includes(t)&&k.push({key:`rarity-${t}`,label:Je(t),onRemove:()=>G(t)});p&&k.push({key:"smart",label:o("filter.smart"),onRemove:()=>n({smart:!1})}),N!=="all"&&k.push({key:"status",label:N==="on_sale"?o("filter.onSale"):o("filter.notForSale"),onRemove:()=>T("all")});const F=kt({gridLoading:ve||je,gridError:!!O,gridCount:_.length,baselinePending:I.isPending,baselineError:I.isError,baselineCount:I.data}),V=F==="skeletons",{data:q}=Xe(),Ee=L.useMemo(()=>_.map(t=>({...t,priceCredits:et(t,q)})),[_,q]),Pe=t=>t.priceCredits>0||!!t.manaWei,A=F==="items"||F==="skeletons"?null:F;return e.jsxs(it,{children:[e.jsxs(st,{"aria-label":o("creator.breadcrumbAria"),children:[e.jsx(at,{onClick:()=>i("/items"),children:o("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(nt,{children:d})]}),r?e.jsx(Xt,{address:r}):null,e.jsxs(pt,{children:[P?e.jsx(xt,{onClick:()=>E(!1),"aria-hidden":!0}):null,e.jsxs(gt,{"data-open":P||void 0,"data-testid":"creator-sidebar",children:[e.jsxs(ft,{children:[e.jsx(bt,{children:o("assets.filters")}),e.jsx(wt,{onClick:()=>E(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(yt,{children:e.jsx(ze,{category:g,subCategory:f,onCategory:U,onSub:t=>n({subCategory:t}),priceMin:m,priceMax:C,onPriceMin:t=>n({priceMin:t}),onPriceMax:t=>n({priceMax:t}),rarities:h,onToggleRarity:G,status:N,onStatus:T,smart:p,onSmart:t=>n({smart:t}),hideNames:!0,collections:l,onCollections:Ne})}),e.jsx(vt,{children:e.jsx(jt,{type:"button",onClick:()=>E(!1),children:o("assets.showItems")})})]}),e.jsx(Ct,{children:l?e.jsxs(e.Fragment,{children:[e.jsx(lt,{children:e.jsx(ct,{"data-testid":"creator-collections-count","aria-busy":u.isLoading||void 0,children:u.isLoading?e.jsx(pe,{className:"skeleton",width:72,"data-testid":"creator-collections-count-skeleton","aria-hidden":!0}):o("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(z,{message:o("creator.error")}):null,e.jsx(ae,{"data-variant":"collections",children:u.isLoading?e.jsx(M,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(t=>e.jsx(Tt,{collection:t,itemCount:t.itemCount},t.contractAddress)),u.isFetchingNextPage?e.jsx(M,{count:6}):null]})}),e.jsx(ie,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,isError:u.isFetchNextPageError,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx(R,{testId:"creator-collections-empty",icon:ut,title:o("creator.collectionsEmptyTitle"),body:o("creator.collectionsEmpty"),cta:{label:o("assets.empty.cta"),to:"/items"}}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Te,{sort:S,onSort:t=>n({sort:t}),total:ye,loading:V,onOpenFilters:()=>E(!0),chips:k,onClearChips:H}),O?e.jsx(z,{message:o("creator.error"),testId:"creator-error"}):null,e.jsx(ae,{"data-testid":"creator-grid",children:V?e.jsx(M,{count:15}):e.jsxs(e.Fragment,{children:[Ee.map(t=>Pe(t)?e.jsx(oe,{item:t},t.id):e.jsx(oe,{item:t,mode:"view"},t.id)),K?e.jsx(M,{count:6}):null]})}),e.jsx(ie,{hasNextPage:Ce,isFetching:K,isError:ke,onLoadMore:()=>void $e()}),A==="error"?e.jsx(z,{message:o("creator.error"),testId:"creator-empty-error"}):A==="no-creations"?e.jsx(R,{testId:"creator-empty-none",icon:mt,title:o("creator.emptyNoCreationsTitle"),body:o("creator.emptyNoCreations"),cta:{label:o("assets.empty.cta"),to:"/items"}}):A==="filters"?e.jsx(R,{testId:"creator-empty-filters",icon:Ae,title:o("creator.emptyFilters.title"),body:o("creator.emptyFilters.body",{count:I.data??0}),cta:{label:o("filterBar.clearAll"),onClick:H}}):null]})})]})]})}export{vo as Creator,vo as default};
312
+ //# sourceMappingURL=Creator-DtK2YAcr.js.map