@dcl/shop 1.17.2-36543879460.commit-7274e5f → 1.17.2-36549246772.commit-a0ab986

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 (246) hide show
  1. package/_assets/{Activity-CmjRvt72.js → Activity-CjEK61TA.js} +4 -4
  2. package/_assets/{AnimatedBackground-CR0iNxdm.js → AnimatedBackground-hJLPzt7T.js} +2 -2
  3. package/_assets/{Assets-CvsgAM3Y.js → Assets-wtTzSg4X.js} +3 -3
  4. package/_assets/{Cart-CBoiNVDV.js → Cart-BYdl4HqS.js} +2 -2
  5. package/_assets/{Collection-CdlOPQWI.js → Collection-BTNBRPjD.js} +2 -2
  6. package/_assets/{CollectionCarousel-DFsFQS9I.js → CollectionCarousel-CCG0ES4r.js} +5 -5
  7. package/_assets/{Confetti-Lg8VNdtW.js → Confetti-DM4YiNme.js} +4 -4
  8. package/_assets/{ConstantsUtil-B4_VYxQV.js → ConstantsUtil-DeECcx1C.js} +2 -2
  9. package/_assets/{ContentClient-59NEqXOY.js → ContentClient-BEWMqkWx.js} +2 -2
  10. package/_assets/{Creator-CHXM6HYQ.js → Creator-CzVQ2FkK.js} +2 -2
  11. package/_assets/{CreditPackPicker-qyJshVYl.js → CreditPackPicker-CyeEFkBf.js} +2 -2
  12. package/_assets/{CreditRate-Cg-O8jv-.js → CreditRate-B4egIJe2.js} +2 -2
  13. package/_assets/{DeploymentBuilder-BMDaSJuK.js → DeploymentBuilder-B9B8Mrm4.js} +2 -2
  14. package/_assets/{EmotePlaybackBar-gxnuFy7n.js → EmotePlaybackBar-C0V8dTyR.js} +3 -3
  15. package/_assets/{ErrorNotice-DVRBkjsp.js → ErrorNotice-DRNDA4ab.js} +2 -2
  16. package/_assets/{Event-DJBV4ESF.js → Event-CCT42Q7f.js} +2 -2
  17. package/_assets/{ExchangeController-CJ4V4Oon.js → ExchangeController-DadhhPAb.js} +2 -2
  18. package/_assets/{Faq-CLoV07bq.js → Faq-DdmyplkV.js} +2 -2
  19. package/_assets/{Filters-BeEzMffI.js → Filters-BUcaObq2.js} +2 -2
  20. package/_assets/{GetCredits-D2lFJbQ3.js → GetCredits-DPJChlrx.js} +2 -2
  21. package/_assets/{Grow-i-9u3HfO.js → Grow-WBBjF0qI.js} +2 -2
  22. package/_assets/{HelpersUtil-DUj3mZuS.js → HelpersUtil-B8Moy1XW.js} +2 -2
  23. package/_assets/{IssueModal-dwZQAHzn.js → IssueModal-BAujGRJp.js} +2 -2
  24. package/_assets/ItemDetail-ChBtCy2t.js +3530 -0
  25. package/_assets/{LoadMore-CYLYvbGP.js → LoadMore-B43opiD2.js} +2 -2
  26. package/_assets/{ManaPricingBanner-Bt_WU6KS.js → ManaPricingBanner-BHLrmm-8.js} +5 -5
  27. package/_assets/{ManaPricingBanner.styles-D2msoQz_.js → ManaPricingBanner.styles-DInNgFwu.js} +2 -2
  28. package/_assets/{MyAssets-W7un4SC3.js → MyAssets-Bd6EF6v3.js} +4 -4
  29. package/_assets/{MyFavorites-B4LTmnU6.js → MyFavorites-BCGc6ELO.js} +2 -2
  30. package/_assets/{MyStore-DxWmC72a.js → MyStore-Dxjog0Sw.js} +2 -2
  31. package/_assets/{NetworkUtil-CWc7MMYZ.js → NetworkUtil-Bm6tGvAB.js} +2 -2
  32. package/_assets/{NotFound-DmWo5yLU.js → NotFound-B_dJ1CEy.js} +2 -2
  33. package/_assets/{NotificationsBell-dLnIgLqP.js → NotificationsBell-C2dt75wu.js} +2 -2
  34. package/_assets/{OutfitDetail-NKWxQqOt.js → OutfitDetail-BN2H3-8E.js} +2 -2
  35. package/_assets/{OutfitPreview-B3p4O6Wa.js → OutfitPreview-CaZ7kRVX.js} +2 -2
  36. package/_assets/{OutfitStudio-Be3N4_Mt.js → OutfitStudio-Jv245tVe.js} +2 -2
  37. package/_assets/{PaymentMethodStep-C3EnP-eM.js → PaymentMethodStep-NtswXRGE.js} +3 -3
  38. package/_assets/{SaleCountdown-Bq7MOyi2.js → SaleCountdown-B_1dnjfz.js} +5 -5
  39. package/_assets/{Spinner-Bl4IrHRQ.js → Spinner-DDg2cZp3.js} +2 -2
  40. package/_assets/{StoreSettings-D8Jg0_-_.js → StoreSettings-CwDrhnai.js} +2 -2
  41. package/_assets/{Success-BSYhAXOx.js → Success-DeK2ypzp.js} +2 -2
  42. package/_assets/{SwapController-DuxH_9c5.js → SwapController-B49Av1_u.js} +2 -2
  43. package/_assets/{Tooltip-BmJUJCYJ.js → Tooltip-DjG6zbCX.js} +2 -2
  44. package/_assets/{TradeService-DEb7yVBZ.js → TradeService-D6qXlh1Z.js} +2 -2
  45. package/_assets/{W3MFrameProviderSingleton-uf3z-_HS.js → W3MFrameProviderSingleton-BphwTeho.js} +4 -4
  46. package/_assets/{WebCryptoP256-D3OdVQ9d.js → WebCryptoP256-SMne_S_n.js} +2 -2
  47. package/_assets/{basic-QaTLX1vT.js → basic-D_8txLq7.js} +2 -2
  48. package/_assets/{biconomy-CyaDteqF.js → biconomy-YZlmchlv.js} +2 -2
  49. package/_assets/{browseLayout.styles-DNXtsrMA.js → browseLayout.styles-Brc2uxe6.js} +2 -2
  50. package/_assets/{browser-Cpjyf5yQ.js → browser-BL288LiQ.js} +2 -2
  51. package/_assets/{browser-rGhFbCyI.js → browser-Dnxu0avw.js} +2 -2
  52. package/_assets/{browser-ponyfill-D8Vu22Uk.js → browser-ponyfill-DnknyR7N.js} +2 -2
  53. package/_assets/{buy-DkF7GLNy.js → buy-CfE_PD5z.js} +2 -2
  54. package/_assets/{buy-gasless-Chbo9aJs.js → buy-gasless-R4n1XJSv.js} +2 -2
  55. package/_assets/{ccip-DtshU0dV.js → ccip-BlgS0auV.js} +2 -2
  56. package/_assets/{ccip-DGcxxIz8.js → ccip-C6UT6KQh.js} +2 -2
  57. package/_assets/{chains-BkRvbXyy.js → chains-tYOV74ij.js} +2 -2
  58. package/_assets/collectionPage.styles-CMbahOgT.js +41 -0
  59. package/_assets/{common-D332rySl.js → common-DLUTBVOI.js} +2 -2
  60. package/_assets/{controller-B7WIUu-b.js → controller-4EyPqibQ.js} +3 -3
  61. package/_assets/{core-DbwVHXzY.js → core-BQREhuMq.js} +5 -5
  62. package/_assets/{createSvgIcon-BNrfwGEU.js → createSvgIcon-BKfNrT59.js} +2 -2
  63. package/_assets/{crumbs.styles-BELLHHmP.js → crumbs.styles-BWaoKyPd.js} +2 -2
  64. package/_assets/{custom-LSzWESj7.js → custom-C9jMAm3T.js} +2 -2
  65. package/_assets/{data-capture-CtpQR5Or.js → data-capture-B9MdwIoc.js} +2 -2
  66. package/_assets/{dcl-schemas-DLwtrFng.js → dcl-schemas-C4fyXlSh.js} +2 -2
  67. package/_assets/{decimals-ttIHisxi.js → decimals-CHXNfoXT.js} +2 -2
  68. package/_assets/{decimals-9qAAgs1z.js → decimals-CLlY4hbe.js} +2 -2
  69. package/_assets/{detectExtension-QqAQRLny.js → detectExtension-BkzSezJq.js} +2 -2
  70. package/_assets/{disposePreview-CDy1nnEl.js → disposePreview-BdKYKQrH.js} +2 -2
  71. package/_assets/{email-CRIw6Jbz.js → email-C58riNwc.js} +2 -2
  72. package/_assets/{embedded-wallet-FpSh7on2.js → embedded-wallet-CwXPqiUJ.js} +2 -2
  73. package/_assets/{emotion-styled.browser.esm-D70mdwc6.js → emotion-styled.browser.esm-BW3kkhus.js} +2 -2
  74. package/_assets/{engine-oQbwQwzg.js → engine-BcBqatJs.js} +2 -2
  75. package/_assets/{errors-Cbpj3VLS.js → errors-D8TPzu4G.js} +2 -2
  76. package/_assets/{estimate-l1-fee-CxEvRUVu.js → estimate-l1-fee-BuYwUowR.js} +2 -2
  77. package/_assets/{eth_estimateGas-D1_V9LCS.js → eth_estimateGas-D9eBLR0c.js} +2 -2
  78. package/_assets/{eth_getStorageAt-B318zlqh.js → eth_getStorageAt-BTI_-XLj.js} +2 -2
  79. package/_assets/{eth_getTransactionCount-oiUsPxtT.js → eth_getTransactionCount-4ybREHU9.js} +2 -2
  80. package/_assets/{ethereum-vmiTxAXh.js → ethereum-CbiAXxqA.js} +2 -2
  81. package/_assets/{ethers-CF8fkxgi.js → ethers-B5rK96tr.js} +2 -2
  82. package/_assets/{events-DV4JS0It.js → events-Bpyu43Bg.js} +2 -2
  83. package/_assets/{execute-Bktrxhn0.js → execute-Ccffv2og.js} +3 -3
  84. package/_assets/{extractIPFS-Ch1ehxrn.js → extractIPFS-3WlcwhU4.js} +2 -2
  85. package/_assets/{features-D7wiiv0R.js → features-CgIhprDd.js} +2 -2
  86. package/_assets/{fetchTokenMetadata-BvOHV4gG.js → fetchTokenMetadata-BnWDdpY0.js} +3 -3
  87. package/_assets/{field.styles-Dhn72RAs.js → field.styles-Bc-0DX0s.js} +2 -2
  88. package/_assets/{fortmatic-CvbZZSGh.js → fortmatic-MrWbQYW_.js} +2 -2
  89. package/_assets/{get-bytecode-D-4So9iL.js → get-bytecode-CRVt2uO9.js} +2 -2
  90. package/_assets/{get-ecosystem-wallet-info-DZeXnkG-.js → get-ecosystem-wallet-info-DtQOolGc.js} +2 -2
  91. package/_assets/{getBalance-S2Symdej.js → getBalance-DO3N3k0P.js} +3 -3
  92. package/_assets/{getInstalledModules-6BoQAfhs.js → getInstalledModules-C_OImnek.js} +2 -2
  93. package/_assets/{getNFT-D97qf03K.js → getNFT-BGiMgi76.js} +2 -2
  94. package/_assets/{getNFT-hoZcpwkZ.js → getNFT-CIWeHs-K.js} +3 -3
  95. package/_assets/{grid.styles-CCNR8HJI.js → grid.styles-_ID6vrzI.js} +2 -2
  96. package/_assets/{hashTypedData-D4grvM4W.js → hashTypedData-C665UmRR.js} +2 -2
  97. package/_assets/{hashTypedData-CPrA8OD2.js → hashTypedData-ey-EuOtF.js} +2 -2
  98. package/_assets/{import-CSRyL2ws.js → import-CMPD8P4K.js} +2 -2
  99. package/_assets/{in-app-wallet-calls-DlJy3Gpu.js → in-app-wallet-calls-CPtTLqu-.js} +2 -2
  100. package/_assets/{in-app-D9ghiqgG.js → in-app-zOP3CpxE.js} +2 -2
  101. package/_assets/{index-DW-CLfxQ.js → index-1-D6BU9x.js} +4 -4
  102. package/_assets/{index-DHppqXzv.js → index-1m8I0nYf.js} +4 -4
  103. package/_assets/{index-huzzEG0L.js → index-4-bJUtYW.js} +2 -2
  104. package/_assets/{index-D1payCsV.js → index-86IlBHGS.js} +2 -2
  105. package/_assets/{index-PBtGUpoZ.js → index-AK90f_Z8.js} +2 -2
  106. package/_assets/{index-BCdB9ShB.js → index-B-6ihjt-.js} +2 -2
  107. package/_assets/{index-AKpcLSif.js → index-B1yWsG-z.js} +2 -2
  108. package/_assets/{index-DuOEHhlK.js → index-B5NPpBJq.js} +2 -2
  109. package/_assets/{index-rfSc62kZ.js → index-B5ul-OWi.js} +2 -2
  110. package/_assets/{index-DtvQO_7U.js → index-B8EwPucZ.js} +2 -2
  111. package/_assets/{index-C3o_lQSk.js → index-B8xZt7VU.js} +4 -4
  112. package/_assets/{index-BFvKF606.js → index-B8yEZM_9.js} +2 -2
  113. package/_assets/{index-E88hV6Al.js → index-BCDgjSsp.js} +2 -2
  114. package/_assets/{index-Cn5SmOxW.js → index-BFt3kPNj.js} +2 -2
  115. package/_assets/{index-F3k-qHY7.js → index-BKcGGxbI.js} +2 -2
  116. package/_assets/{index-ZO4pH3xU.js → index-BS-24GzM.js} +2 -2
  117. package/_assets/{index-BCod0uqH.js → index-BT4l5EWy.js} +2 -2
  118. package/_assets/{index-C9QCWiG1.js → index-BXUsm9an.js} +2 -2
  119. package/_assets/{index-CbtZbggr.js → index-BZCkq_UI.js} +3 -3
  120. package/_assets/{index-Bx821W-I.js → index-Bi9ki695.js} +2 -2
  121. package/_assets/{index-DDCMggn8.js → index-BiaIJl1N.js} +2 -2
  122. package/_assets/{index-DZMDr6k9.js → index-Blb7F0FK.js} +2 -2
  123. package/_assets/{index-Bw0JD_nV.js → index-Bpp62-y4.js} +2 -2
  124. package/_assets/{index-Ctd946H1.js → index-Bpz4psUB.js} +2 -2
  125. package/_assets/{index-6m17fNUN.js → index-Br04KEGP.js} +2 -2
  126. package/_assets/{index-Dvcz3lbc.js → index-Br6nAZB-.js} +3 -3
  127. package/_assets/{index-CThCH1Vu.js → index-BrZhMvgt.js} +2 -2
  128. package/_assets/{index-D3KCFjKZ.js → index-Bv7QxArc.js} +2 -2
  129. package/_assets/{index-C2lS-O47.js → index-C7b4sS7Z.js} +2 -2
  130. package/_assets/{index-OQUbkX6t.js → index-CBV2AqQH.js} +2 -2
  131. package/_assets/{index-jRpupaJf.js → index-CBVn85RJ.js} +2 -2
  132. package/_assets/{index-BHCW4fZz.js → index-CCSoyBCA.js} +2 -2
  133. package/_assets/{index-DFq0LjMb.js → index-CJn1cpgY.js} +2 -2
  134. package/_assets/{index-CVAGxFe4.js → index-CK88-s-i.js} +2 -2
  135. package/_assets/{index-BPrE1Wyl.js → index-CRBQyQ9q.js} +2 -2
  136. package/_assets/{index-tS0QVzyt.js → index-CSCQ2kwP.js} +2 -2
  137. package/_assets/{index-PFBV00R7.js → index-CX8YKHuf.js} +2 -2
  138. package/_assets/{index-CY18MmeV.js → index-C_HB4ahr.js} +2 -2
  139. package/_assets/{index-DnkyA8CT.js → index-C_VJslp5.js} +2 -2
  140. package/_assets/{index-CUava4Xz.js → index-C_sL8pFk.js} +3 -3
  141. package/_assets/{index-964fbZgz.js → index-CbdI6CX1.js} +2 -2
  142. package/_assets/{index-ry2Z-ef2.js → index-Ct03ng6H.js} +2 -2
  143. package/_assets/{index-CMSsSzuf.js → index-D1I_z6gN.js} +2 -2
  144. package/_assets/{index-COuOPU6r.js → index-D32ueqj8.js} +2 -2
  145. package/_assets/{index-YVPSt5zF.js → index-D4JG8CAh.js} +2 -2
  146. package/_assets/{index-BOI2DlPx.js → index-DAYU9y0r.js} +3 -3
  147. package/_assets/{index-BRO4BD9g.js → index-DCmWo03J.js} +2 -2
  148. package/_assets/{index-CGtS6aQg.js → index-DJ3LyfbX.js} +2 -2
  149. package/_assets/{index-DBS9viZh.js → index-DJrkc2dS.js} +2 -2
  150. package/_assets/{index-DBJPXhFC.js → index-DNVsnZ-O.js} +2 -2
  151. package/_assets/{index-qZW6qzKg.js → index-DOLeL_cr.js} +2 -2
  152. package/_assets/{index-1EgOmJHe.js → index-DUjtSwL_.js} +298 -298
  153. package/_assets/{index-DyteijQE.js → index-DZfuHw2n.js} +2 -2
  154. package/_assets/{index-sXGT0fEx.js → index-Dez4Y2KF.js} +2 -2
  155. package/_assets/{index-B31Q6LLU.js → index-DfO8xDEO.js} +2 -2
  156. package/_assets/{index-CCobXx9C.js → index-DpPVzKxv.js} +2 -2
  157. package/_assets/{index-B7PZ9818.js → index-DxpZUBWq.js} +2 -2
  158. package/_assets/{index-CLVca_cx.js → index-DyLBjpv0.js} +2 -2
  159. package/_assets/{index-C7mNaWT4.js → index-Dz22jxWJ.js} +2 -2
  160. package/_assets/{index-l0f6WtL-.css → index-IUGQhZ87.css} +1 -1
  161. package/_assets/{index-CM_8Imw-.js → index-OIOSLE1Z.js} +2 -2
  162. package/_assets/{index-BEzDdfsT.js → index-RIfBYN9H.js} +2 -2
  163. package/_assets/{index-DNT5Pdsz.js → index-iL1HUt_D.js} +2 -2
  164. package/_assets/{index-DJEHXDcz.js → index-iQHdD0uz.js} +2 -2
  165. package/_assets/{index-C15cl8rG.js → index-jDlHkNRP.js} +2 -2
  166. package/_assets/{index-B2Y4IZZM.js → index-mCvNzJBP.js} +2 -2
  167. package/_assets/{index-C8scG18s.js → index-n_6F7CQW.js} +2 -2
  168. package/_assets/{index-Me5Ss7cs.js → index-xuYw5645.js} +2 -2
  169. package/_assets/{index.es-CzLbuG_R.js → index.es-Bi3x6cHT.js} +2 -2
  170. package/_assets/{index.es-BtaRLNRq.js → index.es-D2Kb2P1G.js} +2 -2
  171. package/_assets/{index.es-D7yJUM8U.js → index.es-DLZBmqpO.js} +5 -5
  172. package/_assets/{index.es-CIP1KZhQ.js → index.es-Dc7sZlng.js} +2 -2
  173. package/_assets/{items-empty-D504E9pZ.js → items-empty-V-xt5G7d.js} +2 -2
  174. package/_assets/jump-CKpYFm1n.js +2 -0
  175. package/_assets/{linkAccount-Bq4BdO_g.js → linkAccount-BK7tMnbx.js} +2 -2
  176. package/_assets/{loader-logo-DHm9Fz1x.js → loader-logo-5OMluQ0u.js} +2 -2
  177. package/_assets/{localBatchGatewayRequest-DO0H9jg2.js → localBatchGatewayRequest-BncFJnmm.js} +2 -2
  178. package/_assets/{modal.styles-phCAh-RK.js → modal.styles-CEn4OgcW.js} +2 -2
  179. package/_assets/{native-DpdCIdZ9.js → native-LKuenQKU.js} +2 -2
  180. package/_assets/{networks-DiV-t6sy.js → networks-UuxxB3Lh.js} +2 -2
  181. package/_assets/{onramp-BzBoOcwf.js → onramp-DYhoiE8h.js} +2 -2
  182. package/_assets/{openzeppelin-CdVyHDTC.js → openzeppelin-CeQYqbvR.js} +2 -2
  183. package/_assets/{ownerOf-rBWO4KbA.js → ownerOf-g8HKzf25.js} +2 -2
  184. package/_assets/{parseNft-e9k4rvgX.js → parseNft-DR55tEaS.js} +3 -3
  185. package/_assets/{parseSignature-BYg8zuZS.js → parseSignature-BG_9mU7V.js} +2 -2
  186. package/_assets/{parseSignature-Bqa7GS0q.js → parseSignature-BcvAJM5n.js} +4 -4
  187. package/_assets/{passkeys-Bg7T_pWl.js → passkeys-BvUdPSto.js} +2 -2
  188. package/_assets/{pay-with-exchange-CcGi8qoF.js → pay-with-exchange-Dq_8qMmz.js} +2 -2
  189. package/_assets/{prepare-contract-call-Bd5IaqJv.js → prepare-contract-call-DLUGZzzc.js} +2 -2
  190. package/_assets/{qr-overlay-CnrTjg-W.js → qr-overlay-B5hijRec.js} +4 -4
  191. package/_assets/{react-GAYayRQl.js → react-C3j5P_ts.js} +2 -2
  192. package/_assets/{receive-CaZeymeR.js → receive-CGipYHNz.js} +2 -2
  193. package/_assets/{resolveImplementation-CPjTUWbf.js → resolveImplementation-Bq0E-Y1O.js} +2 -2
  194. package/_assets/{resume-buy-BCWkfD26.js → resume-buy-BB4z7ZD8.js} +2 -2
  195. package/_assets/{resume-name-D2iyURDh.js → resume-name-B5QsVrB6.js} +2 -2
  196. package/_assets/{rpc-CtXDbwNC.js → rpc-c6CbJ6xJ.js} +2 -2
  197. package/_assets/{sales-empty-B0bB6ZrZ.js → sales-empty-BRPCFt1L.js} +2 -2
  198. package/_assets/{search-empty-B4D-PyPf.js → search-empty-BT8bS_Xc.js} +2 -2
  199. package/_assets/{secp256k1-BXrCGrsa.js → secp256k1-DH3QxFJN.js} +2 -2
  200. package/_assets/{secp256k1-DxH615NV.js → secp256k1-DsK7HgGU.js} +2 -2
  201. package/_assets/{secp256k1-DXy3meif.js → secp256k1-DvkFg-ca.js} +2 -2
  202. package/_assets/{send-Bvz_tZDz.js → send-BtI3Y9mI.js} +2 -2
  203. package/_assets/{send-batch-transaction-DcePwf1v.js → send-batch-transaction-BP3GYANb.js} +2 -2
  204. package/_assets/{send-eip712-transaction-3_u1Rqn3.js → send-eip712-transaction-Dn1EEr_x.js} +3 -3
  205. package/_assets/{send-gasless-transaction-BFHYVjOu.js → send-gasless-transaction-DNsfvw-s.js} +3 -3
  206. package/_assets/{send-transaction-b-xetpVf.js → send-transaction-Dl6LPOzS.js} +3 -3
  207. package/_assets/{sendMetaTransaction-DbLGyE_1.js → sendMetaTransaction-xLF3k6Ym.js} +2 -2
  208. package/_assets/{sendRawTransaction-B4m-fS_W.js → sendRawTransaction-D6SclfHh.js} +4 -4
  209. package/_assets/{sentry-4deLrvth.js → sentry-CZnVtepx.js} +3 -3
  210. package/_assets/{serializeTransaction-07MzRFyy.js → serializeTransaction-CNVqHaCa.js} +2 -2
  211. package/_assets/{session-proposal-BsnbGrPN.js → session-proposal-B5GapO9B.js} +2 -2
  212. package/_assets/{session-request-cpaGraRl.js → session-request-0j2rueRa.js} +3 -3
  213. package/_assets/{sha256-BnYpgrlp.js → sha256-T5FTx4Qa.js} +2 -2
  214. package/_assets/{sha3-CCnQhllF.js → sha3-B5s3u740.js} +2 -2
  215. package/_assets/signin-empty-BDVNgXu7.js +2 -0
  216. package/_assets/{signing-CmyvPUld.js → signing-FmdtOciI.js} +4 -4
  217. package/_assets/{skeleton.styles-yzSbN-Gk.js → skeleton.styles-BIpsIEEn.js} +2 -2
  218. package/_assets/{socials-BQLjDbLx.js → socials-Cusr0-5c.js} +2 -2
  219. package/_assets/{styled-Q069ZeU8.js → styled-B-eID8zT.js} +2 -2
  220. package/_assets/{swaps-BlddI6k2.js → swaps-DAxdEN4n.js} +2 -2
  221. package/_assets/{thirdweb-CKDPEiTM.js → thirdweb-CRM0hhha.js} +4 -4
  222. package/_assets/{to-serializable-transaction-Nalzw-bR.js → to-serializable-transaction-DsLwju2q.js} +3 -3
  223. package/_assets/{totalSupply-wVng3s2B.js → totalSupply-D8KyUNjm.js} +2 -2
  224. package/_assets/{trade-encoding-BDGeQ9-e.js → trade-encoding-CaF5QHJ0.js} +2 -2
  225. package/_assets/{transaction-C80bod8k.js → transaction-BH1-GFGU.js} +2 -2
  226. package/_assets/{transactionReceipt-C-5N5-fG.js → transactionReceipt-B7q55ElN.js} +2 -2
  227. package/_assets/{transactions-cV79gKhp.js → transactions-COPajhle.js} +2 -2
  228. package/_assets/{useInfiniteGrid-g8vNfSL8.js → useInfiniteGrid-CYty5_Jt.js} +2 -2
  229. package/_assets/{useStore-CO_CTl_9.js → useStore-CA4bg9Qg.js} +3 -3
  230. package/_assets/{useTheme-9JrrPVul.js → useTheme-DkPMOr_t.js} +2 -2
  231. package/_assets/{utils-Du6u2Vpn.js → utils-B5A45KJU.js} +2 -2
  232. package/_assets/{verifyHash-DIbONWn9.js → verifyHash-hTG-EOge.js} +2 -2
  233. package/_assets/{w3m-modal-DcepuPKF.js → w3m-modal-LGDYWahK.js} +2 -2
  234. package/_assets/{w3m-modal-4XQZoFWP.js → w3m-modal-VpKiUlgO.js} +2 -2
  235. package/_assets/{wait-for-tx-receipt-DLRdbhOQ.js → wait-for-tx-receipt-B6L5AEsq.js} +2 -2
  236. package/_assets/{wallets-Bd3VJtIk.js → wallets-BmqLO_Z9.js} +6 -6
  237. package/_assets/{web-connector-Cl1UBm_o.js → web-connector-CteOtIx5.js} +4 -4
  238. package/_assets/{writeContract-BcbVJhyd.js → writeContract-BGY6GBpe.js} +2 -2
  239. package/_assets/{zora-sepolia-DAYSPKyC.js → zora-sepolia-C0dXhBjY.js} +2 -2
  240. package/_assets/{zoraTestnet-DLEgtf0y.js → zoraTestnet-BEtUvw81.js} +2 -2
  241. package/index.html +12 -12
  242. package/package.json +2 -2
  243. package/_assets/ItemDetail-Bvjk0t3i.js +0 -3090
  244. package/_assets/collectionPage.styles-DkhpLEcJ.js +0 -41
  245. package/_assets/jump-37CZlC6A.js +0 -2
  246. package/_assets/signin-empty-oqoRoyDC.js +0 -2
@@ -1,3090 +0,0 @@
1
- import{j as e,b as st,r as c,L as Ba,e as Hi,a as _a}from"./react-GAYayRQl.js";import{bi as Gt,c as nt,x as rt,bm as Wa,bn as Ui,X as ft,t as n,by as Qi,bz as Vi,V as et,O as Z,Z as Se,bF as be,bG as Tn,l as ue,bE as cn,bD as Da,i as Gi,C as We,au as Yi,F as _n,d as Ji,E as ht,bl as Zi,G as Xi,bA as es,bB as ts,di as ns,dj as rs,dk as as,dl as is,w as ie,bk as ss,s as r,a,a6 as Yt,aH as Jt,bP as Wn,aI as tt,I as L,z as Pe,p as qa,Y as Zt,c9 as Oa,H as Ue,av as ge,dm as os,n as mt,bd as un,ad as Ka,dn as Mr,cZ as ls,f as Ha,be as ds,bf as cs,dp as us,c8 as ps,dq as hs,bT as xs,dr as fs,ds as ms,k as gs,aj as St,b1 as bs,dt as ys,a9 as ws,du as vs,b3 as js,dv as ks,P as Ua,a0 as Qa,dw as Va,dx as $s,dy as Cs,bb as Ga,dz as Is,bU as Ss,dA as As,dB as Ms,dC as Ps,cb as Ls,A as Rs,dD as pn,$ as Fs,bp as Ts,bq as Es,br as zs,y as Ns,m as Bs,dE as _s,dF as Ws,dG as Ds,dH as qs,dI as Os,aw as Ks,ax as Hs,dJ as Us,B as Qs,dK as Vs,aA as Pr,az as Lr,dL as Gs,dM as Ys,a3 as Js,bx as Zs,dN as Rr,dO as Xs,dP as eo,dQ as to,dR as no,dS as ro,dT as ao,dU as io,dV as so}from"./index-1EgOmJHe.js";import{d as Ae}from"./dcl-schemas-DLwtrFng.js";import{p as oo,e as Fr,i as lo,A as Ya,C as co,b as uo,f as po,g as ho,h as xo,j as fo,m as mo,u as go,t as bo,k as yo,a as wo,s as vo}from"./CollectionCarousel-DFsFQS9I.js";import{d as Tr,t as jo,e as Er,G as ko,c as $o}from"./buy-DkF7GLNy.js";import{c as Co,i as Dn,D as Io,a as So,S as Ao,b as Mo,f as Po}from"./SaleCountdown-Bq7MOyi2.js";import{u as Lo,M as Ro,o as Fo,f as To,b as Eo,l as Ja,c as zo}from"./loader-logo-DHm9Fz1x.js";import{w as zr,M as No,S as Bo,C as _o,H as Wo,a as Do,T as qo,X as Oo,B as Ko,b as Ho,c as Uo,d as Qo,e as Xe,f as Vo,g as Go,h as Yo,i as ut,j as qe,W as _t,m as Wt,n as Dt,o as Jo,v as Zo,L as Za,P as Xa,k as ei,l as ti,E as Xo,F as el,G as Nr,A as tl,p as nl,q as rl,r as al,s as il,t as sl,u as ol,I as Br}from"./CreditPackPicker-qyJshVYl.js";import{P as ll}from"./PaymentMethodStep-C3EnP-eM.js";import{m as dl}from"./mana-matic-light-Bl5duieC.js";import{q as ni,g as ri,t as cl,s as ul,a as _r,b as pl,d as hl,i as xl,e as fl,c as ml}from"./trade-encoding-BDGeQ9-e.js";import{J as gl,p as bl}from"./ethers-CF8fkxgi.js";import{a as yl,w as ai,S as ii,G as si,c as wl}from"./buy-gasless-Chbo9aJs.js";import{R as Wr}from"./resume-buy-BCWkfD26.js";import{a as vl,f as at,i as Vt}from"./errors-Cbpj3VLS.js";import{C as jl}from"./Confetti-Lg8VNdtW.js";import{b as kl,J as $l,a as Cl}from"./jump-37CZlC6A.js";import{p as oi}from"./import-CSRyL2ws.js";import{E as it}from"./ErrorNotice-DVRBkjsp.js";import{L as Dr,M as Il,B as Sl,H as Al,T as Ml,A as Pl}from"./modal.styles-phCAh-RK.js";import{S as Ll}from"./Spinner-Bl4IrHRQ.js";import{I as Rl}from"./IssueModal-dwZQAHzn.js";import{E as Fl}from"./EmotePlaybackBar-gxnuFy7n.js";import{d as Tl}from"./disposePreview-CDy1nnEl.js";import{T as qt}from"./Tooltip-BmJUJCYJ.js";import{c as El}from"./crumbs.styles-BELLHHmP.js";import"./sentry-4deLrvth.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-DbLGyE_1.js";import"./mana-matic-CEqvSwrJ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="87829229-38c5-4ea3-98b3-71dc500e8ace",t._sentryDebugIdIdentifier="sentry-dbid-87829229-38c5-4ea3-98b3-71dc500e8ace")}catch{}})();const li=216n,zl=(1n<<li)-1n;function Nl(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>li).toString(),issuedId:(s&zl).toString()}}function Bl(t){if(!t)return null;try{return Nl(t).itemId}catch{return null}}const di=["cancelled-listings"];function _l(t,s){s&&t.setQueryData(di,d=>d!=null&&d.includes(s)?d:[...d??[],s])}function qr(t,s){var d;if(s)return(d=t.getQueryData(di))!=null&&d.includes(s)?void 0:s}function Or(t,s){return s.kind==="listed"?{...t,isOnSale:!0,listingPrice:s.priceCredits,tradeId:s.tradeId??t.tradeId}:{...t,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function hn(t,s,d){const{address:o,contractAddress:l,tokenId:p}=s;if(!l||!p)return;const x=`${l}-${p}`;t.cancelQueries({queryKey:["owned-token",l,p]}),t.cancelQueries({queryKey:["secondary-sale-state"]}),o&&t.cancelQueries({queryKey:["my-assets",o]});const v=d.kind==="gone";t.setQueriesData({queryKey:["owned-token",l,p]},$=>$&&(v?null:Or($,d)));const g=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:g},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(v){const j=h.items.filter(b=>!(b.contractAddress===l&&b.tokenId===p));return{...h,items:j,total:Math.max(0,h.total-(h.items.length-j.length))}}return{...h,items:h.items.map(j=>j.contractAddress===l&&j.tokenId===p?Or(j,d):j)}})}:$),t.setQueriesData({queryKey:["secondary-sale-state"]},$=>{var j;if(!$)return $;const h={...$};return d.kind==="removed"||d.kind==="gone"?delete h[x]:h[x]={priceCredits:d.priceCredits,tradeId:d.tradeId??((j=h[x])==null?void 0:j.tradeId)??""},h})}function Wl(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}function ci(){const t=new Map,s=new Set,d=new Set,o=new Set;return{submitStarted:l=>{o.add(l)},submitFinished:l=>{o.delete(l)},broadcast:(l,p)=>{const x=t.get(l);x?x.add(p):t.set(l,new Set([p]))},reverted:l=>{s.add(l)},unobservable:l=>{d.add(l)},isInFlight:l=>o.has(l),mayBeConsumed:l=>{if(d.has(l))return!0;const p=t.get(l);if(!p)return!1;for(const x of p)if(!s.has(x))return!0;return!1}}}const Dl=bl("0.05");async function ql(t){try{return(await new gl(nt.rpcUrl).getBalance(t)).gte(Dl)}catch{return!1}}async function Ol(t,s){return Gt(t)?ql(s):!1}function Kl({size:t=64,...s}){return e.jsxs("svg",{viewBox:"0 0 64 64",width:t,height:t,"aria-hidden":!0,...s,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Hl=t=>ts(t.contractAddress,String(t.itemId));async function Kr(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return ns(await rs(t.trade),t.coupon)}catch(d){return s.reportFailure!==!1&&ue(d,{flow:"buy",step:"mana_price"}),null}}function Hr(t){return t.kind==="trade"?t.trade.id:void 0}function Ur(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function En({item:t,onClose:s,resume:d=!1}){const{session:o}=rt(),{data:l}=Wa(o),{data:p}=Ui(o),x=ft(),v=st();async function g(){try{return await x.fetchQuery(es())}catch{return}}async function $(){if(p!=null)return p;if(!o)return 0n;try{const w=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>is(o.address),staleTime:3e4});return le(w),w}catch{return 0n}}const h=Lo().packs.slice(0,Ro),[j,b]=c.useState("loading"),[k,I]=c.useState(null),[C,A]=c.useState(null),[q,M]=c.useState(!1),[y,H]=c.useState(0),[i,K]=c.useState(""),[V,G]=c.useState(t.priceCredits),Y=Math.max(0,V-((l==null?void 0:l.credits)??0)),{packs:ne}=Fo(h,Y),[ee,xe]=c.useState(null),[pe,le]=c.useState(null),W=p??pe??0n,[E,B]=c.useState(!1),[m,re]=c.useState(null),[S,T]=c.useState(0),[z,D]=c.useState(null),[ae,ve]=c.useState(!1),J=c.useRef(null),U=c.useRef(!1),X=c.useRef(ci()),fe=(z==null?void 0:z.credits)??V,je=(l==null?void 0:l.credits)??0;c.useEffect(()=>(U.current=!1,()=>{U.current=!0}),[]);async function ke(w,P,F,R){const O=await $();if(R!=null&&R())return;const te=O>0n,_=te?await Kr(P):null;if(R!=null&&R())return;_!=null?xe(_):te&&B(!0);const De=zr({priceCents:F,priceManaWei:_??0n,balanceCents:(l==null?void 0:l.balanceCents)??0,manaBalanceWei:O}).options.some(Te=>Te.method==="mana"||Te.method==="combined"),ye=w-((l==null?void 0:l.credits)??0),Lt=h.find(Te=>Te.credits>=ye)??h[h.length-1];K(Lt.id),De||Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:w,credits_balance:(l==null?void 0:l.credits)??0,shortfall:Math.max(0,ye)}),b("nofunds")}c.useEffect(()=>{let w=!1;if(!o){b("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const P=await To(t,o.address,Qi,await g(),Hl,Vi);if(P.status==="own")throw new Error("You can't buy your own listing.");if(P.status==="no-price")throw new Error("price unavailable");if(P.status!=="buyable")throw new Error("not for sale");const F=Eo(P.line),R=P.line.usdCents,O=et(R);if(w)return;if(G(O),re(F),T(R),l!=null&&l.credits<O){await ke(O,F,R,()=>w);return}d?ot({sale:F,usdCents:R}):b("ready")}catch(P){if(w)return;Z(be(P)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(P)}),de(P)}})(),()=>{w=!0,J.current&&o&&(gt([J.current]),J.current=null)}},[y]),c.useEffect(()=>{const w=(z==null?void 0:z.sale)??m;if(!w||j!=="ready"&&j!=="nofunds"||W<=0n||ee!==null)return;let P=!1;return Kr(w,{reportFailure:!E}).then(F=>{P||(F!=null?xe(F):B(!0))}),()=>{P=!0}},[j,z,m,W,ee,E]);const Q=zr({priceCents:S,priceManaWei:ee??0n,balanceCents:(l==null?void 0:l.balanceCents)??0,manaBalanceWei:W});async function ot(w){const P=(z==null?void 0:z.sale)??(w==null?void 0:w.sale)??m,F=(z==null?void 0:z.usdCents)??(w==null?void 0:w.usdCents)??S;if(!o||!P||F<=0)return;b("processing"),I(null),ve(!1);let R=z;if(!R)try{const{credit:_,maxCreditedValue:he,usdCents:De}=await Tn(o.identity,F,Hr(P),Ur(t));if(U.current){Le([_.id]);return}J.current=_.id,x.invalidateQueries({queryKey:["usd-balance"]});const ye=et(De);if(R={sale:P,credit:_,maxCreditedValue:he,usdCents:De,credits:ye},D(R),ye!==et(F)){G(ye),T(De),ve(!0),b("ready");return}}catch(_){if(vl(_)){x.invalidateQueries({queryKey:["usd-balance"]}),await ke(et(F),P,F);return}be(_)||ue(_,{flow:"buy",step:"authorize"}),Z(be(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(_)}),I(at(_,n("buyModal.error.generic"),{sale:!0})),b("error");return}if(!R)return;let O=!1,te;try{const _={purchase:oo(R.sale,[R.credit],R.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:he})=>X.current.broadcast(R.credit.id,he),onReverted:({txHash:he})=>{he&&X.current.reverted(he)}};if(X.current.submitStarted(R.credit.id),ni())try{te=await yl(_),X.current.broadcast(R.credit.id,te),await ai(te),O=!0}catch(he){if(he instanceof ii)O=!0;else if(he instanceof si){if(he.reason==="relayer-unreachable")throw X.current.unobservable(R.credit.id),he;if(!Gt(o.providerType))throw he;te=await Tr(_)}else throw te&&X.current.reverted(te),he}else te=await Tr(_)}catch(_){X.current.submitFinished(R.credit.id),be(_)||ue(_,{flow:"buy",step:"submit",gasless:O}),$e([R.credit.id]),J.current=null,Z(be(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(_)}),x.invalidateQueries({queryKey:["usd-balance"]}),de(_);return}X.current.submitFinished(R.credit.id),J.current=null;try{Fr(t.coupon),lo(x,t),Z("Shop Completed Purchase",{...cn([t]),payment_type:"credits",no_crypto_step:O,transaction_hash:te??null})}catch(_){ue(_,{flow:"buy",step:"post_purchase"})}b("complete")}function Le(w){if(!o||w.length===0)return Promise.resolve(!1);const P=w.filter(F=>!X.current.mayBeConsumed(F));return P.length===0?Promise.resolve(!1):Da(o.identity,P).then(()=>!0,()=>!0)}function $e(w){M(!0),Le(w).then(P=>{P||M(!1)})}function gt(w){return Le(w.filter(P=>!X.current.isInFlight(P)))}function At(){Fr(t.coupon),x.invalidateQueries({queryKey:["mana-balance"]}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["detail-trade"]}),x.invalidateQueries({queryKey:["shop-item"]}),x.invalidateQueries({queryKey:["owned-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["public-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),x.invalidateQueries({queryKey:["shop-items"]}),x.invalidateQueries({queryKey:["catalog-items"]}),x.invalidateQueries({queryKey:["my-assets"]}),x.invalidateQueries({queryKey:["purchases"]}),x.invalidateQueries({queryKey:["owned-item-count"]}),x.invalidateQueries({queryKey:["overview-listings"]}),x.invalidateQueries({queryKey:["upsell-listings"]})}async function tn(){var P;const w=(z==null?void 0:z.sale)??m;if(!(!o||!w)){J.current&&($e([J.current]),J.current=null),b("processing"),I(null);try{const F=(P=Br(Q,"mana"))==null?void 0:P.manaWei,R=w.kind==="trade"?await po({trade:w.trade,coupon:w.coupon,buyer:o.address,signer:o.signer,manaWei:F}):await ho({mint:w.mint,buyer:o.address,signer:o.signer,manaWei:F});Z("Shop Completed Purchase",{...cn([t]),payment_type:"mana",transaction_hash:R??null}),At(),b("complete")}catch(F){be(F)||ue(F,{flow:"buy_mana",step:"submit"}),Z(be(F)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(F)}),de(F)}}}async function Mt(){const w=(z==null?void 0:z.sale)??m,P=Br(Q,"combined");if(!o||!w||!P)return;b("processing"),I(null),J.current&&(await Le([J.current])&&M(!0),J.current=null);let F=null,R;try{const{credit:O}=await Tn(o.identity,P.creditsCents,Hr(w),Ur(t));F=O.id,X.current.submitStarted(O.id);const te={buyer:o.address,signer:o.signer,credits:[O],manaGapWei:P.manaWei,providerType:o.providerType,onBroadcast:({txHash:_})=>X.current.broadcast(O.id,_),onReverted:({txHash:_})=>{_&&X.current.reverted(_)},onUnobservable:()=>X.current.unobservable(O.id)};R=w.kind==="trade"?await xo({trade:w.trade,coupon:w.coupon,...te}):await fo({mint:w.mint,...te})}catch(O){F&&X.current.submitFinished(F),F&&$e([F]),be(O)||ue(O,{flow:"buy_credits_and_mana",step:"submit"}),Z(be(O)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(O)}),x.invalidateQueries({queryKey:["usd-balance"]}),de(O);return}F&&X.current.submitFinished(F);try{At(),Z("Shop Completed Purchase",{...cn([t]),payment_type:"credits_and_mana",transaction_hash:R??null})}catch(O){ue(O,{flow:"buy_credits_and_mana",step:"post_purchase"})}b("complete")}async function bt(){if(!(!i||!o)){try{sessionStorage.setItem(Wr,JSON.stringify(t))}catch{}J.current&&(Le([J.current]),J.current=null),D(null),b("loading");try{const w=await zo(i,{address:o.address,identity:o.identity});if(w.url){window.location.href=w.url;return}if(!w.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");v(`/credits?order=${encodeURIComponent(w.orderId)}`)}catch(w){ue(w,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Wr)}catch{}I(n("buyModal.error.creditsCheckout")),b("error")}}}const[Ce,Re]=c.useState(null);function nn(w,P){const{spender:F,chainId:R}=mo(w,P);return ul(R,F)}function de(w){if(I(at(w,n("buyModal.error.generic"),{sale:!0})),b("error"),!Gi(w)||!o)return;const P=w.required;(async()=>{if(await Ol(o.providerType,o.address)){A(P);return}I(n("buyModal.error.relayDownNoRail"))})()}async function lt(w){if(o){A(null);try{await as(o.web3Provider,w)}catch(P){be(P)||ue(P,{flow:"buy",step:"switch_chain"}),A(w);return}yt()}}function Fe(w){w==="mana"?tn():w==="combined"?Mt():ot()}const Ke=c.useRef(!1);async function Ve(w){var P;if(!Ke.current){Ke.current=!0;try{const F=(z==null?void 0:z.sale)??m;if(w==="credits"||!F||!o){Fe(w);return}const R=nn(w,F),O=((P=Q.options.find(_=>_.method===w))==null?void 0:P.manaWei)??0n,te=await ri(R,o.address,O).catch(()=>!0);if(cl(o.providerType,te)){Re({auth:R,rail:w});return}Fe(w)}finally{Ke.current=!1}}}const Ie=Q.options.some(w=>w.method==="mana"||w.method==="combined"),Pt=j==="ready"&&(Ie||Q.manaShortfall!=null)||j==="nofunds"&&Ie;function yt(){I(null),D(null),ve(!1),M(!1),b("loading"),H(w=>w+1)}const wt=j==="error"&&C===null&&(!!J.current||q),Ge=j==="processing",rn=j==="complete"?n("buyModal.titleComplete"):j==="error"?n("cartCheckout.errorTitle"):j==="nofunds"?n("buyModal.titleNoFunds"):n("buyModal.titleBuy");return Ce&&o?e.jsx(Ya,{auth:Ce.auth,signer:o.signer,title:n(Ce.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:n(Ce.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:n(Ce.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:e.jsx("img",{src:dl,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:w}=Ce;Re(null),Fe(w)},onCancel:()=>Re(null),onClose:()=>{Re(null),s()}}):e.jsxs(No,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(Bo,{onClick:Ge?void 0:s,"aria-hidden":!0}),e.jsx(_o,{"data-tall":j==="processing"||j==="loading"||void 0,children:Pt?e.jsx(ll,{asset:{name:t.name,thumb:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null,caption:t.creator?e.jsx(Yi,{address:t.creator}):null},priceCredits:fe,priceCents:S,options:Q.options,priceManaWei:ee??0n,balanceCredits:je,manaBalanceWei:W,onBuy:w=>void Ve(w),onClose:s,busy:Ge,notice:ae?n("buyModal.priceChanged"):l!=null&&l.held?n("buyModal.heldExplainer",{credits:l.held.credits,currency:We.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(Wo,{children:[e.jsxs(Do,{children:[e.jsx(qo,{children:rn}),!Ge&&e.jsx(Oo,{onClick:s,"aria-label":n("buyModal.close"),children:e.jsx(co,{})})]}),e.jsxs(Ko,{children:[e.jsx(Ho,{children:j==="nofunds"?n("buyModal.dclBalance"):n("buyModal.myCreditsBalance")}),e.jsx(Uo,{}),e.jsx(Qo,{children:_n(je)})]})]}),j==="loading"&&e.jsx(Xe,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),j==="error"&&e.jsxs(Xe,{children:[e.jsxs(Vo,{"data-testid":"buy-error",children:[e.jsx(Go,{src:uo,alt:"",width:64,height:80}),e.jsxs(Yo,{children:[e.jsx("b",{children:n("cartCheckout.errorHeadline")})," ",k??(wt?null:n("cartCheckout.errorBody")),wt?e.jsxs(e.Fragment,{children:[k?" ":"",n("cartCheckout.heldLead",{currency:We.name}),e.jsx("b",{children:n("cartCheckout.heldBold")}),n("cartCheckout.heldTail",{currency:We.name})]}):null]})]}),C!==null?e.jsxs(ut,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void lt(C),children:n("buyModal.error.switchAndRetry",{network:Ji(C)})})]}):wt?e.jsx(ut,{children:e.jsx(qe,{"data-variant":"purple","data-full":!0,onClick:s,children:n("cartCheckout.gotIt")})}):e.jsxs(ut,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple",onClick:yt,children:n("cartCheckout.tryAgain")})]})]}),j==="nofunds"&&e.jsxs(Xe,{children:[E&&ee===null&&W>0n?e.jsxs(_t,{"data-testid":"mana-price-unavailable",children:[e.jsx(Wt,{}),e.jsx(Dt,{children:n("buyModal.manaPriceUnavailable")})]}):null,l!=null&&l.held?e.jsxs(_t,{"data-testid":"nofunds-held",children:[e.jsx(Wt,{}),e.jsx(Dt,{children:n("buyModal.heldExplainer",{credits:l.held.credits,currency:We.name})})]}):null,e.jsxs(_t,{children:[e.jsx(Wt,{}),e.jsxs(Dt,{children:[e.jsx("b",{children:n("buyModal.insufficientFunds")})," ",n("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:n("buyModal.warningCreditsAmount",{count:Math.max(1,fe-je)})})," ",n("buyModal.warningToPurchase",{count:1}),ht()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(Jo,{href:Zi("/credits"),target:"_blank",rel:"noopener noreferrer",children:n("buyModal.warningLearnMore")})]})]})]}),e.jsx(Qr,{item:t,priceCredits:fe}),ht()?null:e.jsx(e.Fragment,{children:e.jsx(Zo,{packs:ne,selectedId:i||void 0,onSelect:K})}),e.jsxs(ut,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),ht()?null:e.jsx(qe,{"data-variant":"gradient",onClick:()=>void bt(),children:n("buyModal.buy")})]})]}),j==="ready"&&e.jsxs(Xe,{children:[ae&&e.jsxs(_t,{"data-testid":"price-changed",role:"status",children:[e.jsx(Wt,{}),e.jsx(Dt,{children:n("buyModal.priceChanged")})]}),e.jsx(Qr,{item:t,priceCredits:fe}),e.jsx(ut,{children:e.jsx(qe,{"data-variant":"gradient","data-full":!0,onClick:()=>void ot(),children:n("buyModal.buy")})})]}),j==="processing"&&e.jsxs(Xe,{"data-processing":!0,children:[e.jsx(Za,{src:Ja,alt:"",width:61,height:61}),e.jsx(Xa,{children:d?n("buyModal.completingPurchase"):n("buyModal.completingTransaction")}),e.jsx(ei,{"aria-hidden":!0,children:e.jsx(ti,{})})]}),j==="complete"&&e.jsxs(Xe,{children:[e.jsx(jl,{}),e.jsxs(Xo,{children:[e.jsx(Kl,{}),e.jsxs(el,{children:[e.jsx("b",{children:n("getCredits.successTitle")})," ",n("buyModal.successBody")]})]}),e.jsxs(ut,{"data-stack":!0,children:[e.jsx(qe,{"data-variant":"outline",onClick:()=>v(Xi([t.category])),children:n("buyModal.myAssets")}),ht()?e.jsx(Nr,{"data-variant":"ruby",href:kl([t]),onClick:s,children:n("success.goToBackpack")}):e.jsxs(Nr,{"data-variant":"ruby",href:$l,target:"_blank",rel:"noreferrer",onClick:s,children:[n("buyModal.tryInWorld"),e.jsx(Cl,{})]})]})]})]})})]})}function Qr({item:t,priceCredits:s}){return e.jsxs(tl,{children:[e.jsx(nl,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(rl,{children:[e.jsxs("div",{children:[e.jsx(al,{title:t.name,children:t.name||n("buyModal.itemFallback")}),t.creator?e.jsx(il,{address:t.creator}):null]}),e.jsxs(sl,{children:[e.jsx(ol,{}),e.jsx("span",{children:_n(s)})]})]})]})}function Ul(){const{data:t}=ie({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:ss,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const Ql=r.div`
2
- display: flex;
3
- align-items: center;
4
- gap: 16px;
5
- width: 100%;
6
- max-width: 456px;
7
- `,Vl=r.span`
8
- flex: none;
9
- font-family: ${a.font.sans};
10
- font-size: 18px;
11
- color: ${a.colors.muted};
12
- `,Gl=r.p`
13
- margin: 0;
14
- font-family: ${a.font.sans};
15
- font-size: 13px;
16
- line-height: 1.5;
17
- color: ${a.colors.muted};
18
- text-align: center;
19
- `,Yl=r.p`
20
- margin: 0;
21
- font-family: ${a.font.sans};
22
- font-size: 13px;
23
- line-height: 1.5;
24
- color: ${a.colors.text};
25
- `;function ui(t,s){const[d,o]=c.useState(!1),[l,p]=c.useState(!1),[x,v]=c.useState(null),g=c.useRef(null);c.useEffect(()=>{const h=new AbortController;return g.current=h,()=>h.abort(new DOMException("Modal closed","AbortError"))},[]);async function $(h){if(!t||d)return!0;v(null);try{const j=await t.cancelCurrent({payGas:h,onWaiting:b=>p(b>2e4)});return j!=="ok"?(v(j==="relay-reverted"?"reverted":"pending"),!1):(o(!0),!0)}catch(j){return ue(j,{flow:"edit_price_cancel"}),s(at(j,n("listingEdit.cancelFailed"))),!1}finally{p(!1)}}return{cancelDone:d,slow:l,cancelFailed:x,setCancelFailed:v,cancelCurrent:$,signal:()=>{var h;return(h=g.current)==null?void 0:h.signal}}}function qn({state:t,canPayGas:s,busy:d,onPayGas:o,onLater:l,testId:p="edit-cancel-relay-failed"}){return e.jsxs(Yl,{"data-testid":p,children:[s?t==="reverted"?n("itemDetail.cancelRelayReverted"):n("itemDetail.cancelRelayFailed"):n("itemDetail.cancelRelayRetry"),s?e.jsxs(e.Fragment,{children:[" ",e.jsx(Dr,{type:"button","data-testid":"cancel-pay-gas",onClick:o,disabled:d,children:n("itemDetail.cancelPayGas")}),l?e.jsxs(e.Fragment,{children:[" ",e.jsx(Dr,{type:"button","data-testid":"cancel-later",onClick:l,disabled:d,children:n("itemDetail.cancelLater")})]}):null]}):null]})}function pi({phase:t,managed:s,slow:d}){const l=t==="list"?2:1,p=`listingEdit.${s?"step":"confirm"}${t==="list"?"New":"Removal"}`;return e.jsxs(Xe,{"data-processing":!0,"data-testid":"listing-steps",role:"status","aria-live":"polite",children:[e.jsx(Za,{src:Ja,alt:"",width:61,height:61}),e.jsx(Xa,{children:n(p)}),e.jsxs(Ql,{children:[e.jsx(ei,{"aria-hidden":!0,children:e.jsx(ti,{})}),e.jsxs(Vl,{"data-testid":"listing-steps-count",children:[l,"/",2]})]}),d?e.jsx(Gl,{"data-testid":"listing-steps-slow",children:n("listingEdit.slow")}):null]})}const xn=r.div`
26
- position: fixed;
27
- inset: 0;
28
- z-index: 10000;
29
- display: flex;
30
- align-items: center;
31
- justify-content: center;
32
- padding: 16px;
33
- background: rgba(22, 21, 24, 0.55);
34
- `,fn=r.div`
35
- width: 560px;
36
- max-width: 100%;
37
- max-height: 92vh;
38
- overflow-y: auto;
39
- background: ${a.colors.white};
40
- border-radius: 16px;
41
- padding: 12px 16px 16px;
42
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
43
- display: flex;
44
- flex-direction: column;
45
- gap: 24px;
46
- `,mn=r.div`
47
- display: flex;
48
- align-items: center;
49
- justify-content: space-between;
50
- gap: 8px;
51
- padding-bottom: 16px;
52
- border-bottom: 1px solid ${a.colors.gray4};
53
- `,gn=r.h2`
54
- margin: 0;
55
- font-family: ${a.font.sans};
56
- font-weight: 600;
57
- font-size: 20px;
58
- line-height: 1.6;
59
- color: ${a.colors.text};
60
- `,bn=r.button`
61
- flex: none;
62
- display: grid;
63
- place-items: center;
64
- width: 24px;
65
- height: 24px;
66
- border: 0;
67
- background: none;
68
- cursor: pointer;
69
- color: ${a.colors.text};
70
-
71
- .ico {
72
- width: 18px;
73
- height: 18px;
74
- }
75
- &:disabled {
76
- opacity: 0.4;
77
- cursor: default;
78
- }
79
- &:focus-visible {
80
- outline: 2px solid ${a.colors.accent};
81
- outline-offset: 2px;
82
- }
83
- `,Jl=r.p`
84
- margin: 0;
85
- font-family: ${a.font.sans};
86
- font-size: 14px;
87
- line-height: 1.57;
88
- color: ${a.colors.text};
89
- text-align: left;
90
- `,Zl=r.div`
91
- display: flex;
92
- align-items: center;
93
- gap: 12px;
94
- `,Xl=r.div`
95
- flex: none;
96
- display: grid;
97
- place-items: center;
98
- width: 180px;
99
- height: 180px;
100
- border-radius: 16px;
101
- background: ${a.colors.media};
102
- border: 1px solid ${a.colors.gray4};
103
- overflow: hidden;
104
-
105
- img {
106
- width: 150px;
107
- height: 150px;
108
- object-fit: contain;
109
- filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
110
- }
111
-
112
- ${a.media.maxWidth("mobile")} {
113
- width: 120px;
114
- height: 120px;
115
-
116
- img {
117
- width: 100px;
118
- height: 100px;
119
- }
120
- }
121
- `,ed=r.div`
122
- flex: 1 1 0;
123
- min-width: 0;
124
- display: flex;
125
- flex-direction: column;
126
- gap: 4px;
127
- padding: 8px;
128
- `,td=r.p`
129
- margin: 0;
130
- font-family: ${a.font.sans};
131
- font-weight: 600;
132
- font-size: 20px;
133
- line-height: 1.57;
134
- color: ${a.colors.text};
135
- `,nd=r.p`
136
- margin: 0;
137
- font-family: ${a.font.sans};
138
- font-size: 10px;
139
- line-height: 1.43;
140
- color: ${a.colors.muted};
141
- `,rd=r.div`
142
- display: flex;
143
- gap: 12px;
144
-
145
- ${a.media.maxWidth("mobile")} {
146
- flex-direction: column;
147
- }
148
- `,Vr=r.label`
149
- flex: 1 1 0;
150
- min-width: 0;
151
- display: flex;
152
- flex-direction: column;
153
- gap: 4px;
154
- `,Gr=r.span`
155
- font-family: ${a.font.sans};
156
- font-size: 12px;
157
- color: ${a.colors.muted};
158
- `,ad=r.div`
159
- display: flex;
160
- align-items: center;
161
- justify-content: space-between;
162
- gap: 4px;
163
- height: 42px;
164
- padding: 0 8px;
165
- border: 0.5px solid ${a.colors.text};
166
- border-radius: 8px;
167
- background: ${a.colors.white};
168
-
169
- &:focus-within {
170
- border-color: ${a.colors.magenta};
171
- }
172
- &[aria-invalid='true'] {
173
- border-color: ${a.colors.err};
174
- }
175
-
176
- .ccy {
177
- flex: none;
178
- width: 22px;
179
- height: 22px;
180
- color: ${a.colors.rarity};
181
- }
182
- .cal {
183
- flex: none;
184
- width: 18px;
185
- height: 18px;
186
- color: ${a.colors.text};
187
- }
188
- `,id=r.input`
189
- flex: 1 1 auto;
190
- min-width: 0;
191
- border: 0;
192
- outline: none;
193
- background: transparent;
194
- font-family: ${a.font.sans};
195
- font-size: 13px;
196
- color: ${a.colors.text};
197
-
198
- &::placeholder {
199
- color: ${a.colors.muted2};
200
- }
201
- /* Strip the number spinners — the glyph + USD hint carry the affordance. */
202
- &::-webkit-outer-spin-button,
203
- &::-webkit-inner-spin-button {
204
- -webkit-appearance: none;
205
- margin: 0;
206
- }
207
- &[type='number'] {
208
- -moz-appearance: textfield;
209
- appearance: textfield;
210
- }
211
- `,sd=r.span`
212
- flex: none;
213
- font-family: ${a.font.sans};
214
- font-size: 10px;
215
- color: ${a.colors.muted2};
216
- `,od=r.div`
217
- .react-datepicker-wrapper {
218
- display: block;
219
- width: 100%;
220
- }
221
- .react-datepicker__input-container {
222
- display: flex;
223
- align-items: center;
224
- }
225
- .react-datepicker__input-container input {
226
- width: 100%;
227
- height: 42px;
228
- padding: 0 8px;
229
- border: 0.5px solid ${a.colors.text};
230
- border-radius: 8px;
231
- background: ${a.colors.white};
232
- font-family: ${a.font.sans};
233
- font-size: 13px;
234
- color: ${a.colors.text};
235
- outline: none;
236
- }
237
- .react-datepicker__input-container input:focus {
238
- border-color: ${a.colors.magenta};
239
- }
240
- &[data-invalid='true'] .react-datepicker__input-container input {
241
- border-color: ${a.colors.err};
242
- }
243
- /* The showIcon calendar glyph inside the field. */
244
- .react-datepicker__calendar-icon {
245
- fill: ${a.colors.text};
246
- opacity: 0.85;
247
- }
248
-
249
- ${Co}
250
- `,ld=r.button`
251
- width: 100%;
252
- height: 48px;
253
- border: 0;
254
- border-radius: 16px;
255
- cursor: pointer;
256
- background: ${a.colors.accent};
257
- color: ${a.colors.white};
258
- font-family: ${a.font.sans};
259
- font-weight: 600;
260
- font-size: 15px;
261
- line-height: 24px;
262
- letter-spacing: 0.46px;
263
- text-transform: uppercase;
264
-
265
- &:hover:not(:disabled) {
266
- background: ${a.colors.accentHover};
267
- }
268
- &:focus-visible {
269
- outline: 2px solid ${a.colors.accent};
270
- outline-offset: 2px;
271
- }
272
- &:disabled {
273
- cursor: not-allowed;
274
- background: rgba(105, 31, 169, 0.2);
275
- color: ${a.colors.white};
276
- }
277
- `;r.p`
278
- margin: 0;
279
- font-family: ${a.font.sans};
280
- font-size: 13px;
281
- color: ${a.colors.muted};
282
- text-align: center;
283
- `;const dd=r.p`
284
- margin: 0;
285
- font-family: ${a.font.sans};
286
- font-size: 12px;
287
- line-height: 1.5;
288
- color: ${a.colors.muted};
289
- `,cd=r.div`
290
- display: flex;
291
- flex-direction: column;
292
- align-items: center;
293
- gap: 16px;
294
- padding: 24px 16px;
295
- border-radius: 16px;
296
- background: rgba(193, 238, 207, 0.5);
297
- text-align: center;
298
- `,ud=r.div`
299
- display: grid;
300
- place-items: center;
301
- width: 64px;
302
- height: 64px;
303
- border-radius: 50%;
304
- background: ${a.colors.ok};
305
- color: ${a.colors.white};
306
-
307
- .ico {
308
- width: 34px;
309
- height: 34px;
310
- }
311
- `,pd=r.p`
312
- margin: 0;
313
- font-family: ${a.font.sans};
314
- font-size: 20px;
315
- line-height: 1.334;
316
- color: ${a.colors.text2};
317
-
318
- b {
319
- font-weight: 700;
320
- }
321
- `,hd=r.div`
322
- display: flex;
323
- gap: 12px;
324
-
325
- ${a.media.maxWidth("mobile")} {
326
- flex-direction: column-reverse;
327
- }
328
- `,xd=r.button`
329
- flex: 1 1 0;
330
- height: 48px;
331
- border: 2px solid ${a.colors.accent};
332
- border-radius: 12px;
333
- background: transparent;
334
- color: ${a.colors.accent};
335
- cursor: pointer;
336
- font-family: ${a.font.sans};
337
- font-weight: 600;
338
- font-size: 13px;
339
- line-height: 24px;
340
- letter-spacing: 0.46px;
341
- text-transform: uppercase;
342
-
343
- &:hover {
344
- background: rgba(105, 31, 169, 0.06);
345
- }
346
- &:focus-visible {
347
- outline: 2px solid ${a.colors.accent};
348
- outline-offset: 2px;
349
- }
350
- `,fd=r.button`
351
- flex: 1 1 0;
352
- height: 48px;
353
- border: 0;
354
- border-radius: 12px;
355
- background: ${a.colors.accent};
356
- color: ${a.colors.softWhite};
357
- cursor: pointer;
358
- font-family: ${a.font.sans};
359
- font-weight: 600;
360
- font-size: 13px;
361
- line-height: 24px;
362
- letter-spacing: 0.46px;
363
- text-transform: uppercase;
364
-
365
- &:hover {
366
- background: ${a.colors.accentHover};
367
- }
368
- &:focus-visible {
369
- outline: 2px solid ${a.colors.accent};
370
- outline-offset: 2px;
371
- }
372
- `,md=30;function Yr(t){const s=new Date;return s.setHours(0,0,0,0),s.setDate(s.getDate()+t),s}function gd({asset:t,session:s,creator:d,edit:o,onListed:l,onClose:p}){const x=ft(),v=st(),g=Ul(),{data:$}=ie({queryKey:["collection-meta",t.contractAddress],enabled:!d&&!!t.contractAddress,staleTime:5*6e4,queryFn:()=>Oa(t.contractAddress)}),h=d||($==null?void 0:$.creator),{data:j}=Yt(h),b=h?j!=null&&j.name?Jt(j.name):Wn(h):null,[k,I]=c.useState(o!=null&&o.currentCredits?String(o.currentCredits):"10"),[C,A]=c.useState(()=>Yr(md)),[q,M]=c.useState(null),[y,H]=c.useState(!1),[i,K]=c.useState(null),[V,G]=c.useState("form"),Y=c.useRef({}),{cancelDone:ne,slow:ee,cancelFailed:xe,setCancelFailed:pe,cancelCurrent:le,signal:W}=ui(o,M),E=Dn(s),B=Number(k),m=Number.isInteger(B)&&B>0,re=!!o&&!ne&&B===o.currentCredits,S=C?C.getTime():NaN,T=!!C&&S>Date.now(),z=Yr(1),D=m?`$${tt(B).toFixed(2)}`:"$0";async function ae(U={}){if(M(null),!m){M(n("sellModal.errorWholeNumber"));return}if(!T){M(n("sellModal.invalidDate"));return}if(!E){H(!0);try{const X=_r(t.contractAddress,t.chainId),fe=await ri(X,s.address);if(H(!1),!fe){Y.current=U,G("authorize");return}}catch{H(!1)}}await ve(U)}async function ve(U={}){var X,fe;if(M(null),!m){M(n("sellModal.errorWholeNumber"));return}if(!T){M(n("sellModal.invalidDate"));return}H(!0);try{if(!await le(U.payGas))return;await pl({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId});const je=await hl({signer:s.signer,nft:{contractAddress:t.contractAddress,tokenId:t.tokenId,network:t.network,chainId:t.chainId},usdPrice:tt(B),expiresAtMs:S}),ke=await(o?oi(je,s.identity,{signal:W()}):qa(je,s.identity));(X=W())==null||X.throwIfAborted(),K(B),Z("Shop Listed Item",{item_id:t.itemId??t.tokenId??null,contract_address:t.contractAddress,price_credits:B,price_usd:tt(B),listing_type:"secondary",is_primary:!1}),Zt.success(n(o?"listingEdit.toastUpdated":"sellModal.toastOnSale",{name:t.name})),x.invalidateQueries({queryKey:["my-assets",s.address]}),l==null||l(B,ke.id)}catch(je){if((fe=W())!=null&&fe.aborted)return;ue(je,{flow:"list_secondary"}),Z("Shop Listing Failed",{listing_type:"secondary",error_code:Se(je)}),M(at(je,n(o?"listingEdit.listFailedAfterCancel":"sellModal.errorGeneric")))}finally{H(!1)}}function J(){p(),v("/my-items")}return i!==null?e.jsx(xn,{onClick:p,role:"presentation",children:e.jsxs(fn,{onClick:U=>U.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(o?"listingEdit.successHeader":"sellModal.successHeader"),children:[e.jsxs(mn,{children:[e.jsx(gn,{children:n(o?"listingEdit.successHeader":"sellModal.successHeader")}),e.jsx(bn,{onClick:p,"aria-label":n("getCredits.done"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(cd,{children:[e.jsx(ud,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsxs(pd,{children:[e.jsx("b",{children:n(o?"listingEdit.successBody":"sellModal.successOnSale")})," ",n("sellModal.successManage")]})]}),e.jsxs(hd,{children:[e.jsx(xd,{onClick:J,children:n("sellModal.myItems")}),e.jsx(fd,{onClick:p,children:n("getCredits.done")})]})]})}):V==="authorize"?e.jsx(Ya,{auth:_r(t.contractAddress,t.chainId),signer:s.signer,title:n("authorizeStep.sellTitle"),name:t.name,image:t.image,icon:e.jsx(L,{name:"pen",className:"ico"}),reason:n("authorizeStep.sellReason",{name:t.name}),onAuthorized:()=>{G("form"),ve(Y.current)},onCancel:()=>G("form"),onClose:p}):o&&y?e.jsx(xn,{role:"presentation",children:e.jsxs(fn,{onClick:U=>U.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(mn,{children:[e.jsx(gn,{children:n("listingEdit.title")}),e.jsx(bn,{disabled:!0,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(pi,{phase:ne?"list":"cancel",managed:E,slow:ee})]})}):e.jsx(xn,{onClick:y?void 0:p,role:"presentation",children:e.jsxs(fn,{"data-testid":"modal",onClick:U=>U.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(o?"listingEdit.title":"sellModal.sellProduct"),children:[e.jsxs(mn,{children:[e.jsx(gn,{children:n(o?"listingEdit.title":"sellModal.sellProduct")}),e.jsx(bn,{onClick:p,disabled:y,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(Jl,{children:n(o?"listingEdit.subtitle":"sellModal.subtitle")}),e.jsxs(Zl,{children:[e.jsx(Xl,{children:t.image?e.jsx("img",{src:t.image,alt:""}):null}),e.jsxs(ed,{children:[e.jsx(td,{children:t.name}),b?e.jsx(nd,{children:n("sellModal.byCreator",{name:b})}):null]})]}),e.jsxs(rd,{children:[e.jsxs(Vr,{children:[e.jsx(Gr,{children:n("sellModal.priceShort")}),e.jsxs(ad,{"aria-invalid":k.length>0&&!m,children:[e.jsx(Pe,{className:"ccy"}),e.jsx(id,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:k,onChange:U=>I(U.target.value),disabled:y,"aria-label":n("sellModal.priceLabel",{currency:"credits"})}),e.jsx(sd,{"aria-hidden":!0,children:D})]})]}),e.jsxs(Vr,{children:[e.jsx(Gr,{children:n("sellModal.expirationLabel")}),e.jsx(od,{"data-invalid":!!C&&!T,children:e.jsx(Io,{selected:C,onChange:A,minDate:z,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:y,showIcon:!0,showPopperArrow:!1,todayButton:n("sellModal.today"),ariaLabelledBy:void 0,"aria-label":n("sellModal.expirationLabel")})})]})]}),g&&m?e.jsx(dd,{children:n("sellModal.proceedsCredits",{count:B})}):null,xe?e.jsx(qn,{state:xe,canPayGas:!!(o!=null&&o.canPayGas),busy:y,onPayGas:()=>void ae({payGas:!0}),onLater:()=>pe(null)}):null,e.jsx(it,{message:q}),e.jsx(ld,{onClick:()=>void ae(),disabled:y||re||xe==="pending"||!m||!T,"data-testid":"list-submit",children:o?n(ne?"sellModal.putUpForSale":"listingEdit.submit"):y?E?n("sellModal.puttingOnSale"):n("sellModal.confirmListing"):n("sellModal.putUpForSale")})]})})}const bd=r.div`
373
- position: fixed;
374
- inset: 0;
375
- z-index: 10000;
376
- display: flex;
377
- align-items: center;
378
- justify-content: center;
379
- padding: 16px;
380
- background: rgba(22, 21, 24, 0.55);
381
- `,yd=r.div`
382
- width: 560px;
383
- max-width: 100%;
384
- max-height: 92vh;
385
- overflow-y: auto;
386
- background: ${a.colors.white};
387
- border-radius: 16px;
388
- padding: 12px 16px 16px;
389
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
390
- display: flex;
391
- flex-direction: column;
392
- gap: 24px;
393
-
394
- ${a.media.maxWidth("mobile")} {
395
- padding: 12px 16px 16px;
396
- }
397
- `,wd=r.div`
398
- display: flex;
399
- flex-direction: column;
400
- gap: 4px;
401
- padding-bottom: 16px;
402
- border-bottom: 1px solid ${a.colors.gray4};
403
- `,vd=r.div`
404
- display: flex;
405
- align-items: center;
406
- justify-content: space-between;
407
- gap: 8px;
408
- `,jd=r.h2`
409
- margin: 0;
410
- font-family: ${a.font.sans};
411
- font-weight: 600;
412
- font-size: 20px;
413
- line-height: 1.6;
414
- color: ${a.colors.text};
415
- `,kd=r.button`
416
- flex: none;
417
- display: grid;
418
- place-items: center;
419
- width: 24px;
420
- height: 24px;
421
- border: 0;
422
- background: none;
423
- cursor: pointer;
424
- color: ${a.colors.text};
425
-
426
- .ico {
427
- width: 18px;
428
- height: 18px;
429
- }
430
- &:disabled {
431
- opacity: 0.4;
432
- cursor: default;
433
- }
434
- &:focus-visible {
435
- outline: 2px solid ${a.colors.accent};
436
- outline-offset: 2px;
437
- }
438
- `,$d=r.div`
439
- display: flex;
440
- align-items: center;
441
- gap: 12px;
442
- `,Cd=r.img`
443
- flex: none;
444
- width: 72px;
445
- height: 72px;
446
- border-radius: 12px;
447
- object-fit: cover;
448
- background: ${a.colors.media};
449
- `,Id=r.p`
450
- margin: 0;
451
- font-family: ${a.font.sans};
452
- font-weight: 600;
453
- font-size: 18px;
454
- line-height: 1.4;
455
- color: ${a.colors.text};
456
- `,Sd=r.label`
457
- display: flex;
458
- flex-direction: column;
459
- gap: 6px;
460
- `,Ad=r.span`
461
- font-family: ${a.font.sans};
462
- font-size: 12px;
463
- color: ${a.colors.muted};
464
- `,Md=r.input`
465
- width: 100%;
466
- height: 44px;
467
- padding: 0 12px;
468
- border: 1px solid ${a.colors.text};
469
- border-radius: 8px;
470
- background: ${a.colors.white};
471
- font-family: ${a.font.sans};
472
- font-size: 14px;
473
- color: ${a.colors.text};
474
-
475
- &::placeholder {
476
- color: ${a.colors.muted2};
477
- }
478
- &:focus-visible {
479
- outline: none;
480
- border-color: ${a.colors.magenta};
481
- }
482
- &[aria-invalid='true'] {
483
- border-color: ${a.colors.err};
484
- }
485
- &:disabled {
486
- opacity: 0.6;
487
- }
488
- `,Pd=r.p`
489
- margin: 0;
490
- padding: 12px 14px;
491
- border-radius: 10px;
492
- background: rgba(255, 45, 85, 0.1);
493
- font-family: ${a.font.sans};
494
- font-size: 13px;
495
- line-height: 1.5;
496
- color: ${a.colors.text2};
497
- `,Jr=r.div`
498
- display: flex;
499
- gap: 12px;
500
-
501
- ${a.media.maxWidth("mobile")} {
502
- flex-direction: column-reverse;
503
- }
504
- `,Ld=r.button`
505
- flex: 1;
506
- height: 48px;
507
- border: 2px solid ${a.colors.blackBtn};
508
- border-radius: 16px;
509
- background: transparent;
510
- color: ${a.colors.text};
511
- cursor: pointer;
512
- font-family: ${a.font.sans};
513
- font-weight: 600;
514
- font-size: 15px;
515
- line-height: 24px;
516
- letter-spacing: 0.46px;
517
- text-transform: uppercase;
518
-
519
- &:hover:not(:disabled) {
520
- background: rgba(36, 33, 41, 0.06);
521
- }
522
- &:focus-visible {
523
- outline: 2px solid ${a.colors.accent};
524
- outline-offset: 2px;
525
- }
526
- &:disabled {
527
- opacity: 0.5;
528
- cursor: default;
529
- }
530
- `,Zr=r.button`
531
- flex: 1;
532
- display: inline-flex;
533
- align-items: center;
534
- justify-content: center;
535
- gap: 8px;
536
- height: 48px;
537
- border: 0;
538
- border-radius: 16px;
539
- background: ${a.colors.blackBtn};
540
- color: ${a.colors.softWhite};
541
- cursor: pointer;
542
- font-family: ${a.font.sans};
543
- font-weight: 600;
544
- font-size: 15px;
545
- line-height: 24px;
546
- letter-spacing: 0.46px;
547
- text-transform: uppercase;
548
-
549
- &:hover:not(:disabled) {
550
- filter: brightness(1.35);
551
- }
552
- &:focus-visible {
553
- outline: 2px solid ${a.colors.accent};
554
- outline-offset: 2px;
555
- }
556
- &:disabled {
557
- opacity: 0.55;
558
- cursor: default;
559
- }
560
- `,Rd=r.div`
561
- display: flex;
562
- flex-direction: column;
563
- align-items: center;
564
- gap: 16px;
565
- padding: 24px 16px;
566
- border-radius: 16px;
567
- background: rgba(193, 238, 207, 0.5);
568
- text-align: center;
569
- `,Fd=r.div`
570
- display: grid;
571
- place-items: center;
572
- width: 64px;
573
- height: 64px;
574
- border-radius: 50%;
575
- background: ${a.colors.ok};
576
- color: ${a.colors.white};
577
-
578
- .ico {
579
- width: 34px;
580
- height: 34px;
581
- }
582
- `,Td=r.p`
583
- margin: 0;
584
- font-family: ${a.font.sans};
585
- font-size: 16px;
586
- line-height: 1.34;
587
- color: ${a.colors.text2};
588
-
589
- b {
590
- font-weight: 700;
591
- }
592
- `;function Ed(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function zd({item:t,session:s,onClose:d,onTransferred:o}){const[l,p]=c.useState(""),[x,v]=c.useState(!1),[g,$]=c.useState(null),[h,j]=c.useState(!1),b=l.trim(),k=Ed(b),I=k&&b.toLowerCase()===s.address.toLowerCase(),C=b.length===0?null:k?I?n("transfer.selfAddress"):null:n("transfer.invalidAddress"),A=k&&!I&&!x;async function q(){if(A){$(null),v(!0);try{await jo({contractAddress:t.contractAddress,chainId:t.chainId,tokenId:t.tokenId,to:b,signer:s.signer}),Z("Shop Transferred Item",{contract_address:t.contractAddress,token_id:t.tokenId}),j(!0),Zt.success(n("transfer.toastSuccess",{name:t.name})),o==null||o()}catch(M){Vt(M)||ue(M,{flow:"transfer-item",tokenId:t.tokenId}),Z("Shop Transfer Failed",{error_code:Se(M)}),$(Vt(M)?n("getCredits.errorCanceled"):at(M,n("transfer.errorGeneric")))}finally{v(!1)}}}return e.jsx(bd,{onClick:x?void 0:d,role:"presentation",children:e.jsxs(yd,{onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("transfer.title"),children:[e.jsx(wd,{children:e.jsxs(vd,{children:[e.jsx(jd,{children:n("transfer.title")}),e.jsx(kd,{onClick:d,disabled:x,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]})}),h?e.jsxs(e.Fragment,{children:[e.jsxs(Rd,{children:[e.jsx(Fd,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(Td,{children:n("transfer.successBody",{name:t.name})})]}),e.jsx(Jr,{children:e.jsx(Zr,{onClick:d,children:n("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs($d,{children:[t.thumbnail?e.jsx(Cd,{src:t.thumbnail,alt:""}):null,e.jsx(Id,{children:t.name})]}),e.jsxs(Sd,{children:[e.jsx(Ad,{children:n("transfer.addressLabel")}),e.jsx(Md,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:l,onChange:M=>p(M.target.value),disabled:x,"aria-invalid":!!C,"aria-label":n("transfer.addressLabel")}),C?e.jsx(it,{message:C}):null]}),e.jsx(Pd,{children:n("transfer.warning")}),e.jsx(it,{message:g}),e.jsxs(Jr,{children:[e.jsx(Ld,{onClick:d,disabled:x,children:n("sellModal.cancel")}),e.jsx(Zr,{onClick:()=>void q(),disabled:!A,children:x?n("transfer.transferring"):n("transfer.transfer")})]})]})]})})}const Nd=r(Il)`
593
- width: min(500px, 92vw);
594
- gap: 20px;
595
-
596
- ${a.media.maxWidth("mobile")} {
597
- [data-actions] {
598
- flex-direction: column-reverse;
599
- }
600
- [data-actions] > * {
601
- width: 100%;
602
- }
603
- }
604
- `,Bd=r(Ue)`
605
- background: ${a.colors.accent};
606
- color: ${a.colors.white};
607
- text-transform: uppercase;
608
- letter-spacing: 0.046em;
609
- font-size: 13px;
610
-
611
- &:hover:not(:disabled) {
612
- background: ${a.colors.accentHover};
613
- }
614
- `;function _d({name:t,managed:s,canPayGas:d,cancel:o,onClose:l}){const[p,x]=c.useState(!1),[v,g]=c.useState(!1),[$,h]=c.useState(null),[j,b]=c.useState(null);async function k(I){h(null),b(null),x(!0);try{const C=await o({payGas:I,onWaiting:A=>g(A>2e4)});C==="ok"?l():b(C==="relay-reverted"?"reverted":"pending")}catch(C){const A=Vt(C);A||ue(C,{flow:"remove-listing"});const q=n("myAssets.removeListingError");h(s?q:A?n("getCredits.errorCanceled"):at(C,q))}finally{x(!1),g(!1)}}return e.jsx(Sl,{onClick:p?void 0:l,role:"presentation",children:e.jsxs(Nd,{onClick:I=>I.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("removeListing.title"),"data-testid":"remove-listing-modal",children:[e.jsx(Al,{children:e.jsx(Ml,{children:n("removeListing.title")})}),e.jsx("p",{className:"muted",style:{margin:0},children:n("removeListing.body",{name:t})}),p&&v?e.jsx("p",{className:"muted small",style:{margin:0},"data-testid":"cancel-slow",children:n(d?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")}):null,j?e.jsx(qn,{state:j,canPayGas:d,busy:p,onPayGas:()=>void k(!0),testId:"cancel-gasless-failed"}):null,e.jsx(it,{message:$}),e.jsxs(Pl,{"data-actions":!0,children:[e.jsx(Ue,{variant:"outline",onClick:l,disabled:p,children:n("sellModal.cancel")}),e.jsx(Bd,{onClick:()=>void k(),disabled:p||j==="pending","data-testid":"remove-confirm",children:p?e.jsx(Ll,{size:"small"}):n("itemDetail.manageRemove")})]})]})})}const yn=r.div`
615
- position: fixed;
616
- inset: 0;
617
- z-index: 10000;
618
- display: flex;
619
- align-items: center;
620
- justify-content: center;
621
- padding: 16px;
622
- background: rgba(22, 21, 24, 0.55);
623
- `,wn=r.div`
624
- width: 560px;
625
- max-width: 100%;
626
- max-height: 92vh;
627
- overflow-y: auto;
628
- background: ${a.colors.white};
629
- border-radius: 16px;
630
- padding: 12px 16px 16px;
631
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
632
- display: flex;
633
- flex-direction: column;
634
- gap: 24px;
635
- `,vn=r.div`
636
- display: flex;
637
- align-items: center;
638
- justify-content: space-between;
639
- gap: 8px;
640
- padding-bottom: 16px;
641
- border-bottom: 1px solid ${a.colors.gray4};
642
- `,jn=r.h2`
643
- margin: 0;
644
- font-family: ${a.font.sans};
645
- font-weight: 600;
646
- font-size: 20px;
647
- line-height: 1.6;
648
- color: ${a.colors.text};
649
- `,kn=r.button`
650
- flex: none;
651
- display: grid;
652
- place-items: center;
653
- width: 24px;
654
- height: 24px;
655
- border: 0;
656
- background: none;
657
- cursor: pointer;
658
- color: ${a.colors.text};
659
-
660
- .ico {
661
- width: 18px;
662
- height: 18px;
663
- }
664
- &:disabled {
665
- opacity: 0.4;
666
- cursor: default;
667
- }
668
- &:focus-visible {
669
- outline: 2px solid ${a.colors.accent};
670
- outline-offset: 2px;
671
- }
672
- `,Wd=r.p`
673
- margin: 0;
674
- font-family: ${a.font.sans};
675
- font-size: 14px;
676
- line-height: 1.57;
677
- color: ${a.colors.text};
678
- text-align: left;
679
- `,Dd=r.div`
680
- display: flex;
681
- align-items: center;
682
- gap: 12px;
683
- `,qd=r.div`
684
- flex: none;
685
- display: grid;
686
- place-items: center;
687
- width: 180px;
688
- height: 180px;
689
- border-radius: 16px;
690
- background: ${a.colors.media};
691
- border: 1px solid ${a.colors.gray4};
692
- overflow: hidden;
693
-
694
- img {
695
- width: 150px;
696
- height: 150px;
697
- object-fit: contain;
698
- filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
699
- }
700
-
701
- ${a.media.maxWidth("mobile")} {
702
- width: 120px;
703
- height: 120px;
704
-
705
- img {
706
- width: 100px;
707
- height: 100px;
708
- }
709
- }
710
- `,Od=r.div`
711
- flex: 1 1 0;
712
- min-width: 0;
713
- display: flex;
714
- flex-direction: column;
715
- gap: 4px;
716
- padding: 8px;
717
- `,Kd=r.p`
718
- margin: 0;
719
- font-family: ${a.font.sans};
720
- font-weight: 600;
721
- font-size: 20px;
722
- line-height: 1.57;
723
- color: ${a.colors.text};
724
- `,Hd=r.p`
725
- margin: 0;
726
- font-family: ${a.font.sans};
727
- font-size: 10px;
728
- line-height: 1.43;
729
- color: ${a.colors.muted};
730
- `,Ud=r.label`
731
- display: flex;
732
- flex-direction: column;
733
- gap: 4px;
734
- `,Qd=r.span`
735
- font-family: ${a.font.sans};
736
- font-size: 12px;
737
- color: ${a.colors.muted};
738
- `,Vd=r.div`
739
- display: flex;
740
- align-items: center;
741
- justify-content: space-between;
742
- gap: 4px;
743
- height: 42px;
744
- padding: 0 8px;
745
- border: 0.5px solid ${a.colors.text};
746
- border-radius: 8px;
747
- background: ${a.colors.white};
748
-
749
- &:focus-within {
750
- border-color: ${a.colors.magenta};
751
- }
752
- &[aria-invalid='true'] {
753
- border-color: ${a.colors.err};
754
- }
755
-
756
- .ccy {
757
- flex: none;
758
- width: 22px;
759
- height: 22px;
760
- color: ${a.colors.rarity};
761
- }
762
- `,Gd=r.input`
763
- flex: 1 1 auto;
764
- min-width: 0;
765
- border: 0;
766
- outline: none;
767
- background: transparent;
768
- font-family: ${a.font.sans};
769
- font-size: 13px;
770
- color: ${a.colors.text};
771
-
772
- &::placeholder {
773
- color: ${a.colors.muted2};
774
- }
775
- /* Strip the number spinners — the glyph + USD hint carry the affordance. */
776
- &::-webkit-outer-spin-button,
777
- &::-webkit-inner-spin-button {
778
- -webkit-appearance: none;
779
- margin: 0;
780
- }
781
- &[type='number'] {
782
- -moz-appearance: textfield;
783
- appearance: textfield;
784
- }
785
- `,Yd=r.span`
786
- flex: none;
787
- font-family: ${a.font.sans};
788
- font-size: 10px;
789
- color: ${a.colors.muted2};
790
- `,Ot=r.p`
791
- margin: 0;
792
- font-family: ${a.font.sans};
793
- font-size: 12px;
794
- line-height: 1.5;
795
- color: ${a.colors.muted};
796
- `,Jd=r.button`
797
- width: 100%;
798
- height: 48px;
799
- border: 0;
800
- border-radius: 16px;
801
- cursor: pointer;
802
- background: ${a.colors.accent};
803
- color: ${a.colors.white};
804
- font-family: ${a.font.sans};
805
- font-weight: 600;
806
- font-size: 15px;
807
- line-height: 24px;
808
- letter-spacing: 0.46px;
809
- text-transform: uppercase;
810
-
811
- &:hover:not(:disabled) {
812
- background: ${a.colors.accentHover};
813
- }
814
- &:focus-visible {
815
- outline: 2px solid ${a.colors.accent};
816
- outline-offset: 2px;
817
- }
818
- &:disabled {
819
- cursor: not-allowed;
820
- background: rgba(105, 31, 169, 0.2);
821
- color: ${a.colors.white};
822
- }
823
- `,Zd=r.p`
824
- margin: 0;
825
- font-family: ${a.font.sans};
826
- font-size: 13px;
827
- color: ${a.colors.muted};
828
- text-align: center;
829
- `,Xd=r.div`
830
- display: flex;
831
- flex-direction: column;
832
- align-items: center;
833
- gap: 16px;
834
- padding: 24px 16px;
835
- border-radius: 16px;
836
- background: rgba(193, 238, 207, 0.5);
837
- text-align: center;
838
- `,ec=r.div`
839
- display: grid;
840
- place-items: center;
841
- width: 64px;
842
- height: 64px;
843
- border-radius: 50%;
844
- background: ${a.colors.ok};
845
- color: ${a.colors.white};
846
-
847
- .ico {
848
- width: 34px;
849
- height: 34px;
850
- }
851
- `,tc=r.p`
852
- margin: 0;
853
- font-family: ${a.font.sans};
854
- font-size: 20px;
855
- line-height: 1.334;
856
- color: ${a.colors.text2};
857
-
858
- b {
859
- font-weight: 700;
860
- }
861
- `,nc=r.p`
862
- margin: 0;
863
- display: inline-flex;
864
- align-items: center;
865
- gap: 4px;
866
- font-family: ${a.font.sans};
867
- font-size: 14px;
868
- line-height: 1.43;
869
- color: ${a.colors.text2};
870
-
871
- strong {
872
- display: inline-flex;
873
- align-items: center;
874
- gap: 4px;
875
- font-weight: 700;
876
- }
877
- .ccy-mark {
878
- width: 18px;
879
- height: 18px;
880
- color: ${a.colors.rarity};
881
- }
882
- `,rc=r.div`
883
- display: flex;
884
- gap: 12px;
885
-
886
- ${a.media.maxWidth("mobile")} {
887
- flex-direction: column-reverse;
888
- }
889
- `,ac=r.button`
890
- flex: 1 1 0;
891
- height: 48px;
892
- border: 2px solid ${a.colors.accent};
893
- border-radius: 12px;
894
- background: transparent;
895
- color: ${a.colors.accent};
896
- cursor: pointer;
897
- font-family: ${a.font.sans};
898
- font-weight: 600;
899
- font-size: 13px;
900
- line-height: 24px;
901
- letter-spacing: 0.46px;
902
- text-transform: uppercase;
903
-
904
- &:hover {
905
- background: rgba(105, 31, 169, 0.06);
906
- }
907
- &:focus-visible {
908
- outline: 2px solid ${a.colors.accent};
909
- outline-offset: 2px;
910
- }
911
- `,ic=r.button`
912
- flex: 1 1 0;
913
- height: 48px;
914
- border: 0;
915
- border-radius: 12px;
916
- background: ${a.colors.accent};
917
- color: ${a.colors.softWhite};
918
- cursor: pointer;
919
- font-family: ${a.font.sans};
920
- font-weight: 600;
921
- font-size: 13px;
922
- line-height: 24px;
923
- letter-spacing: 0.46px;
924
- text-transform: uppercase;
925
-
926
- &:hover {
927
- background: ${a.colors.accentHover};
928
- }
929
- &:focus-visible {
930
- outline: 2px solid ${a.colors.accent};
931
- outline-offset: 2px;
932
- }
933
- `,sc=1e3*60*60*24*182;function oc({item:t,session:s,edit:d,onListed:o,onClose:l}){const p=ft(),x=st(),[v,g]=c.useState(d!=null&&d.currentCredits?String(d.currentCredits):"10"),[$,h]=c.useState(null),[j,b]=c.useState(null),[k,I]=c.useState(!1),[C,A]=c.useState(null),[q,M]=c.useState(null),{cancelDone:y,slow:H,cancelFailed:i,setCancelFailed:K,cancelCurrent:V,signal:G}=ui(d,b),Y=nt.chainId,ne=Dn(s),{data:ee}=Yt(s.address),xe=ee!=null&&ee.name?Jt(ee.name):Wn(s.address),pe=Number(v),le=Number.isInteger(pe)&&pe>0,W=!!d&&!y&&pe===d.currentCredits,E=le?`$${tt(pe).toFixed(2)}`:"$0";c.useEffect(()=>{let S=!1;return(async()=>{try{const T=await xl({contractAddress:t.contractAddress,chainId:Y});S||A(T)}catch{S||A(!1)}})(),()=>{S=!0}},[t.contractAddress,Y]);async function B(S={}){var z,D;b(null);const T=Number(v);if(!Number.isInteger(T)||T<=0){b(n("primaryList.errorWholeNumber"));return}I(!0);try{if(!await V(S.payGas))return;C||(h(n("primaryList.statusEnabling")),await fl({signer:s.signer,contractAddress:t.contractAddress,chainId:Y}),A(!0)),h(n("primaryList.statusPublishing"));const ae=await ml({signer:s.signer,item:{contractAddress:t.contractAddress,itemId:t.blockchainItemId,network:Ae.Network.MATIC,chainId:Y},usdPrice:tt(T),uses:t.remainingSupply,expiresAtMs:Date.now()+sc});h(n("primaryList.statusFinishing"));const ve=await(d?oi(ae,s.identity,{signal:G()}):qa(ae,s.identity));(z=G())==null||z.throwIfAborted(),h(null),M(T),Z("Shop Listed Item",{item_id:t.blockchainItemId,contract_address:t.contractAddress,price_credits:T,price_usd:tt(T),listing_type:"primary",is_primary:!0}),Zt.success(n(d?"listingEdit.toastUpdated":"primaryList.toastOnSale",{name:t.name})),o==null||o(T,ve.id),p.invalidateQueries({queryKey:["publishable-items"]}),p.invalidateQueries({queryKey:["collection-sale-state"]}),p.invalidateQueries({queryKey:["shop-items"]}),p.invalidateQueries({queryKey:["catalog-items"]}),p.invalidateQueries({queryKey:["overview-listings"]}),p.invalidateQueries({queryKey:["upsell-listings"]})}catch(ae){if((D=G())!=null&&D.aborted)return;ue(ae,{flow:"list_primary"}),Z("Shop Listing Failed",{listing_type:"primary",error_code:Se(ae)}),b(at(ae,n(d?"listingEdit.listFailedAfterCancel":"primaryList.errorGeneric"))),h(null)}finally{I(!1)}}function m(){l(),x(os(t.contractAddress,t.blockchainItemId))}const re=C===null?n("primaryList.checking"):d?n(y?"primaryList.putOnSale":"listingEdit.submit"):k?ne?n("primaryList.publishing"):n("primaryList.confirmListing"):C===!1?n("primaryList.enableAndPutOnSale"):n("primaryList.putOnSale");return q!==null?e.jsx(yn,{onClick:l,role:"presentation",children:e.jsxs(wn,{onClick:S=>S.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(d?"listingEdit.successHeader":"primaryList.successTitle"),children:[e.jsxs(vn,{children:[e.jsx(jn,{children:n(d?"listingEdit.successHeader":"primaryList.successTitle")}),e.jsx(kn,{onClick:l,"aria-label":n("getCredits.done"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(Xd,{children:[e.jsx(ec,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(tc,{children:e.jsx("b",{children:t.name})}),e.jsxs(nc,{children:[n("primaryList.listedFor")," ",e.jsxs("strong",{children:[e.jsx(Pe,{className:"ccy-mark"})," ",e.jsx(ge,{credits:q})]})," ",n("primaryList.dotAvailable",{count:t.remainingSupply})]})]}),e.jsxs(rc,{children:[e.jsx(ac,{onClick:l,children:n("getCredits.done")}),e.jsx(ic,{onClick:m,children:n("primaryList.viewInShop")})]})]})}):d&&k?e.jsx(yn,{role:"presentation",children:e.jsxs(wn,{onClick:S=>S.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(vn,{children:[e.jsx(jn,{children:n("listingEdit.title")}),e.jsx(kn,{disabled:!0,"aria-label":n("primaryList.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(pi,{phase:y?"list":"cancel",managed:ne,slow:H})]})}):e.jsx(yn,{onClick:k?void 0:l,role:"presentation",children:e.jsxs(wn,{"data-testid":"modal",onClick:S=>S.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":d?n("listingEdit.title"):n("primaryList.publishTitle",{name:t.name}),children:[e.jsxs(vn,{children:[e.jsx(jn,{children:d?n("listingEdit.title"):n("primaryList.publishTitle",{name:t.name})}),e.jsx(kn,{onClick:l,disabled:k,"aria-label":n("primaryList.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(Wd,{children:n("primaryList.fromCollection",{collectionName:t.collectionName,count:t.remainingSupply})}),e.jsxs(Dd,{children:[e.jsx(qd,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(Od,{children:[e.jsx(Kd,{children:t.name}),xe?e.jsx(Hd,{children:n("primaryList.byCreator",{name:xe})}):null]})]}),e.jsxs(Ud,{children:[e.jsx(Qd,{children:n("primaryList.priceShort")}),e.jsxs(Vd,{"aria-invalid":v.length>0&&!le,children:[e.jsx(Pe,{className:"ccy"}),e.jsx(Gd,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:v,onChange:S=>g(S.target.value),disabled:k,"aria-label":n("primaryList.priceLabel",{currency:We.name})}),e.jsx(Yd,{"aria-hidden":!0,children:E})]})]}),e.jsx(Ot,{children:n("primaryList.pricedInWhole",{currency:We.name,currencySingular:We.nameSingular})}),d?!k&&!y?e.jsx(Ot,{children:n("listingEdit.subtitle")}):null:C===!1&&!k?e.jsx(Ot,{children:ne?n("primaryList.firstTimeManaged",{collectionName:t.collectionName}):n("primaryList.firstTimeConfirm",{collectionName:t.collectionName})}):C===!0&&!k?e.jsx(Ot,{children:ne?n("primaryList.readyManaged"):n("primaryList.readyConfirm")}):null,i?e.jsx(qn,{state:i,canPayGas:!!(d!=null&&d.canPayGas),busy:k,onPayGas:()=>void B({payGas:!0}),onLater:()=>K(null)}):null,$&&!d?e.jsx(Zd,{children:$}):null,e.jsx(it,{message:j}),e.jsx(Jd,{onClick:()=>void B(),disabled:k||W||i==="pending"||C===null||!le,"data-testid":"list-submit",children:re})]})})}const lc=r.div`
934
- position: fixed;
935
- inset: 0;
936
- z-index: 10000;
937
- display: flex;
938
- align-items: center;
939
- justify-content: center;
940
- padding: 16px;
941
- background: rgba(22, 21, 24, 0.55);
942
- `,dc=r.div`
943
- width: 760px;
944
- max-width: 100%;
945
- background: ${a.colors.white};
946
- border-radius: 16px;
947
- padding: 12px 16px 16px;
948
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
949
- display: flex;
950
- flex-direction: column;
951
- gap: 16px;
952
- `,cc=r.div`
953
- display: flex;
954
- align-items: center;
955
- justify-content: space-between;
956
- gap: 8px;
957
- padding-bottom: 16px;
958
- border-bottom: 1px solid ${a.colors.gray4};
959
- `,uc=r.h2`
960
- margin: 0;
961
- font-family: ${a.font.sans};
962
- font-weight: 600;
963
- font-size: 20px;
964
- line-height: 1.6;
965
- color: ${a.colors.text};
966
- `,pc=r.button`
967
- flex: none;
968
- display: grid;
969
- place-items: center;
970
- width: 24px;
971
- height: 24px;
972
- border: 0;
973
- background: none;
974
- cursor: pointer;
975
- color: ${a.colors.text};
976
-
977
- .ico {
978
- width: 18px;
979
- height: 18px;
980
- }
981
- &:focus-visible {
982
- outline: 2px solid ${a.colors.accent};
983
- outline-offset: 2px;
984
- }
985
- `,hc=r.video`
986
- display: block;
987
- width: 100%;
988
- max-height: 70vh;
989
- border-radius: 12px;
990
- background: ${a.colors.blackBtn};
991
- `;function xc({src:t,itemName:s,onClose:d}){const o=c.useRef(null);return c.useEffect(()=>{var p;(p=o.current)==null||p.focus();function l(x){x.key==="Escape"&&d()}return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[d]),e.jsx(lc,{onClick:d,role:"presentation",children:e.jsxs(dc,{ref:o,tabIndex:-1,onClick:l=>l.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":n("itemDetail.showcaseTitle"),children:[e.jsxs(cc,{children:[e.jsx(uc,{children:s||n("itemDetail.showcaseTitle")}),e.jsx(pc,{onClick:d,"aria-label":n("itemDetail.showcaseClose"),children:e.jsx(L,{name:"close",size:18})})]}),e.jsx(hc,{src:t,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Oe,radius:fc}=a,mc=r.div`
992
- position: fixed;
993
- inset: 0;
994
- z-index: 60;
995
- display: grid;
996
- place-items: center;
997
- padding: 20px;
998
- `,gc=r.div`
999
- position: absolute;
1000
- inset: 0;
1001
- background: rgba(22, 21, 24, 0.45);
1002
- `,bc=r.div`
1003
- position: relative;
1004
- z-index: 1;
1005
- width: 100%;
1006
- max-width: 420px;
1007
- background: ${Oe.white};
1008
- border-radius: ${fc.banner};
1009
- padding: 24px;
1010
- box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
1011
- animation: cart-pop-in 0.16s ease;
1012
- `,yc=r.div`
1013
- display: flex;
1014
- align-items: center;
1015
- gap: 14px;
1016
- margin-bottom: 18px;
1017
- `,wc=r.div`
1018
- width: 64px;
1019
- height: 64px;
1020
- flex: none;
1021
- border-radius: 12px;
1022
- overflow: hidden;
1023
- background: ${Oe.media};
1024
-
1025
- & img {
1026
- width: 100%;
1027
- height: 100%;
1028
- object-fit: contain;
1029
- }
1030
- `,vc=r.div`
1031
- font-weight: 700;
1032
- font-size: 16px;
1033
- color: ${Oe.text};
1034
- margin-bottom: 6px;
1035
- `,jc=r.div`
1036
- background: ${Oe.panel};
1037
- border-radius: 14px;
1038
- padding: 16px;
1039
- margin-bottom: 14px;
1040
- `,Xr=r.div`
1041
- color: ${Oe.muted};
1042
- font-size: 13px;
1043
- font-weight: 600;
1044
- margin-bottom: 6px;
1045
- `,ea=r.div`
1046
- display: flex;
1047
- align-items: center;
1048
- gap: 8px;
1049
- font-weight: 700;
1050
- font-size: 24px;
1051
- color: ${Oe.text};
1052
-
1053
- &[data-approx] {
1054
- color: ${Oe.text2};
1055
- }
1056
- `,kc=r.span`
1057
- color: ${Oe.muted};
1058
- `,ta=r(Pe)`
1059
- width: 20px;
1060
- height: 20px;
1061
- color: ${Oe.text};
1062
- `,na=r.div`
1063
- margin-top: 6px;
1064
- font-size: 13px;
1065
- `,$c=r.div`
1066
- font-size: 13px;
1067
- margin-bottom: 6px;
1068
- `,hi=mt`
1069
- margin: 6px 0 0;
1070
- font-size: 13px;
1071
- `,$n=r.p`
1072
- ${hi};
1073
- `,Cc=r(it)`
1074
- ${hi};
1075
- `,Ic=r.div`
1076
- display: flex;
1077
- gap: 10px;
1078
- margin-top: 18px;
1079
- `,ra=r(Ue)`
1080
- flex: 1;
1081
- `;function Cn(t){if(Vt(t))return n("errors.rejected");const s=(t.message??"").toLowerCase();return s.includes("insufficient")?n("marketCheckout.error.insufficient",{currency:We.name}):s.includes("not found")||s.includes("no active listing")||s.includes("404")?n("marketCheckout.error.soldOrRemoved"):s.includes("your own listing")?n("errors.cantBuyOwn"):n("marketCheckout.error.generic")}function Sc(t){return{id:t.tradeId,tradeId:t.tradeId,name:t.name,creator:t.creator,contractAddress:t.contractAddress,itemId:t.itemId,category:t.category,wearableCategory:t.wearableCategory??void 0,rarity:t.rarity,network:t.network,chainId:t.chainId,thumbnail:t.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function xi({listing:t,rate:s,onClose:d,onSold:o}){const{session:l}=rt(),{data:p,isError:x}=Wa(l),v=ft(),g=st(),[$,h]=c.useState("confirm"),[j,b]=c.useState(n("marketCheckout.checkingListing")),[k,I]=c.useState(null),[C,A]=c.useState(null),[q,M]=c.useState(null),[y,H]=c.useState(!1),i=c.useRef(null),K=c.useRef(!1),V=c.useRef(ci());c.useEffect(()=>(K.current=!1,()=>{K.current=!0}),[]);const G=et(un(t.manaWei,s));c.useEffect(()=>{let W=!1;if(!l){h("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const B=await Ha(t.tradeId);if(!B)throw new Error("not found");if(!ds(B))throw new Error("not found");if(cs(B,l.address))throw new Error("You can't buy your own listing.");const m=un(t.manaWei,s);if(!Number.isFinite(m)||m<=0)throw new Error("price unavailable");if(W)return;A({trade:B,usdCents:m,credits:et(m)}),b("")}catch(B){if(W)return;console.error("[market] listing check failed",B),Z(be(B)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(B),value_usd:Math.round(un(t.manaWei,s))/100}),h("error"),I(Cn(B))}})(),()=>{W=!0,i.current&&l&&(xe([i.current]),i.current=null)}},[]);const Y=!!C&&p!=null&&p.credits<C.credits;async function ne(){if(!l||!C)return;if(Y){Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:C.credits,credits_balance:(p==null?void 0:p.credits)??0,shortfall:Math.max(0,C.credits-((p==null?void 0:p.credits)??0))}),i.current&&(await ee([i.current])&&M(null),i.current=null),g("/credits");return}h("working"),I(null),H(!1);let W=q;if(!W){b(n("marketCheckout.lockingPrice"));try{const{credit:S,maxCreditedValue:T,usdCents:z}=await Tn(l.identity,C.usdCents,t.tradeId);if(K.current){ee([S.id]);return}i.current=S.id,v.invalidateQueries({queryKey:["usd-balance"]});const D=et(z);if(W={trade:C.trade,credit:S,maxCreditedValue:T,usdCents:z,credits:D},M(W),D!==C.credits){A({trade:C.trade,usdCents:z,credits:D}),H(!0),b(""),h("confirm");return}}catch(S){console.error("[market] authorize failed",S),be(S)||ue(S,{flow:"market_buy_now",step:"authorize"}),Z(be(S)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(S),value_usd:C.usdCents/100}),b(""),I(Cn(S)),h("error");return}}if(!W)return;const E=W;let B=!1,m;try{b(n("marketCheckout.confirming"));const S={trade:E.trade,buyer:l.address,signer:l.signer,credits:[E.credit],maxCreditedValue:E.maxCreditedValue,onBroadcast:({txHash:T})=>V.current.broadcast(E.credit.id,T),onReverted:({txHash:T})=>{T&&V.current.reverted(T)}};if(V.current.submitStarted(E.credit.id),ni())try{m=await wl(S),V.current.broadcast(E.credit.id,m),await ai(m),B=!0}catch(T){if(T instanceof ii)B=!0;else if(T instanceof si){if(T.reason==="relayer-unreachable")throw V.current.unobservable(E.credit.id),T;if(!Gt(l.providerType))throw T;m=await Er(S)}else throw m&&V.current.reverted(m),T}else m=await Er(S)}catch(S){V.current.submitFinished(E.credit.id),console.error("[market] buy now failed",S),await ee([E.credit.id])&&M(null),i.current=null,Z(be(S)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(S),value_usd:E.usdCents/100}),v.invalidateQueries({queryKey:["usd-balance"]}),I(Cn(S)),h("error");const T=(S.message??"").toLowerCase();(T.includes("not found")||T.includes("no active listing")||T.includes("404"))&&o();return}V.current.submitFinished(E.credit.id),i.current=null;try{v.invalidateQueries({queryKey:["usd-balance"]}),Z("Shop Completed Purchase",{items:[{item_id:t.itemId??null,contract_address:t.contractAddress,token_id:null,price_usd:E.usdCents/100,category:t.category,is_smart:!1}],value_credits:E.credits,value_usd:E.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:B,transaction_hash:m??null}),v.invalidateQueries({queryKey:["detail-trade"]}),v.invalidateQueries({queryKey:["shop-item"]}),v.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),v.invalidateQueries({queryKey:["shop-items"]}),v.invalidateQueries({queryKey:["catalog-items"]}),v.invalidateQueries({queryKey:["my-assets"]}),v.invalidateQueries({queryKey:["purchases"]})}catch(S){ue(S,{flow:"market_buy_now",step:"post_purchase"})}const re={items:[Sc(t)],txHash:m};g("/success",{state:re})}async function ee(W){if(!l||W.length===0)return!1;const E=W.filter(B=>!V.current.mayBeConsumed(B));if(E.length===0)return!1;try{return await Da(l.identity,E),!0}catch{return!1}}function xe(W){ee(W.filter(E=>!V.current.isInFlight(E)))}function pe(){l&&q&&ee([q.credit.id]),i.current=null,d()}const le=$==="working";return e.jsxs(mc,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),children:[e.jsx(gc,{onClick:le?void 0:pe,"aria-hidden":!0}),e.jsxs(bc,{children:[e.jsxs(yc,{children:[e.jsx(wc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx(vc,{title:t.name,children:t.name||n("buyModal.itemFallback")}),e.jsx(Ka,{"data-variant":"rarity",children:t.rarity})]})]}),e.jsx(jc,{children:C?e.jsxs(e.Fragment,{children:[e.jsx(Xr,{children:n("marketCheckout.finalPrice")}),e.jsxs(ea,{children:[e.jsx(ta,{}),e.jsx(ge,{credits:C.credits})," ",Mr(C.credits)]}),e.jsxs(na,{className:"muted",children:["$",tt(C.credits).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Xr,{children:n("marketCheckout.todaysPrice")}),e.jsxs(ea,{"data-approx":!0,children:[e.jsx(kc,{"aria-hidden":!0,children:"≈"}),e.jsx(ta,{}),e.jsx(ge,{credits:G})," ",Mr(G)]}),e.jsx(na,{className:"muted",children:j||n("marketCheckout.checkingListing")})]})}),l?e.jsxs($c,{className:"muted",children:[n("marketCheckout.yourBalance")," ",e.jsx(Pe,{className:"ccy-mark"})," ",ls(p,x)]}):null,Y?e.jsx($n,{className:"muted",children:n("marketCheckout.needMore",{currency:We.name})}):null,y?e.jsx($n,{"data-testid":"price-changed",role:"status",children:n("buyModal.priceChanged")}):null,j&&$==="working"?e.jsx($n,{className:"muted",children:j}):null,e.jsx(Cc,{message:k}),e.jsxs(Ic,{children:[e.jsx(ra,{variant:"ghost",onClick:pe,disabled:le,children:n("buyModal.cancel")}),e.jsx(ra,{variant:"purple",onClick:()=>void ne(),disabled:le||!C||Y&&ht(),children:le?n("marketCheckout.buying"):Y&&!ht()?n("nav.getCredits",{currency:We.name}):n("marketCheckout.confirmPurchase")})]})]})]})}function Ac(t,s,{enabled:d=!0,first:o}={}){const{data:l,isFetched:p}=ie({queryKey:["related-items",t,s,o],enabled:d&&!!t&&!!s,staleTime:3e5,queryFn:()=>us(t,s,{first:o})});return{items:l??[],isFetched:p}}const fi=15;function Mc(t){return`${t.contractAddress}-${t.itemId??t.tokenId??t.id}`.toLowerCase()}function Pc(t,s){return!!(s.id&&t.id===s.id||s.itemId&&t.itemId===s.itemId&&aa(t,s)||s.tokenId&&t.tokenId===s.tokenId&&aa(t,s))}function aa(t,s){var d;return s.contractAddress?((d=t.contractAddress)==null?void 0:d.toLowerCase())===s.contractAddress.toLowerCase():!1}function In(t,s,d=fi){const o=new Set,l=[];function p(v,g){for(const $ of v){if(l.length>=g)return;if(Pc($,s))continue;const h=Mc($);o.has(h)||(o.add(h),l.push($))}}p(t.collection,1/0);const x=l.length;return p(t.creator??[],d),p(t.related??[],d),{items:l,isCollectionOnly:l.length>0&&l.length===x}}const Lc=20,Rc=30,ia=[];function Fc(t,s=fi){const{id:d,contractAddress:o,itemId:l,tokenId:p,creator:x}=t,v=c.useMemo(()=>({id:d,contractAddress:o,itemId:l,tokenId:p}),[d,o,l,p]),{data:g=ia,isFetched:$}=ie({queryKey:["collection-items",o],enabled:!!o,queryFn:()=>hs(o,{first:Lc}).then(H=>H.items)}),h=c.useMemo(()=>In({collection:g},v,s).items.length,[g,v,s]),j=$&&h<s,b=j&&!!x,k=ie({queryKey:["suggestions-creator",x],enabled:b,staleTime:5*6e4,queryFn:()=>xs({creator:x,isOnSale:!0,first:Rc}).then(H=>H.items)}),I=k.data??ia,C=!b||k.isSuccess||k.isError,A=c.useMemo(()=>In({collection:g,creator:I},v,s).items.length,[g,I,v,s]),{items:q}=Ac(o,l??null,{enabled:j&&C&&A<s,first:s}),M=c.useMemo(()=>In({collection:g,creator:I,related:q},v,s),[g,I,q,v,s]),y=ps(M.items);return{...M,items:y,siblings:g,siblingsFetched:$}}function Tc(t){const s=fs();return!s||!ms(s.contracts,t)?null:s.label}const{colors:_e,media:On}=a,Ec=gs`
1082
- to {
1083
- transform: rotate(360deg);
1084
- }
1085
- `,zc=r.div``,Nc=r.span`
1086
- width: 34px;
1087
- height: 34px;
1088
- border-radius: 50%;
1089
- border: 3px solid ${_e.line};
1090
- border-top-color: ${_e.accent};
1091
- animation: ${Ec} 0.8s linear infinite;
1092
-
1093
- @media (prefers-reduced-motion: reduce) {
1094
- animation-duration: 2.4s;
1095
- }
1096
- `,Bc=r.p``,_c=r.div``,sa=r.button`
1097
- border: 0;
1098
- background: none;
1099
- cursor: pointer;
1100
- padding: 6px 16px;
1101
- border-radius: 999px;
1102
- font-weight: 600;
1103
- font-size: 12px;
1104
- text-transform: uppercase;
1105
- letter-spacing: 0.04em;
1106
- color: ${_e.muted};
1107
- transition:
1108
- background 0.12s ease,
1109
- color 0.12s ease;
1110
-
1111
- &[data-active] {
1112
- background: ${_e.text};
1113
- color: ${_e.white};
1114
- }
1115
- &:not([data-active]):hover {
1116
- color: ${_e.text};
1117
- }
1118
-
1119
- ${On.maxWidth("lg")} {
1120
- padding: 6px 12px;
1121
- border-radius: 0;
1122
- background: ${_e.white};
1123
- color: ${_e.text2};
1124
-
1125
- &[data-active] {
1126
- background: ${_e.text};
1127
- color: ${_e.white};
1128
- }
1129
- &:first-of-type {
1130
- border-top-left-radius: 999px;
1131
- border-bottom-left-radius: 999px;
1132
- }
1133
- &:last-of-type {
1134
- border-top-right-radius: 999px;
1135
- border-bottom-right-radius: 999px;
1136
- }
1137
- }
1138
- `,oa=r.span`
1139
- ${On.maxWidth("lg")} {
1140
- display: none;
1141
- }
1142
- `,la=r(L)`
1143
- display: none;
1144
-
1145
- ${On.maxWidth("lg")} {
1146
- display: block;
1147
- }
1148
- `,da="shop-item-preview";function Wc({item:t}){const s=rt(Y=>{var ne;return(ne=Y.session)==null?void 0:ne.address}),{data:d,isLoading:o}=Yt(s),l=s&&d?s:"default",p=t.category==="emote",[x,v]=c.useState("avatar"),g=!p&&x==="item",$=g||!o,h=St(Y=>Y.fittingOpen),{ref:j,active:b}=bs(),k=$&&b&&!h,[I,C]=c.useState(!0);c.useEffect(()=>{C(!0)},[t.id,g]),c.useEffect(()=>{k&&C(!0)},[k]);const A=c.useRef(null);c.useEffect(()=>{if(k)return()=>{Tl(A.current),A.current=null}},[k]);const[q,M]=c.useState(Ae.PreviewRenderer.UNITY),y=q===Ae.PreviewRenderer.BABYLON,H=!!s&&!!d,i=H&&ys(t,ws(d)),K=vs(t)[0],V=H&&!i&&!p,G=t.urn?{urns:[t.urn]}:{contractAddress:t.contractAddress,tokenId:t.tokenId??void 0,itemId:t.tokenId?void 0:t.itemId??void 0};return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:j,"data-preview-viewport":!0,"aria-hidden":!0}),k?e.jsx(js,{id:da,...G,profile:g?void 0:i?l:"default",bodyShape:g||i?void 0:K,type:p?void 0:g?Ae.PreviewType.WEARABLE:Ae.PreviewType.AVATAR,emote:p||g?void 0:Ae.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:p?1.5:void 0,wheelStart:p?100:void 0,onRenderer:M,onLoad:()=>{var Y;C(!1),A.current=((Y=document.getElementById(da))==null?void 0:Y.contentWindow)??null}}):null,!k||I?e.jsx(zc,{"data-preview-loading":!0,"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(Nc,{"aria-hidden":!0})}):null,V&&!g?e.jsx(Bc,{"data-preview-note":!0,children:n("itemPreview.shownOnBody",{shape:ks(K)})}):null,!y||!p?null:e.jsx(Fl,{previewId:"shop-item-preview"}),!y||p?null:e.jsxs(_c,{"data-preview-toggle":!0,role:"group","aria-label":n("itemPreview.previewMode"),children:[e.jsxs(sa,{type:"button","data-active":x==="avatar"||void 0,"aria-pressed":x==="avatar","aria-label":n("itemPreview.onAvatar"),onClick:()=>v("avatar"),children:[e.jsx(la,{name:"view-avatar",size:18}),e.jsx(oa,{children:n("itemPreview.onAvatar")})]}),e.jsxs(sa,{type:"button","data-active":x==="item"||void 0,"aria-pressed":x==="item","aria-label":n("itemPreview.item"),onClick:()=>v("item"),children:[e.jsx(la,{name:"view-item",size:18}),e.jsx(oa,{children:n("itemPreview.item")})]})]})]})}const Dc=r.div`
1149
- position: fixed;
1150
- inset: 0;
1151
- z-index: 10000;
1152
- display: flex;
1153
- align-items: center;
1154
- justify-content: center;
1155
- padding: 16px;
1156
- background: rgba(22, 21, 24, 0.55);
1157
- `,qc=r.div`
1158
- display: flex;
1159
- flex-direction: column;
1160
- gap: 12px;
1161
- width: 1128px;
1162
- max-width: 100%;
1163
- max-height: 92vh;
1164
- background: ${a.colors.white};
1165
- border-radius: 16px;
1166
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1167
-
1168
- &:focus {
1169
- outline: none;
1170
- }
1171
- `,Oc=r.div`
1172
- flex: none;
1173
- display: flex;
1174
- align-items: center;
1175
- gap: 8px;
1176
- padding: 16px;
1177
- border-bottom: 1px solid ${a.colors.gray4};
1178
- `,Kc=r.h2`
1179
- flex: 1 1 auto;
1180
- min-width: 0;
1181
- margin: 0;
1182
- font-family: ${a.font.sans};
1183
- font-weight: 600;
1184
- font-size: 20px;
1185
- line-height: 1.6;
1186
- color: ${a.colors.text};
1187
- `,Hc=r.button`
1188
- flex: none;
1189
- display: grid;
1190
- place-items: center;
1191
- width: 18.5px;
1192
- height: 18.5px;
1193
- padding: 0;
1194
- border: 0;
1195
- background: none;
1196
- cursor: pointer;
1197
- color: ${a.colors.text};
1198
-
1199
- .ico {
1200
- width: 18.5px;
1201
- height: 18.5px;
1202
- }
1203
- &:focus-visible {
1204
- outline: 2px solid ${a.colors.accent};
1205
- outline-offset: 4px;
1206
- }
1207
- `,Uc=r.div`
1208
- flex: 1 1 auto;
1209
- min-height: 0;
1210
- overflow-y: auto;
1211
- display: flex;
1212
- flex-direction: column;
1213
- gap: 8px;
1214
- padding: 0 16px 24px;
1215
- `,Qc=r.div`
1216
- position: sticky;
1217
- top: 0;
1218
- z-index: 1;
1219
- display: flex;
1220
- align-items: center;
1221
- justify-content: space-between;
1222
- gap: 8px;
1223
- padding-bottom: 8px;
1224
- background: ${a.colors.white};
1225
- `,Vc=r.p`
1226
- margin: 0;
1227
- font-family: ${a.font.sans};
1228
- font-size: 14px;
1229
- line-height: 1.43;
1230
- color: ${a.colors.muted};
1231
- `,Gc=r.div`
1232
- position: relative;
1233
- flex: none;
1234
- display: inline-flex;
1235
- align-items: center;
1236
- padding: 4px 4px 4px 12px;
1237
- border: 0.5px solid ${a.colors.lineStrong};
1238
- border-radius: 8px;
1239
- background: ${a.colors.white};
1240
-
1241
- select {
1242
- appearance: none;
1243
- /* 24px design gap + the 24px chevron that sits on top of it. */
1244
- padding: 0 48px 0 0;
1245
- border: 0;
1246
- background: none;
1247
- font-family: ${a.font.sans};
1248
- font-weight: 500;
1249
- font-size: 12px;
1250
- line-height: 1.43;
1251
- color: ${a.colors.text2};
1252
- cursor: pointer;
1253
- outline: none;
1254
- }
1255
- select:focus-visible {
1256
- outline: 2px solid ${a.colors.accent};
1257
- outline-offset: 2px;
1258
- border-radius: 4px;
1259
- }
1260
- .chev {
1261
- position: absolute;
1262
- right: 4px;
1263
- width: 24px;
1264
- height: 24px;
1265
- color: ${a.colors.text2};
1266
- pointer-events: none;
1267
- }
1268
- `,Yc=r.div`
1269
- flex: none;
1270
- border: 1px solid ${a.colors.lineStrong};
1271
- border-radius: 16px;
1272
- /* The four equal columns need the design width to hold their content, so a narrower modal scrolls
1273
- the table here rather than letting the page scroll sideways. */
1274
- overflow-x: auto;
1275
- overflow-y: hidden;
1276
- background: ${a.colors.white};
1277
- `,Jc=r.table`
1278
- width: 100%;
1279
- min-width: 1096px;
1280
- table-layout: fixed;
1281
- border-collapse: collapse;
1282
-
1283
- th {
1284
- height: 48px;
1285
- padding: 8px 8px 8px 16px;
1286
- text-align: left;
1287
- vertical-align: middle;
1288
- background: ${a.colors.media};
1289
- border-right: 0.5px solid ${a.colors.lineStrong};
1290
- font-family: ${a.font.sans};
1291
- font-weight: 600;
1292
- font-size: 16px;
1293
- line-height: 1.5;
1294
- color: ${a.colors.text};
1295
- text-transform: capitalize;
1296
- }
1297
- th:last-of-type {
1298
- border-right: 0;
1299
- }
1300
-
1301
- td {
1302
- height: 56px;
1303
- padding: 8px 8px 8px 16px;
1304
- vertical-align: middle;
1305
- border-right: 0.5px solid ${a.colors.lineStrong};
1306
- border-bottom: 0.5px solid ${a.colors.lineStrong};
1307
- font-family: ${a.font.sans};
1308
- font-size: 14px;
1309
- line-height: 1.43;
1310
- color: ${a.colors.text2};
1311
- }
1312
- td:last-of-type {
1313
- border-right: 0;
1314
- }
1315
-
1316
- tbody tr:hover,
1317
- tbody tr:focus-within {
1318
- background: ${a.colors.media};
1319
- }
1320
- tbody tr:hover td,
1321
- tbody tr:focus-within td {
1322
- border-bottom-color: ${a.colors.media};
1323
- }
1324
-
1325
- /* Stack every cell into a card — a 4-column grid is unusable at phone widths. The column name is
1326
- carried on each cell's data-label so it survives translation. */
1327
- ${a.media.maxWidth("mobile")} {
1328
- min-width: 0;
1329
-
1330
- thead {
1331
- display: none;
1332
- }
1333
- tr {
1334
- display: block;
1335
- border-bottom: 0.5px solid ${a.colors.lineStrong};
1336
- }
1337
- tr:last-of-type {
1338
- border-bottom: 0;
1339
- }
1340
- td {
1341
- display: block;
1342
- height: auto;
1343
- padding: 8px 16px;
1344
- border-right: 0;
1345
- border-bottom: 0;
1346
- }
1347
- td:first-of-type {
1348
- padding-top: 12px;
1349
- }
1350
- td:last-of-type {
1351
- padding-bottom: 12px;
1352
- }
1353
- td[data-label]::before {
1354
- content: attr(data-label);
1355
- display: block;
1356
- margin-bottom: 2px;
1357
- font-size: 12px;
1358
- line-height: 1.43;
1359
- color: ${a.colors.muted};
1360
- text-transform: capitalize;
1361
- }
1362
- tbody tr:hover td,
1363
- tbody tr:focus-within td {
1364
- border-bottom-color: transparent;
1365
- }
1366
- }
1367
- `,mi=`
1368
- display: flex;
1369
- align-items: center;
1370
- gap: 10px;
1371
- min-width: 0;
1372
-
1373
- .owner-ava {
1374
- flex: none;
1375
- display: inline-grid;
1376
- place-items: center;
1377
- width: 32px;
1378
- height: 32px;
1379
- border: 2.286px solid rgba(255, 255, 255, 0.5);
1380
- border-radius: 50%;
1381
- background: ${a.colors.media};
1382
- object-fit: cover;
1383
- overflow: hidden;
1384
- color: ${a.colors.white};
1385
- font-weight: 700;
1386
- font-size: 13px;
1387
- }
1388
- .owner-name {
1389
- min-width: 0;
1390
- overflow: hidden;
1391
- text-overflow: ellipsis;
1392
- white-space: nowrap;
1393
- font-family: ${a.font.sans};
1394
- font-size: 14px;
1395
- line-height: 1.43;
1396
- color: ${a.colors.text2};
1397
- }
1398
- `,Zc=r.div`
1399
- ${mi}
1400
- `,Xc=r.button`
1401
- ${mi}
1402
- padding: 0;
1403
- border: 0;
1404
- background: none;
1405
- font: inherit;
1406
- text-align: left;
1407
- cursor: pointer;
1408
-
1409
- &:hover .owner-name {
1410
- text-decoration: underline;
1411
- }
1412
- &:focus-visible {
1413
- outline: 2px solid ${a.colors.accent};
1414
- outline-offset: 2px;
1415
- border-radius: 4px;
1416
- }
1417
- `,ca=r.span`
1418
- color: ${a.colors.muted};
1419
- `,eu=r.div`
1420
- display: flex;
1421
- align-items: center;
1422
- justify-content: space-between;
1423
- gap: 4px;
1424
-
1425
- .amount {
1426
- display: inline-flex;
1427
- align-items: center;
1428
- gap: 4px;
1429
- font-family: ${a.font.sans};
1430
- font-weight: 600;
1431
- font-size: 16px;
1432
- line-height: 1.5;
1433
- color: ${a.colors.text2};
1434
- }
1435
- /* The credits mark is always near-black here — never the violet accent. */
1436
- .amount .ccy {
1437
- flex: none;
1438
- width: 22px;
1439
- height: 22px;
1440
- color: ${a.colors.text2};
1441
- }
1442
- .approx {
1443
- color: ${a.colors.muted};
1444
- font-weight: 600;
1445
- }
1446
- `,tu=r.div`
1447
- flex: none;
1448
- display: flex;
1449
- align-items: center;
1450
- gap: 8px;
1451
- opacity: 0;
1452
- transition: opacity 0.12s ease;
1453
-
1454
- tr:hover &,
1455
- tr:focus-within &,
1456
- &[data-persistent='true'] {
1457
- opacity: 1;
1458
- }
1459
-
1460
- @media (hover: none) {
1461
- opacity: 1;
1462
- }
1463
- ${a.media.maxWidth("mobile")} {
1464
- opacity: 1;
1465
- }
1466
- `,gi=`
1467
- display: inline-flex;
1468
- align-items: center;
1469
- justify-content: center;
1470
- gap: 8px;
1471
- height: 40px;
1472
- padding: 0 12px;
1473
- border: 0;
1474
- border-radius: 12px;
1475
- cursor: pointer;
1476
- font-family: ${a.font.sans};
1477
- font-weight: 600;
1478
- font-size: 13px;
1479
- line-height: 24px;
1480
- letter-spacing: 0.46px;
1481
- text-transform: uppercase;
1482
- text-align: center;
1483
- white-space: nowrap;
1484
-
1485
- .ico {
1486
- width: 20px;
1487
- height: 20px;
1488
- }
1489
- &:focus-visible {
1490
- outline: 2px solid ${a.colors.accent};
1491
- outline-offset: 2px;
1492
- }
1493
- `,nu=r.button`
1494
- ${gi}
1495
- min-width: 106px;
1496
- background: ${a.colors.text2};
1497
- color: ${a.colors.softWhite};
1498
-
1499
- &:hover:not(:disabled) {
1500
- filter: brightness(1.35);
1501
- }
1502
- &:disabled {
1503
- opacity: 0.55;
1504
- cursor: default;
1505
- }
1506
- `,ua=r.button`
1507
- ${gi}
1508
- background: ${a.colors.accent};
1509
- color: ${a.colors.softWhite};
1510
-
1511
- &:hover:not(:disabled) {
1512
- background: ${a.colors.accentHover};
1513
- }
1514
- `,ru=r.span`
1515
- display: inline-flex;
1516
- align-items: center;
1517
- height: 40px;
1518
- padding: 0 12px;
1519
- border-radius: 12px;
1520
- background: ${a.colors.chip};
1521
- font-family: ${a.font.sans};
1522
- font-weight: 600;
1523
- font-size: 13px;
1524
- line-height: 24px;
1525
- color: ${a.colors.muted};
1526
- white-space: nowrap;
1527
- `,au=r.div`
1528
- flex: none;
1529
- display: flex;
1530
- align-items: center;
1531
- justify-content: flex-end;
1532
- gap: 8px;
1533
- `,iu=r.p`
1534
- margin: 0;
1535
- font-family: ${a.font.sans};
1536
- font-size: 12px;
1537
- line-height: 1;
1538
- color: ${a.colors.gray0};
1539
- `,pa=r.button`
1540
- display: grid;
1541
- place-items: center;
1542
- padding: 10px;
1543
- border: 1px solid ${a.colors.text2};
1544
- border-radius: 4px;
1545
- background: ${a.colors.white};
1546
- color: ${a.colors.text2};
1547
- cursor: pointer;
1548
-
1549
- /* One chevron glyph turned into ‹ / › so no extra asset is needed. */
1550
- .ico {
1551
- width: 11px;
1552
- height: 11px;
1553
- transform: rotate(-90deg);
1554
- }
1555
- &[data-dir='prev'] .ico {
1556
- transform: rotate(90deg);
1557
- }
1558
- &:disabled {
1559
- border-color: ${a.colors.lineStrong};
1560
- color: ${a.colors.lineStrong};
1561
- cursor: default;
1562
- }
1563
- &:focus-visible {
1564
- outline: 2px solid ${a.colors.accent};
1565
- outline-offset: 2px;
1566
- }
1567
- `,su=r.p`
1568
- margin: 0;
1569
- padding: 32px 0;
1570
- font-family: ${a.font.sans};
1571
- font-size: 14px;
1572
- line-height: 1.43;
1573
- color: ${a.colors.muted};
1574
- text-align: center;
1575
- `;r.div`
1576
- display: flex;
1577
- flex-direction: column;
1578
- gap: 8px;
1579
- margin-top: 16px;
1580
-
1581
- .classic-title {
1582
- font-family: ${a.font.sans};
1583
- font-weight: 600;
1584
- font-size: 15px;
1585
- color: ${a.colors.text2};
1586
- }
1587
- .classic-note {
1588
- font-family: ${a.font.sans};
1589
- font-size: 13px;
1590
- color: ${a.colors.muted};
1591
- }
1592
- `;r.span`
1593
- display: inline-flex;
1594
- align-items: center;
1595
- padding: 2px 8px;
1596
- border-radius: ${a.radius.chip};
1597
- background: ${a.colors.chip};
1598
- font-family: ${a.font.sans};
1599
- font-size: 11px;
1600
- letter-spacing: 0.4px;
1601
- text-transform: uppercase;
1602
- color: ${a.colors.muted};
1603
- `;r.a`
1604
- display: inline-flex;
1605
- align-items: center;
1606
- gap: 6px;
1607
- height: 40px;
1608
- padding: 0 14px;
1609
- border: 1px solid ${a.colors.lineStrong};
1610
- border-radius: 12px;
1611
- color: ${a.colors.accent};
1612
- font-family: ${a.font.sans};
1613
- font-weight: 600;
1614
- font-size: 13px;
1615
- text-decoration: none;
1616
-
1617
- &:hover {
1618
- background: ${a.colors.chip};
1619
- }
1620
- .ico {
1621
- width: 14px;
1622
- height: 14px;
1623
- }
1624
- `;const Kt=10,ou=!1;function lu(t){return/^0x[a-fA-F0-9]{40}$/.test(t)?`${t.slice(0,6)}…${t.slice(-4)}`:t}function du(t){let s=0;for(let d=0;d<t.length;d++)s=s*31+t.charCodeAt(d)>>>0;return`hsl(${s%360}, 52%, 45%)`}function cu(t,s){var d;return(((d=t==null?void 0:t.trim())==null?void 0:d[0])||s.replace(/^0x/i,"")[0]||"?").toUpperCase()}function uu(t){return t%100>=11&&t%100<=13?"th":["th","st","nd","rd"][t%10]??"th"}function pu(t,s){const d=new Date(t);return Number.isNaN(d.getTime())?"—":s==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(d)} ${d.getDate()}${uu(d.getDate())}, ${d.getFullYear()}`:new Intl.DateTimeFormat(s,{day:"numeric",month:"long",year:"numeric"}).format(d)}function hu(t){return{tradeId:t.tradeId??t.id,listingType:"primary",contractAddress:t.contractAddress,itemId:t.itemId??"",name:t.name,thumbnail:t.thumbnail,rarity:t.rarity,category:t.category,wearableCategory:t.wearableCategory??null,creator:t.creator,manaWei:t.manaWei??"0",available:1,network:t.network,chainId:t.chainId,createdAt:0}}function xu({r:t,seller:s,issuedId:d,labels:o,locale:l,isOwn:p,isLegacy:x,inCart:v,fallbackImage:g,onAdd:$,onBuyNative:h,onBuyLegacy:j}){var i,K;const b=st(),{data:k}=Yt(s),I=(K=(i=k==null?void 0:k.avatar)==null?void 0:i.snapshots)==null?void 0:K.face256,[C,A]=c.useState(!1);c.useEffect(()=>A(!1),[I]);const q=!!I&&!C,M=s?k!=null&&k.name?Jt(k.name):lu(s):void 0,y=q?e.jsx("img",{className:"owner-ava",src:I,alt:"",loading:"lazy",onError:()=>A(!0)}):s?e.jsx("span",{className:"owner-ava",style:{backgroundColor:du(s)},"aria-hidden":!0,children:cu(k==null?void 0:k.name,s)}):g?e.jsx("img",{className:"owner-ava",src:g,alt:"","aria-hidden":!0}):e.jsx("span",{className:"owner-ava","aria-hidden":!0}),H=e.jsxs(e.Fragment,{children:[y,M?e.jsx("span",{className:"owner-name","data-testid":"resale-seller",children:M}):null]});return e.jsxs("tr",{"data-testid":"resale-row","data-source":t.source,"data-own":p?"true":void 0,children:[e.jsx("td",{"data-label":o.owner,children:s?e.jsx(Xc,{type:"button",onClick:()=>b(`/items/creator/${s}`),children:H}):e.jsx(Zc,{children:H})}),e.jsx("td",{"data-label":o.itemNumber,children:d?e.jsxs("span",{"data-testid":"resale-issued",children:["#",d]}):e.jsx(ca,{children:"—"})}),e.jsx("td",{"data-label":o.expiration,children:t.saleEndsAt?pu(t.saleEndsAt,l):e.jsx(ca,{children:"—"})}),e.jsx("td",{"data-label":o.price,children:e.jsxs(eu,{children:[e.jsxs("span",{className:"amount",children:[x?e.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,e.jsx(Pe,{className:"ccy"}),e.jsx("span",{children:_n(t.priceCredits)})]}),e.jsx(tu,{"data-persistent":p?"true":void 0,children:p?e.jsx(ru,{"data-testid":"resale-own",children:n("resales.yourListing")}):x?e.jsx(ua,{onClick:j,"aria-label":n("assetCard.buyNow"),"data-testid":"resale-buy",children:n("resales.buy")}):e.jsxs(e.Fragment,{children:[e.jsxs(nu,{onClick:$,disabled:v,"aria-label":v?n("assetCard.inCart"):n("assetCard.addToCart"),"data-testid":"resale-add",children:[e.jsx(L,{name:"cart",className:"ico"}),e.jsx("span",{children:v?n("assetCard.inCart"):n("resales.add")})]}),e.jsx(ua,{onClick:h,"aria-label":n("assetCard.buyNow"),"data-testid":"resale-buy",children:n("resales.buy")})]})})]})})]})}function fu({item:t,onClose:s}){var B;const d=t.contractAddress,o=t.itemId,l=ft(),p=St(m=>m.add),x=St(m=>m.items),{session:v}=rt(),g=Ua(m=>m.locale),$=(B=v==null?void 0:v.address)==null?void 0:B.toLowerCase(),h=c.useRef(null),[j,b]=c.useState(null),[k,I]=c.useState(null),[C,A]=c.useState("cheapest"),[q,M]=c.useState(0),y=!!j||!!k;c.useEffect(()=>{var m;(m=h.current)==null||m.focus()},[]),c.useEffect(()=>{function m(S){S.key==="Escape"&&!y&&s()}window.addEventListener("keydown",m);const re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",m),document.body.style.overflow=re}},[y,s]);const{data:H=[],isLoading:i}=ie({queryKey:["item-resales",d,o],enabled:!!d&&!!o,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Va(d,o)}),K=c.useMemo(()=>C==="cheapest"?H:[...H].sort((m,re)=>re.priceCredits-m.priceCredits),[H,C]),V=Math.max(1,Math.ceil(K.length/Kt)),G=Math.min(q,V-1),Y=K.slice(G*Kt,G*Kt+Kt),ne=Y.filter(m=>!m.seller||!m.issuedId).map(m=>m.tokenId).filter(m=>!!m),{data:ee={}}=ie({queryKey:["resale-token-info",d,ne.join(",")],enabled:!!d&&ne.length>0,staleTime:6e4,queryFn:()=>$s(d,ne)}),{data:xe=[]}=ie({queryKey:["item-classic-orders",d,o],enabled:ou,queryFn:()=>Cs(d,o)}),pe=H.some(m=>m.source==="legacy"),{data:le}=Qa(pe);function W(){l.invalidateQueries({queryKey:["item-resales",d,o]})}const E={owner:n("resales.colOwner"),itemNumber:n("resales.colItemNumber"),expiration:n("resales.colExpiration"),price:n("resales.colPrice")};return e.jsxs(e.Fragment,{children:[e.jsx(Dc,{onClick:y?void 0:s,role:"presentation",children:e.jsxs(qc,{ref:h,tabIndex:-1,onClick:m=>m.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("resales.modalTitle"),"data-testid":"resellers-modal",children:[e.jsxs(Oc,{children:[e.jsx(Kc,{children:n("resales.modalTitle")}),e.jsx(Hc,{onClick:s,"aria-label":n("resales.close"),"data-testid":"resellers-close",children:e.jsx(L,{name:"close"})})]}),e.jsxs(Uc,{children:[e.jsxs(Qc,{children:[e.jsx(Vc,{"data-testid":"resales-count",children:n("resales.count",{count:H.length})}),e.jsxs(Gc,{children:[e.jsxs("select",{value:C,onChange:m=>{A(m.target.value),M(0)},"aria-label":n("resales.sortLabel"),"data-testid":"resales-sort",children:[e.jsx("option",{value:"cheapest",children:n("resales.sortCheapest")}),e.jsx("option",{value:"most_expensive",children:n("resales.sortExpensive")})]}),e.jsx(L,{name:"chevron-down",className:"chev"})]})]}),i?null:K.length===0?e.jsx(su,{"data-testid":"resales-empty",children:n("resales.empty")}):null,K.length>0?e.jsxs(e.Fragment,{children:[e.jsx(Yc,{children:e.jsxs(Jc,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:E.owner}),e.jsx("th",{scope:"col",children:E.itemNumber}),e.jsx("th",{scope:"col",children:E.expiration}),e.jsx("th",{scope:"col",children:E.price})]})}),e.jsx("tbody",{children:Y.map(m=>{const re=m.source==="legacy",S=x.some(J=>J.id===m.id),T=m.tokenId&&ee[m.tokenId]||{},z=m.issuedId??T.issuedId,D=m.seller??T.seller,ae={...m,name:m.name||t.name,thumbnail:m.thumbnail||t.thumbnail,rarity:m.rarity||t.rarity,category:m.category||t.category,wearableCategory:m.wearableCategory??t.wearableCategory,gender:m.gender??t.gender},ve=!!D&&!!$&&D.toLowerCase()===$;return e.jsx(xu,{r:ae,seller:D,issuedId:z,labels:E,locale:g,isOwn:ve,isLegacy:re,inCart:S,fallbackImage:ae.thumbnail,onAdd:()=>p(ae,"item_detail"),onBuyNative:()=>b(ae),onBuyLegacy:()=>I(hu(ae))},m.tradeId??m.id)})})]})}),V>1?e.jsxs(au,{children:[e.jsx(pa,{"data-dir":"prev",onClick:()=>M(m=>Math.max(0,m-1)),disabled:G===0,"aria-label":n("resales.prevPage"),"data-testid":"resale-prev-page",children:e.jsx(L,{name:"chevron-down"})}),e.jsx(iu,{"data-testid":"resale-page-label",children:n("resales.page",{page:G+1,total:V})}),e.jsx(pa,{onClick:()=>M(m=>Math.min(V-1,m+1)),disabled:G>=V-1,"aria-label":n("resales.nextPage"),"data-testid":"resale-next-page",children:e.jsx(L,{name:"chevron-down"})})]}):null]}):null,null]})]})}),j?e.jsx(En,{item:j,onClose:()=>{b(null),W()}}):null,k&&le?e.jsx(xi,{listing:k,rate:le,onClose:()=>I(null),onSold:()=>{I(null),W()}}):null]})}const mu="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='76'%20height='76'%20viewBox='0%200%2076%2076'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='weui:shop-outlined'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M25.3333%2022.1667V19C25.3333%2015.6406%2026.6679%2012.4188%2029.0433%2010.0433C31.4188%207.66785%2034.6406%206.33333%2038%206.33333C41.3594%206.33333%2044.5812%207.66785%2046.9567%2010.0433C49.3321%2012.4188%2050.6667%2015.6406%2050.6667%2019V22.1667H60.1667C61.9147%2022.1667%2063.3333%2023.5885%2063.3333%2025.3555V63.3587C63.3333%2066.842%2060.4992%2069.6667%2057.019%2069.6667H18.981C17.3074%2069.6667%2015.7023%2069.0023%2014.5183%2067.8195C13.3343%2066.6367%2012.6683%2065.0322%2012.6667%2063.3587V25.3587C12.6667%2023.5917%2014.0758%2022.1667%2015.8333%2022.1667H25.3333ZM29.1333%2022.1667H46.8667V19C46.8667%2016.6484%2045.9325%2014.3931%2044.2697%2012.7303C42.6069%2011.0675%2040.3516%2010.1333%2038%2010.1333C35.6484%2010.1333%2033.3931%2011.0675%2031.7303%2012.7303C30.0675%2014.3931%2029.1333%2016.6484%2029.1333%2019V22.1667ZM25.3333%2025.9667H16.4667V63.3587C16.4667%2064.7393%2017.594%2065.8667%2018.981%2065.8667H57.019C57.6847%2065.8667%2058.3233%2065.6026%2058.7947%2065.1325C59.266%2064.6623%2059.5317%2064.0244%2059.5333%2063.3587V25.9667H50.6667V34.8333H46.8667V25.9667H29.1333V34.8333H25.3333V25.9667Z'%20fill='url(%23paint0_linear_0_226)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_0_226'%20x1='36.6705'%20y1='6.33333'%20x2='32.2014'%20y2='69.3597'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF7439'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",{colors:me,font:bi,radius:Kn,z:gu}=a,bu=r.div`
1625
- position: fixed;
1626
- inset: 0;
1627
- z-index: ${gu.overlay};
1628
- display: flex;
1629
- align-items: center;
1630
- justify-content: center;
1631
- overflow-y: auto;
1632
- padding: 16px;
1633
- background: rgba(22, 21, 24, 0.55);
1634
- `,yu=r.div`
1635
- width: 560px;
1636
- max-width: 100%;
1637
- max-height: 100%;
1638
- overflow-y: auto;
1639
- padding: 12px 16px 16px;
1640
- border-radius: ${Kn.modal};
1641
- background: ${me.white};
1642
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1643
- display: flex;
1644
- flex-direction: column;
1645
- gap: 24px;
1646
- font-family: ${bi.sans};
1647
-
1648
- /* Focused on mount for screen readers; it is not tab-reachable, so it never needs a visible ring. */
1649
- &:focus {
1650
- outline: none;
1651
- }
1652
- `,wu=r.div`
1653
- display: flex;
1654
- align-items: center;
1655
- justify-content: space-between;
1656
- gap: 8px;
1657
- padding-bottom: 16px;
1658
- border-bottom: 1px solid ${me.gray4};
1659
- `,vu=r.h2`
1660
- margin: 0;
1661
- font-weight: 600;
1662
- font-size: 20px;
1663
- line-height: 1.6;
1664
- color: ${me.text};
1665
- `,ju=r.button`
1666
- position: relative;
1667
- flex: none;
1668
- display: grid;
1669
- place-items: center;
1670
- width: 18.535px;
1671
- height: 18.535px;
1672
- padding: 0;
1673
- border: 0;
1674
- background: none;
1675
- cursor: pointer;
1676
- color: ${me.text};
1677
-
1678
- .ico {
1679
- width: 100%;
1680
- height: 100%;
1681
- }
1682
- /* Keeps the glyph exactly where the design puts it while giving it a tappable hit area. */
1683
- &::after {
1684
- content: '';
1685
- position: absolute;
1686
- inset: -11px;
1687
- }
1688
- &:focus-visible {
1689
- outline: 2px solid ${me.accent};
1690
- outline-offset: 2px;
1691
- }
1692
- `,ku=r.div`
1693
- padding: 24px 16px;
1694
- border-radius: ${Kn.modal};
1695
- background: ${me.promptLilac};
1696
- display: flex;
1697
- flex-direction: column;
1698
- align-items: center;
1699
- gap: 16px;
1700
- text-align: center;
1701
- `,$u=r.img`
1702
- flex: none;
1703
- width: 76px;
1704
- height: 76px;
1705
- `,Cu=r.h3`
1706
- margin: 0;
1707
- font-weight: 700;
1708
- font-size: 20px;
1709
- line-height: 1.334;
1710
- color: ${me.text2};
1711
- `,ha=r.p`
1712
- margin: 0;
1713
- font-weight: 400;
1714
- font-size: 16px;
1715
- line-height: 1.334;
1716
- color: ${me.text2};
1717
- `,Iu=r.div`
1718
- display: flex;
1719
- align-items: center;
1720
- gap: 12px;
1721
- `,yi=`
1722
- flex: 1 1 0;
1723
- min-width: 0;
1724
- display: inline-flex;
1725
- align-items: center;
1726
- justify-content: center;
1727
- gap: 12px;
1728
- height: 46px;
1729
- padding: 0 12px;
1730
- border-radius: ${Kn.card};
1731
- font-family: ${bi.sans};
1732
- font-weight: 600;
1733
- font-size: 13px;
1734
- line-height: 24px;
1735
- letter-spacing: 0.46px;
1736
- text-transform: uppercase;
1737
- cursor: pointer;
1738
- transition:
1739
- background 0.15s ease,
1740
- color 0.15s ease;
1741
-
1742
- &:focus-visible {
1743
- outline: 2px solid ${me.accent};
1744
- outline-offset: 2px;
1745
- }
1746
- `,Su=r.button`
1747
- ${yi};
1748
- border: 0.5px solid ${me.text};
1749
- background: ${me.white};
1750
- color: ${me.text2};
1751
-
1752
- &:hover {
1753
- background: ${me.panel};
1754
- }
1755
- `,Au=r.a`
1756
- ${yi};
1757
- border: 0;
1758
- background: ${me.dclRed};
1759
- color: ${me.softWhite};
1760
- text-decoration: none;
1761
-
1762
- &:hover {
1763
- filter: brightness(1.08);
1764
- }
1765
- `,Mu=r.span`
1766
- flex: none;
1767
- display: grid;
1768
- place-items: center;
1769
- width: 24px;
1770
- height: 24px;
1771
-
1772
- .ico {
1773
- width: 100%;
1774
- height: 100%;
1775
- }
1776
- `;function Pu(t,s){return`${nt.marketplaceUrl}/contracts/${t}/tokens/${s}`}function Lu(t,s){return`${nt.marketplaceUrl}/contracts/${t}/items/${s}`}function xa(t){const{contractAddress:s,onClose:d}=t,o=t.variant==="buy",l=t.variant==="buy"?t.itemId:null,p=t.variant==="buy"?null:t.tokenId,x=t.variant==="buy"?Lu(s,t.itemId):Pu(s,t.tokenId),v=c.useRef(null),g=c.useRef(d);return g.current=d,c.useEffect(()=>{var h;(h=v.current)==null||h.focus();function $(j){j.key==="Escape"&&g.current()}return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[]),e.jsx(bu,{role:"presentation",onClick:d,children:e.jsxs(yu,{ref:v,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:$=>$.stopPropagation(),children:[e.jsxs(wu,{children:[e.jsx(vu,{children:n("marketplaceRedirect.title")}),e.jsx(ju,{onClick:d,"aria-label":n("marketplaceRedirect.close"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(ku,{children:[e.jsx($u,{src:mu,alt:"","aria-hidden":!0}),e.jsx(Cu,{children:n("marketplaceRedirect.heading")}),e.jsx(ha,{children:o?n("marketplaceRedirect.buyBody"):n("marketplaceRedirect.body")}),o?e.jsx(ha,{children:n("marketplaceRedirect.buyCurrencyNote")}):null]}),e.jsxs(Iu,{children:[e.jsx(Su,{onClick:d,"data-testid":"marketplace-redirect-cancel",children:n("marketplaceRedirect.cancel")}),e.jsxs(Au,{href:x,target:"_blank",rel:"noreferrer","data-testid":"marketplace-redirect-continue",onClick:()=>Z("Shop Redirected To Marketplace",{direction:o?"buy":"resell",contract_address:s,item_id:l,token_id:p}),children:[n("marketplaceRedirect.continue"),e.jsx(Mu,{"aria-hidden":!0,children:e.jsx(L,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function Hn(){return nt.shopServerUrl||null}function wi(){return!!Hn()}async function Ru(t,s,d){const o=Hn();if(!o)return{subscribed:!1};const l=new URLSearchParams({contractAddress:t,itemId:s}),p=`${o}/notify-requests?${l.toString()}`,x=await Ga(p,{method:"GET",identity:d,metadata:{}});if(!x.ok)throw new Error(`getNotifyRequest ${x.status}`);return Tu(x,"getNotifyRequest")}async function Fu(t,s){const d=Hn();if(!d)throw new Error("createNotifyRequest: no shop-server host configured");const o=`${d}/notify-requests`,l=await Ga(o,{method:"POST",identity:s,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(`createNotifyRequest ${l.status}: ${await l.text()}`);const p=await l.text();if(p.trim()&&!Eu(p))throw new Error("createNotifyRequest: response was not JSON")}async function Tu(t,s){try{return await t.json()}catch{throw new Error(`${s}: response was not JSON`)}}function Eu(t){try{return JSON.parse(t),!0}catch{return!1}}const{colors:Me,radius:vi}=a,ji=mt`
1777
- display: flex;
1778
- flex-direction: column;
1779
- gap: 8px;
1780
- width: 100%;
1781
- `,zu=r.form`
1782
- ${ji};
1783
- `,fa=r.div`
1784
- ${ji};
1785
-
1786
- &[data-done] {
1787
- flex-direction: row;
1788
- align-items: center;
1789
- gap: 16px;
1790
- padding: 12px;
1791
- border-radius: 16px;
1792
- background: #c1d8c9;
1793
- }
1794
- `,Nu=r.label`
1795
- font-size: 14px;
1796
- color: ${Me.softWhite};
1797
- `,Bu=r.div`
1798
- display: flex;
1799
- align-items: stretch;
1800
- gap: 8px;
1801
- `,_u=r.input`
1802
- flex: 1;
1803
- min-width: 0;
1804
- height: 42px;
1805
- padding: 0 16px;
1806
- border: 1px solid ${Me.fieldBorder};
1807
- border-radius: ${vi.btn};
1808
- background: rgba(255, 255, 255, 0.1);
1809
- font-size: 16px;
1810
- color: ${Me.softWhite};
1811
-
1812
- &::placeholder {
1813
- color: ${Me.gray4};
1814
- }
1815
- &:focus-visible {
1816
- outline: none;
1817
- border-color: ${Me.white};
1818
- box-shadow: 0 0 0 1px ${Me.white};
1819
- }
1820
- `,ma=r.button`
1821
- flex-shrink: 0;
1822
- height: 40px;
1823
- padding: 0 12px;
1824
- border: 0;
1825
- border-radius: ${vi.card};
1826
- background: ${Me.softWhite};
1827
- color: ${Me.text};
1828
- font-weight: 600;
1829
- font-size: 15px;
1830
- line-height: 24px;
1831
- text-transform: uppercase;
1832
- letter-spacing: 0.46px;
1833
- cursor: pointer;
1834
- transition: background 0.15s ease;
1835
-
1836
- &[data-full] {
1837
- width: 100%;
1838
- flex-shrink: 1;
1839
- }
1840
- &:hover:not(:disabled) {
1841
- background: ${Me.white};
1842
- }
1843
- &:disabled {
1844
- opacity: 0.5;
1845
- cursor: default;
1846
- }
1847
- `,Wu=r.span`
1848
- display: inline-flex;
1849
- align-items: center;
1850
- justify-content: center;
1851
- flex-shrink: 0;
1852
- width: 20px;
1853
- height: 20px;
1854
- border-radius: 50%;
1855
- background: #34ce76;
1856
- color: ${Me.white};
1857
- `,Du=r.span`
1858
- font-size: 16px;
1859
- line-height: 1.5;
1860
- color: ${Me.text2};
1861
- `;function ga(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim())}function qu({item:t}){const s=rt(A=>A.session),d=rt(A=>A.signIn),[o,l]=c.useState(""),[p,x]=c.useState(!1),[v,g]=c.useState(!1),[$,h]=c.useState(null),j=wi(),b=j&&!!s&&!!t.contractAddress&&!!t.itemId,{data:k}=ie({queryKey:["notify-request",t.contractAddress,t.itemId,s==null?void 0:s.address],enabled:b,queryFn:()=>Ru(t.contractAddress,t.itemId,s.identity)});c.useEffect(()=>{k!=null&&k.email&&l(A=>A||k.email)},[k==null?void 0:k.email]),c.useEffect(()=>{if(!s||!j)return;let A=!1;return Is().then(q=>{!A&&q&&l(M=>M||q)}),()=>{A=!0}},[j,s]);const I=v||!!(k!=null&&k.subscribed);async function C(A){if(A.preventDefault(),!(!s||!t.itemId||!ga(o)||p)){x(!0),h(null);try{await Fu({contractAddress:t.contractAddress,itemId:t.itemId,chainId:t.chainId,email:o.trim()},s.identity),g(!0),Z("Shop Requested Notify",{item_id:t.itemId,contract_address:t.contractAddress})}catch(q){ue(q,{flow:"notify-me",contractAddress:t.contractAddress,itemId:t.itemId}),h(n("notifyMe.error"))}finally{x(!1)}}}return j?s?I?e.jsxs(fa,{"data-done":!0,"data-testid":"notify-subscribed",children:[e.jsx(Wu,{"aria-hidden":!0,children:e.jsx(L,{name:"check",size:12})}),e.jsx(Du,{children:n("notifyMe.subscribedBody")})]}):e.jsxs(zu,{onSubmit:A=>void C(A),"data-testid":"notify",children:[e.jsx(Nu,{htmlFor:"notify-email",children:n("notifyMe.label")}),e.jsxs(Bu,{children:[e.jsx(_u,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:n("notifyMe.placeholder"),value:o,onChange:A=>l(A.target.value),"data-testid":"notify-email"}),e.jsx(ma,{type:"submit",disabled:!ga(o)||p,"data-testid":"notify-submit",children:p?n("notifyMe.working"):n("notifyMe.cta")})]}),e.jsx(it,{message:$})]}):e.jsx(fa,{"data-testid":"notify",children:e.jsx(ma,{type:"button","data-full":!0,onClick:d,"data-testid":"notify-signin",children:n("notifyMe.signInCta")})}):null}const Ou=r.div`
1862
- display: flex;
1863
- flex-direction: column;
1864
- gap: 4px;
1865
- width: 100%;
1866
- font-family: ${a.font.sans};
1867
- `,Ku=r.div`
1868
- display: flex;
1869
- align-items: flex-start;
1870
- justify-content: space-between;
1871
- gap: 12px;
1872
- font-size: 12px;
1873
- `,Hu=r.span`
1874
- font-weight: 600;
1875
- line-height: 1.57;
1876
- color: ${a.colors.muted2};
1877
- /* Drawn in caps, like the PRICE and STOCK labels beside it. Cased here rather than in the string so a
1878
- translation is not forced to shout in a language where that reads badly. */
1879
- text-transform: uppercase;
1880
- white-space: nowrap;
1881
- `,ba=r.span`
1882
- /* Sized here, not inherited from the head row: the same element also sits UNDER the bar, outside it. */
1883
- font-size: 12px;
1884
- font-weight: 400;
1885
- line-height: 22px;
1886
- color: ${a.colors.softWhite};
1887
- text-transform: lowercase;
1888
- white-space: nowrap;
1889
- `,Uu=r.div`
1890
- position: relative;
1891
- width: 100%;
1892
- height: 10px;
1893
- border-radius: 100px;
1894
- background: rgba(255, 255, 255, 0.2);
1895
- /* The fill is a child with its own radius; clipping here keeps a full bar's ends round. */
1896
- overflow: hidden;
1897
- `,Qu=r.div`
1898
- position: absolute;
1899
- left: 0;
1900
- top: 0;
1901
- height: 10px;
1902
- border-radius: 100px;
1903
- background: ${a.colors.dclRed};
1904
- transition: width 0.3s ease;
1905
-
1906
- @media (prefers-reduced-motion: reduce) {
1907
- transition: none;
1908
- }
1909
- `;function Vu({claimed:t,total:s,className:d,testId:o}){if(!Number.isFinite(t)||!Number.isFinite(s)||s<=0)return null;const l=Math.min(s,Math.max(0,t)),p=Math.round(l/s*100);return e.jsxs(Ou,{className:d,"data-testid":o,children:[e.jsxs(Ku,{children:[e.jsx(Hu,{children:n("offerStock.label")}),e.jsx(ba,{children:n("offerStock.claimed",{claimed:l,total:s})})]}),e.jsx(Uu,{role:"progressbar","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":l,"aria-label":n("offerStock.claimed",{claimed:l,total:s}),children:e.jsx(Qu,{style:{width:`${p}%`}})}),e.jsx(ba,{children:n("offerStock.percent",{pct:p})})]})}const Gu=new Map(Object.entries(Ss).flatMap(([t,s])=>s.length===1?[[s[0],t]]:[])),xt="/items";function Yu(t){return t?`${xt}?rarities=${encodeURIComponent(t.toLowerCase())}`:null}function Ju(t){const s=t.wearableCategory;if(s){const d=Gu.get(s);return d?`${xt}?category=wearable&subCategory=${encodeURIComponent(d)}`:`${xt}?category=wearable`}return t.category==="emote"?`${xt}?category=emote`:t.category==="wearable"?`${xt}?category=wearable`:null}function Zu(){return`${xt}?smart=true`}const Xu=r(As)`
1910
- display: flex;
1911
- flex-direction: column;
1912
- overflow: hidden;
1913
- gap: 1px;
1914
- background: ${a.colors.lineStrong};
1915
-
1916
- /* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
1917
- full height. */
1918
- & [data-collage-row] {
1919
- display: flex;
1920
- flex: 1 1 50%;
1921
- min-height: 0;
1922
- gap: 1px;
1923
- }
1924
- & [data-collage-row][data-full] {
1925
- flex-basis: 100%;
1926
- }
1927
- & [data-collage-row] img {
1928
- flex: 1 1 0;
1929
- min-width: 0;
1930
- width: 100%;
1931
- height: 100%;
1932
- object-fit: cover;
1933
- display: block;
1934
- }
1935
- `;function ep({contractAddress:t,name:s,items:d,className:o}){const l=st();if(!t||!s)return null;const p=(d??[]).map(g=>g.thumbnail).filter(g=>!!g).slice(0,4),x=p.slice(0,2),v=p.slice(2,4);return e.jsxs(Ms,{as:"button","data-link":!0,className:o,"data-testid":"creator",onClick:g=>{g.stopPropagation(),l(`/collection/${t}`)},children:[p.length>0?e.jsxs(Xu,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{"data-collage-row":!0,"data-full":v.length===0||void 0,children:x.map((g,$)=>e.jsx("img",{src:g,alt:""},$))}),v.length>0?e.jsx("span",{"data-collage-row":!0,children:v.map((g,$)=>e.jsx("img",{src:g,alt:""},$))}):null]}):null,e.jsx(Ps,{"data-testid":"creator-name",children:Jt(s)})]})}const{colors:f,radius:Qe,media:oe,font:tp,gradients:np}=a,rp=r.div`
1936
- max-width: 1721px;
1937
- margin: 0 auto;
1938
-
1939
- ${oe.maxWidth("lg")} {
1940
- padding-bottom: 88px;
1941
- }
1942
- `,ap=r.nav`
1943
- display: flex;
1944
- align-items: center;
1945
- gap: 8px;
1946
- font-size: 13px;
1947
- color: ${f.gray4};
1948
- margin-bottom: 24px;
1949
- ${El};
1950
- `,ip=r.button`
1951
- background: none;
1952
- border: 0;
1953
- padding: 0;
1954
- font: inherit;
1955
- color: ${f.gray4};
1956
-
1957
- &:hover {
1958
- color: ${f.white};
1959
- }
1960
- `,sp=r.span`
1961
- color: ${f.muted2};
1962
- `,op=r.span`
1963
- color: ${f.softWhite};
1964
- font-weight: 600;
1965
- `,lp=r.div`
1966
- position: relative;
1967
- /* Confines the glow's negative z-index, which would otherwise escape to the root stacking context. */
1968
- isolation: isolate;
1969
- display: grid;
1970
- grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
1971
- gap: 48px;
1972
- align-items: start;
1973
-
1974
- /* Preview column width, re-derived from the tracks above so the glow's pivot cannot drift. */
1975
- --preview-col-w: calc((100% - 48px) * 1045 / 1559);
1976
- /* Oversized so the glow reaches past the frame while the gradient still finishes fading inside its
1977
- own box: the radii cannot exceed 50% without ending outside the box and painting a hard rectangle. */
1978
- --glow-box: 1.76;
1979
-
1980
- /* Avatar glow, hung off the grid container because the preview frame clips its own overflow. Sits
1981
- under the frame and, by document order, above the body symbols on the same z-index. */
1982
- &::before {
1983
- content: '';
1984
- position: absolute;
1985
- z-index: -1;
1986
- pointer-events: none;
1987
- top: 0;
1988
- left: calc(var(--preview-col-w) / 2);
1989
- width: calc(var(--preview-col-w) * var(--glow-box));
1990
- aspect-ratio: 1045 / 752;
1991
- transform: translate(-50%, calc(50% / var(--glow-box) - 50%));
1992
- background: radial-gradient(
1993
- 50% 50% at 50% 52%,
1994
- rgb(var(--glow-core, ${f.glowCyanRgb})) 0%,
1995
- rgb(var(--glow-rgb, ${f.glowCyanRgb}) / 0.9) 20%,
1996
- 45%,
1997
- rgb(var(--glow-rgb, ${f.glowCyanRgb}) / 0) 100%
1998
- );
1999
- }
2000
-
2001
- ${oe.maxWidth("lg")} {
2002
- grid-template-columns: 1fr;
2003
- gap: 24px;
2004
-
2005
- /* The track maths is desktop-only; one column puts the pivot nowhere meaningful. */
2006
- &::before {
2007
- display: none;
2008
- }
2009
- }
2010
- `,dp=r.div`
2011
- position: relative;
2012
- aspect-ratio: 1045 / 752;
2013
- border-radius: ${Qe.banner};
2014
- overflow: hidden;
2015
-
2016
- /* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
2017
- shell's gutter instead of sitting inside it. No transform, which would make this the containing block
2018
- for the absolutely-positioned controls below. */
2019
- ${oe.maxWidth("lg")} {
2020
- aspect-ratio: 1 / 1;
2021
- width: 100vw;
2022
- margin-left: calc(-50vw + 50%);
2023
- border-radius: 0;
2024
- }
2025
-
2026
- & iframe,
2027
- & > * {
2028
- width: 100%;
2029
- height: 100%;
2030
- border: 0;
2031
- display: block;
2032
- }
2033
-
2034
- /* Soft edges so legs and the cast shadow dissolve instead of being sliced by the overflow clip — on the
2035
- iframe alone, so the pills and note stay crisp, and intersected linears rather than one radial, which
2036
- would round the corners. The bands stay clear of the controls aang draws ~40px inside its canvas. */
2037
- & iframe {
2038
- -webkit-mask-image:
2039
- linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
2040
- linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
2041
- -webkit-mask-composite: source-in;
2042
- mask-image:
2043
- linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
2044
- linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
2045
- mask-composite: intersect;
2046
- }
2047
-
2048
- /* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
2049
- Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
2050
- above) nor blocks the preview controls. */
2051
- & > [data-preview-viewport] {
2052
- position: absolute;
2053
- inset: 0;
2054
- pointer-events: none;
2055
- z-index: 0;
2056
- }
2057
-
2058
- & > [data-preview-toggle] {
2059
- position: absolute;
2060
- top: 16px;
2061
- left: 16px;
2062
- z-index: 2;
2063
- width: auto;
2064
- height: auto;
2065
- display: inline-flex;
2066
- gap: 2px;
2067
- padding: 3px;
2068
- background: rgba(255, 255, 255, 0.92);
2069
- border: 1px solid ${f.line};
2070
- border-radius: 999px;
2071
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
2072
-
2073
- /* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
2074
- container carries no fill, gap or padding of its own there. */
2075
- ${oe.maxWidth("lg")} {
2076
- top: auto;
2077
- left: auto;
2078
- right: 16px;
2079
- bottom: 16px;
2080
- gap: 0;
2081
- padding: 0;
2082
- background: none;
2083
- border: 0;
2084
- box-shadow: none;
2085
- overflow: hidden;
2086
- }
2087
- }
2088
-
2089
- & > [data-preview-note] {
2090
- position: absolute;
2091
- bottom: 14px;
2092
- left: 50%;
2093
- transform: translateX(-50%);
2094
- z-index: 2;
2095
- width: auto;
2096
- height: auto;
2097
- max-width: 88%;
2098
- margin: 0;
2099
- text-align: center;
2100
- background: rgba(22, 21, 24, 0.78);
2101
- color: ${f.white};
2102
- font-size: 12px;
2103
- font-weight: 500;
2104
- padding: 6px 12px;
2105
- border-radius: 999px;
2106
- }
2107
-
2108
- & > [data-preview-loading] {
2109
- position: absolute;
2110
- inset: 0;
2111
- z-index: 1;
2112
- display: flex;
2113
- align-items: center;
2114
- justify-content: center;
2115
- width: 100%;
2116
- height: 100%;
2117
- background: transparent;
2118
- }
2119
-
2120
- & > [data-fav-preview] {
2121
- display: none;
2122
- }
2123
-
2124
- /* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
2125
- wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
2126
- & > [data-play-showcase] {
2127
- position: absolute;
2128
- bottom: 16px;
2129
- left: 16px;
2130
- z-index: 2;
2131
- width: auto;
2132
- height: auto;
2133
- }
2134
-
2135
- ${oe.maxWidth("lg")} {
2136
- & > [data-preview-toggle] {
2137
- top: auto;
2138
- left: auto;
2139
- bottom: 12px;
2140
- right: 12px;
2141
- gap: 0;
2142
- padding: 0;
2143
- background: transparent;
2144
- border: 0;
2145
- box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
2146
- overflow: hidden;
2147
- }
2148
- & > [data-fav-preview] {
2149
- display: inline-flex;
2150
- position: absolute;
2151
- top: 12px;
2152
- right: 12px;
2153
- z-index: 3;
2154
- width: auto;
2155
- min-width: 40px;
2156
- height: 40px;
2157
- background: rgba(255, 255, 255, 0.92);
2158
- box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
2159
- }
2160
- & > [data-fav-preview]:hover {
2161
- background: ${f.white};
2162
- }
2163
- }
2164
- `,cp=r.div``,up=r.span`
2165
- position: absolute;
2166
- inset: 0;
2167
- width: 100%;
2168
- height: 100%;
2169
- border-radius: inherit;
2170
- `,pp=r.div`
2171
- display: flex;
2172
- flex-direction: column;
2173
- gap: 0;
2174
- `,hp=r.div`
2175
- display: flex;
2176
- align-items: flex-start;
2177
- justify-content: space-between;
2178
- gap: 12px;
2179
-
2180
- ${oe.maxWidth("lg")} {
2181
- order: 0;
2182
- }
2183
- `,xp=r.h1`
2184
- font-size: 28px;
2185
- font-weight: 600;
2186
- line-height: 34px;
2187
- color: ${f.softWhite};
2188
-
2189
- ${oe.maxWidth("lg")} {
2190
- font-size: 20px;
2191
- line-height: 24px;
2192
- }
2193
- `,ya=r.button`
2194
- flex: none;
2195
- min-width: 40px;
2196
- height: 40px;
2197
- padding: 0;
2198
- border-radius: ${Qe.pill};
2199
- border: 0;
2200
- background: rgba(255, 255, 255, 0.16);
2201
- display: inline-flex;
2202
- align-items: center;
2203
- justify-content: center;
2204
- gap: 6px;
2205
- color: ${f.softWhite};
2206
- cursor: pointer;
2207
- transition:
2208
- color 0.12s ease,
2209
- background 0.12s ease;
2210
-
2211
- &[data-count] {
2212
- padding: 0 14px 0 12px;
2213
- }
2214
- &:hover {
2215
- background: rgba(255, 255, 255, 0.28);
2216
- }
2217
- &[data-on] {
2218
- color: ${f.dclRed};
2219
- }
2220
-
2221
- ${oe.maxWidth("lg")} {
2222
- color: ${f.text};
2223
- &[data-fav-title] {
2224
- display: none;
2225
- }
2226
- }
2227
- `,wa=r.span`
2228
- font-size: 13px;
2229
- font-weight: 600;
2230
- line-height: 1;
2231
- color: ${f.softWhite};
2232
-
2233
- ${oe.maxWidth("lg")} {
2234
- color: ${f.text};
2235
- }
2236
- `,fp=r.button`
2237
- display: inline-flex;
2238
- align-items: center;
2239
- gap: 8px;
2240
- padding: 8px 14px;
2241
- border: 1px solid ${f.line};
2242
- border-radius: ${Qe.pill};
2243
- background: rgba(255, 255, 255, 0.94);
2244
- backdrop-filter: blur(6px);
2245
- box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
2246
- color: ${f.text};
2247
- font-size: 13px;
2248
- font-weight: 600;
2249
- cursor: pointer;
2250
- transition: background 0.12s ease;
2251
-
2252
- &:hover {
2253
- background: ${f.white};
2254
- }
2255
- &:focus-visible {
2256
- outline: 2px solid ${f.accent};
2257
- outline-offset: 2px;
2258
- }
2259
- `,pt=r.div`
2260
- display: inline-flex;
2261
- align-items: center;
2262
- gap: 5px;
2263
- font-size: 12px;
2264
- font-weight: 500;
2265
- text-transform: uppercase;
2266
- letter-spacing: 0;
2267
- color: ${f.gray4};
2268
- `,mp=r.div`
2269
- display: flex;
2270
- align-items: center;
2271
- gap: 8px;
2272
- flex-wrap: wrap;
2273
- margin-top: 12px;
2274
-
2275
- ${oe.maxWidth("lg")} {
2276
- order: 1;
2277
- margin-top: 10px;
2278
- }
2279
- `,Be=r(Ka)`
2280
- height: 24px;
2281
- padding: 0 8px;
2282
- gap: 3px;
2283
- font-size: 13px;
2284
- font-weight: 500;
2285
- border-radius: 4px;
2286
- letter-spacing: 0.02em;
2287
- text-transform: uppercase;
2288
- background: rgba(255, 255, 255, 0.14);
2289
- color: ${f.softWhite};
2290
-
2291
- & .ico {
2292
- color: ${f.softWhite};
2293
- }
2294
- &[data-variant='cat'] {
2295
- background: rgba(255, 255, 255, 0.14);
2296
- color: ${f.softWhite};
2297
- }
2298
-
2299
- /* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
2300
- #ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
2301
- one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
2302
- &[data-variant='blocked'] {
2303
- background: rgba(255, 116, 57, 0.2);
2304
- color: #ff7439;
2305
- cursor: help;
2306
- }
2307
- &[data-variant='blocked']:focus-visible {
2308
- outline: 2px solid #ff7439;
2309
- outline-offset: 2px;
2310
- }
2311
- `,Ht=r(Be.withComponent(Ba))`
2312
- text-decoration: none;
2313
- cursor: pointer;
2314
- transition: background 0.15s ease;
2315
-
2316
- &:hover,
2317
- &:focus-visible {
2318
- background: rgba(255, 255, 255, 0.26);
2319
- }
2320
-
2321
- /* The rarity chip carries its own colour inline, so a background hover would be overridden and the
2322
- chip would look inert. It gets a ring instead, which reads on any fill. */
2323
- &[data-variant='rarity']:hover,
2324
- &[data-variant='rarity']:focus-visible {
2325
- box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
2326
- }
2327
- `,gp=r.div`
2328
- display: flex;
2329
- flex-direction: column;
2330
- align-items: flex-start;
2331
- gap: 8px;
2332
- `,zn=r(gp)`
2333
- gap: 11px;
2334
- `,va=r.p`
2335
- margin: 0;
2336
- color: ${f.softWhite};
2337
- font-size: 14px;
2338
- line-height: 30px;
2339
- display: -webkit-box;
2340
- -webkit-box-orient: vertical;
2341
- -webkit-line-clamp: 4;
2342
- overflow: hidden;
2343
-
2344
- &[data-expanded] {
2345
- -webkit-line-clamp: unset;
2346
- overflow: visible;
2347
- }
2348
- `,bp=r.button`
2349
- font-size: 13px;
2350
- align-self: flex-start;
2351
- `,ki=mt`
2352
- display: grid;
2353
- grid-template-columns: 1fr 1fr;
2354
- gap: 16px;
2355
- `,$i=r.div`
2356
- ${ki};
2357
- /* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
2358
- description belongs to the heading block it follows, the creator/collection pair is a new subject. */
2359
- margin-top: 24px;
2360
-
2361
- ${oe.maxWidth("lg")} {
2362
- order: 3;
2363
- grid-template-columns: 1fr;
2364
- /* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
2365
- gap: 20px;
2366
- margin-top: 20px;
2367
- }
2368
- `,Nn=r.div`
2369
- min-width: 0;
2370
- `,Ci=r.div`
2371
- ${ki};
2372
- margin-top: 32px;
2373
-
2374
- ${oe.maxWidth("lg")} {
2375
- order: 2;
2376
- margin-top: 20px;
2377
- }
2378
- `,It=r.div`
2379
- display: flex;
2380
- flex-direction: column;
2381
- gap: 15px;
2382
- min-width: 0;
2383
-
2384
- &[data-collection] {
2385
- align-items: flex-start;
2386
- }
2387
- `,Ii=mt`
2388
- &[data-testid='creator'] {
2389
- color: ${f.softWhite};
2390
- font-size: 14px;
2391
- gap: 12px;
2392
- }
2393
- [data-avatar] {
2394
- width: 48px;
2395
- height: 48px;
2396
- }
2397
- [data-letter] {
2398
- font-size: 18px;
2399
- }
2400
- [data-testid='creator-name'] {
2401
- color: ${f.softWhite};
2402
- font-weight: 500;
2403
- text-decoration: underline;
2404
- }
2405
- &[data-link]:hover [data-testid='creator-name'] {
2406
- color: ${f.gray4};
2407
- }
2408
- `,yp=r(Rs)`
2409
- ${Ii}
2410
- `,wp=r(ep)`
2411
- ${Ii}
2412
- `,Si=r.hr`
2413
- border: 0;
2414
- border-top: 1px solid rgba(255, 255, 255, 0.3);
2415
- margin: 24px 0 0;
2416
- width: 100%;
2417
-
2418
- /* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
2419
- so it closes the price rather than separating it from the description. */
2420
- ${oe.maxWidth("lg")} {
2421
- order: 5;
2422
- margin-top: 16px;
2423
- }
2424
- `,vp=r(Ls)`
2425
- margin-bottom: 12px;
2426
- `,jp=r.div`
2427
- margin-top: 16px;
2428
- /* The design's Pricing frame stacks its rows 16px apart; without it the stock scale sat against the
2429
- underside of the price and read as part of it. */
2430
- display: flex;
2431
- flex-direction: column;
2432
- gap: 16px;
2433
-
2434
- ${oe.maxWidth("lg")} {
2435
- order: 4;
2436
- margin-top: 16px;
2437
- }
2438
- `,kp=r.div`
2439
- display: flex;
2440
- align-items: flex-start;
2441
- gap: 16px;
2442
- width: 100%;
2443
- `,$p=r.div`
2444
- flex: 1 1 auto;
2445
- min-width: 0;
2446
- display: flex;
2447
- flex-direction: column;
2448
- gap: 8px;
2449
- `,ja=r.div`
2450
- flex: 0 0 auto;
2451
- display: flex;
2452
- flex-direction: column;
2453
- align-items: flex-end;
2454
- gap: 8px;
2455
- text-align: right;
2456
- `,Sn=r.div`
2457
- font-size: 18px;
2458
- font-weight: 500;
2459
- line-height: 1;
2460
- color: ${f.softWhite};
2461
-
2462
- &[data-out] {
2463
- font-size: 14px;
2464
- font-weight: 600;
2465
- text-transform: uppercase;
2466
- letter-spacing: 0.02em;
2467
- color: ${f.gray4};
2468
- }
2469
- `,An=r.div`
2470
- font-size: 14px;
2471
- font-weight: 600;
2472
- text-transform: uppercase;
2473
- letter-spacing: 0;
2474
- color: ${f.muted2};
2475
- `,$t=r.div`
2476
- display: flex;
2477
- align-items: center;
2478
- gap: 8px;
2479
- font-weight: 700;
2480
- color: ${f.softWhite};
2481
-
2482
- /* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
2483
- &[data-variant='none'] {
2484
- display: inline-flex;
2485
- align-items: center;
2486
- gap: 6px;
2487
- font-size: 14px;
2488
- font-weight: 600;
2489
- color: ${f.softWhite};
2490
- }
2491
- /*
2492
- * White, not red. The tag above the title is what announces the discount; painting the number red too
2493
- * said it a second time and left the price itself the least legible thing in its own row.
2494
- */
2495
- &[data-variant='sale'] {
2496
- flex-wrap: wrap;
2497
- gap: 4px 8px;
2498
- color: ${f.white};
2499
- }
2500
- `;r.span`
2501
- display: flex;
2502
- align-items: center;
2503
- gap: 10px;
2504
- font-weight: 700;
2505
- color: ${f.dclRed};
2506
- `;const Ct=r.span`
2507
- font-size: 30px;
2508
- line-height: 1;
2509
- `,Cp=r.span`
2510
- display: inline-flex;
2511
- color: ${f.muted2};
2512
- cursor: help;
2513
-
2514
- &:focus-visible {
2515
- outline: 2px solid ${f.accent};
2516
- outline-offset: 2px;
2517
- border-radius: ${Qe.chip};
2518
- }
2519
- `,Ip=r.span`
2520
- font-size: 24px;
2521
- font-weight: 700;
2522
- color: ${f.softWhite};
2523
- margin-right: -2px;
2524
- `,Sp=r.div`
2525
- font-size: 13px;
2526
- margin-top: 6px;
2527
- color: ${f.gray4};
2528
- `;r.div`
2529
- flex-basis: 100%;
2530
- display: flex;
2531
- align-items: center;
2532
- flex-wrap: wrap;
2533
- gap: 8px 12px;
2534
- `;const Ap=r.div`
2535
- font-size: 13px;
2536
- font-weight: 600;
2537
- color: ${f.dclRed};
2538
- `,Mp=r.span`
2539
- display: inline-flex;
2540
- align-items: center;
2541
- color: ${f.muted2};
2542
- text-decoration: line-through;
2543
- font-weight: 400;
2544
- font-size: 20px;
2545
- `;r.span`
2546
- display: inline-flex;
2547
- align-items: center;
2548
- background: ${f.dclRed};
2549
- color: ${f.white};
2550
- font-weight: 800;
2551
- font-size: 13px;
2552
- letter-spacing: 0.03em;
2553
- text-transform: uppercase;
2554
- border-radius: 6px;
2555
- padding: 4px 10px;
2556
- `;r(So)`
2557
- display: inline-flex;
2558
- align-items: center;
2559
- gap: 5px;
2560
- background: ${f.rarityBg};
2561
- color: ${f.accent};
2562
- font-size: 13px;
2563
- font-weight: 700;
2564
- border-radius: 6px;
2565
- padding: 4px 10px;
2566
- white-space: nowrap;
2567
- `;const Pp=r.div`
2568
- display: flex;
2569
- flex-direction: column;
2570
- gap: 12px;
2571
- margin-top: 20px;
2572
-
2573
- ${oe.maxWidth("lg")} {
2574
- order: 6;
2575
-
2576
- &[data-buttons] {
2577
- position: fixed;
2578
- left: 0;
2579
- right: 0;
2580
- bottom: 0;
2581
- z-index: 40;
2582
- margin-top: 0;
2583
- padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
2584
- background: #2b0e44;
2585
- box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
2586
- }
2587
- &[data-dual] {
2588
- flex-direction: row;
2589
- align-items: stretch;
2590
- gap: 12px;
2591
- }
2592
- }
2593
- `,Xt=mt`
2594
- && {
2595
- width: 100%;
2596
- height: 48px;
2597
- border-radius: 16px;
2598
- padding: 0 12px;
2599
- display: flex;
2600
- align-items: center;
2601
- justify-content: center;
2602
- gap: 8px;
2603
- font-size: 15px;
2604
- font-weight: 600;
2605
- line-height: 24px;
2606
- letter-spacing: 0.46px;
2607
- text-transform: uppercase;
2608
- }
2609
- `,Mn=r(Ue)`
2610
- ${Xt};
2611
- /* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
2612
- cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
2613
- sampled off the flattened render rather than the node's fill. */
2614
- && {
2615
- background: ${np.buyBtn};
2616
- }
2617
- &&::before {
2618
- content: none;
2619
- }
2620
- &&:hover:not(:disabled) {
2621
- background-image: linear-gradient(${f.dclRed}, ${f.dclRed});
2622
- }
2623
-
2624
- ${oe.maxWidth("lg")} {
2625
- [data-dual] && {
2626
- flex: 1 1 auto;
2627
- width: auto;
2628
- }
2629
- }
2630
- `,Lp=r(Ue)`
2631
- ${Xt};
2632
- && {
2633
- background: ${f.blackBtn};
2634
- color: ${f.softWhite};
2635
- border: 0;
2636
-
2637
- .ico {
2638
- width: 20px;
2639
- height: 20px;
2640
- }
2641
- }
2642
- &&:hover:not(:disabled) {
2643
- background: ${f.blackBtn};
2644
- filter: brightness(1.35);
2645
- }
2646
- `,ka=r.button`
2647
- align-self: center;
2648
- border: 0;
2649
- background: none;
2650
- padding: 8px 0;
2651
- color: ${a.colors.accent};
2652
- font-weight: 600;
2653
- font-size: 13px;
2654
- line-height: 24px;
2655
- letter-spacing: 0.46px;
2656
- text-transform: uppercase;
2657
- text-decoration: underline;
2658
- cursor: pointer;
2659
-
2660
- /* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
2661
- but invisible against it. Not a change to the shared colour: the other uses live inside
2662
- GaslessNotice, whose light fill is what that accent was picked for. */
2663
- &[data-on-purple] {
2664
- color: ${a.colors.white};
2665
- }
2666
-
2667
- &:disabled {
2668
- opacity: 0.5;
2669
- cursor: default;
2670
- }
2671
- `,Rp=r(Ue)`
2672
- ${Xt};
2673
- && {
2674
- background: rgba(255, 255, 255, 0.2);
2675
- color: ${f.softWhite};
2676
- border: 0;
2677
-
2678
- .ico {
2679
- width: 20px;
2680
- height: 20px;
2681
- }
2682
- }
2683
- &&:hover:not(:disabled) {
2684
- background: rgba(255, 255, 255, 0.3);
2685
- }
2686
- &&:disabled {
2687
- opacity: 0.5;
2688
- }
2689
- `,$a=r(Ue)`
2690
- ${Xt};
2691
- && {
2692
- background: rgba(0, 0, 0, 0.4);
2693
- color: ${f.white};
2694
- border: 0;
2695
- }
2696
- &&:hover:not(:disabled) {
2697
- background: rgba(0, 0, 0, 0.55);
2698
- }
2699
- &&:disabled {
2700
- opacity: 0.5;
2701
- }
2702
- `,Pn=r.span`
2703
- display: none;
2704
- align-items: center;
2705
- gap: 6px;
2706
-
2707
- ${oe.maxWidth("lg")} {
2708
- [data-dual] & {
2709
- display: inline-flex;
2710
- }
2711
- }
2712
- `,Ca=r.button`
2713
- width: 100%;
2714
- height: 48px;
2715
- display: flex;
2716
- align-items: center;
2717
- justify-content: center;
2718
- gap: 8px;
2719
- /* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
2720
- treatment as the card's ADD TO CART. */
2721
- background: rgba(255, 255, 255, 0.2);
2722
- color: ${f.softWhite};
2723
- border: 0;
2724
- border-radius: 16px;
2725
- font-weight: 600;
2726
- font-size: 15px;
2727
- text-transform: uppercase;
2728
- letter-spacing: 0.46px;
2729
- cursor: pointer;
2730
- transition: background 0.15s ease;
2731
-
2732
- &:hover:not(:disabled) {
2733
- background: ${f.softWhite};
2734
- color: ${f.text2};
2735
- }
2736
- &:disabled {
2737
- background: rgba(255, 255, 255, 0.12);
2738
- color: rgba(252, 252, 252, 0.7);
2739
- cursor: default;
2740
- }
2741
-
2742
- ${oe.maxWidth("lg")} {
2743
- [data-dual] & {
2744
- flex: 0 0 auto;
2745
- width: 56px;
2746
- padding: 0;
2747
- }
2748
- [data-dual] & .ico {
2749
- margin: 0;
2750
- }
2751
- }
2752
- `,Ia=r.span`
2753
- ${oe.maxWidth("lg")} {
2754
- [data-dual] & {
2755
- display: none;
2756
- }
2757
- }
2758
- `,Fp=r.p`
2759
- margin: 12px 0 0;
2760
- font-size: 13px;
2761
- color: ${f.gray4};
2762
-
2763
- & a {
2764
- color: ${f.softWhite};
2765
- font-weight: 600;
2766
- }
2767
- `;r.p`
2768
- margin: 4px 0 0;
2769
- font-size: 13px;
2770
- color: ${f.gray4};
2771
-
2772
- & a {
2773
- color: ${f.accent};
2774
- font-weight: 600;
2775
- }
2776
- `;const Tp=r.div`
2777
- max-width: 1721px;
2778
- margin: 0 auto;
2779
- min-height: 46vh;
2780
- display: flex;
2781
- flex-direction: column;
2782
- align-items: center;
2783
- justify-content: center;
2784
- text-align: center;
2785
- gap: 14px;
2786
- color: ${f.softWhite};
2787
- `,Ep=r.p`
2788
- margin: 0;
2789
- color: ${f.gray4};
2790
- `,zp=r(Ue)`
2791
- margin-top: 6px;
2792
- `,Np=r(L)`
2793
- opacity: 0.4;
2794
- `,Bp=r.h1`
2795
- font-size: 22px;
2796
- `,_p=r.div`
2797
- display: flex;
2798
- flex-direction: column;
2799
- `,Sa=r.span`
2800
- display: block;
2801
- height: 15px;
2802
- width: 84px;
2803
- border-radius: 4px;
2804
- `,Wp=r.div`
2805
- display: flex;
2806
- flex-direction: column;
2807
- align-self: stretch;
2808
- gap: 16px;
2809
- padding: 8px 0;
2810
- `,Dp=r.span`
2811
- display: inline-flex;
2812
- align-items: center;
2813
- height: 48px;
2814
- gap: 10px;
2815
- background: none !important;
2816
-
2817
- &::before,
2818
- &::after {
2819
- content: '';
2820
- display: block;
2821
- }
2822
- &::before {
2823
- width: 40px;
2824
- height: 40px;
2825
- border-radius: 50%;
2826
- background: ${f.media};
2827
- }
2828
- &::after {
2829
- width: 96px;
2830
- height: 14px;
2831
- border-radius: 6px;
2832
- background: ${f.media};
2833
- }
2834
- `,qp=r.span`
2835
- height: 34px;
2836
- width: 70%;
2837
- margin: 3px 0;
2838
- border-radius: 8px;
2839
- `,Op=r.div`
2840
- display: flex;
2841
- gap: 8px;
2842
- /* Same as Chips above, so the row does not move when the real chips arrive. */
2843
- margin-top: 12px;
2844
- `,Ln=r.span`
2845
- height: 24px;
2846
- width: 88px;
2847
- border-radius: 6px;
2848
- `,Rn=r.span`
2849
- height: 14px;
2850
- width: 100%;
2851
- border-radius: 6px;
2852
-
2853
- &[data-short] {
2854
- width: 55%;
2855
- }
2856
- `,Kp=r.span`
2857
- display: block;
2858
- height: 30px;
2859
- width: 40%;
2860
- margin: 16px 0 13px;
2861
- border-radius: 8px;
2862
- `,Hp=r.span`
2863
- display: block;
2864
- height: 42px;
2865
- width: 100%;
2866
- border-radius: 8px;
2867
- margin-top: 20px;
2868
- `,Ut=r(Pe)`
2869
- width: 30px;
2870
- height: 30px;
2871
- color: ${f.softWhite};
2872
-
2873
- &[data-was] {
2874
- width: 20px;
2875
- height: 20px;
2876
- color: ${f.gray4};
2877
- }
2878
- `,Fn=r(Pe)`
2879
- width: 20px;
2880
- height: 20px;
2881
- `,Up=r.div`
2882
- display: flex;
2883
- align-items: center;
2884
- justify-content: space-between;
2885
- gap: 8px;
2886
- padding: 8px;
2887
- margin: 16px 0;
2888
- border-radius: ${Qe.btn};
2889
- background: rgba(22, 21, 24, 0.55);
2890
- `,Qp=r.span`
2891
- display: flex;
2892
- align-items: center;
2893
- gap: 8px;
2894
- font-size: 14px;
2895
- line-height: 14px;
2896
- color: ${f.softWhite};
2897
- `,Vp=r(L)`
2898
- width: 20px;
2899
- height: 20px;
2900
- color: ${f.softWhite};
2901
- `,Gp=r(L)`
2902
- width: 24px;
2903
- height: 24px;
2904
- color: ${f.white};
2905
- `,Yp=r.div`
2906
- display: flex;
2907
- align-items: center;
2908
- justify-content: space-between;
2909
- gap: 8px;
2910
- width: 100%;
2911
- margin-top: 16px;
2912
-
2913
- &[data-centered] {
2914
- justify-content: center;
2915
- }
2916
- `,Jp=r.span`
2917
- display: flex;
2918
- align-items: center;
2919
- gap: 2px;
2920
- font-size: 14px;
2921
- font-weight: 600;
2922
- color: ${f.gray4};
2923
-
2924
- & .ico {
2925
- width: 20px;
2926
- height: 20px;
2927
- color: ${f.gray4};
2928
- }
2929
- `,Zp=r.span`
2930
- font-size: 16px;
2931
- font-weight: 700;
2932
- padding-left: 2px;
2933
- `,Bn=r.button`
2934
- border: 0;
2935
- background: none;
2936
- padding: 0;
2937
- cursor: pointer;
2938
- font-family: ${tp.sans};
2939
- font-size: 13px;
2940
- font-weight: 600;
2941
- letter-spacing: 0.46px;
2942
- text-transform: uppercase;
2943
- text-decoration: underline;
2944
- color: ${f.softWhite};
2945
-
2946
- &:hover {
2947
- color: ${f.gray4};
2948
- }
2949
- &:focus-visible {
2950
- outline: 2px solid ${f.white};
2951
- outline-offset: 2px;
2952
- border-radius: ${Qe.chip};
2953
- }
2954
- `,Xp=r(Bn)`
2955
- width: 100%;
2956
- height: 40px;
2957
- text-align: center;
2958
- border-radius: ${Qe.card};
2959
-
2960
- /* Hover is a translucent fill with the label left alone (Figma 868:67246), not the colour shift
2961
- ResellersLink uses. That one is an inline link sitting beside a price, where dimming the text is the
2962
- only surface there is; this is a full-width button, so the button itself is what should react. */
2963
- &:hover {
2964
- color: ${f.softWhite};
2965
- background: ${f.glass};
2966
- }
2967
- `,eh=r.div`
2968
- display: flex;
2969
- flex-direction: column;
2970
- gap: 16px;
2971
- width: 100%;
2972
- padding: 16px 0;
2973
- `,Aa=r.div`
2974
- display: flex;
2975
- align-items: center;
2976
- justify-content: space-between;
2977
- gap: 8px;
2978
- width: 100%;
2979
-
2980
- &[data-variant='original'] {
2981
- color: ${f.muted2};
2982
- }
2983
- `,Ma=r.span`
2984
- display: flex;
2985
- align-items: center;
2986
- gap: 4px;
2987
- font-size: 14px;
2988
- font-weight: 600;
2989
-
2990
- [data-variant='original'] & {
2991
- color: ${f.muted2};
2992
- }
2993
- [data-variant='resale'] & {
2994
- color: ${f.text};
2995
- }
2996
- `,Pa=r.span`
2997
- display: flex;
2998
- align-items: center;
2999
- gap: 2px;
3000
- padding: 0 2px;
3001
-
3002
- [data-variant='original'] & .ico {
3003
- width: 20px;
3004
- height: 20px;
3005
- color: ${f.muted2};
3006
- }
3007
- [data-variant='resale'] & .ico {
3008
- width: 24px;
3009
- height: 24px;
3010
- color: ${f.rarity};
3011
- }
3012
- `,La=r.span`
3013
- [data-variant='original'] & {
3014
- font-size: 16px;
3015
- font-weight: 700;
3016
- text-decoration: line-through;
3017
- }
3018
- [data-variant='resale'] & {
3019
- font-size: 25px;
3020
- font-weight: 700;
3021
- color: ${f.text};
3022
- }
3023
- `,th=r.span`
3024
- font-size: 14px;
3025
- font-weight: 600;
3026
-
3027
- [data-variant='original'] & {
3028
- color: ${f.muted2};
3029
- }
3030
- `,nh=r.span`
3031
- font-size: 14px;
3032
- font-weight: 600;
3033
- color: ${f.text2};
3034
- `,Ra=r.span`
3035
- display: inline-flex;
3036
- width: 12px;
3037
- height: 12px;
3038
- color: ${f.muted2};
3039
- `,rh=r.div`
3040
- display: flex;
3041
- flex-direction: column;
3042
- gap: 12px;
3043
- width: 100%;
3044
- `,ah=r.div`
3045
- display: flex;
3046
- justify-content: center;
3047
- `,en=mt`
3048
- display: block;
3049
- background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
3050
- background-size: 200% 100%;
3051
- animation: shimmer 1.4s infinite linear;
3052
-
3053
- @media (prefers-reduced-motion: reduce) {
3054
- animation: none;
3055
- }
3056
- `,ih=r.div`
3057
- display: flex;
3058
- flex-direction: column;
3059
- gap: 12px;
3060
- width: 100%;
3061
- /* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
3062
- padding-top: 4px;
3063
- `,sh=r.span`
3064
- ${en};
3065
- width: 120px;
3066
- height: 30px;
3067
- border-radius: ${Qe.btn};
3068
- margin-bottom: 4px;
3069
- `,Fa=r.span`
3070
- ${en};
3071
- width: 100%;
3072
- height: 48px;
3073
- border-radius: 16px;
3074
- `,Ta=r.div`
3075
- display: flex;
3076
- align-items: center;
3077
- gap: 12px;
3078
- `,Ea=r.span`
3079
- ${en};
3080
- flex: none;
3081
- width: 48px;
3082
- height: 48px;
3083
- border-radius: 50%;
3084
- `,za=r.span`
3085
- ${en};
3086
- width: 96px;
3087
- height: 16px;
3088
- border-radius: 6px;
3089
- `;function oh(t){return Object.values(Ae.Rarity).includes(t)}function lh(t){return t==="male"?n("itemDetail.genderMale"):t==="female"?n("itemDetail.genderFemale"):t==="unisex"?n("itemDetail.genderUnisex"):null}function Qt(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?n("itemDetail.categoryEmote"):n("itemDetail.categoryWearable")}const Na=8;function Dh(){const{pathname:t}=_a();return e.jsx(dh,{},t)}function dh(){var Ir,Sr,Ar;const{contractAddress:t,itemId:s,tokenId:d}=Hi(),o=pn(t),l=Tc(o),p=pn(s),x=pn(d),v=!!x,g=p??Bl(x)??null,$=_a(),h=$.state,j=st(),b=!!(h!=null&&h.market),k=(h==null?void 0:h.marketPriceCredits)??null,I=ft(),C=St(u=>u.add),A=go(u=>u.spent),q=St(u=>u.items),M=Fs(u=>u.toggle),{session:y,signIn:H}=rt(),[i,K]=c.useState(()=>{if(h!=null&&h.item){const u={...h.item,tradeId:h.tradeId??h.item.tradeId};return v?{...u,tokenId:x,itemId:u.itemId??g}:{...u,tokenId:void 0,itemId:p??u.itemId}}return{id:`${o}-${x??p}`,name:"",creator:"",contractAddress:o??"",itemId:g,category:"wearable",rarity:"common",network:"MATIC",chainId:nt.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:x??void 0,tradeId:h==null?void 0:h.tradeId}}),[V,G]=c.useState(!1),[Y,ne]=c.useState(!!(h!=null&&h.resumeBuy));c.useEffect(()=>{h!=null&&h.resumeBuy&&G(!0)},[h==null?void 0:h.resumeBuy]);function ee(){const u=i.priceCredits>0?i.priceCredits:null;Z("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:u,cart_value_usd:u===null?null:Zs(u)}),G(!0)}function xe(){if(y){ee();return}b||vo({type:"item-buy",path:$.pathname}),H()}const pe=c.useRef(!1);c.useEffect(()=>{if(!y||pe.current)return;const u=bo("item-buy");!u||u.path!==$.pathname||(pe.current=!0,ne(!0),ee())},[y]);const le=c.useMemo(()=>i.contractAddress&&(i.itemId??g)?[`${i.contractAddress.toLowerCase()}-${i.itemId??g}`]:void 0,[i.contractAddress,i.itemId,g]),W=Ts(Na,{exclude:le}),E=Es({enabled:W.enabled,hasSignal:W.hasSignal,isLoading:W.isLoading,isError:W.isError,personalized:(Ir=W.result)==null?void 0:Ir.personalized,rowCount:zs(((Sr=W.result)==null?void 0:Sr.data)??[]).length}),{items:B,isCollectionOnly:m,siblings:re,siblingsFetched:S}=Fc({id:i.id,contractAddress:i.contractAddress,itemId:i.itemId??g,tokenId:i.tokenId,creator:i.creator}),{data:T,isLoading:z}=ie({queryKey:["shop-item",i.contractAddress,g],enabled:!b&&!v&&!!i.contractAddress&&!!g,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>eo(i.contractAddress,g)}),D=v?void 0:T;c.useEffect(()=>{D&&K(u=>u.tradeId?{...u,tradeId:D.tradeId,priceCredits:D.priceCredits,manaWei:D.manaWei,available:D.available??u.available,acquisition:D.acquisition,wearableCategory:u.wearableCategory??D.wearableCategory}:{...u,...D})},[D]);const[ae,ve]=c.useState(!1),{data:J=""}=ie({queryKey:["item-desc",i.contractAddress,i.itemId],enabled:!!i.contractAddress&&!!i.itemId,staleTime:5*6e4,queryFn:()=>to(i.contractAddress,i.itemId)}),{data:U,isLoading:X}=ie({queryKey:["collection-meta",i.contractAddress],enabled:!!i.contractAddress,staleTime:5*6e4,queryFn:()=>Oa(i.contractAddress)});c.useEffect(()=>{const u=(D==null?void 0:D.creator)||(U==null?void 0:U.creator);u&&K(se=>se.creator?se:{...se,creator:u})},[D,U]);const fe=c.useMemo(()=>{if(!(v||i.name||D||re.length===0))return(g?re.find(u=>u.itemId===g):void 0)??re.find(u=>u.contractAddress===i.contractAddress)},[v,i.name,i.contractAddress,D,re,g]);c.useEffect(()=>{fe&&K(u=>({...fe,tradeId:u.tradeId??fe.tradeId}))},[fe]);const{data:je,isLoading:ke}=ie({queryKey:["detail-trade",i.id,i.tradeId,i.contractAddress,i.itemId],enabled:!!i.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(i.tradeId)return i.tradeId;if(!v&&i.itemId){const u=await no(i.contractAddress,i.itemId);return(u==null?void 0:u.id)??null}return null}}),{data:Q}=ie({queryKey:["item-traits",i.contractAddress,g],enabled:!!i.contractAddress&&!!g,staleTime:5*6e4,retry:1,queryFn:()=>ro(i.contractAddress,g)}),ot=(Q==null?void 0:Q.isSmart)??i.isSmart,Le=(Q==null?void 0:Q.utility)??null,$e=c.useMemo(()=>({...i,wearableCategory:i.wearableCategory??(Q==null?void 0:Q.wearableCategory)??void 0,gender:i.gender??(Q==null?void 0:Q.gender)??null}),[i,Q==null?void 0:Q.wearableCategory,Q==null?void 0:Q.gender]),gt=(Q==null?void 0:Q.urn)??null,{data:At}=ie({queryKey:["item-vrm",gt],enabled:!!gt&&i.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>ao(gt)}),[tn,Mt]=c.useState(!1),{data:bt}=ie({queryKey:["item-video",i.contractAddress,g],enabled:ot&&!!i.contractAddress&&!!g,staleTime:30*6e4,retry:!1,queryFn:()=>Mo(i.contractAddress,g)}),Ce=c.useMemo(()=>i.emoteLoop!==void 0?i:(g?re.find(se=>se.itemId===g):void 0)??i,[i,re,g]),Re=qr(I,i.tradeId)??qr(I,je),nn=i.acquisition==="store"&&(i.available??0)>0,de=!!Re||nn,lt=Ns(),{data:Fe=[]}=ie({queryKey:["item-resales",i.contractAddress,i.itemId],enabled:lt&&!b&&!!i.contractAddress&&!!i.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Va(i.contractAddress,i.itemId)}),Ke=Fe.length>0?Fe[0].priceCredits:null,Ve=v&&i.tokenId?Fe.find(u=>u.tokenId===i.tokenId)??null:null,Ie=c.useMemo(()=>{const u=Fe[0];return u?{...u,name:u.name||i.name,thumbnail:u.thumbnail||i.thumbnail,rarity:u.rarity||i.rarity,category:u.category||i.category,wearableCategory:u.wearableCategory??i.wearableCategory,gender:u.gender??i.gender}:null},[Fe,i]),[Pt,yt]=c.useState(null),[wt,Ge]=c.useState(!1),[rn,w]=c.useState(!1),[P,F]=c.useState(!1),R=i.manaWei??null,{data:O}=Qa(b||!!R),te=R&&O?Bs(R,O):null;c.useEffect(()=>{te!=null&&K(u=>u.priceCredits===te?u:{...u,priceCredits:te})},[te,i.priceCredits]);const _=c.useMemo(()=>{if(!b||!(h!=null&&h.item))return null;const u=h.item;return u.manaWei?{tradeId:u.tradeId??u.id,listingType:"primary",contractAddress:u.contractAddress,itemId:u.itemId??"",name:u.name,thumbnail:u.thumbnail,rarity:u.rarity,category:u.category,wearableCategory:u.wearableCategory??null,creator:u.creator,manaWei:u.manaWei,available:1,network:u.network,chainId:u.chainId,createdAt:0}:null},[b,h==null?void 0:h.item]),he=b&&k!=null&&!!O&&!!_,De=_s({priceCredits:i.priceCredits,compareAtCredits:i.compareAtCredits,saleEndsAt:i.saleEndsAt}),ye=(()=>{var we,ct;if(!De)return null;const u=yo(A,i.coupon),se=Number(((ct=(we=i.coupon)==null?void 0:we.checks)==null?void 0:ct.uses)??0);return se>0&&u<=se?{claimed:u,total:se}:null})(),Lt=(()=>{if(!De||i.saleUnitsLeft==null)return null;const u=ye?ye.total-ye.claimed:1/0;return i.saleUnitsLeft<u?i.saleUnitsLeft:null})(),Te=c.useMemo(()=>({...i,tradeId:Re,id:Re??i.id}),[i,Re]),an=q.some(u=>u.id===Te.id),Rt=!Te.tokenId,Ai=((Ar=q.find(u=>u.id===Te.id))==null?void 0:Ar.quantity)??0,sn=Rt&&typeof i.available=="number"&&Ai>=i.available,{key:Un,faved:Ye}=Ws(i),He=Ds(i),Mi=Ua(u=>u.locale),Ft=He===void 0?null:He.toLocaleString(Mi),Qn=Ye?n("assetCard.removeFromFavorites"):n("assetCard.addToFavorites"),Vn=He===void 0?Qn:n("itemDetail.favoriteAria",{action:Qn,count:He}),Gn=c.useRef(null);c.useEffect(()=>{!i.name||ke||Gn.current===i.id||(Gn.current=i.id,Z("Shop Viewed Item",{...qs(i),for_sale:de}),Os(i))},[i.id,i.name,ke,de]);const Tt=`${o}/${x??p}`,Yn=c.useRef(Tt);c.useEffect(()=>{if(Yn.current!==Tt){if(Yn.current=Tt,h!=null&&h.item){const u={...h.item,tradeId:h.tradeId??h.item.tradeId};K(v?{...u,tokenId:x,itemId:u.itemId??g}:{...u,tokenId:void 0,itemId:p??u.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[Tt]);function Pi(){!de||on||ke||!Rt&&an||sn||C(Te,"item_detail")}const Je=oh(i.rarity)?i.rarity:Ae.Rarity.COMMON,Jn=lh($e.gender),Et=Ks($e),Zn=Hs($e.gender),Xn=Yu(i.rarity),er=Ju($e),tr=de&&De,Li=m?n("itemDetail.moreFromCollection"):n("itemDetail.youMightAlsoLike"),on=Us(i,y==null?void 0:y.address),[Ri,nr]=c.useState(!1),[Fi,rr]=c.useState(!1),[Ti,ar]=c.useState(!1),[Ei,ir]=c.useState(!1),[vt,jt]=c.useState(null),[zi,sr]=c.useState(!1),[or,lr]=c.useState(!1),dr=Gt(y==null?void 0:y.providerType),{data:N,isLoading:zt}=ie({queryKey:["owned-token",i.contractAddress,i.tokenId,y==null?void 0:y.address],enabled:!b&&!!(y!=null&&y.address)&&!!i.contractAddress&&!!i.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>y?Rr(y.address,i.contractAddress,i.tokenId):null});c.useEffect(()=>{N&&K(u=>u.name?{...u,issuedId:u.issuedId??N.issuedId,priceCredits:N.listingPrice??0,tradeId:N.tradeId}:{id:N.id,name:N.name,creator:"",contractAddress:N.contractAddress,itemId:N.itemId,category:N.category,rarity:N.rarity??"common",network:N.network,chainId:N.chainId,thumbnail:N.image,priceCredits:N.listingPrice??0,gender:null,isSmart:!1,tokenId:N.tokenId,issuedId:N.issuedId,tradeId:N.tradeId})},[N]),c.useEffect(()=>{Ve&&K(u=>u.priceCredits===Ve.priceCredits&&u.tradeId?u:{...u,priceCredits:Ve.priceCredits,tradeId:u.tradeId??Ve.tradeId})},[Ve]),c.useEffect(()=>{vt!=null&&N!=null&&N.isOnSale&&N.listingPrice===vt&&jt(null)},[N,vt]);const cr=!b&&!!i.contractAddress&&!!i.tokenId&&!i.name&&!D&&!zt&&!N,{data:ce,isFetched:Ni}=ie({queryKey:["public-token",i.contractAddress,i.tokenId],enabled:cr,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>io(i.contractAddress,i.tokenId)});c.useEffect(()=>{ce&&K(u=>u.name?u.issuedId?u:{...u,issuedId:ce.issuedId}:{id:ce.id,name:ce.name,creator:"",contractAddress:ce.contractAddress,itemId:ce.itemId,category:ce.category,rarity:ce.rarity??"common",network:ce.network,chainId:ce.chainId,thumbnail:ce.image,priceCredits:ce.listingPrice??0,gender:null,isSmart:!1,tokenId:ce.tokenId,issuedId:ce.issuedId,tradeId:ce.tradeId})},[ce]);const{data:Ee}=ie({queryKey:["publishable-item",i.contractAddress,i.itemId,y==null?void 0:y.address],enabled:on&&!!y&&!!i.itemId,queryFn:async()=>y?(await Po(y.address,y.identity)).find(se=>se.contractAddress.toLowerCase()===i.contractAddress.toLowerCase()&&se.blockchainItemId===i.itemId)??null:null}),ze=v&&!!N,ln=!v&&on,Ne=!b&&(ln||ze),ur=vt!=null?!0:ze?!!(N!=null&&N.isOnSale):de,Nt=ze?N==null?void 0:N.tradeId:Re,pr=ze?!!N:!!Ee,hr=ln||ze&&lt,dn=vt??(ze?(N==null?void 0:N.listingPrice)??0:0),{data:xr=0}=ie({queryKey:["owned-item-count",i.contractAddress,p,y==null?void 0:y.address],enabled:!v&&!b&&!!(y!=null&&y.address)&&!!i.contractAddress&&!!p,staleTime:3e4,queryFn:()=>y?so(y.address,i.contractAddress,p):0});async function Ze(){await Promise.all([I.invalidateQueries({queryKey:["owned-token",i.contractAddress,i.tokenId]}),I.invalidateQueries({queryKey:["detail-trade"]}),I.invalidateQueries({queryKey:["shop-item"]}),I.invalidateQueries({queryKey:["collection-sale-state"]}),I.invalidateQueries({queryKey:["shop-items"]}),I.invalidateQueries({queryKey:["catalog-items"]}),I.invalidateQueries({queryKey:["publishable-items"]}),I.invalidateQueries({queryKey:["publishable-item",i.contractAddress,i.itemId]}),I.invalidateQueries({queryKey:["item-resales",i.contractAddress,i.itemId]})])}async function Bi(u){if(!y||!Nt)throw new Error("No listing to take down");const se=await Ha(Nt);await $o({trade:se,signer:y.signer,mode:u.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(ze){if(!i.tokenId)return!1;const we=await Rr(y.address,i.contractAddress,i.tokenId);return we!==null&&!we.isOnSale}return i.itemId?await Xs(i.contractAddress,i.itemId)===null:!1}catch{return!1}},onWaiting:u.onWaiting}}),u.silent||Zt.success(n("myAssets.removedFromSale",{name:i.name})),jt(null),_l(I,Nt),K(we=>we.tradeId===Nt?{...we,tradeId:void 0}:we),Ze(),hn(I,{address:y.address,contractAddress:i.contractAddress,tokenId:i.tokenId},{kind:"removed"})}const fr=u=>async({payGas:se,onWaiting:we})=>{try{return await Bi({silent:u,payGas:se,onWaiting:we}),"ok"}catch(ct){if(ct instanceof ko)return ct.definitive?"relay-reverted":"relay-pending";throw ct}},mr={currentCredits:dn||i.priceCredits||void 0,canPayGas:dr,cancelCurrent:fr(!0)};function gr({edit:u=!1}={}){u||Z("Shop Started Listing",{listing_type:ze?"secondary":"primary",item_id:i.itemId??i.tokenId??null}),lr(u),ze?nr(!0):rr(!0)}function br(){nr(!1),rr(!1),lr(!1),Ze()}const yr=de?ke?n("itemDetail.checking"):sn?n("itemDetail.maxInCart"):!Rt&&an?n("assetCard.inCart"):n("assetCard.addToCart"):n("itemDetail.notForSale"),kt=i.available??(Q==null?void 0:Q.available)??null,_i=typeof kt=="number"&&kt>0&&!i.tokenId&&!b,wr=!b&&!i.tokenId&&kt===0,vr=i.network==="ETHEREUM",dt=wr&&!Ne&&!!Ie,Bt=!!Ie&&q.some(u=>u.id===Ie.id),Wi=!Ne&&de&&!b,Di=b||!Ne&&(de||dt&&!!Ie||wi()),qi=!i.name&&(!!D||!!N||!!ce||!!fe),jr=z||!!i.contractAddress&&!S||!i.name&&zt||qi||cr&&!Ni,kr=!i.name&&!jr,Oi=!!i.name&&Wl({isMarket:b,forSale:de,priceKnown:i.priceCredits>0&&(!R||te!=null)||Ne,stillResolving:jr||!!R&&te==null,manage:Ne,soldOutWithResale:dt,resolvingTrade:ke,isTokenRoute:v,ownedAssetLoading:zt,deepLinkLoading:z}),$r=!i.creator&&(z||X||zt),Cr=!(U!=null&&U.name)&&X,Ki=/^https?:\/\//i.test(i.thumbnail);return Qs(kr?{title:n("seo.item.notFoundTitle"),noindex:!0}:i.name?{title:i.name,description:J||n("seo.item.fallbackDescription",{name:i.name,rarity:i.rarity,category:Qt($e),creator:Wn(i.creator)}),image:Ki?i.thumbnail:void 0,type:"product"}:{}),kr?e.jsxs(Tp,{"data-notfound":!0,children:[e.jsx(Np,{name:"cart"}),e.jsx(Bp,{children:n("itemDetail.notAvailableTitle")}),e.jsx(Ep,{children:n("itemDetail.notAvailableBody")}),e.jsx(zp,{variant:"white",onClick:()=>j("/items"),children:n("notFound.cta")})]}):e.jsxs(rp,{children:[e.jsxs(ap,{"aria-label":n("itemDetail.breadcrumbAria"),children:[e.jsx(ip,{onClick:()=>j("/items"),children:n("nav.collectibles")}),e.jsx(sp,{children:"/"}),e.jsx(op,{children:i.name||n("itemDetail.itemFallback")})]}),e.jsxs(lp,{style:{"--glow-rgb":Ys(Je),"--glow-core":Gs(Je)},children:[e.jsxs(dp,{"data-testid":"item-preview",children:[i.name?e.jsx(Wc,{item:i}):e.jsx(cp,{"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(up,{className:"skeleton","aria-hidden":!0})}),Un?e.jsxs(ya,{"data-fav-preview":!0,"data-on":Ye||void 0,"data-count":Ft??void 0,onClick:()=>M(i,"item_detail"),"aria-pressed":Ye,"aria-label":Vn,children:[e.jsx(L,{name:Ye?"heart-solid":"heart",size:18}),He!==void 0?e.jsx(wa,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count-preview",children:Ft}):null]}):null,bt?e.jsxs(fp,{"data-play-showcase":!0,onClick:()=>Mt(!0),"data-testid":"play-showcase",children:[e.jsx(L,{name:"play",size:18}),n("itemDetail.playShowcase")]}):null]}),e.jsx(pp,{"data-testid":"item-info",children:i.name?e.jsxs(e.Fragment,{children:[tr&&i.compareAtCredits!=null?e.jsx(vp,{pct:Vs(i.compareAtCredits,i.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(hp,{children:[e.jsxs(xp,{children:[i.name,v&&i.issuedId?` #${i.issuedId}`:""]}),Un?e.jsxs(ya,{"data-fav-title":!0,"data-on":Ye||void 0,"data-count":Ft??void 0,onClick:()=>M(i,"item_detail"),"aria-pressed":Ye,"aria-label":Vn,children:[e.jsx(L,{name:Ye?"heart-solid":"heart",size:18}),He!==void 0?e.jsx(wa,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count",children:Ft}):null]}):null]}),e.jsxs(mp,{children:[Xn?e.jsx(qt,{content:Lr(i.rarity),children:e.jsx(Ht,{to:Xn,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Pr(Je)},children:i.rarity})}):e.jsx(qt,{content:Lr(i.rarity),children:e.jsx(Be,{"data-variant":"rarity",style:{background:Pr(Je)},children:i.rarity})}),er?e.jsxs(Ht,{to:er,"data-testid":"detail-category-link",title:n("filter.browseByCategory",{category:Qt($e)}),children:[Et?e.jsx(L,{name:Et,size:18}):null,Qt($e)]}):e.jsxs(Be,{children:[Et?e.jsx(L,{name:Et,size:18}):null,Qt($e)]}),Jn?e.jsxs(Be,{children:[Zn?e.jsx(L,{name:Zn,size:18}):null,Jn]}):null,!v&&i.issuedId?e.jsxs(Be,{"data-testid":"detail-issued",children:["#",i.issuedId]}):null,l?e.jsxs(Ht,{to:"/event","data-testid":"detail-event",title:l,children:[e.jsx(L,{name:"star-rounded",size:18}),l]}):null,ot?e.jsxs(Ht,{to:Zu(),"data-testid":"detail-smart",title:n("filter.browseBySmart"),children:[e.jsx(L,{name:"smart",size:18}),n("itemDetail.smart")]}):null,Ce.emoteLoop!==void 0?e.jsxs(Be,{"data-testid":"detail-play-mode",children:[e.jsx(L,{name:Ce.emoteLoop?"play-loop":"play-once",size:18}),Ce.emoteLoop?n("itemDetail.playLoop"):n("itemDetail.playOnce")]}):null,Ce.emoteHasSound?e.jsxs(Be,{"data-testid":"detail-sound",children:[e.jsx(L,{name:"sound",size:18}),n("itemDetail.emoteSound")]}):null,Ce.emoteHasProps?e.jsxs(Be,{"data-testid":"detail-props",children:[e.jsx(L,{name:"props",size:18}),n("itemDetail.emoteProps")]}):null,At?e.jsx(qt,{content:n("itemDetail.exportBlockedTooltip"),children:e.jsxs(Be,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":n("itemDetail.exportBlockedTooltip"),children:[e.jsx(L,{name:"ban",size:16}),n("itemDetail.exportBlocked")]})}):null,Le?e.jsxs(Be,{"data-testid":"detail-utility-chip",children:[e.jsx(L,{name:"utility",size:18}),n("itemDetail.utility")]}):null]}),J||Le?e.jsxs($i,{children:[J?e.jsx(Nn,{children:e.jsxs(zn,{children:[e.jsx(pt,{children:n("itemDetail.description")}),e.jsx(va,{"data-expanded":ae||void 0,children:J}),J.length>140?e.jsx(bp,{className:"link",onClick:()=>ve(u=>!u),children:ae?n("itemDetail.showLess"):n("itemDetail.readMore")}):null]})}):null,Le?e.jsx(Nn,{children:e.jsxs(zn,{"data-testid":"detail-utility",children:[e.jsx(pt,{children:n("itemDetail.utility")}),e.jsx(va,{"data-expanded":!0,children:Le})]})}):null]}):null,!vr&&(i.creator||$r)||U!=null&&U.name||Cr?e.jsxs(Ci,{children:[vr?null:i.creator?e.jsxs(It,{children:[e.jsx(pt,{children:n("itemDetail.creator")}),e.jsx(yp,{address:i.creator,linkToProfile:!0,hidePrefix:!0})]}):$r?e.jsxs(It,{children:[e.jsx(pt,{children:n("itemDetail.creator")}),e.jsxs(Ta,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(Ea,{}),e.jsx(za,{})]})]}):null,U!=null&&U.name?e.jsxs(It,{"data-collection":!0,children:[e.jsx(pt,{children:n("itemDetail.collection")}),e.jsx(wp,{contractAddress:i.contractAddress,name:U.name,items:re})]}):Cr?e.jsxs(It,{"data-collection":!0,children:[e.jsx(pt,{children:n("itemDetail.collection")}),e.jsxs(Ta,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(Ea,{}),e.jsx(za,{})]})]}):null]}):null,e.jsx(Si,{}),Oi?e.jsxs(ih,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(sh,{}),e.jsx(Fa,{}),e.jsx(Fa,{})]}):e.jsxs(e.Fragment,{children:[lt&&!Ne&&!b&&de&&!i.tokenId?e.jsxs(Up,{"data-testid":"buy-from-creator",children:[e.jsxs(Qp,{children:[e.jsx(Vp,{name:"buy-from-creator"}),n("itemDetail.buyFromCreator")]}),e.jsx(Gp,{name:"check-rounded"})]}):null,dt?e.jsxs(eh,{"data-testid":"sold-out",children:[e.jsxs(Aa,{"data-variant":"original",children:[e.jsxs(Ma,{children:[n("itemDetail.originalPrice"),e.jsxs(Pa,{children:[e.jsx(Pe,{className:"ico"}),e.jsx(La,{children:e.jsx(ge,{credits:i.priceCredits})})]}),e.jsx(Ra,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsx(th,{"data-testid":"out-of-stock",children:n("itemDetail.soldOut")})]}),e.jsxs(Aa,{"data-variant":"resale",children:[e.jsxs(Ma,{children:[n("itemDetail.resalePrice"),e.jsxs(Pa,{children:[e.jsx(Pe,{className:"ico"}),e.jsx(La,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(Ra,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsxs(nh,{children:[n("itemDetail.stock")," ",Fe.length,"/",Ae.Rarity.getMaxSupply(Je).toLocaleString()]})]})]}):e.jsxs(jp,{children:[e.jsxs(kp,{children:[e.jsxs($p,{children:[b||de?e.jsx(An,{children:n("itemDetail.price")}):null,b?e.jsxs(e.Fragment,{children:[e.jsx($t,{"data-variant":"market","data-testid":"item-price",children:k==null?e.jsx(Ct,{children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx(Ip,{"aria-hidden":!0,children:"≈"}),e.jsx(Ut,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:k})})]})}),e.jsx(Sp,{children:n("assetCard.marketPrice")})]}):de?tr?e.jsxs($t,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Ut,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:i.priceCredits})}),e.jsx(Mp,{"data-testid":"detail-price-was",children:e.jsx(ge,{credits:i.compareAtCredits})}),e.jsx(Ao,{until:i.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs($t,{"data-testid":"item-price",children:[e.jsx(Ut,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:i.priceCredits})})]}):ur&&dn?e.jsxs($t,{"data-testid":"item-price",children:[e.jsx(Ut,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:dn})})]}):Ne?null:e.jsxs($t,{"data-variant":"none","data-testid":"item-price",children:[e.jsx("span",{children:n("itemDetail.notForSale")}),e.jsx(qt,{content:n("itemDetail.notForSaleHint"),children:e.jsx(Cp,{tabIndex:0,role:"img","aria-label":n("itemDetail.notForSaleHint"),children:e.jsx(L,{name:"info",size:14})})})]})]}),_i?e.jsxs(ja,{children:[e.jsx(An,{children:n("itemDetail.stock")}),e.jsxs(Sn,{children:[(kt??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Je).toLocaleString()]})]}):wr?e.jsxs(ja,{children:[e.jsx(An,{children:n("itemDetail.stock")}),e.jsxs(Sn,{children:[(kt??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Je).toLocaleString()]}),e.jsx(Sn,{"data-out":!0,"data-testid":"out-of-stock",children:n("itemDetail.outOfStock")})]}):null]}),ye?e.jsx(Vu,{claimed:ye.claimed,total:ye.total,testId:"detail-offer-stock"}):null,Lt!=null?e.jsx(Ap,{"data-testid":"detail-units-left",children:n("assetCard.unitsLeftAtThisPrice",{count:Lt})}):null]}),e.jsx(Pp,{"data-buttons":Di||void 0,"data-dual":Wi||void 0,children:b?e.jsxs(Mn,{variant:"purple",onClick:xe,disabled:!he,children:[e.jsx("span",{children:n("assetCard.buyNow")}),k!=null?e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:k})]}):null]}):Ne?e.jsxs(rh,{"data-testid":"manage-actions",children:[ur?e.jsxs(e.Fragment,{children:[hr?e.jsxs(Rp,{onClick:()=>gr({edit:!0}),disabled:!pr,"data-testid":"edit-price",children:[e.jsx(L,{name:"pen",className:"ico"}),e.jsx("span",{children:n("itemDetail.manageUpdatePrice")})]}):null,e.jsx($a,{onClick:()=>sr(!0),"data-testid":"remove-listing",children:e.jsx("span",{children:n("itemDetail.manageRemove")})})]}):e.jsxs(e.Fragment,{children:[hr?e.jsx(Lp,{onClick:()=>gr(),disabled:!pr,children:e.jsx("span",{children:n("itemDetail.manageList")})}):null,ze?e.jsxs(e.Fragment,{children:[e.jsx($a,{onClick:()=>ar(!0),children:e.jsx("span",{children:n("itemDetail.manageTransfer")})}),e.jsx(ka,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>w(!0),children:n("itemDetail.manageResell")})]}):null]}),ln&&Ee?e.jsx(ka,{type:"button","data-on-purple":!0,onClick:()=>ir(!0),children:n("itemDetail.manageIssue")}):null,Ke!=null?e.jsx(ah,{children:e.jsx(Bn,{onClick:()=>Ge(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})}):null]}):de?e.jsxs(e.Fragment,{children:[e.jsxs(Mn,{variant:"purple",onClick:xe,disabled:ke,children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:i.priceCredits})]})]}),e.jsxs(Ca,{onClick:Pi,disabled:ke||(Rt?sn:an),"aria-label":yr,children:[e.jsx(L,{name:"cart"}),e.jsx(Ia,{children:yr})]})]}):dt&&Ie?e.jsxs(e.Fragment,{children:[e.jsxs(Mn,{variant:"purple",onClick:()=>y?yt(Ie):H(),children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:Ie.priceCredits})]})]}),e.jsxs(Ca,{onClick:()=>{Bt||C(Ie,"item_detail")},disabled:Bt,"aria-label":Bt?n("assetCard.inCart"):n("assetCard.addToCart"),children:[e.jsx(L,{name:"cart"}),e.jsx(Ia,{children:Bt?n("assetCard.inCart"):n("assetCard.addToCart")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(qu,{item:i}),i.itemId?e.jsx(Xp,{onClick:()=>{Z("Shop Clicked Buy Resale",{item_id:i.itemId,contract_address:i.contractAddress,has_shop_resale:!!Ie}),F(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:n("itemDetail.buyResale")}):null]})}),!Ne&&!b&&Ke!=null?e.jsxs(Yp,{"data-testid":"lowest-price","data-centered":dt||void 0,children:[dt?null:e.jsxs(Jp,{children:[n("itemDetail.lowestPrice"),e.jsx(Pe,{className:"ico"}),e.jsx(Zp,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(Bn,{onClick:()=>Ge(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})]}):null,!Ne&&!b&&xr>0?e.jsxs(Fp,{"data-testid":"you-own-note",children:[n("itemDetail.youOwnN",{count:xr})," ",e.jsx(Ba,{to:"/my-items",children:n("nav.myAssets")})]}):null]})]}):e.jsx(ch,{})})]}),e.jsx(Js,{exclude:le,title:n("itemDetail.becauseYouOwn"),surface:"pdp",first:Na}),E!==null&&e.jsx(wo,{title:Li,items:B,onViewAll:m&&i.contractAddress?()=>j(`/collection/${i.contractAddress}`):void 0}),V&&b&&_&&O?e.jsx(xi,{listing:_,rate:O,onClose:()=>G(!1),onSold:()=>G(!1)}):V&&!b?e.jsx(En,{item:Te,resume:Y,onClose:()=>{G(!1),ne(!1)}}):null,Pt?e.jsx(En,{item:Pt,onClose:()=>{yt(null),Ze()}}):null,lt&&wt&&i.itemId?e.jsx(fu,{item:i,onClose:()=>Ge(!1)}):null,rn&&x?e.jsx(xa,{contractAddress:o??"",tokenId:x,onClose:()=>w(!1)}):null,P&&i.itemId&&o?e.jsx(xa,{variant:"buy",contractAddress:o,itemId:i.itemId,onClose:()=>F(!1)}):null,Ri&&N&&y?e.jsx(gd,{asset:N,session:y,creator:i.creator,edit:or?mr:void 0,onListed:(u,se)=>{jt(u),Ze(),hn(I,{address:y.address,contractAddress:i.contractAddress,tokenId:i.tokenId},{kind:"listed",priceCredits:u,tradeId:se})},onClose:br}):null,zi&&y?e.jsx(_d,{name:i.name,managed:Dn(y),canPayGas:dr,cancel:fr(!1),onClose:()=>sr(!1)}):null,Ti&&y&&i.tokenId?e.jsx(zd,{item:{contractAddress:i.contractAddress,chainId:i.chainId,tokenId:i.tokenId,name:i.name,thumbnail:i.thumbnail},session:y,onClose:()=>{ar(!1),Ze()},onTransferred:()=>{jt(null),Ze(),hn(I,{address:y.address,contractAddress:i.contractAddress,tokenId:i.tokenId},{kind:"gone"})}}):null,Fi&&Ee&&y?e.jsx(oc,{item:Ee,session:y,edit:or?mr:void 0,onListed:(u,se)=>{jt(u),K(we=>({...we,tradeId:se}))},onClose:br}):null,Ei&&Ee&&y?e.jsx(Rl,{item:{contractAddress:Ee.contractAddress,chainId:nt.chainId,itemId:Ee.blockchainItemId,name:Ee.name,thumbnail:Ee.thumbnail,available:Ee.remainingSupply},session:y,onClose:()=>{ir(!1),Ze()}}):null,tn&&bt?e.jsx(xc,{src:bt,itemName:i.name,onClose:()=>Mt(!1)}):null]})}function ch(){return e.jsxs(_p,{"aria-hidden":!0,children:[e.jsx(qp,{className:"skeleton"}),e.jsxs(Op,{children:[e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"})]}),e.jsx($i,{children:[0,1].map(t=>e.jsx(Nn,{children:e.jsxs(zn,{children:[e.jsx(Sa,{className:"skeleton"}),e.jsxs(Wp,{children:[e.jsx(Rn,{className:"skeleton"}),e.jsx(Rn,{className:"skeleton"}),e.jsx(Rn,{className:"skeleton","data-short":!0})]})]})},t))}),e.jsx(Ci,{children:[0,1].map(t=>e.jsxs(It,{...t===1?{"data-collection":!0}:{},children:[e.jsx(Sa,{className:"skeleton"}),e.jsx(Dp,{})]},t))}),e.jsx(Si,{}),e.jsx(Kp,{className:"skeleton"}),e.jsx(Hp,{className:"skeleton"})]})}export{dh as ItemDetail,Dh as ItemDetailRoute,dh as default};
3090
- //# sourceMappingURL=ItemDetail-Bvjk0t3i.js.map