@dcl/shop 1.13.1-35339357506.commit-a201fb1 → 1.13.1-35586925336.commit-233cb74

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 (253) hide show
  1. package/_assets/{Activity-BZMB4hg5.js → Activity-DVxqB4-w.js} +6 -6
  2. package/_assets/{AnimatedBackground-CXVxNT-G.js → AnimatedBackground-BAU1eaiK.js} +6 -6
  3. package/_assets/Assets-CahpwOSk.js +990 -0
  4. package/_assets/Cart-Bu1gA1LF.js +748 -0
  5. package/_assets/{Collection-D7LTf_OS.js → Collection-DxIegvZy.js} +6 -6
  6. package/_assets/CollectionCarousel-LKRLbXj2.js +322 -0
  7. package/_assets/{Confetti-cdj3K_E3.js → Confetti-CWbRGatZ.js} +4 -4
  8. package/_assets/{ConstantsUtil-BRm3N2MJ.js → ConstantsUtil-DlwAB-hw.js} +2 -2
  9. package/_assets/{ContentClient-BuGONJzu.js → ContentClient-IJMk6mG2.js} +2 -2
  10. package/_assets/{Creator-DTGBDA7q.js → Creator-D1SDrih3.js} +16 -16
  11. package/_assets/{modal.styles-G1Y436F0.js → CreditPackPicker-DaeRrtlY.js} +92 -59
  12. package/_assets/{DeploymentBuilder-t6QMfSJh.js → DeploymentBuilder-DYXWwzjB.js} +2 -2
  13. package/_assets/{EmotePlaybackBar-DxozN5dA.js → EmotePlaybackBar-D-ONNk1C.js} +19 -19
  14. package/_assets/{ErrorNotice-Dlh8ddHO.js → ErrorNotice-BkbFM8dT.js} +2 -2
  15. package/_assets/{Event-B3nuIkGW.js → Event-Dip8xJQm.js} +5 -5
  16. package/_assets/{ExchangeController-CSSF68uc.js → ExchangeController-CY2Mkdv_.js} +2 -2
  17. package/_assets/{Faq-DQCrsGCA.js → Faq-CG1zpRo3.js} +2 -2
  18. package/_assets/{Filters-BsZs-9_M.js → Filters-CLt9wRFa.js} +9 -9
  19. package/_assets/{GetCredits-DLjX5S-_.js → GetCredits-Ltt32bvt.js} +2 -2
  20. package/_assets/{Grow-CBOQ3rs-.js → Grow-B2O8rLT0.js} +2 -2
  21. package/_assets/{HelpersUtil-ItKIMa0k.js → HelpersUtil-DhziSA6e.js} +2 -2
  22. package/_assets/ItemDetail-C2f1Vg-F.js +3411 -0
  23. package/_assets/{LoadMore-BxuVAL5h.js → LoadMore-DAb4YgwL.js} +2 -2
  24. package/_assets/{ManaPricingBanner.styles-dfVXcaNP.js → ManaPricingBanner.styles-Dbv27Wt0.js} +2 -2
  25. package/_assets/{MyAssets-BbWDjYod.js → MyAssets-7R4b2x-k.js} +8 -8
  26. package/_assets/{MyFavorites-DY192etV.js → MyFavorites-B5yVWMXr.js} +3 -3
  27. package/_assets/{MyStore-qM8HV1zc.js → MyStore-B6rTuULM.js} +7 -7
  28. package/_assets/{NetworkUtil-B4oEt17N.js → NetworkUtil-BqrmZA43.js} +2 -2
  29. package/_assets/{NotFound-CgcYb0ih.js → NotFound-CMFpOJuv.js} +2 -2
  30. package/_assets/{NotificationsBell-txLDBZgz.js → NotificationsBell-HnLhk_AZ.js} +13 -13
  31. package/_assets/{OutfitDetail-EWQSU1q3.js → OutfitDetail-B2q4LZzo.js} +2 -2
  32. package/_assets/OutfitPreview-C6pQxlWV.js +7 -0
  33. package/_assets/{OutfitStudio-CymFpAjx.js → OutfitStudio-DrFPqmU2.js} +10 -10
  34. package/_assets/PaymentMethodStep-DUz3lI2L.js +370 -0
  35. package/_assets/{SaleCountdown-3pApusNf.js → SaleCountdown-DL2l2eox.js} +2 -2
  36. package/_assets/{Spinner-BhJFlkpV.js → Spinner-p5xyOyv6.js} +2 -2
  37. package/_assets/{StoreSettings-CuaXmFqQ.js → StoreSettings-DlH-LWgC.js} +9 -9
  38. package/_assets/{Success-oMsLbOWh.js → Success-COZnRHOB.js} +2 -2
  39. package/_assets/{SwapController-DrYUKQJ9.js → SwapController-DbHaJ33O.js} +2 -2
  40. package/_assets/{Tooltip-BIdqgK8V.js → Tooltip-BdEQabCf.js} +2 -2
  41. package/_assets/{TradeService-JsADFsSl.js → TradeService-D9VfnmSM.js} +2 -2
  42. package/_assets/{W3MFrameProviderSingleton-DvSh92CX.js → W3MFrameProviderSingleton-B54cFMgI.js} +4 -4
  43. package/_assets/{WebCryptoP256-DgMWbKGz.js → WebCryptoP256-CSjbPn36.js} +2 -2
  44. package/_assets/{basic-GpwOtGyM.js → basic-Dr30zMiU.js} +2 -2
  45. package/_assets/{biconomy-NuhcX0Yi.js → biconomy-w807G5l6.js} +2 -2
  46. package/_assets/{browseLayout.styles-D0MZbKfc.js → browseLayout.styles-N7eMFwtu.js} +2 -2
  47. package/_assets/{browser-CztLWw1I.js → browser-Brru-P-a.js} +2 -2
  48. package/_assets/{browser-D0dzO3fx.js → browser-CBnBoWU2.js} +2 -2
  49. package/_assets/{browser-ponyfill-BdWvH_If.js → browser-ponyfill-DKIVrYKb.js} +2 -2
  50. package/_assets/{buy-ZzigQNxZ.js → buy-JkmVuuuT.js} +2 -2
  51. package/_assets/{buy-gasless-5QIoW0es.js → buy-gasless-wjbNv7iT.js} +2 -2
  52. package/_assets/cart-checkout-OIIxJ8qp.js +2 -0
  53. package/_assets/{categories-BCcLvB19.js → categories-DLTQlZ7m.js} +2 -2
  54. package/_assets/{ccip-0C-WJ2f3.js → ccip-C03Ik4um.js} +2 -2
  55. package/_assets/{ccip-CcFd-pp_.js → ccip-CXLmm-JE.js} +2 -2
  56. package/_assets/{chains-BoWQ7jDs.js → chains-CWyHmudW.js} +2 -2
  57. package/_assets/collectionPage.styles-Ch4x5hNg.js +41 -0
  58. package/_assets/{common-aEQBU1aZ.js → common-BaczUG05.js} +2 -2
  59. package/_assets/{controller-BHSkmDDd.js → controller-C5zIKFqD.js} +3 -3
  60. package/_assets/{core-Dnx08t4s.js → core-Bduse_Og.js} +5 -5
  61. package/_assets/{createSvgIcon-C3DiORbY.js → createSvgIcon-Cbj-qvcu.js} +4 -4
  62. package/_assets/{crumbs.styles-D969n73j.js → crumbs.styles-pyPMgoz0.js} +2 -2
  63. package/_assets/{custom-CyjlH7Cr.js → custom-BlNHH79K.js} +2 -2
  64. package/_assets/{data-capture-BUt-tqa3.js → data-capture-DPzsO2lN.js} +5 -5
  65. package/_assets/{dcl-schemas-CyEZVc6x.js → dcl-schemas-Cfq6CqWT.js} +2 -2
  66. package/_assets/{decimals-CiM-QvAk.js → decimals-Ck3jG3D_.js} +2 -2
  67. package/_assets/{decimals-BLhtmmbN.js → decimals-Dlp-ovfV.js} +2 -2
  68. package/_assets/{detectExtension-CdbTZOKn.js → detectExtension-DKrCOSsK.js} +2 -2
  69. package/_assets/{disposePreview-D5v9GkJF.js → disposePreview-Bsl7l0mM.js} +2 -2
  70. package/_assets/{email-BGoeypvI.js → email-BZxUVc1N.js} +7 -7
  71. package/_assets/{embedded-wallet-Cg2BVqx1.js → embedded-wallet-Ca8pu8Kj.js} +2 -2
  72. package/_assets/{emotion-styled.browser.esm-Bc8640ZT.js → emotion-styled.browser.esm-K6pLNO6r.js} +2 -2
  73. package/_assets/{engine-BQ4XBK5G.js → engine-yYaOSMR6.js} +2 -2
  74. package/_assets/{errors-DUBMk1_u.js → errors-bGFSPwV2.js} +2 -2
  75. package/_assets/{estimate-l1-fee-Cvh02XjO.js → estimate-l1-fee-DSUse9Ic.js} +2 -2
  76. package/_assets/{eth_estimateGas-BH-_dHsN.js → eth_estimateGas-BjjPr2og.js} +2 -2
  77. package/_assets/{eth_getStorageAt-CHailSu6.js → eth_getStorageAt-rgnCAOoG.js} +2 -2
  78. package/_assets/{eth_getTransactionCount-Ce8ytlz4.js → eth_getTransactionCount-BI8aKEHu.js} +2 -2
  79. package/_assets/{ethereum-AiomgAl3.js → ethereum-24wJcQBh.js} +2 -2
  80. package/_assets/{ethers-CQbljc2C.js → ethers-DP-FFkj0.js} +2 -2
  81. package/_assets/{events-Ey8xQ1_i.js → events-CVUM8JW6.js} +2 -2
  82. package/_assets/{execute-CcyXPSES.js → execute-BRc4sJMG.js} +3 -3
  83. package/_assets/{extractIPFS-CZpI5_La.js → extractIPFS-hqlXANBo.js} +2 -2
  84. package/_assets/{features-CW3BJut9.js → features-CTj0mVUZ.js} +2 -2
  85. package/_assets/{fetchTokenMetadata-zQ7k58lq.js → fetchTokenMetadata-DHBaXmEz.js} +3 -3
  86. package/_assets/{field.styles-CNumGj8X.js → field.styles-D7vfwNck.js} +2 -2
  87. package/_assets/{fortmatic-D7_cu5X7.js → fortmatic-DLlO1tvy.js} +2 -2
  88. package/_assets/{get-bytecode-ChEcvuHJ.js → get-bytecode-BUP6yxh-.js} +2 -2
  89. package/_assets/{get-ecosystem-wallet-info-BXFPDksD.js → get-ecosystem-wallet-info-CTwzTA-p.js} +2 -2
  90. package/_assets/{getBalance-CdWdKWho.js → getBalance-B4AvRMJH.js} +3 -3
  91. package/_assets/{getInstalledModules-Dy7ryxbR.js → getInstalledModules-BZteepyF.js} +2 -2
  92. package/_assets/{getNFT-DEIlQj0F.js → getNFT-AHa26JAd.js} +2 -2
  93. package/_assets/{getNFT-CVhWquj2.js → getNFT-BDSIClLK.js} +3 -3
  94. package/_assets/{grid.styles-DGwAy7au.js → grid.styles-D-dW0hBU.js} +2 -2
  95. package/_assets/{hashTypedData-G7W_A13L.js → hashTypedData-Ciseup4v.js} +2 -2
  96. package/_assets/{hashTypedData-CS0nSVCm.js → hashTypedData-CoaE5lsX.js} +2 -2
  97. package/_assets/{import-C1FMKChQ.js → import-D9w8U2BF.js} +2 -2
  98. package/_assets/{in-app-C03QvI9E.js → in-app-BKqPia8J.js} +2 -2
  99. package/_assets/{in-app-wallet-calls-BSt_kW07.js → in-app-wallet-calls-CVA-lTS0.js} +2 -2
  100. package/_assets/{index-BiR1vPRL.js → index-0sHpGDt1.js} +14 -14
  101. package/_assets/{index-CtUq3VAh.js → index-1GVnNxjY.js} +2 -2
  102. package/_assets/{index-BGlAHo1V.js → index-6MmHeSoo.js} +2 -2
  103. package/_assets/{index-DUvDgJtL.js → index-B7j4g1xG.js} +3 -3
  104. package/_assets/{index-Csid9_UU.js → index-BBnMk2y3.js} +2 -2
  105. package/_assets/{index-DBpSYzZ1.js → index-BBsgLbaB.js} +2 -2
  106. package/_assets/{index-sc9WaH7T.js → index-BJdScqCd.js} +2 -2
  107. package/_assets/{index-CAdxESjh.js → index-BXZ_O95T.js} +2 -2
  108. package/_assets/{index-B0G5-1U4.js → index-B_Zf3K5d.js} +2 -2
  109. package/_assets/{index-Dr8MILBs.js → index-BfiOP8wf.js} +2 -2
  110. package/_assets/{index-DW4iGfw5.js → index-BgQZ06By.js} +2 -2
  111. package/_assets/{index-CZ765edO.js → index-BomTuEwH.js} +5 -5
  112. package/_assets/{index-P_yp2lGD.js → index-Bslb-pmi.js} +2 -2
  113. package/_assets/{index-BYpz1U-Z.js → index-BzahFDSU.js} +2 -2
  114. package/_assets/{index-ZSCJO9rV.js → index-C3DPIo72.js} +2 -2
  115. package/_assets/{index-C0q8Kut4.js → index-C4FzBLKs.js} +9 -9
  116. package/_assets/{index-CbJaCRxI.js → index-C6PzN-IJ.js} +2 -2
  117. package/_assets/{index-CMsQl6_s.js → index-C8c5f89M.js} +2 -2
  118. package/_assets/{index-BWhGWxu6.js → index-C9-SXSSy.js} +2 -2
  119. package/_assets/{index-CRdAPM4e.js → index-C9w1MuYu.js} +3 -3
  120. package/_assets/{index-mp9sO-P_.js → index-CE3xNB2T.js} +2 -2
  121. package/_assets/{index-CITTAZNc.js → index-CHDmkeVX.js} +2 -2
  122. package/_assets/{index-DHAeKuI8.js → index-COLhyY_b.js} +2 -2
  123. package/_assets/{index-B4vPl9JJ.js → index-CSMf1h-z.js} +2 -2
  124. package/_assets/{index-QkD5v2W0.js → index-CSf5OLfb.js} +2 -2
  125. package/_assets/{index-jG0dKzqZ.js → index-CSpUVyNm.js} +2 -2
  126. package/_assets/{index-DtQZWv2W.js → index-CTOOqCnR.js} +2 -2
  127. package/_assets/{index-C_MZ3G2Z.js → index-CVz_T2rD.js} +2 -2
  128. package/_assets/{index-Cy_pguIe.js → index-CXRXb_af.js} +2 -2
  129. package/_assets/{index-DCOfqwFn.js → index-CXuLC8Ln.js} +2 -2
  130. package/_assets/{index-DNpS4XJW.js → index-CbUUOTSf.js} +3 -3
  131. package/_assets/{index-D080sfYK.js → index-Cc0hwgD4.js} +2 -2
  132. package/_assets/{index-Cbvqh2tB.js → index-CdT7EpAF.js} +2 -2
  133. package/_assets/{index-WhAOvWl7.js → index-ChYxci7d.js} +2 -2
  134. package/_assets/{index-201_pXjD.js → index-Co-sQ6r9.js} +2 -2
  135. package/_assets/{index-D7n0Nbcc.js → index-CuRWWFnK.js} +4 -4
  136. package/_assets/{index-SRawa_W1.js → index-Cxpz9dB-.js} +2 -2
  137. package/_assets/{index-C53nEuU1.css → index-Cym62eey.css} +1 -1
  138. package/_assets/{index-Bx-HA0Fa.js → index-D7vNRL5k.js} +2 -2
  139. package/_assets/{index-BjTaCUde.js → index-D7xfhr1h.js} +2 -2
  140. package/_assets/{index-DbnwTj_J.js → index-DAsBgsXI.js} +2 -2
  141. package/_assets/{index-DiRK7oEZ.js → index-DE3Boza_.js} +2 -2
  142. package/_assets/{index-ovxDr1NO.js → index-DGKmMN3B.js} +2 -2
  143. package/_assets/{index-4y3ole-I.js → index-DIsvxr-Z.js} +2 -2
  144. package/_assets/{index-CseNtOsJ.js → index-DRDH2z8Q.js} +3 -3
  145. package/_assets/{index-gx6q3jYb.js → index-DSCeNZpG.js} +2 -2
  146. package/_assets/{index-BHRJojA7.js → index-DSimdEWJ.js} +2 -2
  147. package/_assets/{index-CzzqMKs2.js → index-DVbC13OC.js} +2 -2
  148. package/_assets/{index-CSAbgA1H.js → index-DViUClBI.js} +2 -2
  149. package/_assets/{index-CeBVhm3u.js → index-DVixZLDd.js} +2 -2
  150. package/_assets/{index-CVjhybQY.js → index-DZFoNaD3.js} +4 -4
  151. package/_assets/{index-BDhEGVn5.js → index-DgFTUe-g.js} +2 -2
  152. package/_assets/{index-4lxXm67R.js → index-DhRJVemB.js} +2 -2
  153. package/_assets/{index-C8RRvl4w.js → index-Dl1rtJ0f.js} +5 -5
  154. package/_assets/{index-B9BLMD9v.js → index-DmHNU9G6.js} +2 -2
  155. package/_assets/{index-DmEpmcAI.js → index-DnHUEsB9.js} +2 -2
  156. package/_assets/{index-B_Ukoyjo.js → index-DpELxfQm.js} +4 -4
  157. package/_assets/{index-Cq3PcGZS.js → index-E7SYJRe7.js} +2 -2
  158. package/_assets/{index-DYEzTJ00.js → index-HvP4pq2l.js} +2 -2
  159. package/_assets/{index-D-bvLCMJ.js → index-XXheXTNl.js} +2 -2
  160. package/_assets/{index-rWvX-JNU.js → index-YiuuAnui.js} +2 -2
  161. package/_assets/{index-Bc5rdQrs.js → index-cNNMEAh7.js} +2 -2
  162. package/_assets/{index-VVP1Lz5F.js → index-jWUAysyE.js} +2 -2
  163. package/_assets/{index-d0JdYucS.js → index-tBgzCW--.js} +2 -2
  164. package/_assets/{index-DzXb9yfS.js → index-tQNvbqYL.js} +2 -2
  165. package/_assets/{index-Bvf3c8I8.js → index-uGYuq54d.js} +2 -2
  166. package/_assets/{index-TuFs6Mw_.js → index-w45Rn437.js} +3 -3
  167. package/_assets/{index-DvGoWYRw.js → index-wRIdLZTx.js} +2 -2
  168. package/_assets/{index.es-CuJy51Rq.js → index.es-DJTa2qsL.js} +5 -5
  169. package/_assets/{index.es-B3Zhssg2.js → index.es-DL3z7Gn1.js} +2 -2
  170. package/_assets/{index.es-DF1aG5Z7.js → index.es-DL9fLQDi.js} +2 -2
  171. package/_assets/{index.es-DmJ25C-K.js → index.es-DhdoSy_i.js} +2 -2
  172. package/_assets/{items-empty-BAKFq7PT.js → items-empty-xbmQ53J-.js} +2 -2
  173. package/_assets/{jump-BolxKTOM.js → jump-CstL_PNR.js} +2 -2
  174. package/_assets/{linkAccount-D4jgrDpa.js → linkAccount-CZKzHb_O.js} +2 -2
  175. package/_assets/{localBatchGatewayRequest-BMvn0i_b.js → localBatchGatewayRequest-CSm96h1f.js} +2 -2
  176. package/_assets/{modal.styles-wZfJxa-e.js → modal.styles-BnyaAuqp.js} +2 -2
  177. package/_assets/{native-BS9-NZgY.js → native-Dla2MVLh.js} +2 -2
  178. package/_assets/{networks-BuXAUv57.js → networks-DUEy9f8c.js} +2 -2
  179. package/_assets/{onramp-B2gdYmCO.js → onramp-CVWo4Y_P.js} +2 -2
  180. package/_assets/{openzeppelin-B_FytaNI.js → openzeppelin-Y4Q6Lben.js} +2 -2
  181. package/_assets/{ownerOf-D6JpENJA.js → ownerOf-Ddg3DAJm.js} +2 -2
  182. package/_assets/{parseNft-DiM6gxbM.js → parseNft-DtvecMPZ.js} +3 -3
  183. package/_assets/{parseSignature-BJVq2ShY.js → parseSignature-C6tQcIwK.js} +4 -4
  184. package/_assets/{parseSignature-VwEmUV8h.js → parseSignature-DgDdGDI3.js} +2 -2
  185. package/_assets/{passkeys-DEiWC5Z7.js → passkeys-pBY7ApMY.js} +2 -2
  186. package/_assets/{pay-with-exchange-C7Nm7Ic2.js → pay-with-exchange-BuUAkpop.js} +2 -2
  187. package/_assets/{prepare-contract-call-r6GCr7Mb.js → prepare-contract-call-D6z_r1Pg.js} +2 -2
  188. package/_assets/{qr-overlay-mbqSXRsy.js → qr-overlay-C9_6EJEC.js} +4 -4
  189. package/_assets/{react-DKpLHQl0.js → react-JcMZcmnF.js} +2 -2
  190. package/_assets/{receive-KMWzb1kT.js → receive-rZlgeSPB.js} +2 -2
  191. package/_assets/{resolveImplementation-NjDCaPa0.js → resolveImplementation-CnYymjGs.js} +2 -2
  192. package/_assets/{resume-buy-DRxVLtZn.js → resume-buy-CuppYS1m.js} +2 -2
  193. package/_assets/{resume-name-m2sdJCvP.js → resume-name-y8rQZRdD.js} +2 -2
  194. package/_assets/{rpc-C6ONv-35.js → rpc-mvgFppBG.js} +2 -2
  195. package/_assets/{sales-empty-BJGisiNF.js → sales-empty-CdGFCohq.js} +2 -2
  196. package/_assets/{search-empty-DcGDTM8L.js → search-empty-B_4a6gQT.js} +2 -2
  197. package/_assets/{secp256k1-Dogd-wfD.js → secp256k1-Cy9xn3wp.js} +2 -2
  198. package/_assets/{secp256k1-ZRJNrIuk.js → secp256k1-DDCcwdhU.js} +2 -2
  199. package/_assets/{secp256k1-BhLjMGke.js → secp256k1-Dg9JG9l9.js} +2 -2
  200. package/_assets/{send-B4t6gmpc.js → send-CC5Bluei.js} +2 -2
  201. package/_assets/{send-batch-transaction-BULbschT.js → send-batch-transaction-C33v6LlY.js} +2 -2
  202. package/_assets/{send-eip712-transaction-B5q6HGy1.js → send-eip712-transaction-K5fxd0tj.js} +3 -3
  203. package/_assets/{send-gasless-transaction-BW_1tZ59.js → send-gasless-transaction-Du-l4dlU.js} +3 -3
  204. package/_assets/send-transaction-CEZPlNIq.js +3 -0
  205. package/_assets/sendMetaTransaction-CWnYhaMC.js +2 -0
  206. package/_assets/{sendRawTransaction-DHZVBFUc.js → sendRawTransaction-DyMaZh0r.js} +4 -4
  207. package/_assets/{sentry-WFsNKO98.js → sentry-D1js75-6.js} +3 -3
  208. package/_assets/{serializeTransaction-C1OICSTJ.js → serializeTransaction-CPK6Ju6d.js} +2 -2
  209. package/_assets/{session-proposal-C_rldw8k.js → session-proposal-CD8QJ4yk.js} +2 -2
  210. package/_assets/{session-request-DRsdGyCL.js → session-request-DgzY2KTJ.js} +3 -3
  211. package/_assets/{sha256-YJL3wOOs.js → sha256-kA5UGKmr.js} +2 -2
  212. package/_assets/sha3-CBacSK_w.js +2 -0
  213. package/_assets/signin-empty-DLmtvjDP.js +2 -0
  214. package/_assets/{signing-B9DcFwzm.js → signing-BepqILxJ.js} +4 -4
  215. package/_assets/{skeleton.styles-C4BBCe2d.js → skeleton.styles-BwABaM9c.js} +2 -2
  216. package/_assets/{socials-Zki4qksa.js → socials-BkxZ6L__.js} +2 -2
  217. package/_assets/{styled-uWbR3175.js → styled-DLQS4N_3.js} +3 -3
  218. package/_assets/{swaps-DiPvT9W6.js → swaps-BuHaQFK-.js} +2 -2
  219. package/_assets/{thirdweb-wDwbIJ1W.js → thirdweb-B6bdJ15h.js} +4 -4
  220. package/_assets/{to-serializable-transaction-6f6pRX-q.js → to-serializable-transaction-zMUmHjvx.js} +3 -3
  221. package/_assets/{totalSupply-rJ9WcMzs.js → totalSupply-n7_Dfg_F.js} +2 -2
  222. package/_assets/{trade-encoding-DcX77zVS.js → trade-encoding-CTonKWPZ.js} +2 -2
  223. package/_assets/{transaction-DxXkarJJ.js → transaction-DL-AU6Tc.js} +2 -2
  224. package/_assets/{transactionReceipt-CxzioWsu.js → transactionReceipt-CaEvlKH3.js} +2 -2
  225. package/_assets/{transactions-BGQTb4VV.js → transactions-IsooRXXE.js} +2 -2
  226. package/_assets/{useCreatorSales-D4BzYp33.js → useCreatorSales-Dful9rbz.js} +2 -2
  227. package/_assets/useInfiniteGrid-Dt8P8lu1.js +2 -0
  228. package/_assets/{useStore-tid_idJp.js → useStore-DND8t71t.js} +3 -3
  229. package/_assets/{useTheme-CRxh5DOu.js → useTheme-CWYYWD1w.js} +2 -2
  230. package/_assets/{utils-Cj21wfvp.js → utils-CZ8Ii6WF.js} +2 -2
  231. package/_assets/{verifyHash-mzlxS6TY.js → verifyHash-DJXHoGAV.js} +2 -2
  232. package/_assets/{w3m-modal-BXpuWB5y.js → w3m-modal-ChCxLknc.js} +2 -2
  233. package/_assets/{w3m-modal-BArYWi0C.js → w3m-modal-Hgaz-7a6.js} +2 -2
  234. package/_assets/{wait-for-tx-receipt-DRwGvrwD.js → wait-for-tx-receipt-C-aGsuPj.js} +2 -2
  235. package/_assets/{wallets-HjCMtUn8.js → wallets-CCSAxj4o.js} +6 -6
  236. package/_assets/{web-connector-15d-OnTN.js → web-connector-BaH0Wnkg.js} +4 -4
  237. package/_assets/{writeContract-BJQQGUKO.js → writeContract-BgWV-gY0.js} +2 -2
  238. package/_assets/{zora-sepolia-BFYuSeeX.js → zora-sepolia-DYV_V-rH.js} +2 -2
  239. package/_assets/{zoraTestnet-DdfVMUdb.js → zoraTestnet-YPbFYCTr.js} +2 -2
  240. package/index.html +11 -11
  241. package/package.json +2 -2
  242. package/_assets/Assets-tHTTA31T.js +0 -980
  243. package/_assets/Cart-BTFM7sgI.js +0 -748
  244. package/_assets/CollectionCarousel-DsJ7L4rs.js +0 -322
  245. package/_assets/ItemDetail-Bfbuu0cW.js +0 -3779
  246. package/_assets/OutfitPreview-Cj1w-8ou.js +0 -7
  247. package/_assets/cart-checkout-D_rUzOn4.js +0 -2
  248. package/_assets/collectionPage.styles-rZa1BWWK.js +0 -41
  249. package/_assets/send-transaction-D5g8ka92.js +0 -3
  250. package/_assets/sendMetaTransaction-BiqdXKVl.js +0 -2
  251. package/_assets/sha3-DxT-REZ2.js +0 -2
  252. package/_assets/signin-empty-DXl1Qpby.js +0 -2
  253. package/_assets/useInfiniteGrid-BUDyyZZl.js +0 -2
@@ -0,0 +1,3411 @@
1
+ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-JcMZcmnF.js";import{bf as Yt,c as rt,x as at,bk as Kr,bl as es,aL as ot,t as n,bv as ts,bw as ns,V as nt,O as Z,bD as Se,bC as be,bE as Tn,l as pe,bB as un,bA as Hr,i as is,C as De,ar as rs,F as Dn,d as as,E as xt,bj as ss,bi as Ur,G as os,bx as ls,by as ds,db as cs,dc as us,dd as ps,de as hs,w as se,bh as xs,s as r,a as i,a3 as Jt,bb as Xt,bN as Wn,bc as it,I as L,z as Re,p as Qr,aU as Mt,cd as Vr,H as Ve,as as ge,df as fs,M as ms,h as gs,j as bs,n as gt,aG as pn,aa as Gr,dg as Mi,c_ as ys,f as Yr,aH as ws,dh as vs,cc as js,di as ks,bQ as $s,dj as Cs,dk as Is,k as Ss,ag as At,b3 as As,dl as Ms,a6 as Rs,dm as Ls,b5 as Ps,dn as Es,P as Jr,Y as Xr,dp as Zr,dq as Fs,dr as Ts,aE as ea,ds as zs,dt as Ns,du as Bs,dv as _s,ci as Ds,A as Ws,dw as hn,X as qs,bn as Os,bo as Ks,y as Hs,m as Us,dx as Qs,dy as Vs,dz as Gs,dA as Ys,dB as Js,at as Xs,au as Zs,dC as eo,B as to,dD as no,ax as Ri,aw as Li,dE as io,dF as ro,a0 as ao,bu as so,dG as Pi,dH as oo,dI as lo,dJ as co,dK as uo,dL as po,dM as ho,dN as xo,dO as fo}from"./index-0sHpGDt1.js";import{d as Ae}from"./dcl-schemas-Cfq6CqWT.js";import{p as mo,e as Ei,i as go,A as ta,C as bo,b as yo,f as wo,g as vo,h as jo,j as ko,m as $o,u as Co,t as Io,k as So,a as Ao,s as Mo}from"./CollectionCarousel-LKRLbXj2.js";import{d as Fi,t as Ro,e as Ti,G as Lo,c as Po}from"./buy-JkmVuuuT.js";import{c as Eo,i as Zt,D as Fo,S as To,a as zo,b as No,f as Bo}from"./SaleCountdown-DL2l2eox.js";import{u as _o,M as Do,o as Wo,f as qo,b as Oo,c as Ko}from"./cart-checkout-OIIxJ8qp.js";import{w as zi,M as Ho,S as Uo,C as Qo,H as Vo,a as Go,T as Yo,X as Jo,B as Xo,b as Zo,c as el,d as tl,e as tt,f as nl,g as il,h as rl,i as pt,j as qe,W as Wt,m as qt,n as Ot,o as al,v as sl,L as na,P as ia,k as ra,l as aa,E as ol,F as ll,G as Ni,A as dl,p as cl,q as ul,r as pl,s as hl,t as xl,u as fl,I as Bi}from"./CreditPackPicker-DaeRrtlY.js";import{P as ml}from"./PaymentMethodStep-DUz3lI2L.js";import{m as gl}from"./mana-matic-light-Bl5duieC.js";import{q as sa,g as oa,t as bl,s as yl,a as _i,b as wl,d as vl,i as jl,e as kl,c as $l,f as la,m as Cl,k as Il,r as Sl,n as Al,p as Ml}from"./trade-encoding-CTonKWPZ.js";import{J as Rl,p as Ll,C as Pl,I as El}from"./ethers-DP-FFkj0.js";import{a as Fl,w as da,S as ca,G as ua,c as Tl}from"./buy-gasless-wjbNv7iT.js";import{R as Di}from"./resume-buy-CuppYS1m.js";import{a as zl,f as Ue,i as mt}from"./errors-bGFSPwV2.js";import{C as Nl}from"./Confetti-CWbRGatZ.js";import{b as Bl,J as _l,a as Dl}from"./jump-CstL_PNR.js";import{p as pa}from"./import-D9w8U2BF.js";import{E as Qe}from"./ErrorNotice-BkbFM8dT.js";import{L as Wi,M as Wl,B as ql,H as Ol,T as Kl,A as Hl}from"./modal.styles-BnyaAuqp.js";import{S as Ul}from"./Spinner-p5xyOyv6.js";import{M as Ql,E as Vl,s as Gl}from"./sendMetaTransaction-CWnYhaMC.js";import{E as Yl}from"./EmotePlaybackBar-D-ONNk1C.js";import{d as Jl}from"./disposePreview-Bsl7l0mM.js";import{T as Kt}from"./Tooltip-BdEQabCf.js";import{S as Xl}from"./categories-DLTQlZ7m.js";import{c as Zl}from"./crumbs.styles-pyPMgoz0.js";import"./sentry-D1js75-6.js";import"./intl-AKLEHPeO.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]="45c6cba1-d138-4aac-a82f-c190143299c6",t._sentryDebugIdIdentifier="sentry-dbid-45c6cba1-d138-4aac-a82f-c190143299c6")}catch{}})();const ha=216n,ed=(1n<<ha)-1n;function td(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>ha).toString(),issuedId:(s&ed).toString()}}function nd(t){if(!t)return null;try{return td(t).itemId}catch{return null}}const xa=["cancelled-listings"];function id(t,s){s&&t.setQueryData(xa,l=>l!=null&&l.includes(s)?l:[...l??[],s])}function qi(t,s){var l;if(s)return(l=t.getQueryData(xa))!=null&&l.includes(s)?void 0:s}function Oi(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 xn(t,s,l){const{address:o,contractAddress:d,tokenId:u}=s;if(!d||!u)return;const x=`${d}-${u}`;t.cancelQueries({queryKey:["owned-token",d,u]}),t.cancelQueries({queryKey:["secondary-sale-state"]}),o&&t.cancelQueries({queryKey:["my-assets",o]});const f=l.kind==="gone";t.setQueriesData({queryKey:["owned-token",d,u]},$=>$&&(f?null:Oi($,l)));const m=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:m},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(f){const g=h.items.filter(y=>!(y.contractAddress===d&&y.tokenId===u));return{...h,items:g,total:Math.max(0,h.total-(h.items.length-g.length))}}return{...h,items:h.items.map(g=>g.contractAddress===d&&g.tokenId===u?Oi(g,l):g)}})}:$),t.setQueriesData({queryKey:["secondary-sale-state"]},$=>{var g;if(!$)return $;const h={...$};return l.kind==="removed"||l.kind==="gone"?delete h[x]:h[x]={priceCredits:l.priceCredits,tradeId:l.tradeId??((g=h[x])==null?void 0:g.tradeId)??""},h})}function rd(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}function fa(){const t=new Map,s=new Set,l=new Set,o=new Set;return{submitStarted:d=>{o.add(d)},submitFinished:d=>{o.delete(d)},broadcast:(d,u)=>{const x=t.get(d);x?x.add(u):t.set(d,new Set([u]))},reverted:d=>{s.add(d)},unobservable:d=>{l.add(d)},isInFlight:d=>o.has(d),mayBeConsumed:d=>{if(l.has(d))return!0;const u=t.get(d);if(!u)return!1;for(const x of u)if(!s.has(x))return!0;return!1}}}const ad=Ll("0.05");async function sd(t){try{return(await new Rl(rt.rpcUrl).getBalance(t)).gte(ad)}catch{return!1}}async function od(t,s){return Yt(t)?sd(s):!1}function ld({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 dd=t=>ds(t.contractAddress,String(t.itemId));async function Ki(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return cs(await us(t.trade),t.coupon)}catch(l){return s.reportFailure!==!1&&pe(l,{flow:"buy",step:"mana_price"}),null}}function Hi(t){return t.kind==="trade"?t.trade.id:void 0}function Ui(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function zn({item:t,onClose:s,resume:l=!1}){const{session:o}=at(),{data:d}=Kr(o),{data:u}=es(o),x=ot(),f=st();async function m(){try{return await x.fetchQuery(ls())}catch{return}}async function $(){if(u!=null)return u;if(!o)return 0n;try{const j=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>hs(o.address),staleTime:3e4});return ie(j),j}catch{return 0n}}const h=_o().packs.slice(0,Do),[g,y]=c.useState("loading"),[k,I]=c.useState(null),[C,S]=c.useState(null),[W,M]=c.useState(!1),[w,U]=c.useState(0),[a,K]=c.useState(""),[J,A]=c.useState(t.priceCredits),T=Math.max(0,J-((d==null?void 0:d.credits)??0)),{packs:X}=Wo(h,T),[V,oe]=c.useState(null),[ce,ie]=c.useState(null),q=u??ce??0n,[N,O]=c.useState(!1),[v,re]=c.useState(null),[R,z]=c.useState(0),[B,H]=c.useState(null),[ae,ve]=c.useState(!1),ee=c.useRef(null),G=c.useRef(!1),te=c.useRef(fa()),fe=(B==null?void 0:B.credits)??J,je=(d==null?void 0:d.credits)??0;c.useEffect(()=>(G.current=!1,()=>{G.current=!0}),[]);async function ke(j,P,F,E){const Q=await $();if(E!=null&&E())return;const ne=Q>0n,D=ne?await Ki(P):null;if(E!=null&&E())return;D!=null?oe(D):ne&&O(!0);const We=zi({priceCents:F,priceManaWei:D??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:Q}).options.some(Fe=>Fe.method==="mana"||Fe.method==="combined"),ye=j-((d==null?void 0:d.credits)??0),Et=h.find(Fe=>Fe.credits>=ye)??h[h.length-1];K(Et.id),We||Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:j,credits_balance:(d==null?void 0:d.credits)??0,shortfall:Math.max(0,ye)}),y("nofunds")}c.useEffect(()=>{let j=!1;if(!o){y("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const P=await qo(t,o.address,ts,await m(),dd,ns);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=Oo(P.line),E=P.line.usdCents,Q=nt(E);if(j)return;if(A(Q),re(F),z(E),d!=null&&d.credits<Q){await ke(Q,F,E,()=>j);return}l?lt({sale:F,usdCents:E}):y("ready")}catch(P){if(j)return;Z(be(P)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(P)}),ue(P)}})(),()=>{j=!0,ee.current&&o&&(bt([ee.current]),ee.current=null)}},[w]),c.useEffect(()=>{const j=(B==null?void 0:B.sale)??v;if(!j||g!=="ready"&&g!=="nofunds"||q<=0n||V!==null)return;let P=!1;return Ki(j,{reportFailure:!N}).then(F=>{P||(F!=null?oe(F):O(!0))}),()=>{P=!0}},[g,B,v,q,V,N]);const Y=zi({priceCents:R,priceManaWei:V??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:q});async function lt(j){const P=(B==null?void 0:B.sale)??(j==null?void 0:j.sale)??v,F=(B==null?void 0:B.usdCents)??(j==null?void 0:j.usdCents)??R;if(!o||!P||F<=0)return;y("processing"),I(null),ve(!1);let E=B;if(!E)try{const{credit:D,maxCreditedValue:xe,usdCents:We}=await Tn(o.identity,F,Hi(P),Ui(t));if(G.current){Le([D.id]);return}ee.current=D.id,x.invalidateQueries({queryKey:["usd-balance"]});const ye=nt(We);if(E={sale:P,credit:D,maxCreditedValue:xe,usdCents:We,credits:ye},H(E),ye!==nt(F)){A(ye),z(We),ve(!0),y("ready");return}}catch(D){if(zl(D)){x.invalidateQueries({queryKey:["usd-balance"]}),await ke(nt(F),P,F);return}be(D)||pe(D,{flow:"buy",step:"authorize"}),Z(be(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(D)}),I(Ue(D,n("buyModal.error.generic"),{sale:!0})),y("error");return}if(!E)return;let Q=!1,ne;try{const D={purchase:mo(E.sale,[E.credit],E.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:xe})=>te.current.broadcast(E.credit.id,xe),onReverted:({txHash:xe})=>{xe&&te.current.reverted(xe)}};if(te.current.submitStarted(E.credit.id),sa())try{ne=await Fl(D),te.current.broadcast(E.credit.id,ne),await da(ne),Q=!0}catch(xe){if(xe instanceof ca)Q=!0;else if(xe instanceof ua){if(xe.reason==="relayer-unreachable")throw te.current.unobservable(E.credit.id),xe;if(!Yt(o.providerType))throw xe;ne=await Fi(D)}else throw ne&&te.current.reverted(ne),xe}else ne=await Fi(D)}catch(D){te.current.submitFinished(E.credit.id),be(D)||pe(D,{flow:"buy",step:"submit",gasless:Q}),$e([E.credit.id]),ee.current=null,Z(be(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(D)}),x.invalidateQueries({queryKey:["usd-balance"]}),ue(D);return}te.current.submitFinished(E.credit.id),ee.current=null;try{Ei(t.coupon),go(x,t),Z("Shop Completed Purchase",{...un([t]),payment_type:"credits",no_crypto_step:Q,transaction_hash:ne??null})}catch(D){pe(D,{flow:"buy",step:"post_purchase"})}y("complete")}function Le(j){if(!o||j.length===0)return Promise.resolve(!1);const P=j.filter(F=>!te.current.mayBeConsumed(F));return P.length===0?Promise.resolve(!1):Hr(o.identity,P).then(()=>!0,()=>!0)}function $e(j){M(!0),Le(j).then(P=>{P||M(!1)})}function bt(j){return Le(j.filter(P=>!te.current.isInFlight(P)))}function Rt(){Ei(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 nn(){var P;const j=(B==null?void 0:B.sale)??v;if(!(!o||!j)){ee.current&&($e([ee.current]),ee.current=null),y("processing"),I(null);try{const F=(P=Bi(Y,"mana"))==null?void 0:P.manaWei,E=j.kind==="trade"?await wo({trade:j.trade,coupon:j.coupon,buyer:o.address,signer:o.signer,manaWei:F}):await vo({mint:j.mint,buyer:o.address,signer:o.signer,manaWei:F});Z("Shop Completed Purchase",{...un([t]),payment_type:"mana",transaction_hash:E??null}),Rt(),y("complete")}catch(F){be(F)||pe(F,{flow:"buy_mana",step:"submit"}),Z(be(F)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(F)}),ue(F)}}}async function Lt(){const j=(B==null?void 0:B.sale)??v,P=Bi(Y,"combined");if(!o||!j||!P)return;y("processing"),I(null),ee.current&&(await Le([ee.current])&&M(!0),ee.current=null);let F=null,E;try{const{credit:Q}=await Tn(o.identity,P.creditsCents,Hi(j),Ui(t));F=Q.id,te.current.submitStarted(Q.id);const ne={buyer:o.address,signer:o.signer,credits:[Q],manaGapWei:P.manaWei,providerType:o.providerType,onBroadcast:({txHash:D})=>te.current.broadcast(Q.id,D),onReverted:({txHash:D})=>{D&&te.current.reverted(D)},onUnobservable:()=>te.current.unobservable(Q.id)};E=j.kind==="trade"?await jo({trade:j.trade,coupon:j.coupon,...ne}):await ko({mint:j.mint,...ne})}catch(Q){F&&te.current.submitFinished(F),F&&$e([F]),be(Q)||pe(Q,{flow:"buy_credits_and_mana",step:"submit"}),Z(be(Q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(Q)}),x.invalidateQueries({queryKey:["usd-balance"]}),ue(Q);return}F&&te.current.submitFinished(F);try{Rt(),Z("Shop Completed Purchase",{...un([t]),payment_type:"credits_and_mana",transaction_hash:E??null})}catch(Q){pe(Q,{flow:"buy_credits_and_mana",step:"post_purchase"})}y("complete")}async function yt(){if(!(!a||!o)){try{sessionStorage.setItem(Di,JSON.stringify(t))}catch{}ee.current&&(Le([ee.current]),ee.current=null),H(null),y("loading");try{const j=await Ko(a,{address:o.address,identity:o.identity});if(j.url){window.location.href=j.url;return}if(!j.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");f(`/credits?order=${encodeURIComponent(j.orderId)}`)}catch(j){pe(j,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Di)}catch{}I(n("buyModal.error.creditsCheckout")),y("error")}}}const[Ce,Pe]=c.useState(null);function rn(j,P){const{spender:F,chainId:E}=$o(j,P);return yl(E,F)}function ue(j){if(I(Ue(j,n("buyModal.error.generic"),{sale:!0})),y("error"),!is(j)||!o)return;const P=j.required;(async()=>{if(await od(o.providerType,o.address)){S(P);return}I(n("buyModal.error.relayDownNoRail"))})()}async function dt(j){if(o){S(null);try{await ps(o.web3Provider,j)}catch(P){be(P)||pe(P,{flow:"buy",step:"switch_chain"}),S(j);return}wt()}}function Ee(j){j==="mana"?nn():j==="combined"?Lt():lt()}const Ke=c.useRef(!1);async function Ye(j){var P;if(!Ke.current){Ke.current=!0;try{const F=(B==null?void 0:B.sale)??v;if(j==="credits"||!F||!o){Ee(j);return}const E=rn(j,F),Q=((P=Y.options.find(D=>D.method===j))==null?void 0:P.manaWei)??0n,ne=await oa(E,o.address,Q).catch(()=>!0);if(bl(o.providerType,ne)){Pe({auth:E,rail:j});return}Ee(j)}finally{Ke.current=!1}}}const Ie=Y.options.some(j=>j.method==="mana"||j.method==="combined"),Pt=g==="ready"&&(Ie||Y.manaShortfall!=null)||g==="nofunds"&&Ie;function wt(){I(null),H(null),ve(!1),M(!1),y("loading"),U(j=>j+1)}const vt=g==="error"&&C===null&&(!!ee.current||W),Je=g==="processing",an=g==="complete"?n("buyModal.titleComplete"):g==="error"?n("cartCheckout.errorTitle"):g==="nofunds"?n("buyModal.titleNoFunds"):n("buyModal.titleBuy");return Ce&&o?e.jsx(ta,{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:gl,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:j}=Ce;Pe(null),Ee(j)},onCancel:()=>Pe(null),onClose:()=>{Pe(null),s()}}):e.jsxs(Ho,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(Uo,{onClick:Je?void 0:s,"aria-hidden":!0}),e.jsx(Qo,{"data-tall":g==="processing"||g==="loading"||void 0,children:Pt?e.jsx(ml,{asset:{name:t.name,thumb:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null,caption:t.creator?e.jsx(rs,{address:t.creator}):null},priceCredits:fe,priceCents:R,options:Y.options,priceManaWei:V??0n,balanceCredits:je,manaBalanceWei:q,onBuy:j=>void Ye(j),onClose:s,busy:Je,notice:ae?n("buyModal.priceChanged"):d!=null&&d.held?n("buyModal.heldExplainer",{credits:d.held.credits,currency:De.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(Vo,{children:[e.jsxs(Go,{children:[e.jsx(Yo,{children:an}),!Je&&e.jsx(Jo,{onClick:s,"aria-label":n("buyModal.close"),children:e.jsx(bo,{})})]}),e.jsxs(Xo,{children:[e.jsx(Zo,{children:g==="nofunds"?n("buyModal.dclBalance"):n("buyModal.myCreditsBalance")}),e.jsx(el,{}),e.jsx(tl,{children:Dn(je)})]})]}),g==="loading"&&e.jsx(tt,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),g==="error"&&e.jsxs(tt,{children:[e.jsxs(nl,{"data-testid":"buy-error",children:[e.jsx(il,{src:yo,alt:"",width:64,height:80}),e.jsxs(rl,{children:[e.jsx("b",{children:n("cartCheckout.errorHeadline")})," ",k??(vt?null:n("cartCheckout.errorBody")),vt?e.jsxs(e.Fragment,{children:[k?" ":"",n("cartCheckout.heldLead",{currency:De.name}),e.jsx("b",{children:n("cartCheckout.heldBold")}),n("cartCheckout.heldTail",{currency:De.name})]}):null]})]}),C!==null?e.jsxs(pt,{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 dt(C),children:n("buyModal.error.switchAndRetry",{network:as(C)})})]}):vt?e.jsx(pt,{children:e.jsx(qe,{"data-variant":"purple","data-full":!0,onClick:s,children:n("cartCheckout.gotIt")})}):e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple",onClick:wt,children:n("cartCheckout.tryAgain")})]})]}),g==="nofunds"&&e.jsxs(tt,{children:[N&&V===null&&q>0n?e.jsxs(Wt,{"data-testid":"mana-price-unavailable",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.manaPriceUnavailable")})]}):null,d!=null&&d.held?e.jsxs(Wt,{"data-testid":"nofunds-held",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.heldExplainer",{credits:d.held.credits,currency:De.name})})]}):null,e.jsxs(Wt,{children:[e.jsx(qt,{}),e.jsxs(Ot,{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}),xt()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(al,{href:ss("/credits"),target:"_blank",rel:"noopener noreferrer",children:n("buyModal.warningLearnMore")})]})]})]}),e.jsx(Qi,{item:t,priceCredits:fe}),xt()?null:e.jsx(e.Fragment,{children:e.jsx(sl,{packs:X,selectedId:a||void 0,onSelect:K})}),e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),xt()?null:e.jsx(qe,{"data-variant":"gradient",onClick:()=>void yt(),children:n("buyModal.buy")})]})]}),g==="ready"&&e.jsxs(tt,{children:[ae&&e.jsxs(Wt,{"data-testid":"price-changed",role:"status",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.priceChanged")})]}),e.jsx(Qi,{item:t,priceCredits:fe}),e.jsx(pt,{children:e.jsx(qe,{"data-variant":"gradient","data-full":!0,onClick:()=>void lt(),children:n("buyModal.buy")})})]}),g==="processing"&&e.jsxs(tt,{"data-processing":!0,children:[e.jsx(na,{src:Ur,alt:"",width:61,height:61}),e.jsx(ia,{children:l?n("buyModal.completingPurchase"):n("buyModal.completingTransaction")}),e.jsx(ra,{"aria-hidden":!0,children:e.jsx(aa,{})})]}),g==="complete"&&e.jsxs(tt,{children:[e.jsx(Nl,{}),e.jsxs(ol,{children:[e.jsx(ld,{}),e.jsxs(ll,{children:[e.jsx("b",{children:n("getCredits.successTitle")})," ",n("buyModal.successBody")]})]}),e.jsxs(pt,{"data-stack":!0,children:[e.jsx(qe,{"data-variant":"outline",onClick:()=>f(os([t.category])),children:n("buyModal.myAssets")}),xt()?e.jsx(Ni,{"data-variant":"ruby",href:Bl([t]),onClick:s,children:n("success.goToBackpack")}):e.jsxs(Ni,{"data-variant":"ruby",href:_l,target:"_blank",rel:"noreferrer",onClick:s,children:[n("buyModal.tryInWorld"),e.jsx(Dl,{})]})]})]})]})})]})}function Qi({item:t,priceCredits:s}){return e.jsxs(dl,{children:[e.jsx(cl,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(ul,{children:[e.jsxs("div",{children:[e.jsx(pl,{title:t.name,children:t.name||n("buyModal.itemFallback")}),t.creator?e.jsx(hl,{address:t.creator}):null]}),e.jsxs(xl,{children:[e.jsx(fl,{}),e.jsx("span",{children:Dn(s)})]})]})]})}function cd(){const{data:t}=se({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:xs,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const ud=r.div`
2
+ display: flex;
3
+ align-items: center;
4
+ gap: 16px;
5
+ width: 100%;
6
+ max-width: 456px;
7
+ `,pd=r.span`
8
+ flex: none;
9
+ font-family: ${i.font.sans};
10
+ font-size: 18px;
11
+ color: ${i.colors.muted};
12
+ `,hd=r.p`
13
+ margin: 0;
14
+ font-family: ${i.font.sans};
15
+ font-size: 13px;
16
+ line-height: 1.5;
17
+ color: ${i.colors.muted};
18
+ text-align: center;
19
+ `,xd=r.p`
20
+ margin: 0;
21
+ font-family: ${i.font.sans};
22
+ font-size: 13px;
23
+ line-height: 1.5;
24
+ color: ${i.colors.text};
25
+ `;function ma(t,s){const[l,o]=c.useState(!1),[d,u]=c.useState(!1),[x,f]=c.useState(null),m=c.useRef(null);c.useEffect(()=>{const h=new AbortController;return m.current=h,()=>h.abort(new DOMException("Modal closed","AbortError"))},[]);async function $(h){if(!t||l)return!0;f(null);try{const g=await t.cancelCurrent({payGas:h,onWaiting:y=>u(y>2e4)});return g!=="ok"?(f(g==="relay-reverted"?"reverted":"pending"),!1):(o(!0),!0)}catch(g){return pe(g,{flow:"edit_price_cancel"}),s(Ue(g,n("listingEdit.cancelFailed"))),!1}finally{u(!1)}}return{cancelDone:l,slow:d,cancelFailed:x,setCancelFailed:f,cancelCurrent:$,signal:()=>{var h;return(h=m.current)==null?void 0:h.signal}}}function qn({state:t,canPayGas:s,busy:l,onPayGas:o,onLater:d,testId:u="edit-cancel-relay-failed"}){return e.jsxs(xd,{"data-testid":u,children:[s?t==="reverted"?n("itemDetail.cancelRelayReverted"):n("itemDetail.cancelRelayFailed"):n("itemDetail.cancelRelayRetry"),s?e.jsxs(e.Fragment,{children:[" ",e.jsx(Wi,{type:"button","data-testid":"cancel-pay-gas",onClick:o,disabled:l,children:n("itemDetail.cancelPayGas")}),d?e.jsxs(e.Fragment,{children:[" ",e.jsx(Wi,{type:"button","data-testid":"cancel-later",onClick:d,disabled:l,children:n("itemDetail.cancelLater")})]}):null]}):null]})}function ga({phase:t,managed:s,slow:l}){const d=t==="list"?2:1,u=`listingEdit.${s?"step":"confirm"}${t==="list"?"New":"Removal"}`;return e.jsxs(tt,{"data-processing":!0,"data-testid":"listing-steps",role:"status","aria-live":"polite",children:[e.jsx(na,{src:Ur,alt:"",width:61,height:61}),e.jsx(ia,{children:n(u)}),e.jsxs(ud,{children:[e.jsx(ra,{"aria-hidden":!0,children:e.jsx(aa,{})}),e.jsxs(pd,{"data-testid":"listing-steps-count",children:[d,"/",2]})]}),l?e.jsx(hd,{"data-testid":"listing-steps-slow",children:n("listingEdit.slow")}):null]})}const fn=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
+ `,mn=r.div`
35
+ width: 560px;
36
+ max-width: 100%;
37
+ max-height: 92vh;
38
+ overflow-y: auto;
39
+ background: ${i.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
+ `,gn=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 ${i.colors.gray4};
53
+ `,bn=r.h2`
54
+ margin: 0;
55
+ font-family: ${i.font.sans};
56
+ font-weight: 600;
57
+ font-size: 20px;
58
+ line-height: 1.6;
59
+ color: ${i.colors.text};
60
+ `,yn=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: ${i.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 ${i.colors.accent};
81
+ outline-offset: 2px;
82
+ }
83
+ `,fd=r.p`
84
+ margin: 0;
85
+ font-family: ${i.font.sans};
86
+ font-size: 14px;
87
+ line-height: 1.57;
88
+ color: ${i.colors.text};
89
+ text-align: left;
90
+ `,md=r.div`
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 12px;
94
+ `,gd=r.div`
95
+ flex: none;
96
+ display: grid;
97
+ place-items: center;
98
+ width: 180px;
99
+ height: 180px;
100
+ border-radius: 16px;
101
+ background: ${i.colors.media};
102
+ border: 1px solid ${i.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
+ ${i.media.maxWidth("mobile")} {
113
+ width: 120px;
114
+ height: 120px;
115
+
116
+ img {
117
+ width: 100px;
118
+ height: 100px;
119
+ }
120
+ }
121
+ `,bd=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
+ `,yd=r.p`
129
+ margin: 0;
130
+ font-family: ${i.font.sans};
131
+ font-weight: 600;
132
+ font-size: 20px;
133
+ line-height: 1.57;
134
+ color: ${i.colors.text};
135
+ `,wd=r.p`
136
+ margin: 0;
137
+ font-family: ${i.font.sans};
138
+ font-size: 10px;
139
+ line-height: 1.43;
140
+ color: ${i.colors.muted};
141
+ `,vd=r.div`
142
+ display: flex;
143
+ gap: 12px;
144
+
145
+ ${i.media.maxWidth("mobile")} {
146
+ flex-direction: column;
147
+ }
148
+ `,Vi=r.label`
149
+ flex: 1 1 0;
150
+ min-width: 0;
151
+ display: flex;
152
+ flex-direction: column;
153
+ gap: 4px;
154
+ `,Gi=r.span`
155
+ font-family: ${i.font.sans};
156
+ font-size: 12px;
157
+ color: ${i.colors.muted};
158
+ `,jd=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 ${i.colors.text};
166
+ border-radius: 8px;
167
+ background: ${i.colors.white};
168
+
169
+ &:focus-within {
170
+ border-color: ${i.colors.magenta};
171
+ }
172
+ &[aria-invalid='true'] {
173
+ border-color: ${i.colors.err};
174
+ }
175
+
176
+ .ccy {
177
+ flex: none;
178
+ width: 22px;
179
+ height: 22px;
180
+ color: ${i.colors.rarity};
181
+ }
182
+ .cal {
183
+ flex: none;
184
+ width: 18px;
185
+ height: 18px;
186
+ color: ${i.colors.text};
187
+ }
188
+ `,kd=r.input`
189
+ flex: 1 1 auto;
190
+ min-width: 0;
191
+ border: 0;
192
+ outline: none;
193
+ background: transparent;
194
+ font-family: ${i.font.sans};
195
+ font-size: 13px;
196
+ color: ${i.colors.text};
197
+
198
+ &::placeholder {
199
+ color: ${i.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
+ `,$d=r.span`
212
+ flex: none;
213
+ font-family: ${i.font.sans};
214
+ font-size: 10px;
215
+ color: ${i.colors.muted2};
216
+ `,Cd=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 ${i.colors.text};
230
+ border-radius: 8px;
231
+ background: ${i.colors.white};
232
+ font-family: ${i.font.sans};
233
+ font-size: 13px;
234
+ color: ${i.colors.text};
235
+ outline: none;
236
+ }
237
+ .react-datepicker__input-container input:focus {
238
+ border-color: ${i.colors.magenta};
239
+ }
240
+ &[data-invalid='true'] .react-datepicker__input-container input {
241
+ border-color: ${i.colors.err};
242
+ }
243
+ /* The showIcon calendar glyph inside the field. */
244
+ .react-datepicker__calendar-icon {
245
+ fill: ${i.colors.text};
246
+ opacity: 0.85;
247
+ }
248
+
249
+ ${Eo}
250
+ `,Id=r.button`
251
+ width: 100%;
252
+ height: 48px;
253
+ border: 0;
254
+ border-radius: 16px;
255
+ cursor: pointer;
256
+ background: ${i.colors.accent};
257
+ color: ${i.colors.white};
258
+ font-family: ${i.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: ${i.colors.accentHover};
267
+ }
268
+ &:focus-visible {
269
+ outline: 2px solid ${i.colors.accent};
270
+ outline-offset: 2px;
271
+ }
272
+ &:disabled {
273
+ cursor: not-allowed;
274
+ background: rgba(105, 31, 169, 0.2);
275
+ color: ${i.colors.white};
276
+ }
277
+ `;r.p`
278
+ margin: 0;
279
+ font-family: ${i.font.sans};
280
+ font-size: 13px;
281
+ color: ${i.colors.muted};
282
+ text-align: center;
283
+ `;const Sd=r.p`
284
+ margin: 0;
285
+ font-family: ${i.font.sans};
286
+ font-size: 12px;
287
+ line-height: 1.5;
288
+ color: ${i.colors.muted};
289
+ `,Ad=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
+ `,Md=r.div`
299
+ display: grid;
300
+ place-items: center;
301
+ width: 64px;
302
+ height: 64px;
303
+ border-radius: 50%;
304
+ background: ${i.colors.ok};
305
+ color: ${i.colors.white};
306
+
307
+ .ico {
308
+ width: 34px;
309
+ height: 34px;
310
+ }
311
+ `,Rd=r.p`
312
+ margin: 0;
313
+ font-family: ${i.font.sans};
314
+ font-size: 20px;
315
+ line-height: 1.334;
316
+ color: ${i.colors.text2};
317
+
318
+ b {
319
+ font-weight: 700;
320
+ }
321
+ `,Ld=r.div`
322
+ display: flex;
323
+ gap: 12px;
324
+
325
+ ${i.media.maxWidth("mobile")} {
326
+ flex-direction: column-reverse;
327
+ }
328
+ `,Pd=r.button`
329
+ flex: 1 1 0;
330
+ height: 48px;
331
+ border: 2px solid ${i.colors.accent};
332
+ border-radius: 12px;
333
+ background: transparent;
334
+ color: ${i.colors.accent};
335
+ cursor: pointer;
336
+ font-family: ${i.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 ${i.colors.accent};
348
+ outline-offset: 2px;
349
+ }
350
+ `,Ed=r.button`
351
+ flex: 1 1 0;
352
+ height: 48px;
353
+ border: 0;
354
+ border-radius: 12px;
355
+ background: ${i.colors.accent};
356
+ color: ${i.colors.softWhite};
357
+ cursor: pointer;
358
+ font-family: ${i.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: ${i.colors.accentHover};
367
+ }
368
+ &:focus-visible {
369
+ outline: 2px solid ${i.colors.accent};
370
+ outline-offset: 2px;
371
+ }
372
+ `,Fd=30;function Yi(t){const s=new Date;return s.setHours(0,0,0,0),s.setDate(s.getDate()+t),s}function Td({asset:t,session:s,creator:l,edit:o,onListed:d,onClose:u}){const x=ot(),f=st(),m=cd(),{data:$}=se({queryKey:["collection-meta",t.contractAddress],enabled:!l&&!!t.contractAddress,staleTime:5*6e4,queryFn:()=>Vr(t.contractAddress)}),h=l||($==null?void 0:$.creator),{data:g}=Jt(h),y=h?g!=null&&g.name?Xt(g.name):Wn(h):null,[k,I]=c.useState(o!=null&&o.currentCredits?String(o.currentCredits):"10"),[C,S]=c.useState(()=>Yi(Fd)),[W,M]=c.useState(null),[w,U]=c.useState(!1),[a,K]=c.useState(null),[J,A]=c.useState("form"),T=c.useRef({}),{cancelDone:X,slow:V,cancelFailed:oe,setCancelFailed:ce,cancelCurrent:ie,signal:q}=ma(o,M),N=Zt(s),O=Number(k),v=Number.isInteger(O)&&O>0,re=!!o&&!X&&O===o.currentCredits,R=C?C.getTime():NaN,z=!!C&&R>Date.now(),B=Yi(1),H=v?`$${it(O).toFixed(2)}`:"$0";async function ae(G={}){if(M(null),!v){M(n("sellModal.errorWholeNumber"));return}if(!z){M(n("sellModal.invalidDate"));return}if(!N){U(!0);try{const te=_i(t.contractAddress,t.chainId),fe=await oa(te,s.address);if(U(!1),!fe){T.current=G,A("authorize");return}}catch{U(!1)}}await ve(G)}async function ve(G={}){var te,fe;if(M(null),!v){M(n("sellModal.errorWholeNumber"));return}if(!z){M(n("sellModal.invalidDate"));return}U(!0);try{if(!await ie(G.payGas))return;await wl({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId});const je=await vl({signer:s.signer,nft:{contractAddress:t.contractAddress,tokenId:t.tokenId,network:t.network,chainId:t.chainId},usdPrice:it(O),expiresAtMs:R}),ke=await(o?pa(je,s.identity,{signal:q()}):Qr(je,s.identity));(te=q())==null||te.throwIfAborted(),K(O),Z("Shop Listed Item",{item_id:t.itemId??t.tokenId??null,contract_address:t.contractAddress,price_credits:O,price_usd:it(O),listing_type:"secondary",is_primary:!1}),Mt.success(n(o?"listingEdit.toastUpdated":"sellModal.toastOnSale",{name:t.name})),x.invalidateQueries({queryKey:["my-assets",s.address]}),d==null||d(O,ke.id)}catch(je){if((fe=q())!=null&&fe.aborted)return;pe(je,{flow:"list_secondary"}),Z("Shop Listing Failed",{listing_type:"secondary",error_code:Se(je)}),M(Ue(je,n(o?"listingEdit.listFailedAfterCancel":"sellModal.errorGeneric")))}finally{U(!1)}}function ee(){u(),f("/my-items")}return a!==null?e.jsx(fn,{onClick:u,role:"presentation",children:e.jsxs(mn,{onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(o?"listingEdit.successHeader":"sellModal.successHeader"),children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n(o?"listingEdit.successHeader":"sellModal.successHeader")}),e.jsx(yn,{onClick:u,"aria-label":n("getCredits.done"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(Ad,{children:[e.jsx(Md,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsxs(Rd,{children:[e.jsx("b",{children:n(o?"listingEdit.successBody":"sellModal.successOnSale")})," ",n("sellModal.successManage")]})]}),e.jsxs(Ld,{children:[e.jsx(Pd,{onClick:ee,children:n("sellModal.myItems")}),e.jsx(Ed,{onClick:u,children:n("getCredits.done")})]})]})}):J==="authorize"?e.jsx(ta,{auth:_i(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:()=>{A("form"),ve(T.current)},onCancel:()=>A("form"),onClose:u}):o&&w?e.jsx(fn,{role:"presentation",children:e.jsxs(mn,{onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n("listingEdit.title")}),e.jsx(yn,{disabled:!0,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(ga,{phase:X?"list":"cancel",managed:N,slow:V})]})}):e.jsx(fn,{onClick:w?void 0:u,role:"presentation",children:e.jsxs(mn,{"data-testid":"modal",onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(o?"listingEdit.title":"sellModal.sellProduct"),children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n(o?"listingEdit.title":"sellModal.sellProduct")}),e.jsx(yn,{onClick:u,disabled:w,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(fd,{children:n(o?"listingEdit.subtitle":"sellModal.subtitle")}),e.jsxs(md,{children:[e.jsx(gd,{children:t.image?e.jsx("img",{src:t.image,alt:""}):null}),e.jsxs(bd,{children:[e.jsx(yd,{children:t.name}),y?e.jsx(wd,{children:n("sellModal.byCreator",{name:y})}):null]})]}),e.jsxs(vd,{children:[e.jsxs(Vi,{children:[e.jsx(Gi,{children:n("sellModal.priceShort")}),e.jsxs(jd,{"aria-invalid":k.length>0&&!v,children:[e.jsx(Re,{className:"ccy"}),e.jsx(kd,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:k,onChange:G=>I(G.target.value),disabled:w,"aria-label":n("sellModal.priceLabel",{currency:"credits"})}),e.jsx($d,{"aria-hidden":!0,children:H})]})]}),e.jsxs(Vi,{children:[e.jsx(Gi,{children:n("sellModal.expirationLabel")}),e.jsx(Cd,{"data-invalid":!!C&&!z,children:e.jsx(Fo,{selected:C,onChange:S,minDate:B,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:w,showIcon:!0,showPopperArrow:!1,todayButton:n("sellModal.today"),ariaLabelledBy:void 0,"aria-label":n("sellModal.expirationLabel")})})]})]}),m&&v?e.jsx(Sd,{children:n("sellModal.proceedsCredits",{count:O})}):null,oe?e.jsx(qn,{state:oe,canPayGas:!!(o!=null&&o.canPayGas),busy:w,onPayGas:()=>void ae({payGas:!0}),onLater:()=>ce(null)}):null,e.jsx(Qe,{message:W}),e.jsx(Id,{onClick:()=>void ae(),disabled:w||re||oe==="pending"||!v||!z,"data-testid":"list-submit",children:o?n(X?"sellModal.putUpForSale":"listingEdit.submit"):w?N?n("sellModal.puttingOnSale"):n("sellModal.confirmListing"):n("sellModal.putUpForSale")})]})})}const zd=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
+ `,Nd=r.div`
382
+ width: 560px;
383
+ max-width: 100%;
384
+ max-height: 92vh;
385
+ overflow-y: auto;
386
+ background: ${i.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
+ ${i.media.maxWidth("mobile")} {
395
+ padding: 12px 16px 16px;
396
+ }
397
+ `,Bd=r.div`
398
+ display: flex;
399
+ flex-direction: column;
400
+ gap: 4px;
401
+ padding-bottom: 16px;
402
+ border-bottom: 1px solid ${i.colors.gray4};
403
+ `,_d=r.div`
404
+ display: flex;
405
+ align-items: center;
406
+ justify-content: space-between;
407
+ gap: 8px;
408
+ `,Dd=r.h2`
409
+ margin: 0;
410
+ font-family: ${i.font.sans};
411
+ font-weight: 600;
412
+ font-size: 20px;
413
+ line-height: 1.6;
414
+ color: ${i.colors.text};
415
+ `,Wd=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: ${i.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 ${i.colors.accent};
436
+ outline-offset: 2px;
437
+ }
438
+ `,qd=r.div`
439
+ display: flex;
440
+ align-items: center;
441
+ gap: 12px;
442
+ `,Od=r.img`
443
+ flex: none;
444
+ width: 72px;
445
+ height: 72px;
446
+ border-radius: 12px;
447
+ object-fit: cover;
448
+ background: ${i.colors.media};
449
+ `,Kd=r.p`
450
+ margin: 0;
451
+ font-family: ${i.font.sans};
452
+ font-weight: 600;
453
+ font-size: 18px;
454
+ line-height: 1.4;
455
+ color: ${i.colors.text};
456
+ `,Hd=r.label`
457
+ display: flex;
458
+ flex-direction: column;
459
+ gap: 6px;
460
+ `,Ud=r.span`
461
+ font-family: ${i.font.sans};
462
+ font-size: 12px;
463
+ color: ${i.colors.muted};
464
+ `,Qd=r.input`
465
+ width: 100%;
466
+ height: 44px;
467
+ padding: 0 12px;
468
+ border: 1px solid ${i.colors.text};
469
+ border-radius: 8px;
470
+ background: ${i.colors.white};
471
+ font-family: ${i.font.sans};
472
+ font-size: 14px;
473
+ color: ${i.colors.text};
474
+
475
+ &::placeholder {
476
+ color: ${i.colors.muted2};
477
+ }
478
+ &:focus-visible {
479
+ outline: none;
480
+ border-color: ${i.colors.magenta};
481
+ }
482
+ &[aria-invalid='true'] {
483
+ border-color: ${i.colors.err};
484
+ }
485
+ &:disabled {
486
+ opacity: 0.6;
487
+ }
488
+ `,Vd=r.p`
489
+ margin: 0;
490
+ padding: 12px 14px;
491
+ border-radius: 10px;
492
+ background: rgba(255, 45, 85, 0.1);
493
+ font-family: ${i.font.sans};
494
+ font-size: 13px;
495
+ line-height: 1.5;
496
+ color: ${i.colors.text2};
497
+ `,Ji=r.div`
498
+ display: flex;
499
+ gap: 12px;
500
+
501
+ ${i.media.maxWidth("mobile")} {
502
+ flex-direction: column-reverse;
503
+ }
504
+ `,Gd=r.button`
505
+ flex: 1;
506
+ height: 48px;
507
+ border: 2px solid ${i.colors.blackBtn};
508
+ border-radius: 16px;
509
+ background: transparent;
510
+ color: ${i.colors.text};
511
+ cursor: pointer;
512
+ font-family: ${i.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 ${i.colors.accent};
524
+ outline-offset: 2px;
525
+ }
526
+ &:disabled {
527
+ opacity: 0.5;
528
+ cursor: default;
529
+ }
530
+ `,Xi=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: ${i.colors.blackBtn};
540
+ color: ${i.colors.softWhite};
541
+ cursor: pointer;
542
+ font-family: ${i.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 ${i.colors.accent};
554
+ outline-offset: 2px;
555
+ }
556
+ &:disabled {
557
+ opacity: 0.55;
558
+ cursor: default;
559
+ }
560
+ `,Yd=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
+ `,Jd=r.div`
570
+ display: grid;
571
+ place-items: center;
572
+ width: 64px;
573
+ height: 64px;
574
+ border-radius: 50%;
575
+ background: ${i.colors.ok};
576
+ color: ${i.colors.white};
577
+
578
+ .ico {
579
+ width: 34px;
580
+ height: 34px;
581
+ }
582
+ `,Xd=r.p`
583
+ margin: 0;
584
+ font-family: ${i.font.sans};
585
+ font-size: 16px;
586
+ line-height: 1.34;
587
+ color: ${i.colors.text2};
588
+
589
+ b {
590
+ font-weight: 700;
591
+ }
592
+ `;function Zd(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function ec({item:t,session:s,onClose:l,onTransferred:o}){const[d,u]=c.useState(""),[x,f]=c.useState(!1),[m,$]=c.useState(null),[h,g]=c.useState(!1),y=d.trim(),k=Zd(y),I=k&&y.toLowerCase()===s.address.toLowerCase(),C=y.length===0?null:k?I?n("transfer.selfAddress"):null:n("transfer.invalidAddress"),S=k&&!I&&!x;async function W(){if(S){$(null),f(!0);try{await Ro({contractAddress:t.contractAddress,chainId:t.chainId,tokenId:t.tokenId,to:y,signer:s.signer}),Z("Shop Transferred Item",{contract_address:t.contractAddress,token_id:t.tokenId}),g(!0),Mt.success(n("transfer.toastSuccess",{name:t.name})),o==null||o()}catch(M){mt(M)||pe(M,{flow:"transfer-item",tokenId:t.tokenId}),Z("Shop Transfer Failed",{error_code:Se(M)}),$(mt(M)?n("getCredits.errorCanceled"):Ue(M,n("transfer.errorGeneric")))}finally{f(!1)}}}return e.jsx(zd,{onClick:x?void 0:l,role:"presentation",children:e.jsxs(Nd,{onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("transfer.title"),children:[e.jsx(Bd,{children:e.jsxs(_d,{children:[e.jsx(Dd,{children:n("transfer.title")}),e.jsx(Wd,{onClick:l,disabled:x,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]})}),h?e.jsxs(e.Fragment,{children:[e.jsxs(Yd,{children:[e.jsx(Jd,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(Xd,{children:n("transfer.successBody",{name:t.name})})]}),e.jsx(Ji,{children:e.jsx(Xi,{onClick:l,children:n("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(qd,{children:[t.thumbnail?e.jsx(Od,{src:t.thumbnail,alt:""}):null,e.jsx(Kd,{children:t.name})]}),e.jsxs(Hd,{children:[e.jsx(Ud,{children:n("transfer.addressLabel")}),e.jsx(Qd,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:d,onChange:M=>u(M.target.value),disabled:x,"aria-invalid":!!C,"aria-label":n("transfer.addressLabel")}),C?e.jsx(Qe,{message:C}):null]}),e.jsx(Vd,{children:n("transfer.warning")}),e.jsx(Qe,{message:m}),e.jsxs(Ji,{children:[e.jsx(Gd,{onClick:l,disabled:x,children:n("sellModal.cancel")}),e.jsx(Xi,{onClick:()=>void W(),disabled:!S,children:x?n("transfer.transferring"):n("transfer.transfer")})]})]})]})})}const tc=r(Wl)`
593
+ width: min(500px, 92vw);
594
+ gap: 20px;
595
+
596
+ ${i.media.maxWidth("mobile")} {
597
+ [data-actions] {
598
+ flex-direction: column-reverse;
599
+ }
600
+ [data-actions] > * {
601
+ width: 100%;
602
+ }
603
+ }
604
+ `,nc=r(Ve)`
605
+ background: ${i.colors.accent};
606
+ color: ${i.colors.white};
607
+ text-transform: uppercase;
608
+ letter-spacing: 0.046em;
609
+ font-size: 13px;
610
+
611
+ &:hover:not(:disabled) {
612
+ background: ${i.colors.accentHover};
613
+ }
614
+ `;function ic({name:t,managed:s,canPayGas:l,cancel:o,onClose:d}){const[u,x]=c.useState(!1),[f,m]=c.useState(!1),[$,h]=c.useState(null),[g,y]=c.useState(null);async function k(I){h(null),y(null),x(!0);try{const C=await o({payGas:I,onWaiting:S=>m(S>2e4)});C==="ok"?d():y(C==="relay-reverted"?"reverted":"pending")}catch(C){const S=mt(C);S||pe(C,{flow:"remove-listing"});const W=n("myAssets.removeListingError");h(s?W:S?n("getCredits.errorCanceled"):Ue(C,W))}finally{x(!1),m(!1)}}return e.jsx(ql,{onClick:u?void 0:d,role:"presentation",children:e.jsxs(tc,{onClick:I=>I.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("removeListing.title"),"data-testid":"remove-listing-modal",children:[e.jsx(Ol,{children:e.jsx(Kl,{children:n("removeListing.title")})}),e.jsx("p",{className:"muted",style:{margin:0},children:n("removeListing.body",{name:t})}),u&&f?e.jsx("p",{className:"muted small",style:{margin:0},"data-testid":"cancel-slow",children:n(l?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")}):null,g?e.jsx(qn,{state:g,canPayGas:l,busy:u,onPayGas:()=>void k(!0),testId:"cancel-gasless-failed"}):null,e.jsx(Qe,{message:$}),e.jsxs(Hl,{"data-actions":!0,children:[e.jsx(Ve,{variant:"outline",onClick:d,disabled:u,children:n("sellModal.cancel")}),e.jsx(nc,{onClick:()=>void k(),disabled:u||g==="pending","data-testid":"remove-confirm",children:u?e.jsx(Ul,{size:"small"}):n("itemDetail.manageRemove")})]})]})})}const wn=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
+ `,vn=r.div`
624
+ width: 560px;
625
+ max-width: 100%;
626
+ max-height: 92vh;
627
+ overflow-y: auto;
628
+ background: ${i.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
+ `,jn=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 ${i.colors.gray4};
642
+ `,kn=r.h2`
643
+ margin: 0;
644
+ font-family: ${i.font.sans};
645
+ font-weight: 600;
646
+ font-size: 20px;
647
+ line-height: 1.6;
648
+ color: ${i.colors.text};
649
+ `,$n=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: ${i.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 ${i.colors.accent};
670
+ outline-offset: 2px;
671
+ }
672
+ `,rc=r.p`
673
+ margin: 0;
674
+ font-family: ${i.font.sans};
675
+ font-size: 14px;
676
+ line-height: 1.57;
677
+ color: ${i.colors.text};
678
+ text-align: left;
679
+ `,ac=r.div`
680
+ display: flex;
681
+ align-items: center;
682
+ gap: 12px;
683
+ `,sc=r.div`
684
+ flex: none;
685
+ display: grid;
686
+ place-items: center;
687
+ width: 180px;
688
+ height: 180px;
689
+ border-radius: 16px;
690
+ background: ${i.colors.media};
691
+ border: 1px solid ${i.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
+ ${i.media.maxWidth("mobile")} {
702
+ width: 120px;
703
+ height: 120px;
704
+
705
+ img {
706
+ width: 100px;
707
+ height: 100px;
708
+ }
709
+ }
710
+ `,oc=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
+ `,lc=r.p`
718
+ margin: 0;
719
+ font-family: ${i.font.sans};
720
+ font-weight: 600;
721
+ font-size: 20px;
722
+ line-height: 1.57;
723
+ color: ${i.colors.text};
724
+ `,dc=r.p`
725
+ margin: 0;
726
+ font-family: ${i.font.sans};
727
+ font-size: 10px;
728
+ line-height: 1.43;
729
+ color: ${i.colors.muted};
730
+ `,cc=r.label`
731
+ display: flex;
732
+ flex-direction: column;
733
+ gap: 4px;
734
+ `,uc=r.span`
735
+ font-family: ${i.font.sans};
736
+ font-size: 12px;
737
+ color: ${i.colors.muted};
738
+ `,pc=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 ${i.colors.text};
746
+ border-radius: 8px;
747
+ background: ${i.colors.white};
748
+
749
+ &:focus-within {
750
+ border-color: ${i.colors.magenta};
751
+ }
752
+ &[aria-invalid='true'] {
753
+ border-color: ${i.colors.err};
754
+ }
755
+
756
+ .ccy {
757
+ flex: none;
758
+ width: 22px;
759
+ height: 22px;
760
+ color: ${i.colors.rarity};
761
+ }
762
+ `,hc=r.input`
763
+ flex: 1 1 auto;
764
+ min-width: 0;
765
+ border: 0;
766
+ outline: none;
767
+ background: transparent;
768
+ font-family: ${i.font.sans};
769
+ font-size: 13px;
770
+ color: ${i.colors.text};
771
+
772
+ &::placeholder {
773
+ color: ${i.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
+ `,xc=r.span`
786
+ flex: none;
787
+ font-family: ${i.font.sans};
788
+ font-size: 10px;
789
+ color: ${i.colors.muted2};
790
+ `,Ht=r.p`
791
+ margin: 0;
792
+ font-family: ${i.font.sans};
793
+ font-size: 12px;
794
+ line-height: 1.5;
795
+ color: ${i.colors.muted};
796
+ `,fc=r.button`
797
+ width: 100%;
798
+ height: 48px;
799
+ border: 0;
800
+ border-radius: 16px;
801
+ cursor: pointer;
802
+ background: ${i.colors.accent};
803
+ color: ${i.colors.white};
804
+ font-family: ${i.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: ${i.colors.accentHover};
813
+ }
814
+ &:focus-visible {
815
+ outline: 2px solid ${i.colors.accent};
816
+ outline-offset: 2px;
817
+ }
818
+ &:disabled {
819
+ cursor: not-allowed;
820
+ background: rgba(105, 31, 169, 0.2);
821
+ color: ${i.colors.white};
822
+ }
823
+ `,mc=r.p`
824
+ margin: 0;
825
+ font-family: ${i.font.sans};
826
+ font-size: 13px;
827
+ color: ${i.colors.muted};
828
+ text-align: center;
829
+ `,gc=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
+ `,bc=r.div`
839
+ display: grid;
840
+ place-items: center;
841
+ width: 64px;
842
+ height: 64px;
843
+ border-radius: 50%;
844
+ background: ${i.colors.ok};
845
+ color: ${i.colors.white};
846
+
847
+ .ico {
848
+ width: 34px;
849
+ height: 34px;
850
+ }
851
+ `,yc=r.p`
852
+ margin: 0;
853
+ font-family: ${i.font.sans};
854
+ font-size: 20px;
855
+ line-height: 1.334;
856
+ color: ${i.colors.text2};
857
+
858
+ b {
859
+ font-weight: 700;
860
+ }
861
+ `,wc=r.p`
862
+ margin: 0;
863
+ display: inline-flex;
864
+ align-items: center;
865
+ gap: 4px;
866
+ font-family: ${i.font.sans};
867
+ font-size: 14px;
868
+ line-height: 1.43;
869
+ color: ${i.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: ${i.colors.rarity};
881
+ }
882
+ `,vc=r.div`
883
+ display: flex;
884
+ gap: 12px;
885
+
886
+ ${i.media.maxWidth("mobile")} {
887
+ flex-direction: column-reverse;
888
+ }
889
+ `,jc=r.button`
890
+ flex: 1 1 0;
891
+ height: 48px;
892
+ border: 2px solid ${i.colors.accent};
893
+ border-radius: 12px;
894
+ background: transparent;
895
+ color: ${i.colors.accent};
896
+ cursor: pointer;
897
+ font-family: ${i.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 ${i.colors.accent};
909
+ outline-offset: 2px;
910
+ }
911
+ `,kc=r.button`
912
+ flex: 1 1 0;
913
+ height: 48px;
914
+ border: 0;
915
+ border-radius: 12px;
916
+ background: ${i.colors.accent};
917
+ color: ${i.colors.softWhite};
918
+ cursor: pointer;
919
+ font-family: ${i.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: ${i.colors.accentHover};
928
+ }
929
+ &:focus-visible {
930
+ outline: 2px solid ${i.colors.accent};
931
+ outline-offset: 2px;
932
+ }
933
+ `,$c=1e3*60*60*24*182;function Cc({item:t,session:s,edit:l,onListed:o,onClose:d}){const u=ot(),x=st(),[f,m]=c.useState(l!=null&&l.currentCredits?String(l.currentCredits):"10"),[$,h]=c.useState(null),[g,y]=c.useState(null),[k,I]=c.useState(!1),[C,S]=c.useState(null),[W,M]=c.useState(null),{cancelDone:w,slow:U,cancelFailed:a,setCancelFailed:K,cancelCurrent:J,signal:A}=ma(l,y),T=rt.chainId,X=Zt(s),{data:V}=Jt(s.address),oe=V!=null&&V.name?Xt(V.name):Wn(s.address),ce=Number(f),ie=Number.isInteger(ce)&&ce>0,q=!!l&&!w&&ce===l.currentCredits,N=ie?`$${it(ce).toFixed(2)}`:"$0";c.useEffect(()=>{let R=!1;return(async()=>{try{const z=await jl({contractAddress:t.contractAddress,chainId:T});R||S(z)}catch{R||S(!1)}})(),()=>{R=!0}},[t.contractAddress,T]);async function O(R={}){var B,H;y(null);const z=Number(f);if(!Number.isInteger(z)||z<=0){y(n("primaryList.errorWholeNumber"));return}I(!0);try{if(!await J(R.payGas))return;C||(h(n("primaryList.statusEnabling")),await kl({signer:s.signer,contractAddress:t.contractAddress,chainId:T}),S(!0)),h(n("primaryList.statusPublishing"));const ae=await $l({signer:s.signer,item:{contractAddress:t.contractAddress,itemId:t.blockchainItemId,network:Ae.Network.MATIC,chainId:T},usdPrice:it(z),uses:t.remainingSupply,expiresAtMs:Date.now()+$c});h(n("primaryList.statusFinishing"));const ve=await(l?pa(ae,s.identity,{signal:A()}):Qr(ae,s.identity));(B=A())==null||B.throwIfAborted(),h(null),M(z),Z("Shop Listed Item",{item_id:t.blockchainItemId,contract_address:t.contractAddress,price_credits:z,price_usd:it(z),listing_type:"primary",is_primary:!0}),Mt.success(n(l?"listingEdit.toastUpdated":"primaryList.toastOnSale",{name:t.name})),o==null||o(z,ve.id),u.invalidateQueries({queryKey:["publishable-items"]}),u.invalidateQueries({queryKey:["collection-sale-state"]}),u.invalidateQueries({queryKey:["shop-items"]}),u.invalidateQueries({queryKey:["catalog-items"]}),u.invalidateQueries({queryKey:["overview-listings"]}),u.invalidateQueries({queryKey:["upsell-listings"]})}catch(ae){if((H=A())!=null&&H.aborted)return;pe(ae,{flow:"list_primary"}),Z("Shop Listing Failed",{listing_type:"primary",error_code:Se(ae)}),y(Ue(ae,n(l?"listingEdit.listFailedAfterCancel":"primaryList.errorGeneric"))),h(null)}finally{I(!1)}}function v(){d(),x(fs(t.contractAddress,t.blockchainItemId))}const re=C===null?n("primaryList.checking"):l?n(w?"primaryList.putOnSale":"listingEdit.submit"):k?X?n("primaryList.publishing"):n("primaryList.confirmListing"):C===!1?n("primaryList.enableAndPutOnSale"):n("primaryList.putOnSale");return W!==null?e.jsx(wn,{onClick:d,role:"presentation",children:e.jsxs(vn,{onClick:R=>R.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(l?"listingEdit.successHeader":"primaryList.successTitle"),children:[e.jsxs(jn,{children:[e.jsx(kn,{children:n(l?"listingEdit.successHeader":"primaryList.successTitle")}),e.jsx($n,{onClick:d,"aria-label":n("getCredits.done"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(gc,{children:[e.jsx(bc,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(yc,{children:e.jsx("b",{children:t.name})}),e.jsxs(wc,{children:[n("primaryList.listedFor")," ",e.jsxs("strong",{children:[e.jsx(Re,{className:"ccy-mark"})," ",e.jsx(ge,{credits:W})]})," ",n("primaryList.dotAvailable",{count:t.remainingSupply})]})]}),e.jsxs(vc,{children:[e.jsx(jc,{onClick:d,children:n("getCredits.done")}),e.jsx(kc,{onClick:v,children:n("primaryList.viewInShop")})]})]})}):l&&k?e.jsx(wn,{role:"presentation",children:e.jsxs(vn,{onClick:R=>R.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(jn,{children:[e.jsx(kn,{children:n("listingEdit.title")}),e.jsx($n,{disabled:!0,"aria-label":n("primaryList.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(ga,{phase:w?"list":"cancel",managed:X,slow:U})]})}):e.jsx(wn,{onClick:k?void 0:d,role:"presentation",children:e.jsxs(vn,{"data-testid":"modal",onClick:R=>R.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":l?n("listingEdit.title"):n("primaryList.publishTitle",{name:t.name}),children:[e.jsxs(jn,{children:[e.jsx(kn,{children:l?n("listingEdit.title"):n("primaryList.publishTitle",{name:t.name})}),e.jsx($n,{onClick:d,disabled:k,"aria-label":n("primaryList.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(rc,{children:n("primaryList.fromCollection",{collectionName:t.collectionName,count:t.remainingSupply})}),e.jsxs(ac,{children:[e.jsx(sc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(oc,{children:[e.jsx(lc,{children:t.name}),oe?e.jsx(dc,{children:n("primaryList.byCreator",{name:oe})}):null]})]}),e.jsxs(cc,{children:[e.jsx(uc,{children:n("primaryList.priceShort")}),e.jsxs(pc,{"aria-invalid":f.length>0&&!ie,children:[e.jsx(Re,{className:"ccy"}),e.jsx(hc,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:f,onChange:R=>m(R.target.value),disabled:k,"aria-label":n("primaryList.priceLabel",{currency:De.name})}),e.jsx(xc,{"aria-hidden":!0,children:N})]})]}),e.jsx(Ht,{children:n("primaryList.pricedInWhole",{currency:De.name,currencySingular:De.nameSingular})}),l?!k&&!w?e.jsx(Ht,{children:n("listingEdit.subtitle")}):null:C===!1&&!k?e.jsx(Ht,{children:X?n("primaryList.firstTimeManaged",{collectionName:t.collectionName}):n("primaryList.firstTimeConfirm",{collectionName:t.collectionName})}):C===!0&&!k?e.jsx(Ht,{children:X?n("primaryList.readyManaged"):n("primaryList.readyConfirm")}):null,a?e.jsx(qn,{state:a,canPayGas:!!(l!=null&&l.canPayGas),busy:k,onPayGas:()=>void O({payGas:!0}),onLater:()=>K(null)}):null,$&&!l?e.jsx(mc,{children:$}):null,e.jsx(Qe,{message:g}),e.jsx(fc,{onClick:()=>void O(),disabled:k||q||a==="pending"||C===null||!ie,"data-testid":"list-submit",children:re})]})})}const ba=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function ya(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function wa(t){return t.reduce((s,l)=>s+Math.max(0,Math.floor(l.amount||0)),0)}function Ic(t,s){const l=t.filter(d=>d.address.trim().length>0||(d.amount||0)>0);if(l.length===0)return!1;for(const d of l)if(!ya(d.address)||!Number.isInteger(d.amount)||d.amount<1)return!1;const o=wa(l);return o>=1&&o<=s}function Sc(t,s){const l=[],o=[];for(const d of t){const u=d.address.trim(),x=Math.max(0,Math.floor(d.amount||0));if(!(!u||x===0))for(let f=0;f<x;f++)l.push(u),o.push(s)}return{beneficiaries:l,itemIds:o}}async function Ac(t){const{contractAddress:s,chainId:l,beneficiaries:o,itemIds:d,signer:u}=t,x={...gs(bs.ERC721CollectionV2,l),address:s},f=new El(ba).encodeFunctionData("issueTokens",[o,d]),m=Sl(),$=Al(u.provider,m),h=await Gl($,m,f,x,{serverURL:la.relayerUrl});return await Ml(h,"the mint"),h}async function Mc(t){const{signer:s,contractAddress:l,chainId:o,entries:d,itemId:u}=t,{beneficiaries:x,itemIds:f}=Sc(d,u);if(x.length===0)throw new Error("No copies to issue");if(la.enabled)try{return await Ac({contractAddress:l,chainId:o,beneficiaries:x,itemIds:f,signer:s})}catch(g){if(g instanceof Ql&&g.code===Vl.USER_DENIED||g instanceof Cl)throw g;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",g)}return await ms(s.provider,o),(await(await new Pl(l,ba,s).issueTokens(x,f,Il(o))).wait()).transactionHash}const Rc=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: 560px;
944
+ max-width: 100%;
945
+ max-height: 92vh;
946
+ overflow-y: auto;
947
+ background: ${i.colors.white};
948
+ border-radius: 16px;
949
+ padding: 12px 16px 16px;
950
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
951
+ display: flex;
952
+ flex-direction: column;
953
+ gap: 20px;
954
+ `,Pc=r.div`
955
+ display: flex;
956
+ align-items: center;
957
+ justify-content: space-between;
958
+ gap: 8px;
959
+ padding-bottom: 16px;
960
+ border-bottom: 1px solid ${i.colors.gray4};
961
+ `,Ec=r.h2`
962
+ margin: 0;
963
+ font-family: ${i.font.sans};
964
+ font-weight: 600;
965
+ font-size: 20px;
966
+ line-height: 1.6;
967
+ color: ${i.colors.text};
968
+ `,Fc=r.button`
969
+ flex: none;
970
+ display: grid;
971
+ place-items: center;
972
+ width: 24px;
973
+ height: 24px;
974
+ border: 0;
975
+ background: none;
976
+ cursor: pointer;
977
+ color: ${i.colors.text};
978
+
979
+ .ico {
980
+ width: 18px;
981
+ height: 18px;
982
+ }
983
+ &:disabled {
984
+ opacity: 0.4;
985
+ cursor: default;
986
+ }
987
+ &:focus-visible {
988
+ outline: 2px solid ${i.colors.accent};
989
+ outline-offset: 2px;
990
+ }
991
+ `,Tc=r.p`
992
+ margin: 0;
993
+ font-family: ${i.font.sans};
994
+ font-size: 14px;
995
+ line-height: 1.57;
996
+ color: ${i.colors.text};
997
+ text-align: left;
998
+ `,zc=r.div`
999
+ display: flex;
1000
+ align-items: center;
1001
+ gap: 12px;
1002
+ `,Nc=r.div`
1003
+ flex: none;
1004
+ display: grid;
1005
+ place-items: center;
1006
+ width: 56px;
1007
+ height: 56px;
1008
+ border-radius: 12px;
1009
+ background: ${i.colors.media};
1010
+ border: 1px solid ${i.colors.gray4};
1011
+ overflow: hidden;
1012
+
1013
+ img {
1014
+ width: 48px;
1015
+ height: 48px;
1016
+ object-fit: contain;
1017
+ filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
1018
+ }
1019
+ `,Bc=r.p`
1020
+ margin: 0;
1021
+ font-family: ${i.font.sans};
1022
+ font-weight: 600;
1023
+ font-size: 16px;
1024
+ line-height: 1.4;
1025
+ color: ${i.colors.text};
1026
+ `,_c=r.div`
1027
+ display: flex;
1028
+ flex-direction: column;
1029
+ gap: 10px;
1030
+ `,Dc=r.div`
1031
+ display: flex;
1032
+ align-items: flex-start;
1033
+ gap: 8px;
1034
+ `,Wc=r.label`
1035
+ flex: 1 1 auto;
1036
+ min-width: 0;
1037
+ display: flex;
1038
+ flex-direction: column;
1039
+ gap: 4px;
1040
+ `,qc=r.label`
1041
+ flex: none;
1042
+ width: 96px;
1043
+ display: flex;
1044
+ flex-direction: column;
1045
+ gap: 4px;
1046
+ `,Zi=r.span`
1047
+ font-family: ${i.font.sans};
1048
+ font-size: 12px;
1049
+ color: ${i.colors.muted};
1050
+ `,er=r.input`
1051
+ height: 42px;
1052
+ padding: 0 10px;
1053
+ border: 0.5px solid ${i.colors.text};
1054
+ border-radius: 8px;
1055
+ background: ${i.colors.white};
1056
+ font-family: ${i.font.sans};
1057
+ font-size: 13px;
1058
+ color: ${i.colors.text};
1059
+ outline: none;
1060
+
1061
+ &::placeholder {
1062
+ color: ${i.colors.muted2};
1063
+ }
1064
+ &:focus {
1065
+ border-color: ${i.colors.magenta};
1066
+ }
1067
+ &[aria-invalid='true'] {
1068
+ border-color: ${i.colors.err};
1069
+ }
1070
+ /* Strip the number spinners on the amount input. */
1071
+ &::-webkit-outer-spin-button,
1072
+ &::-webkit-inner-spin-button {
1073
+ -webkit-appearance: none;
1074
+ margin: 0;
1075
+ }
1076
+ &[type='number'] {
1077
+ -moz-appearance: textfield;
1078
+ appearance: textfield;
1079
+ }
1080
+ `,Oc=r.button`
1081
+ flex: none;
1082
+ margin-top: 22px;
1083
+ display: grid;
1084
+ place-items: center;
1085
+ width: 42px;
1086
+ height: 42px;
1087
+ border: 0.5px solid ${i.colors.gray4};
1088
+ border-radius: 8px;
1089
+ background: ${i.colors.white};
1090
+ color: ${i.colors.muted};
1091
+ cursor: pointer;
1092
+
1093
+ .ico {
1094
+ width: 16px;
1095
+ height: 16px;
1096
+ }
1097
+ &:hover:not(:disabled) {
1098
+ color: ${i.colors.err};
1099
+ border-color: ${i.colors.err};
1100
+ }
1101
+ &:disabled {
1102
+ opacity: 0.35;
1103
+ cursor: default;
1104
+ }
1105
+ &:focus-visible {
1106
+ outline: 2px solid ${i.colors.accent};
1107
+ outline-offset: 2px;
1108
+ }
1109
+ `,Kc=r.button`
1110
+ align-self: flex-start;
1111
+ display: inline-flex;
1112
+ align-items: center;
1113
+ gap: 6px;
1114
+ border: 0;
1115
+ background: none;
1116
+ padding: 0;
1117
+ cursor: pointer;
1118
+ font-family: ${i.font.sans};
1119
+ font-weight: 600;
1120
+ font-size: 13px;
1121
+ color: ${i.colors.accent};
1122
+
1123
+ .ico {
1124
+ width: 16px;
1125
+ height: 16px;
1126
+ }
1127
+ &:disabled {
1128
+ opacity: 0.4;
1129
+ cursor: default;
1130
+ }
1131
+ &:focus-visible {
1132
+ outline: 2px solid ${i.colors.accent};
1133
+ outline-offset: 2px;
1134
+ }
1135
+ `,Hc=r.p`
1136
+ margin: 0;
1137
+ font-family: ${i.font.sans};
1138
+ font-size: 13px;
1139
+ line-height: 1.5;
1140
+ color: ${t=>t.over?i.colors.err:i.colors.text};
1141
+
1142
+ strong {
1143
+ font-weight: 700;
1144
+ }
1145
+ `,Uc=r.p`
1146
+ margin: 0;
1147
+ font-family: ${i.font.sans};
1148
+ font-size: 12px;
1149
+ line-height: 1.5;
1150
+ color: ${i.colors.muted};
1151
+ `;r.p`
1152
+ margin: 0;
1153
+ font-family: ${i.font.sans};
1154
+ font-size: 13px;
1155
+ color: ${i.colors.muted};
1156
+ text-align: center;
1157
+ `;const Qc=r.p`
1158
+ margin: 0;
1159
+ font-family: ${i.font.sans};
1160
+ font-size: 11px;
1161
+ color: ${i.colors.err};
1162
+ `,tr=r.div`
1163
+ display: flex;
1164
+ gap: 12px;
1165
+
1166
+ ${i.media.maxWidth("mobile")} {
1167
+ flex-direction: column-reverse;
1168
+ }
1169
+ `,Vc=r.button`
1170
+ flex: 1 1 0;
1171
+ height: 48px;
1172
+ border: 2px solid ${i.colors.accent};
1173
+ border-radius: 12px;
1174
+ background: transparent;
1175
+ color: ${i.colors.accent};
1176
+ cursor: pointer;
1177
+ font-family: ${i.font.sans};
1178
+ font-weight: 600;
1179
+ font-size: 13px;
1180
+ line-height: 24px;
1181
+ letter-spacing: 0.46px;
1182
+ text-transform: uppercase;
1183
+
1184
+ &:hover:not(:disabled) {
1185
+ background: rgba(105, 31, 169, 0.06);
1186
+ }
1187
+ &:disabled {
1188
+ opacity: 0.5;
1189
+ cursor: not-allowed;
1190
+ }
1191
+ &:focus-visible {
1192
+ outline: 2px solid ${i.colors.accent};
1193
+ outline-offset: 2px;
1194
+ }
1195
+ `,nr=r.button`
1196
+ flex: 1 1 0;
1197
+ height: 48px;
1198
+ border: 0;
1199
+ border-radius: 12px;
1200
+ cursor: pointer;
1201
+ background: ${i.colors.accent};
1202
+ color: ${i.colors.white};
1203
+ font-family: ${i.font.sans};
1204
+ font-weight: 600;
1205
+ font-size: 13px;
1206
+ line-height: 24px;
1207
+ letter-spacing: 0.46px;
1208
+ text-transform: uppercase;
1209
+
1210
+ &:hover:not(:disabled) {
1211
+ background: ${i.colors.accentHover};
1212
+ }
1213
+ &:focus-visible {
1214
+ outline: 2px solid ${i.colors.accent};
1215
+ outline-offset: 2px;
1216
+ }
1217
+ &:disabled {
1218
+ cursor: not-allowed;
1219
+ background: rgba(105, 31, 169, 0.2);
1220
+ color: ${i.colors.white};
1221
+ }
1222
+ `,Gc=r.div`
1223
+ display: flex;
1224
+ flex-direction: column;
1225
+ align-items: center;
1226
+ gap: 16px;
1227
+ padding: 24px 16px;
1228
+ border-radius: 16px;
1229
+ background: rgba(193, 238, 207, 0.5);
1230
+ text-align: center;
1231
+ `,Yc=r.div`
1232
+ display: grid;
1233
+ place-items: center;
1234
+ width: 64px;
1235
+ height: 64px;
1236
+ border-radius: 50%;
1237
+ background: ${i.colors.ok};
1238
+ color: ${i.colors.white};
1239
+
1240
+ .ico {
1241
+ width: 34px;
1242
+ height: 34px;
1243
+ }
1244
+ `,Jc=r.p`
1245
+ margin: 0;
1246
+ font-family: ${i.font.sans};
1247
+ font-size: 20px;
1248
+ line-height: 1.334;
1249
+ color: ${i.colors.text2};
1250
+
1251
+ b {
1252
+ font-weight: 700;
1253
+ }
1254
+ `;function Xc(t){return t.map(s=>({address:s.address,amount:Number(s.amount)}))}function Zc({item:t,session:s,onClose:l,onIssued:o}){const d=ot(),[u,x]=c.useState([{address:"",amount:"1"}]),[f,m]=c.useState(!1),[$,h]=c.useState(null),[g,y]=c.useState(null),k=c.useRef(null),I=Zt(s),C=Xc(u),S=wa(C),W=Ic(C,t.available),M=S>t.available;c.useEffect(()=>{var T;(T=k.current)==null||T.focus();function A(X){X.key==="Escape"&&!f&&l()}return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[f,l]);function w(A,T){x(X=>X.map((V,oe)=>oe===A?{...V,...T}:V))}function U(){x(A=>[...A,{address:"",amount:"1"}])}function a(A){x(T=>T.length<=1?T:T.filter((X,V)=>V!==A))}async function K(){if(!(!W||f)){h(null),m(!0);try{await Mc({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId,entries:C,itemId:t.itemId}),Z("Shop Issued Item",{contract_address:t.contractAddress,item_id:t.itemId,recipients:C.filter(A=>A.address.trim().length>0).length,copies:S}),y(S),Mt.success(n("issue.toastSuccess",{count:S,name:t.name})),d.invalidateQueries({queryKey:["publishable-item"]}),d.invalidateQueries({queryKey:["publishable-items"]}),o==null||o()}catch(A){mt(A)||pe(A,{flow:"issue-item",itemId:t.itemId}),Z("Shop Issue Failed",{error_code:Se(A)}),h(mt(A)?n("getCredits.errorCanceled"):Ue(A,n("issue.errorGeneric")))}finally{m(!1)}}}const J=f?I?n("issue.issuing"):n("issue.confirm"):S>0?n("issue.issueCount",{count:S}):n("issue.issue");return e.jsx(Rc,{onClick:f?void 0:l,role:"presentation",children:e.jsxs(Lc,{ref:k,tabIndex:-1,"data-testid":"issue-modal",onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("issue.title"),children:[e.jsxs(Pc,{children:[e.jsx(Ec,{children:n("issue.title")}),e.jsx(Fc,{onClick:l,disabled:f,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),g!==null?e.jsxs(e.Fragment,{children:[e.jsxs(Gc,{children:[e.jsx(Yc,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(Jc,{children:n("issue.successBody",{count:g,name:t.name})})]}),e.jsx(tr,{children:e.jsx(nr,{onClick:l,children:n("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(zc,{children:[e.jsx(Nc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsx(Bc,{children:t.name})]}),e.jsx(Tc,{children:n("issue.subtitle")}),e.jsx(_c,{children:u.map((A,T)=>{const X=A.address.trim(),V=X.length>0&&!ya(X),oe=Number(A.amount),ce=A.amount.length>0&&(!Number.isInteger(oe)||oe<1);return e.jsxs(Dc,{children:[e.jsxs(Wc,{children:[e.jsx(Zi,{children:n("issue.addressLabel")}),e.jsx(er,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:A.address,onChange:ie=>w(T,{address:ie.target.value}),disabled:f,"aria-invalid":V,"aria-label":n("issue.addressLabel")}),V?e.jsx(Qc,{children:n("issue.invalidAddress")}):null]}),e.jsxs(qc,{children:[e.jsx(Zi,{children:n("issue.amountLabel")}),e.jsx(er,{type:"number",min:"1",step:"1",inputMode:"numeric",value:A.amount,onChange:ie=>w(T,{amount:ie.target.value}),disabled:f,"aria-invalid":ce,"aria-label":n("issue.amountLabel")})]}),e.jsx(Oc,{onClick:()=>a(T),disabled:f||u.length<=1,"aria-label":n("issue.removeRow"),children:e.jsx(L,{name:"close",className:"ico"})})]},T)})}),e.jsxs(Kc,{onClick:U,disabled:f,children:[e.jsx(L,{name:"plus",className:"ico"}),n("issue.addRow")]}),e.jsxs(Hc,{over:M,"aria-live":"polite",children:[e.jsx("strong",{children:S})," / ",t.available," ",n("issue.itemsToIssue")]}),M?e.jsx(Uc,{children:n("issue.overCap",{available:t.available})}):null,e.jsx(Qe,{message:$}),e.jsxs(tr,{children:[e.jsx(Vc,{onClick:l,disabled:f,children:n("sellModal.cancel")}),e.jsx(nr,{onClick:()=>void K(),disabled:!W||f,children:J})]})]})]})})}const eu=r.div`
1255
+ position: fixed;
1256
+ inset: 0;
1257
+ z-index: 10000;
1258
+ display: flex;
1259
+ align-items: center;
1260
+ justify-content: center;
1261
+ padding: 16px;
1262
+ background: rgba(22, 21, 24, 0.55);
1263
+ `,tu=r.div`
1264
+ width: 760px;
1265
+ max-width: 100%;
1266
+ background: ${i.colors.white};
1267
+ border-radius: 16px;
1268
+ padding: 12px 16px 16px;
1269
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1270
+ display: flex;
1271
+ flex-direction: column;
1272
+ gap: 16px;
1273
+ `,nu=r.div`
1274
+ display: flex;
1275
+ align-items: center;
1276
+ justify-content: space-between;
1277
+ gap: 8px;
1278
+ padding-bottom: 16px;
1279
+ border-bottom: 1px solid ${i.colors.gray4};
1280
+ `,iu=r.h2`
1281
+ margin: 0;
1282
+ font-family: ${i.font.sans};
1283
+ font-weight: 600;
1284
+ font-size: 20px;
1285
+ line-height: 1.6;
1286
+ color: ${i.colors.text};
1287
+ `,ru=r.button`
1288
+ flex: none;
1289
+ display: grid;
1290
+ place-items: center;
1291
+ width: 24px;
1292
+ height: 24px;
1293
+ border: 0;
1294
+ background: none;
1295
+ cursor: pointer;
1296
+ color: ${i.colors.text};
1297
+
1298
+ .ico {
1299
+ width: 18px;
1300
+ height: 18px;
1301
+ }
1302
+ &:focus-visible {
1303
+ outline: 2px solid ${i.colors.accent};
1304
+ outline-offset: 2px;
1305
+ }
1306
+ `,au=r.video`
1307
+ display: block;
1308
+ width: 100%;
1309
+ max-height: 70vh;
1310
+ border-radius: 12px;
1311
+ background: ${i.colors.blackBtn};
1312
+ `;function su({src:t,itemName:s,onClose:l}){const o=c.useRef(null);return c.useEffect(()=>{var u;(u=o.current)==null||u.focus();function d(x){x.key==="Escape"&&l()}return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[l]),e.jsx(eu,{onClick:l,role:"presentation",children:e.jsxs(tu,{ref:o,tabIndex:-1,onClick:d=>d.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":n("itemDetail.showcaseTitle"),children:[e.jsxs(nu,{children:[e.jsx(iu,{children:s||n("itemDetail.showcaseTitle")}),e.jsx(ru,{onClick:l,"aria-label":n("itemDetail.showcaseClose"),children:e.jsx(L,{name:"close",size:18})})]}),e.jsx(au,{src:t,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Oe,radius:ou}=i,lu=r.div`
1313
+ position: fixed;
1314
+ inset: 0;
1315
+ z-index: 60;
1316
+ display: grid;
1317
+ place-items: center;
1318
+ padding: 20px;
1319
+ `,du=r.div`
1320
+ position: absolute;
1321
+ inset: 0;
1322
+ background: rgba(22, 21, 24, 0.45);
1323
+ `,cu=r.div`
1324
+ position: relative;
1325
+ z-index: 1;
1326
+ width: 100%;
1327
+ max-width: 420px;
1328
+ background: ${Oe.white};
1329
+ border-radius: ${ou.banner};
1330
+ padding: 24px;
1331
+ box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
1332
+ animation: cart-pop-in 0.16s ease;
1333
+ `,uu=r.div`
1334
+ display: flex;
1335
+ align-items: center;
1336
+ gap: 14px;
1337
+ margin-bottom: 18px;
1338
+ `,pu=r.div`
1339
+ width: 64px;
1340
+ height: 64px;
1341
+ flex: none;
1342
+ border-radius: 12px;
1343
+ overflow: hidden;
1344
+ background: ${Oe.media};
1345
+
1346
+ & img {
1347
+ width: 100%;
1348
+ height: 100%;
1349
+ object-fit: contain;
1350
+ }
1351
+ `,hu=r.div`
1352
+ font-weight: 700;
1353
+ font-size: 16px;
1354
+ color: ${Oe.text};
1355
+ margin-bottom: 6px;
1356
+ `,xu=r.div`
1357
+ background: ${Oe.panel};
1358
+ border-radius: 14px;
1359
+ padding: 16px;
1360
+ margin-bottom: 14px;
1361
+ `,ir=r.div`
1362
+ color: ${Oe.muted};
1363
+ font-size: 13px;
1364
+ font-weight: 600;
1365
+ margin-bottom: 6px;
1366
+ `,rr=r.div`
1367
+ display: flex;
1368
+ align-items: center;
1369
+ gap: 8px;
1370
+ font-weight: 700;
1371
+ font-size: 24px;
1372
+ color: ${Oe.text};
1373
+
1374
+ &[data-approx] {
1375
+ color: ${Oe.text2};
1376
+ }
1377
+ `,fu=r.span`
1378
+ color: ${Oe.muted};
1379
+ `,ar=r(Re)`
1380
+ width: 20px;
1381
+ height: 20px;
1382
+ color: ${Oe.text};
1383
+ `,sr=r.div`
1384
+ margin-top: 6px;
1385
+ font-size: 13px;
1386
+ `,mu=r.div`
1387
+ font-size: 13px;
1388
+ margin-bottom: 6px;
1389
+ `,va=gt`
1390
+ margin: 6px 0 0;
1391
+ font-size: 13px;
1392
+ `,Cn=r.p`
1393
+ ${va};
1394
+ `,gu=r(Qe)`
1395
+ ${va};
1396
+ `,bu=r.div`
1397
+ display: flex;
1398
+ gap: 10px;
1399
+ margin-top: 18px;
1400
+ `,or=r(Ve)`
1401
+ flex: 1;
1402
+ `;function In(t){if(mt(t))return n("errors.rejected");const s=(t.message??"").toLowerCase();return s.includes("insufficient")?n("marketCheckout.error.insufficient",{currency:De.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 yu(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 ja({listing:t,rate:s,onClose:l,onSold:o}){const{session:d}=at(),{data:u,isError:x}=Kr(d),f=ot(),m=st(),[$,h]=c.useState("confirm"),[g,y]=c.useState(n("marketCheckout.checkingListing")),[k,I]=c.useState(null),[C,S]=c.useState(null),[W,M]=c.useState(null),[w,U]=c.useState(!1),a=c.useRef(null),K=c.useRef(!1),J=c.useRef(fa());c.useEffect(()=>(K.current=!1,()=>{K.current=!0}),[]);const A=nt(pn(t.manaWei,s));c.useEffect(()=>{let q=!1;if(!d){h("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const O=await Yr(t.tradeId);if(!O)throw new Error("not found");if(ws(O,d.address))throw new Error("You can't buy your own listing.");const v=pn(t.manaWei,s);if(!Number.isFinite(v)||v<=0)throw new Error("price unavailable");if(q)return;S({trade:O,usdCents:v,credits:nt(v)}),y("")}catch(O){if(q)return;console.error("[market] listing check failed",O),Z(be(O)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(O),value_usd:Math.round(pn(t.manaWei,s))/100}),h("error"),I(In(O))}})(),()=>{q=!0,a.current&&d&&(oe([a.current]),a.current=null)}},[]);const T=!!C&&u!=null&&u.credits<C.credits;async function X(){if(!d||!C)return;if(T){Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:C.credits,credits_balance:(u==null?void 0:u.credits)??0,shortfall:Math.max(0,C.credits-((u==null?void 0:u.credits)??0))}),a.current&&(await V([a.current])&&M(null),a.current=null),m("/credits");return}h("working"),I(null),U(!1);let q=W;if(!q){y(n("marketCheckout.lockingPrice"));try{const{credit:R,maxCreditedValue:z,usdCents:B}=await Tn(d.identity,C.usdCents,t.tradeId);if(K.current){V([R.id]);return}a.current=R.id,f.invalidateQueries({queryKey:["usd-balance"]});const H=nt(B);if(q={trade:C.trade,credit:R,maxCreditedValue:z,usdCents:B,credits:H},M(q),H!==C.credits){S({trade:C.trade,usdCents:B,credits:H}),U(!0),y(""),h("confirm");return}}catch(R){console.error("[market] authorize failed",R),be(R)||pe(R,{flow:"market_buy_now",step:"authorize"}),Z(be(R)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(R),value_usd:C.usdCents/100}),y(""),I(In(R)),h("error");return}}if(!q)return;const N=q;let O=!1,v;try{y(n("marketCheckout.confirming"));const R={trade:N.trade,buyer:d.address,signer:d.signer,credits:[N.credit],maxCreditedValue:N.maxCreditedValue,onBroadcast:({txHash:z})=>J.current.broadcast(N.credit.id,z),onReverted:({txHash:z})=>{z&&J.current.reverted(z)}};if(J.current.submitStarted(N.credit.id),sa())try{v=await Tl(R),J.current.broadcast(N.credit.id,v),await da(v),O=!0}catch(z){if(z instanceof ca)O=!0;else if(z instanceof ua){if(z.reason==="relayer-unreachable")throw J.current.unobservable(N.credit.id),z;if(!Yt(d.providerType))throw z;v=await Ti(R)}else throw v&&J.current.reverted(v),z}else v=await Ti(R)}catch(R){J.current.submitFinished(N.credit.id),console.error("[market] buy now failed",R),await V([N.credit.id])&&M(null),a.current=null,Z(be(R)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(R),value_usd:N.usdCents/100}),f.invalidateQueries({queryKey:["usd-balance"]}),I(In(R)),h("error");const z=(R.message??"").toLowerCase();(z.includes("not found")||z.includes("no active listing")||z.includes("404"))&&o();return}J.current.submitFinished(N.credit.id),a.current=null;try{f.invalidateQueries({queryKey:["usd-balance"]}),Z("Shop Completed Purchase",{items:[{item_id:t.itemId??null,contract_address:t.contractAddress,token_id:null,price_usd:N.usdCents/100,category:t.category,is_smart:!1}],value_credits:N.credits,value_usd:N.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:O,transaction_hash:v??null}),f.invalidateQueries({queryKey:["detail-trade"]}),f.invalidateQueries({queryKey:["shop-item"]}),f.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),f.invalidateQueries({queryKey:["shop-items"]}),f.invalidateQueries({queryKey:["catalog-items"]}),f.invalidateQueries({queryKey:["my-assets"]}),f.invalidateQueries({queryKey:["purchases"]})}catch(R){pe(R,{flow:"market_buy_now",step:"post_purchase"})}const re={items:[yu(t)],txHash:v};m("/success",{state:re})}async function V(q){if(!d||q.length===0)return!1;const N=q.filter(O=>!J.current.mayBeConsumed(O));if(N.length===0)return!1;try{return await Hr(d.identity,N),!0}catch{return!1}}function oe(q){V(q.filter(N=>!J.current.isInFlight(N)))}function ce(){d&&W&&V([W.credit.id]),a.current=null,l()}const ie=$==="working";return e.jsxs(lu,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),children:[e.jsx(du,{onClick:ie?void 0:ce,"aria-hidden":!0}),e.jsxs(cu,{children:[e.jsxs(uu,{children:[e.jsx(pu,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx(hu,{title:t.name,children:t.name||n("buyModal.itemFallback")}),e.jsx(Gr,{"data-variant":"rarity",children:t.rarity})]})]}),e.jsx(xu,{children:C?e.jsxs(e.Fragment,{children:[e.jsx(ir,{children:n("marketCheckout.finalPrice")}),e.jsxs(rr,{children:[e.jsx(ar,{}),e.jsx(ge,{credits:C.credits})," ",Mi(C.credits)]}),e.jsxs(sr,{className:"muted",children:["$",it(C.credits).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(ir,{children:n("marketCheckout.todaysPrice")}),e.jsxs(rr,{"data-approx":!0,children:[e.jsx(fu,{"aria-hidden":!0,children:"≈"}),e.jsx(ar,{}),e.jsx(ge,{credits:A})," ",Mi(A)]}),e.jsx(sr,{className:"muted",children:g||n("marketCheckout.checkingListing")})]})}),d?e.jsxs(mu,{className:"muted",children:[n("marketCheckout.yourBalance")," ",e.jsx(Re,{className:"ccy-mark"})," ",ys(u,x)]}):null,T?e.jsx(Cn,{className:"muted",children:n("marketCheckout.needMore",{currency:De.name})}):null,w?e.jsx(Cn,{"data-testid":"price-changed",role:"status",children:n("buyModal.priceChanged")}):null,g&&$==="working"?e.jsx(Cn,{className:"muted",children:g}):null,e.jsx(gu,{message:k}),e.jsxs(bu,{children:[e.jsx(or,{variant:"ghost",onClick:ce,disabled:ie,children:n("buyModal.cancel")}),e.jsx(or,{variant:"purple",onClick:()=>void X(),disabled:ie||!C||T&&xt(),children:ie?n("marketCheckout.buying"):T&&!xt()?n("nav.getCredits",{currency:De.name}):n("marketCheckout.confirmPurchase")})]})]})]})}function wu(t,s,{enabled:l=!0,first:o}={}){const{data:d,isFetched:u}=se({queryKey:["related-items",t,s,o],enabled:l&&!!t&&!!s,staleTime:3e5,queryFn:()=>vs(t,s,{first:o})});return{items:d??[],isFetched:u}}const ka=15;function vu(t){return`${t.contractAddress}-${t.itemId??t.tokenId??t.id}`.toLowerCase()}function ju(t,s){return!!(s.id&&t.id===s.id||s.itemId&&t.itemId===s.itemId&&lr(t,s)||s.tokenId&&t.tokenId===s.tokenId&&lr(t,s))}function lr(t,s){var l;return s.contractAddress?((l=t.contractAddress)==null?void 0:l.toLowerCase())===s.contractAddress.toLowerCase():!1}function Sn(t,s,l=ka){const o=new Set,d=[];function u(f,m){for(const $ of f){if(d.length>=m)return;if(ju($,s))continue;const h=vu($);o.has(h)||(o.add(h),d.push($))}}u(t.collection,1/0);const x=d.length;return u(t.creator??[],l),u(t.related??[],l),{items:d,isCollectionOnly:d.length>0&&d.length===x}}const ku=20,$u=30,dr=[];function Cu(t,s=ka){const{id:l,contractAddress:o,itemId:d,tokenId:u,creator:x}=t,f=c.useMemo(()=>({id:l,contractAddress:o,itemId:d,tokenId:u}),[l,o,d,u]),{data:m=dr,isFetched:$}=se({queryKey:["collection-items",o],enabled:!!o,queryFn:()=>ks(o,{first:ku}).then(U=>U.items)}),h=c.useMemo(()=>Sn({collection:m},f,s).items.length,[m,f,s]),g=$&&h<s,y=g&&!!x,k=se({queryKey:["suggestions-creator",x],enabled:y,staleTime:5*6e4,queryFn:()=>$s({creator:x,isOnSale:!0,first:$u}).then(U=>U.items)}),I=k.data??dr,C=!y||k.isSuccess||k.isError,S=c.useMemo(()=>Sn({collection:m,creator:I},f,s).items.length,[m,I,f,s]),{items:W}=wu(o,d??null,{enabled:g&&C&&S<s,first:s}),M=c.useMemo(()=>Sn({collection:m,creator:I,related:W},f,s),[m,I,W,f,s]),w=js(M.items);return{...M,items:w,siblings:m,siblingsFetched:$}}function Iu(t){const s=Cs();return!s||!Is(s.contracts,t)?null:s.label}const{colors:_e,media:On}=i,Su=Ss`
1403
+ to {
1404
+ transform: rotate(360deg);
1405
+ }
1406
+ `,Au=r.div``,Mu=r.span`
1407
+ width: 34px;
1408
+ height: 34px;
1409
+ border-radius: 50%;
1410
+ border: 3px solid ${_e.line};
1411
+ border-top-color: ${_e.accent};
1412
+ animation: ${Su} 0.8s linear infinite;
1413
+
1414
+ @media (prefers-reduced-motion: reduce) {
1415
+ animation-duration: 2.4s;
1416
+ }
1417
+ `,Ru=r.p``,Lu=r.div``,cr=r.button`
1418
+ border: 0;
1419
+ background: none;
1420
+ cursor: pointer;
1421
+ padding: 6px 16px;
1422
+ border-radius: 999px;
1423
+ font-weight: 600;
1424
+ font-size: 12px;
1425
+ text-transform: uppercase;
1426
+ letter-spacing: 0.04em;
1427
+ color: ${_e.muted};
1428
+ transition:
1429
+ background 0.12s ease,
1430
+ color 0.12s ease;
1431
+
1432
+ &[data-active] {
1433
+ background: ${_e.text};
1434
+ color: ${_e.white};
1435
+ }
1436
+ &:not([data-active]):hover {
1437
+ color: ${_e.text};
1438
+ }
1439
+
1440
+ ${On.maxWidth("lg")} {
1441
+ padding: 6px 12px;
1442
+ border-radius: 0;
1443
+ background: ${_e.white};
1444
+ color: ${_e.text2};
1445
+
1446
+ &[data-active] {
1447
+ background: ${_e.text};
1448
+ color: ${_e.white};
1449
+ }
1450
+ &:first-of-type {
1451
+ border-top-left-radius: 999px;
1452
+ border-bottom-left-radius: 999px;
1453
+ }
1454
+ &:last-of-type {
1455
+ border-top-right-radius: 999px;
1456
+ border-bottom-right-radius: 999px;
1457
+ }
1458
+ }
1459
+ `,ur=r.span`
1460
+ ${On.maxWidth("lg")} {
1461
+ display: none;
1462
+ }
1463
+ `,pr=r(L)`
1464
+ display: none;
1465
+
1466
+ ${On.maxWidth("lg")} {
1467
+ display: block;
1468
+ }
1469
+ `,hr="shop-item-preview";function Pu({item:t}){const s=at(T=>{var X;return(X=T.session)==null?void 0:X.address}),{data:l,isLoading:o}=Jt(s),d=s&&l?s:"default",u=t.category==="emote",[x,f]=c.useState("avatar"),m=!u&&x==="item",$=m||!o,h=At(T=>T.fittingOpen),{ref:g,active:y}=As(),k=$&&y&&!h,[I,C]=c.useState(!0);c.useEffect(()=>{C(!0)},[t.id,m]),c.useEffect(()=>{k&&C(!0)},[k]);const S=c.useRef(null);c.useEffect(()=>{if(k)return()=>{Jl(S.current),S.current=null}},[k]);const[W,M]=c.useState(Ae.PreviewRenderer.UNITY),w=W===Ae.PreviewRenderer.BABYLON,U=!!s&&!!l,a=U&&Ms(t,Rs(l)),K=Ls(t)[0],J=U&&!a&&!u,A=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:g,"data-preview-viewport":!0,"aria-hidden":!0}),k?e.jsx(Ps,{id:hr,...A,profile:m?void 0:a?d:"default",bodyShape:m||a?void 0:K,type:u?void 0:m?Ae.PreviewType.WEARABLE:Ae.PreviewType.AVATAR,emote:u||m?void 0:Ae.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:u?1.5:void 0,wheelStart:u?100:void 0,onRenderer:M,onLoad:()=>{var T;C(!1),S.current=((T=document.getElementById(hr))==null?void 0:T.contentWindow)??null}}):null,!k||I?e.jsx(Au,{"data-preview-loading":!0,"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(Mu,{"aria-hidden":!0})}):null,J&&!m?e.jsx(Ru,{"data-preview-note":!0,children:n("itemPreview.shownOnBody",{shape:Es(K)})}):null,!w||!u?null:e.jsx(Yl,{previewId:"shop-item-preview"}),!w||u?null:e.jsxs(Lu,{"data-preview-toggle":!0,role:"group","aria-label":n("itemPreview.previewMode"),children:[e.jsxs(cr,{type:"button","data-active":x==="avatar"||void 0,"aria-pressed":x==="avatar","aria-label":n("itemPreview.onAvatar"),onClick:()=>f("avatar"),children:[e.jsx(pr,{name:"view-avatar",size:18}),e.jsx(ur,{children:n("itemPreview.onAvatar")})]}),e.jsxs(cr,{type:"button","data-active":x==="item"||void 0,"aria-pressed":x==="item","aria-label":n("itemPreview.item"),onClick:()=>f("item"),children:[e.jsx(pr,{name:"view-item",size:18}),e.jsx(ur,{children:n("itemPreview.item")})]})]})]})}const Eu=r.div`
1470
+ position: fixed;
1471
+ inset: 0;
1472
+ z-index: 10000;
1473
+ display: flex;
1474
+ align-items: center;
1475
+ justify-content: center;
1476
+ padding: 16px;
1477
+ background: rgba(22, 21, 24, 0.55);
1478
+ `,Fu=r.div`
1479
+ display: flex;
1480
+ flex-direction: column;
1481
+ gap: 12px;
1482
+ width: 1128px;
1483
+ max-width: 100%;
1484
+ max-height: 92vh;
1485
+ background: ${i.colors.white};
1486
+ border-radius: 16px;
1487
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1488
+
1489
+ &:focus {
1490
+ outline: none;
1491
+ }
1492
+ `,Tu=r.div`
1493
+ flex: none;
1494
+ display: flex;
1495
+ align-items: center;
1496
+ gap: 8px;
1497
+ padding: 16px;
1498
+ border-bottom: 1px solid ${i.colors.gray4};
1499
+ `,zu=r.h2`
1500
+ flex: 1 1 auto;
1501
+ min-width: 0;
1502
+ margin: 0;
1503
+ font-family: ${i.font.sans};
1504
+ font-weight: 600;
1505
+ font-size: 20px;
1506
+ line-height: 1.6;
1507
+ color: ${i.colors.text};
1508
+ `,Nu=r.button`
1509
+ flex: none;
1510
+ display: grid;
1511
+ place-items: center;
1512
+ width: 18.5px;
1513
+ height: 18.5px;
1514
+ padding: 0;
1515
+ border: 0;
1516
+ background: none;
1517
+ cursor: pointer;
1518
+ color: ${i.colors.text};
1519
+
1520
+ .ico {
1521
+ width: 18.5px;
1522
+ height: 18.5px;
1523
+ }
1524
+ &:focus-visible {
1525
+ outline: 2px solid ${i.colors.accent};
1526
+ outline-offset: 4px;
1527
+ }
1528
+ `,Bu=r.div`
1529
+ flex: 1 1 auto;
1530
+ min-height: 0;
1531
+ overflow-y: auto;
1532
+ display: flex;
1533
+ flex-direction: column;
1534
+ gap: 8px;
1535
+ padding: 0 16px 24px;
1536
+ `,_u=r.div`
1537
+ position: sticky;
1538
+ top: 0;
1539
+ z-index: 1;
1540
+ display: flex;
1541
+ align-items: center;
1542
+ justify-content: space-between;
1543
+ gap: 8px;
1544
+ padding-bottom: 8px;
1545
+ background: ${i.colors.white};
1546
+ `,Du=r.p`
1547
+ margin: 0;
1548
+ font-family: ${i.font.sans};
1549
+ font-size: 14px;
1550
+ line-height: 1.43;
1551
+ color: ${i.colors.muted};
1552
+ `,Wu=r.div`
1553
+ position: relative;
1554
+ flex: none;
1555
+ display: inline-flex;
1556
+ align-items: center;
1557
+ padding: 4px 4px 4px 12px;
1558
+ border: 0.5px solid ${i.colors.lineStrong};
1559
+ border-radius: 8px;
1560
+ background: ${i.colors.white};
1561
+
1562
+ select {
1563
+ appearance: none;
1564
+ /* 24px design gap + the 24px chevron that sits on top of it. */
1565
+ padding: 0 48px 0 0;
1566
+ border: 0;
1567
+ background: none;
1568
+ font-family: ${i.font.sans};
1569
+ font-weight: 500;
1570
+ font-size: 12px;
1571
+ line-height: 1.43;
1572
+ color: ${i.colors.text2};
1573
+ cursor: pointer;
1574
+ outline: none;
1575
+ }
1576
+ select:focus-visible {
1577
+ outline: 2px solid ${i.colors.accent};
1578
+ outline-offset: 2px;
1579
+ border-radius: 4px;
1580
+ }
1581
+ .chev {
1582
+ position: absolute;
1583
+ right: 4px;
1584
+ width: 24px;
1585
+ height: 24px;
1586
+ color: ${i.colors.text2};
1587
+ pointer-events: none;
1588
+ }
1589
+ `,qu=r.div`
1590
+ flex: none;
1591
+ border: 1px solid ${i.colors.lineStrong};
1592
+ border-radius: 16px;
1593
+ /* The four equal columns need the design width to hold their content, so a narrower modal scrolls
1594
+ the table here rather than letting the page scroll sideways. */
1595
+ overflow-x: auto;
1596
+ overflow-y: hidden;
1597
+ background: ${i.colors.white};
1598
+ `,Ou=r.table`
1599
+ width: 100%;
1600
+ min-width: 1096px;
1601
+ table-layout: fixed;
1602
+ border-collapse: collapse;
1603
+
1604
+ th {
1605
+ height: 48px;
1606
+ padding: 8px 8px 8px 16px;
1607
+ text-align: left;
1608
+ vertical-align: middle;
1609
+ background: ${i.colors.media};
1610
+ border-right: 0.5px solid ${i.colors.lineStrong};
1611
+ font-family: ${i.font.sans};
1612
+ font-weight: 600;
1613
+ font-size: 16px;
1614
+ line-height: 1.5;
1615
+ color: ${i.colors.text};
1616
+ text-transform: capitalize;
1617
+ }
1618
+ th:last-of-type {
1619
+ border-right: 0;
1620
+ }
1621
+
1622
+ td {
1623
+ height: 56px;
1624
+ padding: 8px 8px 8px 16px;
1625
+ vertical-align: middle;
1626
+ border-right: 0.5px solid ${i.colors.lineStrong};
1627
+ border-bottom: 0.5px solid ${i.colors.lineStrong};
1628
+ font-family: ${i.font.sans};
1629
+ font-size: 14px;
1630
+ line-height: 1.43;
1631
+ color: ${i.colors.text2};
1632
+ }
1633
+ td:last-of-type {
1634
+ border-right: 0;
1635
+ }
1636
+
1637
+ tbody tr:hover,
1638
+ tbody tr:focus-within {
1639
+ background: ${i.colors.media};
1640
+ }
1641
+ tbody tr:hover td,
1642
+ tbody tr:focus-within td {
1643
+ border-bottom-color: ${i.colors.media};
1644
+ }
1645
+
1646
+ /* Stack every cell into a card — a 4-column grid is unusable at phone widths. The column name is
1647
+ carried on each cell's data-label so it survives translation. */
1648
+ ${i.media.maxWidth("mobile")} {
1649
+ min-width: 0;
1650
+
1651
+ thead {
1652
+ display: none;
1653
+ }
1654
+ tr {
1655
+ display: block;
1656
+ border-bottom: 0.5px solid ${i.colors.lineStrong};
1657
+ }
1658
+ tr:last-of-type {
1659
+ border-bottom: 0;
1660
+ }
1661
+ td {
1662
+ display: block;
1663
+ height: auto;
1664
+ padding: 8px 16px;
1665
+ border-right: 0;
1666
+ border-bottom: 0;
1667
+ }
1668
+ td:first-of-type {
1669
+ padding-top: 12px;
1670
+ }
1671
+ td:last-of-type {
1672
+ padding-bottom: 12px;
1673
+ }
1674
+ td[data-label]::before {
1675
+ content: attr(data-label);
1676
+ display: block;
1677
+ margin-bottom: 2px;
1678
+ font-size: 12px;
1679
+ line-height: 1.43;
1680
+ color: ${i.colors.muted};
1681
+ text-transform: capitalize;
1682
+ }
1683
+ tbody tr:hover td,
1684
+ tbody tr:focus-within td {
1685
+ border-bottom-color: transparent;
1686
+ }
1687
+ }
1688
+ `,$a=`
1689
+ display: flex;
1690
+ align-items: center;
1691
+ gap: 10px;
1692
+ min-width: 0;
1693
+
1694
+ .owner-ava {
1695
+ flex: none;
1696
+ display: inline-grid;
1697
+ place-items: center;
1698
+ width: 32px;
1699
+ height: 32px;
1700
+ border: 2.286px solid rgba(255, 255, 255, 0.5);
1701
+ border-radius: 50%;
1702
+ background: ${i.colors.media};
1703
+ object-fit: cover;
1704
+ overflow: hidden;
1705
+ color: ${i.colors.white};
1706
+ font-weight: 700;
1707
+ font-size: 13px;
1708
+ }
1709
+ .owner-name {
1710
+ min-width: 0;
1711
+ overflow: hidden;
1712
+ text-overflow: ellipsis;
1713
+ white-space: nowrap;
1714
+ font-family: ${i.font.sans};
1715
+ font-size: 14px;
1716
+ line-height: 1.43;
1717
+ color: ${i.colors.text2};
1718
+ }
1719
+ `,Ku=r.div`
1720
+ ${$a}
1721
+ `,Hu=r.button`
1722
+ ${$a}
1723
+ padding: 0;
1724
+ border: 0;
1725
+ background: none;
1726
+ font: inherit;
1727
+ text-align: left;
1728
+ cursor: pointer;
1729
+
1730
+ &:hover .owner-name {
1731
+ text-decoration: underline;
1732
+ }
1733
+ &:focus-visible {
1734
+ outline: 2px solid ${i.colors.accent};
1735
+ outline-offset: 2px;
1736
+ border-radius: 4px;
1737
+ }
1738
+ `,xr=r.span`
1739
+ color: ${i.colors.muted};
1740
+ `,Uu=r.div`
1741
+ display: flex;
1742
+ align-items: center;
1743
+ justify-content: space-between;
1744
+ gap: 4px;
1745
+
1746
+ .amount {
1747
+ display: inline-flex;
1748
+ align-items: center;
1749
+ gap: 4px;
1750
+ font-family: ${i.font.sans};
1751
+ font-weight: 600;
1752
+ font-size: 16px;
1753
+ line-height: 1.5;
1754
+ color: ${i.colors.text2};
1755
+ }
1756
+ /* The credits mark is always near-black here — never the violet accent. */
1757
+ .amount .ccy {
1758
+ flex: none;
1759
+ width: 22px;
1760
+ height: 22px;
1761
+ color: ${i.colors.text2};
1762
+ }
1763
+ .approx {
1764
+ color: ${i.colors.muted};
1765
+ font-weight: 600;
1766
+ }
1767
+ `,Qu=r.div`
1768
+ flex: none;
1769
+ display: flex;
1770
+ align-items: center;
1771
+ gap: 8px;
1772
+ opacity: 0;
1773
+ transition: opacity 0.12s ease;
1774
+
1775
+ tr:hover &,
1776
+ tr:focus-within &,
1777
+ &[data-persistent='true'] {
1778
+ opacity: 1;
1779
+ }
1780
+
1781
+ @media (hover: none) {
1782
+ opacity: 1;
1783
+ }
1784
+ ${i.media.maxWidth("mobile")} {
1785
+ opacity: 1;
1786
+ }
1787
+ `,Ca=`
1788
+ display: inline-flex;
1789
+ align-items: center;
1790
+ justify-content: center;
1791
+ gap: 8px;
1792
+ height: 40px;
1793
+ padding: 0 12px;
1794
+ border: 0;
1795
+ border-radius: 12px;
1796
+ cursor: pointer;
1797
+ font-family: ${i.font.sans};
1798
+ font-weight: 600;
1799
+ font-size: 13px;
1800
+ line-height: 24px;
1801
+ letter-spacing: 0.46px;
1802
+ text-transform: uppercase;
1803
+ text-align: center;
1804
+ white-space: nowrap;
1805
+
1806
+ .ico {
1807
+ width: 20px;
1808
+ height: 20px;
1809
+ }
1810
+ &:focus-visible {
1811
+ outline: 2px solid ${i.colors.accent};
1812
+ outline-offset: 2px;
1813
+ }
1814
+ `,Vu=r.button`
1815
+ ${Ca}
1816
+ min-width: 106px;
1817
+ background: ${i.colors.text2};
1818
+ color: ${i.colors.softWhite};
1819
+
1820
+ &:hover:not(:disabled) {
1821
+ filter: brightness(1.35);
1822
+ }
1823
+ &:disabled {
1824
+ opacity: 0.55;
1825
+ cursor: default;
1826
+ }
1827
+ `,fr=r.button`
1828
+ ${Ca}
1829
+ background: ${i.colors.accent};
1830
+ color: ${i.colors.softWhite};
1831
+
1832
+ &:hover:not(:disabled) {
1833
+ background: ${i.colors.accentHover};
1834
+ }
1835
+ `,Gu=r.span`
1836
+ display: inline-flex;
1837
+ align-items: center;
1838
+ height: 40px;
1839
+ padding: 0 12px;
1840
+ border-radius: 12px;
1841
+ background: ${i.colors.chip};
1842
+ font-family: ${i.font.sans};
1843
+ font-weight: 600;
1844
+ font-size: 13px;
1845
+ line-height: 24px;
1846
+ color: ${i.colors.muted};
1847
+ white-space: nowrap;
1848
+ `,Yu=r.div`
1849
+ flex: none;
1850
+ display: flex;
1851
+ align-items: center;
1852
+ justify-content: flex-end;
1853
+ gap: 8px;
1854
+ `,Ju=r.p`
1855
+ margin: 0;
1856
+ font-family: ${i.font.sans};
1857
+ font-size: 12px;
1858
+ line-height: 1;
1859
+ color: ${i.colors.gray0};
1860
+ `,mr=r.button`
1861
+ display: grid;
1862
+ place-items: center;
1863
+ padding: 10px;
1864
+ border: 1px solid ${i.colors.text2};
1865
+ border-radius: 4px;
1866
+ background: ${i.colors.white};
1867
+ color: ${i.colors.text2};
1868
+ cursor: pointer;
1869
+
1870
+ /* One chevron glyph turned into ‹ / › so no extra asset is needed. */
1871
+ .ico {
1872
+ width: 11px;
1873
+ height: 11px;
1874
+ transform: rotate(-90deg);
1875
+ }
1876
+ &[data-dir='prev'] .ico {
1877
+ transform: rotate(90deg);
1878
+ }
1879
+ &:disabled {
1880
+ border-color: ${i.colors.lineStrong};
1881
+ color: ${i.colors.lineStrong};
1882
+ cursor: default;
1883
+ }
1884
+ &:focus-visible {
1885
+ outline: 2px solid ${i.colors.accent};
1886
+ outline-offset: 2px;
1887
+ }
1888
+ `,Xu=r.p`
1889
+ margin: 0;
1890
+ padding: 32px 0;
1891
+ font-family: ${i.font.sans};
1892
+ font-size: 14px;
1893
+ line-height: 1.43;
1894
+ color: ${i.colors.muted};
1895
+ text-align: center;
1896
+ `;r.div`
1897
+ display: flex;
1898
+ flex-direction: column;
1899
+ gap: 8px;
1900
+ margin-top: 16px;
1901
+
1902
+ .classic-title {
1903
+ font-family: ${i.font.sans};
1904
+ font-weight: 600;
1905
+ font-size: 15px;
1906
+ color: ${i.colors.text2};
1907
+ }
1908
+ .classic-note {
1909
+ font-family: ${i.font.sans};
1910
+ font-size: 13px;
1911
+ color: ${i.colors.muted};
1912
+ }
1913
+ `;r.span`
1914
+ display: inline-flex;
1915
+ align-items: center;
1916
+ padding: 2px 8px;
1917
+ border-radius: ${i.radius.chip};
1918
+ background: ${i.colors.chip};
1919
+ font-family: ${i.font.sans};
1920
+ font-size: 11px;
1921
+ letter-spacing: 0.4px;
1922
+ text-transform: uppercase;
1923
+ color: ${i.colors.muted};
1924
+ `;r.a`
1925
+ display: inline-flex;
1926
+ align-items: center;
1927
+ gap: 6px;
1928
+ height: 40px;
1929
+ padding: 0 14px;
1930
+ border: 1px solid ${i.colors.lineStrong};
1931
+ border-radius: 12px;
1932
+ color: ${i.colors.accent};
1933
+ font-family: ${i.font.sans};
1934
+ font-weight: 600;
1935
+ font-size: 13px;
1936
+ text-decoration: none;
1937
+
1938
+ &:hover {
1939
+ background: ${i.colors.chip};
1940
+ }
1941
+ .ico {
1942
+ width: 14px;
1943
+ height: 14px;
1944
+ }
1945
+ `;const Ut=10,Zu=!1;function ep(t){return/^0x[a-fA-F0-9]{40}$/.test(t)?`${t.slice(0,6)}…${t.slice(-4)}`:t}function tp(t){let s=0;for(let l=0;l<t.length;l++)s=s*31+t.charCodeAt(l)>>>0;return`hsl(${s%360}, 52%, 45%)`}function np(t,s){var l;return(((l=t==null?void 0:t.trim())==null?void 0:l[0])||s.replace(/^0x/i,"")[0]||"?").toUpperCase()}function ip(t){return t%100>=11&&t%100<=13?"th":["th","st","nd","rd"][t%10]??"th"}function rp(t,s){const l=new Date(t);return Number.isNaN(l.getTime())?"—":s==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(l)} ${l.getDate()}${ip(l.getDate())}, ${l.getFullYear()}`:new Intl.DateTimeFormat(s,{day:"numeric",month:"long",year:"numeric"}).format(l)}function ap(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 sp({r:t,seller:s,issuedId:l,labels:o,locale:d,isOwn:u,isLegacy:x,inCart:f,fallbackImage:m,onAdd:$,onBuyNative:h,onBuyLegacy:g}){var a,K;const y=st(),{data:k}=Jt(s),I=(K=(a=k==null?void 0:k.avatar)==null?void 0:a.snapshots)==null?void 0:K.face256,[C,S]=c.useState(!1);c.useEffect(()=>S(!1),[I]);const W=!!I&&!C,M=s?k!=null&&k.name?Xt(k.name):ep(s):void 0,w=W?e.jsx("img",{className:"owner-ava",src:I,alt:"",loading:"lazy",onError:()=>S(!0)}):s?e.jsx("span",{className:"owner-ava",style:{backgroundColor:tp(s)},"aria-hidden":!0,children:np(k==null?void 0:k.name,s)}):m?e.jsx("img",{className:"owner-ava",src:m,alt:"","aria-hidden":!0}):e.jsx("span",{className:"owner-ava","aria-hidden":!0}),U=e.jsxs(e.Fragment,{children:[w,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":u?"true":void 0,children:[e.jsx("td",{"data-label":o.owner,children:s?e.jsx(Hu,{type:"button",onClick:()=>y(`/items/creator/${s}`),children:U}):e.jsx(Ku,{children:U})}),e.jsx("td",{"data-label":o.itemNumber,children:l?e.jsxs("span",{"data-testid":"resale-issued",children:["#",l]}):e.jsx(xr,{children:"—"})}),e.jsx("td",{"data-label":o.expiration,children:t.saleEndsAt?rp(t.saleEndsAt,d):e.jsx(xr,{children:"—"})}),e.jsx("td",{"data-label":o.price,children:e.jsxs(Uu,{children:[e.jsxs("span",{className:"amount",children:[x?e.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,e.jsx(Re,{className:"ccy"}),e.jsx("span",{children:Dn(t.priceCredits)})]}),e.jsx(Qu,{"data-persistent":u?"true":void 0,children:u?e.jsx(Gu,{"data-testid":"resale-own",children:n("resales.yourListing")}):x?e.jsx(fr,{onClick:g,"aria-label":n("assetCard.buyNow"),"data-testid":"resale-buy",children:n("resales.buy")}):e.jsxs(e.Fragment,{children:[e.jsxs(Vu,{onClick:$,disabled:f,"aria-label":f?n("assetCard.inCart"):n("assetCard.addToCart"),"data-testid":"resale-add",children:[e.jsx(L,{name:"cart",className:"ico"}),e.jsx("span",{children:f?n("assetCard.inCart"):n("resales.add")})]}),e.jsx(fr,{onClick:h,"aria-label":n("assetCard.buyNow"),"data-testid":"resale-buy",children:n("resales.buy")})]})})]})})]})}function op({item:t,onClose:s}){var O;const l=t.contractAddress,o=t.itemId,d=ot(),u=At(v=>v.add),x=At(v=>v.items),{session:f}=at(),m=Jr(v=>v.locale),$=(O=f==null?void 0:f.address)==null?void 0:O.toLowerCase(),h=c.useRef(null),[g,y]=c.useState(null),[k,I]=c.useState(null),[C,S]=c.useState("cheapest"),[W,M]=c.useState(0),w=!!g||!!k;c.useEffect(()=>{var v;(v=h.current)==null||v.focus()},[]),c.useEffect(()=>{function v(R){R.key==="Escape"&&!w&&s()}window.addEventListener("keydown",v);const re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",v),document.body.style.overflow=re}},[w,s]);const{data:U=[],isLoading:a}=se({queryKey:["item-resales",l,o],enabled:!!l&&!!o,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Zr(l,o)}),K=c.useMemo(()=>C==="cheapest"?U:[...U].sort((v,re)=>re.priceCredits-v.priceCredits),[U,C]),J=Math.max(1,Math.ceil(K.length/Ut)),A=Math.min(W,J-1),T=K.slice(A*Ut,A*Ut+Ut),X=T.filter(v=>!v.seller||!v.issuedId).map(v=>v.tokenId).filter(v=>!!v),{data:V={}}=se({queryKey:["resale-token-info",l,X.join(",")],enabled:!!l&&X.length>0,staleTime:6e4,queryFn:()=>Fs(l,X)}),{data:oe=[]}=se({queryKey:["item-classic-orders",l,o],enabled:Zu,queryFn:()=>Ts(l,o)}),ce=U.some(v=>v.source==="legacy"),{data:ie}=Xr(ce);function q(){d.invalidateQueries({queryKey:["item-resales",l,o]})}const N={owner:n("resales.colOwner"),itemNumber:n("resales.colItemNumber"),expiration:n("resales.colExpiration"),price:n("resales.colPrice")};return e.jsxs(e.Fragment,{children:[e.jsx(Eu,{onClick:w?void 0:s,role:"presentation",children:e.jsxs(Fu,{ref:h,tabIndex:-1,onClick:v=>v.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("resales.modalTitle"),"data-testid":"resellers-modal",children:[e.jsxs(Tu,{children:[e.jsx(zu,{children:n("resales.modalTitle")}),e.jsx(Nu,{onClick:s,"aria-label":n("resales.close"),"data-testid":"resellers-close",children:e.jsx(L,{name:"close"})})]}),e.jsxs(Bu,{children:[e.jsxs(_u,{children:[e.jsx(Du,{"data-testid":"resales-count",children:n("resales.count",{count:U.length})}),e.jsxs(Wu,{children:[e.jsxs("select",{value:C,onChange:v=>{S(v.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"})]})]}),a?null:K.length===0?e.jsx(Xu,{"data-testid":"resales-empty",children:n("resales.empty")}):null,K.length>0?e.jsxs(e.Fragment,{children:[e.jsx(qu,{children:e.jsxs(Ou,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:N.owner}),e.jsx("th",{scope:"col",children:N.itemNumber}),e.jsx("th",{scope:"col",children:N.expiration}),e.jsx("th",{scope:"col",children:N.price})]})}),e.jsx("tbody",{children:T.map(v=>{const re=v.source==="legacy",R=x.some(ee=>ee.id===v.id),z=v.tokenId&&V[v.tokenId]||{},B=v.issuedId??z.issuedId,H=v.seller??z.seller,ae={...v,name:v.name||t.name,thumbnail:v.thumbnail||t.thumbnail,rarity:v.rarity||t.rarity,category:v.category||t.category,wearableCategory:v.wearableCategory??t.wearableCategory,gender:v.gender??t.gender},ve=!!H&&!!$&&H.toLowerCase()===$;return e.jsx(sp,{r:ae,seller:H,issuedId:B,labels:N,locale:m,isOwn:ve,isLegacy:re,inCart:R,fallbackImage:ae.thumbnail,onAdd:()=>u(ae,"item_detail"),onBuyNative:()=>y(ae),onBuyLegacy:()=>I(ap(ae))},v.tradeId??v.id)})})]})}),J>1?e.jsxs(Yu,{children:[e.jsx(mr,{"data-dir":"prev",onClick:()=>M(v=>Math.max(0,v-1)),disabled:A===0,"aria-label":n("resales.prevPage"),"data-testid":"resale-prev-page",children:e.jsx(L,{name:"chevron-down"})}),e.jsx(Ju,{"data-testid":"resale-page-label",children:n("resales.page",{page:A+1,total:J})}),e.jsx(mr,{onClick:()=>M(v=>Math.min(J-1,v+1)),disabled:A>=J-1,"aria-label":n("resales.nextPage"),"data-testid":"resale-next-page",children:e.jsx(L,{name:"chevron-down"})})]}):null]}):null,null]})]})}),g?e.jsx(zn,{item:g,onClose:()=>{y(null),q()}}):null,k&&ie?e.jsx(ja,{listing:k,rate:ie,onClose:()=>I(null),onSold:()=>{I(null),q()}}):null]})}const lp="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:Ia,radius:Kn,z:dp}=i,cp=r.div`
1946
+ position: fixed;
1947
+ inset: 0;
1948
+ z-index: ${dp.overlay};
1949
+ display: flex;
1950
+ align-items: center;
1951
+ justify-content: center;
1952
+ overflow-y: auto;
1953
+ padding: 16px;
1954
+ background: rgba(22, 21, 24, 0.55);
1955
+ `,up=r.div`
1956
+ width: 560px;
1957
+ max-width: 100%;
1958
+ max-height: 100%;
1959
+ overflow-y: auto;
1960
+ padding: 12px 16px 16px;
1961
+ border-radius: ${Kn.modal};
1962
+ background: ${me.white};
1963
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1964
+ display: flex;
1965
+ flex-direction: column;
1966
+ gap: 24px;
1967
+ font-family: ${Ia.sans};
1968
+
1969
+ /* Focused on mount for screen readers; it is not tab-reachable, so it never needs a visible ring. */
1970
+ &:focus {
1971
+ outline: none;
1972
+ }
1973
+ `,pp=r.div`
1974
+ display: flex;
1975
+ align-items: center;
1976
+ justify-content: space-between;
1977
+ gap: 8px;
1978
+ padding-bottom: 16px;
1979
+ border-bottom: 1px solid ${me.gray4};
1980
+ `,hp=r.h2`
1981
+ margin: 0;
1982
+ font-weight: 600;
1983
+ font-size: 20px;
1984
+ line-height: 1.6;
1985
+ color: ${me.text};
1986
+ `,xp=r.button`
1987
+ position: relative;
1988
+ flex: none;
1989
+ display: grid;
1990
+ place-items: center;
1991
+ width: 18.535px;
1992
+ height: 18.535px;
1993
+ padding: 0;
1994
+ border: 0;
1995
+ background: none;
1996
+ cursor: pointer;
1997
+ color: ${me.text};
1998
+
1999
+ .ico {
2000
+ width: 100%;
2001
+ height: 100%;
2002
+ }
2003
+ /* Keeps the glyph exactly where the design puts it while giving it a tappable hit area. */
2004
+ &::after {
2005
+ content: '';
2006
+ position: absolute;
2007
+ inset: -11px;
2008
+ }
2009
+ &:focus-visible {
2010
+ outline: 2px solid ${me.accent};
2011
+ outline-offset: 2px;
2012
+ }
2013
+ `,fp=r.div`
2014
+ padding: 24px 16px;
2015
+ border-radius: ${Kn.modal};
2016
+ background: ${me.promptLilac};
2017
+ display: flex;
2018
+ flex-direction: column;
2019
+ align-items: center;
2020
+ gap: 16px;
2021
+ text-align: center;
2022
+ `,mp=r.img`
2023
+ flex: none;
2024
+ width: 76px;
2025
+ height: 76px;
2026
+ `,gp=r.h3`
2027
+ margin: 0;
2028
+ font-weight: 700;
2029
+ font-size: 20px;
2030
+ line-height: 1.334;
2031
+ color: ${me.text2};
2032
+ `,gr=r.p`
2033
+ margin: 0;
2034
+ font-weight: 400;
2035
+ font-size: 16px;
2036
+ line-height: 1.334;
2037
+ color: ${me.text2};
2038
+ `,bp=r.div`
2039
+ display: flex;
2040
+ align-items: center;
2041
+ gap: 12px;
2042
+ `,Sa=`
2043
+ flex: 1 1 0;
2044
+ min-width: 0;
2045
+ display: inline-flex;
2046
+ align-items: center;
2047
+ justify-content: center;
2048
+ gap: 12px;
2049
+ height: 46px;
2050
+ padding: 0 12px;
2051
+ border-radius: ${Kn.card};
2052
+ font-family: ${Ia.sans};
2053
+ font-weight: 600;
2054
+ font-size: 13px;
2055
+ line-height: 24px;
2056
+ letter-spacing: 0.46px;
2057
+ text-transform: uppercase;
2058
+ cursor: pointer;
2059
+ transition:
2060
+ background 0.15s ease,
2061
+ color 0.15s ease;
2062
+
2063
+ &:focus-visible {
2064
+ outline: 2px solid ${me.accent};
2065
+ outline-offset: 2px;
2066
+ }
2067
+ `,yp=r.button`
2068
+ ${Sa};
2069
+ border: 0.5px solid ${me.text};
2070
+ background: ${me.white};
2071
+ color: ${me.text2};
2072
+
2073
+ &:hover {
2074
+ background: ${me.panel};
2075
+ }
2076
+ `,wp=r.a`
2077
+ ${Sa};
2078
+ border: 0;
2079
+ background: ${me.dclRed};
2080
+ color: ${me.softWhite};
2081
+ text-decoration: none;
2082
+
2083
+ &:hover {
2084
+ filter: brightness(1.08);
2085
+ }
2086
+ `,vp=r.span`
2087
+ flex: none;
2088
+ display: grid;
2089
+ place-items: center;
2090
+ width: 24px;
2091
+ height: 24px;
2092
+
2093
+ .ico {
2094
+ width: 100%;
2095
+ height: 100%;
2096
+ }
2097
+ `;function jp(t,s){return`${rt.marketplaceUrl}/contracts/${t}/tokens/${s}`}function kp(t,s){return`${rt.marketplaceUrl}/contracts/${t}/items/${s}`}function br(t){const{contractAddress:s,onClose:l}=t,o=t.variant==="buy",d=t.variant==="buy"?t.itemId:null,u=t.variant==="buy"?null:t.tokenId,x=t.variant==="buy"?kp(s,t.itemId):jp(s,t.tokenId),f=c.useRef(null),m=c.useRef(l);return m.current=l,c.useEffect(()=>{var h;(h=f.current)==null||h.focus();function $(g){g.key==="Escape"&&m.current()}return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[]),e.jsx(cp,{role:"presentation",onClick:l,children:e.jsxs(up,{ref:f,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:$=>$.stopPropagation(),children:[e.jsxs(pp,{children:[e.jsx(hp,{children:n("marketplaceRedirect.title")}),e.jsx(xp,{onClick:l,"aria-label":n("marketplaceRedirect.close"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(fp,{children:[e.jsx(mp,{src:lp,alt:"","aria-hidden":!0}),e.jsx(gp,{children:n("marketplaceRedirect.heading")}),e.jsx(gr,{children:o?n("marketplaceRedirect.buyBody"):n("marketplaceRedirect.body")}),o?e.jsx(gr,{children:n("marketplaceRedirect.buyCurrencyNote")}):null]}),e.jsxs(bp,{children:[e.jsx(yp,{onClick:l,"data-testid":"marketplace-redirect-cancel",children:n("marketplaceRedirect.cancel")}),e.jsxs(wp,{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:d,token_id:u}),children:[n("marketplaceRedirect.continue"),e.jsx(vp,{"aria-hidden":!0,children:e.jsx(L,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function Hn(){return rt.shopServerUrl||null}function Aa(){return!!Hn()}async function $p(t,s,l){const o=Hn();if(!o)return{subscribed:!1};const d=new URLSearchParams({contractAddress:t,itemId:s}),u=`${o}/notify-requests?${d.toString()}`,x=await ea(u,{method:"GET",identity:l,metadata:{}});if(!x.ok)throw new Error(`getNotifyRequest ${x.status}`);return Ip(x,"getNotifyRequest")}async function Cp(t,s){const l=Hn();if(!l)throw new Error("createNotifyRequest: no shop-server host configured");const o=`${l}/notify-requests`,d=await ea(o,{method:"POST",identity:s,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!d.ok)throw new Error(`createNotifyRequest ${d.status}: ${await d.text()}`);const u=await d.text();if(u.trim()&&!Sp(u))throw new Error("createNotifyRequest: response was not JSON")}async function Ip(t,s){try{return await t.json()}catch{throw new Error(`${s}: response was not JSON`)}}function Sp(t){try{return JSON.parse(t),!0}catch{return!1}}const{colors:Me,radius:Ma}=i,Ra=gt`
2098
+ display: flex;
2099
+ flex-direction: column;
2100
+ gap: 8px;
2101
+ width: 100%;
2102
+ `,Ap=r.form`
2103
+ ${Ra};
2104
+ `,yr=r.div`
2105
+ ${Ra};
2106
+
2107
+ &[data-done] {
2108
+ flex-direction: row;
2109
+ align-items: center;
2110
+ gap: 16px;
2111
+ padding: 12px;
2112
+ border-radius: 16px;
2113
+ background: #c1d8c9;
2114
+ }
2115
+ `,Mp=r.label`
2116
+ font-size: 14px;
2117
+ color: ${Me.softWhite};
2118
+ `,Rp=r.div`
2119
+ display: flex;
2120
+ align-items: stretch;
2121
+ gap: 8px;
2122
+ `,Lp=r.input`
2123
+ flex: 1;
2124
+ min-width: 0;
2125
+ height: 42px;
2126
+ padding: 0 16px;
2127
+ border: 1px solid ${Me.fieldBorder};
2128
+ border-radius: ${Ma.btn};
2129
+ background: rgba(255, 255, 255, 0.1);
2130
+ font-size: 16px;
2131
+ color: ${Me.softWhite};
2132
+
2133
+ &::placeholder {
2134
+ color: ${Me.gray4};
2135
+ }
2136
+ &:focus-visible {
2137
+ outline: none;
2138
+ border-color: ${Me.white};
2139
+ box-shadow: 0 0 0 1px ${Me.white};
2140
+ }
2141
+ `,wr=r.button`
2142
+ flex-shrink: 0;
2143
+ height: 40px;
2144
+ padding: 0 12px;
2145
+ border: 0;
2146
+ border-radius: ${Ma.card};
2147
+ background: ${Me.softWhite};
2148
+ color: ${Me.text};
2149
+ font-weight: 600;
2150
+ font-size: 15px;
2151
+ line-height: 24px;
2152
+ text-transform: uppercase;
2153
+ letter-spacing: 0.46px;
2154
+ cursor: pointer;
2155
+ transition: background 0.15s ease;
2156
+
2157
+ &[data-full] {
2158
+ width: 100%;
2159
+ flex-shrink: 1;
2160
+ }
2161
+ &:hover:not(:disabled) {
2162
+ background: ${Me.white};
2163
+ }
2164
+ &:disabled {
2165
+ opacity: 0.5;
2166
+ cursor: default;
2167
+ }
2168
+ `,Pp=r.span`
2169
+ display: inline-flex;
2170
+ align-items: center;
2171
+ justify-content: center;
2172
+ flex-shrink: 0;
2173
+ width: 20px;
2174
+ height: 20px;
2175
+ border-radius: 50%;
2176
+ background: #34ce76;
2177
+ color: ${Me.white};
2178
+ `,Ep=r.span`
2179
+ font-size: 16px;
2180
+ line-height: 1.5;
2181
+ color: ${Me.text2};
2182
+ `;function vr(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim())}function Fp({item:t}){const s=at(S=>S.session),l=at(S=>S.signIn),[o,d]=c.useState(""),[u,x]=c.useState(!1),[f,m]=c.useState(!1),[$,h]=c.useState(null),g=Aa(),y=g&&!!s&&!!t.contractAddress&&!!t.itemId,{data:k}=se({queryKey:["notify-request",t.contractAddress,t.itemId,s==null?void 0:s.address],enabled:y,queryFn:()=>$p(t.contractAddress,t.itemId,s.identity)});c.useEffect(()=>{k!=null&&k.email&&d(S=>S||k.email)},[k==null?void 0:k.email]),c.useEffect(()=>{if(!s||!g)return;let S=!1;return zs().then(W=>{!S&&W&&d(M=>M||W)}),()=>{S=!0}},[g,s]);const I=f||!!(k!=null&&k.subscribed);async function C(S){if(S.preventDefault(),!(!s||!t.itemId||!vr(o)||u)){x(!0),h(null);try{await Cp({contractAddress:t.contractAddress,itemId:t.itemId,chainId:t.chainId,email:o.trim()},s.identity),m(!0),Z("Shop Requested Notify",{item_id:t.itemId,contract_address:t.contractAddress})}catch(W){pe(W,{flow:"notify-me",contractAddress:t.contractAddress,itemId:t.itemId}),h(n("notifyMe.error"))}finally{x(!1)}}}return g?s?I?e.jsxs(yr,{"data-done":!0,"data-testid":"notify-subscribed",children:[e.jsx(Pp,{"aria-hidden":!0,children:e.jsx(L,{name:"check",size:12})}),e.jsx(Ep,{children:n("notifyMe.subscribedBody")})]}):e.jsxs(Ap,{onSubmit:S=>void C(S),"data-testid":"notify",children:[e.jsx(Mp,{htmlFor:"notify-email",children:n("notifyMe.label")}),e.jsxs(Rp,{children:[e.jsx(Lp,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:n("notifyMe.placeholder"),value:o,onChange:S=>d(S.target.value),"data-testid":"notify-email"}),e.jsx(wr,{type:"submit",disabled:!vr(o)||u,"data-testid":"notify-submit",children:u?n("notifyMe.working"):n("notifyMe.cta")})]}),e.jsx(Qe,{message:$})]}):e.jsx(yr,{"data-testid":"notify",children:e.jsx(wr,{type:"button","data-full":!0,onClick:l,"data-testid":"notify-signin",children:n("notifyMe.signInCta")})}):null}const Tp=r.div`
2183
+ display: flex;
2184
+ flex-direction: column;
2185
+ gap: 4px;
2186
+ width: 100%;
2187
+ font-family: ${i.font.sans};
2188
+ `,zp=r.div`
2189
+ display: flex;
2190
+ align-items: flex-start;
2191
+ justify-content: space-between;
2192
+ gap: 12px;
2193
+ font-size: 12px;
2194
+ `,Np=r.span`
2195
+ font-weight: 600;
2196
+ line-height: 1.57;
2197
+ color: ${i.colors.muted2};
2198
+ /* Drawn in caps, like the PRICE and STOCK labels beside it. Cased here rather than in the string so a
2199
+ translation is not forced to shout in a language where that reads badly. */
2200
+ text-transform: uppercase;
2201
+ white-space: nowrap;
2202
+ `,jr=r.span`
2203
+ /* Sized here, not inherited from the head row: the same element also sits UNDER the bar, outside it. */
2204
+ font-size: 12px;
2205
+ font-weight: 400;
2206
+ line-height: 22px;
2207
+ color: ${i.colors.softWhite};
2208
+ text-transform: lowercase;
2209
+ white-space: nowrap;
2210
+ `,Bp=r.div`
2211
+ position: relative;
2212
+ width: 100%;
2213
+ height: 10px;
2214
+ border-radius: 100px;
2215
+ background: rgba(255, 255, 255, 0.2);
2216
+ /* The fill is a child with its own radius; clipping here keeps a full bar's ends round. */
2217
+ overflow: hidden;
2218
+ `,_p=r.div`
2219
+ position: absolute;
2220
+ left: 0;
2221
+ top: 0;
2222
+ height: 10px;
2223
+ border-radius: 100px;
2224
+ background: ${i.colors.dclRed};
2225
+ transition: width 0.3s ease;
2226
+
2227
+ @media (prefers-reduced-motion: reduce) {
2228
+ transition: none;
2229
+ }
2230
+ `;function Dp({claimed:t,total:s,className:l,testId:o}){if(!Number.isFinite(t)||!Number.isFinite(s)||s<=0)return null;const d=Math.min(s,Math.max(0,t)),u=Math.round(d/s*100);return e.jsxs(Tp,{className:l,"data-testid":o,children:[e.jsxs(zp,{children:[e.jsx(Np,{children:n("offerStock.label")}),e.jsx(jr,{children:n("offerStock.claimed",{claimed:d,total:s})})]}),e.jsx(Bp,{role:"progressbar","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":d,"aria-label":n("offerStock.claimed",{claimed:d,total:s}),children:e.jsx(_p,{style:{width:`${u}%`}})}),e.jsx(jr,{children:n("offerStock.percent",{pct:u})})]})}const Wp=new Map(Object.entries(Xl).flatMap(([t,s])=>s.length===1?[[s[0],t]]:[])),ft="/items";function qp(t){return t?`${ft}?rarities=${encodeURIComponent(t.toLowerCase())}`:null}function Op(t){const s=t.wearableCategory;if(s){const l=Wp.get(s);return l?`${ft}?category=wearable&subCategory=${encodeURIComponent(l)}`:`${ft}?category=wearable`}return t.category==="emote"?`${ft}?category=emote`:t.category==="wearable"?`${ft}?category=wearable`:null}function Kp(){return`${ft}?smart=true`}const Hp=r(Ns)`
2231
+ display: flex;
2232
+ flex-direction: column;
2233
+ overflow: hidden;
2234
+ gap: 1px;
2235
+ background: ${i.colors.lineStrong};
2236
+
2237
+ /* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
2238
+ full height. */
2239
+ & [data-collage-row] {
2240
+ display: flex;
2241
+ flex: 1 1 50%;
2242
+ min-height: 0;
2243
+ gap: 1px;
2244
+ }
2245
+ & [data-collage-row][data-full] {
2246
+ flex-basis: 100%;
2247
+ }
2248
+ & [data-collage-row] img {
2249
+ flex: 1 1 0;
2250
+ min-width: 0;
2251
+ width: 100%;
2252
+ height: 100%;
2253
+ object-fit: cover;
2254
+ display: block;
2255
+ }
2256
+ `;function Up({contractAddress:t,name:s,items:l,className:o}){const d=st();if(!t||!s)return null;const u=(l??[]).map(m=>m.thumbnail).filter(m=>!!m).slice(0,4),x=u.slice(0,2),f=u.slice(2,4);return e.jsxs(Bs,{as:"button","data-link":!0,className:o,"data-testid":"creator",onClick:m=>{m.stopPropagation(),d(`/collection/${t}`)},children:[u.length>0?e.jsxs(Hp,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{"data-collage-row":!0,"data-full":f.length===0||void 0,children:x.map((m,$)=>e.jsx("img",{src:m,alt:""},$))}),f.length>0?e.jsx("span",{"data-collage-row":!0,children:f.map((m,$)=>e.jsx("img",{src:m,alt:""},$))}):null]}):null,e.jsx(_s,{"data-testid":"creator-name",children:Xt(s)})]})}const{colors:b,radius:Ge,media:de,font:Qp,gradients:Vp}=i,Gp=r.div`
2257
+ max-width: 1721px;
2258
+ margin: 0 auto;
2259
+
2260
+ ${de.maxWidth("lg")} {
2261
+ padding-bottom: 88px;
2262
+ }
2263
+ `,Yp=r.nav`
2264
+ display: flex;
2265
+ align-items: center;
2266
+ gap: 8px;
2267
+ font-size: 13px;
2268
+ color: ${b.gray4};
2269
+ margin-bottom: 24px;
2270
+ ${Zl};
2271
+ `,Jp=r.button`
2272
+ background: none;
2273
+ border: 0;
2274
+ padding: 0;
2275
+ font: inherit;
2276
+ color: ${b.gray4};
2277
+
2278
+ &:hover {
2279
+ color: ${b.white};
2280
+ }
2281
+ `,Xp=r.span`
2282
+ color: ${b.muted2};
2283
+ `,Zp=r.span`
2284
+ color: ${b.softWhite};
2285
+ font-weight: 600;
2286
+ `,eh=r.div`
2287
+ position: relative;
2288
+ /* Confines the glow's negative z-index, which would otherwise escape to the root stacking context. */
2289
+ isolation: isolate;
2290
+ display: grid;
2291
+ grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
2292
+ gap: 48px;
2293
+ align-items: start;
2294
+
2295
+ /* Preview column width, re-derived from the tracks above so the glow's pivot cannot drift. */
2296
+ --preview-col-w: calc((100% - 48px) * 1045 / 1559);
2297
+ /* Oversized so the glow reaches past the frame while the gradient still finishes fading inside its
2298
+ own box: the radii cannot exceed 50% without ending outside the box and painting a hard rectangle. */
2299
+ --glow-box: 1.76;
2300
+
2301
+ /* Avatar glow, hung off the grid container because the preview frame clips its own overflow. Sits
2302
+ under the frame and, by document order, above the body symbols on the same z-index. */
2303
+ &::before {
2304
+ content: '';
2305
+ position: absolute;
2306
+ z-index: -1;
2307
+ pointer-events: none;
2308
+ top: 0;
2309
+ left: calc(var(--preview-col-w) / 2);
2310
+ width: calc(var(--preview-col-w) * var(--glow-box));
2311
+ aspect-ratio: 1045 / 752;
2312
+ transform: translate(-50%, calc(50% / var(--glow-box) - 50%));
2313
+ background: radial-gradient(
2314
+ 50% 50% at 50% 52%,
2315
+ rgb(var(--glow-core, ${b.glowCyanRgb})) 0%,
2316
+ rgb(var(--glow-rgb, ${b.glowCyanRgb}) / 0.9) 20%,
2317
+ 45%,
2318
+ rgb(var(--glow-rgb, ${b.glowCyanRgb}) / 0) 100%
2319
+ );
2320
+ }
2321
+
2322
+ ${de.maxWidth("lg")} {
2323
+ grid-template-columns: 1fr;
2324
+ gap: 24px;
2325
+
2326
+ /* The track maths is desktop-only; one column puts the pivot nowhere meaningful. */
2327
+ &::before {
2328
+ display: none;
2329
+ }
2330
+ }
2331
+ `,th=r.div`
2332
+ position: relative;
2333
+ aspect-ratio: 1045 / 752;
2334
+ border-radius: ${Ge.banner};
2335
+ overflow: hidden;
2336
+
2337
+ /* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
2338
+ shell's gutter instead of sitting inside it. No transform, which would make this the containing block
2339
+ for the absolutely-positioned controls below. */
2340
+ ${de.maxWidth("lg")} {
2341
+ aspect-ratio: 1 / 1;
2342
+ width: 100vw;
2343
+ margin-left: calc(-50vw + 50%);
2344
+ border-radius: 0;
2345
+ }
2346
+
2347
+ & iframe,
2348
+ & > * {
2349
+ width: 100%;
2350
+ height: 100%;
2351
+ border: 0;
2352
+ display: block;
2353
+ }
2354
+
2355
+ /* Soft edges so legs and the cast shadow dissolve instead of being sliced by the overflow clip — on the
2356
+ iframe alone, so the pills and note stay crisp, and intersected linears rather than one radial, which
2357
+ would round the corners. The bands stay clear of the controls aang draws ~40px inside its canvas. */
2358
+ & iframe {
2359
+ -webkit-mask-image:
2360
+ linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
2361
+ linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
2362
+ -webkit-mask-composite: source-in;
2363
+ mask-image:
2364
+ linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
2365
+ linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
2366
+ mask-composite: intersect;
2367
+ }
2368
+
2369
+ /* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
2370
+ Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
2371
+ above) nor blocks the preview controls. */
2372
+ & > [data-preview-viewport] {
2373
+ position: absolute;
2374
+ inset: 0;
2375
+ pointer-events: none;
2376
+ z-index: 0;
2377
+ }
2378
+
2379
+ & > [data-preview-toggle] {
2380
+ position: absolute;
2381
+ top: 16px;
2382
+ left: 16px;
2383
+ z-index: 2;
2384
+ width: auto;
2385
+ height: auto;
2386
+ display: inline-flex;
2387
+ gap: 2px;
2388
+ padding: 3px;
2389
+ background: rgba(255, 255, 255, 0.92);
2390
+ border: 1px solid ${b.line};
2391
+ border-radius: 999px;
2392
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
2393
+
2394
+ /* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
2395
+ container carries no fill, gap or padding of its own there. */
2396
+ ${de.maxWidth("lg")} {
2397
+ top: auto;
2398
+ left: auto;
2399
+ right: 16px;
2400
+ bottom: 16px;
2401
+ gap: 0;
2402
+ padding: 0;
2403
+ background: none;
2404
+ border: 0;
2405
+ box-shadow: none;
2406
+ overflow: hidden;
2407
+ }
2408
+ }
2409
+
2410
+ & > [data-preview-note] {
2411
+ position: absolute;
2412
+ bottom: 14px;
2413
+ left: 50%;
2414
+ transform: translateX(-50%);
2415
+ z-index: 2;
2416
+ width: auto;
2417
+ height: auto;
2418
+ max-width: 88%;
2419
+ margin: 0;
2420
+ text-align: center;
2421
+ background: rgba(22, 21, 24, 0.78);
2422
+ color: ${b.white};
2423
+ font-size: 12px;
2424
+ font-weight: 500;
2425
+ padding: 6px 12px;
2426
+ border-radius: 999px;
2427
+ }
2428
+
2429
+ & > [data-preview-loading] {
2430
+ position: absolute;
2431
+ inset: 0;
2432
+ z-index: 1;
2433
+ display: flex;
2434
+ align-items: center;
2435
+ justify-content: center;
2436
+ width: 100%;
2437
+ height: 100%;
2438
+ background: transparent;
2439
+ }
2440
+
2441
+ & > [data-fav-preview] {
2442
+ display: none;
2443
+ }
2444
+
2445
+ /* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
2446
+ wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
2447
+ & > [data-play-showcase] {
2448
+ position: absolute;
2449
+ bottom: 16px;
2450
+ left: 16px;
2451
+ z-index: 2;
2452
+ width: auto;
2453
+ height: auto;
2454
+ }
2455
+
2456
+ ${de.maxWidth("lg")} {
2457
+ & > [data-preview-toggle] {
2458
+ top: auto;
2459
+ left: auto;
2460
+ bottom: 12px;
2461
+ right: 12px;
2462
+ gap: 0;
2463
+ padding: 0;
2464
+ background: transparent;
2465
+ border: 0;
2466
+ box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
2467
+ overflow: hidden;
2468
+ }
2469
+ & > [data-fav-preview] {
2470
+ display: inline-flex;
2471
+ position: absolute;
2472
+ top: 12px;
2473
+ right: 12px;
2474
+ z-index: 3;
2475
+ width: auto;
2476
+ min-width: 40px;
2477
+ height: 40px;
2478
+ background: rgba(255, 255, 255, 0.92);
2479
+ box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
2480
+ }
2481
+ & > [data-fav-preview]:hover {
2482
+ background: ${b.white};
2483
+ }
2484
+ }
2485
+ `,nh=r.div``,ih=r.span`
2486
+ position: absolute;
2487
+ inset: 0;
2488
+ width: 100%;
2489
+ height: 100%;
2490
+ border-radius: inherit;
2491
+ `,rh=r.div`
2492
+ display: flex;
2493
+ flex-direction: column;
2494
+ gap: 0;
2495
+ `,ah=r.div`
2496
+ display: flex;
2497
+ align-items: flex-start;
2498
+ justify-content: space-between;
2499
+ gap: 12px;
2500
+
2501
+ ${de.maxWidth("lg")} {
2502
+ order: 0;
2503
+ }
2504
+ `,sh=r.h1`
2505
+ font-size: 28px;
2506
+ font-weight: 600;
2507
+ line-height: 34px;
2508
+ color: ${b.softWhite};
2509
+
2510
+ ${de.maxWidth("lg")} {
2511
+ font-size: 20px;
2512
+ line-height: 24px;
2513
+ }
2514
+ `,kr=r.button`
2515
+ flex: none;
2516
+ min-width: 40px;
2517
+ height: 40px;
2518
+ padding: 0;
2519
+ border-radius: ${Ge.pill};
2520
+ border: 0;
2521
+ background: rgba(255, 255, 255, 0.16);
2522
+ display: inline-flex;
2523
+ align-items: center;
2524
+ justify-content: center;
2525
+ gap: 6px;
2526
+ color: ${b.softWhite};
2527
+ cursor: pointer;
2528
+ transition:
2529
+ color 0.12s ease,
2530
+ background 0.12s ease;
2531
+
2532
+ &[data-count] {
2533
+ padding: 0 14px 0 12px;
2534
+ }
2535
+ &:hover {
2536
+ background: rgba(255, 255, 255, 0.28);
2537
+ }
2538
+ &[data-on] {
2539
+ color: ${b.dclRed};
2540
+ }
2541
+
2542
+ ${de.maxWidth("lg")} {
2543
+ color: ${b.text};
2544
+ &[data-fav-title] {
2545
+ display: none;
2546
+ }
2547
+ }
2548
+ `,$r=r.span`
2549
+ font-size: 13px;
2550
+ font-weight: 600;
2551
+ line-height: 1;
2552
+ color: ${b.softWhite};
2553
+
2554
+ ${de.maxWidth("lg")} {
2555
+ color: ${b.text};
2556
+ }
2557
+ `,oh=r.button`
2558
+ display: inline-flex;
2559
+ align-items: center;
2560
+ gap: 8px;
2561
+ padding: 8px 14px;
2562
+ border: 1px solid ${b.line};
2563
+ border-radius: ${Ge.pill};
2564
+ background: rgba(255, 255, 255, 0.94);
2565
+ backdrop-filter: blur(6px);
2566
+ box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
2567
+ color: ${b.text};
2568
+ font-size: 13px;
2569
+ font-weight: 600;
2570
+ cursor: pointer;
2571
+ transition: background 0.12s ease;
2572
+
2573
+ &:hover {
2574
+ background: ${b.white};
2575
+ }
2576
+ &:focus-visible {
2577
+ outline: 2px solid ${b.accent};
2578
+ outline-offset: 2px;
2579
+ }
2580
+ `,ht=r.div`
2581
+ display: inline-flex;
2582
+ align-items: center;
2583
+ gap: 5px;
2584
+ font-size: 12px;
2585
+ font-weight: 500;
2586
+ text-transform: uppercase;
2587
+ letter-spacing: 0;
2588
+ color: ${b.gray4};
2589
+ `,lh=r.div`
2590
+ display: flex;
2591
+ align-items: center;
2592
+ gap: 8px;
2593
+ flex-wrap: wrap;
2594
+ margin-top: 12px;
2595
+
2596
+ ${de.maxWidth("lg")} {
2597
+ order: 1;
2598
+ margin-top: 10px;
2599
+ }
2600
+ `,Be=r(Gr)`
2601
+ height: 24px;
2602
+ padding: 0 8px;
2603
+ gap: 3px;
2604
+ font-size: 13px;
2605
+ font-weight: 500;
2606
+ border-radius: 4px;
2607
+ letter-spacing: 0.02em;
2608
+ text-transform: uppercase;
2609
+ background: rgba(255, 255, 255, 0.14);
2610
+ color: ${b.softWhite};
2611
+
2612
+ & .ico {
2613
+ color: ${b.softWhite};
2614
+ }
2615
+ &[data-variant='cat'] {
2616
+ background: rgba(255, 255, 255, 0.14);
2617
+ color: ${b.softWhite};
2618
+ }
2619
+
2620
+ /* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
2621
+ #ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
2622
+ one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
2623
+ &[data-variant='blocked'] {
2624
+ background: rgba(255, 116, 57, 0.2);
2625
+ color: #ff7439;
2626
+ cursor: help;
2627
+ }
2628
+ &[data-variant='blocked']:focus-visible {
2629
+ outline: 2px solid #ff7439;
2630
+ outline-offset: 2px;
2631
+ }
2632
+ `,Qt=r(Be.withComponent(qr))`
2633
+ text-decoration: none;
2634
+ cursor: pointer;
2635
+ transition: background 0.15s ease;
2636
+
2637
+ &:hover,
2638
+ &:focus-visible {
2639
+ background: rgba(255, 255, 255, 0.26);
2640
+ }
2641
+
2642
+ /* The rarity chip carries its own colour inline, so a background hover would be overridden and the
2643
+ chip would look inert. It gets a ring instead, which reads on any fill. */
2644
+ &[data-variant='rarity']:hover,
2645
+ &[data-variant='rarity']:focus-visible {
2646
+ box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
2647
+ }
2648
+ `,dh=r.div`
2649
+ display: flex;
2650
+ flex-direction: column;
2651
+ align-items: flex-start;
2652
+ gap: 8px;
2653
+ `,Nn=r(dh)`
2654
+ gap: 11px;
2655
+ `,Cr=r.p`
2656
+ margin: 0;
2657
+ color: ${b.softWhite};
2658
+ font-size: 14px;
2659
+ line-height: 30px;
2660
+ display: -webkit-box;
2661
+ -webkit-box-orient: vertical;
2662
+ -webkit-line-clamp: 4;
2663
+ overflow: hidden;
2664
+
2665
+ &[data-expanded] {
2666
+ -webkit-line-clamp: unset;
2667
+ overflow: visible;
2668
+ }
2669
+ `,ch=r.button`
2670
+ font-size: 13px;
2671
+ align-self: flex-start;
2672
+ `,La=gt`
2673
+ display: grid;
2674
+ grid-template-columns: 1fr 1fr;
2675
+ gap: 16px;
2676
+ `,Pa=r.div`
2677
+ ${La};
2678
+ /* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
2679
+ description belongs to the heading block it follows, the creator/collection pair is a new subject. */
2680
+ margin-top: 24px;
2681
+
2682
+ ${de.maxWidth("lg")} {
2683
+ order: 3;
2684
+ grid-template-columns: 1fr;
2685
+ /* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
2686
+ gap: 20px;
2687
+ margin-top: 20px;
2688
+ }
2689
+ `,Bn=r.div`
2690
+ min-width: 0;
2691
+ `,Ea=r.div`
2692
+ ${La};
2693
+ margin-top: 32px;
2694
+
2695
+ ${de.maxWidth("lg")} {
2696
+ order: 2;
2697
+ margin-top: 20px;
2698
+ }
2699
+ `,St=r.div`
2700
+ display: flex;
2701
+ flex-direction: column;
2702
+ gap: 15px;
2703
+ min-width: 0;
2704
+
2705
+ &[data-collection] {
2706
+ align-items: flex-start;
2707
+ }
2708
+ `,Fa=gt`
2709
+ &[data-testid='creator'] {
2710
+ color: ${b.softWhite};
2711
+ font-size: 14px;
2712
+ gap: 12px;
2713
+ }
2714
+ [data-avatar] {
2715
+ width: 48px;
2716
+ height: 48px;
2717
+ }
2718
+ [data-letter] {
2719
+ font-size: 18px;
2720
+ }
2721
+ [data-testid='creator-name'] {
2722
+ color: ${b.softWhite};
2723
+ font-weight: 500;
2724
+ text-decoration: underline;
2725
+ }
2726
+ &[data-link]:hover [data-testid='creator-name'] {
2727
+ color: ${b.gray4};
2728
+ }
2729
+ `,uh=r(Ws)`
2730
+ ${Fa}
2731
+ `,ph=r(Up)`
2732
+ ${Fa}
2733
+ `,Ta=r.hr`
2734
+ border: 0;
2735
+ border-top: 1px solid rgba(255, 255, 255, 0.3);
2736
+ margin: 24px 0 0;
2737
+ width: 100%;
2738
+
2739
+ /* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
2740
+ so it closes the price rather than separating it from the description. */
2741
+ ${de.maxWidth("lg")} {
2742
+ order: 5;
2743
+ margin-top: 16px;
2744
+ }
2745
+ `,hh=r(Ds)`
2746
+ margin-bottom: 12px;
2747
+ `,xh=r.div`
2748
+ margin-top: 16px;
2749
+ /* The design's Pricing frame stacks its rows 16px apart; without it the stock scale sat against the
2750
+ underside of the price and read as part of it. */
2751
+ display: flex;
2752
+ flex-direction: column;
2753
+ gap: 16px;
2754
+
2755
+ ${de.maxWidth("lg")} {
2756
+ order: 4;
2757
+ margin-top: 16px;
2758
+ }
2759
+ `,fh=r.div`
2760
+ display: flex;
2761
+ align-items: flex-start;
2762
+ gap: 16px;
2763
+ width: 100%;
2764
+ `,mh=r.div`
2765
+ flex: 1 1 auto;
2766
+ min-width: 0;
2767
+ display: flex;
2768
+ flex-direction: column;
2769
+ gap: 8px;
2770
+ `,Ir=r.div`
2771
+ flex: 0 0 auto;
2772
+ display: flex;
2773
+ flex-direction: column;
2774
+ align-items: flex-end;
2775
+ gap: 8px;
2776
+ text-align: right;
2777
+ `,An=r.div`
2778
+ font-size: 18px;
2779
+ font-weight: 500;
2780
+ line-height: 1;
2781
+ color: ${b.softWhite};
2782
+
2783
+ &[data-out] {
2784
+ font-size: 14px;
2785
+ font-weight: 600;
2786
+ text-transform: uppercase;
2787
+ letter-spacing: 0.02em;
2788
+ color: ${b.gray4};
2789
+ }
2790
+ `,Mn=r.div`
2791
+ font-size: 14px;
2792
+ font-weight: 600;
2793
+ text-transform: uppercase;
2794
+ letter-spacing: 0;
2795
+ color: ${b.muted2};
2796
+ `,Ct=r.div`
2797
+ display: flex;
2798
+ align-items: center;
2799
+ gap: 8px;
2800
+ font-weight: 700;
2801
+ color: ${b.softWhite};
2802
+
2803
+ /* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
2804
+ &[data-variant='none'] {
2805
+ display: inline-flex;
2806
+ align-items: center;
2807
+ gap: 6px;
2808
+ font-size: 14px;
2809
+ font-weight: 600;
2810
+ color: ${b.softWhite};
2811
+ }
2812
+ /*
2813
+ * White, not red. The tag above the title is what announces the discount; painting the number red too
2814
+ * said it a second time and left the price itself the least legible thing in its own row.
2815
+ */
2816
+ &[data-variant='sale'] {
2817
+ flex-wrap: wrap;
2818
+ gap: 4px 8px;
2819
+ color: ${b.white};
2820
+ }
2821
+ `;r.span`
2822
+ display: flex;
2823
+ align-items: center;
2824
+ gap: 10px;
2825
+ font-weight: 700;
2826
+ color: ${b.dclRed};
2827
+ `;const It=r.span`
2828
+ font-size: 30px;
2829
+ line-height: 1;
2830
+ `,gh=r.span`
2831
+ display: inline-flex;
2832
+ color: ${b.muted2};
2833
+ cursor: help;
2834
+
2835
+ &:focus-visible {
2836
+ outline: 2px solid ${b.accent};
2837
+ outline-offset: 2px;
2838
+ border-radius: ${Ge.chip};
2839
+ }
2840
+ `,bh=r.span`
2841
+ font-size: 24px;
2842
+ font-weight: 700;
2843
+ color: ${b.softWhite};
2844
+ margin-right: -2px;
2845
+ `,yh=r.div`
2846
+ font-size: 13px;
2847
+ margin-top: 6px;
2848
+ color: ${b.gray4};
2849
+ `;r.div`
2850
+ flex-basis: 100%;
2851
+ display: flex;
2852
+ align-items: center;
2853
+ flex-wrap: wrap;
2854
+ gap: 8px 12px;
2855
+ `;const wh=r.div`
2856
+ font-size: 13px;
2857
+ font-weight: 600;
2858
+ color: ${b.dclRed};
2859
+ `,vh=r.span`
2860
+ display: inline-flex;
2861
+ align-items: center;
2862
+ color: ${b.muted2};
2863
+ text-decoration: line-through;
2864
+ font-weight: 400;
2865
+ font-size: 20px;
2866
+ `;r.span`
2867
+ display: inline-flex;
2868
+ align-items: center;
2869
+ background: ${b.dclRed};
2870
+ color: ${b.white};
2871
+ font-weight: 800;
2872
+ font-size: 13px;
2873
+ letter-spacing: 0.03em;
2874
+ text-transform: uppercase;
2875
+ border-radius: 6px;
2876
+ padding: 4px 10px;
2877
+ `;r(To)`
2878
+ display: inline-flex;
2879
+ align-items: center;
2880
+ gap: 5px;
2881
+ background: ${b.rarityBg};
2882
+ color: ${b.accent};
2883
+ font-size: 13px;
2884
+ font-weight: 700;
2885
+ border-radius: 6px;
2886
+ padding: 4px 10px;
2887
+ white-space: nowrap;
2888
+ `;const jh=r.div`
2889
+ display: flex;
2890
+ flex-direction: column;
2891
+ gap: 12px;
2892
+ margin-top: 20px;
2893
+
2894
+ ${de.maxWidth("lg")} {
2895
+ order: 6;
2896
+
2897
+ &[data-buttons] {
2898
+ position: fixed;
2899
+ left: 0;
2900
+ right: 0;
2901
+ bottom: 0;
2902
+ z-index: 40;
2903
+ margin-top: 0;
2904
+ padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
2905
+ background: #2b0e44;
2906
+ box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
2907
+ }
2908
+ &[data-dual] {
2909
+ flex-direction: row;
2910
+ align-items: stretch;
2911
+ gap: 12px;
2912
+ }
2913
+ }
2914
+ `,en=gt`
2915
+ && {
2916
+ width: 100%;
2917
+ height: 48px;
2918
+ border-radius: 16px;
2919
+ padding: 0 12px;
2920
+ display: flex;
2921
+ align-items: center;
2922
+ justify-content: center;
2923
+ gap: 8px;
2924
+ font-size: 15px;
2925
+ font-weight: 600;
2926
+ line-height: 24px;
2927
+ letter-spacing: 0.46px;
2928
+ text-transform: uppercase;
2929
+ }
2930
+ `,Rn=r(Ve)`
2931
+ ${en};
2932
+ /* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
2933
+ cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
2934
+ sampled off the flattened render rather than the node's fill. */
2935
+ && {
2936
+ background: ${Vp.buyBtn};
2937
+ }
2938
+ &&::before {
2939
+ content: none;
2940
+ }
2941
+ &&:hover:not(:disabled) {
2942
+ background-image: linear-gradient(${b.dclRed}, ${b.dclRed});
2943
+ }
2944
+
2945
+ ${de.maxWidth("lg")} {
2946
+ [data-dual] && {
2947
+ flex: 1 1 auto;
2948
+ width: auto;
2949
+ }
2950
+ }
2951
+ `,kh=r(Ve)`
2952
+ ${en};
2953
+ && {
2954
+ background: ${b.blackBtn};
2955
+ color: ${b.softWhite};
2956
+ border: 0;
2957
+
2958
+ .ico {
2959
+ width: 20px;
2960
+ height: 20px;
2961
+ }
2962
+ }
2963
+ &&:hover:not(:disabled) {
2964
+ background: ${b.blackBtn};
2965
+ filter: brightness(1.35);
2966
+ }
2967
+ `,Sr=r.button`
2968
+ align-self: center;
2969
+ border: 0;
2970
+ background: none;
2971
+ padding: 8px 0;
2972
+ color: ${i.colors.accent};
2973
+ font-weight: 600;
2974
+ font-size: 13px;
2975
+ line-height: 24px;
2976
+ letter-spacing: 0.46px;
2977
+ text-transform: uppercase;
2978
+ text-decoration: underline;
2979
+ cursor: pointer;
2980
+
2981
+ /* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
2982
+ but invisible against it. Not a change to the shared colour: the other uses live inside
2983
+ GaslessNotice, whose light fill is what that accent was picked for. */
2984
+ &[data-on-purple] {
2985
+ color: ${i.colors.white};
2986
+ }
2987
+
2988
+ &:disabled {
2989
+ opacity: 0.5;
2990
+ cursor: default;
2991
+ }
2992
+ `,$h=r(Ve)`
2993
+ ${en};
2994
+ && {
2995
+ background: rgba(255, 255, 255, 0.2);
2996
+ color: ${b.softWhite};
2997
+ border: 0;
2998
+
2999
+ .ico {
3000
+ width: 20px;
3001
+ height: 20px;
3002
+ }
3003
+ }
3004
+ &&:hover:not(:disabled) {
3005
+ background: rgba(255, 255, 255, 0.3);
3006
+ }
3007
+ &&:disabled {
3008
+ opacity: 0.5;
3009
+ }
3010
+ `,Ar=r(Ve)`
3011
+ ${en};
3012
+ && {
3013
+ background: rgba(0, 0, 0, 0.4);
3014
+ color: ${b.white};
3015
+ border: 0;
3016
+ }
3017
+ &&:hover:not(:disabled) {
3018
+ background: rgba(0, 0, 0, 0.55);
3019
+ }
3020
+ &&:disabled {
3021
+ opacity: 0.5;
3022
+ }
3023
+ `,Ln=r.span`
3024
+ display: none;
3025
+ align-items: center;
3026
+ gap: 6px;
3027
+
3028
+ ${de.maxWidth("lg")} {
3029
+ [data-dual] & {
3030
+ display: inline-flex;
3031
+ }
3032
+ }
3033
+ `,Mr=r.button`
3034
+ width: 100%;
3035
+ height: 48px;
3036
+ display: flex;
3037
+ align-items: center;
3038
+ justify-content: center;
3039
+ gap: 8px;
3040
+ /* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
3041
+ treatment as the card's ADD TO CART. */
3042
+ background: rgba(255, 255, 255, 0.2);
3043
+ color: ${b.softWhite};
3044
+ border: 0;
3045
+ border-radius: 16px;
3046
+ font-weight: 600;
3047
+ font-size: 15px;
3048
+ text-transform: uppercase;
3049
+ letter-spacing: 0.46px;
3050
+ cursor: pointer;
3051
+ transition: background 0.15s ease;
3052
+
3053
+ &:hover:not(:disabled) {
3054
+ background: ${b.softWhite};
3055
+ color: ${b.text2};
3056
+ }
3057
+ &:disabled {
3058
+ background: rgba(255, 255, 255, 0.12);
3059
+ color: rgba(252, 252, 252, 0.7);
3060
+ cursor: default;
3061
+ }
3062
+
3063
+ ${de.maxWidth("lg")} {
3064
+ [data-dual] & {
3065
+ flex: 0 0 auto;
3066
+ width: 56px;
3067
+ padding: 0;
3068
+ }
3069
+ [data-dual] & .ico {
3070
+ margin: 0;
3071
+ }
3072
+ }
3073
+ `,Rr=r.span`
3074
+ ${de.maxWidth("lg")} {
3075
+ [data-dual] & {
3076
+ display: none;
3077
+ }
3078
+ }
3079
+ `,Ch=r.p`
3080
+ margin: 12px 0 0;
3081
+ font-size: 13px;
3082
+ color: ${b.gray4};
3083
+
3084
+ & a {
3085
+ color: ${b.softWhite};
3086
+ font-weight: 600;
3087
+ }
3088
+ `;r.p`
3089
+ margin: 4px 0 0;
3090
+ font-size: 13px;
3091
+ color: ${b.gray4};
3092
+
3093
+ & a {
3094
+ color: ${b.accent};
3095
+ font-weight: 600;
3096
+ }
3097
+ `;const Ih=r.div`
3098
+ max-width: 1721px;
3099
+ margin: 0 auto;
3100
+ min-height: 46vh;
3101
+ display: flex;
3102
+ flex-direction: column;
3103
+ align-items: center;
3104
+ justify-content: center;
3105
+ text-align: center;
3106
+ gap: 14px;
3107
+ color: ${b.softWhite};
3108
+ `,Sh=r.p`
3109
+ margin: 0;
3110
+ color: ${b.gray4};
3111
+ `,Ah=r(Ve)`
3112
+ margin-top: 6px;
3113
+ `,Mh=r(L)`
3114
+ opacity: 0.4;
3115
+ `,Rh=r.h1`
3116
+ font-size: 22px;
3117
+ `,Lh=r.div`
3118
+ display: flex;
3119
+ flex-direction: column;
3120
+ `,Lr=r.span`
3121
+ display: block;
3122
+ height: 15px;
3123
+ width: 84px;
3124
+ border-radius: 4px;
3125
+ `,Ph=r.div`
3126
+ display: flex;
3127
+ flex-direction: column;
3128
+ align-self: stretch;
3129
+ gap: 16px;
3130
+ padding: 8px 0;
3131
+ `,Eh=r.span`
3132
+ display: inline-flex;
3133
+ align-items: center;
3134
+ height: 48px;
3135
+ gap: 10px;
3136
+ background: none !important;
3137
+
3138
+ &::before,
3139
+ &::after {
3140
+ content: '';
3141
+ display: block;
3142
+ }
3143
+ &::before {
3144
+ width: 40px;
3145
+ height: 40px;
3146
+ border-radius: 50%;
3147
+ background: ${b.media};
3148
+ }
3149
+ &::after {
3150
+ width: 96px;
3151
+ height: 14px;
3152
+ border-radius: 6px;
3153
+ background: ${b.media};
3154
+ }
3155
+ `,Fh=r.span`
3156
+ height: 34px;
3157
+ width: 70%;
3158
+ margin: 3px 0;
3159
+ border-radius: 8px;
3160
+ `,Th=r.div`
3161
+ display: flex;
3162
+ gap: 8px;
3163
+ /* Same as Chips above, so the row does not move when the real chips arrive. */
3164
+ margin-top: 12px;
3165
+ `,Pn=r.span`
3166
+ height: 24px;
3167
+ width: 88px;
3168
+ border-radius: 6px;
3169
+ `,En=r.span`
3170
+ height: 14px;
3171
+ width: 100%;
3172
+ border-radius: 6px;
3173
+
3174
+ &[data-short] {
3175
+ width: 55%;
3176
+ }
3177
+ `,zh=r.span`
3178
+ display: block;
3179
+ height: 30px;
3180
+ width: 40%;
3181
+ margin: 16px 0 13px;
3182
+ border-radius: 8px;
3183
+ `,Nh=r.span`
3184
+ display: block;
3185
+ height: 42px;
3186
+ width: 100%;
3187
+ border-radius: 8px;
3188
+ margin-top: 20px;
3189
+ `,Vt=r(Re)`
3190
+ width: 30px;
3191
+ height: 30px;
3192
+ color: ${b.softWhite};
3193
+
3194
+ &[data-was] {
3195
+ width: 20px;
3196
+ height: 20px;
3197
+ color: ${b.gray4};
3198
+ }
3199
+ `,Fn=r(Re)`
3200
+ width: 20px;
3201
+ height: 20px;
3202
+ `,Bh=r.div`
3203
+ display: flex;
3204
+ align-items: center;
3205
+ justify-content: space-between;
3206
+ gap: 8px;
3207
+ padding: 8px;
3208
+ margin: 16px 0;
3209
+ border-radius: ${Ge.btn};
3210
+ background: rgba(22, 21, 24, 0.55);
3211
+ `,_h=r.span`
3212
+ display: flex;
3213
+ align-items: center;
3214
+ gap: 8px;
3215
+ font-size: 14px;
3216
+ line-height: 14px;
3217
+ color: ${b.softWhite};
3218
+ `,Dh=r(L)`
3219
+ width: 20px;
3220
+ height: 20px;
3221
+ color: ${b.softWhite};
3222
+ `,Wh=r(L)`
3223
+ width: 24px;
3224
+ height: 24px;
3225
+ color: ${b.white};
3226
+ `,qh=r.div`
3227
+ display: flex;
3228
+ align-items: center;
3229
+ justify-content: space-between;
3230
+ gap: 8px;
3231
+ width: 100%;
3232
+ margin-top: 16px;
3233
+
3234
+ &[data-centered] {
3235
+ justify-content: center;
3236
+ }
3237
+ `,Oh=r.span`
3238
+ display: flex;
3239
+ align-items: center;
3240
+ gap: 2px;
3241
+ font-size: 14px;
3242
+ font-weight: 600;
3243
+ color: ${b.gray4};
3244
+
3245
+ & .ico {
3246
+ width: 20px;
3247
+ height: 20px;
3248
+ color: ${b.gray4};
3249
+ }
3250
+ `,Kh=r.span`
3251
+ font-size: 16px;
3252
+ font-weight: 700;
3253
+ padding-left: 2px;
3254
+ `,_n=r.button`
3255
+ border: 0;
3256
+ background: none;
3257
+ padding: 0;
3258
+ cursor: pointer;
3259
+ font-family: ${Qp.sans};
3260
+ font-size: 13px;
3261
+ font-weight: 600;
3262
+ letter-spacing: 0.46px;
3263
+ text-transform: uppercase;
3264
+ text-decoration: underline;
3265
+ color: ${b.softWhite};
3266
+
3267
+ &:hover {
3268
+ color: ${b.gray4};
3269
+ }
3270
+ &:focus-visible {
3271
+ outline: 2px solid ${b.white};
3272
+ outline-offset: 2px;
3273
+ border-radius: ${Ge.chip};
3274
+ }
3275
+ `,Hh=r(_n)`
3276
+ width: 100%;
3277
+ height: 40px;
3278
+ text-align: center;
3279
+ border-radius: ${Ge.card};
3280
+
3281
+ /* Hover is a translucent fill with the label left alone (Figma 868:67246), not the colour shift
3282
+ ResellersLink uses. That one is an inline link sitting beside a price, where dimming the text is the
3283
+ only surface there is; this is a full-width button, so the button itself is what should react. */
3284
+ &:hover {
3285
+ color: ${b.softWhite};
3286
+ background: ${b.glass};
3287
+ }
3288
+ `,Uh=r.div`
3289
+ display: flex;
3290
+ flex-direction: column;
3291
+ gap: 16px;
3292
+ width: 100%;
3293
+ padding: 16px 0;
3294
+ `,Pr=r.div`
3295
+ display: flex;
3296
+ align-items: center;
3297
+ justify-content: space-between;
3298
+ gap: 8px;
3299
+ width: 100%;
3300
+
3301
+ &[data-variant='original'] {
3302
+ color: ${b.muted2};
3303
+ }
3304
+ `,Er=r.span`
3305
+ display: flex;
3306
+ align-items: center;
3307
+ gap: 4px;
3308
+ font-size: 14px;
3309
+ font-weight: 600;
3310
+
3311
+ [data-variant='original'] & {
3312
+ color: ${b.muted2};
3313
+ }
3314
+ [data-variant='resale'] & {
3315
+ color: ${b.text};
3316
+ }
3317
+ `,Fr=r.span`
3318
+ display: flex;
3319
+ align-items: center;
3320
+ gap: 2px;
3321
+ padding: 0 2px;
3322
+
3323
+ [data-variant='original'] & .ico {
3324
+ width: 20px;
3325
+ height: 20px;
3326
+ color: ${b.muted2};
3327
+ }
3328
+ [data-variant='resale'] & .ico {
3329
+ width: 24px;
3330
+ height: 24px;
3331
+ color: ${b.rarity};
3332
+ }
3333
+ `,Tr=r.span`
3334
+ [data-variant='original'] & {
3335
+ font-size: 16px;
3336
+ font-weight: 700;
3337
+ text-decoration: line-through;
3338
+ }
3339
+ [data-variant='resale'] & {
3340
+ font-size: 25px;
3341
+ font-weight: 700;
3342
+ color: ${b.text};
3343
+ }
3344
+ `,Qh=r.span`
3345
+ font-size: 14px;
3346
+ font-weight: 600;
3347
+
3348
+ [data-variant='original'] & {
3349
+ color: ${b.muted2};
3350
+ }
3351
+ `,Vh=r.span`
3352
+ font-size: 14px;
3353
+ font-weight: 600;
3354
+ color: ${b.text2};
3355
+ `,zr=r.span`
3356
+ display: inline-flex;
3357
+ width: 12px;
3358
+ height: 12px;
3359
+ color: ${b.muted2};
3360
+ `,Gh=r.div`
3361
+ display: flex;
3362
+ flex-direction: column;
3363
+ gap: 12px;
3364
+ width: 100%;
3365
+ `,Yh=r.div`
3366
+ display: flex;
3367
+ justify-content: center;
3368
+ `,tn=gt`
3369
+ display: block;
3370
+ background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
3371
+ background-size: 200% 100%;
3372
+ animation: shimmer 1.4s infinite linear;
3373
+
3374
+ @media (prefers-reduced-motion: reduce) {
3375
+ animation: none;
3376
+ }
3377
+ `,Jh=r.div`
3378
+ display: flex;
3379
+ flex-direction: column;
3380
+ gap: 12px;
3381
+ width: 100%;
3382
+ /* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
3383
+ padding-top: 4px;
3384
+ `,Xh=r.span`
3385
+ ${tn};
3386
+ width: 120px;
3387
+ height: 30px;
3388
+ border-radius: ${Ge.btn};
3389
+ margin-bottom: 4px;
3390
+ `,Nr=r.span`
3391
+ ${tn};
3392
+ width: 100%;
3393
+ height: 48px;
3394
+ border-radius: 16px;
3395
+ `,Br=r.div`
3396
+ display: flex;
3397
+ align-items: center;
3398
+ gap: 12px;
3399
+ `,_r=r.span`
3400
+ ${tn};
3401
+ flex: none;
3402
+ width: 48px;
3403
+ height: 48px;
3404
+ border-radius: 50%;
3405
+ `,Dr=r.span`
3406
+ ${tn};
3407
+ width: 96px;
3408
+ height: 16px;
3409
+ border-radius: 6px;
3410
+ `;function Zh(t){return Object.values(Ae.Rarity).includes(t)}function ex(t){return t==="male"?n("itemDetail.genderMale"):t==="female"?n("itemDetail.genderFemale"):t==="unisex"?n("itemDetail.genderUnisex"):null}function Gt(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?n("itemDetail.categoryEmote"):n("itemDetail.categoryWearable")}const Wr=8;function Ex(){const{pathname:t}=Or();return e.jsx(tx,{},t)}function tx(){var Ii,Si,Ai;const{contractAddress:t,itemId:s,tokenId:l}=Za(),o=hn(t),d=Iu(o),u=hn(s),x=hn(l),f=!!x,m=u??nd(x)??null,$=Or(),h=$.state,g=st(),y=!!(h!=null&&h.market),k=(h==null?void 0:h.marketPriceCredits)??null,I=ot(),C=At(p=>p.add),S=Co(p=>p.spent),W=At(p=>p.items),M=qs(p=>p.toggle),{session:w,signIn:U}=at(),[a,K]=c.useState(()=>{if(h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};return f?{...p,tokenId:x,itemId:p.itemId??m}:{...p,tokenId:void 0,itemId:u??p.itemId}}return{id:`${o}-${x??u}`,name:"",creator:"",contractAddress:o??"",itemId:m,category:"wearable",rarity:"common",network:"MATIC",chainId:rt.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:x??void 0,tradeId:h==null?void 0:h.tradeId}}),[J,A]=c.useState(!1),[T,X]=c.useState(!!(h!=null&&h.resumeBuy));c.useEffect(()=>{h!=null&&h.resumeBuy&&A(!0)},[h==null?void 0:h.resumeBuy]);function V(){const p=a.priceCredits>0?a.priceCredits:null;Z("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:p,cart_value_usd:p===null?null:so(p)}),A(!0)}function oe(){if(w){V();return}y||Mo({type:"item-buy",path:$.pathname}),U()}const ce=c.useRef(!1);c.useEffect(()=>{if(!w||ce.current)return;const p=Io("item-buy");!p||p.path!==$.pathname||(ce.current=!0,X(!0),V())},[w]);const ie=c.useMemo(()=>a.contractAddress&&(a.itemId??m)?[`${a.contractAddress.toLowerCase()}-${a.itemId??m}`]:void 0,[a.contractAddress,a.itemId,m]),q=Os(Wr,{exclude:ie}),N=Ks({enabled:q.enabled,hasSignal:q.hasSignal,isLoading:q.isLoading,isError:q.isError,personalized:(Ii=q.result)==null?void 0:Ii.personalized,rowCount:((Si=q.result)==null?void 0:Si.data.length)??0}),{items:O,isCollectionOnly:v,siblings:re,siblingsFetched:R}=Cu({id:a.id,contractAddress:a.contractAddress,itemId:a.itemId??m,tokenId:a.tokenId,creator:a.creator}),{data:z,isLoading:B}=se({queryKey:["shop-item",a.contractAddress,m],enabled:!y&&!f&&!!a.contractAddress&&!!m,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>lo(a.contractAddress,m)}),H=f?void 0:z;c.useEffect(()=>{H&&K(p=>p.tradeId?{...p,tradeId:H.tradeId,priceCredits:H.priceCredits,manaWei:H.manaWei,available:H.available??p.available,acquisition:H.acquisition,wearableCategory:p.wearableCategory??H.wearableCategory}:{...p,...H})},[H]);const[ae,ve]=c.useState(!1),{data:ee=""}=se({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>co(a.contractAddress,a.itemId)}),{data:G,isLoading:te}=se({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>Vr(a.contractAddress)});c.useEffect(()=>{const p=(H==null?void 0:H.creator)||(G==null?void 0:G.creator);p&&K(le=>le.creator?le:{...le,creator:p})},[H,G]);const fe=c.useMemo(()=>{if(!(f||a.name||H||re.length===0))return(m?re.find(p=>p.itemId===m):void 0)??re.find(p=>p.contractAddress===a.contractAddress)},[f,a.name,a.contractAddress,H,re,m]);c.useEffect(()=>{fe&&K(p=>({...fe,tradeId:p.tradeId??fe.tradeId}))},[fe]);const{data:je,isLoading:ke}=se({queryKey:["detail-trade",a.id,a.tradeId,a.contractAddress,a.itemId],enabled:!!a.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(a.tradeId)return a.tradeId;if(!f&&a.itemId){const p=await uo(a.contractAddress,a.itemId);return(p==null?void 0:p.id)??null}return null}}),{data:Y}=se({queryKey:["item-traits",a.contractAddress,m],enabled:!!a.contractAddress&&!!m,staleTime:5*6e4,retry:1,queryFn:()=>po(a.contractAddress,m)}),lt=(Y==null?void 0:Y.isSmart)??a.isSmart,Le=(Y==null?void 0:Y.utility)??null,$e=c.useMemo(()=>({...a,wearableCategory:a.wearableCategory??(Y==null?void 0:Y.wearableCategory)??void 0,gender:a.gender??(Y==null?void 0:Y.gender)??null}),[a,Y==null?void 0:Y.wearableCategory,Y==null?void 0:Y.gender]),bt=(Y==null?void 0:Y.urn)??null,{data:Rt}=se({queryKey:["item-vrm",bt],enabled:!!bt&&a.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>ho(bt)}),[nn,Lt]=c.useState(!1),{data:yt}=se({queryKey:["item-video",a.contractAddress,m],enabled:lt&&!!a.contractAddress&&!!m,staleTime:30*6e4,retry:!1,queryFn:()=>No(a.contractAddress,m)}),Ce=c.useMemo(()=>a.emoteLoop!==void 0?a:(m?re.find(le=>le.itemId===m):void 0)??a,[a,re,m]),Pe=qi(I,a.tradeId)??qi(I,je),rn=a.acquisition==="store"&&(a.available??0)>0,ue=!!Pe||rn,dt=Hs(),{data:Ee=[]}=se({queryKey:["item-resales",a.contractAddress,a.itemId],enabled:dt&&!y&&!!a.contractAddress&&!!a.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Zr(a.contractAddress,a.itemId)}),Ke=Ee.length>0?Ee[0].priceCredits:null,Ye=f&&a.tokenId?Ee.find(p=>p.tokenId===a.tokenId)??null:null,Ie=c.useMemo(()=>{const p=Ee[0];return p?{...p,name:p.name||a.name,thumbnail:p.thumbnail||a.thumbnail,rarity:p.rarity||a.rarity,category:p.category||a.category,wearableCategory:p.wearableCategory??a.wearableCategory,gender:p.gender??a.gender}:null},[Ee,a]),[Pt,wt]=c.useState(null),[vt,Je]=c.useState(!1),[an,j]=c.useState(!1),[P,F]=c.useState(!1),E=a.manaWei??null,{data:Q}=Xr(y||!!E),ne=E&&Q?Us(E,Q):null;c.useEffect(()=>{ne!=null&&K(p=>p.priceCredits===ne?p:{...p,priceCredits:ne})},[ne,a.priceCredits]);const D=c.useMemo(()=>{if(!y||!(h!=null&&h.item))return null;const p=h.item;return p.manaWei?{tradeId:p.tradeId??p.id,listingType:"primary",contractAddress:p.contractAddress,itemId:p.itemId??"",name:p.name,thumbnail:p.thumbnail,rarity:p.rarity,category:p.category,wearableCategory:p.wearableCategory??null,creator:p.creator,manaWei:p.manaWei,available:1,network:p.network,chainId:p.chainId,createdAt:0}:null},[y,h==null?void 0:h.item]),xe=y&&k!=null&&!!Q&&!!D,We=Qs({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),ye=(()=>{var we,ut;if(!We)return null;const p=So(S,a.coupon),le=Number(((ut=(we=a.coupon)==null?void 0:we.checks)==null?void 0:ut.uses)??0);return le>0&&p<=le?{claimed:p,total:le}:null})(),Et=(()=>{if(!We||a.saleUnitsLeft==null)return null;const p=ye?ye.total-ye.claimed:1/0;return a.saleUnitsLeft<p?a.saleUnitsLeft:null})(),Fe=c.useMemo(()=>({...a,tradeId:Pe,id:Pe??a.id}),[a,Pe]),sn=W.some(p=>p.id===Fe.id),Ft=!Fe.tokenId,za=((Ai=W.find(p=>p.id===Fe.id))==null?void 0:Ai.quantity)??0,on=Ft&&typeof a.available=="number"&&za>=a.available,{key:Un,faved:Xe}=Vs(a),He=Gs(a),Na=Jr(p=>p.locale),Tt=He===void 0?null:He.toLocaleString(Na),Qn=Xe?n("assetCard.removeFromFavorites"):n("assetCard.addToFavorites"),Vn=He===void 0?Qn:n("itemDetail.favoriteAria",{action:Qn,count:He}),Gn=c.useRef(null);c.useEffect(()=>{!a.name||ke||Gn.current===a.id||(Gn.current=a.id,Z("Shop Viewed Item",{...Ys(a),for_sale:ue}),Js(a))},[a.id,a.name,ke,ue]);const zt=`${o}/${x??u}`,Yn=c.useRef(zt);c.useEffect(()=>{if(Yn.current!==zt){if(Yn.current=zt,h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};K(f?{...p,tokenId:x,itemId:p.itemId??m}:{...p,tokenId:void 0,itemId:u??p.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[zt]);function Ba(){!ue||ln||ke||!Ft&&sn||on||C(Fe,"item_detail")}const Ze=Zh(a.rarity)?a.rarity:Ae.Rarity.COMMON,Jn=ex($e.gender),Nt=Xs($e),Xn=Zs($e.gender),Zn=qp(a.rarity),ei=Op($e),ti=ue&&We,_a=v?n("itemDetail.moreFromCollection"):n("itemDetail.youMightAlsoLike"),ln=eo(a,w==null?void 0:w.address),[Da,ni]=c.useState(!1),[Wa,ii]=c.useState(!1),[qa,ri]=c.useState(!1),[Oa,ai]=c.useState(!1),[jt,kt]=c.useState(null),[Ka,si]=c.useState(!1),[oi,li]=c.useState(!1),di=Yt(w==null?void 0:w.providerType),{data:_,isLoading:Bt}=se({queryKey:["owned-token",a.contractAddress,a.tokenId,w==null?void 0:w.address],enabled:!y&&!!(w!=null&&w.address)&&!!a.contractAddress&&!!a.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>w?Pi(w.address,a.contractAddress,a.tokenId):null});c.useEffect(()=>{_&&K(p=>p.name?{...p,issuedId:p.issuedId??_.issuedId,priceCredits:_.listingPrice??0,tradeId:_.tradeId}:{id:_.id,name:_.name,creator:"",contractAddress:_.contractAddress,itemId:_.itemId,category:_.category,rarity:_.rarity??"common",network:_.network,chainId:_.chainId,thumbnail:_.image,priceCredits:_.listingPrice??0,gender:null,isSmart:!1,tokenId:_.tokenId,issuedId:_.issuedId,tradeId:_.tradeId})},[_]),c.useEffect(()=>{Ye&&K(p=>p.priceCredits===Ye.priceCredits&&p.tradeId?p:{...p,priceCredits:Ye.priceCredits,tradeId:p.tradeId??Ye.tradeId})},[Ye]),c.useEffect(()=>{jt!=null&&_!=null&&_.isOnSale&&_.listingPrice===jt&&kt(null)},[_,jt]);const ci=!y&&!!a.contractAddress&&!!a.tokenId&&!a.name&&!H&&!Bt&&!_,{data:he,isFetched:Ha}=se({queryKey:["public-token",a.contractAddress,a.tokenId],enabled:ci,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>xo(a.contractAddress,a.tokenId)});c.useEffect(()=>{he&&K(p=>p.name?p.issuedId?p:{...p,issuedId:he.issuedId}:{id:he.id,name:he.name,creator:"",contractAddress:he.contractAddress,itemId:he.itemId,category:he.category,rarity:he.rarity??"common",network:he.network,chainId:he.chainId,thumbnail:he.image,priceCredits:he.listingPrice??0,gender:null,isSmart:!1,tokenId:he.tokenId,issuedId:he.issuedId,tradeId:he.tradeId})},[he]);const{data:Te}=se({queryKey:["publishable-item",a.contractAddress,a.itemId,w==null?void 0:w.address],enabled:ln&&!!w&&!!a.itemId,queryFn:async()=>w?(await Bo(w.address,w.identity)).find(le=>le.contractAddress.toLowerCase()===a.contractAddress.toLowerCase()&&le.blockchainItemId===a.itemId)??null:null}),ze=f&&!!_,dn=!f&&ln,Ne=!y&&(dn||ze),ui=jt!=null?!0:ze?!!(_!=null&&_.isOnSale):ue,_t=ze?_==null?void 0:_.tradeId:Pe,pi=ze?!!_:!!Te,hi=dn||ze&&dt,cn=jt??(ze?(_==null?void 0:_.listingPrice)??0:0),{data:xi=0}=se({queryKey:["owned-item-count",a.contractAddress,u,w==null?void 0:w.address],enabled:!f&&!y&&!!(w!=null&&w.address)&&!!a.contractAddress&&!!u,staleTime:3e4,queryFn:()=>w?fo(w.address,a.contractAddress,u):0});async function et(){await Promise.all([I.invalidateQueries({queryKey:["owned-token",a.contractAddress,a.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",a.contractAddress,a.itemId]}),I.invalidateQueries({queryKey:["item-resales",a.contractAddress,a.itemId]})])}async function Ua(p){if(!w||!_t)throw new Error("No listing to take down");const le=await Yr(_t);await Po({trade:le,signer:w.signer,mode:p.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(ze){if(!a.tokenId)return!1;const we=await Pi(w.address,a.contractAddress,a.tokenId);return we!==null&&!we.isOnSale}return a.itemId?await oo(a.contractAddress,a.itemId)===null:!1}catch{return!1}},onWaiting:p.onWaiting}}),p.silent||Mt.success(n("myAssets.removedFromSale",{name:a.name})),kt(null),id(I,_t),K(we=>we.tradeId===_t?{...we,tradeId:void 0}:we),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"removed"})}const fi=p=>async({payGas:le,onWaiting:we})=>{try{return await Ua({silent:p,payGas:le,onWaiting:we}),"ok"}catch(ut){if(ut instanceof Lo)return ut.definitive?"relay-reverted":"relay-pending";throw ut}},mi={currentCredits:cn||a.priceCredits||void 0,canPayGas:di,cancelCurrent:fi(!0)};function gi({edit:p=!1}={}){p||Z("Shop Started Listing",{listing_type:ze?"secondary":"primary",item_id:a.itemId??a.tokenId??null}),li(p),ze?ni(!0):ii(!0)}function bi(){ni(!1),ii(!1),li(!1),et()}const yi=ue?ke?n("itemDetail.checking"):on?n("itemDetail.maxInCart"):!Ft&&sn?n("assetCard.inCart"):n("assetCard.addToCart"):n("itemDetail.notForSale"),$t=a.available??(Y==null?void 0:Y.available)??null,Qa=typeof $t=="number"&&$t>0&&!a.tokenId&&!y,wi=!y&&!a.tokenId&&$t===0,vi=a.network==="ETHEREUM",ct=wi&&!Ne&&!!Ie,Dt=!!Ie&&W.some(p=>p.id===Ie.id),Va=!Ne&&ue&&!y,Ga=y||!Ne&&(ue||ct&&!!Ie||Aa()),Ya=!a.name&&(!!H||!!_||!!he||!!fe),ji=B||!!a.contractAddress&&!R||!a.name&&Bt||Ya||ci&&!Ha,ki=!a.name&&!ji,Ja=!!a.name&&rd({isMarket:y,forSale:ue,priceKnown:a.priceCredits>0&&(!E||ne!=null)||Ne,stillResolving:ji||!!E&&ne==null,manage:Ne,soldOutWithResale:ct,resolvingTrade:ke,isTokenRoute:f,ownedAssetLoading:Bt,deepLinkLoading:B}),$i=!a.creator&&(B||te||Bt),Ci=!(G!=null&&G.name)&&te,Xa=/^https?:\/\//i.test(a.thumbnail);return to(ki?{title:n("seo.item.notFoundTitle"),noindex:!0}:a.name?{title:a.name,description:ee||n("seo.item.fallbackDescription",{name:a.name,rarity:a.rarity,category:Gt($e),creator:Wn(a.creator)}),image:Xa?a.thumbnail:void 0,type:"product"}:{}),ki?e.jsxs(Ih,{"data-notfound":!0,children:[e.jsx(Mh,{name:"cart"}),e.jsx(Rh,{children:n("itemDetail.notAvailableTitle")}),e.jsx(Sh,{children:n("itemDetail.notAvailableBody")}),e.jsx(Ah,{variant:"white",onClick:()=>g("/items"),children:n("notFound.cta")})]}):e.jsxs(Gp,{children:[e.jsxs(Yp,{"aria-label":n("itemDetail.breadcrumbAria"),children:[e.jsx(Jp,{onClick:()=>g("/items"),children:n("nav.collectibles")}),e.jsx(Xp,{children:"/"}),e.jsx(Zp,{children:a.name||n("itemDetail.itemFallback")})]}),e.jsxs(eh,{style:{"--glow-rgb":ro(Ze),"--glow-core":io(Ze)},children:[e.jsxs(th,{"data-testid":"item-preview",children:[a.name?e.jsx(Pu,{item:a}):e.jsx(nh,{"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(ih,{className:"skeleton","aria-hidden":!0})}),Un?e.jsxs(kr,{"data-fav-preview":!0,"data-on":Xe||void 0,"data-count":Tt??void 0,onClick:()=>M(a,"item_detail"),"aria-pressed":Xe,"aria-label":Vn,children:[e.jsx(L,{name:Xe?"heart-solid":"heart",size:18}),He!==void 0?e.jsx($r,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count-preview",children:Tt}):null]}):null,yt?e.jsxs(oh,{"data-play-showcase":!0,onClick:()=>Lt(!0),"data-testid":"play-showcase",children:[e.jsx(L,{name:"play",size:18}),n("itemDetail.playShowcase")]}):null]}),e.jsx(rh,{"data-testid":"item-info",children:a.name?e.jsxs(e.Fragment,{children:[ti&&a.compareAtCredits!=null?e.jsx(hh,{pct:no(a.compareAtCredits,a.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(ah,{children:[e.jsxs(sh,{children:[a.name,f&&a.issuedId?` #${a.issuedId}`:""]}),Un?e.jsxs(kr,{"data-fav-title":!0,"data-on":Xe||void 0,"data-count":Tt??void 0,onClick:()=>M(a,"item_detail"),"aria-pressed":Xe,"aria-label":Vn,children:[e.jsx(L,{name:Xe?"heart-solid":"heart",size:18}),He!==void 0?e.jsx($r,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count",children:Tt}):null]}):null]}),e.jsxs(lh,{children:[Zn?e.jsx(Kt,{content:Li(a.rarity),children:e.jsx(Qt,{to:Zn,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Ri(Ze)},children:a.rarity})}):e.jsx(Kt,{content:Li(a.rarity),children:e.jsx(Be,{"data-variant":"rarity",style:{background:Ri(Ze)},children:a.rarity})}),ei?e.jsxs(Qt,{to:ei,"data-testid":"detail-category-link",title:n("filter.browseByCategory",{category:Gt($e)}),children:[Nt?e.jsx(L,{name:Nt,size:18}):null,Gt($e)]}):e.jsxs(Be,{children:[Nt?e.jsx(L,{name:Nt,size:18}):null,Gt($e)]}),Jn?e.jsxs(Be,{children:[Xn?e.jsx(L,{name:Xn,size:18}):null,Jn]}):null,!f&&a.issuedId?e.jsxs(Be,{"data-testid":"detail-issued",children:["#",a.issuedId]}):null,d?e.jsxs(Qt,{to:"/event","data-testid":"detail-event",title:d,children:[e.jsx(L,{name:"star-rounded",size:18}),d]}):null,lt?e.jsxs(Qt,{to:Kp(),"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,Rt?e.jsx(Kt,{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]}),ee||Le?e.jsxs(Pa,{children:[ee?e.jsx(Bn,{children:e.jsxs(Nn,{children:[e.jsx(ht,{children:n("itemDetail.description")}),e.jsx(Cr,{"data-expanded":ae||void 0,children:ee}),ee.length>140?e.jsx(ch,{className:"link",onClick:()=>ve(p=>!p),children:ae?n("itemDetail.showLess"):n("itemDetail.readMore")}):null]})}):null,Le?e.jsx(Bn,{children:e.jsxs(Nn,{"data-testid":"detail-utility",children:[e.jsx(ht,{children:n("itemDetail.utility")}),e.jsx(Cr,{"data-expanded":!0,children:Le})]})}):null]}):null,!vi&&(a.creator||$i)||G!=null&&G.name||Ci?e.jsxs(Ea,{children:[vi?null:a.creator?e.jsxs(St,{children:[e.jsx(ht,{children:n("itemDetail.creator")}),e.jsx(uh,{address:a.creator,linkToProfile:!0,hidePrefix:!0})]}):$i?e.jsxs(St,{children:[e.jsx(ht,{children:n("itemDetail.creator")}),e.jsxs(Br,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(_r,{}),e.jsx(Dr,{})]})]}):null,G!=null&&G.name?e.jsxs(St,{"data-collection":!0,children:[e.jsx(ht,{children:n("itemDetail.collection")}),e.jsx(ph,{contractAddress:a.contractAddress,name:G.name,items:re})]}):Ci?e.jsxs(St,{"data-collection":!0,children:[e.jsx(ht,{children:n("itemDetail.collection")}),e.jsxs(Br,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(_r,{}),e.jsx(Dr,{})]})]}):null]}):null,e.jsx(Ta,{}),Ja?e.jsxs(Jh,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(Xh,{}),e.jsx(Nr,{}),e.jsx(Nr,{})]}):e.jsxs(e.Fragment,{children:[dt&&!Ne&&!y&&ue&&!a.tokenId?e.jsxs(Bh,{"data-testid":"buy-from-creator",children:[e.jsxs(_h,{children:[e.jsx(Dh,{name:"buy-from-creator"}),n("itemDetail.buyFromCreator")]}),e.jsx(Wh,{name:"check-rounded"})]}):null,ct?e.jsxs(Uh,{"data-testid":"sold-out",children:[e.jsxs(Pr,{"data-variant":"original",children:[e.jsxs(Er,{children:[n("itemDetail.originalPrice"),e.jsxs(Fr,{children:[e.jsx(Re,{className:"ico"}),e.jsx(Tr,{children:e.jsx(ge,{credits:a.priceCredits})})]}),e.jsx(zr,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsx(Qh,{"data-testid":"out-of-stock",children:n("itemDetail.soldOut")})]}),e.jsxs(Pr,{"data-variant":"resale",children:[e.jsxs(Er,{children:[n("itemDetail.resalePrice"),e.jsxs(Fr,{children:[e.jsx(Re,{className:"ico"}),e.jsx(Tr,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(zr,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsxs(Vh,{children:[n("itemDetail.stock")," ",Ee.length,"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]})]})]}):e.jsxs(xh,{children:[e.jsxs(fh,{children:[e.jsxs(mh,{children:[y||ue?e.jsx(Mn,{children:n("itemDetail.price")}):null,y?e.jsxs(e.Fragment,{children:[e.jsx(Ct,{"data-variant":"market","data-testid":"item-price",children:k==null?e.jsx(It,{children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx(bh,{"aria-hidden":!0,children:"≈"}),e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:k})})]})}),e.jsx(yh,{children:n("assetCard.marketPrice")})]}):ue?ti?e.jsxs(Ct,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:a.priceCredits})}),e.jsx(vh,{"data-testid":"detail-price-was",children:e.jsx(ge,{credits:a.compareAtCredits})}),e.jsx(zo,{until:a.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs(Ct,{"data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:a.priceCredits})})]}):ui&&cn?e.jsxs(Ct,{"data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:cn})})]}):Ne?null:e.jsxs(Ct,{"data-variant":"none","data-testid":"item-price",children:[e.jsx("span",{children:n("itemDetail.notForSale")}),e.jsx(Kt,{content:n("itemDetail.notForSaleHint"),children:e.jsx(gh,{tabIndex:0,role:"img","aria-label":n("itemDetail.notForSaleHint"),children:e.jsx(L,{name:"info",size:14})})})]})]}),Qa?e.jsxs(Ir,{children:[e.jsx(Mn,{children:n("itemDetail.stock")}),e.jsxs(An,{children:[($t??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]})]}):wi?e.jsxs(Ir,{children:[e.jsx(Mn,{children:n("itemDetail.stock")}),e.jsxs(An,{children:[($t??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]}),e.jsx(An,{"data-out":!0,"data-testid":"out-of-stock",children:n("itemDetail.outOfStock")})]}):null]}),ye?e.jsx(Dp,{claimed:ye.claimed,total:ye.total,testId:"detail-offer-stock"}):null,Et!=null?e.jsx(wh,{"data-testid":"detail-units-left",children:n("assetCard.unitsLeftAtThisPrice",{count:Et})}):null]}),e.jsx(jh,{"data-buttons":Ga||void 0,"data-dual":Va||void 0,children:y?e.jsxs(Rn,{variant:"purple",onClick:oe,disabled:!xe,children:[e.jsx("span",{children:n("assetCard.buyNow")}),k!=null?e.jsxs(Ln,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:k})]}):null]}):Ne?e.jsxs(Gh,{"data-testid":"manage-actions",children:[ui?e.jsxs(e.Fragment,{children:[hi?e.jsxs($h,{onClick:()=>gi({edit:!0}),disabled:!pi,"data-testid":"edit-price",children:[e.jsx(L,{name:"pen",className:"ico"}),e.jsx("span",{children:n("itemDetail.manageUpdatePrice")})]}):null,e.jsx(Ar,{onClick:()=>si(!0),"data-testid":"remove-listing",children:e.jsx("span",{children:n("itemDetail.manageRemove")})})]}):e.jsxs(e.Fragment,{children:[hi?e.jsx(kh,{onClick:()=>gi(),disabled:!pi,children:e.jsx("span",{children:n("itemDetail.manageList")})}):null,ze?e.jsxs(e.Fragment,{children:[e.jsx(Ar,{onClick:()=>ri(!0),children:e.jsx("span",{children:n("itemDetail.manageTransfer")})}),e.jsx(Sr,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>j(!0),children:n("itemDetail.manageResell")})]}):null]}),dn&&Te?e.jsx(Sr,{type:"button","data-on-purple":!0,onClick:()=>ai(!0),children:n("itemDetail.manageIssue")}):null,Ke!=null?e.jsx(Yh,{children:e.jsx(_n,{onClick:()=>Je(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})}):null]}):ue?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:oe,disabled:ke,children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Ln,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:a.priceCredits})]})]}),e.jsxs(Mr,{onClick:Ba,disabled:ke||(Ft?on:sn),"aria-label":yi,children:[e.jsx(L,{name:"cart"}),e.jsx(Rr,{children:yi})]})]}):ct&&Ie?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:()=>w?wt(Ie):U(),children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Ln,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:Ie.priceCredits})]})]}),e.jsxs(Mr,{onClick:()=>{Dt||C(Ie,"item_detail")},disabled:Dt,"aria-label":Dt?n("assetCard.inCart"):n("assetCard.addToCart"),children:[e.jsx(L,{name:"cart"}),e.jsx(Rr,{children:Dt?n("assetCard.inCart"):n("assetCard.addToCart")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Fp,{item:a}),a.itemId?e.jsx(Hh,{onClick:()=>{Z("Shop Clicked Buy Resale",{item_id:a.itemId,contract_address:a.contractAddress,has_shop_resale:!!Ie}),F(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:n("itemDetail.buyResale")}):null]})}),!Ne&&!y&&Ke!=null?e.jsxs(qh,{"data-testid":"lowest-price","data-centered":ct||void 0,children:[ct?null:e.jsxs(Oh,{children:[n("itemDetail.lowestPrice"),e.jsx(Re,{className:"ico"}),e.jsx(Kh,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(_n,{onClick:()=>Je(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})]}):null,!Ne&&!y&&xi>0?e.jsxs(Ch,{"data-testid":"you-own-note",children:[n("itemDetail.youOwnN",{count:xi})," ",e.jsx(qr,{to:"/my-items",children:n("nav.myAssets")})]}):null]})]}):e.jsx(nx,{})})]}),e.jsx(ao,{exclude:ie,title:n("itemDetail.becauseYouOwn"),surface:"pdp",first:Wr}),N!==null&&e.jsx(Ao,{title:_a,items:O,onViewAll:v&&a.contractAddress?()=>g(`/collection/${a.contractAddress}`):void 0}),J&&y&&D&&Q?e.jsx(ja,{listing:D,rate:Q,onClose:()=>A(!1),onSold:()=>A(!1)}):J&&!y?e.jsx(zn,{item:Fe,resume:T,onClose:()=>{A(!1),X(!1)}}):null,Pt?e.jsx(zn,{item:Pt,onClose:()=>{wt(null),et()}}):null,dt&&vt&&a.itemId?e.jsx(op,{item:a,onClose:()=>Je(!1)}):null,an&&x?e.jsx(br,{contractAddress:o??"",tokenId:x,onClose:()=>j(!1)}):null,P&&a.itemId&&o?e.jsx(br,{variant:"buy",contractAddress:o,itemId:a.itemId,onClose:()=>F(!1)}):null,Da&&_&&w?e.jsx(Td,{asset:_,session:w,creator:a.creator,edit:oi?mi:void 0,onListed:(p,le)=>{kt(p),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"listed",priceCredits:p,tradeId:le})},onClose:bi}):null,Ka&&w?e.jsx(ic,{name:a.name,managed:Zt(w),canPayGas:di,cancel:fi(!1),onClose:()=>si(!1)}):null,qa&&w&&a.tokenId?e.jsx(ec,{item:{contractAddress:a.contractAddress,chainId:a.chainId,tokenId:a.tokenId,name:a.name,thumbnail:a.thumbnail},session:w,onClose:()=>{ri(!1),et()},onTransferred:()=>{kt(null),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"gone"})}}):null,Wa&&Te&&w?e.jsx(Cc,{item:Te,session:w,edit:oi?mi:void 0,onListed:(p,le)=>{kt(p),K(we=>({...we,tradeId:le}))},onClose:bi}):null,Oa&&Te&&w?e.jsx(Zc,{item:{contractAddress:Te.contractAddress,chainId:rt.chainId,itemId:Te.blockchainItemId,name:Te.name,thumbnail:Te.thumbnail,available:Te.remainingSupply},session:w,onClose:()=>{ai(!1),et()}}):null,nn&&yt?e.jsx(su,{src:yt,itemName:a.name,onClose:()=>Lt(!1)}):null]})}function nx(){return e.jsxs(Lh,{"aria-hidden":!0,children:[e.jsx(Fh,{className:"skeleton"}),e.jsxs(Th,{children:[e.jsx(Pn,{className:"skeleton"}),e.jsx(Pn,{className:"skeleton"}),e.jsx(Pn,{className:"skeleton"})]}),e.jsx(Pa,{children:[0,1].map(t=>e.jsx(Bn,{children:e.jsxs(Nn,{children:[e.jsx(Lr,{className:"skeleton"}),e.jsxs(Ph,{children:[e.jsx(En,{className:"skeleton"}),e.jsx(En,{className:"skeleton"}),e.jsx(En,{className:"skeleton","data-short":!0})]})]})},t))}),e.jsx(Ea,{children:[0,1].map(t=>e.jsxs(St,{...t===1?{"data-collection":!0}:{},children:[e.jsx(Lr,{className:"skeleton"}),e.jsx(Eh,{})]},t))}),e.jsx(Ta,{}),e.jsx(zh,{className:"skeleton"}),e.jsx(Nh,{className:"skeleton"})]})}export{tx as ItemDetail,Ex as ItemDetailRoute,tx as default};
3411
+ //# sourceMappingURL=ItemDetail-C2f1Vg-F.js.map