@dcl/shop 1.13.1-35088015492.commit-25d8a11 → 1.13.1-35095058100.commit-8d694c8

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 (418) hide show
  1. package/_assets/{Activity-Br7TotTg.js → Activity-CjNbjbB8.js} +8 -8
  2. package/_assets/{AnimatedBackground-mKUTCrsZ.js → AnimatedBackground-DsRNSmF9.js} +2 -2
  3. package/_assets/{Assets-Bh3kAxON.js → Assets--xiu2hf1.js} +12 -12
  4. package/_assets/{Authorizations-DPVFuAHg.js → Authorizations-CAq4bDIU.js} +3 -3
  5. package/_assets/Cart-Dn-yuO7W.js +748 -0
  6. package/_assets/{Collection-BIm7ajYT.js → Collection-DmkDiPC5.js} +10 -10
  7. package/_assets/{CollectionCarousel-Dgmy1mBv.js → CollectionCarousel-C2aZMUS6.js} +10 -10
  8. package/_assets/Confetti-CQ1miyT0.js +18 -0
  9. package/_assets/{ConstantsUtil-BIW9CVUv.js → ConstantsUtil-DxsGGeAI.js} +2 -2
  10. package/_assets/{ContentClient-CWLYPXGZ.js → ContentClient-DADL-eWJ.js} +2 -2
  11. package/_assets/{Creator-Bm286S4l.js → Creator-DZvSnP1W.js} +33 -33
  12. package/_assets/{DeploymentBuilder-lkKjiabA.js → DeploymentBuilder-DM4wrDOA.js} +3 -3
  13. package/_assets/{EmotePlaybackBar-CmOnYKyU.js → EmotePlaybackBar-DKUTpuQ1.js} +5 -5
  14. package/_assets/{ErrorNotice-Dqt3U2vl.js → ErrorNotice-Dhs1BLZ6.js} +2 -2
  15. package/_assets/{Event-CzoOohtw.js → Event-e3lOCI2G.js} +2 -2
  16. package/_assets/{ExchangeController-DLt1pr9X.js → ExchangeController-D1BhRLY_.js} +2 -2
  17. package/_assets/{Faq-C75vztz0.js → Faq-qe1pCR9P.js} +2 -2
  18. package/_assets/{GetCredits-C4r6Z9Ll.js → GetCredits-B96wMekN.js} +9 -9
  19. package/_assets/{Grow-C89nQ9vj.js → Grow-pyVWvnNE.js} +2 -2
  20. package/_assets/{HelpersUtil-BZx2xXkr.js → HelpersUtil-B-VhnmAV.js} +2 -2
  21. package/_assets/ItemDetail-EQYc-D1i.js +3779 -0
  22. package/_assets/LoadMore-3LNbX1EU.js +8 -0
  23. package/_assets/{ManaPricingBanner.styles-DIaSN-0J.js → ManaPricingBanner.styles-Xpaqvszn.js} +2 -2
  24. package/_assets/MyAssets-Cw8rL4Qm.js +1142 -0
  25. package/_assets/{MyFavorites-DyG3bnHZ.js → MyFavorites-C-H9WoDf.js} +10 -10
  26. package/_assets/{NetworkUtil-C2mA-_Ya.js → NetworkUtil-Cp-gtHa0.js} +2 -2
  27. package/_assets/NotFound-C_hegLMz.js +18 -0
  28. package/_assets/{NotificationsBell-Bg_tRjZT.js → NotificationsBell-DEOx8fEC.js} +13 -13
  29. package/_assets/{OutfitDetail-BILkjOT0.js → OutfitDetail-DccboofD.js} +7 -7
  30. package/_assets/OutfitPreview-BT1g84TM.js +7 -0
  31. package/_assets/{OutfitStudio-BVxXtmNl.js → OutfitStudio-DVNHreV-.js} +30 -30
  32. package/_assets/{PhArrowCircleDown-6iRUjaQT.js → PhArrowCircleDown-Bmy0XPqd.js} +5 -5
  33. package/_assets/{PhArrowClockwise-CIVwCL-l.js → PhArrowClockwise-Bklo7MBV.js} +3 -3
  34. package/_assets/{PhArrowDown-D3Qpf9aN.js → PhArrowDown-CBjJCstB.js} +3 -3
  35. package/_assets/{PhArrowLeft--wJbrUzB.js → PhArrowLeft-BCeYPtMx.js} +4 -4
  36. package/_assets/{PhArrowRight-BTIKUgk-.js → PhArrowRight-Ch61WxZn.js} +4 -4
  37. package/_assets/{PhArrowSquareOut-DPwbQcP5.js → PhArrowSquareOut-Bk5nSBoz.js} +5 -5
  38. package/_assets/{PhArrowUp-tbd9Vo3U.js → PhArrowUp-CzPwFe1F.js} +5 -5
  39. package/_assets/PhArrowUpRight-DF87CEc7.js +15 -0
  40. package/_assets/{PhArrowsClockwise-BSfkaVhX.js → PhArrowsClockwise-D5XWB216.js} +2 -2
  41. package/_assets/{PhArrowsDownUp-BizHrerJ.js → PhArrowsDownUp-CVtoWYS-.js} +5 -5
  42. package/_assets/{PhArrowsLeftRight-wuaUs2S1.js → PhArrowsLeftRight-Cu83Wp7y.js} +3 -3
  43. package/_assets/{PhBank-BzJNe1lT.js → PhBank-BjB_uqsX.js} +3 -3
  44. package/_assets/{PhBrowser-DtA3UvKM.js → PhBrowser-CW3ZGiB7.js} +5 -5
  45. package/_assets/PhCaretDown-PT_hkshh.js +15 -0
  46. package/_assets/{PhCaretLeft-4kPjHdmT.js → PhCaretLeft-DPSFahQA.js} +3 -3
  47. package/_assets/PhCaretRight-EEBUAb9H.js +15 -0
  48. package/_assets/{PhCaretUp-D9YioiHV.js → PhCaretUp-Bit2hvKo.js} +3 -3
  49. package/_assets/{PhCheck-CHpcW9AR.js → PhCheck-BHmNQJ6P.js} +4 -4
  50. package/_assets/{PhCircleHalf-YS1UFN0E.js → PhCircleHalf-AD4oTWoj.js} +3 -3
  51. package/_assets/{PhClock-CSboNJh9.js → PhClock-3t4anT3D.js} +5 -5
  52. package/_assets/{PhCompass-D_0mucCp.js → PhCompass-DpvhkfDj.js} +5 -5
  53. package/_assets/{PhCopy-CDCUCR3f.js → PhCopy-We2XYWCm.js} +5 -5
  54. package/_assets/{PhCreditCard-DRX4uPYj.js → PhCreditCard-BBnTMXbe.js} +4 -4
  55. package/_assets/{PhCurrencyDollar-DLUjVe8H.js → PhCurrencyDollar-dPV4byY8.js} +2 -2
  56. package/_assets/{PhDesktop-_u-_n84T.js → PhDesktop-DVuLe5q1.js} +3 -3
  57. package/_assets/{PhDeviceMobile-BS_c6Vl8.js → PhDeviceMobile-D6knI_PD.js} +5 -5
  58. package/_assets/{PhDotsThree-CzsXASup.js → PhDotsThree-D_uTiViU.js} +3 -3
  59. package/_assets/{PhEnvelope-Cw4-Hk4L.js → PhEnvelope-Bkk7fDMT.js} +5 -5
  60. package/_assets/{PhFunnelSimple-DpBt0vi9.js → PhFunnelSimple-BVx2yoJC.js} +4 -4
  61. package/_assets/{PhGlobe-rs-o4lxw.js → PhGlobe-BUa1rAnN.js} +2 -2
  62. package/_assets/{PhIdentificationCard-DuF1gYTt.js → PhIdentificationCard-D7mCEldI.js} +5 -5
  63. package/_assets/{PhImage-DIhy5LKN.js → PhImage-DN8upEaC.js} +2 -2
  64. package/_assets/{PhInfo-D_98hoRZ.js → PhInfo-BRv5JqkG.js} +5 -5
  65. package/_assets/{PhLightbulb-jwjURN0E.js → PhLightbulb-LZ8Bksrw.js} +4 -4
  66. package/_assets/{PhMagnifyingGlass-Cl9SVL64.js → PhMagnifyingGlass-Nlml1ksU.js} +5 -5
  67. package/_assets/{PhPaperPlaneRight-CDqjDiqA.js → PhPaperPlaneRight-QfFyGr7O.js} +3 -3
  68. package/_assets/{PhPlus-Bqy0oPbi.js → PhPlus-C6YKBVJU.js} +4 -4
  69. package/_assets/{PhPower-BQaWuBX1.js → PhPower-BtHcdIUq.js} +4 -4
  70. package/_assets/{PhPuzzlePiece-D499-d4h.js → PhPuzzlePiece-D5mYYrHE.js} +3 -3
  71. package/_assets/{PhQrCode-BQ5rQwnD.js → PhQrCode-MfgEx90-.js} +4 -4
  72. package/_assets/{PhQuestion-bCmP-feI.js → PhQuestion-BHeGiiUF.js} +3 -3
  73. package/_assets/{PhQuestionMark-DyfGY3RD.js → PhQuestionMark-DNtDU6-_.js} +4 -4
  74. package/_assets/{PhSealCheck-H9-Y7aNH.js → PhSealCheck-CDWno5AE.js} +2 -2
  75. package/_assets/{PhSignOut-BZcBXokG.js → PhSignOut-BWUfOWAY.js} +3 -3
  76. package/_assets/{PhSpinner-Do01OpHj.js → PhSpinner-Chbk-Rrh.js} +3 -3
  77. package/_assets/{PhTrash-CuF_XmzC.js → PhTrash-CknzCMhK.js} +2 -2
  78. package/_assets/{PhUser-DjwKjO5y.js → PhUser-DBmpCM-x.js} +5 -5
  79. package/_assets/{PhVault-Sk9K_rlP.js → PhVault-B_-lceT6.js} +2 -2
  80. package/_assets/{PhWallet-Cx-DY6Ai.js → PhWallet-DzHci4bI.js} +3 -3
  81. package/_assets/{PhWarning-RJrWRAZK.js → PhWarning-DNajgYKH.js} +5 -5
  82. package/_assets/{PhWarningCircle-BM_6Vsrk.js → PhWarningCircle-DaWHEJd0.js} +4 -4
  83. package/_assets/{PhX-zfSxrDJY.js → PhX-o_0aqvnZ.js} +2 -2
  84. package/_assets/SaleCountdown-BCjbqWcU.js +99 -0
  85. package/_assets/{Spinner-CjR4Zw45.js → Spinner-hLMP163F.js} +2 -2
  86. package/_assets/{StoreSettings-BI2PxdDc.js → StoreSettings-C4lpIKgV.js} +7 -7
  87. package/_assets/{Success-BMSTCual.js → Success-DZwN3t4z.js} +5 -5
  88. package/_assets/{SwapController-MUVg1jDR.js → SwapController-BPiF_Q9x.js} +2 -2
  89. package/_assets/{TradeService-DSbQ-N2T.js → TradeService-D8Zf_eTM.js} +2 -2
  90. package/_assets/{W3MFrameProviderSingleton-bGfA1Ldc.js → W3MFrameProviderSingleton-ByxVGL9W.js} +4 -4
  91. package/_assets/{WebCryptoP256-RyjS14F-.js → WebCryptoP256-BowGpuyg.js} +2 -2
  92. package/_assets/{add-yuh2coGX.js → add-DMqlCS_5.js} +2 -2
  93. package/_assets/all-wallets-jltIqTjt.js +7 -0
  94. package/_assets/{app-store-CjVSQSMw.js → app-store-8U-XnKiq.js} +3 -3
  95. package/_assets/{apple--Q1_9qVz.js → apple-DqtIUOT7.js} +2 -2
  96. package/_assets/{arrow-bottom-BDd5zC7G.js → arrow-bottom-PA3nOuzV.js} +2 -2
  97. package/_assets/{arrow-bottom-circle-DeoWT_5e.js → arrow-bottom-circle-C-CSXtk9.js} +3 -3
  98. package/_assets/arrow-left-Cddzsk1s.js +9 -0
  99. package/_assets/{arrow-right-D5rgj1x7.js → arrow-right-FkB0kPcW.js} +3 -3
  100. package/_assets/{arrow-top-CZJvfHy5.js → arrow-top-BAZtnW6A.js} +3 -3
  101. package/_assets/async-directive-C0XTxdV5.js +10 -0
  102. package/_assets/{authorizations-o-LlYXNc.js → authorizations-D_SudRT-.js} +2 -2
  103. package/_assets/{bank-QdF2JRAj.js → bank-C-8Jh-Iw.js} +2 -2
  104. package/_assets/{basic-nXP69bkA.js → basic-sN1HnC_u.js} +2 -2
  105. package/_assets/{biconomy-D6gisxlY.js → biconomy-BijOlHn5.js} +2 -2
  106. package/_assets/{browseLayout.styles-Bza8FY3N.js → browseLayout.styles-6-W9YjOC.js} +12 -12
  107. package/_assets/{browser-BTxM9pEM.js → browser-BXKNeaZx.js} +2 -2
  108. package/_assets/{browser-D53imPjf.js → browser-D9YPKxfl.js} +2 -2
  109. package/_assets/{browser-DIXts996.js → browser-DynTtmBx.js} +2 -2
  110. package/_assets/{browser-ponyfill-BaElO0Yy.js → browser-ponyfill-BVvT8_Fp.js} +2 -2
  111. package/_assets/builder-BCPamKJP.js +2 -0
  112. package/_assets/{buy-8-Zq_4Fb.js → buy-BkbR80Gf.js} +2 -2
  113. package/_assets/buy-gasless-CQdgMa0F.js +2 -0
  114. package/_assets/{card-Eo0szEyd.js → card-Uc0KebvL.js} +2 -2
  115. package/_assets/{categories-J0dMuNkM.js → categories-Dquh1vbV.js} +2 -2
  116. package/_assets/{ccip-CNvm_wRE.js → ccip-BQaVTqUi.js} +2 -2
  117. package/_assets/{ccip-CgSAa6qI.js → ccip-CV07CEfz.js} +2 -2
  118. package/_assets/{chains-BbZKALwH.js → chains-Bp3h2aaE.js} +2 -2
  119. package/_assets/{checkmark-B1VwDgk_.js → checkmark-7uWcPB0u.js} +3 -3
  120. package/_assets/{checkmark-bold-BXR2Uavz.js → checkmark-bold-BwTefyx7.js} +3 -3
  121. package/_assets/{chevron-bottom-CjUlcMur.js → chevron-bottom-CJ9Wl9Xm.js} +3 -3
  122. package/_assets/{chevron-left-DypZfS5Y.js → chevron-left-DKH1P9Pf.js} +3 -3
  123. package/_assets/{chevron-right-CBfGDvpC.js → chevron-right-DeNTJHBI.js} +2 -2
  124. package/_assets/{chevron-top-ccW9fiNv.js → chevron-top-Dn0py8bk.js} +3 -3
  125. package/_assets/{chrome-store-CXaVZVMO.js → chrome-store-DUbm69Gl.js} +3 -3
  126. package/_assets/{class-map-B8fTg_8Q.js → class-map-C7I-HYAi.js} +6 -6
  127. package/_assets/{clock-CbjAmrVY.js → clock-CMav6VuQ.js} +2 -2
  128. package/_assets/{close-C44p4Qpf.js → close-Byftwzmc.js} +2 -2
  129. package/_assets/{coinPlaceholder-9sNtxYvg.js → coinPlaceholder-C0F4r6oU.js} +2 -2
  130. package/_assets/{collectionPage.styles-C--ki2P9.js → collectionPage.styles-St6jJHia.js} +7 -7
  131. package/_assets/common-vsCsmUBn.js +2 -0
  132. package/_assets/{compass-8jFoOhNF.js → compass-CPDOuTyF.js} +3 -3
  133. package/_assets/{controller-B5adsfCx.js → controller-DIQ9DcOx.js} +3 -3
  134. package/_assets/{copy-Die0K-07.js → copy-CjXNbdx3.js} +2 -2
  135. package/_assets/{core-Dz9rfTnP.js → core-Cs979BA0.js} +5 -5
  136. package/_assets/{createSvgIcon-DSycgKQz.js → createSvgIcon-P53Pfdxl.js} +4 -4
  137. package/_assets/crumbs.styles-N13K8LJF.js +10 -0
  138. package/_assets/{cursor-B5zKTXqZ.js → cursor-D-SkqFO5.js} +3 -3
  139. package/_assets/{cursor-transparent-Dp8bO7rL.js → cursor-transparent-RE6Zec8w.js} +3 -3
  140. package/_assets/{custom-SA3P34sS.js → custom-DP7Ww2Mp.js} +2 -2
  141. package/_assets/{data-capture-QCuBCgVo.js → data-capture-r6LhzaPe.js} +2 -2
  142. package/_assets/{dcl-schemas-BKQ0vYZF.js → dcl-schemas-n1W5glLl.js} +2 -2
  143. package/_assets/decimals-1-P-OpKN.js +2 -0
  144. package/_assets/decimals-BW5hR24C.js +2 -0
  145. package/_assets/{desktop-1vPdJJzq.js → desktop-tp0dY4sR.js} +3 -3
  146. package/_assets/detectExtension-DQg6wKZQ.js +2 -0
  147. package/_assets/{disconnect-10T9vPyj.js → disconnect-PN0ATTQe.js} +3 -3
  148. package/_assets/{discord-BC_Ueh7y.js → discord-ISYEjXZK.js} +3 -3
  149. package/_assets/{disposePreview-BDCsvWuP.js → disposePreview-D5gU11Se.js} +2 -2
  150. package/_assets/{email--UGVY4VA.js → email-C4mis8Vg.js} +2 -2
  151. package/_assets/{embedded-wallet-C0h1UGCI.js → embedded-wallet-CaKg_r8U.js} +2 -2
  152. package/_assets/{emotion-styled.browser.esm-8Fn_bSaK.js → emotion-styled.browser.esm-BUJmozsy.js} +2 -2
  153. package/_assets/{engine-CVmNCEKG.js → engine-D07w-XRT.js} +2 -2
  154. package/_assets/{errors-5abtsF-d.js → errors-DhRbQUQ8.js} +2 -2
  155. package/_assets/estimate-l1-fee-CVLkkmbZ.js +2 -0
  156. package/_assets/eth_estimateGas-DcrnZAhD.js +2 -0
  157. package/_assets/eth_getStorageAt-D55EQvGL.js +2 -0
  158. package/_assets/eth_getTransactionCount-996c8uw3.js +2 -0
  159. package/_assets/ethereum-BB2NY3Ze.js +2 -0
  160. package/_assets/{ethers-CqnE9_Iy.js → ethers-OrSZ5jmz.js} +2 -2
  161. package/_assets/{etherscan-C2G3o1uJ.js → etherscan-CjB1AtvG.js} +2 -2
  162. package/_assets/{events-DxeiWjZO.js → events-C-1hKiSc.js} +2 -2
  163. package/_assets/{exclamation-triangle-DwAzeOp6.js → exclamation-triangle-Vw_jmJIs.js} +2 -2
  164. package/_assets/{execute-bRHFO9T8.js → execute-DkcTGxdS.js} +3 -3
  165. package/_assets/{extension-DzOqtmMr.js → extension-p5vqJTq0.js} +3 -3
  166. package/_assets/{external-link-CJFUahWS.js → external-link-6l8BDrnZ.js} +2 -2
  167. package/_assets/{extractIPFS-DTbEwfwl.js → extractIPFS-DGBDqkFQ.js} +2 -2
  168. package/_assets/{facebook-x3bYUdwS.js → facebook-BdpnpvkK.js} +3 -3
  169. package/_assets/{farcaster-TSNolEe6.js → farcaster-DyedtTLV.js} +3 -3
  170. package/_assets/{features-DOlQFJIn.js → features-Dgji4xPv.js} +2 -2
  171. package/_assets/fetchTokenMetadata-CLY3eWo4.js +3 -0
  172. package/_assets/{field.styles-CGT52_F0.js → field.styles-B66-mhwP.js} +2 -2
  173. package/_assets/{filters-UiyRH_AA.js → filters-CMt2xly-.js} +3 -3
  174. package/_assets/{fortmatic-B4F48NpJ.js → fortmatic-CIXGktdE.js} +2 -2
  175. package/_assets/{get-bytecode-B61L8bJf.js → get-bytecode-B4ah9_Ee.js} +2 -2
  176. package/_assets/get-ecosystem-wallet-info-BUVR1h_d.js +2 -0
  177. package/_assets/{getBalance-CgOiBcM_.js → getBalance-DcjxPvBd.js} +3 -3
  178. package/_assets/getInstalledModules-CVmsNb5W.js +2 -0
  179. package/_assets/getNFT-CNkldXgA.js +2 -0
  180. package/_assets/{getNFT-BOhaT1yq.js → getNFT-D6Q2R2w8.js} +3 -3
  181. package/_assets/{github-DKEnSSaC.js → github-DpuVIU6C.js} +2 -2
  182. package/_assets/{google-Ct_bf34c.js → google-BwS7c7G5.js} +2 -2
  183. package/_assets/{grid.styles-iTSFhsyn.js → grid.styles-CbKnaEaH.js} +2 -2
  184. package/_assets/{hashTypedData-CTf6X_0x.js → hashTypedData-BMQaC5AO.js} +2 -2
  185. package/_assets/{hashTypedData-BjxqyJnO.js → hashTypedData-BXTiCI6R.js} +2 -2
  186. package/_assets/{help-circle-CtxTuyd5.js → help-circle-D4e71YxP.js} +3 -3
  187. package/_assets/{id-CBP3kShs.js → id-CkCU8Jqk.js} +3 -3
  188. package/_assets/{image-CU2z53Sh.js → image-BgNr9PHW.js} +2 -2
  189. package/_assets/{import-BFM9mYtD.js → import-nI9C4MLI.js} +2 -2
  190. package/_assets/{in-app-D-IPfiDb.js → in-app-qH_5BfXH.js} +2 -2
  191. package/_assets/in-app-wallet-calls-D5QY4WMZ.js +2 -0
  192. package/_assets/{index-UORXqou9.js → index-2lALaSI0.js} +2 -2
  193. package/_assets/{index-BgSm7poL.js → index-3xvycxSp.js} +2 -2
  194. package/_assets/{index-CVfarqKE.js → index-5TanjW1p.js} +4 -4
  195. package/_assets/{index-9ER2YXLE.js → index-7LiE_2Hn.js} +2 -2
  196. package/_assets/{index-CWpLrxaY.js → index-7jxYsA5x.js} +2 -2
  197. package/_assets/{index-D-g6tUrr.js → index-B0eaBbwk.js} +4 -4
  198. package/_assets/{index-Cj8n6jhR.js → index-B6gpbqHk.js} +3 -3
  199. package/_assets/{index-_eXXkY79.js → index-B767Ef3o.js} +2 -2
  200. package/_assets/{index-C1ILo9mK.js → index-B8pq8JLn.js} +2 -2
  201. package/_assets/{index-CcMloegU.js → index-B9LTXTJ_.js} +3 -3
  202. package/_assets/{index-CcJ1bQOV.js → index-BBmOO_5v.js} +2 -2
  203. package/_assets/{index-B0AMIOfY.js → index-BHeP5cAB.js} +2 -2
  204. package/_assets/{index-BbYwNUDQ.js → index-BIDLTLRs.js} +4 -4
  205. package/_assets/{index-BMWj60Rz.js → index-BJOeyXU6.js} +2 -2
  206. package/_assets/{index-D2iQXB_K.js → index-BT2VuKr_.js} +2 -2
  207. package/_assets/{index-QryiMDf6.js → index-BUJII-te.js} +2 -2
  208. package/_assets/{index-Bo1Z5mEG.js → index-BYf--6IB.js} +2 -2
  209. package/_assets/{index-D6OhFIgK.js → index-BbOkb2Lk.js} +2 -2
  210. package/_assets/{index-Dh747mI9.js → index-BbvUH58s.js} +5 -5
  211. package/_assets/{index-BgewSO5d.js → index-BlyJ0EeU.js} +2 -2
  212. package/_assets/{index-TwJnCsCt.js → index-Bt53hnH3.js} +2 -2
  213. package/_assets/{index-D_b2TfPS.js → index-BymYE2Hq.js} +2 -2
  214. package/_assets/{index-Ch8ZdFvj.js → index-C11xAGLj.js} +3 -3
  215. package/_assets/{index-CkhRwzDn.js → index-C3N8gNG5.js} +2 -2
  216. package/_assets/{index-DHrx45E-.js → index-C9g_L_xU.js} +8 -8
  217. package/_assets/{index-Bece1vl_.js → index-CBqzQu4b.js} +3 -3
  218. package/_assets/{index-BIU1Xflg.js → index-CFkA928w.js} +2 -2
  219. package/_assets/{index-8c2AE2rL.js → index-CKir0NTC.js} +6 -6
  220. package/_assets/{index-BjvOCOXo.js → index-CLkKFzPp.js} +5 -5
  221. package/_assets/{index-DSYn1rPz.js → index-CMGA6Ehu.js} +7 -7
  222. package/_assets/{index-Cg4gI1gY.js → index-CO3xBlL2.js} +4 -4
  223. package/_assets/{index-EO54jEJz.js → index-CTpgpMEc.js} +9 -9
  224. package/_assets/index-CZBL8oDN.css +1 -0
  225. package/_assets/{index-DBjGF5O5.js → index-C_vB1IQd.js} +4 -4
  226. package/_assets/{index-D3vbPDep.js → index-Cfg8NIxf.js} +4 -4
  227. package/_assets/{index-BLF43zxA.js → index-Cfiy7F58.js} +2 -2
  228. package/_assets/{index-DntLKm7o.js → index-ChkZ_3N-.js} +2 -2
  229. package/_assets/{index-DKNSn9FC.js → index-Ci7OJEKI.js} +4 -4
  230. package/_assets/{index-BqXgj2c4.js → index-CiVDvcz9.js} +17 -17
  231. package/_assets/{index-C3ELTXuu.js → index-CqA25hIa.js} +3 -3
  232. package/_assets/{index-D7KJ3B17.js → index-CspzAmAd.js} +4 -4
  233. package/_assets/{index-C6WGvNBW.js → index-CulTnm_-.js} +3 -3
  234. package/_assets/{index-DHmdplW7.js → index-CzONDXJm.js} +3 -3
  235. package/_assets/{index-Je254H6v.js → index-D2_5jCAk.js} +5 -5
  236. package/_assets/{index-DhZR3d6F.js → index-DEL0w41-.js} +2 -2
  237. package/_assets/{index-DB5YO8eU.js → index-DGoH3dH-.js} +9 -9
  238. package/_assets/{index-C8USgWUh.js → index-DHIc5ihj.js} +6 -6
  239. package/_assets/{index-jo5IZGw6.js → index-DILi1pU7.js} +2 -2
  240. package/_assets/{index-DDwh5CzB.js → index-DOE5PvRf.js} +4 -4
  241. package/_assets/{index-B3cule6M.js → index-DSZlP7vv.js} +2 -2
  242. package/_assets/{index-kSQR1Rng.js → index-DWpJbdNp.js} +2 -2
  243. package/_assets/{index-CQyQWevE.js → index-Dbzum1xk.js} +2 -2
  244. package/_assets/{index-CORj9AA6.js → index-DhxbjStl.js} +3 -3
  245. package/_assets/{index-BE-bCzXU.js → index-DrYTVtgg.js} +2 -2
  246. package/_assets/{index-DBkGVGV_.js → index-DsKy4xQX.js} +2 -2
  247. package/_assets/index-DuuWxLJb.js +2 -0
  248. package/_assets/{index-BbT8qu_L.js → index-DxPCOmel.js} +3 -3
  249. package/_assets/{index-BpgGRt4i.js → index-DyXRsRBM.js} +3 -3
  250. package/_assets/{index-C7RUGLgx.js → index-DzQkIbqv.js} +499 -500
  251. package/_assets/{index-ApdCRpGh.js → index-FgD-q8nY.js} +2 -2
  252. package/_assets/index-Q91sfGFW.js +2 -0
  253. package/_assets/{index-BuUjwDYx.js → index-QEKAtx1e.js} +4 -4
  254. package/_assets/{index-AH8vZ3-a.js → index-VrmvnTaa.js} +4 -4
  255. package/_assets/{index-CToeVfXv.js → index-aYru672w.js} +2 -2
  256. package/_assets/{index-DNZQtb01.js → index-gl06JVkD.js} +3 -3
  257. package/_assets/{index-D6MOFBZd.js → index-jsed_aC3.js} +2 -2
  258. package/_assets/{index-BLu7rJtN.js → index-t1CDJb0U.js} +9 -9
  259. package/_assets/{index-Cw2X26uO.js → index-u3wacysv.js} +2 -2
  260. package/_assets/{index.es-B-n7bK95.js → index.es-89IU7kpU.js} +2 -2
  261. package/_assets/{index.es-yT5643Oy.js → index.es-BxUByfMu.js} +2 -2
  262. package/_assets/{index.es-Dn-oiXGY.js → index.es-CeXL7thu.js} +2 -2
  263. package/_assets/{index.es-C50Venyf.js → index.es-O2YZpGjD.js} +5 -5
  264. package/_assets/{info-D8HlAvAX.js → info-CULnZZaj.js} +2 -2
  265. package/_assets/{info-circle-BhZLPW19.js → info-circle-lLJ-CNp2.js} +3 -3
  266. package/_assets/{items-empty-CSlmEyZz.js → items-empty-Bo2ok7jY.js} +2 -2
  267. package/_assets/jsxRuntime.module-gjtb1wYS.js +2 -0
  268. package/_assets/{jump-BOiqSS4M.js → jump-CfxL77MI.js} +2 -2
  269. package/_assets/{lightbulb-DzXtr_43.js → lightbulb-4T7s9a-o.js} +2 -2
  270. package/_assets/linkAccount-CH9thals.js +2 -0
  271. package/_assets/{localBatchGatewayRequest-MsW7s5by.js → localBatchGatewayRequest-CSeZ4gRB.js} +2 -2
  272. package/_assets/{mail-OX9dKj1y.js → mail-DhJDk7cH.js} +3 -3
  273. package/_assets/{mobile-yC6FSqHV.js → mobile-CydJ5WdV.js} +3 -3
  274. package/_assets/{modal.styles-B7xjPjYV.js → modal.styles-2uQXkegU.js} +2 -2
  275. package/_assets/{more-DOT52_aN.js → more-Dg2B8rio.js} +3 -3
  276. package/_assets/{native-UMs_9ER2.js → native-CTjG-6uw.js} +2 -2
  277. package/_assets/{network-placeholder-CCjuxrNi.js → network-placeholder-h8TrKQkX.js} +2 -2
  278. package/_assets/{networks-BxL8Ab1j.js → networks-DcWUPxCR.js} +2 -2
  279. package/_assets/{nftPlaceholder-DKgXm473.js → nftPlaceholder-B4g7qDN6.js} +3 -3
  280. package/_assets/off-UwuZMWU-.js +9 -0
  281. package/_assets/{onramp-DxZRTgp3.js → onramp-i_2R0Aty.js} +2 -2
  282. package/_assets/openzeppelin-CRJGheas.js +2 -0
  283. package/_assets/ownerOf-Cg4HNQ0Q.js +2 -0
  284. package/_assets/parseNft-C5TjCi9l.js +3 -0
  285. package/_assets/{parseSignature-BI_WyMN8.js → parseSignature-BkGllSKb.js} +2 -2
  286. package/_assets/{parseSignature-B_rheFpA.js → parseSignature-DlxX_eFH.js} +4 -4
  287. package/_assets/{passkeys-D1ovHh1n.js → passkeys-DHzFFqFt.js} +2 -2
  288. package/_assets/{pay-with-exchange-CAo2mIu7.js → pay-with-exchange-Da-95QjC.js} +2 -2
  289. package/_assets/{play-store-bj7y3y5Y.js → play-store-B1ADa5-a.js} +2 -2
  290. package/_assets/{plus-CfzKaqvY.js → plus-CkIDGwOx.js} +2 -2
  291. package/_assets/{prepare-contract-call-CC-FfypC.js → prepare-contract-call-DRyZHwAJ.js} +2 -2
  292. package/_assets/{qr-code-Bn6kdgY5.js → qr-code-DInpw8H9.js} +3 -3
  293. package/_assets/{qr-overlay-Dqlh9s-P.js → qr-overlay-B5-Cv-4F.js} +4 -4
  294. package/_assets/{react-D7J-E0MH.js → react-DaBuTM6Q.js} +2 -2
  295. package/_assets/{receive-Cqln7Zzs.js → receive-BxwWtavl.js} +2 -2
  296. package/_assets/{recycle-horizontal-Com6QZtq.js → recycle-horizontal-frlUVLoe.js} +2 -2
  297. package/_assets/{ref-CZIG3V0U.js → ref-BDtPbYkK.js} +3 -3
  298. package/_assets/{refresh-KnsbHvKc.js → refresh-BJgYdDWe.js} +3 -3
  299. package/_assets/{reown-logo-BuYZi0Rx.js → reown-logo-CptpO-OK.js} +2 -2
  300. package/_assets/{resolveImplementation-CbOxSd1Z.js → resolveImplementation-UAeMoslS.js} +2 -2
  301. package/_assets/{resume-buy-qr8Z1bgQ.js → resume-buy-DshgN9vm.js} +2 -2
  302. package/_assets/{rpc-6QQor2XU.js → rpc-xoh1bqpg.js} +2 -2
  303. package/_assets/{sales-empty-B3qcIyi6.js → sales-empty-B0QNGz8U.js} +2 -2
  304. package/_assets/{search-Ce8CzTDv.js → search-CovtTjFk.js} +3 -3
  305. package/_assets/{search-empty-B2ikWLFM.js → search-empty-CiaPLxpu.js} +2 -2
  306. package/_assets/{secp256k1-N7Qrv3ox.js → secp256k1-B6GZ7kat.js} +2 -2
  307. package/_assets/{secp256k1-DibZRl6e.js → secp256k1-CI4_BdKy.js} +2 -2
  308. package/_assets/{secp256k1-CQeO8_L9.js → secp256k1-IgPcu2TC.js} +2 -2
  309. package/_assets/{send-B-AElJGe.js → send-BqmhOSPb.js} +2 -2
  310. package/_assets/{send-fc370TIG.js → send-CMxH0R30.js} +2 -2
  311. package/_assets/{send-batch-transaction-UJjMLB2L.js → send-batch-transaction-_47YxVXu.js} +2 -2
  312. package/_assets/{send-eip712-transaction-DSyJkl_1.js → send-eip712-transaction-dUQPsneg.js} +3 -3
  313. package/_assets/send-gasless-transaction-C9qimzDD.js +3 -0
  314. package/_assets/send-transaction-C00epVak.js +3 -0
  315. package/_assets/{sendMetaTransaction-C6Fbql0T.js → sendMetaTransaction-D_Udygrx.js} +2 -2
  316. package/_assets/{sendRawTransaction-BapPv41W.js → sendRawTransaction-3Tc8O82f.js} +4 -4
  317. package/_assets/{sentry-BK5YQzUx.js → sentry-ilLelGl_.js} +3 -3
  318. package/_assets/{serializeTransaction-vu5gUsgc.js → serializeTransaction-BN5Z150K.js} +2 -2
  319. package/_assets/session-proposal-DFNQHP37.js +2 -0
  320. package/_assets/{session-request-BSVWGsvU.js → session-request-D-kuAKOc.js} +3 -3
  321. package/_assets/{sha256-CEHbBAco.js → sha256-C6I6NkPD.js} +2 -2
  322. package/_assets/sha3-CcKshJ6_.js +2 -0
  323. package/_assets/signin-empty-C52WOkGa.js +2 -0
  324. package/_assets/{signing-BmfCro8S.js → signing-D_eQ6aEY.js} +4 -4
  325. package/_assets/{skeleton.styles-BN71VInw.js → skeleton.styles-B7ceCvK9.js} +2 -2
  326. package/_assets/{socials-BHFgLpAJ.js → socials-DCNPHMgt.js} +2 -2
  327. package/_assets/{styled-Doc5cwwv.js → styled-TsFrVdC0.js} +3 -3
  328. package/_assets/{swapHorizontal-CVwm3cGO.js → swapHorizontal-BzkqO77h.js} +3 -3
  329. package/_assets/{swapHorizontalBold-BJtM3bfy.js → swapHorizontalBold-Ci7CW-Ps.js} +2 -2
  330. package/_assets/{swapHorizontalMedium-Dy-L1gY3.js → swapHorizontalMedium-BIJFHqWY.js} +3 -3
  331. package/_assets/{swapHorizontalRoundedBold-CISDmUGp.js → swapHorizontalRoundedBold-DgbOKQnq.js} +2 -2
  332. package/_assets/{swapVertical-DOqonLJ7.js → swapVertical-AbfbZRwH.js} +2 -2
  333. package/_assets/{swaps-K7u4TcXn.js → swaps-CicFV6pq.js} +2 -2
  334. package/_assets/{telegram-BgdgHDgu.js → telegram-D7G_eJ_b.js} +2 -2
  335. package/_assets/{thirdweb-BcMQ69Q0.js → thirdweb-Vp1uscmH.js} +4 -4
  336. package/_assets/{three-dots-QLVpeBJu.js → three-dots-OoMaedcW.js} +2 -2
  337. package/_assets/{to-serializable-transaction-BrhQQJr8.js → to-serializable-transaction-BT5px6SS.js} +3 -3
  338. package/_assets/totalSupply-CkL8_XXt.js +2 -0
  339. package/_assets/{transaction-HCF_3XYc.js → transaction-sOBP-DPj.js} +2 -2
  340. package/_assets/transactionReceipt--9bOdV8l.js +2 -0
  341. package/_assets/transactions-CWkneGU6.js +17 -0
  342. package/_assets/{twitch-DQ-6J5eN.js → twitch-XFZ_dW-0.js} +2 -2
  343. package/_assets/{twitterIcon-DqfN9e83.js → twitterIcon-DFIrOz7L.js} +2 -2
  344. package/_assets/{useCreditPacks-C4goi1v6.js → useCreditPacks-DGUqMJ6U.js} +2 -2
  345. package/_assets/{useInfiniteGrid-x8-KLPvB.js → useInfiniteGrid-DpNO4hZU.js} +2 -2
  346. package/_assets/useStore-HIvj56kg.js +3 -0
  347. package/_assets/useTheme-5m8LACXM.js +2 -0
  348. package/_assets/{utils-BIDnbzds.js → utils-Ci73E7nx.js} +2 -2
  349. package/_assets/{verify-B6D4ZoTL.js → verify-CtqWYnsr.js} +3 -3
  350. package/_assets/{verify-filled-IL97d6Q4.js → verify-filled-db_bDI2X.js} +3 -3
  351. package/_assets/{verifyHash-zWGUEzxO.js → verifyHash-Bk-B5GPz.js} +2 -2
  352. package/_assets/{w3m-modal-DieNoy5B.js → w3m-modal-BTUtrhm6.js} +2 -2
  353. package/_assets/{w3m-modal-npxivmAE.js → w3m-modal-BtyAd8rE.js} +2 -2
  354. package/_assets/wait-for-tx-receipt-Cbmd9TUG.js +2 -0
  355. package/_assets/{wallet-CeCbopsa.js → wallet-C7Nkm-1r.js} +3 -3
  356. package/_assets/{wallet-placeholder-Crzo6d1g.js → wallet-placeholder-BAZfiJ4M.js} +2 -2
  357. package/_assets/{walletconnect-CeZHyiFa.js → walletconnect-jD4HJXgj.js} +2 -2
  358. package/_assets/{wallets-BX3reIDg.js → wallets-CUIygOS2.js} +6 -6
  359. package/_assets/{warning-circle-CYZb1kuW.js → warning-circle-DG9C8ETA.js} +3 -3
  360. package/_assets/{web-connector-B-Qttl4q.js → web-connector-BIkHBHih.js} +4 -4
  361. package/_assets/{writeContract-DBB3GCUP.js → writeContract-CEDCT-Ld.js} +2 -2
  362. package/_assets/{x-EU6Vt-ZK.js → x-B-2M90IQ.js} +2 -2
  363. package/_assets/{zora-sepolia-4aZYsx8C.js → zora-sepolia-C43Ueozz.js} +2 -2
  364. package/_assets/{zoraTestnet-k4gEq1qt.js → zoraTestnet-CnMCD5vw.js} +2 -2
  365. package/index.html +11 -11
  366. package/package.json +2 -2
  367. package/_assets/Cart-Cz1_8pDF.js +0 -748
  368. package/_assets/Confetti-TvBa-8L0.js +0 -18
  369. package/_assets/ItemDetail-O0E45P4x.js +0 -3778
  370. package/_assets/LoadMore-DgGHun07.js +0 -8
  371. package/_assets/MyAssets-B_B3e16w.js +0 -1077
  372. package/_assets/NotFound-C19ay2J0.js +0 -18
  373. package/_assets/OutfitPreview-DnePnq6P.js +0 -7
  374. package/_assets/PhArrowUpRight-8pk20n2b.js +0 -15
  375. package/_assets/PhCaretDown-CAvzPGfo.js +0 -15
  376. package/_assets/PhCaretRight-fBgGDQoN.js +0 -15
  377. package/_assets/all-wallets-BC47z7en.js +0 -7
  378. package/_assets/arrow-left-ClBN6Qh3.js +0 -9
  379. package/_assets/async-directive-DRvTtDkq.js +0 -10
  380. package/_assets/builder-CEDpBFkW.js +0 -2
  381. package/_assets/buy-gasless-mSBHbIka.js +0 -2
  382. package/_assets/common-TqxBDIuh.js +0 -2
  383. package/_assets/crumbs.styles-BqMPTZMi.js +0 -10
  384. package/_assets/decimals-BlmrI4QX.js +0 -2
  385. package/_assets/decimals-CZlYYHvF.js +0 -2
  386. package/_assets/detectExtension-BES_31hM.js +0 -2
  387. package/_assets/estimate-l1-fee-Dh31wn7V.js +0 -2
  388. package/_assets/eth_estimateGas-UbaxlGnG.js +0 -2
  389. package/_assets/eth_getStorageAt-BUvTw4uP.js +0 -2
  390. package/_assets/eth_getTransactionCount-CGFdAd5L.js +0 -2
  391. package/_assets/ethereum-TadlwfdZ.js +0 -2
  392. package/_assets/fetchTokenMetadata-C1uUHgz6.js +0 -3
  393. package/_assets/get-ecosystem-wallet-info-W6y9v6fC.js +0 -2
  394. package/_assets/getInstalledModules-DWdNC3R0.js +0 -2
  395. package/_assets/getNFT-Op6nNTCr.js +0 -2
  396. package/_assets/in-app-wallet-calls-BivXJ6s-.js +0 -2
  397. package/_assets/index-Bi7YdA0p.js +0 -2
  398. package/_assets/index-ByiMU36z.css +0 -1
  399. package/_assets/index-OxIuflSf.js +0 -2
  400. package/_assets/jsxRuntime.module-DnBCkw57.js +0 -2
  401. package/_assets/linkAccount-B6zz4AhU.js +0 -2
  402. package/_assets/off-B-mPtvC1.js +0 -9
  403. package/_assets/openzeppelin-Cr4Y9xjf.js +0 -2
  404. package/_assets/ownerOf-DY8a2-2C.js +0 -2
  405. package/_assets/parseNft-DPdft2uD.js +0 -3
  406. package/_assets/send-gasless-transaction-ByJ2YdbP.js +0 -3
  407. package/_assets/send-transaction-8aUtEDXf.js +0 -3
  408. package/_assets/session-proposal-DigsDD4x.js +0 -2
  409. package/_assets/sha3-BShx66Ks.js +0 -2
  410. package/_assets/signin-empty-K31kGWGu.js +0 -2
  411. package/_assets/totalSupply-CuA1naxr.js +0 -2
  412. package/_assets/transactionReceipt-07DpCAC0.js +0 -2
  413. package/_assets/transactions-a9mQj56V.js +0 -17
  414. package/_assets/useStore-fPz8-87J.js +0 -3
  415. package/_assets/useTheme-DQw02uin.js +0 -2
  416. package/_assets/wait-for-tx-receipt-CLSVYeXT.js +0 -2
  417. package/_assets/wallet-Bhi-khZu.js +0 -2
  418. /package/_assets/{ItemDetail-B4Ll03xN.css → SaleCountdown-B4Ll03xN.css} +0 -0
@@ -0,0 +1,3779 @@
1
+ import{r as c,j as e,u as lt,L as ir,d as hs,b as ar}from"./react-DaBuTM6Q.js";import{s as a,d as n,aK as Qe,c as i,I as L,av as xs,K as ve,S as Ge,C as ze,bk as zi,a3 as en,e as st,E as ot,bn as rr,bo as fs,L as dt,by as ms,bz as gs,al as X,bG as $e,bF as we,bH as Fn,i as ue,bE as pn,bD as sr,n as bs,o as ys,R as gt,bm as ws,bl as or,U as vs,bA as js,bB as ks,cZ as $s,c_ as Cs,c$ as Is,d0 as Ss,D as te,aO as As,a6 as tn,bg as nn,M as On,bh as rt,p as lr,N as Lt,c5 as dr,G as Je,aw as ye,d1 as Ms,a4 as zs,v as Rs,w as Ls,x as wt,aI as hn,ad as cr,d2 as Ri,cL as Ps,f as ur,aJ as Ts,d3 as Es,c4 as Fs,d4 as Bs,bQ as Ns,d5 as Ws,d6 as Ds,k as Os,aj as Rt,b8 as qs,d7 as Ks,a9 as Hs,d8 as Us,ba as Qs,d9 as Gs,u as pr,X as hr,da as xr,db as _s,dc as Vs,j as fr,dd as Js,de as Ys,df as Xs,dg as Zs,dh as eo,Q as to,di as xn,W as no,bq as io,br as ao,F as ro,m as so,dj as oo,dk as lo,dl as co,dm as uo,dn as po,ax as ho,ay as xo,dp as fo,H as mo,dq as go,aB as Li,aA as Pi,dr as bo,ds as yo,$ as wo,bx as vo,dt as Ti,du as jo,dv as ko,dw as $o,dx as Co,dy as Io,dz as So,dA as Ao,dB as Mo}from"./index-DzQkIbqv.js";import{d as Ae}from"./dcl-schemas-n1W5glLl.js";import{N as Ei,a0 as zo,V as Ro,R as mr,M as Lo,S as Po,C as To,H as Eo,a as Fo,T as Bo,X as No,b as Wo,B as Do,c as Oo,d as qo,e as Ko,f as at,g as Ho,h as Uo,i as Qo,j as Go,k as ft,l as De,W as Ut,o as Qt,p as Gt,q as _o,x as Vo,y as Jo,z as Yo,D as Xo,E as Zo,F as el,G as tl,I as nl,J as il,K as al,L as gr,P as br,m as yr,n as wr,a2 as rl,a3 as sl,a4 as Fi,A as ol,r as ll,s as dl,t as cl,u as ul,v as pl,w as hl,a5 as Bi,a6 as xl,a7 as fl,a8 as ml,a9 as gl,Y as bl,O as yl,Q as wl,U as vl}from"./CollectionCarousel-C2aZMUS6.js";import{j as Ni,b as jl,d as kl,v as $l,i as Cl,e as Il,a as Sl,o as Al,w as Wi,G as Ml,c as zl}from"./buy-BkbR80Gf.js";import{a as Rl,b as Ll}from"./builder-BCPamKJP.js";import{u as Pl,M as Tl,f as El,b as Fl,c as Bl}from"./useCreditPacks-DGUqMJ6U.js";import{m as Di}from"./mana-matic-CEqvSwrJ.js";import{m as Nl}from"./mana-matic-light-Bl5duieC.js";import{l as vr,g as jr,o as Wl,n as Dl,a as Oi,b as kr,i as Ol,r as ql,m as Kl,k as Hl}from"./authorizations-D_SudRT-.js";import{J as Ul,p as Ql,C as Gl,I as _l}from"./ethers-OrSZ5jmz.js";import{a as Vl,w as $r,S as Cr,G as Ir,c as Jl}from"./buy-gasless-CQdgMa0F.js";import{R as qi}from"./resume-buy-DshgN9vm.js";import{a as Yl,f as _e,i as yt}from"./errors-DhRbQUQ8.js";import{C as Xl}from"./Confetti-CQ1miyT0.js";import{b as Zl,J as ed,a as td}from"./jump-CfxL77MI.js";import{c as nd,i as an,D as id,S as ad,a as rd}from"./SaleCountdown-BCjbqWcU.js";import{p as Sr}from"./import-nI9C4MLI.js";import{E as Ve}from"./ErrorNotice-Dhs1BLZ6.js";import{L as Ki,M as sd,B as od,H as ld,T as dd,A as cd}from"./modal.styles-2uQXkegU.js";import{S as ud}from"./Spinner-hLMP163F.js";import{M as pd,E as hd,s as xd}from"./sendMetaTransaction-D_Udygrx.js";import{E as fd}from"./EmotePlaybackBar-DKUTpuQ1.js";import{d as md}from"./disposePreview-D5gU11Se.js";import{S as gd,T as _t}from"./categories-Dquh1vbV.js";import{c as bd}from"./crumbs.styles-N13K8LJF.js";import"./sentry-ilLelGl_.js";import"./intl-AKLEHPeO.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]="39b238f7-1026-402c-bd72-f9ff6b2592a5",t._sentryDebugIdIdentifier="sentry-dbid-39b238f7-1026-402c-bd72-f9ff6b2592a5")}catch{}})();const Ar=216n,yd=(1n<<Ar)-1n;function wd(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>Ar).toString(),issuedId:(s&yd).toString()}}function vd(t){if(!t)return null;try{return wd(t).itemId}catch{return null}}const Mr=["cancelled-listings"];function jd(t,s){s&&t.setQueryData(Mr,l=>l!=null&&l.includes(s)?l:[...l??[],s])}function Hi(t,s){var l;if(s)return(l=t.getQueryData(Mr))!=null&&l.includes(s)?void 0:s}function Ui(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 fn(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 m=l.kind==="gone";t.setQueriesData({queryKey:["owned-token",d,u]},$=>$&&(m?null:Ui($,l)));const y=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:y},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(m){const g=h.items.filter(w=>!(w.contractAddress===d&&w.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?Ui(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 kd(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}const $d="data:image/webp;base64,UklGRqgOAABXRUJQVlA4IJwOAACwOwCdASqEAIsAPj0YikMiIaEWuib4IAPEtQBl0QC/bukK7J6X8cPZP5F69/Nvhj8oPlD3odY/QB8RXPv/C+3n59+izzA/0l/3/9064PmD/bH9Zvey/33r8/2PqC/zH/fdaX6EX7O+nP+3Xwlfub+33tOf/+7N8wTMuJT/znss7V9qD/DcDplr/deudN0/Rcajjp49/Q//7vLR70+4X+tP/R9az//+3r9z/Yk/ZVVfCa+jj+kU2kxc+zPDZIZQYWF19BTevkFTZdPnQBT3YukdDX/AtCNcmvBrFJ96eYkUWaCCtnOpfB+/IETSsPYuwsabIrqSWHYoPBskXi/DUubCFDAf/6+0pCLU1kmMIueWH8HebltZsATbIO+vXwG1gHAXjGECElz7j/+GXHZJM9ORAFgOa/b/pGdMUEE9PfuMHx1G3GpnRw8WEP5FknNoUNOyb6iY5VX/W5w6pnS5r1srs4CXTuHzUJLdvXVpyiQNuBwCyLYlukPjvLuqqHRrv5/jHTa1L+iumi2wLA8NzahM3euE6fvC7shIbIWajyLkVYhWOOdMRjOWdhSN1wi7JvE4t+bFXSVHOX+4DnQxVhhUKacLKMYPHhQKLZSdyYzM66dZ22undenNBcAjNHjBW+9t0W2glcAA/v44VaU8mJJP1Vz1l456kKu23B2wH7M9h1OtAwoGAGj8t///XA7H+OEVSxGjYfFAlM1Upvv/NmvKOBdxK8JXyQLqAqwy0bgja/QQTJKOEDkKXVg8HRGbA4YhU/9KZ5ulhbrnm7S6a3XhSmzHNxDfaPRezgQ0/P9ZW+KbLltsoK42ORYMdpD+ZNjvwybgVPBD9EHv+g73MeRCpYGemyJk33SfCLWO6KdUBlYRNr8Mo+qAoyC9JkWFe7IXV7Z97jmAJIiqXCgQLxyeB+hbtaa+FYbgl1eFTp7G94pdaY/8UctUnxSI5D+T1JSv+XjPm9esp935RnwxdbS6hotafVZHEYXhNE4yJuAqxUJUaOkBZ4Q5Np6wPjASRuycYuHZCHt2R3u3m2lnPOuVzRIM8oEZ+8HzouhdC8oAvg58NyHo8Vf/7w6NRKTABd/OXH580LMQQTdyszsubdMC9/V6zXxPvXQB4tlSIcLFtIZFgSmZyjuhvazQPJXERNOoR7CaZw2muWotmc1HOhl5YIiupxst1r61HraNl8+SaP5hh5c7eE4Z6mR6kPSQtsPTv801VocMwO0llrMRk3g20bZASEJCSF4Xx+DAKcXCpAzekMGHeOQQlMSqol0oZ2ysJ28N7WILeisnEJpp8bXhs8i8xP/JPeJ2mWM/qBOuL4jtzJRTFsHCrSkF/+pIoYxOUwFvqJ2lIDhsQ+Dz/qLXkaF2dV0Db/02Uizaa1nU3ROJmPBQ6h+88RI0hr61bueh7niiMRqzuJoERGL1qHWPKkBT/sDemsRnxsjKFqcFLTTAMZxAHbmHPs5H+gAJu4EWTOsRVgo4wVNO7iEWnl8abB2NKiM08EauUs8uWo5Z315p9I4R8yNXBrdAFfvjjpJnweJotSWdraKLe8Nl/IYJ30/Dch5FFjZQDeUJyDjNQ7UncafuesORQsS8gbMBhIjaMpkz6lFhQXTEwXffXf7Igim1f2TvIBMbUucINFHNBalbwuR9n4nktwHAAfhJinTX1ZSIcI1ivEBZqhr0PihAYnQEI4t+UIeMlIexMcD9pex7ffiC7xTypCNQZ4els7i0w1dRQPGkGSiqBhVpmYU/fa5AEsstEza3yJiyo46A8tdBZR7k+QjkjZi4R3JTDru7uAH8uAs99WmAWo7EtCfnIVcFLpMMVm4ysLp+H8w7tsa7oiAMOicQjpI206qt9gXJK0SRDCqXnpQPO5Za/sa0F9pFtQdk0IWV1bUZl50bsz1jRSgkgGLnG7codLl+O70us5JrrEAGElgaaXnHmCBhRme/TrpssMp3xOmZk0SYGH4jXStL3ojRg1WS450m9OdBzDKSErTczJlZu3nVH0YlqU/vLXp8ZUrVMqDnxO/EDMcahK1NulV8mcj+VKn2kPGku5QKF7iJJ93wd472rPI/Ty+MgECIrxo3TeA9OD96pLAgpF+t5iFercE6smtM9t5wruffSJ5YsS5pfMVNDdsPVS/vqwqHZRqUOSVWSD7wcqsWWt/WN3HUKS6iMJZmWe1iI77VOQ3eXgNA3zI7C5meewdOYjeaBg8EZ4cvdhJKn/67zSZITA8+fLTxDPm67nxcLbn0wDujGAF6ej27TC1GqzrpfQw+lBiRxSz4jn8x6VpAlKugU0gBAuZ2+zgZzWdAbq7juw3/PLVwGoU2eek5v1hW8Yi+T4pFEd7BdDbQRpv5l060TsIDWyr9/Pu6Tx8Sw/pTLwo9gG5L/9I96u2gJNoTogVbEpdYwfpMHBIK4E6gJ5WN2U5wK1nBhrHIFmBXZAyRjaCkurXxFowaB+aWWdVEz+6qj68/QnbWxjpU4xFg9mlaF5HokpyipN1BP+k6+3NQScKOSoApBIXm21svSUNNsYAQ+zgmQ6ZkAuSAynxgKswcfJiuA/e2Nuv6ODDw2h2Ceq5hldyZOZeMHbiAYuM60m33jsww0Uz8+4/Bry8tjZgXaLV/rlL5uP5pLf69IGbOFb1crxcN24yoKmIUAdtPf/co1SMQaxe913fYm8SZSj915c3LIj6HJguanjJB6xbKrwwZw9vmhrhshZpL2fNE3anpscm25z86/pFd9p//RYhaUgA56qx4HTvcD8lvvGAIW22PuYEMmYiZSbeHxpCKrG9iOKsxe7LXBfbQYCY12ed09vd/sLTpEmjuW1E/TSy9EhvRhF69d0KSSUeK1/2fqD9GZPe2s80Jdih9w6NwLxO/AC8AeZjS8gZIOafjhXVpzaKvhix8s1cO27cpUc/x13ywHu7WNVApWpCMNak9/QsanffreW5zk5UGrb/XFcJBpw/fp7Y3P/TiVlv9tm+xxsH4iw1MojhGsNJqBf9G0EGCyYh/OIjLOgv/KiVKn4KT9JKP/Uc0gvWfojQoL2cbQ/YHropMzIdwcarcB8fu08LL6cIHAPb9B2z/Rf4UJL/Ubdmy6jlxdkE01o3uWTeD2rD+IAvKf/22mdXvFK7jqHe499e/ceQouvvdG6cBfIpIAkF5/R7eOANm/YyxLS/ZfMwsdOv+JfuzzugHhAo470jWPURUr0Xn4njgpqI+Qj94gnkGTC0ReIxqIPS1b+RbjDc4MZZ9MAklPArtww4KsqO2JaWOom1/1AxsyPutOFrKBiuTdjE382yfu5g+GJKuwQu3cq2dabFpJyy44S7v5bpURssVtr1D8mxEYVlQ8fly+KRc+ozMRv8u9dj5jffRCTLisRHP3X8ahsJ2oZhd4aftYRWOx0T+gZ97rtkDRPJzlhfgLyMqiSvJjpxVKpv3PStthRNe8R8F9H8DFoPHSzHLmhe/uDSPeh3WffAKbjMKv32PUBbzp6f4GfwfjQD/xKCCRvV98FxqiqzNKlGnRzdZ6TCwaGLcgYygtYmNZKzhf7rOF9XXcVsNe/FloRRkBYeol7dma2BOGazDoZhxAkI5TWDGkO8Rd23eAUtpTOtgLoJdxik+XTsCLBz3xztmixjiZMgk33zVBoTsxJCpowT8UgJm56EBgWIJ8zDHdKSIvYtAuQo90BfPpwlqLFvQ62szIXGObwVCJBdaPQ6AOlSDrg/4M1Xptssca7lnD2z+0dh3f4AYJrPrGcXP9SGBq30IEgvBsrZOjfe7U2ZVguXost19mo1m/Hb/FwWSc3O9fFFBQJhZEYd9T8i0MIYbgdWdTEH41gDraRIKZizyjK4jVPPgi35lSRpQkyGFqloeLs0ULHVnqozYp97FxyjGuHBsWiA1dhcOzxWfb+9L2kk8EkzMe++yJQ9GqbD1xtOvYtb2UOexwpbDJAFJlPRYBxrMkATgGwSW4A2LWZy+pBo0GmiM1YGavhsPEBxglF83gZ9QIggiukPYB85BDmmb8ru99wD+DQvP4hu2YCz6A5kp/sJD3qOI7HIsJxRDkaO3sf/bYfZuqa3LdVmIT853KYb79N6neXufSxFSQnyi30mJHYwVcLOmAbDRvHYwF83Y4b3NN8NOUSH4LXUFaZBoYelYzeiQg8IgkLa+g/RwRCUThxaOaTGfQNDGN2fFLJrDqh88e6T9bmWy9AzEoG29fv9hO+1zA0iEWnoTtNr1dBlC2eHYfWgoiWCBVcaC6cO6fIpEIncf2VapcojDaS3FujWm+w8IoiKoq9+Zzm1wng7TIKJKpp1mkbm3M2In/0vTqkGRtDVzLmUu/MzvzlpfyE7VFsAdsreB5BqSs60/mfodU1+j2SN84H1YurnWx4Z0u73N5QCNLLIlXEzvcE48IcvnvHogKXfYviH/f2iBtI3vrK3GIiThSR8ykXmUtIrxTtqbHvy82xxbyqM/ya2sKPKRdTrD85uEPL0Z8dvPiUfiVRCut4V5CnXWKzMKwmyXh2zdT/Wx1klkw4ixJ8NP/3JGF0lDVYVde7ZwEYrPdHJhgCgfH5KfwXpHykSyj20QwjG+7rDeFrrmlBS2dEbI2bOB2rMTgueOmZlfczR+dUuIss1K61IE1X8XChw2KIfkpCOP4G5DW2FBnK7MOx72/39EtlmaGIvi2uPD/S5KJCGWSH/ADxGkdDXJbT7IjwL0GTIWO1pkQgtPfrQ4KW84E+PdkU9hIuQO3a3Vgp9tGVCmDEX5bfo3c8W46FFBoLX5w3HFzNNkhTPTtJV+IO6h3yF4X9d2YxLqM+HnAwS2XyEvNrrcQbJx60XMbhF2fZy8hFLKLl0VHYvud4N/vW3v2siUFHw/s3F2S/62Z0mef3ERpa+28r0gvweNyUduP3KKmphD4cnGwoSlKz/BeXUnlO/hw9Eftd/qtYsyl+fxCu6ydlFSjlf8r5gsxR3kPUVtX3Z+hYk0O6LvcRQsJSnlitd9TCW4zGE59EoMxN2N0izBRDgAAAAAAA==",Cd="data:image/webp;base64,UklGRgwMAABXRUJQVlA4IAAMAABQMwCdASqOAI4APjkYiUMiIaEZqk6cIAOEtQBlWQCsPxs/GflL+WHzA1P+zfhD+l/sr8cvBbpH0DOTP9j/evah/rPUf5gn6af7r+49dfzDfsz+yPvGf6f1W/4r/M+wB/P/9T/8+wi9BLyzP28+En9t/3N9pH/y+wB///UA///FKf5/td/0HnLBOfeD9h6++yHaw/yO+agA+p/ExpOMeXoT54Xq72Df1z9Mz2AfuT7OS8YmVmOsmf5jqgueuMtdVDf7/8IGxCrKJVChp/KFp2oKFsO3+XUmwngaj6/KEi7C1DSuCh+zzCla9qnnEkR/lN/ebybUtOwxC/p+mhLOJMySpLEWwLMbmUzXCqcNK16hnpbCN+9vw3+nXHO91JFWS3EIj7YQRHRQllV+lVSTFM7EpzAIoof/7r+m1Y4VEnW29BCxuD7ccWEUcsaJd2V30EeDTbQCaEKZWFPJDxNOW38bQtKqiq2JW1YTvNG580QG2R6n6RStIpR01qX2WRZI0IQp89aKwHBuygxv09yseoLGd7tytCoaI5ow7+H+adzdekfWYAD+/t14UP643nlJr6+fzCSALmONrhm1HM9r/VJjGO780J/4xzq4fmwzMh+yAP7ORoQMYPQFL8+iKum/1qkeJnhtmLx36EDUhiylPQ1f/qsUYuEhCbZyW2XdXCBD6slorbYJhPZwGmkvNnewiRvcjvWe/0lvRe9+QjeaSNVOY2ffJT8NEWYqjJz0kA+mY53/IW+QpHju9l0d6eT6y8FYqHsW468sTTOvbtnAoyEhXaKkNND6o8lteDtnWHy+Odw4k0hfK3nM0cM+kp2GLZ+CT8ioE50GyNbNgn8B8vCW4Eb1K4YoeNGuq1kvFzfgCWvcW2sZTTO3e5pXWr9cnX3FbDGqPTujc9duJ35YmVbpjyAcEoH1KCsTRrycxu43ZGHhfL+GmEAA8o+8wd8lAHeorj9Ryp7uuWZ38R9AQACcqcUXurMjB7gxTl/8xweLH63MF21d2KMg4fem8ZkD3SkUG7Q2rP54BMmdjxJ9JgaZUrMBrV9GFqpJczgl9UAaP3Q/7R7nbexZ2UeB3HiCy5MKPjugecflKlll5aFJ07nRCYyOLOH9fb16mNlL9mWM259E31qcK4wpda3WGYMHOBOaKNfOxovW/u1df+qNevMn1SC/4vGKJstZ9PqE5btrilfwv0nSAQj/Q8dWAb3WKIAty9DT33t9vLz+e4aQNXru1U9rK+wTBmpCqEX9pSfSBywG8++6tF9Dzvt2dp4Ly/5FJPaOcH8+nU1a4l+XoTwpqk+yKJ0iY57ceXfl4fU77cs/8L0P1s44NWEIIX86Dx3zJvZGkQIn7YASFbLuKUuL3yyRmjK3epZIzS8q6ehQeQqVqnUw5eIPN0EX1yynGeDQjR24rjnxVtUlIqynCfszNLYPYyMIwwON0q2nCWvku6CZCUlEuZx+rruZ0xqcBzHF3xWmXItXuids516hkBSbPMThKqgTUZMGMMZ62azX5N94SBL7v+uS3P1ZCIza02Pgn8T/7NTE78CT0LmzqBEC1cH4OXLHyTqY4j+Cv4FoAejB3EJwCMhQiMLdnkb5qW+J4vEOTFUB7Xtvd2QgBXt0k5szm1QueRBDJMGAt549zXUvC1ayeSEuaGWhwb/JWOZA0tRqXLQIHMmA82/fqojN7zFdCeuCpV6YJGfleJFx9hM3E7DqKfRPG4dnevUWEzc89PCbOwSauxRXX967+DJbLaRzaXYPAP/+OlZ3hsk3xp6FDz62cJz/7UaqZ+L8ljKHJDJWb9z+bmcBGTKwg/bFy7aMSTVyVg/9Enj7xbwkU2zfy1/pKg7+NgTQWum04uv1OJbN57ArGK7D490MId38WjC65l78Pzu7NrN+B5ijzNoWH04e9Pcl73tni1fiORqqFrog6q/CamsBAlZRZWBLHKtN6Yh//b8qVGprn8VPF/VK7nZW70N1XtzyT2leLRfwRBqo4SIhuvqxOdHKNJHg1LXTlB/coShBHuyLS6wu/+o/YEwXybvqf7Ojys881X2cXNmexU04k0vUcyy+rKGmM6FnI6THfe2Tix72WnhHh2AingEVPQUoIIJG/7B5WrgJ2xfS2lCjFca1D73Hm7ye+fLOZSi+2TchrOAv2hi5xEYo5KiLYwKu2IfS0p+QqzkMEFyCIOuC5NFapFAWKWQ4O86kaENGqe1+v1ZILPmw86ztmGYuIizbkFakccHhURH+Ve+h8AyTPfiC9+E5uxgWh8E6sT7nhJN09IOah7RxqqKRX6/DFYH2bNmBZyWTrbWW1s1eweEC3mN7vG3Xt9bpw4bRqMuHNPiNK85445nBEmityQdIjtjF3JrZ9HpOaGrIuaaeW3iH7C44ITfsHcVJY/vTdpC3tqmtf6/BZ93mlQFBY0MluEiRTe7oUB1E7LiUGz8rkQZKJJIZ8JMSfjqUHyhDrL+B56rUW+pbd3PqVOLYiTglN+0DPhK3WpSI6wpdyvXOsWHG4Ta5xPCXk5JZSlld8F/X2O2QLiHXW587NTGkyZLQ6JCTo39tmm7vd3es4poNsDPbjhYJyGpRAqxjHLWCeyeJlvbDOieNltR+r952RSdtbkG3oHdvfxW6Pjb2YAyxaThXMTTyT/zYYm1Io6wic5GHpk2XOYbuPpM7ZevMxHtXuBU8xAFZEdeyKTe9uH/UGK8BYHm+N3bjkSBBpccHo+7RNVIX0s99vCP2NiXc4nAAswcNqVIDGDGL6yw9mQLnqJf67m0nhpkYMDU727dp0HJr9Ha4iu2nYrY4WbHC36j2N6iLfMKcTWaiJt5jGxWzb8A4vlC0YiHxi5G6hurHxARx6MMSf0bJmtyeeiRQVN0qy7dj2EAbarH0fHm8s8R9FBsmP+MaJ0EUAPwv7ty5BsY6D6Hyr/0JE2SgiBzriUqckvhNPR/OwC+JD1Mm2bjOFSq3qsiw9Kiw1KRymrWkF4Qd4V3XEi19kg/72fWqSSD/uvXkbLvcUeuGxmWIlDoBdKEkl/ld8xhLrLwdg7FyqOP4DS3VTAlFdd9/5MRMl56GDvO+HKTHXbsW9X+r6GRr2IX31uEVBI3/pfOScwYkF4hYkTmzP22VY8UCUvDruM6mfYED5HA88Gd+rn0t/0+v1vs1ArAcyeSS+U1QWvfTziu2+evgTaZB/x2HIzCmH0LGpMC6803Upr2innO/UcDUHEYKg6Un3+HxdlU2lPbniy4HPzLfzrAE94TRlcuoeOqrcTI7eAgYRNKwXh7XIeFrCsmIRgrt8YMu2v4jM0icqwly+QPuy2Kw8J6cXH2BA7K2LAF85VIVNVoRlDLXxjwsBb4heeCxAzkU+gm7I1b5uvL3i2xq/xj+lhL8t6XTKJliRrlPGHQuVR3ZceU87KLxOQcICfVOCe7B88mxyvsB2FmiotOM3UOnG+VcZ3jL1W+JFDzYyR9Y3KsZNaeJAazd5ajmnZLTYIY7gJ4N4t99U2hY/CMgI0yMNLaq3cJB0CNBsd1hRKl7lZ1wMh16/EZx5jig5JWvlZNPTMuJFHvpW42fyFjIfKslwVHB/SJKWDRr3w9uFCRm/Z3ABn2ydMFGvXjMZEaTsZlqF17J76wjrLkgmgcbtrtL9N8T3dXsKhM4LPscSPo2kc9MfW3dmjuo98vCdxBR/RvMAgm0VzEuXulny1QdmDMzoBUfPseIFkTNYFg89+m4OKn/8Xc28jcPteGx8v0vwYyKNlOAZvi/yt7OImF7kADj+rzqjSoqwVTnCCjOKrF1Gt1i+6oeDggdd5wEh1ghvxdHELxvJeJE8x82cfHEVXhE9Nheu7Q1WycLXUTZA8oZHsdBaBFpk6vyYdYFT8YTShaCjPle1+2DJHzXzhRUQ6ZY/HcDs/vS2V8+jO+pjV23u5WL6yRWULzVi+0qUXIiJzd9qj65YnWPMxIubcSpm+5n8vMpysoMuGzoNwBmNszF+S+b8acZRgm2Gi0UT5OGuYwq4wZ5kmd8OqnDzhze2RxwMRtRm+17eKYWzLWtgVuOca/HWuBI58UC9FNZtBLv1l2htg7Iyehb/cr9uKvXkPXh0LFeyfEc49dOsGvppssGqOAAAAA=",Id=a.div`
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 24px;
5
+ padding: 12px 16px 16px;
6
+ min-height: 0;
7
+ overflow-y: auto;
8
+ `,Sd=a.div`
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ gap: 8px;
13
+ padding-bottom: 16px;
14
+ border-bottom: 1px solid ${n.colors.gray4};
15
+ `,Ad=a.h2`
16
+ margin: 0;
17
+ font-family: ${n.font.sans};
18
+ font-weight: 600;
19
+ font-size: 20px;
20
+ line-height: 1.6;
21
+ color: ${n.colors.text};
22
+ `,Md=a.button`
23
+ flex: none;
24
+ display: grid;
25
+ place-items: center;
26
+ width: 18.535px;
27
+ height: 18.535px;
28
+ border: 0;
29
+ background: none;
30
+ cursor: pointer;
31
+ color: ${n.colors.text};
32
+
33
+ &:disabled {
34
+ opacity: 0.4;
35
+ cursor: default;
36
+ }
37
+ &:focus-visible {
38
+ outline: 2px solid ${n.colors.accent};
39
+ outline-offset: 2px;
40
+ }
41
+ `,zd=a.div`
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 12px;
45
+ `,Rd=a.div`
46
+ flex: none;
47
+ display: grid;
48
+ place-items: center;
49
+ width: 180.465px;
50
+ height: 179.763px;
51
+ border-radius: 15.746px;
52
+ background: ${n.colors.media};
53
+ border: 0.176px solid ${n.colors.muted2};
54
+ overflow: hidden;
55
+
56
+ img {
57
+ width: 149.568px;
58
+ height: 148.866px;
59
+ object-fit: contain;
60
+ filter: drop-shadow(0.736px 2.945px 3.682px rgba(0, 0, 0, 0.1));
61
+ }
62
+
63
+ ${n.media.maxWidth("mobile")} {
64
+ width: 120px;
65
+ height: 120px;
66
+ }
67
+ `,Ld=a.div`
68
+ flex: 1 1 0;
69
+ min-width: 0;
70
+ display: flex;
71
+ flex-direction: column;
72
+ gap: 32px;
73
+ padding: 8px;
74
+ `,Pd=a.p`
75
+ margin: 0;
76
+ font-family: ${n.font.sans};
77
+ font-weight: 600;
78
+ font-size: 20px;
79
+ line-height: 1.57;
80
+ color: ${n.colors.text};
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ `,Td=a.div`
84
+ > div {
85
+ font-family: ${n.font.sans};
86
+ font-size: 10px;
87
+ line-height: 1.43;
88
+ color: ${n.colors.muted};
89
+ }
90
+ `,Ed=a.div`
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 4px;
94
+
95
+ /* A 24px slot holding a 19.855px glyph — keep both boxes rather than one flat size. */
96
+ .ico {
97
+ width: 24px;
98
+ height: 24px;
99
+ background: ${n.colors.text2};
100
+ -webkit-mask-size: 19.855px 19.855px;
101
+ mask-size: 19.855px 19.855px;
102
+ -webkit-mask-position: left center;
103
+ mask-position: left center;
104
+ }
105
+ span {
106
+ font-family: ${n.font.sans};
107
+ font-weight: 600;
108
+ font-size: 24px;
109
+ color: ${n.colors.text2};
110
+ }
111
+ `,Fd=a.div`
112
+ display: flex;
113
+ flex-direction: column;
114
+ gap: 12px;
115
+ `,Qi=a.button`
116
+ position: relative;
117
+ display: flex;
118
+ align-items: center;
119
+ justify-content: space-between;
120
+ width: 100%;
121
+ padding: 12px 12px 12px 0;
122
+ border-radius: 12px;
123
+ border: 0;
124
+ background: ${n.colors.white};
125
+ cursor: pointer;
126
+ text-align: left;
127
+ font-family: ${n.font.sans};
128
+
129
+ &::after {
130
+ content: '';
131
+ position: absolute;
132
+ inset: 0;
133
+ border-radius: inherit;
134
+ border: 0.5px solid ${n.colors.muted};
135
+ pointer-events: none;
136
+ }
137
+
138
+ &[data-selected='true'] {
139
+ background: ${n.colors.media};
140
+ }
141
+ /* The gradient is masked to the border band alone, so the ring paints over nothing: a padding-box fill
142
+ here would sit on top of the row's content, since this layer is above it. */
143
+ &[data-selected='true']::after {
144
+ border: 3px solid transparent;
145
+ background: ${n.gradients.flare} border-box;
146
+ -webkit-mask:
147
+ linear-gradient(#000 0 0) padding-box,
148
+ linear-gradient(#000 0 0);
149
+ -webkit-mask-composite: xor;
150
+ mask-composite: exclude;
151
+ }
152
+ &[data-disabled='true'] {
153
+ cursor: not-allowed;
154
+ opacity: 0.55;
155
+ }
156
+ &:focus-visible {
157
+ outline: 2px solid ${n.colors.accent};
158
+ outline-offset: 2px;
159
+ }
160
+ `,Gi=a.div`
161
+ flex: none;
162
+ display: flex;
163
+ align-items: center;
164
+ justify-content: center;
165
+ min-width: 36px;
166
+ /* 12px on the left (per review) so the control clears the row's rounded corner; 9px elsewhere. */
167
+ padding: 9px 9px 9px 12px;
168
+ `,_i=a.span`
169
+ display: grid;
170
+ place-items: center;
171
+ width: 20px;
172
+ height: 20px;
173
+ border-radius: 4px;
174
+ border: 2px solid ${n.colors.muted2};
175
+ background: ${n.colors.white};
176
+
177
+ &[data-checked='true'] {
178
+ border-color: ${n.colors.text};
179
+ background: ${n.colors.text};
180
+ }
181
+ .ico {
182
+ width: 14px;
183
+ height: 14px;
184
+ background: ${n.colors.white};
185
+ }
186
+ `,Vi=a.div`
187
+ flex: 1 1 0;
188
+ min-width: 0;
189
+ display: flex;
190
+ align-items: center;
191
+ justify-content: space-between;
192
+ gap: 8px;
193
+ `,Ji=a.div`
194
+ display: flex;
195
+ align-items: center;
196
+ gap: 13px;
197
+ min-width: 0;
198
+ `,Yi=a.span`
199
+ flex: none;
200
+ display: grid;
201
+ place-items: center;
202
+ `,Xi=a.img`
203
+ flex: none;
204
+ display: block;
205
+ width: ${({w:t})=>t}px;
206
+ height: ${({h:t})=>t}px;
207
+ object-fit: contain;
208
+ `,Zi=a.div`
209
+ display: flex;
210
+ flex-direction: column;
211
+ min-width: 0;
212
+ `,ea=a.span`
213
+ text-transform: capitalize;
214
+ font-family: ${n.font.sans};
215
+ font-weight: 700;
216
+ font-size: 15px;
217
+ line-height: 26px;
218
+ letter-spacing: -0.2px;
219
+ color: ${n.colors.text2};
220
+ `,ta=a.span`
221
+ display: flex;
222
+ align-items: center;
223
+ gap: 4px;
224
+ font-family: ${n.font.sans};
225
+ font-size: 12px;
226
+ line-height: 1;
227
+ color: ${n.colors.muted1};
228
+
229
+ /* A 13px slot holding a 10.4px glyph. */
230
+ .ico {
231
+ width: 13px;
232
+ height: 13px;
233
+ background: ${n.colors.text};
234
+ -webkit-mask-size: 10.4px 10.4px;
235
+ mask-size: 10.4px 10.4px;
236
+ -webkit-mask-position: left center;
237
+ mask-position: left center;
238
+ }
239
+ `,na=a.span`
240
+ font-size: 10.4px;
241
+ color: ${n.colors.text};
242
+ `;a.span`
243
+ font-family: ${n.font.sans};
244
+ font-size: 12px;
245
+ font-weight: 600;
246
+ color: ${n.colors.dclRed};
247
+ `;const ia=a.div`
248
+ flex: none;
249
+ display: flex;
250
+ align-items: center;
251
+ gap: 6px;
252
+
253
+ .ico {
254
+ width: 24px;
255
+ height: 24px;
256
+ background: ${n.colors.text2};
257
+ -webkit-mask-size: 19.855px 19.855px;
258
+ mask-size: 19.855px 19.855px;
259
+ -webkit-mask-position: left center;
260
+ mask-position: left center;
261
+ }
262
+ span {
263
+ font-family: ${n.font.sans};
264
+ font-weight: 600;
265
+ font-size: 20px;
266
+ color: ${n.colors.text2};
267
+ }
268
+ `,aa=a.div`
269
+ flex: none;
270
+ display: flex;
271
+ flex-direction: column;
272
+ align-items: flex-end;
273
+ gap: 2px;
274
+ `,Bd=a.button`
275
+ width: 100%;
276
+ height: 46px;
277
+ border: 0;
278
+ border-radius: 12px;
279
+ cursor: pointer;
280
+ background: ${n.gradients.amethyst};
281
+ color: ${n.colors.softWhite};
282
+ font-family: ${n.font.sans};
283
+ font-weight: 600;
284
+ font-size: 15px;
285
+ line-height: 24px;
286
+ letter-spacing: 0.46px;
287
+ text-transform: uppercase;
288
+
289
+ &:hover:not(:disabled) {
290
+ filter: brightness(1.05);
291
+ }
292
+ &:focus-visible {
293
+ outline: 2px solid ${n.colors.accent};
294
+ outline-offset: 2px;
295
+ }
296
+ &:disabled {
297
+ opacity: 0.6;
298
+ cursor: default;
299
+ }
300
+ `,Nd=a.img`
301
+ width: 13px;
302
+ height: 13px;
303
+ display: block;
304
+ `,Wd=a.img`
305
+ width: 24px;
306
+ height: 24px;
307
+ display: block;
308
+ `;a.span`
309
+ flex: none;
310
+ width: 32px;
311
+ display: grid;
312
+ gap: 2px;
313
+ place-items: center;
314
+
315
+ .ico {
316
+ width: 15px;
317
+ height: 15px;
318
+ background: ${n.colors.text2};
319
+ }
320
+ img {
321
+ width: 15px;
322
+ height: 15px;
323
+ display: block;
324
+ }
325
+ `;a.div`
326
+ flex: none;
327
+ display: flex;
328
+ align-items: center;
329
+ gap: 4px;
330
+
331
+ .ico {
332
+ width: 18px;
333
+ height: 18px;
334
+ background: ${n.colors.text2};
335
+ }
336
+ img {
337
+ width: 18px;
338
+ height: 18px;
339
+ display: block;
340
+ }
341
+ span {
342
+ font-family: ${n.font.sans};
343
+ font-weight: 600;
344
+ font-size: 17px;
345
+ color: ${n.colors.text2};
346
+ }
347
+ `;a.span`
348
+ font-family: ${n.font.sans};
349
+ font-weight: 600;
350
+ font-size: 15px;
351
+ color: ${n.colors.muted};
352
+ `;const Dd=a.span`
353
+ font-family: ${n.font.sans};
354
+ font-size: 11px;
355
+ line-height: 1.35;
356
+ color: ${n.colors.muted};
357
+ `,Od=a.p`
358
+ display: flex;
359
+ align-items: flex-start;
360
+ gap: 12px;
361
+ margin: 0;
362
+ background: rgba(255, 162, 90, 0.3);
363
+ border-radius: ${n.radius.btn};
364
+ padding: 16px;
365
+ font-family: ${n.font.sans};
366
+ font-size: 14px;
367
+ line-height: 1.334;
368
+ color: ${n.colors.text2};
369
+ `;function qd({item:t,priceCredits:s,priceCents:l,options:o,priceManaWei:d,balanceCredits:u,manaBalanceWei:x,onBuy:m,onClose:y,busy:$=!1,notice:h}){const g=o.find(A=>A.method==="credits")??null,w=o.find(A=>A.method==="mana")??null,k=o.find(A=>A.method==="combined")??null,[I,C]=c.useState(()=>g?new Set(["credits"]):k?new Set(["credits","mana"]):w?new Set(["mana"]):new Set),S=!!g||!!k,B=!!w||!!k;c.useEffect(()=>{C(A=>{const R=new Set(A);return R.has("credits")&&!S&&R.delete("credits"),R.has("mana")&&!B&&R.delete("mana"),R.size===A.size?A:R})},[S,B]);const f=I.has("credits"),N=I.has("mana"),r=f&&N?k?"combined":null:f?g?"credits":null:N&&w?"mana":null,E=r==="combined"&&k?k.credits:(g==null?void 0:g.credits)??Qe(l),Y=r==="combined"&&k?k.manaWei:(w==null?void 0:w.manaWei)??d;function U(A){C(R=>{const K=new Set(R);return K.has(A)?K.delete(A):K.add(A),K})}return e.jsxs(Id,{children:[e.jsxs(Sd,{children:[e.jsx(Ad,{children:i("buyModal.choosePayment")}),e.jsx(Md,{onClick:y,disabled:$,"aria-label":i("buyModal.close"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(zd,{children:[e.jsx(Rd,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(Ld,{children:[e.jsxs("div",{children:[e.jsx(Pd,{title:t.name,children:t.name||i("buyModal.itemFallback")}),t.creator?e.jsx(Td,{children:e.jsx(xs,{address:t.creator})}):null]}),e.jsxs(Ed,{children:[e.jsx(ve,{}),e.jsx("span",{children:Ge(s)})]})]})]}),e.jsxs(Fd,{children:[e.jsxs(Qi,{type:"button","data-testid":"pay-with-credits","data-selected":f,"data-disabled":!S,disabled:$||!S,"aria-pressed":f,onClick:()=>U("credits"),children:[e.jsx(Gi,{children:e.jsx(_i,{"data-checked":f,children:e.jsx(L,{name:"check",className:"ico"})})}),e.jsxs(Vi,{children:[e.jsxs(Ji,{children:[e.jsx(Yi,{children:e.jsx(Xi,{src:$d,w:32.582,h:34.401,alt:"","aria-hidden":!0})}),e.jsxs(Zi,{children:[e.jsx(ea,{children:ze.name}),e.jsxs(ta,{children:[i("buyModal.creditsBalanceLabel"),e.jsx(ve,{}),e.jsx(na,{children:Ge(u)})]})]})]}),e.jsx(aa,{children:e.jsxs(ia,{children:[e.jsx(ve,{}),e.jsx("span",{children:Ge(E)})]})})]})]}),e.jsxs(Qi,{type:"button","data-testid":"pay-with-mana","data-selected":N,"data-disabled":!B,disabled:$||!B,"aria-pressed":N,onClick:()=>U("mana"),children:[e.jsx(Gi,{children:e.jsx(_i,{"data-checked":N,children:e.jsx(L,{name:"check",className:"ico"})})}),e.jsxs(Vi,{children:[e.jsxs(Ji,{children:[e.jsx(Yi,{children:e.jsx(Xi,{src:Cd,w:35.328,h:35.328,alt:"","aria-hidden":!0})}),e.jsxs(Zi,{children:[e.jsx(ea,{children:i("buyModal.methodMana")}),e.jsxs(ta,{children:[i("buyModal.manaBalanceLabel"),e.jsx(Nd,{src:Di,alt:"","aria-hidden":!0}),e.jsx(na,{children:zi(x)})]})]})]}),e.jsx(aa,{children:B?e.jsx(e.Fragment,{children:e.jsxs(ia,{children:[e.jsx(Wd,{src:Di,alt:"","aria-hidden":!0}),e.jsx("span",{children:zi(Y)})]})}):e.jsx(Dd,{"data-testid":"mana-shortfall-note",children:i("buyModal.notEnoughMana")})})]})]})]}),h?e.jsx(Od,{"data-testid":"price-changed",role:"status",children:h}):null,e.jsx(Bd,{type:"button","data-testid":"confirm-payment",disabled:$||r===null,onClick:()=>r&&m(r),children:i("buyModal.buy")})]})}function zr(){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 Kd=Ql("0.05");async function Hd(t){try{return(await new Ul(st.rpcUrl).getBalance(t)).gte(Kd)}catch{return!1}}async function Ud(t,s){return en(t)?Hd(s):!1}function Qd({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 Gd=t=>ks(t.contractAddress,String(t.itemId));async function ra(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return $s(await Cs(t.trade),t.coupon)}catch(l){return s.reportFailure!==!1&&ue(l,{flow:"buy",step:"mana_price"}),null}}function sa(t){return t.kind==="trade"?t.trade.id:void 0}function oa(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function Bn({item:t,onClose:s,resume:l=!1}){var Nt,$t;const{session:o}=ot(),{data:d}=rr(o),{data:u}=fs(o),x=dt(),m=lt();async function y(){try{return await x.fetchQuery(js())}catch{return}}async function $(){if(u!=null)return u;if(!o)return 0n;try{const b=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>Ss(o.address),staleTime:3e4});return ee(b),b}catch{return 0n}}const h=Pl().packs.slice(0,Tl),[g,w]=c.useState("loading"),[k,I]=c.useState(null),[C,S]=c.useState(null),[B,f]=c.useState(!1),[N,r]=c.useState(0),[E,Y]=c.useState(""),[U,A]=c.useState(t.priceCredits),R=Math.max(0,U-((d==null?void 0:d.credits)??0)),K=(()=>{if(R<=0)return h;const b=h.filter(M=>M.credits>=R);return b.length>0?b:h})(),[G,ne]=c.useState(null),[de,ee]=c.useState(null),_=u??de??0n,[O,H]=c.useState(!1),[v,fe]=c.useState(null),[P,F]=c.useState(0),[z,se]=c.useState(null),[ie,xe]=c.useState(!1),Q=c.useRef(null),oe=c.useRef(!1),Z=c.useRef(zr()),Ce=(z==null?void 0:z.credits)??U,ce=(d==null?void 0:d.credits)??0;c.useEffect(()=>(oe.current=!1,()=>{oe.current=!0}),[]);async function V(b,M,T,W){const J=await $();if(W!=null&&W())return;const ae=J>0n,D=ae?await ra(M):null;if(W!=null&&W())return;D!=null?ne(D):ae&&H(!0);const Se=Ei({priceCents:T,priceManaWei:D??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:J}).options.some(pt=>pt.method==="mana"||pt.method==="combined"),Re=b-((d==null?void 0:d.credits)??0),ut=h.find(pt=>pt.credits>=Re)??h[h.length-1];Y(ut.id),Se||X("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:b,credits_balance:(d==null?void 0:d.credits)??0,shortfall:Math.max(0,Re)}),w("nofunds")}c.useEffect(()=>{let b=!1;if(!o){w("error"),I(i("buyModal.signInToCheckout"));return}return(async()=>{try{const M=await El(t,o.address,ms,await y(),Gd,gs);if(M.status==="own")throw new Error("You can't buy your own listing.");if(M.status==="no-price")throw new Error("price unavailable");if(M.status!=="buyable")throw new Error("not for sale");const T=Fl(M.line),W=M.line.usdCents,J=Qe(W);if(b)return;if(A(J),fe(T),F(W),d!=null&&d.credits<J){await V(J,T,W,()=>b);return}l?qe({sale:T,usdCents:W}):w("ready")}catch(M){if(b)return;X(we(M)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:$e(M)}),Ne(M)}})(),()=>{b=!0,Q.current&&o&&(on([Q.current]),Q.current=null)}},[N]),c.useEffect(()=>{const b=(z==null?void 0:z.sale)??v;if(!b||g!=="ready"&&g!=="nofunds"||_<=0n||G!==null)return;let M=!1;return ra(b,{reportFailure:!O}).then(T=>{M||(T!=null?ne(T):H(!0))}),()=>{M=!0}},[g,z,v,_,G,O]);const Be=Ei({priceCents:P,priceManaWei:G??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:_});async function qe(b){const M=(z==null?void 0:z.sale)??(b==null?void 0:b.sale)??v,T=(z==null?void 0:z.usdCents)??(b==null?void 0:b.usdCents)??P;if(!o||!M||T<=0)return;w("processing"),I(null),xe(!1);let W=z;if(!W)try{const{credit:D,maxCreditedValue:pe,usdCents:Se}=await Fn(o.identity,T,sa(M),oa(t));if(oe.current){be([D.id]);return}Q.current=D.id,x.invalidateQueries({queryKey:["usd-balance"]});const Re=Qe(Se);if(W={sale:M,credit:D,maxCreditedValue:pe,usdCents:Se,credits:Re},se(W),Re!==Qe(T)){A(Re),F(Se),xe(!0),w("ready");return}}catch(D){if(Yl(D)){x.invalidateQueries({queryKey:["usd-balance"]}),await V(Qe(T),M,T);return}we(D)||ue(D,{flow:"buy",step:"authorize"}),X(we(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:$e(D)}),I(_e(D,i("buyModal.error.generic"),{sale:!0})),w("error");return}if(!W)return;let J=!1,ae;try{const D={purchase:zo(W.sale,[W.credit],W.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:pe})=>Z.current.broadcast(W.credit.id,pe),onReverted:({txHash:pe})=>{pe&&Z.current.reverted(pe)}};if(Z.current.submitStarted(W.credit.id),vr())try{ae=await Vl(D),Z.current.broadcast(W.credit.id,ae),await $r(ae),J=!0}catch(pe){if(pe instanceof Cr)J=!0;else if(pe instanceof Ir){if(pe.reason==="relayer-unreachable")throw Z.current.unobservable(W.credit.id),pe;if(!en(o.providerType))throw pe;ae=await Ni(D)}else throw ae&&Z.current.reverted(ae),pe}else ae=await Ni(D)}catch(D){Z.current.submitFinished(W.credit.id),we(D)||ue(D,{flow:"buy",step:"submit",gasless:J}),Xe([W.credit.id]),Q.current=null,X(we(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$e(D)}),x.invalidateQueries({queryKey:["usd-balance"]}),Ne(D);return}Z.current.submitFinished(W.credit.id),Q.current=null;try{Ro(x,t),X("Shop Completed Purchase",{...pn([t]),payment_type:"credits",no_crypto_step:J,transaction_hash:ae??null})}catch(D){ue(D,{flow:"buy",step:"post_purchase"})}w("complete")}function be(b){if(!o||b.length===0)return Promise.resolve(!1);const M=b.filter(T=>!Z.current.mayBeConsumed(T));return M.length===0?Promise.resolve(!1):sr(o.identity,M).then(()=>!0,()=>!0)}function Xe(b){f(!0),be(b).then(M=>{M||f(!1)})}function on(b){return be(b.filter(M=>!Z.current.isInFlight(M)))}function Pt(){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 Tt(){var M;const b=(z==null?void 0:z.sale)??v;if(!(!o||!b)){Q.current&&(Xe([Q.current]),Q.current=null),w("processing"),I(null);try{const T=(M=Bi(Be,"mana"))==null?void 0:M.manaWei,W=b.kind==="trade"?await xl({trade:b.trade,coupon:b.coupon,buyer:o.address,signer:o.signer,manaWei:T}):await fl({mint:b.mint,buyer:o.address,signer:o.signer,manaWei:T});X("Shop Completed Purchase",{...pn([t]),payment_type:"mana",transaction_hash:W??null}),Pt(),w("complete")}catch(T){we(T)||ue(T,{flow:"buy_mana",step:"submit"}),X(we(T)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$e(T)}),Ne(T)}}}async function vt(){const b=(z==null?void 0:z.sale)??v,M=Bi(Be,"combined");if(!o||!b||!M)return;w("processing"),I(null),Q.current&&(await be([Q.current])&&f(!0),Q.current=null);let T=null,W;try{const{credit:J}=await Fn(o.identity,M.creditsCents,sa(b),oa(t));T=J.id,Z.current.submitStarted(J.id);const ae={buyer:o.address,signer:o.signer,credits:[J],manaGapWei:M.manaWei,providerType:o.providerType,onBroadcast:({txHash:D})=>Z.current.broadcast(J.id,D),onReverted:({txHash:D})=>{D&&Z.current.reverted(D)},onUnobservable:()=>Z.current.unobservable(J.id)};W=b.kind==="trade"?await ml({trade:b.trade,coupon:b.coupon,...ae}):await gl({mint:b.mint,...ae})}catch(J){T&&Z.current.submitFinished(T),T&&Xe([T]),we(J)||ue(J,{flow:"buy_credits_and_mana",step:"submit"}),X(we(J)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$e(J)}),x.invalidateQueries({queryKey:["usd-balance"]}),Ne(J);return}T&&Z.current.submitFinished(T);try{Pt(),X("Shop Completed Purchase",{...pn([t]),payment_type:"credits_and_mana",transaction_hash:W??null})}catch(J){ue(J,{flow:"buy_credits_and_mana",step:"post_purchase"})}w("complete")}async function Ze(){if(!(!E||!o)){try{sessionStorage.setItem(qi,JSON.stringify(t))}catch{}Q.current&&(be([Q.current]),Q.current=null),se(null),w("loading");try{const b=await Bl(E,{address:o.address,identity:o.identity});if(b.url){window.location.href=b.url;return}m("/credits")}catch(b){ue(b,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(qi)}catch{}I(i("buyModal.error.creditsCheckout")),w("error")}}}const[ke,ct]=c.useState(null);function me(b,M){const{spender:T,chainId:W}=bl(b,M);return Dl(W,T)}function Ne(b){if(I(_e(b,i("buyModal.error.generic"),{sale:!0})),w("error"),!bs(b)||!o)return;const M=b.required;(async()=>{if(await Ud(o.providerType,o.address)){S(M);return}I(i("buyModal.error.relayDownNoRail"))})()}async function Ke(b){if(o){S(null);try{await Is(o.web3Provider,b)}catch(M){we(M)||ue(M,{flow:"buy",step:"switch_chain"}),S(b);return}Ft()}}function He(b){b==="mana"?Tt():b==="combined"?vt():qe()}const We=c.useRef(!1);async function Ie(b){var M;if(!We.current){We.current=!0;try{const T=(z==null?void 0:z.sale)??v;if(b==="credits"||!T||!o){He(b);return}const W=me(b,T),J=((M=Be.options.find(D=>D.method===b))==null?void 0:M.manaWei)??0n,ae=await jr(W,o.address,J).catch(()=>!0);if(Wl(o.providerType,ae)){ct({auth:W,rail:b});return}He(b)}finally{We.current=!1}}}const jt=Be.options.some(b=>b.method==="mana"||b.method==="combined"),Et=g==="ready"&&(jt||Be.manaShortfall!=null)||g==="nofunds"&&jt;function Ft(){I(null),se(null),xe(!1),f(!1),w("loading"),r(b=>b+1)}const et=g==="error"&&C===null&&(!!Q.current||B),kt=g==="processing",Bt=g==="complete"?i("buyModal.titleComplete"):g==="error"?i("cartCheckout.errorTitle"):g==="nofunds"?i("buyModal.titleNoFunds"):i("buyModal.titleBuy");return ke&&o?e.jsx(mr,{auth:ke.auth,signer:o.signer,title:i(ke.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:i(ke.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:i(ke.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:e.jsx("img",{src:Nl,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:b}=ke;ct(null),He(b)},onCancel:()=>ct(null),onClose:()=>{ct(null),s()}}):e.jsxs(Lo,{role:"dialog","aria-modal":"true","aria-label":i("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(Po,{onClick:kt?void 0:s,"aria-hidden":!0}),e.jsx(To,{"data-tall":g==="processing"||g==="loading"||void 0,children:Et?e.jsx(qd,{item:t,priceCredits:Ce,priceCents:P,options:Be.options,priceManaWei:G??0n,balanceCredits:ce,manaBalanceWei:_,onBuy:b=>void Ie(b),onClose:s,busy:kt,notice:ie?i("buyModal.priceChanged"):d!=null&&d.held?i("buyModal.heldExplainer",{credits:d.held.credits,currency:ze.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(Eo,{children:[e.jsxs(Fo,{children:[e.jsx(Bo,{children:Bt}),!kt&&e.jsx(No,{onClick:s,"aria-label":i("buyModal.close"),children:e.jsx(Wo,{})})]}),e.jsxs(Do,{children:[e.jsx(Oo,{children:g==="nofunds"?i("buyModal.dclBalance"):i("buyModal.myCreditsBalance")}),e.jsx(qo,{}),e.jsx(Ko,{children:Ge(ce)})]})]}),g==="loading"&&e.jsx(at,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),g==="error"&&e.jsxs(at,{children:[e.jsxs(Ho,{"data-testid":"buy-error",children:[e.jsx(Uo,{src:Qo,alt:"",width:64,height:80}),e.jsxs(Go,{children:[e.jsx("b",{children:i("cartCheckout.errorHeadline")})," ",k??(et?null:i("cartCheckout.errorBody")),et?e.jsxs(e.Fragment,{children:[k?" ":"",i("cartCheckout.heldLead",{currency:ze.name}),e.jsx("b",{children:i("cartCheckout.heldBold")}),i("cartCheckout.heldTail",{currency:ze.name})]}):null]})]}),C!==null?e.jsxs(ft,{children:[e.jsx(De,{"data-variant":"outline",onClick:s,children:i("buyModal.cancel")}),e.jsx(De,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void Ke(C),children:i("buyModal.error.switchAndRetry",{network:ys(C)})})]}):et?e.jsx(ft,{children:e.jsx(De,{"data-variant":"purple","data-full":!0,onClick:s,children:i("cartCheckout.gotIt")})}):e.jsxs(ft,{children:[e.jsx(De,{"data-variant":"outline",onClick:s,children:i("buyModal.cancel")}),e.jsx(De,{"data-variant":"purple",onClick:Ft,children:i("cartCheckout.tryAgain")})]})]}),g==="nofunds"&&e.jsxs(at,{children:[O&&G===null&&_>0n?e.jsxs(Ut,{"data-testid":"mana-price-unavailable",children:[e.jsx(Qt,{}),e.jsx(Gt,{children:i("buyModal.manaPriceUnavailable")})]}):null,d!=null&&d.held?e.jsxs(Ut,{"data-testid":"nofunds-held",children:[e.jsx(Qt,{}),e.jsx(Gt,{children:i("buyModal.heldExplainer",{credits:d.held.credits,currency:ze.name})})]}):null,e.jsxs(Ut,{children:[e.jsx(Qt,{}),e.jsxs(Gt,{children:[e.jsx("b",{children:i("buyModal.insufficientFunds")})," ",i("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:i("buyModal.warningCreditsAmount",{count:Math.max(1,Ce-ce)})})," ",i("buyModal.warningToPurchase",{count:1}),gt()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(_o,{href:ws("/credits"),target:"_blank",rel:"noopener noreferrer",children:i("buyModal.warningLearnMore")})]})]})]}),e.jsx(la,{item:t,priceCredits:Ce}),gt()?null:e.jsxs(e.Fragment,{children:[e.jsx(Vo,{"data-testid":"credit-packs",children:K.map(b=>{const M=b.credits,T=b.id===E;return e.jsxs(Jo,{"data-on":T||void 0,onClick:()=>Y(b.id),children:[e.jsx(Yo,{src:Xo,alt:""}),e.jsx(Zo,{children:Ge(M)}),e.jsxs(el,{children:["($",b.usd.toFixed(2),")"]})]},b.id)})}),e.jsxs(tl,{children:[e.jsxs(nl,{children:[e.jsx(il,{}),e.jsx("span",{children:Ge(((Nt=K.find(b=>b.id===E))==null?void 0:Nt.credits)??0)})]}),e.jsxs(al,{children:["$",((($t=K.find(b=>b.id===E))==null?void 0:$t.usd)??0).toFixed(2)]})]})]}),e.jsxs(ft,{children:[e.jsx(De,{"data-variant":"outline",onClick:s,children:i("buyModal.cancel")}),gt()?null:e.jsx(De,{"data-variant":"gradient",onClick:()=>void Ze(),children:i("buyModal.buy")})]})]}),g==="ready"&&e.jsxs(at,{children:[ie&&e.jsxs(Ut,{"data-testid":"price-changed",role:"status",children:[e.jsx(Qt,{}),e.jsx(Gt,{children:i("buyModal.priceChanged")})]}),e.jsx(la,{item:t,priceCredits:Ce}),e.jsx(ft,{children:e.jsx(De,{"data-variant":"gradient","data-full":!0,onClick:()=>void qe(),children:i("buyModal.buy")})})]}),g==="processing"&&e.jsxs(at,{"data-processing":!0,children:[e.jsx(gr,{src:or,alt:"",width:61,height:61}),e.jsx(br,{children:l?i("buyModal.completingPurchase"):i("buyModal.completingTransaction")}),e.jsx(yr,{"aria-hidden":!0,children:e.jsx(wr,{})})]}),g==="complete"&&e.jsxs(at,{children:[e.jsx(Xl,{}),e.jsxs(rl,{children:[e.jsx(Qd,{}),e.jsxs(sl,{children:[e.jsx("b",{children:i("getCredits.successTitle")})," ",i("buyModal.successBody")]})]}),e.jsxs(ft,{"data-stack":!0,children:[e.jsx(De,{"data-variant":"outline",onClick:()=>m(vs([t.category])),children:i("buyModal.myAssets")}),gt()?e.jsx(Fi,{"data-variant":"ruby",href:Zl([t]),onClick:s,children:i("success.goToBackpack")}):e.jsxs(Fi,{"data-variant":"ruby",href:ed,target:"_blank",rel:"noreferrer",onClick:s,children:[i("buyModal.tryInWorld"),e.jsx(td,{})]})]})]})]})})]})}function la({item:t,priceCredits:s}){return e.jsxs(ol,{children:[e.jsx(ll,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(dl,{children:[e.jsxs("div",{children:[e.jsx(cl,{title:t.name,children:t.name||i("buyModal.itemFallback")}),t.creator?e.jsx(ul,{address:t.creator}):null]}),e.jsxs(pl,{children:[e.jsx(hl,{}),e.jsx("span",{children:Ge(s)})]})]})]})}function _d(){const{data:t}=te({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:As,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const Vd=a.div`
370
+ display: flex;
371
+ align-items: center;
372
+ gap: 16px;
373
+ width: 100%;
374
+ max-width: 456px;
375
+ `,Jd=a.span`
376
+ flex: none;
377
+ font-family: ${n.font.sans};
378
+ font-size: 18px;
379
+ color: ${n.colors.muted};
380
+ `,Yd=a.p`
381
+ margin: 0;
382
+ font-family: ${n.font.sans};
383
+ font-size: 13px;
384
+ line-height: 1.5;
385
+ color: ${n.colors.muted};
386
+ text-align: center;
387
+ `,Xd=a.p`
388
+ margin: 0;
389
+ font-family: ${n.font.sans};
390
+ font-size: 13px;
391
+ line-height: 1.5;
392
+ color: ${n.colors.text};
393
+ `;function Rr(t,s){const[l,o]=c.useState(!1),[d,u]=c.useState(!1),[x,m]=c.useState(null),y=c.useRef(null);c.useEffect(()=>{const h=new AbortController;return y.current=h,()=>h.abort(new DOMException("Modal closed","AbortError"))},[]);async function $(h){if(!t||l)return!0;m(null);try{const g=await t.cancelCurrent({payGas:h,onWaiting:w=>u(w>2e4)});return g!=="ok"?(m(g==="relay-reverted"?"reverted":"pending"),!1):(o(!0),!0)}catch(g){return ue(g,{flow:"edit_price_cancel"}),s(_e(g,i("listingEdit.cancelFailed"))),!1}finally{u(!1)}}return{cancelDone:l,slow:d,cancelFailed:x,setCancelFailed:m,cancelCurrent:$,signal:()=>{var h;return(h=y.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"?i("itemDetail.cancelRelayReverted"):i("itemDetail.cancelRelayFailed"):i("itemDetail.cancelRelayRetry"),s?e.jsxs(e.Fragment,{children:[" ",e.jsx(Ki,{type:"button","data-testid":"cancel-pay-gas",onClick:o,disabled:l,children:i("itemDetail.cancelPayGas")}),d?e.jsxs(e.Fragment,{children:[" ",e.jsx(Ki,{type:"button","data-testid":"cancel-later",onClick:d,disabled:l,children:i("itemDetail.cancelLater")})]}):null]}):null]})}function Lr({phase:t,managed:s,slow:l}){const d=t==="list"?2:1,u=`listingEdit.${s?"step":"confirm"}${t==="list"?"New":"Removal"}`;return e.jsxs(at,{"data-processing":!0,"data-testid":"listing-steps",role:"status","aria-live":"polite",children:[e.jsx(gr,{src:or,alt:"",width:61,height:61}),e.jsx(br,{children:i(u)}),e.jsxs(Vd,{children:[e.jsx(yr,{"aria-hidden":!0,children:e.jsx(wr,{})}),e.jsxs(Jd,{"data-testid":"listing-steps-count",children:[d,"/",2]})]}),l?e.jsx(Yd,{"data-testid":"listing-steps-slow",children:i("listingEdit.slow")}):null]})}const mn=a.div`
394
+ position: fixed;
395
+ inset: 0;
396
+ z-index: 10000;
397
+ display: flex;
398
+ align-items: center;
399
+ justify-content: center;
400
+ padding: 16px;
401
+ background: rgba(22, 21, 24, 0.55);
402
+ `,gn=a.div`
403
+ width: 560px;
404
+ max-width: 100%;
405
+ max-height: 92vh;
406
+ overflow-y: auto;
407
+ background: ${n.colors.white};
408
+ border-radius: 16px;
409
+ padding: 12px 16px 16px;
410
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
411
+ display: flex;
412
+ flex-direction: column;
413
+ gap: 24px;
414
+ `,bn=a.div`
415
+ display: flex;
416
+ align-items: center;
417
+ justify-content: space-between;
418
+ gap: 8px;
419
+ padding-bottom: 16px;
420
+ border-bottom: 1px solid ${n.colors.gray4};
421
+ `,yn=a.h2`
422
+ margin: 0;
423
+ font-family: ${n.font.sans};
424
+ font-weight: 600;
425
+ font-size: 20px;
426
+ line-height: 1.6;
427
+ color: ${n.colors.text};
428
+ `,wn=a.button`
429
+ flex: none;
430
+ display: grid;
431
+ place-items: center;
432
+ width: 24px;
433
+ height: 24px;
434
+ border: 0;
435
+ background: none;
436
+ cursor: pointer;
437
+ color: ${n.colors.text};
438
+
439
+ .ico {
440
+ width: 18px;
441
+ height: 18px;
442
+ }
443
+ &:disabled {
444
+ opacity: 0.4;
445
+ cursor: default;
446
+ }
447
+ &:focus-visible {
448
+ outline: 2px solid ${n.colors.accent};
449
+ outline-offset: 2px;
450
+ }
451
+ `,Zd=a.p`
452
+ margin: 0;
453
+ font-family: ${n.font.sans};
454
+ font-size: 14px;
455
+ line-height: 1.57;
456
+ color: ${n.colors.text};
457
+ text-align: left;
458
+ `,ec=a.div`
459
+ display: flex;
460
+ align-items: center;
461
+ gap: 12px;
462
+ `,tc=a.div`
463
+ flex: none;
464
+ display: grid;
465
+ place-items: center;
466
+ width: 180px;
467
+ height: 180px;
468
+ border-radius: 16px;
469
+ background: ${n.colors.media};
470
+ border: 1px solid ${n.colors.gray4};
471
+ overflow: hidden;
472
+
473
+ img {
474
+ width: 150px;
475
+ height: 150px;
476
+ object-fit: contain;
477
+ filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
478
+ }
479
+
480
+ ${n.media.maxWidth("mobile")} {
481
+ width: 120px;
482
+ height: 120px;
483
+
484
+ img {
485
+ width: 100px;
486
+ height: 100px;
487
+ }
488
+ }
489
+ `,nc=a.div`
490
+ flex: 1 1 0;
491
+ min-width: 0;
492
+ display: flex;
493
+ flex-direction: column;
494
+ gap: 4px;
495
+ padding: 8px;
496
+ `,ic=a.p`
497
+ margin: 0;
498
+ font-family: ${n.font.sans};
499
+ font-weight: 600;
500
+ font-size: 20px;
501
+ line-height: 1.57;
502
+ color: ${n.colors.text};
503
+ `,ac=a.p`
504
+ margin: 0;
505
+ font-family: ${n.font.sans};
506
+ font-size: 10px;
507
+ line-height: 1.43;
508
+ color: ${n.colors.muted};
509
+ `,rc=a.div`
510
+ display: flex;
511
+ gap: 12px;
512
+
513
+ ${n.media.maxWidth("mobile")} {
514
+ flex-direction: column;
515
+ }
516
+ `,da=a.label`
517
+ flex: 1 1 0;
518
+ min-width: 0;
519
+ display: flex;
520
+ flex-direction: column;
521
+ gap: 4px;
522
+ `,ca=a.span`
523
+ font-family: ${n.font.sans};
524
+ font-size: 12px;
525
+ color: ${n.colors.muted};
526
+ `,sc=a.div`
527
+ display: flex;
528
+ align-items: center;
529
+ justify-content: space-between;
530
+ gap: 4px;
531
+ height: 42px;
532
+ padding: 0 8px;
533
+ border: 0.5px solid ${n.colors.text};
534
+ border-radius: 8px;
535
+ background: ${n.colors.white};
536
+
537
+ &:focus-within {
538
+ border-color: ${n.colors.magenta};
539
+ }
540
+ &[aria-invalid='true'] {
541
+ border-color: ${n.colors.err};
542
+ }
543
+
544
+ .ccy {
545
+ flex: none;
546
+ width: 22px;
547
+ height: 22px;
548
+ color: ${n.colors.rarity};
549
+ }
550
+ .cal {
551
+ flex: none;
552
+ width: 18px;
553
+ height: 18px;
554
+ color: ${n.colors.text};
555
+ }
556
+ `,oc=a.input`
557
+ flex: 1 1 auto;
558
+ min-width: 0;
559
+ border: 0;
560
+ outline: none;
561
+ background: transparent;
562
+ font-family: ${n.font.sans};
563
+ font-size: 13px;
564
+ color: ${n.colors.text};
565
+
566
+ &::placeholder {
567
+ color: ${n.colors.muted2};
568
+ }
569
+ /* Strip the number spinners — the glyph + USD hint carry the affordance. */
570
+ &::-webkit-outer-spin-button,
571
+ &::-webkit-inner-spin-button {
572
+ -webkit-appearance: none;
573
+ margin: 0;
574
+ }
575
+ &[type='number'] {
576
+ -moz-appearance: textfield;
577
+ appearance: textfield;
578
+ }
579
+ `,lc=a.span`
580
+ flex: none;
581
+ font-family: ${n.font.sans};
582
+ font-size: 10px;
583
+ color: ${n.colors.muted2};
584
+ `,dc=a.div`
585
+ .react-datepicker-wrapper {
586
+ display: block;
587
+ width: 100%;
588
+ }
589
+ .react-datepicker__input-container {
590
+ display: flex;
591
+ align-items: center;
592
+ }
593
+ .react-datepicker__input-container input {
594
+ width: 100%;
595
+ height: 42px;
596
+ padding: 0 8px;
597
+ border: 0.5px solid ${n.colors.text};
598
+ border-radius: 8px;
599
+ background: ${n.colors.white};
600
+ font-family: ${n.font.sans};
601
+ font-size: 13px;
602
+ color: ${n.colors.text};
603
+ outline: none;
604
+ }
605
+ .react-datepicker__input-container input:focus {
606
+ border-color: ${n.colors.magenta};
607
+ }
608
+ &[data-invalid='true'] .react-datepicker__input-container input {
609
+ border-color: ${n.colors.err};
610
+ }
611
+ /* The showIcon calendar glyph inside the field. */
612
+ .react-datepicker__calendar-icon {
613
+ fill: ${n.colors.text};
614
+ opacity: 0.85;
615
+ }
616
+
617
+ ${nd}
618
+ `,cc=a.button`
619
+ width: 100%;
620
+ height: 48px;
621
+ border: 0;
622
+ border-radius: 16px;
623
+ cursor: pointer;
624
+ background: ${n.colors.accent};
625
+ color: ${n.colors.white};
626
+ font-family: ${n.font.sans};
627
+ font-weight: 600;
628
+ font-size: 15px;
629
+ line-height: 24px;
630
+ letter-spacing: 0.46px;
631
+ text-transform: uppercase;
632
+
633
+ &:hover:not(:disabled) {
634
+ background: ${n.colors.accentHover};
635
+ }
636
+ &:focus-visible {
637
+ outline: 2px solid ${n.colors.accent};
638
+ outline-offset: 2px;
639
+ }
640
+ &:disabled {
641
+ cursor: not-allowed;
642
+ background: rgba(105, 31, 169, 0.2);
643
+ color: ${n.colors.white};
644
+ }
645
+ `;a.p`
646
+ margin: 0;
647
+ font-family: ${n.font.sans};
648
+ font-size: 13px;
649
+ color: ${n.colors.muted};
650
+ text-align: center;
651
+ `;const uc=a.p`
652
+ margin: 0;
653
+ font-family: ${n.font.sans};
654
+ font-size: 12px;
655
+ line-height: 1.5;
656
+ color: ${n.colors.muted};
657
+ `,pc=a.div`
658
+ display: flex;
659
+ flex-direction: column;
660
+ align-items: center;
661
+ gap: 16px;
662
+ padding: 24px 16px;
663
+ border-radius: 16px;
664
+ background: rgba(193, 238, 207, 0.5);
665
+ text-align: center;
666
+ `,hc=a.div`
667
+ display: grid;
668
+ place-items: center;
669
+ width: 64px;
670
+ height: 64px;
671
+ border-radius: 50%;
672
+ background: ${n.colors.ok};
673
+ color: ${n.colors.white};
674
+
675
+ .ico {
676
+ width: 34px;
677
+ height: 34px;
678
+ }
679
+ `,xc=a.p`
680
+ margin: 0;
681
+ font-family: ${n.font.sans};
682
+ font-size: 20px;
683
+ line-height: 1.334;
684
+ color: ${n.colors.text2};
685
+
686
+ b {
687
+ font-weight: 700;
688
+ }
689
+ `,fc=a.div`
690
+ display: flex;
691
+ gap: 12px;
692
+
693
+ ${n.media.maxWidth("mobile")} {
694
+ flex-direction: column-reverse;
695
+ }
696
+ `,mc=a.button`
697
+ flex: 1 1 0;
698
+ height: 48px;
699
+ border: 2px solid ${n.colors.accent};
700
+ border-radius: 12px;
701
+ background: transparent;
702
+ color: ${n.colors.accent};
703
+ cursor: pointer;
704
+ font-family: ${n.font.sans};
705
+ font-weight: 600;
706
+ font-size: 13px;
707
+ line-height: 24px;
708
+ letter-spacing: 0.46px;
709
+ text-transform: uppercase;
710
+
711
+ &:hover {
712
+ background: rgba(105, 31, 169, 0.06);
713
+ }
714
+ &:focus-visible {
715
+ outline: 2px solid ${n.colors.accent};
716
+ outline-offset: 2px;
717
+ }
718
+ `,gc=a.button`
719
+ flex: 1 1 0;
720
+ height: 48px;
721
+ border: 0;
722
+ border-radius: 12px;
723
+ background: ${n.colors.accent};
724
+ color: ${n.colors.softWhite};
725
+ cursor: pointer;
726
+ font-family: ${n.font.sans};
727
+ font-weight: 600;
728
+ font-size: 13px;
729
+ line-height: 24px;
730
+ letter-spacing: 0.46px;
731
+ text-transform: uppercase;
732
+
733
+ &:hover {
734
+ background: ${n.colors.accentHover};
735
+ }
736
+ &:focus-visible {
737
+ outline: 2px solid ${n.colors.accent};
738
+ outline-offset: 2px;
739
+ }
740
+ `,bc=30;function ua(t){const s=new Date;return s.setHours(0,0,0,0),s.setDate(s.getDate()+t),s}function yc({asset:t,session:s,creator:l,edit:o,onListed:d,onClose:u}){const x=dt(),m=lt(),y=_d(),{data:$}=te({queryKey:["collection-meta",t.contractAddress],enabled:!l&&!!t.contractAddress,staleTime:5*6e4,queryFn:()=>dr(t.contractAddress)}),h=l||($==null?void 0:$.creator),{data:g}=tn(h),w=h?g!=null&&g.name?nn(g.name):On(h):null,[k,I]=c.useState(o!=null&&o.currentCredits?String(o.currentCredits):"10"),[C,S]=c.useState(()=>ua(bc)),[B,f]=c.useState(null),[N,r]=c.useState(!1),[E,Y]=c.useState(null),[U,A]=c.useState("form"),R=c.useRef({}),{cancelDone:K,slow:G,cancelFailed:ne,setCancelFailed:de,cancelCurrent:ee,signal:_}=Rr(o,f),O=an(s),H=Number(k),v=Number.isInteger(H)&&H>0,fe=!!o&&!K&&H===o.currentCredits,P=C?C.getTime():NaN,F=!!C&&P>Date.now(),z=ua(1),se=v?`$${rt(H).toFixed(2)}`:"$0";async function ie(oe={}){if(f(null),!v){f(i("sellModal.errorWholeNumber"));return}if(!F){f(i("sellModal.invalidDate"));return}if(!O){r(!0);try{const Z=Oi(t.contractAddress,t.chainId),Ce=await jr(Z,s.address);if(r(!1),!Ce){R.current=oe,A("authorize");return}}catch{r(!1)}}await xe(oe)}async function xe(oe={}){var Z,Ce;if(f(null),!v){f(i("sellModal.errorWholeNumber"));return}if(!F){f(i("sellModal.invalidDate"));return}r(!0);try{if(!await ee(oe.payGas))return;await jl({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId});const ce=await kl({signer:s.signer,nft:{contractAddress:t.contractAddress,tokenId:t.tokenId,network:t.network,chainId:t.chainId},usdPrice:rt(H),expiresAtMs:P}),V=await(o?Sr(ce,s.identity,{signal:_()}):lr(ce,s.identity));(Z=_())==null||Z.throwIfAborted(),Y(H),X("Shop Listed Item",{item_id:t.itemId??t.tokenId??null,contract_address:t.contractAddress,price_credits:H,price_usd:rt(H),listing_type:"secondary",is_primary:!1}),Lt.success(i(o?"listingEdit.toastUpdated":"sellModal.toastOnSale",{name:t.name})),x.invalidateQueries({queryKey:["my-assets",s.address]}),d==null||d(H,V.id)}catch(ce){if((Ce=_())!=null&&Ce.aborted)return;ue(ce,{flow:"list_secondary"}),X("Shop Listing Failed",{listing_type:"secondary",error_code:$e(ce)}),f(_e(ce,i(o?"listingEdit.listFailedAfterCancel":"sellModal.errorGeneric")))}finally{r(!1)}}function Q(){u(),m("/my-items")}return E!==null?e.jsx(mn,{onClick:u,role:"presentation",children:e.jsxs(gn,{onClick:oe=>oe.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i(o?"listingEdit.successHeader":"sellModal.successHeader"),children:[e.jsxs(bn,{children:[e.jsx(yn,{children:i(o?"listingEdit.successHeader":"sellModal.successHeader")}),e.jsx(wn,{onClick:u,"aria-label":i("getCredits.done"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(pc,{children:[e.jsx(hc,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsxs(xc,{children:[e.jsx("b",{children:i(o?"listingEdit.successBody":"sellModal.successOnSale")})," ",i("sellModal.successManage")]})]}),e.jsxs(fc,{children:[e.jsx(mc,{onClick:Q,children:i("sellModal.myItems")}),e.jsx(gc,{onClick:u,children:i("getCredits.done")})]})]})}):U==="authorize"?e.jsx(mr,{auth:Oi(t.contractAddress,t.chainId),signer:s.signer,title:i("authorizeStep.sellTitle"),name:t.name,image:t.image,icon:e.jsx(L,{name:"pen",className:"ico"}),reason:i("authorizeStep.sellReason",{name:t.name}),onAuthorized:()=>{A("form"),xe(R.current)},onCancel:()=>A("form"),onClose:u}):o&&N?e.jsx(mn,{role:"presentation",children:e.jsxs(gn,{onClick:oe=>oe.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(bn,{children:[e.jsx(yn,{children:i("listingEdit.title")}),e.jsx(wn,{disabled:!0,"aria-label":i("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(Lr,{phase:K?"list":"cancel",managed:O,slow:G})]})}):e.jsx(mn,{onClick:N?void 0:u,role:"presentation",children:e.jsxs(gn,{"data-testid":"modal",onClick:oe=>oe.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i(o?"listingEdit.title":"sellModal.sellProduct"),children:[e.jsxs(bn,{children:[e.jsx(yn,{children:i(o?"listingEdit.title":"sellModal.sellProduct")}),e.jsx(wn,{onClick:u,disabled:N,"aria-label":i("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(Zd,{children:i(o?"listingEdit.subtitle":"sellModal.subtitle")}),e.jsxs(ec,{children:[e.jsx(tc,{children:t.image?e.jsx("img",{src:t.image,alt:""}):null}),e.jsxs(nc,{children:[e.jsx(ic,{children:t.name}),w?e.jsx(ac,{children:i("sellModal.byCreator",{name:w})}):null]})]}),e.jsxs(rc,{children:[e.jsxs(da,{children:[e.jsx(ca,{children:i("sellModal.priceShort")}),e.jsxs(sc,{"aria-invalid":k.length>0&&!v,children:[e.jsx(ve,{className:"ccy"}),e.jsx(oc,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:k,onChange:oe=>I(oe.target.value),disabled:N,"aria-label":i("sellModal.priceLabel",{currency:"credits"})}),e.jsx(lc,{"aria-hidden":!0,children:se})]})]}),e.jsxs(da,{children:[e.jsx(ca,{children:i("sellModal.expirationLabel")}),e.jsx(dc,{"data-invalid":!!C&&!F,children:e.jsx(id,{selected:C,onChange:S,minDate:z,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:N,showIcon:!0,showPopperArrow:!1,todayButton:i("sellModal.today"),ariaLabelledBy:void 0,"aria-label":i("sellModal.expirationLabel")})})]})]}),y&&v?e.jsx(uc,{children:i("sellModal.proceedsCredits",{count:H})}):null,ne?e.jsx(qn,{state:ne,canPayGas:!!(o!=null&&o.canPayGas),busy:N,onPayGas:()=>void ie({payGas:!0}),onLater:()=>de(null)}):null,e.jsx(Ve,{message:B}),e.jsx(cc,{onClick:()=>void ie(),disabled:N||fe||ne==="pending"||!v||!F,"data-testid":"list-submit",children:o?i(K?"sellModal.putUpForSale":"listingEdit.submit"):N?O?i("sellModal.puttingOnSale"):i("sellModal.confirmListing"):i("sellModal.putUpForSale")})]})})}const wc=a.div`
741
+ position: fixed;
742
+ inset: 0;
743
+ z-index: 10000;
744
+ display: flex;
745
+ align-items: center;
746
+ justify-content: center;
747
+ padding: 16px;
748
+ background: rgba(22, 21, 24, 0.55);
749
+ `,vc=a.div`
750
+ width: 560px;
751
+ max-width: 100%;
752
+ max-height: 92vh;
753
+ overflow-y: auto;
754
+ background: ${n.colors.white};
755
+ border-radius: 16px;
756
+ padding: 12px 16px 16px;
757
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
758
+ display: flex;
759
+ flex-direction: column;
760
+ gap: 24px;
761
+
762
+ ${n.media.maxWidth("mobile")} {
763
+ padding: 12px 16px 16px;
764
+ }
765
+ `,jc=a.div`
766
+ display: flex;
767
+ flex-direction: column;
768
+ gap: 4px;
769
+ padding-bottom: 16px;
770
+ border-bottom: 1px solid ${n.colors.gray4};
771
+ `,kc=a.div`
772
+ display: flex;
773
+ align-items: center;
774
+ justify-content: space-between;
775
+ gap: 8px;
776
+ `,$c=a.h2`
777
+ margin: 0;
778
+ font-family: ${n.font.sans};
779
+ font-weight: 600;
780
+ font-size: 20px;
781
+ line-height: 1.6;
782
+ color: ${n.colors.text};
783
+ `,Cc=a.button`
784
+ flex: none;
785
+ display: grid;
786
+ place-items: center;
787
+ width: 24px;
788
+ height: 24px;
789
+ border: 0;
790
+ background: none;
791
+ cursor: pointer;
792
+ color: ${n.colors.text};
793
+
794
+ .ico {
795
+ width: 18px;
796
+ height: 18px;
797
+ }
798
+ &:disabled {
799
+ opacity: 0.4;
800
+ cursor: default;
801
+ }
802
+ &:focus-visible {
803
+ outline: 2px solid ${n.colors.accent};
804
+ outline-offset: 2px;
805
+ }
806
+ `,Ic=a.div`
807
+ display: flex;
808
+ align-items: center;
809
+ gap: 12px;
810
+ `,Sc=a.img`
811
+ flex: none;
812
+ width: 72px;
813
+ height: 72px;
814
+ border-radius: 12px;
815
+ object-fit: cover;
816
+ background: ${n.colors.media};
817
+ `,Ac=a.p`
818
+ margin: 0;
819
+ font-family: ${n.font.sans};
820
+ font-weight: 600;
821
+ font-size: 18px;
822
+ line-height: 1.4;
823
+ color: ${n.colors.text};
824
+ `,Mc=a.label`
825
+ display: flex;
826
+ flex-direction: column;
827
+ gap: 6px;
828
+ `,zc=a.span`
829
+ font-family: ${n.font.sans};
830
+ font-size: 12px;
831
+ color: ${n.colors.muted};
832
+ `,Rc=a.input`
833
+ width: 100%;
834
+ height: 44px;
835
+ padding: 0 12px;
836
+ border: 1px solid ${n.colors.text};
837
+ border-radius: 8px;
838
+ background: ${n.colors.white};
839
+ font-family: ${n.font.sans};
840
+ font-size: 14px;
841
+ color: ${n.colors.text};
842
+
843
+ &::placeholder {
844
+ color: ${n.colors.muted2};
845
+ }
846
+ &:focus-visible {
847
+ outline: none;
848
+ border-color: ${n.colors.magenta};
849
+ }
850
+ &[aria-invalid='true'] {
851
+ border-color: ${n.colors.err};
852
+ }
853
+ &:disabled {
854
+ opacity: 0.6;
855
+ }
856
+ `,Lc=a.p`
857
+ margin: 0;
858
+ padding: 12px 14px;
859
+ border-radius: 10px;
860
+ background: rgba(255, 45, 85, 0.1);
861
+ font-family: ${n.font.sans};
862
+ font-size: 13px;
863
+ line-height: 1.5;
864
+ color: ${n.colors.text2};
865
+ `,pa=a.div`
866
+ display: flex;
867
+ gap: 12px;
868
+
869
+ ${n.media.maxWidth("mobile")} {
870
+ flex-direction: column-reverse;
871
+ }
872
+ `,Pc=a.button`
873
+ flex: 1;
874
+ height: 48px;
875
+ border: 2px solid ${n.colors.blackBtn};
876
+ border-radius: 16px;
877
+ background: transparent;
878
+ color: ${n.colors.text};
879
+ cursor: pointer;
880
+ font-family: ${n.font.sans};
881
+ font-weight: 600;
882
+ font-size: 15px;
883
+ line-height: 24px;
884
+ letter-spacing: 0.46px;
885
+ text-transform: uppercase;
886
+
887
+ &:hover:not(:disabled) {
888
+ background: rgba(36, 33, 41, 0.06);
889
+ }
890
+ &:focus-visible {
891
+ outline: 2px solid ${n.colors.accent};
892
+ outline-offset: 2px;
893
+ }
894
+ &:disabled {
895
+ opacity: 0.5;
896
+ cursor: default;
897
+ }
898
+ `,ha=a.button`
899
+ flex: 1;
900
+ display: inline-flex;
901
+ align-items: center;
902
+ justify-content: center;
903
+ gap: 8px;
904
+ height: 48px;
905
+ border: 0;
906
+ border-radius: 16px;
907
+ background: ${n.colors.blackBtn};
908
+ color: ${n.colors.softWhite};
909
+ cursor: pointer;
910
+ font-family: ${n.font.sans};
911
+ font-weight: 600;
912
+ font-size: 15px;
913
+ line-height: 24px;
914
+ letter-spacing: 0.46px;
915
+ text-transform: uppercase;
916
+
917
+ &:hover:not(:disabled) {
918
+ filter: brightness(1.35);
919
+ }
920
+ &:focus-visible {
921
+ outline: 2px solid ${n.colors.accent};
922
+ outline-offset: 2px;
923
+ }
924
+ &:disabled {
925
+ opacity: 0.55;
926
+ cursor: default;
927
+ }
928
+ `,Tc=a.div`
929
+ display: flex;
930
+ flex-direction: column;
931
+ align-items: center;
932
+ gap: 16px;
933
+ padding: 24px 16px;
934
+ border-radius: 16px;
935
+ background: rgba(193, 238, 207, 0.5);
936
+ text-align: center;
937
+ `,Ec=a.div`
938
+ display: grid;
939
+ place-items: center;
940
+ width: 64px;
941
+ height: 64px;
942
+ border-radius: 50%;
943
+ background: ${n.colors.ok};
944
+ color: ${n.colors.white};
945
+
946
+ .ico {
947
+ width: 34px;
948
+ height: 34px;
949
+ }
950
+ `,Fc=a.p`
951
+ margin: 0;
952
+ font-family: ${n.font.sans};
953
+ font-size: 16px;
954
+ line-height: 1.34;
955
+ color: ${n.colors.text2};
956
+
957
+ b {
958
+ font-weight: 700;
959
+ }
960
+ `;function Bc(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function Nc({item:t,session:s,onClose:l,onTransferred:o}){const[d,u]=c.useState(""),[x,m]=c.useState(!1),[y,$]=c.useState(null),[h,g]=c.useState(!1),w=d.trim(),k=Bc(w),I=k&&w.toLowerCase()===s.address.toLowerCase(),C=w.length===0?null:k?I?i("transfer.selfAddress"):null:i("transfer.invalidAddress"),S=k&&!I&&!x;async function B(){if(S){$(null),m(!0);try{await $l({contractAddress:t.contractAddress,chainId:t.chainId,tokenId:t.tokenId,to:w,signer:s.signer}),X("Shop Transferred Item",{contract_address:t.contractAddress,token_id:t.tokenId}),g(!0),Lt.success(i("transfer.toastSuccess",{name:t.name})),o==null||o()}catch(f){yt(f)||ue(f,{flow:"transfer-item",tokenId:t.tokenId}),X("Shop Transfer Failed",{error_code:$e(f)}),$(yt(f)?i("getCredits.errorCanceled"):_e(f,i("transfer.errorGeneric")))}finally{m(!1)}}}return e.jsx(wc,{onClick:x?void 0:l,role:"presentation",children:e.jsxs(vc,{onClick:f=>f.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("transfer.title"),children:[e.jsx(jc,{children:e.jsxs(kc,{children:[e.jsx($c,{children:i("transfer.title")}),e.jsx(Cc,{onClick:l,disabled:x,"aria-label":i("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]})}),h?e.jsxs(e.Fragment,{children:[e.jsxs(Tc,{children:[e.jsx(Ec,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(Fc,{children:i("transfer.successBody",{name:t.name})})]}),e.jsx(pa,{children:e.jsx(ha,{onClick:l,children:i("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Ic,{children:[t.thumbnail?e.jsx(Sc,{src:t.thumbnail,alt:""}):null,e.jsx(Ac,{children:t.name})]}),e.jsxs(Mc,{children:[e.jsx(zc,{children:i("transfer.addressLabel")}),e.jsx(Rc,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:d,onChange:f=>u(f.target.value),disabled:x,"aria-invalid":!!C,"aria-label":i("transfer.addressLabel")}),C?e.jsx(Ve,{message:C}):null]}),e.jsx(Lc,{children:i("transfer.warning")}),e.jsx(Ve,{message:y}),e.jsxs(pa,{children:[e.jsx(Pc,{onClick:l,disabled:x,children:i("sellModal.cancel")}),e.jsx(ha,{onClick:()=>void B(),disabled:!S,children:x?i("transfer.transferring"):i("transfer.transfer")})]})]})]})})}const Wc=a(sd)`
961
+ width: min(500px, 92vw);
962
+ gap: 20px;
963
+
964
+ ${n.media.maxWidth("mobile")} {
965
+ [data-actions] {
966
+ flex-direction: column-reverse;
967
+ }
968
+ [data-actions] > * {
969
+ width: 100%;
970
+ }
971
+ }
972
+ `,Dc=a(Je)`
973
+ background: ${n.colors.accent};
974
+ color: ${n.colors.white};
975
+ text-transform: uppercase;
976
+ letter-spacing: 0.046em;
977
+ font-size: 13px;
978
+
979
+ &:hover:not(:disabled) {
980
+ background: ${n.colors.accentHover};
981
+ }
982
+ `;function Oc({name:t,managed:s,canPayGas:l,cancel:o,onClose:d}){const[u,x]=c.useState(!1),[m,y]=c.useState(!1),[$,h]=c.useState(null),[g,w]=c.useState(null);async function k(I){h(null),w(null),x(!0);try{const C=await o({payGas:I,onWaiting:S=>y(S>2e4)});C==="ok"?d():w(C==="relay-reverted"?"reverted":"pending")}catch(C){const S=yt(C);S||ue(C,{flow:"remove-listing"});const B=i("myAssets.removeListingError");h(s?B:S?i("getCredits.errorCanceled"):_e(C,B))}finally{x(!1),y(!1)}}return e.jsx(od,{onClick:u?void 0:d,role:"presentation",children:e.jsxs(Wc,{onClick:I=>I.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("removeListing.title"),"data-testid":"remove-listing-modal",children:[e.jsx(ld,{children:e.jsx(dd,{children:i("removeListing.title")})}),e.jsx("p",{className:"muted",style:{margin:0},children:i("removeListing.body",{name:t})}),u&&m?e.jsx("p",{className:"muted small",style:{margin:0},"data-testid":"cancel-slow",children:i(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(Ve,{message:$}),e.jsxs(cd,{"data-actions":!0,children:[e.jsx(Je,{variant:"outline",onClick:d,disabled:u,children:i("sellModal.cancel")}),e.jsx(Dc,{onClick:()=>void k(),disabled:u||g==="pending","data-testid":"remove-confirm",children:u?e.jsx(ud,{size:"small"}):i("itemDetail.manageRemove")})]})]})})}const vn=a.div`
983
+ position: fixed;
984
+ inset: 0;
985
+ z-index: 10000;
986
+ display: flex;
987
+ align-items: center;
988
+ justify-content: center;
989
+ padding: 16px;
990
+ background: rgba(22, 21, 24, 0.55);
991
+ `,jn=a.div`
992
+ width: 560px;
993
+ max-width: 100%;
994
+ max-height: 92vh;
995
+ overflow-y: auto;
996
+ background: ${n.colors.white};
997
+ border-radius: 16px;
998
+ padding: 12px 16px 16px;
999
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1000
+ display: flex;
1001
+ flex-direction: column;
1002
+ gap: 24px;
1003
+ `,kn=a.div`
1004
+ display: flex;
1005
+ align-items: center;
1006
+ justify-content: space-between;
1007
+ gap: 8px;
1008
+ padding-bottom: 16px;
1009
+ border-bottom: 1px solid ${n.colors.gray4};
1010
+ `,$n=a.h2`
1011
+ margin: 0;
1012
+ font-family: ${n.font.sans};
1013
+ font-weight: 600;
1014
+ font-size: 20px;
1015
+ line-height: 1.6;
1016
+ color: ${n.colors.text};
1017
+ `,Cn=a.button`
1018
+ flex: none;
1019
+ display: grid;
1020
+ place-items: center;
1021
+ width: 24px;
1022
+ height: 24px;
1023
+ border: 0;
1024
+ background: none;
1025
+ cursor: pointer;
1026
+ color: ${n.colors.text};
1027
+
1028
+ .ico {
1029
+ width: 18px;
1030
+ height: 18px;
1031
+ }
1032
+ &:disabled {
1033
+ opacity: 0.4;
1034
+ cursor: default;
1035
+ }
1036
+ &:focus-visible {
1037
+ outline: 2px solid ${n.colors.accent};
1038
+ outline-offset: 2px;
1039
+ }
1040
+ `,qc=a.p`
1041
+ margin: 0;
1042
+ font-family: ${n.font.sans};
1043
+ font-size: 14px;
1044
+ line-height: 1.57;
1045
+ color: ${n.colors.text};
1046
+ text-align: left;
1047
+ `,Kc=a.div`
1048
+ display: flex;
1049
+ align-items: center;
1050
+ gap: 12px;
1051
+ `,Hc=a.div`
1052
+ flex: none;
1053
+ display: grid;
1054
+ place-items: center;
1055
+ width: 180px;
1056
+ height: 180px;
1057
+ border-radius: 16px;
1058
+ background: ${n.colors.media};
1059
+ border: 1px solid ${n.colors.gray4};
1060
+ overflow: hidden;
1061
+
1062
+ img {
1063
+ width: 150px;
1064
+ height: 150px;
1065
+ object-fit: contain;
1066
+ filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
1067
+ }
1068
+
1069
+ ${n.media.maxWidth("mobile")} {
1070
+ width: 120px;
1071
+ height: 120px;
1072
+
1073
+ img {
1074
+ width: 100px;
1075
+ height: 100px;
1076
+ }
1077
+ }
1078
+ `,Uc=a.div`
1079
+ flex: 1 1 0;
1080
+ min-width: 0;
1081
+ display: flex;
1082
+ flex-direction: column;
1083
+ gap: 4px;
1084
+ padding: 8px;
1085
+ `,Qc=a.p`
1086
+ margin: 0;
1087
+ font-family: ${n.font.sans};
1088
+ font-weight: 600;
1089
+ font-size: 20px;
1090
+ line-height: 1.57;
1091
+ color: ${n.colors.text};
1092
+ `,Gc=a.p`
1093
+ margin: 0;
1094
+ font-family: ${n.font.sans};
1095
+ font-size: 10px;
1096
+ line-height: 1.43;
1097
+ color: ${n.colors.muted};
1098
+ `,_c=a.label`
1099
+ display: flex;
1100
+ flex-direction: column;
1101
+ gap: 4px;
1102
+ `,Vc=a.span`
1103
+ font-family: ${n.font.sans};
1104
+ font-size: 12px;
1105
+ color: ${n.colors.muted};
1106
+ `,Jc=a.div`
1107
+ display: flex;
1108
+ align-items: center;
1109
+ justify-content: space-between;
1110
+ gap: 4px;
1111
+ height: 42px;
1112
+ padding: 0 8px;
1113
+ border: 0.5px solid ${n.colors.text};
1114
+ border-radius: 8px;
1115
+ background: ${n.colors.white};
1116
+
1117
+ &:focus-within {
1118
+ border-color: ${n.colors.magenta};
1119
+ }
1120
+ &[aria-invalid='true'] {
1121
+ border-color: ${n.colors.err};
1122
+ }
1123
+
1124
+ .ccy {
1125
+ flex: none;
1126
+ width: 22px;
1127
+ height: 22px;
1128
+ color: ${n.colors.rarity};
1129
+ }
1130
+ `,Yc=a.input`
1131
+ flex: 1 1 auto;
1132
+ min-width: 0;
1133
+ border: 0;
1134
+ outline: none;
1135
+ background: transparent;
1136
+ font-family: ${n.font.sans};
1137
+ font-size: 13px;
1138
+ color: ${n.colors.text};
1139
+
1140
+ &::placeholder {
1141
+ color: ${n.colors.muted2};
1142
+ }
1143
+ /* Strip the number spinners — the glyph + USD hint carry the affordance. */
1144
+ &::-webkit-outer-spin-button,
1145
+ &::-webkit-inner-spin-button {
1146
+ -webkit-appearance: none;
1147
+ margin: 0;
1148
+ }
1149
+ &[type='number'] {
1150
+ -moz-appearance: textfield;
1151
+ appearance: textfield;
1152
+ }
1153
+ `,Xc=a.span`
1154
+ flex: none;
1155
+ font-family: ${n.font.sans};
1156
+ font-size: 10px;
1157
+ color: ${n.colors.muted2};
1158
+ `,Vt=a.p`
1159
+ margin: 0;
1160
+ font-family: ${n.font.sans};
1161
+ font-size: 12px;
1162
+ line-height: 1.5;
1163
+ color: ${n.colors.muted};
1164
+ `,Zc=a.button`
1165
+ width: 100%;
1166
+ height: 48px;
1167
+ border: 0;
1168
+ border-radius: 16px;
1169
+ cursor: pointer;
1170
+ background: ${n.colors.accent};
1171
+ color: ${n.colors.white};
1172
+ font-family: ${n.font.sans};
1173
+ font-weight: 600;
1174
+ font-size: 15px;
1175
+ line-height: 24px;
1176
+ letter-spacing: 0.46px;
1177
+ text-transform: uppercase;
1178
+
1179
+ &:hover:not(:disabled) {
1180
+ background: ${n.colors.accentHover};
1181
+ }
1182
+ &:focus-visible {
1183
+ outline: 2px solid ${n.colors.accent};
1184
+ outline-offset: 2px;
1185
+ }
1186
+ &:disabled {
1187
+ cursor: not-allowed;
1188
+ background: rgba(105, 31, 169, 0.2);
1189
+ color: ${n.colors.white};
1190
+ }
1191
+ `,eu=a.p`
1192
+ margin: 0;
1193
+ font-family: ${n.font.sans};
1194
+ font-size: 13px;
1195
+ color: ${n.colors.muted};
1196
+ text-align: center;
1197
+ `,tu=a.div`
1198
+ display: flex;
1199
+ flex-direction: column;
1200
+ align-items: center;
1201
+ gap: 16px;
1202
+ padding: 24px 16px;
1203
+ border-radius: 16px;
1204
+ background: rgba(193, 238, 207, 0.5);
1205
+ text-align: center;
1206
+ `,nu=a.div`
1207
+ display: grid;
1208
+ place-items: center;
1209
+ width: 64px;
1210
+ height: 64px;
1211
+ border-radius: 50%;
1212
+ background: ${n.colors.ok};
1213
+ color: ${n.colors.white};
1214
+
1215
+ .ico {
1216
+ width: 34px;
1217
+ height: 34px;
1218
+ }
1219
+ `,iu=a.p`
1220
+ margin: 0;
1221
+ font-family: ${n.font.sans};
1222
+ font-size: 20px;
1223
+ line-height: 1.334;
1224
+ color: ${n.colors.text2};
1225
+
1226
+ b {
1227
+ font-weight: 700;
1228
+ }
1229
+ `,au=a.p`
1230
+ margin: 0;
1231
+ display: inline-flex;
1232
+ align-items: center;
1233
+ gap: 4px;
1234
+ font-family: ${n.font.sans};
1235
+ font-size: 14px;
1236
+ line-height: 1.43;
1237
+ color: ${n.colors.text2};
1238
+
1239
+ strong {
1240
+ display: inline-flex;
1241
+ align-items: center;
1242
+ gap: 4px;
1243
+ font-weight: 700;
1244
+ }
1245
+ .ccy-mark {
1246
+ width: 18px;
1247
+ height: 18px;
1248
+ color: ${n.colors.rarity};
1249
+ }
1250
+ `,ru=a.div`
1251
+ display: flex;
1252
+ gap: 12px;
1253
+
1254
+ ${n.media.maxWidth("mobile")} {
1255
+ flex-direction: column-reverse;
1256
+ }
1257
+ `,su=a.button`
1258
+ flex: 1 1 0;
1259
+ height: 48px;
1260
+ border: 2px solid ${n.colors.accent};
1261
+ border-radius: 12px;
1262
+ background: transparent;
1263
+ color: ${n.colors.accent};
1264
+ cursor: pointer;
1265
+ font-family: ${n.font.sans};
1266
+ font-weight: 600;
1267
+ font-size: 13px;
1268
+ line-height: 24px;
1269
+ letter-spacing: 0.46px;
1270
+ text-transform: uppercase;
1271
+
1272
+ &:hover {
1273
+ background: rgba(105, 31, 169, 0.06);
1274
+ }
1275
+ &:focus-visible {
1276
+ outline: 2px solid ${n.colors.accent};
1277
+ outline-offset: 2px;
1278
+ }
1279
+ `,ou=a.button`
1280
+ flex: 1 1 0;
1281
+ height: 48px;
1282
+ border: 0;
1283
+ border-radius: 12px;
1284
+ background: ${n.colors.accent};
1285
+ color: ${n.colors.softWhite};
1286
+ cursor: pointer;
1287
+ font-family: ${n.font.sans};
1288
+ font-weight: 600;
1289
+ font-size: 13px;
1290
+ line-height: 24px;
1291
+ letter-spacing: 0.46px;
1292
+ text-transform: uppercase;
1293
+
1294
+ &:hover {
1295
+ background: ${n.colors.accentHover};
1296
+ }
1297
+ &:focus-visible {
1298
+ outline: 2px solid ${n.colors.accent};
1299
+ outline-offset: 2px;
1300
+ }
1301
+ `,lu=1e3*60*60*24*182;function du({item:t,session:s,edit:l,onListed:o,onClose:d}){const u=dt(),x=lt(),[m,y]=c.useState(l!=null&&l.currentCredits?String(l.currentCredits):"10"),[$,h]=c.useState(null),[g,w]=c.useState(null),[k,I]=c.useState(!1),[C,S]=c.useState(null),[B,f]=c.useState(null),{cancelDone:N,slow:r,cancelFailed:E,setCancelFailed:Y,cancelCurrent:U,signal:A}=Rr(l,w),R=st.chainId,K=an(s),{data:G}=tn(s.address),ne=G!=null&&G.name?nn(G.name):On(s.address),de=Number(m),ee=Number.isInteger(de)&&de>0,_=!!l&&!N&&de===l.currentCredits,O=ee?`$${rt(de).toFixed(2)}`:"$0";c.useEffect(()=>{let P=!1;return(async()=>{try{const F=await Cl({contractAddress:t.contractAddress,chainId:R});P||S(F)}catch{P||S(!1)}})(),()=>{P=!0}},[t.contractAddress,R]);async function H(P={}){var z,se;w(null);const F=Number(m);if(!Number.isInteger(F)||F<=0){w(i("primaryList.errorWholeNumber"));return}I(!0);try{if(!await U(P.payGas))return;C||(h(i("primaryList.statusEnabling")),await Il({signer:s.signer,contractAddress:t.contractAddress,chainId:R}),S(!0)),h(i("primaryList.statusPublishing"));const ie=await Sl({signer:s.signer,item:{contractAddress:t.contractAddress,itemId:t.blockchainItemId,network:Ae.Network.MATIC,chainId:R},usdPrice:rt(F),uses:t.remainingSupply,expiresAtMs:Date.now()+lu});h(i("primaryList.statusFinishing"));const xe=await(l?Sr(ie,s.identity,{signal:A()}):lr(ie,s.identity));(z=A())==null||z.throwIfAborted(),h(null),f(F),X("Shop Listed Item",{item_id:t.blockchainItemId,contract_address:t.contractAddress,price_credits:F,price_usd:rt(F),listing_type:"primary",is_primary:!0}),Lt.success(i(l?"listingEdit.toastUpdated":"primaryList.toastOnSale",{name:t.name})),o==null||o(F,xe.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(ie){if((se=A())!=null&&se.aborted)return;ue(ie,{flow:"list_primary"}),X("Shop Listing Failed",{listing_type:"primary",error_code:$e(ie)}),w(_e(ie,i(l?"listingEdit.listFailedAfterCancel":"primaryList.errorGeneric"))),h(null)}finally{I(!1)}}function v(){d(),x(Ms(t.contractAddress,t.blockchainItemId))}const fe=C===null?i("primaryList.checking"):l?i(N?"primaryList.putOnSale":"listingEdit.submit"):k?K?i("primaryList.publishing"):i("primaryList.confirmListing"):C===!1?i("primaryList.enableAndPutOnSale"):i("primaryList.putOnSale");return B!==null?e.jsx(vn,{onClick:d,role:"presentation",children:e.jsxs(jn,{onClick:P=>P.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i(l?"listingEdit.successHeader":"primaryList.successTitle"),children:[e.jsxs(kn,{children:[e.jsx($n,{children:i(l?"listingEdit.successHeader":"primaryList.successTitle")}),e.jsx(Cn,{onClick:d,"aria-label":i("getCredits.done"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(tu,{children:[e.jsx(nu,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(iu,{children:e.jsx("b",{children:t.name})}),e.jsxs(au,{children:[i("primaryList.listedFor")," ",e.jsxs("strong",{children:[e.jsx(ve,{className:"ccy-mark"})," ",e.jsx(ye,{credits:B})]})," ",i("primaryList.dotAvailable",{count:t.remainingSupply})]})]}),e.jsxs(ru,{children:[e.jsx(su,{onClick:d,children:i("getCredits.done")}),e.jsx(ou,{onClick:v,children:i("primaryList.viewInShop")})]})]})}):l&&k?e.jsx(vn,{role:"presentation",children:e.jsxs(jn,{onClick:P=>P.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(kn,{children:[e.jsx($n,{children:i("listingEdit.title")}),e.jsx(Cn,{disabled:!0,"aria-label":i("primaryList.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(Lr,{phase:N?"list":"cancel",managed:K,slow:r})]})}):e.jsx(vn,{onClick:k?void 0:d,role:"presentation",children:e.jsxs(jn,{"data-testid":"modal",onClick:P=>P.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":l?i("listingEdit.title"):i("primaryList.publishTitle",{name:t.name}),children:[e.jsxs(kn,{children:[e.jsx($n,{children:l?i("listingEdit.title"):i("primaryList.publishTitle",{name:t.name})}),e.jsx(Cn,{onClick:d,disabled:k,"aria-label":i("primaryList.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(qc,{children:i("primaryList.fromCollection",{collectionName:t.collectionName,count:t.remainingSupply})}),e.jsxs(Kc,{children:[e.jsx(Hc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(Uc,{children:[e.jsx(Qc,{children:t.name}),ne?e.jsx(Gc,{children:i("primaryList.byCreator",{name:ne})}):null]})]}),e.jsxs(_c,{children:[e.jsx(Vc,{children:i("primaryList.priceShort")}),e.jsxs(Jc,{"aria-invalid":m.length>0&&!ee,children:[e.jsx(ve,{className:"ccy"}),e.jsx(Yc,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:m,onChange:P=>y(P.target.value),disabled:k,"aria-label":i("primaryList.priceLabel",{currency:ze.name})}),e.jsx(Xc,{"aria-hidden":!0,children:O})]})]}),e.jsx(Vt,{children:i("primaryList.pricedInWhole",{currency:ze.name,currencySingular:ze.nameSingular})}),l?!k&&!N?e.jsx(Vt,{children:i("listingEdit.subtitle")}):null:C===!1&&!k?e.jsx(Vt,{children:K?i("primaryList.firstTimeManaged",{collectionName:t.collectionName}):i("primaryList.firstTimeConfirm",{collectionName:t.collectionName})}):C===!0&&!k?e.jsx(Vt,{children:K?i("primaryList.readyManaged"):i("primaryList.readyConfirm")}):null,E?e.jsx(qn,{state:E,canPayGas:!!(l!=null&&l.canPayGas),busy:k,onPayGas:()=>void H({payGas:!0}),onLater:()=>Y(null)}):null,$&&!l?e.jsx(eu,{children:$}):null,e.jsx(Ve,{message:g}),e.jsx(Zc,{onClick:()=>void H(),disabled:k||_||E==="pending"||C===null||!ee,"data-testid":"list-submit",children:fe})]})})}const Pr=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function Tr(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function Er(t){return t.reduce((s,l)=>s+Math.max(0,Math.floor(l.amount||0)),0)}function cu(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(!Tr(d.address)||!Number.isInteger(d.amount)||d.amount<1)return!1;const o=Er(l);return o>=1&&o<=s}function uu(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 m=0;m<x;m++)l.push(u),o.push(s)}return{beneficiaries:l,itemIds:o}}async function pu(t){const{contractAddress:s,chainId:l,beneficiaries:o,itemIds:d,signer:u}=t,x={...Rs(Ls.ERC721CollectionV2,l),address:s},m=new _l(Pr).encodeFunctionData("issueTokens",[o,d]),y=ql(),$=Kl(u.provider,y),h=await xd($,y,m,x,{serverURL:kr.relayerUrl});return await Hl(h,"the mint"),h}async function hu(t){const{signer:s,contractAddress:l,chainId:o,entries:d,itemId:u}=t,{beneficiaries:x,itemIds:m}=uu(d,u);if(x.length===0)throw new Error("No copies to issue");if(kr.enabled)try{return await pu({contractAddress:l,chainId:o,beneficiaries:x,itemIds:m,signer:s})}catch(g){if(g instanceof pd&&g.code===hd.USER_DENIED||g instanceof Ol)throw g;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",g)}return await zs(s.provider,o),(await(await new Gl(l,Pr,s).issueTokens(x,m,Al(o))).wait()).transactionHash}const xu=a.div`
1302
+ position: fixed;
1303
+ inset: 0;
1304
+ z-index: 10000;
1305
+ display: flex;
1306
+ align-items: center;
1307
+ justify-content: center;
1308
+ padding: 16px;
1309
+ background: rgba(22, 21, 24, 0.55);
1310
+ `,fu=a.div`
1311
+ width: 560px;
1312
+ max-width: 100%;
1313
+ max-height: 92vh;
1314
+ overflow-y: auto;
1315
+ background: ${n.colors.white};
1316
+ border-radius: 16px;
1317
+ padding: 12px 16px 16px;
1318
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1319
+ display: flex;
1320
+ flex-direction: column;
1321
+ gap: 20px;
1322
+ `,mu=a.div`
1323
+ display: flex;
1324
+ align-items: center;
1325
+ justify-content: space-between;
1326
+ gap: 8px;
1327
+ padding-bottom: 16px;
1328
+ border-bottom: 1px solid ${n.colors.gray4};
1329
+ `,gu=a.h2`
1330
+ margin: 0;
1331
+ font-family: ${n.font.sans};
1332
+ font-weight: 600;
1333
+ font-size: 20px;
1334
+ line-height: 1.6;
1335
+ color: ${n.colors.text};
1336
+ `,bu=a.button`
1337
+ flex: none;
1338
+ display: grid;
1339
+ place-items: center;
1340
+ width: 24px;
1341
+ height: 24px;
1342
+ border: 0;
1343
+ background: none;
1344
+ cursor: pointer;
1345
+ color: ${n.colors.text};
1346
+
1347
+ .ico {
1348
+ width: 18px;
1349
+ height: 18px;
1350
+ }
1351
+ &:disabled {
1352
+ opacity: 0.4;
1353
+ cursor: default;
1354
+ }
1355
+ &:focus-visible {
1356
+ outline: 2px solid ${n.colors.accent};
1357
+ outline-offset: 2px;
1358
+ }
1359
+ `,yu=a.p`
1360
+ margin: 0;
1361
+ font-family: ${n.font.sans};
1362
+ font-size: 14px;
1363
+ line-height: 1.57;
1364
+ color: ${n.colors.text};
1365
+ text-align: left;
1366
+ `,wu=a.div`
1367
+ display: flex;
1368
+ align-items: center;
1369
+ gap: 12px;
1370
+ `,vu=a.div`
1371
+ flex: none;
1372
+ display: grid;
1373
+ place-items: center;
1374
+ width: 56px;
1375
+ height: 56px;
1376
+ border-radius: 12px;
1377
+ background: ${n.colors.media};
1378
+ border: 1px solid ${n.colors.gray4};
1379
+ overflow: hidden;
1380
+
1381
+ img {
1382
+ width: 48px;
1383
+ height: 48px;
1384
+ object-fit: contain;
1385
+ filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
1386
+ }
1387
+ `,ju=a.p`
1388
+ margin: 0;
1389
+ font-family: ${n.font.sans};
1390
+ font-weight: 600;
1391
+ font-size: 16px;
1392
+ line-height: 1.4;
1393
+ color: ${n.colors.text};
1394
+ `,ku=a.div`
1395
+ display: flex;
1396
+ flex-direction: column;
1397
+ gap: 10px;
1398
+ `,$u=a.div`
1399
+ display: flex;
1400
+ align-items: flex-start;
1401
+ gap: 8px;
1402
+ `,Cu=a.label`
1403
+ flex: 1 1 auto;
1404
+ min-width: 0;
1405
+ display: flex;
1406
+ flex-direction: column;
1407
+ gap: 4px;
1408
+ `,Iu=a.label`
1409
+ flex: none;
1410
+ width: 96px;
1411
+ display: flex;
1412
+ flex-direction: column;
1413
+ gap: 4px;
1414
+ `,xa=a.span`
1415
+ font-family: ${n.font.sans};
1416
+ font-size: 12px;
1417
+ color: ${n.colors.muted};
1418
+ `,fa=a.input`
1419
+ height: 42px;
1420
+ padding: 0 10px;
1421
+ border: 0.5px solid ${n.colors.text};
1422
+ border-radius: 8px;
1423
+ background: ${n.colors.white};
1424
+ font-family: ${n.font.sans};
1425
+ font-size: 13px;
1426
+ color: ${n.colors.text};
1427
+ outline: none;
1428
+
1429
+ &::placeholder {
1430
+ color: ${n.colors.muted2};
1431
+ }
1432
+ &:focus {
1433
+ border-color: ${n.colors.magenta};
1434
+ }
1435
+ &[aria-invalid='true'] {
1436
+ border-color: ${n.colors.err};
1437
+ }
1438
+ /* Strip the number spinners on the amount input. */
1439
+ &::-webkit-outer-spin-button,
1440
+ &::-webkit-inner-spin-button {
1441
+ -webkit-appearance: none;
1442
+ margin: 0;
1443
+ }
1444
+ &[type='number'] {
1445
+ -moz-appearance: textfield;
1446
+ appearance: textfield;
1447
+ }
1448
+ `,Su=a.button`
1449
+ flex: none;
1450
+ margin-top: 22px;
1451
+ display: grid;
1452
+ place-items: center;
1453
+ width: 42px;
1454
+ height: 42px;
1455
+ border: 0.5px solid ${n.colors.gray4};
1456
+ border-radius: 8px;
1457
+ background: ${n.colors.white};
1458
+ color: ${n.colors.muted};
1459
+ cursor: pointer;
1460
+
1461
+ .ico {
1462
+ width: 16px;
1463
+ height: 16px;
1464
+ }
1465
+ &:hover:not(:disabled) {
1466
+ color: ${n.colors.err};
1467
+ border-color: ${n.colors.err};
1468
+ }
1469
+ &:disabled {
1470
+ opacity: 0.35;
1471
+ cursor: default;
1472
+ }
1473
+ &:focus-visible {
1474
+ outline: 2px solid ${n.colors.accent};
1475
+ outline-offset: 2px;
1476
+ }
1477
+ `,Au=a.button`
1478
+ align-self: flex-start;
1479
+ display: inline-flex;
1480
+ align-items: center;
1481
+ gap: 6px;
1482
+ border: 0;
1483
+ background: none;
1484
+ padding: 0;
1485
+ cursor: pointer;
1486
+ font-family: ${n.font.sans};
1487
+ font-weight: 600;
1488
+ font-size: 13px;
1489
+ color: ${n.colors.accent};
1490
+
1491
+ .ico {
1492
+ width: 16px;
1493
+ height: 16px;
1494
+ }
1495
+ &:disabled {
1496
+ opacity: 0.4;
1497
+ cursor: default;
1498
+ }
1499
+ &:focus-visible {
1500
+ outline: 2px solid ${n.colors.accent};
1501
+ outline-offset: 2px;
1502
+ }
1503
+ `,Mu=a.p`
1504
+ margin: 0;
1505
+ font-family: ${n.font.sans};
1506
+ font-size: 13px;
1507
+ line-height: 1.5;
1508
+ color: ${t=>t.over?n.colors.err:n.colors.text};
1509
+
1510
+ strong {
1511
+ font-weight: 700;
1512
+ }
1513
+ `,zu=a.p`
1514
+ margin: 0;
1515
+ font-family: ${n.font.sans};
1516
+ font-size: 12px;
1517
+ line-height: 1.5;
1518
+ color: ${n.colors.muted};
1519
+ `;a.p`
1520
+ margin: 0;
1521
+ font-family: ${n.font.sans};
1522
+ font-size: 13px;
1523
+ color: ${n.colors.muted};
1524
+ text-align: center;
1525
+ `;const Ru=a.p`
1526
+ margin: 0;
1527
+ font-family: ${n.font.sans};
1528
+ font-size: 11px;
1529
+ color: ${n.colors.err};
1530
+ `,ma=a.div`
1531
+ display: flex;
1532
+ gap: 12px;
1533
+
1534
+ ${n.media.maxWidth("mobile")} {
1535
+ flex-direction: column-reverse;
1536
+ }
1537
+ `,Lu=a.button`
1538
+ flex: 1 1 0;
1539
+ height: 48px;
1540
+ border: 2px solid ${n.colors.accent};
1541
+ border-radius: 12px;
1542
+ background: transparent;
1543
+ color: ${n.colors.accent};
1544
+ cursor: pointer;
1545
+ font-family: ${n.font.sans};
1546
+ font-weight: 600;
1547
+ font-size: 13px;
1548
+ line-height: 24px;
1549
+ letter-spacing: 0.46px;
1550
+ text-transform: uppercase;
1551
+
1552
+ &:hover:not(:disabled) {
1553
+ background: rgba(105, 31, 169, 0.06);
1554
+ }
1555
+ &:disabled {
1556
+ opacity: 0.5;
1557
+ cursor: not-allowed;
1558
+ }
1559
+ &:focus-visible {
1560
+ outline: 2px solid ${n.colors.accent};
1561
+ outline-offset: 2px;
1562
+ }
1563
+ `,ga=a.button`
1564
+ flex: 1 1 0;
1565
+ height: 48px;
1566
+ border: 0;
1567
+ border-radius: 12px;
1568
+ cursor: pointer;
1569
+ background: ${n.colors.accent};
1570
+ color: ${n.colors.white};
1571
+ font-family: ${n.font.sans};
1572
+ font-weight: 600;
1573
+ font-size: 13px;
1574
+ line-height: 24px;
1575
+ letter-spacing: 0.46px;
1576
+ text-transform: uppercase;
1577
+
1578
+ &:hover:not(:disabled) {
1579
+ background: ${n.colors.accentHover};
1580
+ }
1581
+ &:focus-visible {
1582
+ outline: 2px solid ${n.colors.accent};
1583
+ outline-offset: 2px;
1584
+ }
1585
+ &:disabled {
1586
+ cursor: not-allowed;
1587
+ background: rgba(105, 31, 169, 0.2);
1588
+ color: ${n.colors.white};
1589
+ }
1590
+ `,Pu=a.div`
1591
+ display: flex;
1592
+ flex-direction: column;
1593
+ align-items: center;
1594
+ gap: 16px;
1595
+ padding: 24px 16px;
1596
+ border-radius: 16px;
1597
+ background: rgba(193, 238, 207, 0.5);
1598
+ text-align: center;
1599
+ `,Tu=a.div`
1600
+ display: grid;
1601
+ place-items: center;
1602
+ width: 64px;
1603
+ height: 64px;
1604
+ border-radius: 50%;
1605
+ background: ${n.colors.ok};
1606
+ color: ${n.colors.white};
1607
+
1608
+ .ico {
1609
+ width: 34px;
1610
+ height: 34px;
1611
+ }
1612
+ `,Eu=a.p`
1613
+ margin: 0;
1614
+ font-family: ${n.font.sans};
1615
+ font-size: 20px;
1616
+ line-height: 1.334;
1617
+ color: ${n.colors.text2};
1618
+
1619
+ b {
1620
+ font-weight: 700;
1621
+ }
1622
+ `;function Fu(t){return t.map(s=>({address:s.address,amount:Number(s.amount)}))}function Bu({item:t,session:s,onClose:l,onIssued:o}){const d=dt(),[u,x]=c.useState([{address:"",amount:"1"}]),[m,y]=c.useState(!1),[$,h]=c.useState(null),[g,w]=c.useState(null),k=c.useRef(null),I=an(s),C=Fu(u),S=Er(C),B=cu(C,t.available),f=S>t.available;c.useEffect(()=>{var R;(R=k.current)==null||R.focus();function A(K){K.key==="Escape"&&!m&&l()}return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[m,l]);function N(A,R){x(K=>K.map((G,ne)=>ne===A?{...G,...R}:G))}function r(){x(A=>[...A,{address:"",amount:"1"}])}function E(A){x(R=>R.length<=1?R:R.filter((K,G)=>G!==A))}async function Y(){if(!(!B||m)){h(null),y(!0);try{await hu({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId,entries:C,itemId:t.itemId}),X("Shop Issued Item",{contract_address:t.contractAddress,item_id:t.itemId,recipients:C.filter(A=>A.address.trim().length>0).length,copies:S}),w(S),Lt.success(i("issue.toastSuccess",{count:S,name:t.name})),d.invalidateQueries({queryKey:["publishable-item"]}),d.invalidateQueries({queryKey:["publishable-items"]}),o==null||o()}catch(A){yt(A)||ue(A,{flow:"issue-item",itemId:t.itemId}),X("Shop Issue Failed",{error_code:$e(A)}),h(yt(A)?i("getCredits.errorCanceled"):_e(A,i("issue.errorGeneric")))}finally{y(!1)}}}const U=m?I?i("issue.issuing"):i("issue.confirm"):S>0?i("issue.issueCount",{count:S}):i("issue.issue");return e.jsx(xu,{onClick:m?void 0:l,role:"presentation",children:e.jsxs(fu,{ref:k,tabIndex:-1,"data-testid":"issue-modal",onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("issue.title"),children:[e.jsxs(mu,{children:[e.jsx(gu,{children:i("issue.title")}),e.jsx(bu,{onClick:l,disabled:m,"aria-label":i("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),g!==null?e.jsxs(e.Fragment,{children:[e.jsxs(Pu,{children:[e.jsx(Tu,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(Eu,{children:i("issue.successBody",{count:g,name:t.name})})]}),e.jsx(ma,{children:e.jsx(ga,{onClick:l,children:i("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(wu,{children:[e.jsx(vu,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsx(ju,{children:t.name})]}),e.jsx(yu,{children:i("issue.subtitle")}),e.jsx(ku,{children:u.map((A,R)=>{const K=A.address.trim(),G=K.length>0&&!Tr(K),ne=Number(A.amount),de=A.amount.length>0&&(!Number.isInteger(ne)||ne<1);return e.jsxs($u,{children:[e.jsxs(Cu,{children:[e.jsx(xa,{children:i("issue.addressLabel")}),e.jsx(fa,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:A.address,onChange:ee=>N(R,{address:ee.target.value}),disabled:m,"aria-invalid":G,"aria-label":i("issue.addressLabel")}),G?e.jsx(Ru,{children:i("issue.invalidAddress")}):null]}),e.jsxs(Iu,{children:[e.jsx(xa,{children:i("issue.amountLabel")}),e.jsx(fa,{type:"number",min:"1",step:"1",inputMode:"numeric",value:A.amount,onChange:ee=>N(R,{amount:ee.target.value}),disabled:m,"aria-invalid":de,"aria-label":i("issue.amountLabel")})]}),e.jsx(Su,{onClick:()=>E(R),disabled:m||u.length<=1,"aria-label":i("issue.removeRow"),children:e.jsx(L,{name:"close",className:"ico"})})]},R)})}),e.jsxs(Au,{onClick:r,disabled:m,children:[e.jsx(L,{name:"plus",className:"ico"}),i("issue.addRow")]}),e.jsxs(Mu,{over:f,"aria-live":"polite",children:[e.jsx("strong",{children:S})," / ",t.available," ",i("issue.itemsToIssue")]}),f?e.jsx(zu,{children:i("issue.overCap",{available:t.available})}):null,e.jsx(Ve,{message:$}),e.jsxs(ma,{children:[e.jsx(Lu,{onClick:l,disabled:m,children:i("sellModal.cancel")}),e.jsx(ga,{onClick:()=>void Y(),disabled:!B||m,children:U})]})]})]})})}const Nu=a.div`
1623
+ position: fixed;
1624
+ inset: 0;
1625
+ z-index: 10000;
1626
+ display: flex;
1627
+ align-items: center;
1628
+ justify-content: center;
1629
+ padding: 16px;
1630
+ background: rgba(22, 21, 24, 0.55);
1631
+ `,Wu=a.div`
1632
+ width: 760px;
1633
+ max-width: 100%;
1634
+ background: ${n.colors.white};
1635
+ border-radius: 16px;
1636
+ padding: 12px 16px 16px;
1637
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1638
+ display: flex;
1639
+ flex-direction: column;
1640
+ gap: 16px;
1641
+ `,Du=a.div`
1642
+ display: flex;
1643
+ align-items: center;
1644
+ justify-content: space-between;
1645
+ gap: 8px;
1646
+ padding-bottom: 16px;
1647
+ border-bottom: 1px solid ${n.colors.gray4};
1648
+ `,Ou=a.h2`
1649
+ margin: 0;
1650
+ font-family: ${n.font.sans};
1651
+ font-weight: 600;
1652
+ font-size: 20px;
1653
+ line-height: 1.6;
1654
+ color: ${n.colors.text};
1655
+ `,qu=a.button`
1656
+ flex: none;
1657
+ display: grid;
1658
+ place-items: center;
1659
+ width: 24px;
1660
+ height: 24px;
1661
+ border: 0;
1662
+ background: none;
1663
+ cursor: pointer;
1664
+ color: ${n.colors.text};
1665
+
1666
+ .ico {
1667
+ width: 18px;
1668
+ height: 18px;
1669
+ }
1670
+ &:focus-visible {
1671
+ outline: 2px solid ${n.colors.accent};
1672
+ outline-offset: 2px;
1673
+ }
1674
+ `,Ku=a.video`
1675
+ display: block;
1676
+ width: 100%;
1677
+ max-height: 70vh;
1678
+ border-radius: 12px;
1679
+ background: ${n.colors.blackBtn};
1680
+ `;function Hu({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(Nu,{onClick:l,role:"presentation",children:e.jsxs(Wu,{ref:o,tabIndex:-1,onClick:d=>d.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":i("itemDetail.showcaseTitle"),children:[e.jsxs(Du,{children:[e.jsx(Ou,{children:s||i("itemDetail.showcaseTitle")}),e.jsx(qu,{onClick:l,"aria-label":i("itemDetail.showcaseClose"),children:e.jsx(L,{name:"close",size:18})})]}),e.jsx(Ku,{src:t,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Oe,radius:Uu}=n,Qu=a.div`
1681
+ position: fixed;
1682
+ inset: 0;
1683
+ z-index: 60;
1684
+ display: grid;
1685
+ place-items: center;
1686
+ padding: 20px;
1687
+ `,Gu=a.div`
1688
+ position: absolute;
1689
+ inset: 0;
1690
+ background: rgba(22, 21, 24, 0.45);
1691
+ `,_u=a.div`
1692
+ position: relative;
1693
+ z-index: 1;
1694
+ width: 100%;
1695
+ max-width: 420px;
1696
+ background: ${Oe.white};
1697
+ border-radius: ${Uu.banner};
1698
+ padding: 24px;
1699
+ box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
1700
+ animation: cart-pop-in 0.16s ease;
1701
+ `,Vu=a.div`
1702
+ display: flex;
1703
+ align-items: center;
1704
+ gap: 14px;
1705
+ margin-bottom: 18px;
1706
+ `,Ju=a.div`
1707
+ width: 64px;
1708
+ height: 64px;
1709
+ flex: none;
1710
+ border-radius: 12px;
1711
+ overflow: hidden;
1712
+ background: ${Oe.media};
1713
+
1714
+ & img {
1715
+ width: 100%;
1716
+ height: 100%;
1717
+ object-fit: contain;
1718
+ }
1719
+ `,Yu=a.div`
1720
+ font-weight: 700;
1721
+ font-size: 16px;
1722
+ color: ${Oe.text};
1723
+ margin-bottom: 6px;
1724
+ `,Xu=a.div`
1725
+ background: ${Oe.panel};
1726
+ border-radius: 14px;
1727
+ padding: 16px;
1728
+ margin-bottom: 14px;
1729
+ `,ba=a.div`
1730
+ color: ${Oe.muted};
1731
+ font-size: 13px;
1732
+ font-weight: 600;
1733
+ margin-bottom: 6px;
1734
+ `,ya=a.div`
1735
+ display: flex;
1736
+ align-items: center;
1737
+ gap: 8px;
1738
+ font-weight: 700;
1739
+ font-size: 24px;
1740
+ color: ${Oe.text};
1741
+
1742
+ &[data-approx] {
1743
+ color: ${Oe.text2};
1744
+ }
1745
+ `,Zu=a.span`
1746
+ color: ${Oe.muted};
1747
+ `,wa=a(ve)`
1748
+ width: 20px;
1749
+ height: 20px;
1750
+ color: ${Oe.text};
1751
+ `,va=a.div`
1752
+ margin-top: 6px;
1753
+ font-size: 13px;
1754
+ `,ep=a.div`
1755
+ font-size: 13px;
1756
+ margin-bottom: 6px;
1757
+ `,Fr=wt`
1758
+ margin: 6px 0 0;
1759
+ font-size: 13px;
1760
+ `,In=a.p`
1761
+ ${Fr};
1762
+ `,tp=a(Ve)`
1763
+ ${Fr};
1764
+ `,np=a.div`
1765
+ display: flex;
1766
+ gap: 10px;
1767
+ margin-top: 18px;
1768
+ `,ja=a(Je)`
1769
+ flex: 1;
1770
+ `;function Sn(t){if(yt(t))return i("errors.rejected");const s=(t.message??"").toLowerCase();return s.includes("insufficient")?i("marketCheckout.error.insufficient",{currency:ze.name}):s.includes("not found")||s.includes("no active listing")||s.includes("404")?i("marketCheckout.error.soldOrRemoved"):s.includes("your own listing")?i("errors.cantBuyOwn"):i("marketCheckout.error.generic")}function ip(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 Br({listing:t,rate:s,onClose:l,onSold:o}){const{session:d}=ot(),{data:u,isError:x}=rr(d),m=dt(),y=lt(),[$,h]=c.useState("confirm"),[g,w]=c.useState(i("marketCheckout.checkingListing")),[k,I]=c.useState(null),[C,S]=c.useState(null),[B,f]=c.useState(null),[N,r]=c.useState(!1),E=c.useRef(null),Y=c.useRef(!1),U=c.useRef(zr());c.useEffect(()=>(Y.current=!1,()=>{Y.current=!0}),[]);const A=Qe(hn(t.manaWei,s));c.useEffect(()=>{let _=!1;if(!d){h("error"),I(i("buyModal.signInToCheckout"));return}return(async()=>{try{const H=await ur(t.tradeId);if(!H)throw new Error("not found");if(Ts(H,d.address))throw new Error("You can't buy your own listing.");const v=hn(t.manaWei,s);if(!Number.isFinite(v)||v<=0)throw new Error("price unavailable");if(_)return;S({trade:H,usdCents:v,credits:Qe(v)}),w("")}catch(H){if(_)return;console.error("[market] listing check failed",H),X(we(H)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:$e(H),value_usd:Math.round(hn(t.manaWei,s))/100}),h("error"),I(Sn(H))}})(),()=>{_=!0,E.current&&d&&(ne([E.current]),E.current=null)}},[]);const R=!!C&&u!=null&&u.credits<C.credits;async function K(){if(!d||!C)return;if(R){X("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))}),E.current&&(await G([E.current])&&f(null),E.current=null),y("/credits");return}h("working"),I(null),r(!1);let _=B;if(!_){w(i("marketCheckout.lockingPrice"));try{const{credit:P,maxCreditedValue:F,usdCents:z}=await Fn(d.identity,C.usdCents,t.tradeId);if(Y.current){G([P.id]);return}E.current=P.id,m.invalidateQueries({queryKey:["usd-balance"]});const se=Qe(z);if(_={trade:C.trade,credit:P,maxCreditedValue:F,usdCents:z,credits:se},f(_),se!==C.credits){S({trade:C.trade,usdCents:z,credits:se}),r(!0),w(""),h("confirm");return}}catch(P){console.error("[market] authorize failed",P),we(P)||ue(P,{flow:"market_buy_now",step:"authorize"}),X(we(P)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:$e(P),value_usd:C.usdCents/100}),w(""),I(Sn(P)),h("error");return}}if(!_)return;const O=_;let H=!1,v;try{w(i("marketCheckout.confirming"));const P={trade:O.trade,buyer:d.address,signer:d.signer,credits:[O.credit],maxCreditedValue:O.maxCreditedValue,onBroadcast:({txHash:F})=>U.current.broadcast(O.credit.id,F),onReverted:({txHash:F})=>{F&&U.current.reverted(F)}};if(U.current.submitStarted(O.credit.id),vr())try{v=await Jl(P),U.current.broadcast(O.credit.id,v),await $r(v),H=!0}catch(F){if(F instanceof Cr)H=!0;else if(F instanceof Ir){if(F.reason==="relayer-unreachable")throw U.current.unobservable(O.credit.id),F;if(!en(d.providerType))throw F;v=await Wi(P)}else throw v&&U.current.reverted(v),F}else v=await Wi(P)}catch(P){U.current.submitFinished(O.credit.id),console.error("[market] buy now failed",P),await G([O.credit.id])&&f(null),E.current=null,X(we(P)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$e(P),value_usd:O.usdCents/100}),m.invalidateQueries({queryKey:["usd-balance"]}),I(Sn(P)),h("error");const F=(P.message??"").toLowerCase();(F.includes("not found")||F.includes("no active listing")||F.includes("404"))&&o();return}U.current.submitFinished(O.credit.id),E.current=null;try{m.invalidateQueries({queryKey:["usd-balance"]}),X("Shop Completed Purchase",{items:[{item_id:t.itemId??null,contract_address:t.contractAddress,token_id:null,price_usd:O.usdCents/100,category:t.category,is_smart:!1}],value_credits:O.credits,value_usd:O.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:H,transaction_hash:v??null}),m.invalidateQueries({queryKey:["detail-trade"]}),m.invalidateQueries({queryKey:["shop-item"]}),m.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["purchases"]})}catch(P){ue(P,{flow:"market_buy_now",step:"post_purchase"})}const fe={items:[ip(t)],txHash:v};y("/success",{state:fe})}async function G(_){if(!d||_.length===0)return!1;const O=_.filter(H=>!U.current.mayBeConsumed(H));if(O.length===0)return!1;try{return await sr(d.identity,O),!0}catch{return!1}}function ne(_){G(_.filter(O=>!U.current.isInFlight(O)))}function de(){d&&B&&G([B.credit.id]),E.current=null,l()}const ee=$==="working";return e.jsxs(Qu,{role:"dialog","aria-modal":"true","aria-label":i("buyModal.dialogAria",{name:t.name}),children:[e.jsx(Gu,{onClick:ee?void 0:de,"aria-hidden":!0}),e.jsxs(_u,{children:[e.jsxs(Vu,{children:[e.jsx(Ju,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx(Yu,{title:t.name,children:t.name||i("buyModal.itemFallback")}),e.jsx(cr,{"data-variant":"rarity",children:t.rarity})]})]}),e.jsx(Xu,{children:C?e.jsxs(e.Fragment,{children:[e.jsx(ba,{children:i("marketCheckout.finalPrice")}),e.jsxs(ya,{children:[e.jsx(wa,{}),e.jsx(ye,{credits:C.credits})," ",Ri(C.credits)]}),e.jsxs(va,{className:"muted",children:["$",rt(C.credits).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(ba,{children:i("marketCheckout.todaysPrice")}),e.jsxs(ya,{"data-approx":!0,children:[e.jsx(Zu,{"aria-hidden":!0,children:"≈"}),e.jsx(wa,{}),e.jsx(ye,{credits:A})," ",Ri(A)]}),e.jsx(va,{className:"muted",children:g||i("marketCheckout.checkingListing")})]})}),d?e.jsxs(ep,{className:"muted",children:[i("marketCheckout.yourBalance")," ",e.jsx(ve,{className:"ccy-mark"})," ",Ps(u,x)]}):null,R?e.jsx(In,{className:"muted",children:i("marketCheckout.needMore",{currency:ze.name})}):null,N?e.jsx(In,{"data-testid":"price-changed",role:"status",children:i("buyModal.priceChanged")}):null,g&&$==="working"?e.jsx(In,{className:"muted",children:g}):null,e.jsx(tp,{message:k}),e.jsxs(np,{children:[e.jsx(ja,{variant:"ghost",onClick:de,disabled:ee,children:i("buyModal.cancel")}),e.jsx(ja,{variant:"purple",onClick:()=>void K(),disabled:ee||!C||R&&gt(),children:ee?i("marketCheckout.buying"):R&&!gt()?i("nav.getCredits",{currency:ze.name}):i("marketCheckout.confirmPurchase")})]})]})]})}function ap(t,s,{enabled:l=!0,first:o}={}){const{data:d,isFetched:u}=te({queryKey:["related-items",t,s,o],enabled:l&&!!t&&!!s,staleTime:3e5,queryFn:()=>Es(t,s,{first:o})});return{items:d??[],isFetched:u}}const Nr=15;function rp(t){return`${t.contractAddress}-${t.itemId??t.tokenId??t.id}`.toLowerCase()}function sp(t,s){return!!(s.id&&t.id===s.id||s.itemId&&t.itemId===s.itemId&&ka(t,s)||s.tokenId&&t.tokenId===s.tokenId&&ka(t,s))}function ka(t,s){var l;return s.contractAddress?((l=t.contractAddress)==null?void 0:l.toLowerCase())===s.contractAddress.toLowerCase():!1}function An(t,s,l=Nr){const o=new Set,d=[];function u(m,y){for(const $ of m){if(d.length>=y)return;if(sp($,s))continue;const h=rp($);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 op=20,lp=30,$a=[];function dp(t,s=Nr){const{id:l,contractAddress:o,itemId:d,tokenId:u,creator:x}=t,m=c.useMemo(()=>({id:l,contractAddress:o,itemId:d,tokenId:u}),[l,o,d,u]),{data:y=$a,isFetched:$}=te({queryKey:["collection-items",o],enabled:!!o,queryFn:()=>Bs(o,{first:op}).then(r=>r.items)}),h=c.useMemo(()=>An({collection:y},m,s).items.length,[y,m,s]),g=$&&h<s,w=g&&!!x,k=te({queryKey:["suggestions-creator",x],enabled:w,staleTime:5*6e4,queryFn:()=>Ns({creator:x,isOnSale:!0,first:lp}).then(r=>r.items)}),I=k.data??$a,C=!w||k.isSuccess||k.isError,S=c.useMemo(()=>An({collection:y,creator:I},m,s).items.length,[y,I,m,s]),{items:B}=ap(o,d??null,{enabled:g&&C&&S<s,first:s}),f=c.useMemo(()=>An({collection:y,creator:I,related:B},m,s),[y,I,B,m,s]),N=Fs(f.items);return{...f,items:N,siblings:y,siblingsFetched:$}}function cp(t){const s=Ws();return!s||!Ds(s.contracts,t)?null:s.label}const{colors:Fe,media:Kn}=n,up=Os`
1771
+ to {
1772
+ transform: rotate(360deg);
1773
+ }
1774
+ `,pp=a.div``,hp=a.span`
1775
+ width: 34px;
1776
+ height: 34px;
1777
+ border-radius: 50%;
1778
+ border: 3px solid ${Fe.line};
1779
+ border-top-color: ${Fe.accent};
1780
+ animation: ${up} 0.8s linear infinite;
1781
+
1782
+ @media (prefers-reduced-motion: reduce) {
1783
+ animation-duration: 2.4s;
1784
+ }
1785
+ `,xp=a.p``,fp=a.div``,Ca=a.button`
1786
+ border: 0;
1787
+ background: none;
1788
+ cursor: pointer;
1789
+ padding: 6px 16px;
1790
+ border-radius: 999px;
1791
+ font-weight: 600;
1792
+ font-size: 12px;
1793
+ text-transform: uppercase;
1794
+ letter-spacing: 0.04em;
1795
+ color: ${Fe.muted};
1796
+ transition:
1797
+ background 0.12s ease,
1798
+ color 0.12s ease;
1799
+
1800
+ &[data-active] {
1801
+ background: ${Fe.text};
1802
+ color: ${Fe.white};
1803
+ }
1804
+ &:not([data-active]):hover {
1805
+ color: ${Fe.text};
1806
+ }
1807
+
1808
+ ${Kn.maxWidth("lg")} {
1809
+ padding: 6px 12px;
1810
+ border-radius: 0;
1811
+ background: ${Fe.white};
1812
+ color: ${Fe.text2};
1813
+
1814
+ &[data-active] {
1815
+ background: ${Fe.text};
1816
+ color: ${Fe.white};
1817
+ }
1818
+ &:first-of-type {
1819
+ border-top-left-radius: 999px;
1820
+ border-bottom-left-radius: 999px;
1821
+ }
1822
+ &:last-of-type {
1823
+ border-top-right-radius: 999px;
1824
+ border-bottom-right-radius: 999px;
1825
+ }
1826
+ }
1827
+ `,Ia=a.span`
1828
+ ${Kn.maxWidth("lg")} {
1829
+ display: none;
1830
+ }
1831
+ `,Sa=a(L)`
1832
+ display: none;
1833
+
1834
+ ${Kn.maxWidth("lg")} {
1835
+ display: block;
1836
+ }
1837
+ `,Aa="shop-item-preview";function mp({item:t}){const s=ot(R=>{var K;return(K=R.session)==null?void 0:K.address}),{data:l,isLoading:o}=tn(s),d=s&&l?s:"default",u=t.category==="emote",[x,m]=c.useState("avatar"),y=!u&&x==="item",$=y||!o,h=Rt(R=>R.fittingOpen),{ref:g,active:w}=qs(),k=$&&w&&!h,[I,C]=c.useState(!0);c.useEffect(()=>{C(!0)},[t.id,y]),c.useEffect(()=>{k&&C(!0)},[k]);const S=c.useRef(null);c.useEffect(()=>{if(k)return()=>{md(S.current),S.current=null}},[k]);const[B,f]=c.useState(Ae.PreviewRenderer.UNITY),N=B===Ae.PreviewRenderer.BABYLON,r=!!s&&!!l,E=r&&Ks(t,Hs(l)),Y=Us(t)[0],U=r&&!E&&!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(Qs,{id:Aa,...A,profile:y?void 0:E?d:"default",bodyShape:y||E?void 0:Y,type:u?void 0:y?Ae.PreviewType.WEARABLE:Ae.PreviewType.AVATAR,emote:u||y?void 0:Ae.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:u?1.5:void 0,wheelStart:u?100:void 0,onRenderer:f,onLoad:()=>{var R;C(!1),S.current=((R=document.getElementById(Aa))==null?void 0:R.contentWindow)??null}}):null,!k||I?e.jsx(pp,{"data-preview-loading":!0,"aria-busy":"true","aria-label":i("itemPreview.loading"),children:e.jsx(hp,{"aria-hidden":!0})}):null,U&&!y?e.jsx(xp,{"data-preview-note":!0,children:i("itemPreview.shownOnBody",{shape:Gs(Y)})}):null,!N||!u?null:e.jsx(fd,{previewId:"shop-item-preview"}),!N||u?null:e.jsxs(fp,{"data-preview-toggle":!0,role:"group","aria-label":i("itemPreview.previewMode"),children:[e.jsxs(Ca,{type:"button","data-active":x==="avatar"||void 0,"aria-pressed":x==="avatar","aria-label":i("itemPreview.onAvatar"),onClick:()=>m("avatar"),children:[e.jsx(Sa,{name:"view-avatar",size:18}),e.jsx(Ia,{children:i("itemPreview.onAvatar")})]}),e.jsxs(Ca,{type:"button","data-active":x==="item"||void 0,"aria-pressed":x==="item","aria-label":i("itemPreview.item"),onClick:()=>m("item"),children:[e.jsx(Sa,{name:"view-item",size:18}),e.jsx(Ia,{children:i("itemPreview.item")})]})]})]})}const gp=a.div`
1838
+ position: fixed;
1839
+ inset: 0;
1840
+ z-index: 10000;
1841
+ display: flex;
1842
+ align-items: center;
1843
+ justify-content: center;
1844
+ padding: 16px;
1845
+ background: rgba(22, 21, 24, 0.55);
1846
+ `,bp=a.div`
1847
+ display: flex;
1848
+ flex-direction: column;
1849
+ gap: 12px;
1850
+ width: 1128px;
1851
+ max-width: 100%;
1852
+ max-height: 92vh;
1853
+ background: ${n.colors.white};
1854
+ border-radius: 16px;
1855
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
1856
+
1857
+ &:focus {
1858
+ outline: none;
1859
+ }
1860
+ `,yp=a.div`
1861
+ flex: none;
1862
+ display: flex;
1863
+ align-items: center;
1864
+ gap: 8px;
1865
+ padding: 16px;
1866
+ border-bottom: 1px solid ${n.colors.gray4};
1867
+ `,wp=a.h2`
1868
+ flex: 1 1 auto;
1869
+ min-width: 0;
1870
+ margin: 0;
1871
+ font-family: ${n.font.sans};
1872
+ font-weight: 600;
1873
+ font-size: 20px;
1874
+ line-height: 1.6;
1875
+ color: ${n.colors.text};
1876
+ `,vp=a.button`
1877
+ flex: none;
1878
+ display: grid;
1879
+ place-items: center;
1880
+ width: 18.5px;
1881
+ height: 18.5px;
1882
+ padding: 0;
1883
+ border: 0;
1884
+ background: none;
1885
+ cursor: pointer;
1886
+ color: ${n.colors.text};
1887
+
1888
+ .ico {
1889
+ width: 18.5px;
1890
+ height: 18.5px;
1891
+ }
1892
+ &:focus-visible {
1893
+ outline: 2px solid ${n.colors.accent};
1894
+ outline-offset: 4px;
1895
+ }
1896
+ `,jp=a.div`
1897
+ flex: 1 1 auto;
1898
+ min-height: 0;
1899
+ overflow-y: auto;
1900
+ display: flex;
1901
+ flex-direction: column;
1902
+ gap: 8px;
1903
+ padding: 0 16px 24px;
1904
+ `,kp=a.div`
1905
+ position: sticky;
1906
+ top: 0;
1907
+ z-index: 1;
1908
+ display: flex;
1909
+ align-items: center;
1910
+ justify-content: space-between;
1911
+ gap: 8px;
1912
+ padding-bottom: 8px;
1913
+ background: ${n.colors.white};
1914
+ `,$p=a.p`
1915
+ margin: 0;
1916
+ font-family: ${n.font.sans};
1917
+ font-size: 14px;
1918
+ line-height: 1.43;
1919
+ color: ${n.colors.muted};
1920
+ `,Cp=a.div`
1921
+ position: relative;
1922
+ flex: none;
1923
+ display: inline-flex;
1924
+ align-items: center;
1925
+ padding: 4px 4px 4px 12px;
1926
+ border: 0.5px solid ${n.colors.lineStrong};
1927
+ border-radius: 8px;
1928
+ background: ${n.colors.white};
1929
+
1930
+ select {
1931
+ appearance: none;
1932
+ /* 24px design gap + the 24px chevron that sits on top of it. */
1933
+ padding: 0 48px 0 0;
1934
+ border: 0;
1935
+ background: none;
1936
+ font-family: ${n.font.sans};
1937
+ font-weight: 500;
1938
+ font-size: 12px;
1939
+ line-height: 1.43;
1940
+ color: ${n.colors.text2};
1941
+ cursor: pointer;
1942
+ outline: none;
1943
+ }
1944
+ select:focus-visible {
1945
+ outline: 2px solid ${n.colors.accent};
1946
+ outline-offset: 2px;
1947
+ border-radius: 4px;
1948
+ }
1949
+ .chev {
1950
+ position: absolute;
1951
+ right: 4px;
1952
+ width: 24px;
1953
+ height: 24px;
1954
+ color: ${n.colors.text2};
1955
+ pointer-events: none;
1956
+ }
1957
+ `,Ip=a.div`
1958
+ flex: none;
1959
+ border: 1px solid ${n.colors.lineStrong};
1960
+ border-radius: 16px;
1961
+ /* The four equal columns need the design width to hold their content, so a narrower modal scrolls
1962
+ the table here rather than letting the page scroll sideways. */
1963
+ overflow-x: auto;
1964
+ overflow-y: hidden;
1965
+ background: ${n.colors.white};
1966
+ `,Sp=a.table`
1967
+ width: 100%;
1968
+ min-width: 1096px;
1969
+ table-layout: fixed;
1970
+ border-collapse: collapse;
1971
+
1972
+ th {
1973
+ height: 48px;
1974
+ padding: 8px 8px 8px 16px;
1975
+ text-align: left;
1976
+ vertical-align: middle;
1977
+ background: ${n.colors.media};
1978
+ border-right: 0.5px solid ${n.colors.lineStrong};
1979
+ font-family: ${n.font.sans};
1980
+ font-weight: 600;
1981
+ font-size: 16px;
1982
+ line-height: 1.5;
1983
+ color: ${n.colors.text};
1984
+ text-transform: capitalize;
1985
+ }
1986
+ th:last-of-type {
1987
+ border-right: 0;
1988
+ }
1989
+
1990
+ td {
1991
+ height: 56px;
1992
+ padding: 8px 8px 8px 16px;
1993
+ vertical-align: middle;
1994
+ border-right: 0.5px solid ${n.colors.lineStrong};
1995
+ border-bottom: 0.5px solid ${n.colors.lineStrong};
1996
+ font-family: ${n.font.sans};
1997
+ font-size: 14px;
1998
+ line-height: 1.43;
1999
+ color: ${n.colors.text2};
2000
+ }
2001
+ td:last-of-type {
2002
+ border-right: 0;
2003
+ }
2004
+
2005
+ tbody tr:hover,
2006
+ tbody tr:focus-within {
2007
+ background: ${n.colors.media};
2008
+ }
2009
+ tbody tr:hover td,
2010
+ tbody tr:focus-within td {
2011
+ border-bottom-color: ${n.colors.media};
2012
+ }
2013
+
2014
+ /* Stack every cell into a card — a 4-column grid is unusable at phone widths. The column name is
2015
+ carried on each cell's data-label so it survives translation. */
2016
+ ${n.media.maxWidth("mobile")} {
2017
+ min-width: 0;
2018
+
2019
+ thead {
2020
+ display: none;
2021
+ }
2022
+ tr {
2023
+ display: block;
2024
+ border-bottom: 0.5px solid ${n.colors.lineStrong};
2025
+ }
2026
+ tr:last-of-type {
2027
+ border-bottom: 0;
2028
+ }
2029
+ td {
2030
+ display: block;
2031
+ height: auto;
2032
+ padding: 8px 16px;
2033
+ border-right: 0;
2034
+ border-bottom: 0;
2035
+ }
2036
+ td:first-of-type {
2037
+ padding-top: 12px;
2038
+ }
2039
+ td:last-of-type {
2040
+ padding-bottom: 12px;
2041
+ }
2042
+ td[data-label]::before {
2043
+ content: attr(data-label);
2044
+ display: block;
2045
+ margin-bottom: 2px;
2046
+ font-size: 12px;
2047
+ line-height: 1.43;
2048
+ color: ${n.colors.muted};
2049
+ text-transform: capitalize;
2050
+ }
2051
+ tbody tr:hover td,
2052
+ tbody tr:focus-within td {
2053
+ border-bottom-color: transparent;
2054
+ }
2055
+ }
2056
+ `,Wr=`
2057
+ display: flex;
2058
+ align-items: center;
2059
+ gap: 10px;
2060
+ min-width: 0;
2061
+
2062
+ .owner-ava {
2063
+ flex: none;
2064
+ display: inline-grid;
2065
+ place-items: center;
2066
+ width: 32px;
2067
+ height: 32px;
2068
+ border: 2.286px solid rgba(255, 255, 255, 0.5);
2069
+ border-radius: 50%;
2070
+ background: ${n.colors.media};
2071
+ object-fit: cover;
2072
+ overflow: hidden;
2073
+ color: ${n.colors.white};
2074
+ font-weight: 700;
2075
+ font-size: 13px;
2076
+ }
2077
+ .owner-name {
2078
+ min-width: 0;
2079
+ overflow: hidden;
2080
+ text-overflow: ellipsis;
2081
+ white-space: nowrap;
2082
+ font-family: ${n.font.sans};
2083
+ font-size: 14px;
2084
+ line-height: 1.43;
2085
+ color: ${n.colors.text2};
2086
+ }
2087
+ `,Ap=a.div`
2088
+ ${Wr}
2089
+ `,Mp=a.button`
2090
+ ${Wr}
2091
+ padding: 0;
2092
+ border: 0;
2093
+ background: none;
2094
+ font: inherit;
2095
+ text-align: left;
2096
+ cursor: pointer;
2097
+
2098
+ &:hover .owner-name {
2099
+ text-decoration: underline;
2100
+ }
2101
+ &:focus-visible {
2102
+ outline: 2px solid ${n.colors.accent};
2103
+ outline-offset: 2px;
2104
+ border-radius: 4px;
2105
+ }
2106
+ `,Ma=a.span`
2107
+ color: ${n.colors.muted};
2108
+ `,zp=a.div`
2109
+ display: flex;
2110
+ align-items: center;
2111
+ justify-content: space-between;
2112
+ gap: 4px;
2113
+
2114
+ .amount {
2115
+ display: inline-flex;
2116
+ align-items: center;
2117
+ gap: 4px;
2118
+ font-family: ${n.font.sans};
2119
+ font-weight: 600;
2120
+ font-size: 16px;
2121
+ line-height: 1.5;
2122
+ color: ${n.colors.text2};
2123
+ }
2124
+ /* The credits mark is always near-black here — never the violet accent. */
2125
+ .amount .ccy {
2126
+ flex: none;
2127
+ width: 22px;
2128
+ height: 22px;
2129
+ color: ${n.colors.text2};
2130
+ }
2131
+ .approx {
2132
+ color: ${n.colors.muted};
2133
+ font-weight: 600;
2134
+ }
2135
+ `,Rp=a.div`
2136
+ flex: none;
2137
+ display: flex;
2138
+ align-items: center;
2139
+ gap: 8px;
2140
+ opacity: 0;
2141
+ transition: opacity 0.12s ease;
2142
+
2143
+ tr:hover &,
2144
+ tr:focus-within &,
2145
+ &[data-persistent='true'] {
2146
+ opacity: 1;
2147
+ }
2148
+
2149
+ @media (hover: none) {
2150
+ opacity: 1;
2151
+ }
2152
+ ${n.media.maxWidth("mobile")} {
2153
+ opacity: 1;
2154
+ }
2155
+ `,Dr=`
2156
+ display: inline-flex;
2157
+ align-items: center;
2158
+ justify-content: center;
2159
+ gap: 8px;
2160
+ height: 40px;
2161
+ padding: 0 12px;
2162
+ border: 0;
2163
+ border-radius: 12px;
2164
+ cursor: pointer;
2165
+ font-family: ${n.font.sans};
2166
+ font-weight: 600;
2167
+ font-size: 13px;
2168
+ line-height: 24px;
2169
+ letter-spacing: 0.46px;
2170
+ text-transform: uppercase;
2171
+ text-align: center;
2172
+ white-space: nowrap;
2173
+
2174
+ .ico {
2175
+ width: 20px;
2176
+ height: 20px;
2177
+ }
2178
+ &:focus-visible {
2179
+ outline: 2px solid ${n.colors.accent};
2180
+ outline-offset: 2px;
2181
+ }
2182
+ `,Lp=a.button`
2183
+ ${Dr}
2184
+ min-width: 106px;
2185
+ background: ${n.colors.text2};
2186
+ color: ${n.colors.softWhite};
2187
+
2188
+ &:hover:not(:disabled) {
2189
+ filter: brightness(1.35);
2190
+ }
2191
+ &:disabled {
2192
+ opacity: 0.55;
2193
+ cursor: default;
2194
+ }
2195
+ `,za=a.button`
2196
+ ${Dr}
2197
+ background: ${n.colors.accent};
2198
+ color: ${n.colors.softWhite};
2199
+
2200
+ &:hover:not(:disabled) {
2201
+ background: ${n.colors.accentHover};
2202
+ }
2203
+ `,Pp=a.span`
2204
+ display: inline-flex;
2205
+ align-items: center;
2206
+ height: 40px;
2207
+ padding: 0 12px;
2208
+ border-radius: 12px;
2209
+ background: ${n.colors.chip};
2210
+ font-family: ${n.font.sans};
2211
+ font-weight: 600;
2212
+ font-size: 13px;
2213
+ line-height: 24px;
2214
+ color: ${n.colors.muted};
2215
+ white-space: nowrap;
2216
+ `,Tp=a.div`
2217
+ flex: none;
2218
+ display: flex;
2219
+ align-items: center;
2220
+ justify-content: flex-end;
2221
+ gap: 8px;
2222
+ `,Ep=a.p`
2223
+ margin: 0;
2224
+ font-family: ${n.font.sans};
2225
+ font-size: 12px;
2226
+ line-height: 1;
2227
+ color: ${n.colors.gray0};
2228
+ `,Ra=a.button`
2229
+ display: grid;
2230
+ place-items: center;
2231
+ padding: 10px;
2232
+ border: 1px solid ${n.colors.text2};
2233
+ border-radius: 4px;
2234
+ background: ${n.colors.white};
2235
+ color: ${n.colors.text2};
2236
+ cursor: pointer;
2237
+
2238
+ /* One chevron glyph turned into ‹ / › so no extra asset is needed. */
2239
+ .ico {
2240
+ width: 11px;
2241
+ height: 11px;
2242
+ transform: rotate(-90deg);
2243
+ }
2244
+ &[data-dir='prev'] .ico {
2245
+ transform: rotate(90deg);
2246
+ }
2247
+ &:disabled {
2248
+ border-color: ${n.colors.lineStrong};
2249
+ color: ${n.colors.lineStrong};
2250
+ cursor: default;
2251
+ }
2252
+ &:focus-visible {
2253
+ outline: 2px solid ${n.colors.accent};
2254
+ outline-offset: 2px;
2255
+ }
2256
+ `,Fp=a.p`
2257
+ margin: 0;
2258
+ padding: 32px 0;
2259
+ font-family: ${n.font.sans};
2260
+ font-size: 14px;
2261
+ line-height: 1.43;
2262
+ color: ${n.colors.muted};
2263
+ text-align: center;
2264
+ `;a.div`
2265
+ display: flex;
2266
+ flex-direction: column;
2267
+ gap: 8px;
2268
+ margin-top: 16px;
2269
+
2270
+ .classic-title {
2271
+ font-family: ${n.font.sans};
2272
+ font-weight: 600;
2273
+ font-size: 15px;
2274
+ color: ${n.colors.text2};
2275
+ }
2276
+ .classic-note {
2277
+ font-family: ${n.font.sans};
2278
+ font-size: 13px;
2279
+ color: ${n.colors.muted};
2280
+ }
2281
+ `;a.span`
2282
+ display: inline-flex;
2283
+ align-items: center;
2284
+ padding: 2px 8px;
2285
+ border-radius: ${n.radius.chip};
2286
+ background: ${n.colors.chip};
2287
+ font-family: ${n.font.sans};
2288
+ font-size: 11px;
2289
+ letter-spacing: 0.4px;
2290
+ text-transform: uppercase;
2291
+ color: ${n.colors.muted};
2292
+ `;a.a`
2293
+ display: inline-flex;
2294
+ align-items: center;
2295
+ gap: 6px;
2296
+ height: 40px;
2297
+ padding: 0 14px;
2298
+ border: 1px solid ${n.colors.lineStrong};
2299
+ border-radius: 12px;
2300
+ color: ${n.colors.accent};
2301
+ font-family: ${n.font.sans};
2302
+ font-weight: 600;
2303
+ font-size: 13px;
2304
+ text-decoration: none;
2305
+
2306
+ &:hover {
2307
+ background: ${n.colors.chip};
2308
+ }
2309
+ .ico {
2310
+ width: 14px;
2311
+ height: 14px;
2312
+ }
2313
+ `;const Jt=10,Bp=!1;function Np(t){return/^0x[a-fA-F0-9]{40}$/.test(t)?`${t.slice(0,6)}…${t.slice(-4)}`:t}function Wp(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 Dp(t,s){var l;return(((l=t==null?void 0:t.trim())==null?void 0:l[0])||s.replace(/^0x/i,"")[0]||"?").toUpperCase()}function Op(t){return t%100>=11&&t%100<=13?"th":["th","st","nd","rd"][t%10]??"th"}function qp(t,s){const l=new Date(t);return Number.isNaN(l.getTime())?"—":s==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(l)} ${l.getDate()}${Op(l.getDate())}, ${l.getFullYear()}`:new Intl.DateTimeFormat(s,{day:"numeric",month:"long",year:"numeric"}).format(l)}function Kp(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 Hp({r:t,seller:s,issuedId:l,labels:o,locale:d,isOwn:u,isLegacy:x,inCart:m,fallbackImage:y,onAdd:$,onBuyNative:h,onBuyLegacy:g}){var E,Y;const w=lt(),{data:k}=tn(s),I=(Y=(E=k==null?void 0:k.avatar)==null?void 0:E.snapshots)==null?void 0:Y.face256,[C,S]=c.useState(!1);c.useEffect(()=>S(!1),[I]);const B=!!I&&!C,f=s?k!=null&&k.name?nn(k.name):Np(s):void 0,N=B?e.jsx("img",{className:"owner-ava",src:I,alt:"",loading:"lazy",onError:()=>S(!0)}):s?e.jsx("span",{className:"owner-ava",style:{backgroundColor:Wp(s)},"aria-hidden":!0,children:Dp(k==null?void 0:k.name,s)}):y?e.jsx("img",{className:"owner-ava",src:y,alt:"","aria-hidden":!0}):e.jsx("span",{className:"owner-ava","aria-hidden":!0}),r=e.jsxs(e.Fragment,{children:[N,f?e.jsx("span",{className:"owner-name","data-testid":"resale-seller",children:f}):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(Mp,{type:"button",onClick:()=>w(`/items/creator/${s}`),children:r}):e.jsx(Ap,{children:r})}),e.jsx("td",{"data-label":o.itemNumber,children:l?e.jsxs("span",{"data-testid":"resale-issued",children:["#",l]}):e.jsx(Ma,{children:"—"})}),e.jsx("td",{"data-label":o.expiration,children:t.saleEndsAt?qp(t.saleEndsAt,d):e.jsx(Ma,{children:"—"})}),e.jsx("td",{"data-label":o.price,children:e.jsxs(zp,{children:[e.jsxs("span",{className:"amount",children:[x?e.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,e.jsx(ve,{className:"ccy"}),e.jsx("span",{children:Ge(t.priceCredits)})]}),e.jsx(Rp,{"data-persistent":u?"true":void 0,children:u?e.jsx(Pp,{"data-testid":"resale-own",children:i("resales.yourListing")}):x?e.jsx(za,{onClick:g,"aria-label":i("assetCard.buyNow"),"data-testid":"resale-buy",children:i("resales.buy")}):e.jsxs(e.Fragment,{children:[e.jsxs(Lp,{onClick:$,disabled:m,"aria-label":m?i("assetCard.inCart"):i("assetCard.addToCart"),"data-testid":"resale-add",children:[e.jsx(L,{name:"cart",className:"ico"}),e.jsx("span",{children:m?i("assetCard.inCart"):i("resales.add")})]}),e.jsx(za,{onClick:h,"aria-label":i("assetCard.buyNow"),"data-testid":"resale-buy",children:i("resales.buy")})]})})]})})]})}function Up({item:t,onClose:s}){var H;const l=t.contractAddress,o=t.itemId,d=dt(),u=Rt(v=>v.add),x=Rt(v=>v.items),{session:m}=ot(),y=pr(v=>v.locale),$=(H=m==null?void 0:m.address)==null?void 0:H.toLowerCase(),h=c.useRef(null),[g,w]=c.useState(null),[k,I]=c.useState(null),[C,S]=c.useState("cheapest"),[B,f]=c.useState(0),N=!!g||!!k;c.useEffect(()=>{var v;(v=h.current)==null||v.focus()},[]),c.useEffect(()=>{function v(P){P.key==="Escape"&&!N&&s()}window.addEventListener("keydown",v);const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",v),document.body.style.overflow=fe}},[N,s]);const{data:r=[],isLoading:E}=te({queryKey:["item-resales",l,o],enabled:!!l&&!!o,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>xr(l,o)}),Y=c.useMemo(()=>C==="cheapest"?r:[...r].sort((v,fe)=>fe.priceCredits-v.priceCredits),[r,C]),U=Math.max(1,Math.ceil(Y.length/Jt)),A=Math.min(B,U-1),R=Y.slice(A*Jt,A*Jt+Jt),K=R.filter(v=>!v.seller||!v.issuedId).map(v=>v.tokenId).filter(v=>!!v),{data:G={}}=te({queryKey:["resale-token-info",l,K.join(",")],enabled:!!l&&K.length>0,staleTime:6e4,queryFn:()=>_s(l,K)}),{data:ne=[]}=te({queryKey:["item-classic-orders",l,o],enabled:Bp,queryFn:()=>Vs(l,o)}),de=r.some(v=>v.source==="legacy"),{data:ee}=hr(de);function _(){d.invalidateQueries({queryKey:["item-resales",l,o]})}const O={owner:i("resales.colOwner"),itemNumber:i("resales.colItemNumber"),expiration:i("resales.colExpiration"),price:i("resales.colPrice")};return e.jsxs(e.Fragment,{children:[e.jsx(gp,{onClick:N?void 0:s,role:"presentation",children:e.jsxs(bp,{ref:h,tabIndex:-1,onClick:v=>v.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("resales.modalTitle"),"data-testid":"resellers-modal",children:[e.jsxs(yp,{children:[e.jsx(wp,{children:i("resales.modalTitle")}),e.jsx(vp,{onClick:s,"aria-label":i("resales.close"),"data-testid":"resellers-close",children:e.jsx(L,{name:"close"})})]}),e.jsxs(jp,{children:[e.jsxs(kp,{children:[e.jsx($p,{"data-testid":"resales-count",children:i("resales.count",{count:r.length})}),e.jsxs(Cp,{children:[e.jsxs("select",{value:C,onChange:v=>{S(v.target.value),f(0)},"aria-label":i("resales.sortLabel"),"data-testid":"resales-sort",children:[e.jsx("option",{value:"cheapest",children:i("resales.sortCheapest")}),e.jsx("option",{value:"most_expensive",children:i("resales.sortExpensive")})]}),e.jsx(L,{name:"chevron-down",className:"chev"})]})]}),E?null:Y.length===0?e.jsx(Fp,{"data-testid":"resales-empty",children:i("resales.empty")}):null,Y.length>0?e.jsxs(e.Fragment,{children:[e.jsx(Ip,{children:e.jsxs(Sp,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:O.owner}),e.jsx("th",{scope:"col",children:O.itemNumber}),e.jsx("th",{scope:"col",children:O.expiration}),e.jsx("th",{scope:"col",children:O.price})]})}),e.jsx("tbody",{children:R.map(v=>{const fe=v.source==="legacy",P=x.some(Q=>Q.id===v.id),F=v.tokenId&&G[v.tokenId]||{},z=v.issuedId??F.issuedId,se=v.seller??F.seller,ie={...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},xe=!!se&&!!$&&se.toLowerCase()===$;return e.jsx(Hp,{r:ie,seller:se,issuedId:z,labels:O,locale:y,isOwn:xe,isLegacy:fe,inCart:P,fallbackImage:ie.thumbnail,onAdd:()=>u(ie,"item_detail"),onBuyNative:()=>w(ie),onBuyLegacy:()=>I(Kp(ie))},v.tradeId??v.id)})})]})}),U>1?e.jsxs(Tp,{children:[e.jsx(Ra,{"data-dir":"prev",onClick:()=>f(v=>Math.max(0,v-1)),disabled:A===0,"aria-label":i("resales.prevPage"),"data-testid":"resale-prev-page",children:e.jsx(L,{name:"chevron-down"})}),e.jsx(Ep,{"data-testid":"resale-page-label",children:i("resales.page",{page:A+1,total:U})}),e.jsx(Ra,{onClick:()=>f(v=>Math.min(U-1,v+1)),disabled:A>=U-1,"aria-label":i("resales.nextPage"),"data-testid":"resale-next-page",children:e.jsx(L,{name:"chevron-down"})})]}):null]}):null,null]})]})}),g?e.jsx(Bn,{item:g,onClose:()=>{w(null),_()}}):null,k&&ee?e.jsx(Br,{listing:k,rate:ee,onClose:()=>I(null),onSold:()=>{I(null),_()}}):null]})}const Qp="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:ge,font:Or,radius:Hn,z:Gp}=n,_p=a.div`
2314
+ position: fixed;
2315
+ inset: 0;
2316
+ z-index: ${Gp.overlay};
2317
+ display: flex;
2318
+ align-items: center;
2319
+ justify-content: center;
2320
+ overflow-y: auto;
2321
+ padding: 16px;
2322
+ background: rgba(22, 21, 24, 0.55);
2323
+ `,Vp=a.div`
2324
+ width: 560px;
2325
+ max-width: 100%;
2326
+ max-height: 100%;
2327
+ overflow-y: auto;
2328
+ padding: 12px 16px 16px;
2329
+ border-radius: ${Hn.modal};
2330
+ background: ${ge.white};
2331
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
2332
+ display: flex;
2333
+ flex-direction: column;
2334
+ gap: 24px;
2335
+ font-family: ${Or.sans};
2336
+
2337
+ /* Focused on mount for screen readers; it is not tab-reachable, so it never needs a visible ring. */
2338
+ &:focus {
2339
+ outline: none;
2340
+ }
2341
+ `,Jp=a.div`
2342
+ display: flex;
2343
+ align-items: center;
2344
+ justify-content: space-between;
2345
+ gap: 8px;
2346
+ padding-bottom: 16px;
2347
+ border-bottom: 1px solid ${ge.gray4};
2348
+ `,Yp=a.h2`
2349
+ margin: 0;
2350
+ font-weight: 600;
2351
+ font-size: 20px;
2352
+ line-height: 1.6;
2353
+ color: ${ge.text};
2354
+ `,Xp=a.button`
2355
+ position: relative;
2356
+ flex: none;
2357
+ display: grid;
2358
+ place-items: center;
2359
+ width: 18.535px;
2360
+ height: 18.535px;
2361
+ padding: 0;
2362
+ border: 0;
2363
+ background: none;
2364
+ cursor: pointer;
2365
+ color: ${ge.text};
2366
+
2367
+ .ico {
2368
+ width: 100%;
2369
+ height: 100%;
2370
+ }
2371
+ /* Keeps the glyph exactly where the design puts it while giving it a tappable hit area. */
2372
+ &::after {
2373
+ content: '';
2374
+ position: absolute;
2375
+ inset: -11px;
2376
+ }
2377
+ &:focus-visible {
2378
+ outline: 2px solid ${ge.accent};
2379
+ outline-offset: 2px;
2380
+ }
2381
+ `,Zp=a.div`
2382
+ padding: 24px 16px;
2383
+ border-radius: ${Hn.modal};
2384
+ background: ${ge.promptLilac};
2385
+ display: flex;
2386
+ flex-direction: column;
2387
+ align-items: center;
2388
+ gap: 16px;
2389
+ text-align: center;
2390
+ `,eh=a.img`
2391
+ flex: none;
2392
+ width: 76px;
2393
+ height: 76px;
2394
+ `,th=a.h3`
2395
+ margin: 0;
2396
+ font-weight: 700;
2397
+ font-size: 20px;
2398
+ line-height: 1.334;
2399
+ color: ${ge.text2};
2400
+ `,La=a.p`
2401
+ margin: 0;
2402
+ font-weight: 400;
2403
+ font-size: 16px;
2404
+ line-height: 1.334;
2405
+ color: ${ge.text2};
2406
+ `,nh=a.div`
2407
+ display: flex;
2408
+ align-items: center;
2409
+ gap: 12px;
2410
+ `,qr=`
2411
+ flex: 1 1 0;
2412
+ min-width: 0;
2413
+ display: inline-flex;
2414
+ align-items: center;
2415
+ justify-content: center;
2416
+ gap: 12px;
2417
+ height: 46px;
2418
+ padding: 0 12px;
2419
+ border-radius: ${Hn.card};
2420
+ font-family: ${Or.sans};
2421
+ font-weight: 600;
2422
+ font-size: 13px;
2423
+ line-height: 24px;
2424
+ letter-spacing: 0.46px;
2425
+ text-transform: uppercase;
2426
+ cursor: pointer;
2427
+ transition:
2428
+ background 0.15s ease,
2429
+ color 0.15s ease;
2430
+
2431
+ &:focus-visible {
2432
+ outline: 2px solid ${ge.accent};
2433
+ outline-offset: 2px;
2434
+ }
2435
+ `,ih=a.button`
2436
+ ${qr};
2437
+ border: 0.5px solid ${ge.text};
2438
+ background: ${ge.white};
2439
+ color: ${ge.text2};
2440
+
2441
+ &:hover {
2442
+ background: ${ge.panel};
2443
+ }
2444
+ `,ah=a.a`
2445
+ ${qr};
2446
+ border: 0;
2447
+ background: ${ge.dclRed};
2448
+ color: ${ge.softWhite};
2449
+ text-decoration: none;
2450
+
2451
+ &:hover {
2452
+ filter: brightness(1.08);
2453
+ }
2454
+ `,rh=a.span`
2455
+ flex: none;
2456
+ display: grid;
2457
+ place-items: center;
2458
+ width: 24px;
2459
+ height: 24px;
2460
+
2461
+ .ico {
2462
+ width: 100%;
2463
+ height: 100%;
2464
+ }
2465
+ `;function sh(t,s){return`${st.marketplaceUrl}/contracts/${t}/tokens/${s}`}function oh(t,s){return`${st.marketplaceUrl}/contracts/${t}/items/${s}`}function Pa(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"?oh(s,t.itemId):sh(s,t.tokenId),m=c.useRef(null),y=c.useRef(l);return y.current=l,c.useEffect(()=>{var h;(h=m.current)==null||h.focus();function $(g){g.key==="Escape"&&y.current()}return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[]),e.jsx(_p,{role:"presentation",onClick:l,children:e.jsxs(Vp,{ref:m,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":i("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:$=>$.stopPropagation(),children:[e.jsxs(Jp,{children:[e.jsx(Yp,{children:i("marketplaceRedirect.title")}),e.jsx(Xp,{onClick:l,"aria-label":i("marketplaceRedirect.close"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(Zp,{children:[e.jsx(eh,{src:Qp,alt:"","aria-hidden":!0}),e.jsx(th,{children:i("marketplaceRedirect.heading")}),e.jsx(La,{children:o?i("marketplaceRedirect.buyBody"):i("marketplaceRedirect.body")}),o?e.jsx(La,{children:i("marketplaceRedirect.buyCurrencyNote")}):null]}),e.jsxs(nh,{children:[e.jsx(ih,{onClick:l,"data-testid":"marketplace-redirect-cancel",children:i("marketplaceRedirect.cancel")}),e.jsxs(ah,{href:x,target:"_blank",rel:"noreferrer","data-testid":"marketplace-redirect-continue",onClick:()=>X("Shop Redirected To Marketplace",{direction:o?"buy":"resell",contract_address:s,item_id:d,token_id:u}),children:[i("marketplaceRedirect.continue"),e.jsx(rh,{"aria-hidden":!0,children:e.jsx(L,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function Un(){return st.shopServerUrl||null}function Kr(){return!!Un()}async function lh(t,s,l){const o=Un();if(!o)return{subscribed:!1};const d=new URLSearchParams({contractAddress:t,itemId:s}),u=`${o}/notify-requests?${d.toString()}`,x=await fr(u,{method:"GET",identity:l,metadata:{}});if(!x.ok)throw new Error(`getNotifyRequest ${x.status}`);return ch(x,"getNotifyRequest")}async function dh(t,s){const l=Un();if(!l)throw new Error("createNotifyRequest: no shop-server host configured");const o=`${l}/notify-requests`,d=await fr(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()&&!uh(u))throw new Error("createNotifyRequest: response was not JSON")}async function ch(t,s){try{return await t.json()}catch{throw new Error(`${s}: response was not JSON`)}}function uh(t){try{return JSON.parse(t),!0}catch{return!1}}const{colors:Me,radius:Hr}=n,Ur=wt`
2466
+ display: flex;
2467
+ flex-direction: column;
2468
+ gap: 8px;
2469
+ width: 100%;
2470
+ `,ph=a.form`
2471
+ ${Ur};
2472
+ `,Ta=a.div`
2473
+ ${Ur};
2474
+
2475
+ &[data-done] {
2476
+ flex-direction: row;
2477
+ align-items: center;
2478
+ gap: 16px;
2479
+ padding: 12px;
2480
+ border-radius: 16px;
2481
+ background: #c1d8c9;
2482
+ }
2483
+ `,hh=a.label`
2484
+ font-size: 14px;
2485
+ color: ${Me.softWhite};
2486
+ `,xh=a.div`
2487
+ display: flex;
2488
+ align-items: stretch;
2489
+ gap: 8px;
2490
+ `,fh=a.input`
2491
+ flex: 1;
2492
+ min-width: 0;
2493
+ height: 42px;
2494
+ padding: 0 16px;
2495
+ border: 1px solid ${Me.fieldBorder};
2496
+ border-radius: ${Hr.btn};
2497
+ background: rgba(255, 255, 255, 0.1);
2498
+ font-size: 16px;
2499
+ color: ${Me.softWhite};
2500
+
2501
+ &::placeholder {
2502
+ color: ${Me.gray4};
2503
+ }
2504
+ &:focus-visible {
2505
+ outline: none;
2506
+ border-color: ${Me.white};
2507
+ box-shadow: 0 0 0 1px ${Me.white};
2508
+ }
2509
+ `,Ea=a.button`
2510
+ flex-shrink: 0;
2511
+ height: 40px;
2512
+ padding: 0 12px;
2513
+ border: 0;
2514
+ border-radius: ${Hr.card};
2515
+ background: ${Me.softWhite};
2516
+ color: ${Me.text};
2517
+ font-weight: 600;
2518
+ font-size: 15px;
2519
+ line-height: 24px;
2520
+ text-transform: uppercase;
2521
+ letter-spacing: 0.46px;
2522
+ cursor: pointer;
2523
+ transition: background 0.15s ease;
2524
+
2525
+ &[data-full] {
2526
+ width: 100%;
2527
+ flex-shrink: 1;
2528
+ }
2529
+ &:hover:not(:disabled) {
2530
+ background: ${Me.white};
2531
+ }
2532
+ &:disabled {
2533
+ opacity: 0.5;
2534
+ cursor: default;
2535
+ }
2536
+ `,mh=a.span`
2537
+ display: inline-flex;
2538
+ align-items: center;
2539
+ justify-content: center;
2540
+ flex-shrink: 0;
2541
+ width: 20px;
2542
+ height: 20px;
2543
+ border-radius: 50%;
2544
+ background: #34ce76;
2545
+ color: ${Me.white};
2546
+ `,gh=a.span`
2547
+ font-size: 16px;
2548
+ line-height: 1.5;
2549
+ color: ${Me.text2};
2550
+ `;function Fa(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim())}function bh({item:t}){const s=ot(S=>S.session),l=ot(S=>S.signIn),[o,d]=c.useState(""),[u,x]=c.useState(!1),[m,y]=c.useState(!1),[$,h]=c.useState(null),g=Kr(),w=g&&!!s&&!!t.contractAddress&&!!t.itemId,{data:k}=te({queryKey:["notify-request",t.contractAddress,t.itemId,s==null?void 0:s.address],enabled:w,queryFn:()=>lh(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 Js().then(B=>{!S&&B&&d(f=>f||B)}),()=>{S=!0}},[g,s]);const I=m||!!(k!=null&&k.subscribed);async function C(S){if(S.preventDefault(),!(!s||!t.itemId||!Fa(o)||u)){x(!0),h(null);try{await dh({contractAddress:t.contractAddress,itemId:t.itemId,chainId:t.chainId,email:o.trim()},s.identity),y(!0),X("Shop Requested Notify",{item_id:t.itemId,contract_address:t.contractAddress})}catch(B){ue(B,{flow:"notify-me",contractAddress:t.contractAddress,itemId:t.itemId}),h(i("notifyMe.error"))}finally{x(!1)}}}return g?s?I?e.jsxs(Ta,{"data-done":!0,"data-testid":"notify-subscribed",children:[e.jsx(mh,{"aria-hidden":!0,children:e.jsx(L,{name:"check",size:12})}),e.jsx(gh,{children:i("notifyMe.subscribedBody")})]}):e.jsxs(ph,{onSubmit:S=>void C(S),"data-testid":"notify",children:[e.jsx(hh,{htmlFor:"notify-email",children:i("notifyMe.label")}),e.jsxs(xh,{children:[e.jsx(fh,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:i("notifyMe.placeholder"),value:o,onChange:S=>d(S.target.value),"data-testid":"notify-email"}),e.jsx(Ea,{type:"submit",disabled:!Fa(o)||u,"data-testid":"notify-submit",children:u?i("notifyMe.working"):i("notifyMe.cta")})]}),e.jsx(Ve,{message:$})]}):e.jsx(Ta,{"data-testid":"notify",children:e.jsx(Ea,{type:"button","data-full":!0,onClick:l,"data-testid":"notify-signin",children:i("notifyMe.signInCta")})}):null}const yh=a.div`
2551
+ display: flex;
2552
+ flex-direction: column;
2553
+ gap: 4px;
2554
+ width: 100%;
2555
+ font-family: ${n.font.sans};
2556
+ `,wh=a.div`
2557
+ display: flex;
2558
+ align-items: flex-start;
2559
+ justify-content: space-between;
2560
+ gap: 12px;
2561
+ font-size: 12px;
2562
+ `,vh=a.span`
2563
+ font-weight: 600;
2564
+ line-height: 1.57;
2565
+ color: ${n.colors.muted2};
2566
+ /* Drawn in caps, like the PRICE and STOCK labels beside it. Cased here rather than in the string so a
2567
+ translation is not forced to shout in a language where that reads badly. */
2568
+ text-transform: uppercase;
2569
+ white-space: nowrap;
2570
+ `,Ba=a.span`
2571
+ /* Sized here, not inherited from the head row: the same element also sits UNDER the bar, outside it. */
2572
+ font-size: 12px;
2573
+ font-weight: 400;
2574
+ line-height: 22px;
2575
+ color: ${n.colors.softWhite};
2576
+ text-transform: lowercase;
2577
+ white-space: nowrap;
2578
+ `,jh=a.div`
2579
+ position: relative;
2580
+ width: 100%;
2581
+ height: 10px;
2582
+ border-radius: 100px;
2583
+ background: rgba(255, 255, 255, 0.2);
2584
+ /* The fill is a child with its own radius; clipping here keeps a full bar's ends round. */
2585
+ overflow: hidden;
2586
+ `,kh=a.div`
2587
+ position: absolute;
2588
+ left: 0;
2589
+ top: 0;
2590
+ height: 10px;
2591
+ border-radius: 100px;
2592
+ background: ${n.colors.dclRed};
2593
+ transition: width 0.3s ease;
2594
+
2595
+ @media (prefers-reduced-motion: reduce) {
2596
+ transition: none;
2597
+ }
2598
+ `;function $h({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(yh,{className:l,"data-testid":o,children:[e.jsxs(wh,{children:[e.jsx(vh,{children:i("offerStock.label")}),e.jsx(Ba,{children:i("offerStock.claimed",{claimed:d,total:s})})]}),e.jsx(jh,{role:"progressbar","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":d,"aria-label":i("offerStock.claimed",{claimed:d,total:s}),children:e.jsx(kh,{style:{width:`${u}%`}})}),e.jsx(Ba,{children:i("offerStock.percent",{pct:u})})]})}const Ch=new Map(Object.entries(gd).flatMap(([t,s])=>s.length===1?[[s[0],t]]:[])),bt="/items";function Ih(t){return t?`${bt}?rarities=${encodeURIComponent(t.toLowerCase())}`:null}function Sh(t){const s=t.wearableCategory;if(s){const l=Ch.get(s);return l?`${bt}?category=wearable&subCategory=${encodeURIComponent(l)}`:`${bt}?category=wearable`}return t.category==="emote"?`${bt}?category=emote`:t.category==="wearable"?`${bt}?category=wearable`:null}function Ah(){return`${bt}?smart=true`}const Mh=a(Ys)`
2599
+ display: flex;
2600
+ flex-direction: column;
2601
+ overflow: hidden;
2602
+ gap: 1px;
2603
+ background: ${n.colors.lineStrong};
2604
+
2605
+ /* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
2606
+ full height. */
2607
+ & [data-collage-row] {
2608
+ display: flex;
2609
+ flex: 1 1 50%;
2610
+ min-height: 0;
2611
+ gap: 1px;
2612
+ }
2613
+ & [data-collage-row][data-full] {
2614
+ flex-basis: 100%;
2615
+ }
2616
+ & [data-collage-row] img {
2617
+ flex: 1 1 0;
2618
+ min-width: 0;
2619
+ width: 100%;
2620
+ height: 100%;
2621
+ object-fit: cover;
2622
+ display: block;
2623
+ }
2624
+ `;function zh({contractAddress:t,name:s,items:l,className:o}){const d=lt();if(!t||!s)return null;const u=(l??[]).map(y=>y.thumbnail).filter(y=>!!y).slice(0,4),x=u.slice(0,2),m=u.slice(2,4);return e.jsxs(Xs,{as:"button","data-link":!0,className:o,"data-testid":"creator",onClick:y=>{y.stopPropagation(),d(`/collection/${t}`)},children:[u.length>0?e.jsxs(Mh,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{"data-collage-row":!0,"data-full":m.length===0||void 0,children:x.map((y,$)=>e.jsx("img",{src:y,alt:""},$))}),m.length>0?e.jsx("span",{"data-collage-row":!0,children:m.map((y,$)=>e.jsx("img",{src:y,alt:""},$))}):null]}):null,e.jsx(Zs,{"data-testid":"creator-name",children:nn(s)})]})}const{colors:j,radius:Ye,media:le,font:Rh,gradients:Lh}=n,Ph=a.div`
2625
+ max-width: 1721px;
2626
+ margin: 0 auto;
2627
+
2628
+ ${le.maxWidth("lg")} {
2629
+ padding-bottom: 88px;
2630
+ }
2631
+ `,Th=a.nav`
2632
+ display: flex;
2633
+ align-items: center;
2634
+ gap: 8px;
2635
+ font-size: 13px;
2636
+ color: ${j.gray4};
2637
+ margin-bottom: 24px;
2638
+ ${bd};
2639
+ `,Eh=a.button`
2640
+ background: none;
2641
+ border: 0;
2642
+ padding: 0;
2643
+ font: inherit;
2644
+ color: ${j.gray4};
2645
+
2646
+ &:hover {
2647
+ color: ${j.white};
2648
+ }
2649
+ `,Fh=a.span`
2650
+ color: ${j.muted2};
2651
+ `,Bh=a.span`
2652
+ color: ${j.softWhite};
2653
+ font-weight: 600;
2654
+ `,Nh=a.div`
2655
+ position: relative;
2656
+ /* Confines the glow's negative z-index, which would otherwise escape to the root stacking context. */
2657
+ isolation: isolate;
2658
+ display: grid;
2659
+ grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
2660
+ gap: 48px;
2661
+ align-items: start;
2662
+
2663
+ /* Preview column width, re-derived from the tracks above so the glow's pivot cannot drift. */
2664
+ --preview-col-w: calc((100% - 48px) * 1045 / 1559);
2665
+ /* Oversized so the glow reaches past the frame while the gradient still finishes fading inside its
2666
+ own box: the radii cannot exceed 50% without ending outside the box and painting a hard rectangle. */
2667
+ --glow-box: 1.76;
2668
+
2669
+ /* Avatar glow, hung off the grid container because the preview frame clips its own overflow. Sits
2670
+ under the frame and, by document order, above the body symbols on the same z-index. */
2671
+ &::before {
2672
+ content: '';
2673
+ position: absolute;
2674
+ z-index: -1;
2675
+ pointer-events: none;
2676
+ top: 0;
2677
+ left: calc(var(--preview-col-w) / 2);
2678
+ width: calc(var(--preview-col-w) * var(--glow-box));
2679
+ aspect-ratio: 1045 / 752;
2680
+ transform: translate(-50%, calc(50% / var(--glow-box) - 50%));
2681
+ background: radial-gradient(
2682
+ 50% 50% at 50% 52%,
2683
+ rgb(var(--glow-core, ${j.glowCyanRgb})) 0%,
2684
+ rgb(var(--glow-rgb, ${j.glowCyanRgb}) / 0.9) 20%,
2685
+ 45%,
2686
+ rgb(var(--glow-rgb, ${j.glowCyanRgb}) / 0) 100%
2687
+ );
2688
+ }
2689
+
2690
+ ${le.maxWidth("lg")} {
2691
+ grid-template-columns: 1fr;
2692
+ gap: 24px;
2693
+
2694
+ /* The track maths is desktop-only; one column puts the pivot nowhere meaningful. */
2695
+ &::before {
2696
+ display: none;
2697
+ }
2698
+ }
2699
+ `,Wh=a.div`
2700
+ position: relative;
2701
+ aspect-ratio: 1045 / 752;
2702
+ border-radius: ${Ye.banner};
2703
+ overflow: hidden;
2704
+
2705
+ /* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
2706
+ shell's gutter instead of sitting inside it. No transform, which would make this the containing block
2707
+ for the absolutely-positioned controls below. */
2708
+ ${le.maxWidth("lg")} {
2709
+ aspect-ratio: 1 / 1;
2710
+ width: 100vw;
2711
+ margin-left: calc(-50vw + 50%);
2712
+ border-radius: 0;
2713
+ }
2714
+
2715
+ & iframe,
2716
+ & > * {
2717
+ width: 100%;
2718
+ height: 100%;
2719
+ border: 0;
2720
+ display: block;
2721
+ }
2722
+
2723
+ /* Soft edges so legs and the cast shadow dissolve instead of being sliced by the overflow clip — on the
2724
+ iframe alone, so the pills and note stay crisp, and intersected linears rather than one radial, which
2725
+ would round the corners. The bands stay clear of the controls aang draws ~40px inside its canvas. */
2726
+ & iframe {
2727
+ -webkit-mask-image:
2728
+ linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
2729
+ linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
2730
+ -webkit-mask-composite: source-in;
2731
+ mask-image:
2732
+ linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
2733
+ linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
2734
+ mask-composite: intersect;
2735
+ }
2736
+
2737
+ /* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
2738
+ Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
2739
+ above) nor blocks the preview controls. */
2740
+ & > [data-preview-viewport] {
2741
+ position: absolute;
2742
+ inset: 0;
2743
+ pointer-events: none;
2744
+ z-index: 0;
2745
+ }
2746
+
2747
+ & > [data-preview-toggle] {
2748
+ position: absolute;
2749
+ top: 16px;
2750
+ left: 16px;
2751
+ z-index: 2;
2752
+ width: auto;
2753
+ height: auto;
2754
+ display: inline-flex;
2755
+ gap: 2px;
2756
+ padding: 3px;
2757
+ background: rgba(255, 255, 255, 0.92);
2758
+ border: 1px solid ${j.line};
2759
+ border-radius: 999px;
2760
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
2761
+
2762
+ /* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
2763
+ container carries no fill, gap or padding of its own there. */
2764
+ ${le.maxWidth("lg")} {
2765
+ top: auto;
2766
+ left: auto;
2767
+ right: 16px;
2768
+ bottom: 16px;
2769
+ gap: 0;
2770
+ padding: 0;
2771
+ background: none;
2772
+ border: 0;
2773
+ box-shadow: none;
2774
+ overflow: hidden;
2775
+ }
2776
+ }
2777
+
2778
+ & > [data-preview-note] {
2779
+ position: absolute;
2780
+ bottom: 14px;
2781
+ left: 50%;
2782
+ transform: translateX(-50%);
2783
+ z-index: 2;
2784
+ width: auto;
2785
+ height: auto;
2786
+ max-width: 88%;
2787
+ margin: 0;
2788
+ text-align: center;
2789
+ background: rgba(22, 21, 24, 0.78);
2790
+ color: ${j.white};
2791
+ font-size: 12px;
2792
+ font-weight: 500;
2793
+ padding: 6px 12px;
2794
+ border-radius: 999px;
2795
+ }
2796
+
2797
+ & > [data-preview-loading] {
2798
+ position: absolute;
2799
+ inset: 0;
2800
+ z-index: 1;
2801
+ display: flex;
2802
+ align-items: center;
2803
+ justify-content: center;
2804
+ width: 100%;
2805
+ height: 100%;
2806
+ background: transparent;
2807
+ }
2808
+
2809
+ & > [data-fav-preview] {
2810
+ display: none;
2811
+ }
2812
+
2813
+ /* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
2814
+ wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
2815
+ & > [data-play-showcase] {
2816
+ position: absolute;
2817
+ bottom: 16px;
2818
+ left: 16px;
2819
+ z-index: 2;
2820
+ width: auto;
2821
+ height: auto;
2822
+ }
2823
+
2824
+ ${le.maxWidth("lg")} {
2825
+ & > [data-preview-toggle] {
2826
+ top: auto;
2827
+ left: auto;
2828
+ bottom: 12px;
2829
+ right: 12px;
2830
+ gap: 0;
2831
+ padding: 0;
2832
+ background: transparent;
2833
+ border: 0;
2834
+ box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
2835
+ overflow: hidden;
2836
+ }
2837
+ & > [data-fav-preview] {
2838
+ display: inline-flex;
2839
+ position: absolute;
2840
+ top: 12px;
2841
+ right: 12px;
2842
+ z-index: 3;
2843
+ width: auto;
2844
+ min-width: 40px;
2845
+ height: 40px;
2846
+ background: rgba(255, 255, 255, 0.92);
2847
+ box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
2848
+ }
2849
+ & > [data-fav-preview]:hover {
2850
+ background: ${j.white};
2851
+ }
2852
+ }
2853
+ `,Dh=a.div``,Oh=a.span`
2854
+ position: absolute;
2855
+ inset: 0;
2856
+ width: 100%;
2857
+ height: 100%;
2858
+ border-radius: inherit;
2859
+ `,qh=a.div`
2860
+ display: flex;
2861
+ flex-direction: column;
2862
+ gap: 0;
2863
+ `,Kh=a.div`
2864
+ display: flex;
2865
+ align-items: flex-start;
2866
+ justify-content: space-between;
2867
+ gap: 12px;
2868
+
2869
+ ${le.maxWidth("lg")} {
2870
+ order: 0;
2871
+ }
2872
+ `,Hh=a.h1`
2873
+ font-size: 28px;
2874
+ font-weight: 600;
2875
+ line-height: 34px;
2876
+ color: ${j.softWhite};
2877
+
2878
+ ${le.maxWidth("lg")} {
2879
+ font-size: 20px;
2880
+ line-height: 24px;
2881
+ }
2882
+ `,Na=a.button`
2883
+ flex: none;
2884
+ min-width: 40px;
2885
+ height: 40px;
2886
+ padding: 0;
2887
+ border-radius: ${Ye.pill};
2888
+ border: 0;
2889
+ background: rgba(255, 255, 255, 0.16);
2890
+ display: inline-flex;
2891
+ align-items: center;
2892
+ justify-content: center;
2893
+ gap: 6px;
2894
+ color: ${j.softWhite};
2895
+ cursor: pointer;
2896
+ transition:
2897
+ color 0.12s ease,
2898
+ background 0.12s ease;
2899
+
2900
+ &[data-count] {
2901
+ padding: 0 14px 0 12px;
2902
+ }
2903
+ &:hover {
2904
+ background: rgba(255, 255, 255, 0.28);
2905
+ }
2906
+ &[data-on] {
2907
+ color: ${j.dclRed};
2908
+ }
2909
+
2910
+ ${le.maxWidth("lg")} {
2911
+ color: ${j.text};
2912
+ &[data-fav-title] {
2913
+ display: none;
2914
+ }
2915
+ }
2916
+ `,Wa=a.span`
2917
+ font-size: 13px;
2918
+ font-weight: 600;
2919
+ line-height: 1;
2920
+ color: ${j.softWhite};
2921
+
2922
+ ${le.maxWidth("lg")} {
2923
+ color: ${j.text};
2924
+ }
2925
+ `,Uh=a.button`
2926
+ display: inline-flex;
2927
+ align-items: center;
2928
+ gap: 8px;
2929
+ padding: 8px 14px;
2930
+ border: 1px solid ${j.line};
2931
+ border-radius: ${Ye.pill};
2932
+ background: rgba(255, 255, 255, 0.94);
2933
+ backdrop-filter: blur(6px);
2934
+ box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
2935
+ color: ${j.text};
2936
+ font-size: 13px;
2937
+ font-weight: 600;
2938
+ cursor: pointer;
2939
+ transition: background 0.12s ease;
2940
+
2941
+ &:hover {
2942
+ background: ${j.white};
2943
+ }
2944
+ &:focus-visible {
2945
+ outline: 2px solid ${j.accent};
2946
+ outline-offset: 2px;
2947
+ }
2948
+ `,mt=a.div`
2949
+ display: inline-flex;
2950
+ align-items: center;
2951
+ gap: 5px;
2952
+ font-size: 12px;
2953
+ font-weight: 500;
2954
+ text-transform: uppercase;
2955
+ letter-spacing: 0;
2956
+ color: ${j.gray4};
2957
+ `,Qh=a.div`
2958
+ display: flex;
2959
+ align-items: center;
2960
+ gap: 8px;
2961
+ flex-wrap: wrap;
2962
+ margin-top: 12px;
2963
+
2964
+ ${le.maxWidth("lg")} {
2965
+ order: 1;
2966
+ margin-top: 10px;
2967
+ }
2968
+ `,Ee=a(cr)`
2969
+ height: 24px;
2970
+ padding: 0 8px;
2971
+ gap: 3px;
2972
+ font-size: 13px;
2973
+ font-weight: 500;
2974
+ border-radius: 4px;
2975
+ letter-spacing: 0.02em;
2976
+ text-transform: uppercase;
2977
+ background: rgba(255, 255, 255, 0.14);
2978
+ color: ${j.softWhite};
2979
+
2980
+ & .ico {
2981
+ color: ${j.softWhite};
2982
+ }
2983
+ &[data-variant='cat'] {
2984
+ background: rgba(255, 255, 255, 0.14);
2985
+ color: ${j.softWhite};
2986
+ }
2987
+
2988
+ /* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
2989
+ #ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
2990
+ one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
2991
+ &[data-variant='blocked'] {
2992
+ background: rgba(255, 116, 57, 0.2);
2993
+ color: #ff7439;
2994
+ cursor: help;
2995
+ }
2996
+ &[data-variant='blocked']:focus-visible {
2997
+ outline: 2px solid #ff7439;
2998
+ outline-offset: 2px;
2999
+ }
3000
+ `,Yt=a(Ee.withComponent(ir))`
3001
+ text-decoration: none;
3002
+ cursor: pointer;
3003
+ transition: background 0.15s ease;
3004
+
3005
+ &:hover,
3006
+ &:focus-visible {
3007
+ background: rgba(255, 255, 255, 0.26);
3008
+ }
3009
+
3010
+ /* The rarity chip carries its own colour inline, so a background hover would be overridden and the
3011
+ chip would look inert. It gets a ring instead, which reads on any fill. */
3012
+ &[data-variant='rarity']:hover,
3013
+ &[data-variant='rarity']:focus-visible {
3014
+ box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
3015
+ }
3016
+ `,Gh=a.div`
3017
+ display: flex;
3018
+ flex-direction: column;
3019
+ align-items: flex-start;
3020
+ gap: 8px;
3021
+ `,Nn=a(Gh)`
3022
+ gap: 11px;
3023
+ `,Da=a.p`
3024
+ margin: 0;
3025
+ color: ${j.softWhite};
3026
+ font-size: 14px;
3027
+ line-height: 30px;
3028
+ display: -webkit-box;
3029
+ -webkit-box-orient: vertical;
3030
+ -webkit-line-clamp: 4;
3031
+ overflow: hidden;
3032
+
3033
+ &[data-expanded] {
3034
+ -webkit-line-clamp: unset;
3035
+ overflow: visible;
3036
+ }
3037
+ `,_h=a.button`
3038
+ font-size: 13px;
3039
+ align-self: flex-start;
3040
+ `,Qr=wt`
3041
+ display: grid;
3042
+ grid-template-columns: 1fr 1fr;
3043
+ gap: 16px;
3044
+ `,Gr=a.div`
3045
+ ${Qr};
3046
+ /* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
3047
+ description belongs to the heading block it follows, the creator/collection pair is a new subject. */
3048
+ margin-top: 24px;
3049
+
3050
+ ${le.maxWidth("lg")} {
3051
+ order: 3;
3052
+ grid-template-columns: 1fr;
3053
+ /* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
3054
+ gap: 20px;
3055
+ margin-top: 20px;
3056
+ }
3057
+ `,Wn=a.div`
3058
+ min-width: 0;
3059
+ `,_r=a.div`
3060
+ ${Qr};
3061
+ margin-top: 32px;
3062
+
3063
+ ${le.maxWidth("lg")} {
3064
+ order: 2;
3065
+ margin-top: 20px;
3066
+ }
3067
+ `,zt=a.div`
3068
+ display: flex;
3069
+ flex-direction: column;
3070
+ gap: 15px;
3071
+ min-width: 0;
3072
+
3073
+ &[data-collection] {
3074
+ align-items: flex-start;
3075
+ }
3076
+ `,Vr=wt`
3077
+ &[data-testid='creator'] {
3078
+ color: ${j.softWhite};
3079
+ font-size: 14px;
3080
+ gap: 12px;
3081
+ }
3082
+ [data-avatar] {
3083
+ width: 48px;
3084
+ height: 48px;
3085
+ }
3086
+ [data-letter] {
3087
+ font-size: 18px;
3088
+ }
3089
+ [data-testid='creator-name'] {
3090
+ color: ${j.softWhite};
3091
+ font-weight: 500;
3092
+ text-decoration: underline;
3093
+ }
3094
+ &[data-link]:hover [data-testid='creator-name'] {
3095
+ color: ${j.gray4};
3096
+ }
3097
+ `,Vh=a(to)`
3098
+ ${Vr}
3099
+ `,Jh=a(zh)`
3100
+ ${Vr}
3101
+ `,Jr=a.hr`
3102
+ border: 0;
3103
+ border-top: 1px solid rgba(255, 255, 255, 0.3);
3104
+ margin: 24px 0 0;
3105
+ width: 100%;
3106
+
3107
+ /* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
3108
+ so it closes the price rather than separating it from the description. */
3109
+ ${le.maxWidth("lg")} {
3110
+ order: 5;
3111
+ margin-top: 16px;
3112
+ }
3113
+ `,Yh=a(eo)`
3114
+ margin-bottom: 12px;
3115
+ `,Xh=a.div`
3116
+ margin-top: 16px;
3117
+ /* The design's Pricing frame stacks its rows 16px apart; without it the stock scale sat against the
3118
+ underside of the price and read as part of it. */
3119
+ display: flex;
3120
+ flex-direction: column;
3121
+ gap: 16px;
3122
+
3123
+ ${le.maxWidth("lg")} {
3124
+ order: 4;
3125
+ margin-top: 16px;
3126
+ }
3127
+ `,Zh=a.div`
3128
+ display: flex;
3129
+ align-items: flex-start;
3130
+ gap: 16px;
3131
+ width: 100%;
3132
+ `,ex=a.div`
3133
+ flex: 1 1 auto;
3134
+ min-width: 0;
3135
+ display: flex;
3136
+ flex-direction: column;
3137
+ gap: 8px;
3138
+ `,Oa=a.div`
3139
+ flex: 0 0 auto;
3140
+ display: flex;
3141
+ flex-direction: column;
3142
+ align-items: flex-end;
3143
+ gap: 8px;
3144
+ text-align: right;
3145
+ `,Mn=a.div`
3146
+ font-size: 18px;
3147
+ font-weight: 500;
3148
+ line-height: 1;
3149
+ color: ${j.softWhite};
3150
+
3151
+ &[data-out] {
3152
+ font-size: 14px;
3153
+ font-weight: 600;
3154
+ text-transform: uppercase;
3155
+ letter-spacing: 0.02em;
3156
+ color: ${j.gray4};
3157
+ }
3158
+ `,zn=a.div`
3159
+ font-size: 14px;
3160
+ font-weight: 600;
3161
+ text-transform: uppercase;
3162
+ letter-spacing: 0;
3163
+ color: ${j.muted2};
3164
+ `,At=a.div`
3165
+ display: flex;
3166
+ align-items: center;
3167
+ gap: 8px;
3168
+ font-weight: 700;
3169
+ color: ${j.softWhite};
3170
+
3171
+ /* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
3172
+ &[data-variant='none'] {
3173
+ display: inline-flex;
3174
+ align-items: center;
3175
+ gap: 6px;
3176
+ font-size: 14px;
3177
+ font-weight: 600;
3178
+ color: ${j.softWhite};
3179
+ }
3180
+ /*
3181
+ * White, not red. The tag above the title is what announces the discount; painting the number red too
3182
+ * said it a second time and left the price itself the least legible thing in its own row.
3183
+ */
3184
+ &[data-variant='sale'] {
3185
+ flex-wrap: wrap;
3186
+ gap: 4px 8px;
3187
+ color: ${j.white};
3188
+ }
3189
+ `;a.span`
3190
+ display: flex;
3191
+ align-items: center;
3192
+ gap: 10px;
3193
+ font-weight: 700;
3194
+ color: ${j.dclRed};
3195
+ `;const Mt=a.span`
3196
+ font-size: 30px;
3197
+ line-height: 1;
3198
+ `,tx=a.span`
3199
+ display: inline-flex;
3200
+ color: ${j.muted2};
3201
+ cursor: help;
3202
+
3203
+ &:focus-visible {
3204
+ outline: 2px solid ${j.accent};
3205
+ outline-offset: 2px;
3206
+ border-radius: ${Ye.chip};
3207
+ }
3208
+ `,nx=a.span`
3209
+ font-size: 24px;
3210
+ font-weight: 700;
3211
+ color: ${j.softWhite};
3212
+ margin-right: -2px;
3213
+ `,ix=a.div`
3214
+ font-size: 13px;
3215
+ margin-top: 6px;
3216
+ color: ${j.gray4};
3217
+ `;a.div`
3218
+ flex-basis: 100%;
3219
+ display: flex;
3220
+ align-items: center;
3221
+ flex-wrap: wrap;
3222
+ gap: 8px 12px;
3223
+ `;const ax=a.div`
3224
+ font-size: 13px;
3225
+ font-weight: 600;
3226
+ color: ${j.dclRed};
3227
+ `,rx=a.span`
3228
+ display: inline-flex;
3229
+ align-items: center;
3230
+ color: ${j.muted2};
3231
+ text-decoration: line-through;
3232
+ font-weight: 400;
3233
+ font-size: 20px;
3234
+ `;a.span`
3235
+ display: inline-flex;
3236
+ align-items: center;
3237
+ background: ${j.dclRed};
3238
+ color: ${j.white};
3239
+ font-weight: 800;
3240
+ font-size: 13px;
3241
+ letter-spacing: 0.03em;
3242
+ text-transform: uppercase;
3243
+ border-radius: 6px;
3244
+ padding: 4px 10px;
3245
+ `;a(ad)`
3246
+ display: inline-flex;
3247
+ align-items: center;
3248
+ gap: 5px;
3249
+ background: ${j.rarityBg};
3250
+ color: ${j.accent};
3251
+ font-size: 13px;
3252
+ font-weight: 700;
3253
+ border-radius: 6px;
3254
+ padding: 4px 10px;
3255
+ white-space: nowrap;
3256
+ `;const sx=a.div`
3257
+ display: flex;
3258
+ flex-direction: column;
3259
+ gap: 12px;
3260
+ margin-top: 20px;
3261
+
3262
+ ${le.maxWidth("lg")} {
3263
+ order: 6;
3264
+
3265
+ &[data-buttons] {
3266
+ position: fixed;
3267
+ left: 0;
3268
+ right: 0;
3269
+ bottom: 0;
3270
+ z-index: 40;
3271
+ margin-top: 0;
3272
+ padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
3273
+ background: #2b0e44;
3274
+ box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
3275
+ }
3276
+ &[data-dual] {
3277
+ flex-direction: row;
3278
+ align-items: stretch;
3279
+ gap: 12px;
3280
+ }
3281
+ }
3282
+ `,rn=wt`
3283
+ && {
3284
+ width: 100%;
3285
+ height: 48px;
3286
+ border-radius: 16px;
3287
+ padding: 0 12px;
3288
+ display: flex;
3289
+ align-items: center;
3290
+ justify-content: center;
3291
+ gap: 8px;
3292
+ font-size: 15px;
3293
+ font-weight: 600;
3294
+ line-height: 24px;
3295
+ letter-spacing: 0.46px;
3296
+ text-transform: uppercase;
3297
+ }
3298
+ `,Rn=a(Je)`
3299
+ ${rn};
3300
+ /* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
3301
+ cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
3302
+ sampled off the flattened render rather than the node's fill. */
3303
+ && {
3304
+ background: ${Lh.buyBtn};
3305
+ }
3306
+ &&::before {
3307
+ content: none;
3308
+ }
3309
+ &&:hover:not(:disabled) {
3310
+ background-image: linear-gradient(${j.dclRed}, ${j.dclRed});
3311
+ }
3312
+
3313
+ ${le.maxWidth("lg")} {
3314
+ [data-dual] && {
3315
+ flex: 1 1 auto;
3316
+ width: auto;
3317
+ }
3318
+ }
3319
+ `,ox=a(Je)`
3320
+ ${rn};
3321
+ && {
3322
+ background: ${j.blackBtn};
3323
+ color: ${j.softWhite};
3324
+ border: 0;
3325
+
3326
+ .ico {
3327
+ width: 20px;
3328
+ height: 20px;
3329
+ }
3330
+ }
3331
+ &&:hover:not(:disabled) {
3332
+ background: ${j.blackBtn};
3333
+ filter: brightness(1.35);
3334
+ }
3335
+ `,qa=a.button`
3336
+ align-self: center;
3337
+ border: 0;
3338
+ background: none;
3339
+ padding: 8px 0;
3340
+ color: ${n.colors.accent};
3341
+ font-weight: 600;
3342
+ font-size: 13px;
3343
+ line-height: 24px;
3344
+ letter-spacing: 0.46px;
3345
+ text-transform: uppercase;
3346
+ text-decoration: underline;
3347
+ cursor: pointer;
3348
+
3349
+ /* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
3350
+ but invisible against it. Not a change to the shared colour: the other uses live inside
3351
+ GaslessNotice, whose light fill is what that accent was picked for. */
3352
+ &[data-on-purple] {
3353
+ color: ${n.colors.white};
3354
+ }
3355
+
3356
+ &:disabled {
3357
+ opacity: 0.5;
3358
+ cursor: default;
3359
+ }
3360
+ `,lx=a(Je)`
3361
+ ${rn};
3362
+ && {
3363
+ background: rgba(255, 255, 255, 0.2);
3364
+ color: ${j.softWhite};
3365
+ border: 0;
3366
+
3367
+ .ico {
3368
+ width: 20px;
3369
+ height: 20px;
3370
+ }
3371
+ }
3372
+ &&:hover:not(:disabled) {
3373
+ background: rgba(255, 255, 255, 0.3);
3374
+ }
3375
+ &&:disabled {
3376
+ opacity: 0.5;
3377
+ }
3378
+ `,Ka=a(Je)`
3379
+ ${rn};
3380
+ && {
3381
+ background: rgba(0, 0, 0, 0.4);
3382
+ color: ${j.white};
3383
+ border: 0;
3384
+ }
3385
+ &&:hover:not(:disabled) {
3386
+ background: rgba(0, 0, 0, 0.55);
3387
+ }
3388
+ &&:disabled {
3389
+ opacity: 0.5;
3390
+ }
3391
+ `,Ln=a.span`
3392
+ display: none;
3393
+ align-items: center;
3394
+ gap: 6px;
3395
+
3396
+ ${le.maxWidth("lg")} {
3397
+ [data-dual] & {
3398
+ display: inline-flex;
3399
+ }
3400
+ }
3401
+ `,Ha=a.button`
3402
+ width: 100%;
3403
+ height: 48px;
3404
+ display: flex;
3405
+ align-items: center;
3406
+ justify-content: center;
3407
+ gap: 8px;
3408
+ /* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
3409
+ treatment as the card's ADD TO CART. */
3410
+ background: rgba(255, 255, 255, 0.2);
3411
+ color: ${j.softWhite};
3412
+ border: 0;
3413
+ border-radius: 16px;
3414
+ font-weight: 600;
3415
+ font-size: 15px;
3416
+ text-transform: uppercase;
3417
+ letter-spacing: 0.46px;
3418
+ cursor: pointer;
3419
+ transition: background 0.15s ease;
3420
+
3421
+ &:hover:not(:disabled) {
3422
+ background: ${j.softWhite};
3423
+ color: ${j.text2};
3424
+ }
3425
+ &:disabled {
3426
+ background: rgba(255, 255, 255, 0.12);
3427
+ color: rgba(252, 252, 252, 0.7);
3428
+ cursor: default;
3429
+ }
3430
+
3431
+ ${le.maxWidth("lg")} {
3432
+ [data-dual] & {
3433
+ flex: 0 0 auto;
3434
+ width: 56px;
3435
+ padding: 0;
3436
+ }
3437
+ [data-dual] & .ico {
3438
+ margin: 0;
3439
+ }
3440
+ }
3441
+ `,Ua=a.span`
3442
+ ${le.maxWidth("lg")} {
3443
+ [data-dual] & {
3444
+ display: none;
3445
+ }
3446
+ }
3447
+ `,dx=a.p`
3448
+ margin: 12px 0 0;
3449
+ font-size: 13px;
3450
+ color: ${j.gray4};
3451
+
3452
+ & a {
3453
+ color: ${j.softWhite};
3454
+ font-weight: 600;
3455
+ }
3456
+ `;a.p`
3457
+ margin: 4px 0 0;
3458
+ font-size: 13px;
3459
+ color: ${j.gray4};
3460
+
3461
+ & a {
3462
+ color: ${j.accent};
3463
+ font-weight: 600;
3464
+ }
3465
+ `;const cx=a.div`
3466
+ max-width: 1721px;
3467
+ margin: 0 auto;
3468
+ min-height: 46vh;
3469
+ display: flex;
3470
+ flex-direction: column;
3471
+ align-items: center;
3472
+ justify-content: center;
3473
+ text-align: center;
3474
+ gap: 14px;
3475
+ color: ${j.softWhite};
3476
+ `,ux=a.p`
3477
+ margin: 0;
3478
+ color: ${j.gray4};
3479
+ `,px=a(Je)`
3480
+ margin-top: 6px;
3481
+ `,hx=a(L)`
3482
+ opacity: 0.4;
3483
+ `,xx=a.h1`
3484
+ font-size: 22px;
3485
+ `,fx=a.div`
3486
+ display: flex;
3487
+ flex-direction: column;
3488
+ `,Qa=a.span`
3489
+ display: block;
3490
+ height: 15px;
3491
+ width: 84px;
3492
+ border-radius: 4px;
3493
+ `,mx=a.div`
3494
+ display: flex;
3495
+ flex-direction: column;
3496
+ align-self: stretch;
3497
+ gap: 16px;
3498
+ padding: 8px 0;
3499
+ `,gx=a.span`
3500
+ display: inline-flex;
3501
+ align-items: center;
3502
+ height: 48px;
3503
+ gap: 10px;
3504
+ background: none !important;
3505
+
3506
+ &::before,
3507
+ &::after {
3508
+ content: '';
3509
+ display: block;
3510
+ }
3511
+ &::before {
3512
+ width: 40px;
3513
+ height: 40px;
3514
+ border-radius: 50%;
3515
+ background: ${j.media};
3516
+ }
3517
+ &::after {
3518
+ width: 96px;
3519
+ height: 14px;
3520
+ border-radius: 6px;
3521
+ background: ${j.media};
3522
+ }
3523
+ `,bx=a.span`
3524
+ height: 34px;
3525
+ width: 70%;
3526
+ margin: 3px 0;
3527
+ border-radius: 8px;
3528
+ `,yx=a.div`
3529
+ display: flex;
3530
+ gap: 8px;
3531
+ /* Same as Chips above, so the row does not move when the real chips arrive. */
3532
+ margin-top: 12px;
3533
+ `,Pn=a.span`
3534
+ height: 24px;
3535
+ width: 88px;
3536
+ border-radius: 6px;
3537
+ `,Tn=a.span`
3538
+ height: 14px;
3539
+ width: 100%;
3540
+ border-radius: 6px;
3541
+
3542
+ &[data-short] {
3543
+ width: 55%;
3544
+ }
3545
+ `,wx=a.span`
3546
+ display: block;
3547
+ height: 30px;
3548
+ width: 40%;
3549
+ margin: 16px 0 13px;
3550
+ border-radius: 8px;
3551
+ `,vx=a.span`
3552
+ display: block;
3553
+ height: 42px;
3554
+ width: 100%;
3555
+ border-radius: 8px;
3556
+ margin-top: 20px;
3557
+ `,Xt=a(ve)`
3558
+ width: 30px;
3559
+ height: 30px;
3560
+ color: ${j.softWhite};
3561
+
3562
+ &[data-was] {
3563
+ width: 20px;
3564
+ height: 20px;
3565
+ color: ${j.gray4};
3566
+ }
3567
+ `,En=a(ve)`
3568
+ width: 20px;
3569
+ height: 20px;
3570
+ `,jx=a.div`
3571
+ display: flex;
3572
+ align-items: center;
3573
+ justify-content: space-between;
3574
+ gap: 8px;
3575
+ padding: 8px;
3576
+ margin: 16px 0;
3577
+ border-radius: ${Ye.btn};
3578
+ background: rgba(22, 21, 24, 0.55);
3579
+ `,kx=a.span`
3580
+ display: flex;
3581
+ align-items: center;
3582
+ gap: 8px;
3583
+ font-size: 14px;
3584
+ line-height: 14px;
3585
+ color: ${j.softWhite};
3586
+ `,$x=a(L)`
3587
+ width: 20px;
3588
+ height: 20px;
3589
+ color: ${j.softWhite};
3590
+ `,Cx=a(L)`
3591
+ width: 24px;
3592
+ height: 24px;
3593
+ color: ${j.white};
3594
+ `,Ix=a.div`
3595
+ display: flex;
3596
+ align-items: center;
3597
+ justify-content: space-between;
3598
+ gap: 8px;
3599
+ width: 100%;
3600
+ margin-top: 16px;
3601
+
3602
+ &[data-centered] {
3603
+ justify-content: center;
3604
+ }
3605
+ `,Sx=a.span`
3606
+ display: flex;
3607
+ align-items: center;
3608
+ gap: 2px;
3609
+ font-size: 14px;
3610
+ font-weight: 600;
3611
+ color: ${j.gray4};
3612
+
3613
+ & .ico {
3614
+ width: 20px;
3615
+ height: 20px;
3616
+ color: ${j.gray4};
3617
+ }
3618
+ `,Ax=a.span`
3619
+ font-size: 16px;
3620
+ font-weight: 700;
3621
+ padding-left: 2px;
3622
+ `,Dn=a.button`
3623
+ border: 0;
3624
+ background: none;
3625
+ padding: 0;
3626
+ cursor: pointer;
3627
+ font-family: ${Rh.sans};
3628
+ font-size: 13px;
3629
+ font-weight: 600;
3630
+ letter-spacing: 0.46px;
3631
+ text-transform: uppercase;
3632
+ text-decoration: underline;
3633
+ color: ${j.softWhite};
3634
+
3635
+ &:hover {
3636
+ color: ${j.gray4};
3637
+ }
3638
+ &:focus-visible {
3639
+ outline: 2px solid ${j.white};
3640
+ outline-offset: 2px;
3641
+ border-radius: ${Ye.chip};
3642
+ }
3643
+ `,Mx=a(Dn)`
3644
+ width: 100%;
3645
+ height: 40px;
3646
+ text-align: center;
3647
+ border-radius: ${Ye.card};
3648
+
3649
+ /* Hover is a translucent fill with the label left alone (Figma 868:67246), not the colour shift
3650
+ ResellersLink uses. That one is an inline link sitting beside a price, where dimming the text is the
3651
+ only surface there is; this is a full-width button, so the button itself is what should react. */
3652
+ &:hover {
3653
+ color: ${j.softWhite};
3654
+ background: ${j.glass};
3655
+ }
3656
+ `,zx=a.div`
3657
+ display: flex;
3658
+ flex-direction: column;
3659
+ gap: 16px;
3660
+ width: 100%;
3661
+ padding: 16px 0;
3662
+ `,Ga=a.div`
3663
+ display: flex;
3664
+ align-items: center;
3665
+ justify-content: space-between;
3666
+ gap: 8px;
3667
+ width: 100%;
3668
+
3669
+ &[data-variant='original'] {
3670
+ color: ${j.muted2};
3671
+ }
3672
+ `,_a=a.span`
3673
+ display: flex;
3674
+ align-items: center;
3675
+ gap: 4px;
3676
+ font-size: 14px;
3677
+ font-weight: 600;
3678
+
3679
+ [data-variant='original'] & {
3680
+ color: ${j.muted2};
3681
+ }
3682
+ [data-variant='resale'] & {
3683
+ color: ${j.text};
3684
+ }
3685
+ `,Va=a.span`
3686
+ display: flex;
3687
+ align-items: center;
3688
+ gap: 2px;
3689
+ padding: 0 2px;
3690
+
3691
+ [data-variant='original'] & .ico {
3692
+ width: 20px;
3693
+ height: 20px;
3694
+ color: ${j.muted2};
3695
+ }
3696
+ [data-variant='resale'] & .ico {
3697
+ width: 24px;
3698
+ height: 24px;
3699
+ color: ${j.rarity};
3700
+ }
3701
+ `,Ja=a.span`
3702
+ [data-variant='original'] & {
3703
+ font-size: 16px;
3704
+ font-weight: 700;
3705
+ text-decoration: line-through;
3706
+ }
3707
+ [data-variant='resale'] & {
3708
+ font-size: 25px;
3709
+ font-weight: 700;
3710
+ color: ${j.text};
3711
+ }
3712
+ `,Rx=a.span`
3713
+ font-size: 14px;
3714
+ font-weight: 600;
3715
+
3716
+ [data-variant='original'] & {
3717
+ color: ${j.muted2};
3718
+ }
3719
+ `,Lx=a.span`
3720
+ font-size: 14px;
3721
+ font-weight: 600;
3722
+ color: ${j.text2};
3723
+ `,Ya=a.span`
3724
+ display: inline-flex;
3725
+ width: 12px;
3726
+ height: 12px;
3727
+ color: ${j.muted2};
3728
+ `,Px=a.div`
3729
+ display: flex;
3730
+ flex-direction: column;
3731
+ gap: 12px;
3732
+ width: 100%;
3733
+ `,Tx=a.div`
3734
+ display: flex;
3735
+ justify-content: center;
3736
+ `,sn=wt`
3737
+ display: block;
3738
+ background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
3739
+ background-size: 200% 100%;
3740
+ animation: shimmer 1.4s infinite linear;
3741
+
3742
+ @media (prefers-reduced-motion: reduce) {
3743
+ animation: none;
3744
+ }
3745
+ `,Ex=a.div`
3746
+ display: flex;
3747
+ flex-direction: column;
3748
+ gap: 12px;
3749
+ width: 100%;
3750
+ /* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
3751
+ padding-top: 4px;
3752
+ `,Fx=a.span`
3753
+ ${sn};
3754
+ width: 120px;
3755
+ height: 30px;
3756
+ border-radius: ${Ye.btn};
3757
+ margin-bottom: 4px;
3758
+ `,Xa=a.span`
3759
+ ${sn};
3760
+ width: 100%;
3761
+ height: 48px;
3762
+ border-radius: 16px;
3763
+ `,Za=a.div`
3764
+ display: flex;
3765
+ align-items: center;
3766
+ gap: 12px;
3767
+ `,er=a.span`
3768
+ ${sn};
3769
+ flex: none;
3770
+ width: 48px;
3771
+ height: 48px;
3772
+ border-radius: 50%;
3773
+ `,tr=a.span`
3774
+ ${sn};
3775
+ width: 96px;
3776
+ height: 16px;
3777
+ border-radius: 6px;
3778
+ `;function Bx(t){return Object.values(Ae.Rarity).includes(t)}function Nx(t){return t==="male"?i("itemDetail.genderMale"):t==="female"?i("itemDetail.genderFemale"):t==="unisex"?i("itemDetail.genderUnisex"):null}function Zt(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?i("itemDetail.categoryEmote"):i("itemDetail.categoryWearable")}const nr=8;function mf(){const{pathname:t}=ar();return e.jsx(Wx,{},t)}function Wx(){var Ii,Si,Ai;const{contractAddress:t,itemId:s,tokenId:l}=hs(),o=xn(t),d=cp(o),u=xn(s),x=xn(l),m=!!x,y=u??vd(x)??null,$=ar(),h=$.state,g=lt(),w=!!(h!=null&&h.market),k=(h==null?void 0:h.marketPriceCredits)??null,I=dt(),C=Rt(p=>p.add),S=Rt(p=>p.items),B=no(p=>p.toggle),{session:f,signIn:N}=ot(),[r,E]=c.useState(()=>{if(h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};return m?{...p,tokenId:x,itemId:p.itemId??y}:{...p,tokenId:void 0,itemId:u??p.itemId}}return{id:`${o}-${x??u}`,name:"",creator:"",contractAddress:o??"",itemId:y,category:"wearable",rarity:"common",network:"MATIC",chainId:st.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:x??void 0,tradeId:h==null?void 0:h.tradeId}}),[Y,U]=c.useState(!1),[A,R]=c.useState(!!(h!=null&&h.resumeBuy));c.useEffect(()=>{h!=null&&h.resumeBuy&&U(!0)},[h==null?void 0:h.resumeBuy]);function K(){const p=r.priceCredits>0?r.priceCredits:null;X("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:p,cart_value_usd:p===null?null:vo(p)}),U(!0)}function G(){if(f){K();return}w||vl({type:"item-buy",path:$.pathname}),N()}const ne=c.useRef(!1);c.useEffect(()=>{if(!f||ne.current)return;const p=yl("item-buy");!p||p.path!==$.pathname||(ne.current=!0,R(!0),K())},[f]);const de=c.useMemo(()=>r.contractAddress&&(r.itemId??y)?[`${r.contractAddress.toLowerCase()}-${r.itemId??y}`]:void 0,[r.contractAddress,r.itemId,y]),ee=io(nr,{exclude:de}),_=ao({enabled:ee.enabled,hasSignal:ee.hasSignal,isLoading:ee.isLoading,isError:ee.isError,personalized:(Ii=ee.result)==null?void 0:Ii.personalized,rowCount:((Si=ee.result)==null?void 0:Si.data.length)??0}),{items:O,isCollectionOnly:H,siblings:v,siblingsFetched:fe}=dp({id:r.id,contractAddress:r.contractAddress,itemId:r.itemId??y,tokenId:r.tokenId,creator:r.creator}),{data:P,isLoading:F}=te({queryKey:["shop-item",r.contractAddress,y],enabled:!w&&!m&&!!r.contractAddress&&!!y,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>ko(r.contractAddress,y)}),z=m?void 0:P;c.useEffect(()=>{z&&E(p=>p.tradeId?{...p,tradeId:z.tradeId,priceCredits:z.priceCredits,manaWei:z.manaWei,available:z.available??p.available,acquisition:z.acquisition,wearableCategory:p.wearableCategory??z.wearableCategory}:{...p,...z})},[z]);const[se,ie]=c.useState(!1),{data:xe=""}=te({queryKey:["item-desc",r.contractAddress,r.itemId],enabled:!!r.contractAddress&&!!r.itemId,staleTime:5*6e4,queryFn:()=>$o(r.contractAddress,r.itemId)}),{data:Q,isLoading:oe}=te({queryKey:["collection-meta",r.contractAddress],enabled:!!r.contractAddress,staleTime:5*6e4,queryFn:()=>dr(r.contractAddress)});c.useEffect(()=>{const p=(z==null?void 0:z.creator)||(Q==null?void 0:Q.creator);p&&E(re=>re.creator?re:{...re,creator:p})},[z,Q]);const Z=c.useMemo(()=>{if(!(m||r.name||z||v.length===0))return(y?v.find(p=>p.itemId===y):void 0)??v.find(p=>p.contractAddress===r.contractAddress)},[m,r.name,r.contractAddress,z,v,y]);c.useEffect(()=>{Z&&E(p=>({...Z,tradeId:p.tradeId??Z.tradeId}))},[Z]);const{data:Ce,isLoading:ce}=te({queryKey:["detail-trade",r.id,r.tradeId,r.contractAddress,r.itemId],enabled:!!r.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(r.tradeId)return r.tradeId;if(!m&&r.itemId){const p=await Co(r.contractAddress,r.itemId);return(p==null?void 0:p.id)??null}return null}}),{data:V}=te({queryKey:["item-traits",r.contractAddress,y],enabled:!!r.contractAddress&&!!y,staleTime:5*6e4,retry:1,queryFn:()=>Io(r.contractAddress,y)}),Be=(V==null?void 0:V.isSmart)??r.isSmart,qe=(V==null?void 0:V.utility)??null,be=c.useMemo(()=>({...r,wearableCategory:r.wearableCategory??(V==null?void 0:V.wearableCategory)??void 0,gender:r.gender??(V==null?void 0:V.gender)??null}),[r,V==null?void 0:V.wearableCategory,V==null?void 0:V.gender]),Xe=(V==null?void 0:V.urn)??null,{data:on}=te({queryKey:["item-vrm",Xe],enabled:!!Xe&&r.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>So(Xe)}),[Pt,Tt]=c.useState(!1),{data:vt}=te({queryKey:["item-video",r.contractAddress,y],enabled:Be&&!!r.contractAddress&&!!y,staleTime:30*6e4,retry:!1,queryFn:()=>Rl(r.contractAddress,y)}),Ze=c.useMemo(()=>r.emoteLoop!==void 0?r:(y?v.find(re=>re.itemId===y):void 0)??r,[r,v,y]),ke=Hi(I,r.tradeId)??Hi(I,Ce),ct=r.acquisition==="store"&&(r.available??0)>0,me=!!ke||ct,Ne=ro(),{data:Ke=[]}=te({queryKey:["item-resales",r.contractAddress,r.itemId],enabled:Ne&&!w&&!!r.contractAddress&&!!r.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>xr(r.contractAddress,r.itemId)}),He=Ke.length>0?Ke[0].priceCredits:null,We=m&&r.tokenId?Ke.find(p=>p.tokenId===r.tokenId)??null:null,Ie=c.useMemo(()=>{const p=Ke[0];return p?{...p,name:p.name||r.name,thumbnail:p.thumbnail||r.thumbnail,rarity:p.rarity||r.rarity,category:p.category||r.category,wearableCategory:p.wearableCategory??r.wearableCategory,gender:p.gender??r.gender}:null},[Ke,r]),[jt,Et]=c.useState(null),[Ft,et]=c.useState(!1),[kt,Bt]=c.useState(!1),[Nt,$t]=c.useState(!1),b=r.manaWei??null,{data:M}=hr(w||!!b),T=b&&M?so(b,M):null;c.useEffect(()=>{T!=null&&E(p=>p.priceCredits===T?p:{...p,priceCredits:T})},[T,r.priceCredits]);const W=c.useMemo(()=>{if(!w||!(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},[w,h==null?void 0:h.item]),J=w&&k!=null&&!!M&&!!W,ae=oo({priceCredits:r.priceCredits,compareAtCredits:r.compareAtCredits,saleEndsAt:r.saleEndsAt}),D=(()=>{var je,xt,Mi;if(!ae)return null;const p=((je=r.coupon)==null?void 0:je.used)??0,re=Number(((Mi=(xt=r.coupon)==null?void 0:xt.checks)==null?void 0:Mi.uses)??0);return re>0&&p<=re?{claimed:p,total:re}:null})(),pe=(()=>{if(!ae||r.saleUnitsLeft==null)return null;const p=D?D.total-D.claimed:1/0;return r.saleUnitsLeft<p?r.saleUnitsLeft:null})(),Se=c.useMemo(()=>({...r,tradeId:ke,id:ke??r.id}),[r,ke]),Re=S.some(p=>p.id===Se.id),ut=!Se.tokenId,pt=((Ai=S.find(p=>p.id===Se.id))==null?void 0:Ai.quantity)??0,ln=ut&&typeof r.available=="number"&&pt>=r.available,{key:Qn,faved:tt}=lo(r),Ue=co(r),Yr=pr(p=>p.locale),Wt=Ue===void 0?null:Ue.toLocaleString(Yr),Gn=tt?i("assetCard.removeFromFavorites"):i("assetCard.addToFavorites"),_n=Ue===void 0?Gn:i("itemDetail.favoriteAria",{action:Gn,count:Ue}),Vn=c.useRef(null);c.useEffect(()=>{!r.name||ce||Vn.current===r.id||(Vn.current=r.id,X("Shop Viewed Item",{...uo(r),for_sale:me}),po(r))},[r.id,r.name,ce,me]);const Dt=`${o}/${x??u}`,Jn=c.useRef(Dt);c.useEffect(()=>{if(Jn.current!==Dt){if(Jn.current=Dt,h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};E(m?{...p,tokenId:x,itemId:p.itemId??y}:{...p,tokenId:void 0,itemId:u??p.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[Dt]);function Xr(){!me||dn||ce||!ut&&Re||ln||C(Se,"item_detail")}const nt=Bx(r.rarity)?r.rarity:Ae.Rarity.COMMON,Yn=Nx(be.gender),Ot=ho(be),Xn=xo(be.gender),Zn=Ih(r.rarity),ei=Sh(be),ti=me&&ae,Zr=H?i("itemDetail.moreFromCollection"):i("itemDetail.youMightAlsoLike"),dn=fo(r,f==null?void 0:f.address),[es,ni]=c.useState(!1),[ts,ii]=c.useState(!1),[ns,ai]=c.useState(!1),[is,ri]=c.useState(!1),[Ct,It]=c.useState(null),[as,si]=c.useState(!1),[oi,li]=c.useState(!1),di=en(f==null?void 0:f.providerType),{data:q,isLoading:qt}=te({queryKey:["owned-token",r.contractAddress,r.tokenId,f==null?void 0:f.address],enabled:!w&&!!(f!=null&&f.address)&&!!r.contractAddress&&!!r.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>f?Ti(f.address,r.contractAddress,r.tokenId):null});c.useEffect(()=>{q&&E(p=>p.name?{...p,issuedId:p.issuedId??q.issuedId,priceCredits:q.listingPrice??0,tradeId:q.tradeId}:{id:q.id,name:q.name,creator:"",contractAddress:q.contractAddress,itemId:q.itemId,category:q.category,rarity:q.rarity??"common",network:q.network,chainId:q.chainId,thumbnail:q.image,priceCredits:q.listingPrice??0,gender:null,isSmart:!1,tokenId:q.tokenId,issuedId:q.issuedId,tradeId:q.tradeId})},[q]),c.useEffect(()=>{We&&E(p=>p.priceCredits===We.priceCredits&&p.tradeId?p:{...p,priceCredits:We.priceCredits,tradeId:p.tradeId??We.tradeId})},[We]),c.useEffect(()=>{Ct!=null&&q!=null&&q.isOnSale&&q.listingPrice===Ct&&It(null)},[q,Ct]);const ci=!w&&!!r.contractAddress&&!!r.tokenId&&!r.name&&!z&&!qt&&!q,{data:he,isFetched:rs}=te({queryKey:["public-token",r.contractAddress,r.tokenId],enabled:ci,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Ao(r.contractAddress,r.tokenId)});c.useEffect(()=>{he&&E(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:Le}=te({queryKey:["publishable-item",r.contractAddress,r.itemId,f==null?void 0:f.address],enabled:dn&&!!f&&!!r.itemId,queryFn:async()=>f?(await Ll(f.address,f.identity)).find(re=>re.contractAddress.toLowerCase()===r.contractAddress.toLowerCase()&&re.blockchainItemId===r.itemId)??null:null}),Pe=m&&!!q,cn=!m&&dn,Te=!w&&(cn||Pe),ui=Ct!=null?!0:Pe?!!(q!=null&&q.isOnSale):me,Kt=Pe?q==null?void 0:q.tradeId:ke,pi=Pe?!!q:!!Le,hi=cn||Pe&&Ne,un=Ct??(Pe?(q==null?void 0:q.listingPrice)??0:0),{data:xi=0}=te({queryKey:["owned-item-count",r.contractAddress,u,f==null?void 0:f.address],enabled:!m&&!w&&!!(f!=null&&f.address)&&!!r.contractAddress&&!!u,staleTime:3e4,queryFn:()=>f?Mo(f.address,r.contractAddress,u):0});async function it(){await Promise.all([I.invalidateQueries({queryKey:["owned-token",r.contractAddress,r.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",r.contractAddress,r.itemId]}),I.invalidateQueries({queryKey:["item-resales",r.contractAddress,r.itemId]})])}async function ss(p){if(!f||!Kt)throw new Error("No listing to take down");const re=await ur(Kt);await zl({trade:re,signer:f.signer,mode:p.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(Pe){if(!r.tokenId)return!1;const je=await Ti(f.address,r.contractAddress,r.tokenId);return je!==null&&!je.isOnSale}return r.itemId?await jo(r.contractAddress,r.itemId)===null:!1}catch{return!1}},onWaiting:p.onWaiting}}),p.silent||Lt.success(i("myAssets.removedFromSale",{name:r.name})),It(null),jd(I,Kt),E(je=>je.tradeId===Kt?{...je,tradeId:void 0}:je),it(),fn(I,{address:f.address,contractAddress:r.contractAddress,tokenId:r.tokenId},{kind:"removed"})}const fi=p=>async({payGas:re,onWaiting:je})=>{try{return await ss({silent:p,payGas:re,onWaiting:je}),"ok"}catch(xt){if(xt instanceof Ml)return xt.definitive?"relay-reverted":"relay-pending";throw xt}},mi={currentCredits:un||r.priceCredits||void 0,canPayGas:di,cancelCurrent:fi(!0)};function gi({edit:p=!1}={}){p||X("Shop Started Listing",{listing_type:Pe?"secondary":"primary",item_id:r.itemId??r.tokenId??null}),li(p),Pe?ni(!0):ii(!0)}function bi(){ni(!1),ii(!1),li(!1),it()}const yi=me?ce?i("itemDetail.checking"):ln?i("itemDetail.maxInCart"):!ut&&Re?i("assetCard.inCart"):i("assetCard.addToCart"):i("itemDetail.notForSale"),St=r.available??(V==null?void 0:V.available)??null,os=typeof St=="number"&&St>0&&!r.tokenId&&!w,wi=!w&&!r.tokenId&&St===0,vi=r.network==="ETHEREUM",ht=wi&&!Te&&!!Ie,Ht=!!Ie&&S.some(p=>p.id===Ie.id),ls=!Te&&me&&!w,ds=w||!Te&&(me||ht&&!!Ie||Kr()),cs=!r.name&&(!!z||!!q||!!he||!!Z),ji=F||!!r.contractAddress&&!fe||!r.name&&qt||cs||ci&&!rs,ki=!r.name&&!ji,us=!!r.name&&kd({isMarket:w,forSale:me,priceKnown:r.priceCredits>0&&(!b||T!=null)||Te,stillResolving:ji||!!b&&T==null,manage:Te,soldOutWithResale:ht,resolvingTrade:ce,isTokenRoute:m,ownedAssetLoading:qt,deepLinkLoading:F}),$i=!r.creator&&(F||oe||qt),Ci=!(Q!=null&&Q.name)&&oe,ps=/^https?:\/\//i.test(r.thumbnail);return mo(ki?{title:i("seo.item.notFoundTitle"),noindex:!0}:r.name?{title:r.name,description:xe||i("seo.item.fallbackDescription",{name:r.name,rarity:r.rarity,category:Zt(be),creator:On(r.creator)}),image:ps?r.thumbnail:void 0,type:"product"}:{}),ki?e.jsxs(cx,{"data-notfound":!0,children:[e.jsx(hx,{name:"cart"}),e.jsx(xx,{children:i("itemDetail.notAvailableTitle")}),e.jsx(ux,{children:i("itemDetail.notAvailableBody")}),e.jsx(px,{variant:"white",onClick:()=>g("/items"),children:i("notFound.cta")})]}):e.jsxs(Ph,{children:[e.jsxs(Th,{"aria-label":i("itemDetail.breadcrumbAria"),children:[e.jsx(Eh,{onClick:()=>g("/items"),children:i("nav.collectibles")}),e.jsx(Fh,{children:"/"}),e.jsx(Bh,{children:r.name||i("itemDetail.itemFallback")})]}),e.jsxs(Nh,{style:{"--glow-rgb":yo(nt),"--glow-core":bo(nt)},children:[e.jsxs(Wh,{"data-testid":"item-preview",children:[r.name?e.jsx(mp,{item:r}):e.jsx(Dh,{"aria-busy":"true","aria-label":i("itemPreview.loading"),children:e.jsx(Oh,{className:"skeleton","aria-hidden":!0})}),Qn?e.jsxs(Na,{"data-fav-preview":!0,"data-on":tt||void 0,"data-count":Wt??void 0,onClick:()=>B(r,"item_detail"),"aria-pressed":tt,"aria-label":_n,children:[e.jsx(L,{name:tt?"heart-solid":"heart",size:18}),Ue!==void 0?e.jsx(Wa,{title:i("itemDetail.savedCount",{count:Ue}),"data-testid":"fav-count-preview",children:Wt}):null]}):null,vt?e.jsxs(Uh,{"data-play-showcase":!0,onClick:()=>Tt(!0),"data-testid":"play-showcase",children:[e.jsx(L,{name:"play",size:18}),i("itemDetail.playShowcase")]}):null]}),e.jsx(qh,{"data-testid":"item-info",children:r.name?e.jsxs(e.Fragment,{children:[ti&&r.compareAtCredits!=null?e.jsx(Yh,{pct:go(r.compareAtCredits,r.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(Kh,{children:[e.jsxs(Hh,{children:[r.name,m&&r.issuedId?` #${r.issuedId}`:""]}),Qn?e.jsxs(Na,{"data-fav-title":!0,"data-on":tt||void 0,"data-count":Wt??void 0,onClick:()=>B(r,"item_detail"),"aria-pressed":tt,"aria-label":_n,children:[e.jsx(L,{name:tt?"heart-solid":"heart",size:18}),Ue!==void 0?e.jsx(Wa,{title:i("itemDetail.savedCount",{count:Ue}),"data-testid":"fav-count",children:Wt}):null]}):null]}),e.jsxs(Qh,{children:[Zn?e.jsx(_t,{content:Pi(r.rarity),children:e.jsx(Yt,{to:Zn,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Li(nt)},children:r.rarity})}):e.jsx(_t,{content:Pi(r.rarity),children:e.jsx(Ee,{"data-variant":"rarity",style:{background:Li(nt)},children:r.rarity})}),ei?e.jsxs(Yt,{to:ei,"data-testid":"detail-category-link",title:i("filter.browseByCategory",{category:Zt(be)}),children:[Ot?e.jsx(L,{name:Ot,size:18}):null,Zt(be)]}):e.jsxs(Ee,{children:[Ot?e.jsx(L,{name:Ot,size:18}):null,Zt(be)]}),Yn?e.jsxs(Ee,{children:[Xn?e.jsx(L,{name:Xn,size:18}):null,Yn]}):null,!m&&r.issuedId?e.jsxs(Ee,{"data-testid":"detail-issued",children:["#",r.issuedId]}):null,d?e.jsxs(Yt,{to:"/event","data-testid":"detail-event",title:d,children:[e.jsx(L,{name:"star-rounded",size:18}),d]}):null,Be?e.jsxs(Yt,{to:Ah(),"data-testid":"detail-smart",title:i("filter.browseBySmart"),children:[e.jsx(L,{name:"smart",size:18}),i("itemDetail.smart")]}):null,Ze.emoteLoop!==void 0?e.jsxs(Ee,{"data-testid":"detail-play-mode",children:[e.jsx(L,{name:Ze.emoteLoop?"play-loop":"play-once",size:18}),Ze.emoteLoop?i("itemDetail.playLoop"):i("itemDetail.playOnce")]}):null,Ze.emoteHasSound?e.jsxs(Ee,{"data-testid":"detail-sound",children:[e.jsx(L,{name:"sound",size:18}),i("itemDetail.emoteSound")]}):null,Ze.emoteHasProps?e.jsxs(Ee,{"data-testid":"detail-props",children:[e.jsx(L,{name:"props",size:18}),i("itemDetail.emoteProps")]}):null,on?e.jsx(_t,{content:i("itemDetail.exportBlockedTooltip"),children:e.jsxs(Ee,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":i("itemDetail.exportBlockedTooltip"),children:[e.jsx(L,{name:"ban",size:16}),i("itemDetail.exportBlocked")]})}):null,qe?e.jsxs(Ee,{"data-testid":"detail-utility-chip",children:[e.jsx(L,{name:"utility",size:18}),i("itemDetail.utility")]}):null]}),xe||qe?e.jsxs(Gr,{children:[xe?e.jsx(Wn,{children:e.jsxs(Nn,{children:[e.jsx(mt,{children:i("itemDetail.description")}),e.jsx(Da,{"data-expanded":se||void 0,children:xe}),xe.length>140?e.jsx(_h,{className:"link",onClick:()=>ie(p=>!p),children:se?i("itemDetail.showLess"):i("itemDetail.readMore")}):null]})}):null,qe?e.jsx(Wn,{children:e.jsxs(Nn,{"data-testid":"detail-utility",children:[e.jsx(mt,{children:i("itemDetail.utility")}),e.jsx(Da,{"data-expanded":!0,children:qe})]})}):null]}):null,!vi&&(r.creator||$i)||Q!=null&&Q.name||Ci?e.jsxs(_r,{children:[vi?null:r.creator?e.jsxs(zt,{children:[e.jsx(mt,{children:i("itemDetail.creator")}),e.jsx(Vh,{address:r.creator,linkToProfile:!0,hidePrefix:!0})]}):$i?e.jsxs(zt,{children:[e.jsx(mt,{children:i("itemDetail.creator")}),e.jsxs(Za,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(er,{}),e.jsx(tr,{})]})]}):null,Q!=null&&Q.name?e.jsxs(zt,{"data-collection":!0,children:[e.jsx(mt,{children:i("itemDetail.collection")}),e.jsx(Jh,{contractAddress:r.contractAddress,name:Q.name,items:v})]}):Ci?e.jsxs(zt,{"data-collection":!0,children:[e.jsx(mt,{children:i("itemDetail.collection")}),e.jsxs(Za,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(er,{}),e.jsx(tr,{})]})]}):null]}):null,e.jsx(Jr,{}),us?e.jsxs(Ex,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(Fx,{}),e.jsx(Xa,{}),e.jsx(Xa,{})]}):e.jsxs(e.Fragment,{children:[Ne&&!Te&&!w&&me&&!r.tokenId?e.jsxs(jx,{"data-testid":"buy-from-creator",children:[e.jsxs(kx,{children:[e.jsx($x,{name:"buy-from-creator"}),i("itemDetail.buyFromCreator")]}),e.jsx(Cx,{name:"check-rounded"})]}):null,ht?e.jsxs(zx,{"data-testid":"sold-out",children:[e.jsxs(Ga,{"data-variant":"original",children:[e.jsxs(_a,{children:[i("itemDetail.originalPrice"),e.jsxs(Va,{children:[e.jsx(ve,{className:"ico"}),e.jsx(Ja,{children:e.jsx(ye,{credits:r.priceCredits})})]}),e.jsx(Ya,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsx(Rx,{"data-testid":"out-of-stock",children:i("itemDetail.soldOut")})]}),e.jsxs(Ga,{"data-variant":"resale",children:[e.jsxs(_a,{children:[i("itemDetail.resalePrice"),e.jsxs(Va,{children:[e.jsx(ve,{className:"ico"}),e.jsx(Ja,{children:e.jsx(ye,{credits:He})})]}),e.jsx(Ya,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsxs(Lx,{children:[i("itemDetail.stock")," ",Ke.length,"/",Ae.Rarity.getMaxSupply(nt).toLocaleString()]})]})]}):e.jsxs(Xh,{children:[e.jsxs(Zh,{children:[e.jsxs(ex,{children:[w||me?e.jsx(zn,{children:i("itemDetail.price")}):null,w?e.jsxs(e.Fragment,{children:[e.jsx(At,{"data-variant":"market","data-testid":"item-price",children:k==null?e.jsx(Mt,{children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx(nx,{"aria-hidden":!0,children:"≈"}),e.jsx(Xt,{}),e.jsx(Mt,{children:e.jsx(ye,{credits:k})})]})}),e.jsx(ix,{children:i("assetCard.marketPrice")})]}):me?ti?e.jsxs(At,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Xt,{}),e.jsx(Mt,{children:e.jsx(ye,{credits:r.priceCredits})}),e.jsx(rx,{"data-testid":"detail-price-was",children:e.jsx(ye,{credits:r.compareAtCredits})}),e.jsx(rd,{until:r.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs(At,{"data-testid":"item-price",children:[e.jsx(Xt,{}),e.jsx(Mt,{children:e.jsx(ye,{credits:r.priceCredits})})]}):ui&&un?e.jsxs(At,{"data-testid":"item-price",children:[e.jsx(Xt,{}),e.jsx(Mt,{children:e.jsx(ye,{credits:un})})]}):Te?null:e.jsxs(At,{"data-variant":"none","data-testid":"item-price",children:[e.jsx("span",{children:i("itemDetail.notForSale")}),e.jsx(_t,{content:i("itemDetail.notForSaleHint"),children:e.jsx(tx,{tabIndex:0,role:"img","aria-label":i("itemDetail.notForSaleHint"),children:e.jsx(L,{name:"info",size:14})})})]})]}),os?e.jsxs(Oa,{children:[e.jsx(zn,{children:i("itemDetail.stock")}),e.jsxs(Mn,{children:[(St??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(nt).toLocaleString()]})]}):wi?e.jsxs(Oa,{children:[e.jsx(zn,{children:i("itemDetail.stock")}),e.jsxs(Mn,{children:[(St??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(nt).toLocaleString()]}),e.jsx(Mn,{"data-out":!0,"data-testid":"out-of-stock",children:i("itemDetail.outOfStock")})]}):null]}),D?e.jsx($h,{claimed:D.claimed,total:D.total,testId:"detail-offer-stock"}):null,pe!=null?e.jsx(ax,{"data-testid":"detail-units-left",children:i("assetCard.unitsLeftAtThisPrice",{count:pe})}):null]}),e.jsx(sx,{"data-buttons":ds||void 0,"data-dual":ls||void 0,children:w?e.jsxs(Rn,{variant:"purple",onClick:G,disabled:!J,children:[e.jsx("span",{children:i("assetCard.buyNow")}),k!=null?e.jsxs(Ln,{"aria-hidden":!0,children:[e.jsx(En,{}),e.jsx(ye,{credits:k})]}):null]}):Te?e.jsxs(Px,{"data-testid":"manage-actions",children:[ui?e.jsxs(e.Fragment,{children:[hi?e.jsxs(lx,{onClick:()=>gi({edit:!0}),disabled:!pi,"data-testid":"edit-price",children:[e.jsx(L,{name:"pen",className:"ico"}),e.jsx("span",{children:i("itemDetail.manageUpdatePrice")})]}):null,e.jsx(Ka,{onClick:()=>si(!0),"data-testid":"remove-listing",children:e.jsx("span",{children:i("itemDetail.manageRemove")})})]}):e.jsxs(e.Fragment,{children:[hi?e.jsx(ox,{onClick:()=>gi(),disabled:!pi,children:e.jsx("span",{children:i("itemDetail.manageList")})}):null,Pe?e.jsxs(e.Fragment,{children:[e.jsx(Ka,{onClick:()=>ai(!0),children:e.jsx("span",{children:i("itemDetail.manageTransfer")})}),e.jsx(qa,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>Bt(!0),children:i("itemDetail.manageResell")})]}):null]}),cn&&Le?e.jsx(qa,{type:"button","data-on-purple":!0,onClick:()=>ri(!0),children:i("itemDetail.manageIssue")}):null,He!=null?e.jsx(Tx,{children:e.jsx(Dn,{onClick:()=>et(!0),"data-testid":"view-resellers",children:i("itemDetail.viewAllResellers")})}):null]}):me?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:G,disabled:ce,children:[e.jsx("span",{children:i("assetCard.buyNow")}),e.jsxs(Ln,{"aria-hidden":!0,children:[e.jsx(En,{}),e.jsx(ye,{credits:r.priceCredits})]})]}),e.jsxs(Ha,{onClick:Xr,disabled:ce||(ut?ln:Re),"aria-label":yi,children:[e.jsx(L,{name:"cart"}),e.jsx(Ua,{children:yi})]})]}):ht&&Ie?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:()=>f?Et(Ie):N(),children:[e.jsx("span",{children:i("assetCard.buyNow")}),e.jsxs(Ln,{"aria-hidden":!0,children:[e.jsx(En,{}),e.jsx(ye,{credits:Ie.priceCredits})]})]}),e.jsxs(Ha,{onClick:()=>{Ht||C(Ie,"item_detail")},disabled:Ht,"aria-label":Ht?i("assetCard.inCart"):i("assetCard.addToCart"),children:[e.jsx(L,{name:"cart"}),e.jsx(Ua,{children:Ht?i("assetCard.inCart"):i("assetCard.addToCart")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(bh,{item:r}),r.itemId?e.jsx(Mx,{onClick:()=>{X("Shop Clicked Buy Resale",{item_id:r.itemId,contract_address:r.contractAddress,has_shop_resale:!!Ie}),$t(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:i("itemDetail.buyResale")}):null]})}),!Te&&!w&&He!=null?e.jsxs(Ix,{"data-testid":"lowest-price","data-centered":ht||void 0,children:[ht?null:e.jsxs(Sx,{children:[i("itemDetail.lowestPrice"),e.jsx(ve,{className:"ico"}),e.jsx(Ax,{children:e.jsx(ye,{credits:He})})]}),e.jsx(Dn,{onClick:()=>et(!0),"data-testid":"view-resellers",children:i("itemDetail.viewAllResellers")})]}):null,!Te&&!w&&xi>0?e.jsxs(dx,{"data-testid":"you-own-note",children:[i("itemDetail.youOwnN",{count:xi})," ",e.jsx(ir,{to:"/my-items",children:i("nav.myAssets")})]}):null]})]}):e.jsx(Dx,{})})]}),e.jsx(wo,{exclude:de,title:i("itemDetail.becauseYouOwn"),surface:"pdp",first:nr}),_!==null&&e.jsx(wl,{title:Zr,items:O,onViewAll:H&&r.contractAddress?()=>g(`/collection/${r.contractAddress}`):void 0}),Y&&w&&W&&M?e.jsx(Br,{listing:W,rate:M,onClose:()=>U(!1),onSold:()=>U(!1)}):Y&&!w?e.jsx(Bn,{item:Se,resume:A,onClose:()=>{U(!1),R(!1)}}):null,jt?e.jsx(Bn,{item:jt,onClose:()=>{Et(null),it()}}):null,Ne&&Ft&&r.itemId?e.jsx(Up,{item:r,onClose:()=>et(!1)}):null,kt&&x?e.jsx(Pa,{contractAddress:o??"",tokenId:x,onClose:()=>Bt(!1)}):null,Nt&&r.itemId&&o?e.jsx(Pa,{variant:"buy",contractAddress:o,itemId:r.itemId,onClose:()=>$t(!1)}):null,es&&q&&f?e.jsx(yc,{asset:q,session:f,creator:r.creator,edit:oi?mi:void 0,onListed:(p,re)=>{It(p),it(),fn(I,{address:f.address,contractAddress:r.contractAddress,tokenId:r.tokenId},{kind:"listed",priceCredits:p,tradeId:re})},onClose:bi}):null,as&&f?e.jsx(Oc,{name:r.name,managed:an(f),canPayGas:di,cancel:fi(!1),onClose:()=>si(!1)}):null,ns&&f&&r.tokenId?e.jsx(Nc,{item:{contractAddress:r.contractAddress,chainId:r.chainId,tokenId:r.tokenId,name:r.name,thumbnail:r.thumbnail},session:f,onClose:()=>{ai(!1),it()},onTransferred:()=>{It(null),it(),fn(I,{address:f.address,contractAddress:r.contractAddress,tokenId:r.tokenId},{kind:"gone"})}}):null,ts&&Le&&f?e.jsx(du,{item:Le,session:f,edit:oi?mi:void 0,onListed:(p,re)=>{It(p),E(je=>({...je,tradeId:re}))},onClose:bi}):null,is&&Le&&f?e.jsx(Bu,{item:{contractAddress:Le.contractAddress,chainId:st.chainId,itemId:Le.blockchainItemId,name:Le.name,thumbnail:Le.thumbnail,available:Le.remainingSupply},session:f,onClose:()=>{ri(!1),it()}}):null,Pt&&vt?e.jsx(Hu,{src:vt,itemName:r.name,onClose:()=>Tt(!1)}):null]})}function Dx(){return e.jsxs(fx,{"aria-hidden":!0,children:[e.jsx(bx,{className:"skeleton"}),e.jsxs(yx,{children:[e.jsx(Pn,{className:"skeleton"}),e.jsx(Pn,{className:"skeleton"}),e.jsx(Pn,{className:"skeleton"})]}),e.jsx(Gr,{children:[0,1].map(t=>e.jsx(Wn,{children:e.jsxs(Nn,{children:[e.jsx(Qa,{className:"skeleton"}),e.jsxs(mx,{children:[e.jsx(Tn,{className:"skeleton"}),e.jsx(Tn,{className:"skeleton"}),e.jsx(Tn,{className:"skeleton","data-short":!0})]})]})},t))}),e.jsx(_r,{children:[0,1].map(t=>e.jsxs(zt,{...t===1?{"data-collection":!0}:{},children:[e.jsx(Qa,{className:"skeleton"}),e.jsx(gx,{})]},t))}),e.jsx(Jr,{}),e.jsx(wx,{className:"skeleton"}),e.jsx(vx,{className:"skeleton"})]})}export{Wx as ItemDetail,mf as ItemDetailRoute,Wx as default};
3779
+ //# sourceMappingURL=ItemDetail-EQYc-D1i.js.map