@dcl/shop 1.17.1 → 1.17.2-36157867735.commit-7431f7b

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 (251) hide show
  1. package/_assets/{Activity-BNjXw97e.js → Activity-CE6Jeo_T.js} +9 -9
  2. package/_assets/{AnimatedBackground-kFDegzCM.js → AnimatedBackground-D5MFl62Y.js} +3 -3
  3. package/_assets/{Assets-D_dCmUv0.js → Assets-COp5lo1c.js} +7 -7
  4. package/_assets/{Cart-BPv_4JHc.js → Cart-CXTYKHB4.js} +5 -5
  5. package/_assets/{Collection-2qp7F46n.js → Collection-D6GAA887.js} +7 -7
  6. package/_assets/{CollectionCarousel-CXiZiW-S.js → CollectionCarousel-C_r2HthR.js} +7 -7
  7. package/_assets/{Confetti-Bsu2ytMi.js → Confetti-DPZN6qJi.js} +4 -4
  8. package/_assets/{ConstantsUtil-czCTnHYO.js → ConstantsUtil-C6ody29O.js} +2 -2
  9. package/_assets/{ContentClient-CIV5rrAt.js → ContentClient-C03rRrUz.js} +2 -2
  10. package/_assets/{Creator-CIH3WU3e.js → Creator-Chq_3FKW.js} +7 -7
  11. package/_assets/{CreditPackPicker-Cf2WXrfD.js → CreditPackPicker-yPm96IIv.js} +2 -2
  12. package/_assets/{CreditRate-DjCL9hVD.js → CreditRate-BxqKLfaA.js} +6 -6
  13. package/_assets/{DeploymentBuilder-C3NqEfXH.js → DeploymentBuilder-B2QubYgD.js} +2 -2
  14. package/_assets/{EmotePlaybackBar-Bq7TckV0.js → EmotePlaybackBar-Cp9UGu_L.js} +3 -3
  15. package/_assets/{ErrorNotice-DSZ4YOzl.js → ErrorNotice-D_6j8-7f.js} +2 -2
  16. package/_assets/{Event-D__OUwpc.js → Event-v8GnBTyC.js} +2 -2
  17. package/_assets/{ExchangeController-BlkQV8ix.js → ExchangeController-CE3cQOVu.js} +2 -2
  18. package/_assets/{Faq-Daw98w_f.js → Faq-Dfduj2eM.js} +2 -2
  19. package/_assets/{Filters-COsCKlQM.js → Filters-CdMOVmbU.js} +2 -2
  20. package/_assets/{GetCredits-uaIm_-xy.js → GetCredits-BS--XoK-.js} +2 -2
  21. package/_assets/{Grow-nApzPG32.js → Grow-CPeuefrF.js} +2 -2
  22. package/_assets/{HelpersUtil-Dhc8srsx.js → HelpersUtil-B_SruwGa.js} +2 -2
  23. package/_assets/IssueModal-D_PS_2Xk.js +323 -0
  24. package/_assets/ItemDetail-DBAHPIQO.js +3090 -0
  25. package/_assets/{LoadMore-D8gtSgyc.js → LoadMore-CM5ykem-.js} +2 -2
  26. package/_assets/{ManaPricingBanner-CiV8R5vd.js → ManaPricingBanner-CZzRxND3.js} +2 -2
  27. package/_assets/{ManaPricingBanner.styles-BNQ_wLgO.js → ManaPricingBanner.styles-B10EKkra.js} +2 -2
  28. package/_assets/{MyAssets-XbkBS3DE.js → MyAssets-Fhl2lazZ.js} +2 -2
  29. package/_assets/{MyFavorites-lktPT4tc.js → MyFavorites-DqyQ-SFM.js} +10 -10
  30. package/_assets/MyStore-B5e7oQJa.js +1691 -0
  31. package/_assets/{NetworkUtil-BwvINT8v.js → NetworkUtil-iL8rkdmy.js} +2 -2
  32. package/_assets/{NotFound-CIueRHHs.js → NotFound-sBVYlhk3.js} +2 -2
  33. package/_assets/NotificationsBell-TdDjFO5P.js +142 -0
  34. package/_assets/{OutfitDetail-MDYbLLf8.js → OutfitDetail-BBsCNaaP.js} +3 -3
  35. package/_assets/{OutfitPreview-C52GjMv6.js → OutfitPreview-BTJ-IIEH.js} +3 -3
  36. package/_assets/{OutfitStudio-uomtfIa1.js → OutfitStudio-DXHZfbf9.js} +10 -10
  37. package/_assets/{PaymentMethodStep-aQUg-E9d.js → PaymentMethodStep-Ob8YI_SL.js} +5 -5
  38. package/_assets/{SaleCountdown-BC6cklIs.js → SaleCountdown-KX9dNqTp.js} +2 -2
  39. package/_assets/{Spinner-NI6IZA5A.js → Spinner-DKskpIEZ.js} +2 -2
  40. package/_assets/{StoreSettings-BrdRpaVU.js → StoreSettings-Bia_W-8Q.js} +8 -8
  41. package/_assets/{Success-Bsg9-DNo.js → Success-2dVHPO-2.js} +2 -2
  42. package/_assets/{SwapController-DVbKfkaS.js → SwapController-CbFqSpFg.js} +2 -2
  43. package/_assets/{Tooltip-DIRWGOxl.js → Tooltip-DFrRznAp.js} +2 -2
  44. package/_assets/{TradeService-CK7xu_Fq.js → TradeService-CDS_PfTn.js} +2 -2
  45. package/_assets/{W3MFrameProviderSingleton-BWvDpNTL.js → W3MFrameProviderSingleton-C4KtItmg.js} +4 -4
  46. package/_assets/{WebCryptoP256-pa_zJ5z4.js → WebCryptoP256-CbiRbOjq.js} +2 -2
  47. package/_assets/{basic-Mlwb1YPe.js → basic-BufXGp2F.js} +2 -2
  48. package/_assets/{biconomy-CIvkhhfY.js → biconomy-BR1CMfhe.js} +2 -2
  49. package/_assets/{browseLayout.styles-D3u_lxUV.js → browseLayout.styles-DF9DTUfO.js} +2 -2
  50. package/_assets/{browser-BnRQXFFw.js → browser-DqwPlfZs.js} +2 -2
  51. package/_assets/{browser-ponyfill-Dmn_2mUU.js → browser-ponyfill-DqHLL_k5.js} +2 -2
  52. package/_assets/{browser-lYIugjhZ.js → browser-qc2dUFk5.js} +2 -2
  53. package/_assets/{buy-MeE-N2le.js → buy-BiTHthT9.js} +2 -2
  54. package/_assets/{buy-gasless-ZiYiDzb-.js → buy-gasless-CTp90Dvn.js} +2 -2
  55. package/_assets/{ccip-D2v4Tmss.js → ccip-DZfLdErH.js} +2 -2
  56. package/_assets/{ccip-D9Kr5HJY.js → ccip-rfpBm5bL.js} +2 -2
  57. package/_assets/{chains-CfHTI0IT.js → chains-BWqZ-nYk.js} +2 -2
  58. package/_assets/{collectionPage.styles-Drt5ivqQ.js → collectionPage.styles-Db2PBFNG.js} +4 -4
  59. package/_assets/{common-BkGfzbjV.js → common-BfXnUVAM.js} +2 -2
  60. package/_assets/{controller-B1XkQ-8T.js → controller-ZXDDsCxP.js} +3 -3
  61. package/_assets/{core-8MNjsO3A.js → core-DfE8LCjh.js} +5 -5
  62. package/_assets/{createSvgIcon-BKu0ThNd.js → createSvgIcon-BUkltLfu.js} +2 -2
  63. package/_assets/{crumbs.styles-IWrGqGTW.js → crumbs.styles-R8odPxFR.js} +2 -2
  64. package/_assets/{custom-RQn4QL1O.js → custom-DKOD0xYg.js} +2 -2
  65. package/_assets/{data-capture-BCz6ZuJe.js → data-capture-C3eH7C_s.js} +2 -2
  66. package/_assets/{dcl-schemas-BgQanFex.js → dcl-schemas-BW3BbT5l.js} +2 -2
  67. package/_assets/{decimals-DQ6egFLl.js → decimals-BI0yoEux.js} +2 -2
  68. package/_assets/{decimals-Yu9nfiap.js → decimals-DQJMb7J9.js} +2 -2
  69. package/_assets/{detectExtension-mxrpMjPD.js → detectExtension-C_GbFz5_.js} +2 -2
  70. package/_assets/{disposePreview-DPlzBDEC.js → disposePreview-5Jddp9do.js} +2 -2
  71. package/_assets/{email-C9hzZFfn.js → email-D4HLC7wh.js} +7 -7
  72. package/_assets/{embedded-wallet-sNZ139r3.js → embedded-wallet-CMbzkthX.js} +2 -2
  73. package/_assets/{emotion-styled.browser.esm-CFDaRZFq.js → emotion-styled.browser.esm-B6eszsio.js} +2 -2
  74. package/_assets/{engine-t2WwPyT-.js → engine-BA9Hr8Az.js} +2 -2
  75. package/_assets/{errors-TvhLJhmP.js → errors-DnOSpKoV.js} +2 -2
  76. package/_assets/{estimate-l1-fee-V6V7FI1H.js → estimate-l1-fee-BZt36dEW.js} +2 -2
  77. package/_assets/{eth_estimateGas-vmn477Rl.js → eth_estimateGas-mNInGC82.js} +2 -2
  78. package/_assets/{eth_getStorageAt-BJsh0E1g.js → eth_getStorageAt-CW3VLsR7.js} +2 -2
  79. package/_assets/{eth_getTransactionCount-DjYi-3h-.js → eth_getTransactionCount-DGbTHobL.js} +2 -2
  80. package/_assets/{ethereum-CtosgwHU.js → ethereum-Cez4WhJf.js} +2 -2
  81. package/_assets/{ethers-RdXTApYJ.js → ethers-DGYWmyb1.js} +2 -2
  82. package/_assets/{events-DcSLjVuU.js → events-YMZCt1yV.js} +2 -2
  83. package/_assets/{execute-Da7DgAmR.js → execute-CVxgGRa9.js} +3 -3
  84. package/_assets/{extractIPFS-Cczu9meN.js → extractIPFS-BdalrjY7.js} +2 -2
  85. package/_assets/{features-C_bdmaJE.js → features-BPD34bt1.js} +2 -2
  86. package/_assets/{fetchTokenMetadata-7Kgsjbv4.js → fetchTokenMetadata-DOlcjXZI.js} +3 -3
  87. package/_assets/{field.styles-DDXjryam.js → field.styles-CIXh24AQ.js} +2 -2
  88. package/_assets/{fortmatic-BPBqqvfl.js → fortmatic-DGrmZpu1.js} +2 -2
  89. package/_assets/{get-bytecode-Bbw_Evod.js → get-bytecode-N2OV9nFo.js} +2 -2
  90. package/_assets/{get-ecosystem-wallet-info-81lpLPU_.js → get-ecosystem-wallet-info-CVK-PjWL.js} +2 -2
  91. package/_assets/{getBalance-BgqMuvIf.js → getBalance-BEz0Zoiv.js} +3 -3
  92. package/_assets/{getInstalledModules-W4RDd7ik.js → getInstalledModules-AznSDC44.js} +2 -2
  93. package/_assets/{getNFT-anMIImQh.js → getNFT-VxK16uv_.js} +2 -2
  94. package/_assets/{getNFT-BDhkq7kr.js → getNFT-aR5kSoWa.js} +3 -3
  95. package/_assets/{grid.styles-D--qOwVq.js → grid.styles-CVQcD_5t.js} +2 -2
  96. package/_assets/{hashTypedData-CiWRFQn6.js → hashTypedData-ByCdES4z.js} +2 -2
  97. package/_assets/{hashTypedData-CUDRpwju.js → hashTypedData-ywahqODz.js} +2 -2
  98. package/_assets/{import-CIZWEISk.js → import-CPlDKdWo.js} +2 -2
  99. package/_assets/{in-app-BbIysh8c.js → in-app-D43FjnXM.js} +2 -2
  100. package/_assets/{in-app-wallet-calls-BgxC18Ff.js → in-app-wallet-calls-DmZ4pxIH.js} +2 -2
  101. package/_assets/{index-DQS3Dydb.js → index-0FaDHGAZ.js} +2 -2
  102. package/_assets/{index-BKGo_9wu.js → index-7s_cYB0r.js} +2 -2
  103. package/_assets/{index-DFQS58XE.js → index-B67Ropoe.js} +3 -3
  104. package/_assets/{index-CM4FAtZl.js → index-B7aqs-FR.js} +2 -2
  105. package/_assets/{index-BhhO1oEp.js → index-B8kJyL6G.js} +2 -2
  106. package/_assets/{index-qrz6WiaK.js → index-BAAoctqn.js} +2 -2
  107. package/_assets/{index-C0EB4Nb3.js → index-BBS-v8LD.js} +17 -17
  108. package/_assets/{index-8wQks0w8.js → index-BFVKoQeh.js} +2 -2
  109. package/_assets/{index-B1OJuolS.js → index-BIDkjxTy.js} +2 -2
  110. package/_assets/{index-hLoLHUKV.js → index-BMak5rZb.js} +2 -2
  111. package/_assets/{index-BlG9tYXl.js → index-BOyogbet.js} +2 -2
  112. package/_assets/{index-CjuTKXut.js → index-BUZUNt7Z.js} +2 -2
  113. package/_assets/{index-BNn-tbAt.js → index-BUnaJjPH.js} +2 -2
  114. package/_assets/{index-B49OLLy1.js → index-Bf74R1qS.js} +2 -2
  115. package/_assets/{index-BhGdGiCs.js → index-BfZKaxHs.js} +3 -3
  116. package/_assets/{index--yUfiOex.js → index-Bf_iGaP5.js} +2 -2
  117. package/_assets/{index-DTWx6T1S.js → index-BkdjGh-W.js} +2 -2
  118. package/_assets/{index-BwKvHJ-v.js → index-C2S4XG0R.js} +2 -2
  119. package/_assets/{index-OhRAcbHT.js → index-C7Le7sHG.js} +2 -2
  120. package/_assets/{index-DzyghasH.js → index-CA4CUNiy.js} +2 -2
  121. package/_assets/{index-CeM8omfX.js → index-CHBzdW6M.js} +2 -2
  122. package/_assets/{index-Dxfnkqq4.js → index-CLpLBvH2.js} +2 -2
  123. package/_assets/{index-DO6ydGXX.js → index-CNjrqKOs.js} +2 -2
  124. package/_assets/{index-lQ2m7yUy.js → index-CSuaHD6u.js} +2 -2
  125. package/_assets/{index-BJvtfv1M.js → index-CT7NzvvO.js} +2 -2
  126. package/_assets/{index-Zum9uUGy.js → index-CU2OselF.js} +2 -2
  127. package/_assets/{index-D1S8t2fe.js → index-CY4_MrXH.js} +2 -2
  128. package/_assets/{index-Cw_s9pOw.js → index-C_2eXgm7.js} +2 -2
  129. package/_assets/{index-D22FRuvW.js → index-CeLw5QQ-.js} +3 -3
  130. package/_assets/{index-CtSgRzsY.js → index-CepaElib.js} +2 -2
  131. package/_assets/{index-ClIQf3ng.js → index-CgfbItO2.js} +2 -2
  132. package/_assets/{index-BIAEBlSw.js → index-ChIjTbh5.js} +2 -2
  133. package/_assets/{index-Bc7EMqAf.js → index-Ci4_h86U.js} +2 -2
  134. package/_assets/{index-BGZlLdrL.js → index-CnfBCYQg.js} +2 -2
  135. package/_assets/{index-cGB6nHYf.js → index-CtoH5DSl.js} +6 -6
  136. package/_assets/{index-wOPFghKT.js → index-Cx1doNkB.js} +2 -2
  137. package/_assets/{index-DfOPi5vf.js → index-CxOeCVBB.js} +3 -3
  138. package/_assets/{index-BDdcoEFU.js → index-CzV7sMdy.js} +4 -4
  139. package/_assets/{index-DZEeeDQr.js → index-DCSutgdw.js} +2 -2
  140. package/_assets/{index-DCdW2yi4.js → index-DIYb1IGB.js} +4 -4
  141. package/_assets/{index-CvR8He0C.js → index-DR9_Mkt6.js} +2 -2
  142. package/_assets/{index-B-gdbRSW.js → index-DSwxHrMr.js} +2 -2
  143. package/_assets/{index-BeH18kmv.js → index-DZ3S9SRN.js} +2 -2
  144. package/_assets/{index-Bs_f3yhf.js → index-DZ53HgoK.js} +2 -2
  145. package/_assets/{index-CFBOIeXE.js → index-DZaHlbE_.js} +2 -2
  146. package/_assets/{index-Cf6ERmsZ.js → index-D_2nYoM8.js} +2 -2
  147. package/_assets/{index-CZEYeX3l.js → index-DauMTBWE.js} +2 -2
  148. package/_assets/{index-BmsamR4M.js → index-DhWCbjGh.js} +2 -2
  149. package/_assets/{index-Dz8UCy0P.js → index-DtS7bQfE.js} +2 -2
  150. package/_assets/{index-DU6vOlyL.js → index-DyhsaJtc.js} +2 -2
  151. package/_assets/{index-Dkohypnm.js → index-LRrTgDY0.js} +4 -4
  152. package/_assets/{index-BRWjazWI.js → index-LxRrm7nL.js} +2 -2
  153. package/_assets/{index-DOn0iodU.js → index-PFt3YITh.js} +2 -2
  154. package/_assets/{index-DAysx568.js → index-T6hDl-2V.js} +2 -2
  155. package/_assets/{index-C5s2ci0r.js → index-Tz82vi2e.js} +2 -2
  156. package/_assets/{index-CSZAw8dC.js → index-W7W-N49f.js} +2 -2
  157. package/_assets/{index-Bsw53nId.js → index-ZDiu1J1j.js} +2 -2
  158. package/_assets/{index-BMjX5Tw6.js → index-bz3DaQP5.js} +2 -2
  159. package/_assets/{index-M4vJyniz.js → index-cCjjJ8Zd.js} +2 -2
  160. package/_assets/{index-Cq62ZdRW.js → index-feJ6CP8x.js} +3 -3
  161. package/_assets/{index-B6895neV.js → index-gfZnCNa6.js} +2 -2
  162. package/_assets/{index-FfTM_1mz.js → index-guDRvZQ4.js} +2 -2
  163. package/_assets/{index-CwCEh7Ea.js → index-mzIsCjWs.js} +2 -2
  164. package/_assets/{index-962zUKU_.js → index-ox01jvxx.js} +2 -2
  165. package/_assets/index-qTkXqLEk.css +1 -0
  166. package/_assets/{index-DTVY5scD.js → index-tske-Qm0.js} +2 -2
  167. package/_assets/index-v6-0TPZX.js +3 -0
  168. package/_assets/{index-_bcedLK5.js → index-y50hP8_O.js} +2 -2
  169. package/_assets/{index.es-C1YwoJJN.js → index.es-D61fhzOk.js} +2 -2
  170. package/_assets/{index.es-YMSgumSf.js → index.es-DUQRyY8V.js} +2 -2
  171. package/_assets/{index.es-BirWIv1k.js → index.es-DrJv9QY8.js} +2 -2
  172. package/_assets/{index.es-O8xfjyk3.js → index.es-_SlY0diQ.js} +5 -5
  173. package/_assets/items-empty-Dtl-YwtZ.js +2 -0
  174. package/_assets/{jump-DddgnPSC.js → jump-JCYO-k8J.js} +2 -2
  175. package/_assets/{linkAccount-CHDe6wUT.js → linkAccount-D_xpNX67.js} +2 -2
  176. package/_assets/{loader-logo-ChNoWI1Z.js → loader-logo-k6aOBN-R.js} +2 -2
  177. package/_assets/{localBatchGatewayRequest-tSt38JDm.js → localBatchGatewayRequest-T0sFQZ26.js} +2 -2
  178. package/_assets/{modal.styles-BPDABQCr.js → modal.styles-BAz9vPux.js} +2 -2
  179. package/_assets/{native-Cxh3QIKd.js → native-Fndcg4e5.js} +2 -2
  180. package/_assets/{networks-rNqzEIu1.js → networks-BkPPSIG9.js} +2 -2
  181. package/_assets/{onramp-Cjb0y_EX.js → onramp-DCjZy1Yr.js} +2 -2
  182. package/_assets/{openzeppelin-Dbgk07uO.js → openzeppelin-DWeyp33R.js} +2 -2
  183. package/_assets/{ownerOf-ifwSx1wQ.js → ownerOf-D0cjIIIs.js} +2 -2
  184. package/_assets/{parseNft-BgX116P8.js → parseNft-DCt8GvNK.js} +3 -3
  185. package/_assets/{parseSignature-B3jn_FVR.js → parseSignature-BbjgUCSK.js} +4 -4
  186. package/_assets/{parseSignature-Cjx-94kV.js → parseSignature-CtMzBmLG.js} +2 -2
  187. package/_assets/{passkeys-C14r7a1U.js → passkeys-DUrjX8Ro.js} +2 -2
  188. package/_assets/{pay-with-exchange-BoqePTss.js → pay-with-exchange-vAQgw-nO.js} +2 -2
  189. package/_assets/{prepare-contract-call-CVD1LMqZ.js → prepare-contract-call-BitMGE96.js} +2 -2
  190. package/_assets/{qr-overlay-BaF8O6L7.js → qr-overlay-3Ogvmodj.js} +4 -4
  191. package/_assets/{react-57wE9FMW.js → react-Ddn-9d83.js} +2 -2
  192. package/_assets/{receive-_KdL5WbJ.js → receive-UBqFYKku.js} +9 -9
  193. package/_assets/{resolveImplementation-BIVOA86N.js → resolveImplementation-CoCWI1LK.js} +2 -2
  194. package/_assets/{resume-buy-RWKNCH2I.js → resume-buy-DqlXnoQq.js} +2 -2
  195. package/_assets/{resume-name-CVkpKZkm.js → resume-name-B5w3HYnd.js} +2 -2
  196. package/_assets/{rpc-BuxGvW8N.js → rpc-C-RDZHVf.js} +2 -2
  197. package/_assets/{sales-empty-BrdJIpZF.js → sales-empty-DFvbsd1W.js} +2 -2
  198. package/_assets/{search-empty-B9EfPE1P.js → search-empty-D1Tausth.js} +2 -2
  199. package/_assets/{secp256k1-D98PKoK-.js → secp256k1-By6IQ83k.js} +2 -2
  200. package/_assets/{secp256k1-DtCcUzXl.js → secp256k1-CAqSDg9Y.js} +2 -2
  201. package/_assets/{secp256k1-C3mpZkpr.js → secp256k1-CxMxDBug.js} +2 -2
  202. package/_assets/{send-CPee34BT.js → send-Dg3aA-cT.js} +2 -2
  203. package/_assets/{send-batch-transaction-CRYeO2Ew.js → send-batch-transaction-CcGULLl4.js} +2 -2
  204. package/_assets/{send-eip712-transaction-DmUbX1xf.js → send-eip712-transaction-eRcl-w9x.js} +3 -3
  205. package/_assets/{send-gasless-transaction-Cl9L9F1A.js → send-gasless-transaction-BVE00Z8q.js} +3 -3
  206. package/_assets/send-transaction-bNnxjmkm.js +3 -0
  207. package/_assets/{sendMetaTransaction-B7N-qRfh.js → sendMetaTransaction-DaTro9ph.js} +2 -2
  208. package/_assets/{sendRawTransaction-DAT5LyNo.js → sendRawTransaction-Crv4h2Fe.js} +4 -4
  209. package/_assets/{sentry-C6Mao8WI.js → sentry-D_8KijKQ.js} +3 -3
  210. package/_assets/{serializeTransaction-CjRJ0psk.js → serializeTransaction-CPg2ul-G.js} +2 -2
  211. package/_assets/{session-proposal-ueoRTwfB.js → session-proposal-Di1f8LHY.js} +2 -2
  212. package/_assets/{session-request-BD9TXTaA.js → session-request-R2yVi8HQ.js} +3 -3
  213. package/_assets/{sha256-DbvztKVh.js → sha256-BhCi5WIJ.js} +2 -2
  214. package/_assets/{sha3-5JMjwcQn.js → sha3-CLQFMym7.js} +2 -2
  215. package/_assets/signin-empty-PXLDIsQk.js +2 -0
  216. package/_assets/{signing-D8djUTSU.js → signing-BCODmgNV.js} +4 -4
  217. package/_assets/{skeleton.styles-Bvaum8jS.js → skeleton.styles-anODpKJf.js} +2 -2
  218. package/_assets/{socials-NQn6q4he.js → socials-DShz1WgZ.js} +2 -2
  219. package/_assets/{styled-CCNK0K71.js → styled-CbzE9JXd.js} +2 -2
  220. package/_assets/{swaps-CgWjr3x_.js → swaps-BXF_khPF.js} +2 -2
  221. package/_assets/{thirdweb-C1alV0QS.js → thirdweb-Cnc0UXDQ.js} +4 -4
  222. package/_assets/{to-serializable-transaction-BKQS5d49.js → to-serializable-transaction-DzZsdRzk.js} +3 -3
  223. package/_assets/{totalSupply-CF5FI8lQ.js → totalSupply-D4EQMS5T.js} +2 -2
  224. package/_assets/{trade-encoding-BV1_7YxJ.js → trade-encoding-BdtZmg5A.js} +2 -2
  225. package/_assets/{transaction-BVLpkah4.js → transaction-Cbet3IZc.js} +2 -2
  226. package/_assets/{transactionReceipt-DwjBLtBg.js → transactionReceipt-DSeG56jV.js} +2 -2
  227. package/_assets/{transactions-DW_nxFG-.js → transactions-B5gQmUHm.js} +2 -2
  228. package/_assets/useInfiniteGrid-C5wDaoVd.js +2 -0
  229. package/_assets/{useStore-CJ2zzclt.js → useStore-wU9qkXc9.js} +3 -3
  230. package/_assets/{useTheme-D3lC36b8.js → useTheme-y50PSrCO.js} +2 -2
  231. package/_assets/{utils-DyoF2n1_.js → utils-BGzZ7mCg.js} +2 -2
  232. package/_assets/{verifyHash-D_k8MOkd.js → verifyHash-I86XFFeN.js} +2 -2
  233. package/_assets/{w3m-modal-BwPY12eH.js → w3m-modal-COSR0Fsr.js} +2 -2
  234. package/_assets/{w3m-modal-CIfTlIpr.js → w3m-modal-Dz0XFS0k.js} +2 -2
  235. package/_assets/{wait-for-tx-receipt-BQf97Yv5.js → wait-for-tx-receipt-C3zFGaKb.js} +2 -2
  236. package/_assets/{wallets-Cor67NYq.js → wallets-BM2FKp9V.js} +6 -6
  237. package/_assets/{web-connector-AUtPfxac.js → web-connector-DXaUpGnD.js} +4 -4
  238. package/_assets/{writeContract-_6z0Fw9c.js → writeContract-Bja8jWrS.js} +2 -2
  239. package/_assets/{zora-sepolia-DFxo1Oif.js → zora-sepolia-B6FH_u_V.js} +2 -2
  240. package/_assets/{zoraTestnet-B4Lgrc00.js → zoraTestnet-CDn6xrjW.js} +2 -2
  241. package/index.html +12 -12
  242. package/package.json +2 -2
  243. package/_assets/ItemDetail-big_cmBY.js +0 -3411
  244. package/_assets/MyStore-SSChApNZ.js +0 -1630
  245. package/_assets/NotificationsBell-BiwzCIb4.js +0 -142
  246. package/_assets/index-DoXX6TgS.css +0 -1
  247. package/_assets/index-GCKJ9yxg.js +0 -3
  248. package/_assets/items-empty-BciJH2B_.js +0 -2
  249. package/_assets/send-transaction-CydyNIuj.js +0 -3
  250. package/_assets/signin-empty-Duq453f-.js +0 -2
  251. package/_assets/useInfiniteGrid-CbPWAhDP.js +0 -2
@@ -0,0 +1,3090 @@
1
+ import{j as e,b as st,r as c,L as Ba,e as Hi,a as _a}from"./react-Ddn-9d83.js";import{bi as Gt,c as nt,x as rt,bm as Wa,bn as Qi,X as ft,t as n,bx as Ui,by as Vi,V as et,O as Z,Z as Se,bE as be,bF as En,l as ue,bD as cn,bC 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,bz as es,bA as ts,df as ns,dg as rs,dh as as,di as is,w as ie,bk as ss,s as r,a,a6 as Yt,aH as Jt,bO as Wn,aI as tt,I as L,z as Pe,p as qa,Y as Zt,c8 as Oa,H as Qe,av as ge,dj as os,n as mt,bd as un,ad as Ka,dk as Mr,d2 as ls,f as Ha,be as ds,bf as cs,dl as us,c7 as ps,dm as hs,bS as xs,dn as fs,dp as ms,k as gs,aj as St,b1 as bs,dq as ys,a9 as ws,dr as vs,b3 as js,ds as ks,P as Qa,a0 as Ua,dt as Va,du as $s,dv as Cs,bb as Ga,dw as Is,bT as Ss,dx as As,dy as Ms,dz as Ps,ca as Ls,A as Rs,dA as pn,$ as Fs,bp as Es,bq as Ts,y as zs,m as Ns,dB as Bs,dC as _s,dD as Ws,dE as Ds,dF as qs,aw as Os,ax as Ks,dG as Hs,B as Qs,dH as Us,aA as Pr,az as Lr,dI as Vs,dJ as Gs,a3 as Ys,bw as Js,dK as Rr,dL as Zs,dM as Xs,dN as eo,dO as to,dP as no,dQ as ro,dR as ao,dS as io}from"./index-BBS-v8LD.js";import{d as Ae}from"./dcl-schemas-BW3BbT5l.js";import{p as so,e as Fr,i as oo,A as Ya,C as lo,b as co,f as uo,g as po,h as ho,j as xo,m as fo,u as mo,t as go,k as bo,a as yo,s as wo}from"./CollectionCarousel-C_r2HthR.js";import{d as Er,t as vo,e as Tr,G as jo,c as ko}from"./buy-BiTHthT9.js";import{c as $o,i as Dn,D as Co,a as Io,S as So,b as Ao,f as Mo}from"./SaleCountdown-KX9dNqTp.js";import{u as Po,M as Lo,o as Ro,f as Fo,b as Eo,l as Ja,c as To}from"./loader-logo-k6aOBN-R.js";import{w as zr,M as zo,S as No,C as Bo,H as _o,a as Wo,T as Do,X as qo,B as Oo,b as Ko,c as Ho,d as Qo,e as Xe,f as Uo,g as Vo,h as Go,i as ut,j as qe,W as _t,m as Wt,n as Dt,o as Yo,v as Jo,L as Za,P as Xa,k as ei,l as ti,E as Zo,F as Xo,G as Nr,A as el,p as tl,q as nl,r as rl,s as al,t as il,u as sl,I as Br}from"./CreditPackPicker-yPm96IIv.js";import{P as ol}from"./PaymentMethodStep-Ob8YI_SL.js";import{m as ll}from"./mana-matic-light-Bl5duieC.js";import{q as ni,g as ri,t as dl,s as cl,a as _r,b as ul,d as pl,i as hl,e as xl,c as fl}from"./trade-encoding-BdtZmg5A.js";import{J as ml,p as gl}from"./ethers-DGYWmyb1.js";import{a as bl,w as ai,S as ii,G as si,c as yl}from"./buy-gasless-CTp90Dvn.js";import{R as Wr}from"./resume-buy-DqlXnoQq.js";import{a as wl,f as at,i as Vt}from"./errors-DnOSpKoV.js";import{C as vl}from"./Confetti-DPZN6qJi.js";import{b as jl,J as kl,a as $l}from"./jump-JCYO-k8J.js";import{p as oi}from"./import-CPlDKdWo.js";import{E as it}from"./ErrorNotice-D_6j8-7f.js";import{L as Dr,M as Cl,B as Il,H as Sl,T as Al,A as Ml}from"./modal.styles-BAz9vPux.js";import{S as Pl}from"./Spinner-DKskpIEZ.js";import{I as Ll}from"./IssueModal-D_PS_2Xk.js";import{E as Rl}from"./EmotePlaybackBar-Cp9UGu_L.js";import{d as Fl}from"./disposePreview-5Jddp9do.js";import{T as qt}from"./Tooltip-DFrRznAp.js";import{c as El}from"./crumbs.styles-R8odPxFR.js";import"./sentry-D_8KijKQ.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-DaTro9ph.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]="ada1a8bf-1c02-48cf-9e33-ebc6102adfc9",t._sentryDebugIdIdentifier="sentry-dbid-ada1a8bf-1c02-48cf-9e33-ebc6102adfc9")}catch{}})();const li=216n,Tl=(1n<<li)-1n;function zl(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&Tl).toString()}}function Nl(t){if(!t)return null;try{return zl(t).itemId}catch{return null}}const di=["cancelled-listings"];function Bl(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 _l(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 Wl=gl("0.05");async function Dl(t){try{return(await new ml(nt.rpcUrl).getBalance(t)).gte(Wl)}catch{return!1}}async function ql(t,s){return Gt(t)?Dl(s):!1}function Ol({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 Kl=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 Qr(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function Tn({item:t,onClose:s,resume:d=!1}){const{session:o}=rt(),{data:l}=Wa(o),{data:p}=Qi(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=Po().packs.slice(0,Lo),[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}=Ro(h,Y),[ee,xe]=c.useState(null),[pe,le]=c.useState(null),W=p??pe??0n,[T,B]=c.useState(!1),[m,re]=c.useState(null),[S,E]=c.useState(0),[z,D]=c.useState(null),[ae,ve]=c.useState(!1),J=c.useRef(null),Q=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(()=>(Q.current=!1,()=>{Q.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(Ee=>Ee.method==="mana"||Ee.method==="combined"),ye=w-((l==null?void 0:l.credits)??0),Lt=h.find(Ee=>Ee.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 Fo(t,o.address,Ui,await g(),Kl,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),E(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:!T}).then(F=>{P||(F!=null?xe(F):B(!0))}),()=>{P=!0}},[j,z,m,W,ee,T]);const U=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 En(o.identity,F,Hr(P),Qr(t));if(Q.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),E(De),ve(!0),b("ready");return}}catch(_){if(wl(_)){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:so(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 bl(_),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 Er(_)}else throw te&&X.current.reverted(te),he}else te=await Er(_)}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),oo(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(U,"mana"))==null?void 0:P.manaWei,R=w.kind==="trade"?await uo({trade:w.trade,coupon:w.coupon,buyer:o.address,signer:o.signer,manaWei:F}):await po({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(U,"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 En(o.identity,P.creditsCents,Hr(w),Qr(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 ho({trade:w.trade,coupon:w.coupon,...te}):await xo({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 To(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}=fo(w,P);return cl(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 ql(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=U.options.find(_=>_.method===w))==null?void 0:P.manaWei)??0n,te=await ri(R,o.address,O).catch(()=>!0);if(dl(o.providerType,te)){Re({auth:R,rail:w});return}Fe(w)}finally{Ke.current=!1}}}const Ie=U.options.some(w=>w.method==="mana"||w.method==="combined"),Pt=j==="ready"&&(Ie||U.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:ll,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(zo,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(No,{onClick:Ge?void 0:s,"aria-hidden":!0}),e.jsx(Bo,{"data-tall":j==="processing"||j==="loading"||void 0,children:Pt?e.jsx(ol,{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:U.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(_o,{children:[e.jsxs(Wo,{children:[e.jsx(Do,{children:rn}),!Ge&&e.jsx(qo,{onClick:s,"aria-label":n("buyModal.close"),children:e.jsx(lo,{})})]}),e.jsxs(Oo,{children:[e.jsx(Ko,{children:j==="nofunds"?n("buyModal.dclBalance"):n("buyModal.myCreditsBalance")}),e.jsx(Ho,{}),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(Uo,{"data-testid":"buy-error",children:[e.jsx(Vo,{src:co,alt:"",width:64,height:80}),e.jsxs(Go,{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:[T&&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(Yo,{href:Zi("/credits"),target:"_blank",rel:"noopener noreferrer",children:n("buyModal.warningLearnMore")})]})]})]}),e.jsx(Ur,{item:t,priceCredits:fe}),ht()?null:e.jsx(e.Fragment,{children:e.jsx(Jo,{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(Ur,{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(vl,{}),e.jsxs(Zo,{children:[e.jsx(Ol,{}),e.jsxs(Xo,{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:jl([t]),onClick:s,children:n("success.goToBackpack")}):e.jsxs(Nr,{"data-variant":"ruby",href:kl,target:"_blank",rel:"noreferrer",onClick:s,children:[n("buyModal.tryInWorld"),e.jsx($l,{})]})]})]})]})})]})}function Ur({item:t,priceCredits:s}){return e.jsxs(el,{children:[e.jsx(tl,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(nl,{children:[e.jsxs("div",{children:[e.jsx(rl,{title:t.name,children:t.name||n("buyModal.itemFallback")}),t.creator?e.jsx(al,{address:t.creator}):null]}),e.jsxs(il,{children:[e.jsx(sl,{}),e.jsx("span",{children:_n(s)})]})]})]})}function Hl(){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
+ `,Ul=r.span`
8
+ flex: none;
9
+ font-family: ${a.font.sans};
10
+ font-size: 18px;
11
+ color: ${a.colors.muted};
12
+ `,Vl=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
+ `,Gl=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(Gl,{"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(Ul,{"data-testid":"listing-steps-count",children:[l,"/",2]})]}),d?e.jsx(Vl,{"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
+ `,Yl=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
+ `,Jl=r.div`
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 12px;
94
+ `,Zl=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
+ `,Xl=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
+ `,ed=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
+ `,td=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
+ `,nd=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
+ `,rd=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
+ `,ad=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
+ `,id=r.span`
212
+ flex: none;
213
+ font-family: ${a.font.sans};
214
+ font-size: 10px;
215
+ color: ${a.colors.muted2};
216
+ `,sd=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
+ ${$o}
250
+ `,od=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 ld=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
+ `,dd=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
+ `,cd=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
+ `,ud=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
+ `,pd=r.div`
322
+ display: flex;
323
+ gap: 12px;
324
+
325
+ ${a.media.maxWidth("mobile")} {
326
+ flex-direction: column-reverse;
327
+ }
328
+ `,hd=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
+ `,xd=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
+ `,fd=30;function Yr(t){const s=new Date;return s.setHours(0,0,0,0),s.setDate(s.getDate()+t),s}function md({asset:t,session:s,creator:d,edit:o,onListed:l,onClose:p}){const x=ft(),v=st(),g=Hl(),{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(fd)),[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),T=Dn(s),B=Number(k),m=Number.isInteger(B)&&B>0,re=!!o&&!ne&&B===o.currentCredits,S=C?C.getTime():NaN,E=!!C&&S>Date.now(),z=Yr(1),D=m?`$${tt(B).toFixed(2)}`:"$0";async function ae(Q={}){if(M(null),!m){M(n("sellModal.errorWholeNumber"));return}if(!E){M(n("sellModal.invalidDate"));return}if(!T){H(!0);try{const X=_r(t.contractAddress,t.chainId),fe=await ri(X,s.address);if(H(!1),!fe){Y.current=Q,G("authorize");return}}catch{H(!1)}}await ve(Q)}async function ve(Q={}){var X,fe;if(M(null),!m){M(n("sellModal.errorWholeNumber"));return}if(!E){M(n("sellModal.invalidDate"));return}H(!0);try{if(!await le(Q.payGas))return;await ul({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId});const je=await pl({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:Q=>Q.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(dd,{children:[e.jsx(cd,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsxs(ud,{children:[e.jsx("b",{children:n(o?"listingEdit.successBody":"sellModal.successOnSale")})," ",n("sellModal.successManage")]})]}),e.jsxs(pd,{children:[e.jsx(hd,{onClick:J,children:n("sellModal.myItems")}),e.jsx(xd,{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:Q=>Q.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:T,slow:ee})]})}):e.jsx(xn,{onClick:y?void 0:p,role:"presentation",children:e.jsxs(fn,{"data-testid":"modal",onClick:Q=>Q.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(Yl,{children:n(o?"listingEdit.subtitle":"sellModal.subtitle")}),e.jsxs(Jl,{children:[e.jsx(Zl,{children:t.image?e.jsx("img",{src:t.image,alt:""}):null}),e.jsxs(Xl,{children:[e.jsx(ed,{children:t.name}),b?e.jsx(td,{children:n("sellModal.byCreator",{name:b})}):null]})]}),e.jsxs(nd,{children:[e.jsxs(Vr,{children:[e.jsx(Gr,{children:n("sellModal.priceShort")}),e.jsxs(rd,{"aria-invalid":k.length>0&&!m,children:[e.jsx(Pe,{className:"ccy"}),e.jsx(ad,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:k,onChange:Q=>I(Q.target.value),disabled:y,"aria-label":n("sellModal.priceLabel",{currency:"credits"})}),e.jsx(id,{"aria-hidden":!0,children:D})]})]}),e.jsxs(Vr,{children:[e.jsx(Gr,{children:n("sellModal.expirationLabel")}),e.jsx(sd,{"data-invalid":!!C&&!E,children:e.jsx(Co,{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(ld,{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(od,{onClick:()=>void ae(),disabled:y||re||xe==="pending"||!m||!E,"data-testid":"list-submit",children:o?n(ne?"sellModal.putUpForSale":"listingEdit.submit"):y?T?n("sellModal.puttingOnSale"):n("sellModal.confirmListing"):n("sellModal.putUpForSale")})]})})}const gd=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
+ `,bd=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
+ `,yd=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
+ `,wd=r.div`
404
+ display: flex;
405
+ align-items: center;
406
+ justify-content: space-between;
407
+ gap: 8px;
408
+ `,vd=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
+ `,jd=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
+ `,kd=r.div`
439
+ display: flex;
440
+ align-items: center;
441
+ gap: 12px;
442
+ `,$d=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
+ `,Cd=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
+ `,Id=r.label`
457
+ display: flex;
458
+ flex-direction: column;
459
+ gap: 6px;
460
+ `,Sd=r.span`
461
+ font-family: ${a.font.sans};
462
+ font-size: 12px;
463
+ color: ${a.colors.muted};
464
+ `,Ad=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
+ `,Md=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
+ `,Pd=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
+ `,Ld=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
+ `,Rd=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
+ `,Fd=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 Td({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 vo({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(gd,{onClick:x?void 0:d,role:"presentation",children:e.jsxs(bd,{onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("transfer.title"),children:[e.jsx(yd,{children:e.jsxs(wd,{children:[e.jsx(vd,{children:n("transfer.title")}),e.jsx(jd,{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(Ld,{children:[e.jsx(Rd,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(Fd,{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(kd,{children:[t.thumbnail?e.jsx($d,{src:t.thumbnail,alt:""}):null,e.jsx(Cd,{children:t.name})]}),e.jsxs(Id,{children:[e.jsx(Sd,{children:n("transfer.addressLabel")}),e.jsx(Ad,{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(Md,{children:n("transfer.warning")}),e.jsx(it,{message:g}),e.jsxs(Jr,{children:[e.jsx(Pd,{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 zd=r(Cl)`
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
+ `,Nd=r(Qe)`
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 Bd({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(Il,{onClick:p?void 0:l,role:"presentation",children:e.jsxs(zd,{onClick:I=>I.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("removeListing.title"),"data-testid":"remove-listing-modal",children:[e.jsx(Sl,{children:e.jsx(Al,{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(Ml,{"data-actions":!0,children:[e.jsx(Qe,{variant:"outline",onClick:l,disabled:p,children:n("sellModal.cancel")}),e.jsx(Nd,{onClick:()=>void k(),disabled:p||j==="pending","data-testid":"remove-confirm",children:p?e.jsx(Pl,{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
+ `,_d=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
+ `,Wd=r.div`
680
+ display: flex;
681
+ align-items: center;
682
+ gap: 12px;
683
+ `,Dd=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
+ `,qd=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
+ `,Od=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
+ `,Kd=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
+ `,Hd=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
+ `,Ud=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
+ `,Vd=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
+ `,Gd=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
+ `,Yd=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
+ `,Jd=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
+ `,Zd=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
+ `,Xd=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
+ `,ec=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
+ `,tc=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
+ `,nc=r.div`
883
+ display: flex;
884
+ gap: 12px;
885
+
886
+ ${a.media.maxWidth("mobile")} {
887
+ flex-direction: column-reverse;
888
+ }
889
+ `,rc=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
+ `,ac=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
+ `,ic=1e3*60*60*24*182;function sc({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,T=le?`$${tt(pe).toFixed(2)}`:"$0";c.useEffect(()=>{let S=!1;return(async()=>{try{const E=await hl({contractAddress:t.contractAddress,chainId:Y});S||A(E)}catch{S||A(!1)}})(),()=>{S=!0}},[t.contractAddress,Y]);async function B(S={}){var z,D;b(null);const E=Number(v);if(!Number.isInteger(E)||E<=0){b(n("primaryList.errorWholeNumber"));return}I(!0);try{if(!await V(S.payGas))return;C||(h(n("primaryList.statusEnabling")),await xl({signer:s.signer,contractAddress:t.contractAddress,chainId:Y}),A(!0)),h(n("primaryList.statusPublishing"));const ae=await fl({signer:s.signer,item:{contractAddress:t.contractAddress,itemId:t.blockchainItemId,network:Ae.Network.MATIC,chainId:Y},usdPrice:tt(E),uses:t.remainingSupply,expiresAtMs:Date.now()+ic});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(E),Z("Shop Listed Item",{item_id:t.blockchainItemId,contract_address:t.contractAddress,price_credits:E,price_usd:tt(E),listing_type:"primary",is_primary:!0}),Zt.success(n(d?"listingEdit.toastUpdated":"primaryList.toastOnSale",{name:t.name})),o==null||o(E,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(Zd,{children:[e.jsx(Xd,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(ec,{children:e.jsx("b",{children:t.name})}),e.jsxs(tc,{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(nc,{children:[e.jsx(rc,{onClick:l,children:n("getCredits.done")}),e.jsx(ac,{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(_d,{children:n("primaryList.fromCollection",{collectionName:t.collectionName,count:t.remainingSupply})}),e.jsxs(Wd,{children:[e.jsx(Dd,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(qd,{children:[e.jsx(Od,{children:t.name}),xe?e.jsx(Kd,{children:n("primaryList.byCreator",{name:xe})}):null]})]}),e.jsxs(Hd,{children:[e.jsx(Qd,{children:n("primaryList.priceShort")}),e.jsxs(Ud,{"aria-invalid":v.length>0&&!le,children:[e.jsx(Pe,{className:"ccy"}),e.jsx(Vd,{"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(Gd,{"aria-hidden":!0,children:T})]})]}),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(Jd,{children:$}):null,e.jsx(it,{message:j}),e.jsx(Yd,{onClick:()=>void B(),disabled:k||W||i==="pending"||C===null||!le,"data-testid":"list-submit",children:re})]})})}const oc=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
+ `,lc=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
+ `,dc=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
+ `,cc=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
+ `,uc=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
+ `,pc=r.video`
986
+ display: block;
987
+ width: 100%;
988
+ max-height: 70vh;
989
+ border-radius: 12px;
990
+ background: ${a.colors.blackBtn};
991
+ `;function hc({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(oc,{onClick:d,role:"presentation",children:e.jsxs(lc,{ref:o,tabIndex:-1,onClick:l=>l.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":n("itemDetail.showcaseTitle"),children:[e.jsxs(dc,{children:[e.jsx(cc,{children:s||n("itemDetail.showcaseTitle")}),e.jsx(uc,{onClick:d,"aria-label":n("itemDetail.showcaseClose"),children:e.jsx(L,{name:"close",size:18})})]}),e.jsx(pc,{src:t,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Oe,radius:xc}=a,fc=r.div`
992
+ position: fixed;
993
+ inset: 0;
994
+ z-index: 60;
995
+ display: grid;
996
+ place-items: center;
997
+ padding: 20px;
998
+ `,mc=r.div`
999
+ position: absolute;
1000
+ inset: 0;
1001
+ background: rgba(22, 21, 24, 0.45);
1002
+ `,gc=r.div`
1003
+ position: relative;
1004
+ z-index: 1;
1005
+ width: 100%;
1006
+ max-width: 420px;
1007
+ background: ${Oe.white};
1008
+ border-radius: ${xc.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
+ `,bc=r.div`
1013
+ display: flex;
1014
+ align-items: center;
1015
+ gap: 14px;
1016
+ margin-bottom: 18px;
1017
+ `,yc=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
+ `,wc=r.div`
1031
+ font-weight: 700;
1032
+ font-size: 16px;
1033
+ color: ${Oe.text};
1034
+ margin-bottom: 6px;
1035
+ `,vc=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
+ `,jc=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
+ `,kc=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
+ `,$c=r(it)`
1074
+ ${hi};
1075
+ `,Cc=r.div`
1076
+ display: flex;
1077
+ gap: 10px;
1078
+ margin-top: 18px;
1079
+ `,ra=r(Qe)`
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 Ic(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:E,usdCents:z}=await En(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:E,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 T=W;let B=!1,m;try{b(n("marketCheckout.confirming"));const S={trade:T.trade,buyer:l.address,signer:l.signer,credits:[T.credit],maxCreditedValue:T.maxCreditedValue,onBroadcast:({txHash:E})=>V.current.broadcast(T.credit.id,E),onReverted:({txHash:E})=>{E&&V.current.reverted(E)}};if(V.current.submitStarted(T.credit.id),ni())try{m=await yl(S),V.current.broadcast(T.credit.id,m),await ai(m),B=!0}catch(E){if(E instanceof ii)B=!0;else if(E instanceof si){if(E.reason==="relayer-unreachable")throw V.current.unobservable(T.credit.id),E;if(!Gt(l.providerType))throw E;m=await Tr(S)}else throw m&&V.current.reverted(m),E}else m=await Tr(S)}catch(S){V.current.submitFinished(T.credit.id),console.error("[market] buy now failed",S),await ee([T.credit.id])&&M(null),i.current=null,Z(be(S)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(S),value_usd:T.usdCents/100}),v.invalidateQueries({queryKey:["usd-balance"]}),I(Cn(S)),h("error");const E=(S.message??"").toLowerCase();(E.includes("not found")||E.includes("no active listing")||E.includes("404"))&&o();return}V.current.submitFinished(T.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:T.usdCents/100,category:t.category,is_smart:!1}],value_credits:T.credits,value_usd:T.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:[Ic(t)],txHash:m};g("/success",{state:re})}async function ee(W){if(!l||W.length===0)return!1;const T=W.filter(B=>!V.current.mayBeConsumed(B));if(T.length===0)return!1;try{return await Da(l.identity,T),!0}catch{return!1}}function xe(W){ee(W.filter(T=>!V.current.isInFlight(T)))}function pe(){l&&q&&ee([q.credit.id]),i.current=null,d()}const le=$==="working";return e.jsxs(fc,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),children:[e.jsx(mc,{onClick:le?void 0:pe,"aria-hidden":!0}),e.jsxs(gc,{children:[e.jsxs(bc,{children:[e.jsx(yc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx(wc,{title:t.name,children:t.name||n("buyModal.itemFallback")}),e.jsx(Ka,{"data-variant":"rarity",children:t.rarity})]})]}),e.jsx(vc,{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(jc,{"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(kc,{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($c,{message:k}),e.jsxs(Cc,{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 Sc(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 Ac(t){return`${t.contractAddress}-${t.itemId??t.tokenId??t.id}`.toLowerCase()}function Mc(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(Mc($,s))continue;const h=Ac($);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 Pc=20,Lc=30,ia=[];function Rc(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:Pc}).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:Lc}).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}=Sc(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 Fc(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
+ `,Tc=r.div``,zc=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
+ `,Nc=r.p``,Bc=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 _c({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()=>{Fl(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(Tc,{"data-preview-loading":!0,"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(zc,{"aria-hidden":!0})}):null,V&&!g?e.jsx(Nc,{"data-preview-note":!0,children:n("itemPreview.shownOnBody",{shape:ks(K)})}):null,!y||!p?null:e.jsx(Rl,{previewId:"shop-item-preview"}),!y||p?null:e.jsxs(Bc,{"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 Wc=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
+ `,Dc=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
+ `,qc=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
+ `,Oc=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
+ `,Kc=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
+ `,Hc=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
+ `,Uc=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
+ `,Vc=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
+ `,Gc=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
+ `,Yc=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
+ `,Jc=r.div`
1399
+ ${mi}
1400
+ `,Zc=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
+ `,Xc=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
+ `,eu=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
+ `,tu=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
+ `,nu=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
+ `,ru=r.div`
1528
+ flex: none;
1529
+ display: flex;
1530
+ align-items: center;
1531
+ justify-content: flex-end;
1532
+ gap: 8px;
1533
+ `,au=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
+ `,iu=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,su=!1;function ou(t){return/^0x[a-fA-F0-9]{40}$/.test(t)?`${t.slice(0,6)}…${t.slice(-4)}`:t}function lu(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 du(t,s){var d;return(((d=t==null?void 0:t.trim())==null?void 0:d[0])||s.replace(/^0x/i,"")[0]||"?").toUpperCase()}function cu(t){return t%100>=11&&t%100<=13?"th":["th","st","nd","rd"][t%10]??"th"}function uu(t,s){const d=new Date(t);return Number.isNaN(d.getTime())?"—":s==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(d)} ${d.getDate()}${cu(d.getDate())}, ${d.getFullYear()}`:new Intl.DateTimeFormat(s,{day:"numeric",month:"long",year:"numeric"}).format(d)}function pu(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 hu({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):ou(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:lu(s)},"aria-hidden":!0,children:du(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(Zc,{type:"button",onClick:()=>b(`/items/creator/${s}`),children:H}):e.jsx(Jc,{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?uu(t.saleEndsAt,l):e.jsx(ca,{children:"—"})}),e.jsx("td",{"data-label":o.price,children:e.jsxs(Xc,{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(eu,{"data-persistent":p?"true":void 0,children:p?e.jsx(nu,{"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(tu,{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 xu({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=Qa(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:su,queryFn:()=>Cs(d,o)}),pe=H.some(m=>m.source==="legacy"),{data:le}=Ua(pe);function W(){l.invalidateQueries({queryKey:["item-resales",d,o]})}const T={owner:n("resales.colOwner"),itemNumber:n("resales.colItemNumber"),expiration:n("resales.colExpiration"),price:n("resales.colPrice")};return e.jsxs(e.Fragment,{children:[e.jsx(Wc,{onClick:y?void 0:s,role:"presentation",children:e.jsxs(Dc,{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(qc,{children:[e.jsx(Oc,{children:n("resales.modalTitle")}),e.jsx(Kc,{onClick:s,"aria-label":n("resales.close"),"data-testid":"resellers-close",children:e.jsx(L,{name:"close"})})]}),e.jsxs(Hc,{children:[e.jsxs(Qc,{children:[e.jsx(Uc,{"data-testid":"resales-count",children:n("resales.count",{count:H.length})}),e.jsxs(Vc,{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(iu,{"data-testid":"resales-empty",children:n("resales.empty")}):null,K.length>0?e.jsxs(e.Fragment,{children:[e.jsx(Gc,{children:e.jsxs(Yc,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:T.owner}),e.jsx("th",{scope:"col",children:T.itemNumber}),e.jsx("th",{scope:"col",children:T.expiration}),e.jsx("th",{scope:"col",children:T.price})]})}),e.jsx("tbody",{children:Y.map(m=>{const re=m.source==="legacy",S=x.some(J=>J.id===m.id),E=m.tokenId&&ee[m.tokenId]||{},z=m.issuedId??E.issuedId,D=m.seller??E.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(hu,{r:ae,seller:D,issuedId:z,labels:T,locale:g,isOwn:ve,isLegacy:re,inCart:S,fallbackImage:ae.thumbnail,onAdd:()=>p(ae,"item_detail"),onBuyNative:()=>b(ae),onBuyLegacy:()=>I(pu(ae))},m.tradeId??m.id)})})]})}),V>1?e.jsxs(ru,{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(au,{"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(Tn,{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 fu="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:mu}=a,gu=r.div`
1625
+ position: fixed;
1626
+ inset: 0;
1627
+ z-index: ${mu.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
+ `,bu=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
+ `,yu=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
+ `,wu=r.h2`
1660
+ margin: 0;
1661
+ font-weight: 600;
1662
+ font-size: 20px;
1663
+ line-height: 1.6;
1664
+ color: ${me.text};
1665
+ `,vu=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
+ `,ju=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
+ `,ku=r.img`
1702
+ flex: none;
1703
+ width: 76px;
1704
+ height: 76px;
1705
+ `,$u=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
+ `,Cu=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
+ `,Iu=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
+ `,Su=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
+ `,Au=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 Mu(t,s){return`${nt.marketplaceUrl}/contracts/${t}/tokens/${s}`}function Pu(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"?Pu(s,t.itemId):Mu(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(gu,{role:"presentation",onClick:d,children:e.jsxs(bu,{ref:v,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:$=>$.stopPropagation(),children:[e.jsxs(yu,{children:[e.jsx(wu,{children:n("marketplaceRedirect.title")}),e.jsx(vu,{onClick:d,"aria-label":n("marketplaceRedirect.close"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(ju,{children:[e.jsx(ku,{src:fu,alt:"","aria-hidden":!0}),e.jsx($u,{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(Cu,{children:[e.jsx(Iu,{onClick:d,"data-testid":"marketplace-redirect-cancel",children:n("marketplaceRedirect.cancel")}),e.jsxs(Su,{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(Au,{"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 Lu(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 Fu(x,"getNotifyRequest")}async function Ru(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 Fu(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
+ `,Tu=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
+ `,zu=r.label`
1795
+ font-size: 14px;
1796
+ color: ${Me.softWhite};
1797
+ `,Nu=r.div`
1798
+ display: flex;
1799
+ align-items: stretch;
1800
+ gap: 8px;
1801
+ `,Bu=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
+ `,_u=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
+ `,Wu=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 Du({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:()=>Lu(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 Ru({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(_u,{"aria-hidden":!0,children:e.jsx(L,{name:"check",size:12})}),e.jsx(Wu,{children:n("notifyMe.subscribedBody")})]}):e.jsxs(Tu,{onSubmit:A=>void C(A),"data-testid":"notify",children:[e.jsx(zu,{htmlFor:"notify-email",children:n("notifyMe.label")}),e.jsxs(Nu,{children:[e.jsx(Bu,{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 qu=r.div`
1862
+ display: flex;
1863
+ flex-direction: column;
1864
+ gap: 4px;
1865
+ width: 100%;
1866
+ font-family: ${a.font.sans};
1867
+ `,Ou=r.div`
1868
+ display: flex;
1869
+ align-items: flex-start;
1870
+ justify-content: space-between;
1871
+ gap: 12px;
1872
+ font-size: 12px;
1873
+ `,Ku=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
+ `,Hu=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 Uu({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(qu,{className:d,"data-testid":o,children:[e.jsxs(Ou,{children:[e.jsx(Ku,{children:n("offerStock.label")}),e.jsx(ba,{children:n("offerStock.claimed",{claimed:l,total:s})})]}),e.jsx(Hu,{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 Vu=new Map(Object.entries(Ss).flatMap(([t,s])=>s.length===1?[[s[0],t]]:[])),xt="/items";function Gu(t){return t?`${xt}?rarities=${encodeURIComponent(t.toLowerCase())}`:null}function Yu(t){const s=t.wearableCategory;if(s){const d=Vu.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 Ju(){return`${xt}?smart=true`}const Zu=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 Xu({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(Zu,{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:Ue,media:oe,font:ep,gradients:tp}=a,np=r.div`
1936
+ max-width: 1721px;
1937
+ margin: 0 auto;
1938
+
1939
+ ${oe.maxWidth("lg")} {
1940
+ padding-bottom: 88px;
1941
+ }
1942
+ `,rp=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
+ `,ap=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
+ `,ip=r.span`
1961
+ color: ${f.muted2};
1962
+ `,sp=r.span`
1963
+ color: ${f.softWhite};
1964
+ font-weight: 600;
1965
+ `,op=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
+ `,lp=r.div`
2011
+ position: relative;
2012
+ aspect-ratio: 1045 / 752;
2013
+ border-radius: ${Ue.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
+ `,dp=r.div``,cp=r.span`
2165
+ position: absolute;
2166
+ inset: 0;
2167
+ width: 100%;
2168
+ height: 100%;
2169
+ border-radius: inherit;
2170
+ `,up=r.div`
2171
+ display: flex;
2172
+ flex-direction: column;
2173
+ gap: 0;
2174
+ `,pp=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
+ `,hp=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: ${Ue.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
+ `,xp=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: ${Ue.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
+ `,fp=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
+ `,mp=r.div`
2328
+ display: flex;
2329
+ flex-direction: column;
2330
+ align-items: flex-start;
2331
+ gap: 8px;
2332
+ `,zn=r(mp)`
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
+ `,gp=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
+ `,bp=r(Rs)`
2409
+ ${Ii}
2410
+ `,yp=r(Xu)`
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
+ `,wp=r(Ls)`
2425
+ margin-bottom: 12px;
2426
+ `,vp=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
+ `,jp=r.div`
2439
+ display: flex;
2440
+ align-items: flex-start;
2441
+ gap: 16px;
2442
+ width: 100%;
2443
+ `,kp=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
+ `,$p=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: ${Ue.chip};
2518
+ }
2519
+ `,Cp=r.span`
2520
+ font-size: 24px;
2521
+ font-weight: 700;
2522
+ color: ${f.softWhite};
2523
+ margin-right: -2px;
2524
+ `,Ip=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 Sp=r.div`
2535
+ font-size: 13px;
2536
+ font-weight: 600;
2537
+ color: ${f.dclRed};
2538
+ `,Ap=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(Io)`
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 Mp=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(Qe)`
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: ${tp.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
+ `,Pp=r(Qe)`
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
+ `,Lp=r(Qe)`
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(Qe)`
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
+ `,Rp=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 Fp=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
+ `,Tp=r(Qe)`
2791
+ margin-top: 6px;
2792
+ `,zp=r(L)`
2793
+ opacity: 0.4;
2794
+ `,Np=r.h1`
2795
+ font-size: 22px;
2796
+ `,Bp=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
+ `,_p=r.div`
2805
+ display: flex;
2806
+ flex-direction: column;
2807
+ align-self: stretch;
2808
+ gap: 16px;
2809
+ padding: 8px 0;
2810
+ `,Wp=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
+ `,Dp=r.span`
2835
+ height: 34px;
2836
+ width: 70%;
2837
+ margin: 3px 0;
2838
+ border-radius: 8px;
2839
+ `,qp=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
+ `,Op=r.span`
2857
+ display: block;
2858
+ height: 30px;
2859
+ width: 40%;
2860
+ margin: 16px 0 13px;
2861
+ border-radius: 8px;
2862
+ `,Kp=r.span`
2863
+ display: block;
2864
+ height: 42px;
2865
+ width: 100%;
2866
+ border-radius: 8px;
2867
+ margin-top: 20px;
2868
+ `,Qt=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
+ `,Hp=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: ${Ue.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
+ `,Up=r(L)`
2898
+ width: 20px;
2899
+ height: 20px;
2900
+ color: ${f.softWhite};
2901
+ `,Vp=r(L)`
2902
+ width: 24px;
2903
+ height: 24px;
2904
+ color: ${f.white};
2905
+ `,Gp=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
+ `,Yp=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
+ `,Jp=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: ${ep.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: ${Ue.chip};
2953
+ }
2954
+ `,Zp=r(Bn)`
2955
+ width: 100%;
2956
+ height: 40px;
2957
+ text-align: center;
2958
+ border-radius: ${Ue.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
+ `,Xp=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
+ `,eh=r.span`
3024
+ font-size: 14px;
3025
+ font-weight: 600;
3026
+
3027
+ [data-variant='original'] & {
3028
+ color: ${f.muted2};
3029
+ }
3030
+ `,th=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
+ `,nh=r.div`
3040
+ display: flex;
3041
+ flex-direction: column;
3042
+ gap: 12px;
3043
+ width: 100%;
3044
+ `,rh=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
+ `,ah=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
+ `,ih=r.span`
3064
+ ${en};
3065
+ width: 120px;
3066
+ height: 30px;
3067
+ border-radius: ${Ue.btn};
3068
+ margin-bottom: 4px;
3069
+ `,Fa=r.span`
3070
+ ${en};
3071
+ width: 100%;
3072
+ height: 48px;
3073
+ border-radius: 16px;
3074
+ `,Ea=r.div`
3075
+ display: flex;
3076
+ align-items: center;
3077
+ gap: 12px;
3078
+ `,Ta=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 sh(t){return Object.values(Ae.Rarity).includes(t)}function oh(t){return t==="male"?n("itemDetail.genderMale"):t==="female"?n("itemDetail.genderFemale"):t==="unisex"?n("itemDetail.genderUnisex"):null}function Ut(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?n("itemDetail.categoryEmote"):n("itemDetail.categoryWearable")}const Na=8;function Wh(){const{pathname:t}=_a();return e.jsx(lh,{},t)}function lh(){var Ir,Sr,Ar;const{contractAddress:t,itemId:s,tokenId:d}=Hi(),o=pn(t),l=Fc(o),p=pn(s),x=pn(d),v=!!x,g=p??Nl(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=mo(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:Js(u)}),G(!0)}function xe(){if(y){ee();return}b||wo({type:"item-buy",path:$.pathname}),H()}const pe=c.useRef(!1);c.useEffect(()=>{if(!y||pe.current)return;const u=go("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=Es(Na,{exclude:le}),T=Ts({enabled:W.enabled,hasSignal:W.hasSignal,isLoading:W.isLoading,isError:W.isError,personalized:(Ir=W.result)==null?void 0:Ir.personalized,rowCount:((Sr=W.result)==null?void 0:Sr.data.length)??0}),{items:B,isCollectionOnly:m,siblings:re,siblingsFetched:S}=Rc({id:i.id,contractAddress:i.contractAddress,itemId:i.itemId??g,tokenId:i.tokenId,creator:i.creator}),{data:E,isLoading:z}=ie({queryKey:["shop-item",i.contractAddress,g],enabled:!b&&!v&&!!i.contractAddress&&!!g,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Xs(i.contractAddress,g)}),D=v?void 0:E;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:()=>eo(i.contractAddress,i.itemId)}),{data:Q,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)||(Q==null?void 0:Q.creator);u&&K(se=>se.creator?se:{...se,creator:u})},[D,Q]);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 to(i.contractAddress,i.itemId);return(u==null?void 0:u.id)??null}return null}}),{data:U}=ie({queryKey:["item-traits",i.contractAddress,g],enabled:!!i.contractAddress&&!!g,staleTime:5*6e4,retry:1,queryFn:()=>no(i.contractAddress,g)}),ot=(U==null?void 0:U.isSmart)??i.isSmart,Le=(U==null?void 0:U.utility)??null,$e=c.useMemo(()=>({...i,wearableCategory:i.wearableCategory??(U==null?void 0:U.wearableCategory)??void 0,gender:i.gender??(U==null?void 0:U.gender)??null}),[i,U==null?void 0:U.wearableCategory,U==null?void 0:U.gender]),gt=(U==null?void 0:U.urn)??null,{data:At}=ie({queryKey:["item-vrm",gt],enabled:!!gt&&i.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>ro(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:()=>Ao(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=zs(),{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}=Ua(b||!!R),te=R&&O?Ns(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=Bs({priceCredits:i.priceCredits,compareAtCredits:i.compareAtCredits,saleEndsAt:i.saleEndsAt}),ye=(()=>{var we,ct;if(!De)return null;const u=bo(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})(),Ee=c.useMemo(()=>({...i,tradeId:Re,id:Re??i.id}),[i,Re]),an=q.some(u=>u.id===Ee.id),Rt=!Ee.tokenId,Ai=((Ar=q.find(u=>u.id===Ee.id))==null?void 0:Ar.quantity)??0,sn=Rt&&typeof i.available=="number"&&Ai>=i.available,{key:Qn,faved:Ye}=_s(i),He=Ws(i),Mi=Qa(u=>u.locale),Ft=He===void 0?null:He.toLocaleString(Mi),Un=Ye?n("assetCard.removeFromFavorites"):n("assetCard.addToFavorites"),Vn=He===void 0?Un:n("itemDetail.favoriteAria",{action:Un,count:He}),Gn=c.useRef(null);c.useEffect(()=>{!i.name||ke||Gn.current===i.id||(Gn.current=i.id,Z("Shop Viewed Item",{...Ds(i),for_sale:de}),qs(i))},[i.id,i.name,ke,de]);const Et=`${o}/${x??p}`,Yn=c.useRef(Et);c.useEffect(()=>{if(Yn.current!==Et){if(Yn.current=Et,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"})}},[Et]);function Pi(){!de||on||ke||!Rt&&an||sn||C(Ee,"item_detail")}const Je=sh(i.rarity)?i.rarity:Ae.Rarity.COMMON,Jn=oh($e.gender),Tt=Os($e),Zn=Ks($e.gender),Xn=Gu(i.rarity),er=Yu($e),tr=de&&De,Li=m?n("itemDetail.moreFromCollection"):n("itemDetail.youMightAlsoLike"),on=Hs(i,y==null?void 0:y.address),[Ri,nr]=c.useState(!1),[Fi,rr]=c.useState(!1),[Ei,ar]=c.useState(!1),[Ti,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:()=>ao(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:Te}=ie({queryKey:["publishable-item",i.contractAddress,i.itemId,y==null?void 0:y.address],enabled:on&&!!y&&!!i.itemId,queryFn:async()=>y?(await Mo(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:!!Te,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?io(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 ko({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 Zs(i.contractAddress,i.itemId)===null:!1}catch{return!1}},onWaiting:u.onWaiting}}),u.silent||Zt.success(n("myAssets.removedFromSale",{name:i.name})),jt(null),Bl(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 jo)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??(U==null?void 0:U.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&&_l({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=!(Q!=null&&Q.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:Ut($e),creator:Wn(i.creator)}),image:Ki?i.thumbnail:void 0,type:"product"}:{}),kr?e.jsxs(Fp,{"data-notfound":!0,children:[e.jsx(zp,{name:"cart"}),e.jsx(Np,{children:n("itemDetail.notAvailableTitle")}),e.jsx(Ep,{children:n("itemDetail.notAvailableBody")}),e.jsx(Tp,{variant:"white",onClick:()=>j("/items"),children:n("notFound.cta")})]}):e.jsxs(np,{children:[e.jsxs(rp,{"aria-label":n("itemDetail.breadcrumbAria"),children:[e.jsx(ap,{onClick:()=>j("/items"),children:n("nav.collectibles")}),e.jsx(ip,{children:"/"}),e.jsx(sp,{children:i.name||n("itemDetail.itemFallback")})]}),e.jsxs(op,{style:{"--glow-rgb":Gs(Je),"--glow-core":Vs(Je)},children:[e.jsxs(lp,{"data-testid":"item-preview",children:[i.name?e.jsx(_c,{item:i}):e.jsx(dp,{"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(cp,{className:"skeleton","aria-hidden":!0})}),Qn?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(xp,{"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(up,{"data-testid":"item-info",children:i.name?e.jsxs(e.Fragment,{children:[tr&&i.compareAtCredits!=null?e.jsx(wp,{pct:Us(i.compareAtCredits,i.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(pp,{children:[e.jsxs(hp,{children:[i.name,v&&i.issuedId?` #${i.issuedId}`:""]}),Qn?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(fp,{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:Ut($e)}),children:[Tt?e.jsx(L,{name:Tt,size:18}):null,Ut($e)]}):e.jsxs(Be,{children:[Tt?e.jsx(L,{name:Tt,size:18}):null,Ut($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:Ju(),"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(gp,{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)||Q!=null&&Q.name||Cr?e.jsxs(Ci,{children:[vr?null:i.creator?e.jsxs(It,{children:[e.jsx(pt,{children:n("itemDetail.creator")}),e.jsx(bp,{address:i.creator,linkToProfile:!0,hidePrefix:!0})]}):$r?e.jsxs(It,{children:[e.jsx(pt,{children:n("itemDetail.creator")}),e.jsxs(Ea,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(Ta,{}),e.jsx(za,{})]})]}):null,Q!=null&&Q.name?e.jsxs(It,{"data-collection":!0,children:[e.jsx(pt,{children:n("itemDetail.collection")}),e.jsx(yp,{contractAddress:i.contractAddress,name:Q.name,items:re})]}):Cr?e.jsxs(It,{"data-collection":!0,children:[e.jsx(pt,{children:n("itemDetail.collection")}),e.jsxs(Ea,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(Ta,{}),e.jsx(za,{})]})]}):null]}):null,e.jsx(Si,{}),Oi?e.jsxs(ah,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(ih,{}),e.jsx(Fa,{}),e.jsx(Fa,{})]}):e.jsxs(e.Fragment,{children:[lt&&!Ne&&!b&&de&&!i.tokenId?e.jsxs(Hp,{"data-testid":"buy-from-creator",children:[e.jsxs(Qp,{children:[e.jsx(Up,{name:"buy-from-creator"}),n("itemDetail.buyFromCreator")]}),e.jsx(Vp,{name:"check-rounded"})]}):null,dt?e.jsxs(Xp,{"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(eh,{"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(th,{children:[n("itemDetail.stock")," ",Fe.length,"/",Ae.Rarity.getMaxSupply(Je).toLocaleString()]})]})]}):e.jsxs(vp,{children:[e.jsxs(jp,{children:[e.jsxs(kp,{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(Cp,{"aria-hidden":!0,children:"≈"}),e.jsx(Qt,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:k})})]})}),e.jsx(Ip,{children:n("assetCard.marketPrice")})]}):de?tr?e.jsxs($t,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Qt,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:i.priceCredits})}),e.jsx(Ap,{"data-testid":"detail-price-was",children:e.jsx(ge,{credits:i.compareAtCredits})}),e.jsx(So,{until:i.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs($t,{"data-testid":"item-price",children:[e.jsx(Qt,{}),e.jsx(Ct,{children:e.jsx(ge,{credits:i.priceCredits})})]}):ur&&dn?e.jsxs($t,{"data-testid":"item-price",children:[e.jsx(Qt,{}),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($p,{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(Uu,{claimed:ye.claimed,total:ye.total,testId:"detail-offer-stock"}):null,Lt!=null?e.jsx(Sp,{"data-testid":"detail-units-left",children:n("assetCard.unitsLeftAtThisPrice",{count:Lt})}):null]}),e.jsx(Mp,{"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(nh,{"data-testid":"manage-actions",children:[ur?e.jsxs(e.Fragment,{children:[hr?e.jsxs(Lp,{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(Pp,{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&&Te?e.jsx(ka,{type:"button","data-on-purple":!0,onClick:()=>ir(!0),children:n("itemDetail.manageIssue")}):null,Ke!=null?e.jsx(rh,{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(Du,{item:i}),i.itemId?e.jsx(Zp,{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(Gp,{"data-testid":"lowest-price","data-centered":dt||void 0,children:[dt?null:e.jsxs(Yp,{children:[n("itemDetail.lowestPrice"),e.jsx(Pe,{className:"ico"}),e.jsx(Jp,{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(Rp,{"data-testid":"you-own-note",children:[n("itemDetail.youOwnN",{count:xr})," ",e.jsx(Ba,{to:"/my-items",children:n("nav.myAssets")})]}):null]})]}):e.jsx(dh,{})})]}),e.jsx(Ys,{exclude:le,title:n("itemDetail.becauseYouOwn"),surface:"pdp",first:Na}),T!==null&&e.jsx(yo,{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(Tn,{item:Ee,resume:Y,onClose:()=>{G(!1),ne(!1)}}):null,Pt?e.jsx(Tn,{item:Pt,onClose:()=>{yt(null),Ze()}}):null,lt&&wt&&i.itemId?e.jsx(xu,{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(md,{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(Bd,{name:i.name,managed:Dn(y),canPayGas:dr,cancel:fr(!1),onClose:()=>sr(!1)}):null,Ei&&y&&i.tokenId?e.jsx(Td,{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&&Te&&y?e.jsx(sc,{item:Te,session:y,edit:or?mr:void 0,onListed:(u,se)=>{jt(u),K(we=>({...we,tradeId:se}))},onClose:br}):null,Ti&&Te&&y?e.jsx(Ll,{item:{contractAddress:Te.contractAddress,chainId:nt.chainId,itemId:Te.blockchainItemId,name:Te.name,thumbnail:Te.thumbnail,available:Te.remainingSupply},session:y,onClose:()=>{ir(!1),Ze()}}):null,tn&&bt?e.jsx(hc,{src:bt,itemName:i.name,onClose:()=>Mt(!1)}):null]})}function dh(){return e.jsxs(Bp,{"aria-hidden":!0,children:[e.jsx(Dp,{className:"skeleton"}),e.jsxs(qp,{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(_p,{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(Wp,{})]},t))}),e.jsx(Si,{}),e.jsx(Op,{className:"skeleton"}),e.jsx(Kp,{className:"skeleton"})]})}export{lh as ItemDetail,Wh as ItemDetailRoute,lh as default};
3090
+ //# sourceMappingURL=ItemDetail-DBAHPIQO.js.map