@dcl/shop 1.17.1 → 1.17.2-36157867735.commit-7431f7b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_assets/{Activity-BNjXw97e.js → Activity-CE6Jeo_T.js} +9 -9
- package/_assets/{AnimatedBackground-kFDegzCM.js → AnimatedBackground-D5MFl62Y.js} +3 -3
- package/_assets/{Assets-D_dCmUv0.js → Assets-COp5lo1c.js} +7 -7
- package/_assets/{Cart-BPv_4JHc.js → Cart-CXTYKHB4.js} +5 -5
- package/_assets/{Collection-2qp7F46n.js → Collection-D6GAA887.js} +7 -7
- package/_assets/{CollectionCarousel-CXiZiW-S.js → CollectionCarousel-C_r2HthR.js} +7 -7
- package/_assets/{Confetti-Bsu2ytMi.js → Confetti-DPZN6qJi.js} +4 -4
- package/_assets/{ConstantsUtil-czCTnHYO.js → ConstantsUtil-C6ody29O.js} +2 -2
- package/_assets/{ContentClient-CIV5rrAt.js → ContentClient-C03rRrUz.js} +2 -2
- package/_assets/{Creator-CIH3WU3e.js → Creator-Chq_3FKW.js} +7 -7
- package/_assets/{CreditPackPicker-Cf2WXrfD.js → CreditPackPicker-yPm96IIv.js} +2 -2
- package/_assets/{CreditRate-DjCL9hVD.js → CreditRate-BxqKLfaA.js} +6 -6
- package/_assets/{DeploymentBuilder-C3NqEfXH.js → DeploymentBuilder-B2QubYgD.js} +2 -2
- package/_assets/{EmotePlaybackBar-Bq7TckV0.js → EmotePlaybackBar-Cp9UGu_L.js} +3 -3
- package/_assets/{ErrorNotice-DSZ4YOzl.js → ErrorNotice-D_6j8-7f.js} +2 -2
- package/_assets/{Event-D__OUwpc.js → Event-v8GnBTyC.js} +2 -2
- package/_assets/{ExchangeController-BlkQV8ix.js → ExchangeController-CE3cQOVu.js} +2 -2
- package/_assets/{Faq-Daw98w_f.js → Faq-Dfduj2eM.js} +2 -2
- package/_assets/{Filters-COsCKlQM.js → Filters-CdMOVmbU.js} +2 -2
- package/_assets/{GetCredits-uaIm_-xy.js → GetCredits-BS--XoK-.js} +2 -2
- package/_assets/{Grow-nApzPG32.js → Grow-CPeuefrF.js} +2 -2
- package/_assets/{HelpersUtil-Dhc8srsx.js → HelpersUtil-B_SruwGa.js} +2 -2
- package/_assets/IssueModal-D_PS_2Xk.js +323 -0
- package/_assets/ItemDetail-DBAHPIQO.js +3090 -0
- package/_assets/{LoadMore-D8gtSgyc.js → LoadMore-CM5ykem-.js} +2 -2
- package/_assets/{ManaPricingBanner-CiV8R5vd.js → ManaPricingBanner-CZzRxND3.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-BNQ_wLgO.js → ManaPricingBanner.styles-B10EKkra.js} +2 -2
- package/_assets/{MyAssets-XbkBS3DE.js → MyAssets-Fhl2lazZ.js} +2 -2
- package/_assets/{MyFavorites-lktPT4tc.js → MyFavorites-DqyQ-SFM.js} +10 -10
- package/_assets/MyStore-B5e7oQJa.js +1691 -0
- package/_assets/{NetworkUtil-BwvINT8v.js → NetworkUtil-iL8rkdmy.js} +2 -2
- package/_assets/{NotFound-CIueRHHs.js → NotFound-sBVYlhk3.js} +2 -2
- package/_assets/NotificationsBell-TdDjFO5P.js +142 -0
- package/_assets/{OutfitDetail-MDYbLLf8.js → OutfitDetail-BBsCNaaP.js} +3 -3
- package/_assets/{OutfitPreview-C52GjMv6.js → OutfitPreview-BTJ-IIEH.js} +3 -3
- package/_assets/{OutfitStudio-uomtfIa1.js → OutfitStudio-DXHZfbf9.js} +10 -10
- package/_assets/{PaymentMethodStep-aQUg-E9d.js → PaymentMethodStep-Ob8YI_SL.js} +5 -5
- package/_assets/{SaleCountdown-BC6cklIs.js → SaleCountdown-KX9dNqTp.js} +2 -2
- package/_assets/{Spinner-NI6IZA5A.js → Spinner-DKskpIEZ.js} +2 -2
- package/_assets/{StoreSettings-BrdRpaVU.js → StoreSettings-Bia_W-8Q.js} +8 -8
- package/_assets/{Success-Bsg9-DNo.js → Success-2dVHPO-2.js} +2 -2
- package/_assets/{SwapController-DVbKfkaS.js → SwapController-CbFqSpFg.js} +2 -2
- package/_assets/{Tooltip-DIRWGOxl.js → Tooltip-DFrRznAp.js} +2 -2
- package/_assets/{TradeService-CK7xu_Fq.js → TradeService-CDS_PfTn.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-BWvDpNTL.js → W3MFrameProviderSingleton-C4KtItmg.js} +4 -4
- package/_assets/{WebCryptoP256-pa_zJ5z4.js → WebCryptoP256-CbiRbOjq.js} +2 -2
- package/_assets/{basic-Mlwb1YPe.js → basic-BufXGp2F.js} +2 -2
- package/_assets/{biconomy-CIvkhhfY.js → biconomy-BR1CMfhe.js} +2 -2
- package/_assets/{browseLayout.styles-D3u_lxUV.js → browseLayout.styles-DF9DTUfO.js} +2 -2
- package/_assets/{browser-BnRQXFFw.js → browser-DqwPlfZs.js} +2 -2
- package/_assets/{browser-ponyfill-Dmn_2mUU.js → browser-ponyfill-DqHLL_k5.js} +2 -2
- package/_assets/{browser-lYIugjhZ.js → browser-qc2dUFk5.js} +2 -2
- package/_assets/{buy-MeE-N2le.js → buy-BiTHthT9.js} +2 -2
- package/_assets/{buy-gasless-ZiYiDzb-.js → buy-gasless-CTp90Dvn.js} +2 -2
- package/_assets/{ccip-D2v4Tmss.js → ccip-DZfLdErH.js} +2 -2
- package/_assets/{ccip-D9Kr5HJY.js → ccip-rfpBm5bL.js} +2 -2
- package/_assets/{chains-CfHTI0IT.js → chains-BWqZ-nYk.js} +2 -2
- package/_assets/{collectionPage.styles-Drt5ivqQ.js → collectionPage.styles-Db2PBFNG.js} +4 -4
- package/_assets/{common-BkGfzbjV.js → common-BfXnUVAM.js} +2 -2
- package/_assets/{controller-B1XkQ-8T.js → controller-ZXDDsCxP.js} +3 -3
- package/_assets/{core-8MNjsO3A.js → core-DfE8LCjh.js} +5 -5
- package/_assets/{createSvgIcon-BKu0ThNd.js → createSvgIcon-BUkltLfu.js} +2 -2
- package/_assets/{crumbs.styles-IWrGqGTW.js → crumbs.styles-R8odPxFR.js} +2 -2
- package/_assets/{custom-RQn4QL1O.js → custom-DKOD0xYg.js} +2 -2
- package/_assets/{data-capture-BCz6ZuJe.js → data-capture-C3eH7C_s.js} +2 -2
- package/_assets/{dcl-schemas-BgQanFex.js → dcl-schemas-BW3BbT5l.js} +2 -2
- package/_assets/{decimals-DQ6egFLl.js → decimals-BI0yoEux.js} +2 -2
- package/_assets/{decimals-Yu9nfiap.js → decimals-DQJMb7J9.js} +2 -2
- package/_assets/{detectExtension-mxrpMjPD.js → detectExtension-C_GbFz5_.js} +2 -2
- package/_assets/{disposePreview-DPlzBDEC.js → disposePreview-5Jddp9do.js} +2 -2
- package/_assets/{email-C9hzZFfn.js → email-D4HLC7wh.js} +7 -7
- package/_assets/{embedded-wallet-sNZ139r3.js → embedded-wallet-CMbzkthX.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-CFDaRZFq.js → emotion-styled.browser.esm-B6eszsio.js} +2 -2
- package/_assets/{engine-t2WwPyT-.js → engine-BA9Hr8Az.js} +2 -2
- package/_assets/{errors-TvhLJhmP.js → errors-DnOSpKoV.js} +2 -2
- package/_assets/{estimate-l1-fee-V6V7FI1H.js → estimate-l1-fee-BZt36dEW.js} +2 -2
- package/_assets/{eth_estimateGas-vmn477Rl.js → eth_estimateGas-mNInGC82.js} +2 -2
- package/_assets/{eth_getStorageAt-BJsh0E1g.js → eth_getStorageAt-CW3VLsR7.js} +2 -2
- package/_assets/{eth_getTransactionCount-DjYi-3h-.js → eth_getTransactionCount-DGbTHobL.js} +2 -2
- package/_assets/{ethereum-CtosgwHU.js → ethereum-Cez4WhJf.js} +2 -2
- package/_assets/{ethers-RdXTApYJ.js → ethers-DGYWmyb1.js} +2 -2
- package/_assets/{events-DcSLjVuU.js → events-YMZCt1yV.js} +2 -2
- package/_assets/{execute-Da7DgAmR.js → execute-CVxgGRa9.js} +3 -3
- package/_assets/{extractIPFS-Cczu9meN.js → extractIPFS-BdalrjY7.js} +2 -2
- package/_assets/{features-C_bdmaJE.js → features-BPD34bt1.js} +2 -2
- package/_assets/{fetchTokenMetadata-7Kgsjbv4.js → fetchTokenMetadata-DOlcjXZI.js} +3 -3
- package/_assets/{field.styles-DDXjryam.js → field.styles-CIXh24AQ.js} +2 -2
- package/_assets/{fortmatic-BPBqqvfl.js → fortmatic-DGrmZpu1.js} +2 -2
- package/_assets/{get-bytecode-Bbw_Evod.js → get-bytecode-N2OV9nFo.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-81lpLPU_.js → get-ecosystem-wallet-info-CVK-PjWL.js} +2 -2
- package/_assets/{getBalance-BgqMuvIf.js → getBalance-BEz0Zoiv.js} +3 -3
- package/_assets/{getInstalledModules-W4RDd7ik.js → getInstalledModules-AznSDC44.js} +2 -2
- package/_assets/{getNFT-anMIImQh.js → getNFT-VxK16uv_.js} +2 -2
- package/_assets/{getNFT-BDhkq7kr.js → getNFT-aR5kSoWa.js} +3 -3
- package/_assets/{grid.styles-D--qOwVq.js → grid.styles-CVQcD_5t.js} +2 -2
- package/_assets/{hashTypedData-CiWRFQn6.js → hashTypedData-ByCdES4z.js} +2 -2
- package/_assets/{hashTypedData-CUDRpwju.js → hashTypedData-ywahqODz.js} +2 -2
- package/_assets/{import-CIZWEISk.js → import-CPlDKdWo.js} +2 -2
- package/_assets/{in-app-BbIysh8c.js → in-app-D43FjnXM.js} +2 -2
- package/_assets/{in-app-wallet-calls-BgxC18Ff.js → in-app-wallet-calls-DmZ4pxIH.js} +2 -2
- package/_assets/{index-DQS3Dydb.js → index-0FaDHGAZ.js} +2 -2
- package/_assets/{index-BKGo_9wu.js → index-7s_cYB0r.js} +2 -2
- package/_assets/{index-DFQS58XE.js → index-B67Ropoe.js} +3 -3
- package/_assets/{index-CM4FAtZl.js → index-B7aqs-FR.js} +2 -2
- package/_assets/{index-BhhO1oEp.js → index-B8kJyL6G.js} +2 -2
- package/_assets/{index-qrz6WiaK.js → index-BAAoctqn.js} +2 -2
- package/_assets/{index-C0EB4Nb3.js → index-BBS-v8LD.js} +17 -17
- package/_assets/{index-8wQks0w8.js → index-BFVKoQeh.js} +2 -2
- package/_assets/{index-B1OJuolS.js → index-BIDkjxTy.js} +2 -2
- package/_assets/{index-hLoLHUKV.js → index-BMak5rZb.js} +2 -2
- package/_assets/{index-BlG9tYXl.js → index-BOyogbet.js} +2 -2
- package/_assets/{index-CjuTKXut.js → index-BUZUNt7Z.js} +2 -2
- package/_assets/{index-BNn-tbAt.js → index-BUnaJjPH.js} +2 -2
- package/_assets/{index-B49OLLy1.js → index-Bf74R1qS.js} +2 -2
- package/_assets/{index-BhGdGiCs.js → index-BfZKaxHs.js} +3 -3
- package/_assets/{index--yUfiOex.js → index-Bf_iGaP5.js} +2 -2
- package/_assets/{index-DTWx6T1S.js → index-BkdjGh-W.js} +2 -2
- package/_assets/{index-BwKvHJ-v.js → index-C2S4XG0R.js} +2 -2
- package/_assets/{index-OhRAcbHT.js → index-C7Le7sHG.js} +2 -2
- package/_assets/{index-DzyghasH.js → index-CA4CUNiy.js} +2 -2
- package/_assets/{index-CeM8omfX.js → index-CHBzdW6M.js} +2 -2
- package/_assets/{index-Dxfnkqq4.js → index-CLpLBvH2.js} +2 -2
- package/_assets/{index-DO6ydGXX.js → index-CNjrqKOs.js} +2 -2
- package/_assets/{index-lQ2m7yUy.js → index-CSuaHD6u.js} +2 -2
- package/_assets/{index-BJvtfv1M.js → index-CT7NzvvO.js} +2 -2
- package/_assets/{index-Zum9uUGy.js → index-CU2OselF.js} +2 -2
- package/_assets/{index-D1S8t2fe.js → index-CY4_MrXH.js} +2 -2
- package/_assets/{index-Cw_s9pOw.js → index-C_2eXgm7.js} +2 -2
- package/_assets/{index-D22FRuvW.js → index-CeLw5QQ-.js} +3 -3
- package/_assets/{index-CtSgRzsY.js → index-CepaElib.js} +2 -2
- package/_assets/{index-ClIQf3ng.js → index-CgfbItO2.js} +2 -2
- package/_assets/{index-BIAEBlSw.js → index-ChIjTbh5.js} +2 -2
- package/_assets/{index-Bc7EMqAf.js → index-Ci4_h86U.js} +2 -2
- package/_assets/{index-BGZlLdrL.js → index-CnfBCYQg.js} +2 -2
- package/_assets/{index-cGB6nHYf.js → index-CtoH5DSl.js} +6 -6
- package/_assets/{index-wOPFghKT.js → index-Cx1doNkB.js} +2 -2
- package/_assets/{index-DfOPi5vf.js → index-CxOeCVBB.js} +3 -3
- package/_assets/{index-BDdcoEFU.js → index-CzV7sMdy.js} +4 -4
- package/_assets/{index-DZEeeDQr.js → index-DCSutgdw.js} +2 -2
- package/_assets/{index-DCdW2yi4.js → index-DIYb1IGB.js} +4 -4
- package/_assets/{index-CvR8He0C.js → index-DR9_Mkt6.js} +2 -2
- package/_assets/{index-B-gdbRSW.js → index-DSwxHrMr.js} +2 -2
- package/_assets/{index-BeH18kmv.js → index-DZ3S9SRN.js} +2 -2
- package/_assets/{index-Bs_f3yhf.js → index-DZ53HgoK.js} +2 -2
- package/_assets/{index-CFBOIeXE.js → index-DZaHlbE_.js} +2 -2
- package/_assets/{index-Cf6ERmsZ.js → index-D_2nYoM8.js} +2 -2
- package/_assets/{index-CZEYeX3l.js → index-DauMTBWE.js} +2 -2
- package/_assets/{index-BmsamR4M.js → index-DhWCbjGh.js} +2 -2
- package/_assets/{index-Dz8UCy0P.js → index-DtS7bQfE.js} +2 -2
- package/_assets/{index-DU6vOlyL.js → index-DyhsaJtc.js} +2 -2
- package/_assets/{index-Dkohypnm.js → index-LRrTgDY0.js} +4 -4
- package/_assets/{index-BRWjazWI.js → index-LxRrm7nL.js} +2 -2
- package/_assets/{index-DOn0iodU.js → index-PFt3YITh.js} +2 -2
- package/_assets/{index-DAysx568.js → index-T6hDl-2V.js} +2 -2
- package/_assets/{index-C5s2ci0r.js → index-Tz82vi2e.js} +2 -2
- package/_assets/{index-CSZAw8dC.js → index-W7W-N49f.js} +2 -2
- package/_assets/{index-Bsw53nId.js → index-ZDiu1J1j.js} +2 -2
- package/_assets/{index-BMjX5Tw6.js → index-bz3DaQP5.js} +2 -2
- package/_assets/{index-M4vJyniz.js → index-cCjjJ8Zd.js} +2 -2
- package/_assets/{index-Cq62ZdRW.js → index-feJ6CP8x.js} +3 -3
- package/_assets/{index-B6895neV.js → index-gfZnCNa6.js} +2 -2
- package/_assets/{index-FfTM_1mz.js → index-guDRvZQ4.js} +2 -2
- package/_assets/{index-CwCEh7Ea.js → index-mzIsCjWs.js} +2 -2
- package/_assets/{index-962zUKU_.js → index-ox01jvxx.js} +2 -2
- package/_assets/index-qTkXqLEk.css +1 -0
- package/_assets/{index-DTVY5scD.js → index-tske-Qm0.js} +2 -2
- package/_assets/index-v6-0TPZX.js +3 -0
- package/_assets/{index-_bcedLK5.js → index-y50hP8_O.js} +2 -2
- package/_assets/{index.es-C1YwoJJN.js → index.es-D61fhzOk.js} +2 -2
- package/_assets/{index.es-YMSgumSf.js → index.es-DUQRyY8V.js} +2 -2
- package/_assets/{index.es-BirWIv1k.js → index.es-DrJv9QY8.js} +2 -2
- package/_assets/{index.es-O8xfjyk3.js → index.es-_SlY0diQ.js} +5 -5
- package/_assets/items-empty-Dtl-YwtZ.js +2 -0
- package/_assets/{jump-DddgnPSC.js → jump-JCYO-k8J.js} +2 -2
- package/_assets/{linkAccount-CHDe6wUT.js → linkAccount-D_xpNX67.js} +2 -2
- package/_assets/{loader-logo-ChNoWI1Z.js → loader-logo-k6aOBN-R.js} +2 -2
- package/_assets/{localBatchGatewayRequest-tSt38JDm.js → localBatchGatewayRequest-T0sFQZ26.js} +2 -2
- package/_assets/{modal.styles-BPDABQCr.js → modal.styles-BAz9vPux.js} +2 -2
- package/_assets/{native-Cxh3QIKd.js → native-Fndcg4e5.js} +2 -2
- package/_assets/{networks-rNqzEIu1.js → networks-BkPPSIG9.js} +2 -2
- package/_assets/{onramp-Cjb0y_EX.js → onramp-DCjZy1Yr.js} +2 -2
- package/_assets/{openzeppelin-Dbgk07uO.js → openzeppelin-DWeyp33R.js} +2 -2
- package/_assets/{ownerOf-ifwSx1wQ.js → ownerOf-D0cjIIIs.js} +2 -2
- package/_assets/{parseNft-BgX116P8.js → parseNft-DCt8GvNK.js} +3 -3
- package/_assets/{parseSignature-B3jn_FVR.js → parseSignature-BbjgUCSK.js} +4 -4
- package/_assets/{parseSignature-Cjx-94kV.js → parseSignature-CtMzBmLG.js} +2 -2
- package/_assets/{passkeys-C14r7a1U.js → passkeys-DUrjX8Ro.js} +2 -2
- package/_assets/{pay-with-exchange-BoqePTss.js → pay-with-exchange-vAQgw-nO.js} +2 -2
- package/_assets/{prepare-contract-call-CVD1LMqZ.js → prepare-contract-call-BitMGE96.js} +2 -2
- package/_assets/{qr-overlay-BaF8O6L7.js → qr-overlay-3Ogvmodj.js} +4 -4
- package/_assets/{react-57wE9FMW.js → react-Ddn-9d83.js} +2 -2
- package/_assets/{receive-_KdL5WbJ.js → receive-UBqFYKku.js} +9 -9
- package/_assets/{resolveImplementation-BIVOA86N.js → resolveImplementation-CoCWI1LK.js} +2 -2
- package/_assets/{resume-buy-RWKNCH2I.js → resume-buy-DqlXnoQq.js} +2 -2
- package/_assets/{resume-name-CVkpKZkm.js → resume-name-B5w3HYnd.js} +2 -2
- package/_assets/{rpc-BuxGvW8N.js → rpc-C-RDZHVf.js} +2 -2
- package/_assets/{sales-empty-BrdJIpZF.js → sales-empty-DFvbsd1W.js} +2 -2
- package/_assets/{search-empty-B9EfPE1P.js → search-empty-D1Tausth.js} +2 -2
- package/_assets/{secp256k1-D98PKoK-.js → secp256k1-By6IQ83k.js} +2 -2
- package/_assets/{secp256k1-DtCcUzXl.js → secp256k1-CAqSDg9Y.js} +2 -2
- package/_assets/{secp256k1-C3mpZkpr.js → secp256k1-CxMxDBug.js} +2 -2
- package/_assets/{send-CPee34BT.js → send-Dg3aA-cT.js} +2 -2
- package/_assets/{send-batch-transaction-CRYeO2Ew.js → send-batch-transaction-CcGULLl4.js} +2 -2
- package/_assets/{send-eip712-transaction-DmUbX1xf.js → send-eip712-transaction-eRcl-w9x.js} +3 -3
- package/_assets/{send-gasless-transaction-Cl9L9F1A.js → send-gasless-transaction-BVE00Z8q.js} +3 -3
- package/_assets/send-transaction-bNnxjmkm.js +3 -0
- package/_assets/{sendMetaTransaction-B7N-qRfh.js → sendMetaTransaction-DaTro9ph.js} +2 -2
- package/_assets/{sendRawTransaction-DAT5LyNo.js → sendRawTransaction-Crv4h2Fe.js} +4 -4
- package/_assets/{sentry-C6Mao8WI.js → sentry-D_8KijKQ.js} +3 -3
- package/_assets/{serializeTransaction-CjRJ0psk.js → serializeTransaction-CPg2ul-G.js} +2 -2
- package/_assets/{session-proposal-ueoRTwfB.js → session-proposal-Di1f8LHY.js} +2 -2
- package/_assets/{session-request-BD9TXTaA.js → session-request-R2yVi8HQ.js} +3 -3
- package/_assets/{sha256-DbvztKVh.js → sha256-BhCi5WIJ.js} +2 -2
- package/_assets/{sha3-5JMjwcQn.js → sha3-CLQFMym7.js} +2 -2
- package/_assets/signin-empty-PXLDIsQk.js +2 -0
- package/_assets/{signing-D8djUTSU.js → signing-BCODmgNV.js} +4 -4
- package/_assets/{skeleton.styles-Bvaum8jS.js → skeleton.styles-anODpKJf.js} +2 -2
- package/_assets/{socials-NQn6q4he.js → socials-DShz1WgZ.js} +2 -2
- package/_assets/{styled-CCNK0K71.js → styled-CbzE9JXd.js} +2 -2
- package/_assets/{swaps-CgWjr3x_.js → swaps-BXF_khPF.js} +2 -2
- package/_assets/{thirdweb-C1alV0QS.js → thirdweb-Cnc0UXDQ.js} +4 -4
- package/_assets/{to-serializable-transaction-BKQS5d49.js → to-serializable-transaction-DzZsdRzk.js} +3 -3
- package/_assets/{totalSupply-CF5FI8lQ.js → totalSupply-D4EQMS5T.js} +2 -2
- package/_assets/{trade-encoding-BV1_7YxJ.js → trade-encoding-BdtZmg5A.js} +2 -2
- package/_assets/{transaction-BVLpkah4.js → transaction-Cbet3IZc.js} +2 -2
- package/_assets/{transactionReceipt-DwjBLtBg.js → transactionReceipt-DSeG56jV.js} +2 -2
- package/_assets/{transactions-DW_nxFG-.js → transactions-B5gQmUHm.js} +2 -2
- package/_assets/useInfiniteGrid-C5wDaoVd.js +2 -0
- package/_assets/{useStore-CJ2zzclt.js → useStore-wU9qkXc9.js} +3 -3
- package/_assets/{useTheme-D3lC36b8.js → useTheme-y50PSrCO.js} +2 -2
- package/_assets/{utils-DyoF2n1_.js → utils-BGzZ7mCg.js} +2 -2
- package/_assets/{verifyHash-D_k8MOkd.js → verifyHash-I86XFFeN.js} +2 -2
- package/_assets/{w3m-modal-BwPY12eH.js → w3m-modal-COSR0Fsr.js} +2 -2
- package/_assets/{w3m-modal-CIfTlIpr.js → w3m-modal-Dz0XFS0k.js} +2 -2
- package/_assets/{wait-for-tx-receipt-BQf97Yv5.js → wait-for-tx-receipt-C3zFGaKb.js} +2 -2
- package/_assets/{wallets-Cor67NYq.js → wallets-BM2FKp9V.js} +6 -6
- package/_assets/{web-connector-AUtPfxac.js → web-connector-DXaUpGnD.js} +4 -4
- package/_assets/{writeContract-_6z0Fw9c.js → writeContract-Bja8jWrS.js} +2 -2
- package/_assets/{zora-sepolia-DFxo1Oif.js → zora-sepolia-B6FH_u_V.js} +2 -2
- package/_assets/{zoraTestnet-B4Lgrc00.js → zoraTestnet-CDn6xrjW.js} +2 -2
- package/index.html +12 -12
- package/package.json +2 -2
- package/_assets/ItemDetail-big_cmBY.js +0 -3411
- package/_assets/MyStore-SSChApNZ.js +0 -1630
- package/_assets/NotificationsBell-BiwzCIb4.js +0 -142
- package/_assets/index-DoXX6TgS.css +0 -1
- package/_assets/index-GCKJ9yxg.js +0 -3
- package/_assets/items-empty-BciJH2B_.js +0 -2
- package/_assets/send-transaction-CydyNIuj.js +0 -3
- package/_assets/signin-empty-Duq453f-.js +0 -2
- package/_assets/useInfiniteGrid-CbPWAhDP.js +0 -2
|
@@ -1,3411 +0,0 @@
|
|
|
1
|
-
import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-57wE9FMW.js";import{bh as Yt,c as rt,x as at,bl as Kr,bm as es,aI as ot,t as n,bw as ts,bx as ns,V as nt,O as Z,bE as Se,bD as be,bF as Tn,l as pe,bC as un,bB as Hr,i as is,C as De,ar as rs,F as Dn,d as as,E as xt,bk as ss,G as os,by as ls,bz as ds,df as cs,dg as us,dh as ps,di as hs,w as se,bj as xs,s as r,a as i,a3 as Jt,aE as Xt,bO as Wn,aF as it,I as L,z as Re,p as Ur,aR as Mt,c8 as Qr,H as Ve,as as ge,dj as fs,M as ms,h as gs,j as bs,n as gt,bc as pn,aa as Vr,dk as Mi,d2 as ys,f as Gr,bd as ws,be as vs,dl as js,c7 as ks,dm as $s,bS as Cs,dn as Is,dp as Ss,k as As,ag as At,b0 as Ms,dq as Rs,a6 as Ls,dr as Ps,b2 as Es,ds as Fs,P as Yr,Y as Jr,dt as Xr,du as Ts,dv as zs,ba as Zr,dw as Ns,bT as Bs,dx as _s,dy as Ds,dz as Ws,ca as qs,A as Os,dA as hn,X as Ks,bo as Hs,bp as Us,y as Qs,m as Vs,dB as Gs,dC as Ys,dD as Js,dE as Xs,dF as Zs,at as eo,au as to,dG as no,B as io,dH as ro,ax as Ri,aw as Li,dI as ao,dJ as so,a0 as oo,bv as lo,dK as Pi,dL as co,dM as uo,dN as po,dO as ho,dP as xo,dQ as fo,dR as mo,dS as go}from"./index-C0EB4Nb3.js";import{d as Ae}from"./dcl-schemas-BgQanFex.js";import{p as bo,e as Ei,i as yo,A as ea,C as wo,b as vo,f as jo,g as ko,h as $o,j as Co,m as Io,u as So,t as Ao,k as Mo,a as Ro,s as Lo}from"./CollectionCarousel-CXiZiW-S.js";import{d as Fi,t as Po,e as Ti,G as Eo,c as Fo}from"./buy-MeE-N2le.js";import{c as To,i as Zt,D as zo,a as No,S as Bo,b as _o,f as Do}from"./SaleCountdown-BC6cklIs.js";import{u as Wo,M as qo,o as Oo,f as Ko,b as Ho,l as ta,c as Uo}from"./loader-logo-ChNoWI1Z.js";import{w as zi,M as Qo,S as Vo,C as Go,H as Yo,a as Jo,T as Xo,X as Zo,B as el,b as tl,c as nl,d as il,e as tt,f as rl,g as al,h as sl,i as pt,j as qe,W as Wt,m as qt,n as Ot,o as ol,v as ll,L as na,P as ia,k as ra,l as aa,E as dl,F as cl,G as Ni,A as ul,p as pl,q as hl,r as xl,s as fl,t as ml,u as gl,I as Bi}from"./CreditPackPicker-Cf2WXrfD.js";import{P as bl}from"./PaymentMethodStep-aQUg-E9d.js";import{m as yl}from"./mana-matic-light-Bl5duieC.js";import{q as sa,g as oa,t as wl,s as vl,a as _i,b as jl,d as kl,i as $l,e as Cl,c as Il,f as la,m as Sl,k as Al,r as Ml,n as Rl,p as Ll}from"./trade-encoding-BV1_7YxJ.js";import{J as Pl,p as El,C as Fl,I as Tl}from"./ethers-RdXTApYJ.js";import{a as zl,w as da,S as ca,G as ua,c as Nl}from"./buy-gasless-ZiYiDzb-.js";import{R as Di}from"./resume-buy-RWKNCH2I.js";import{a as Bl,f as Ue,i as mt}from"./errors-TvhLJhmP.js";import{C as _l}from"./Confetti-Bsu2ytMi.js";import{b as Dl,J as Wl,a as ql}from"./jump-DddgnPSC.js";import{p as pa}from"./import-CIZWEISk.js";import{E as Qe}from"./ErrorNotice-DSZ4YOzl.js";import{L as Wi,M as Ol,B as Kl,H as Hl,T as Ul,A as Ql}from"./modal.styles-BPDABQCr.js";import{S as Vl}from"./Spinner-NI6IZA5A.js";import{M as Gl,E as Yl,s as Jl}from"./sendMetaTransaction-B7N-qRfh.js";import{E as Xl}from"./EmotePlaybackBar-Bq7TckV0.js";import{d as Zl}from"./disposePreview-DPlzBDEC.js";import{T as Kt}from"./Tooltip-DIRWGOxl.js";import{c as ed}from"./crumbs.styles-IWrGqGTW.js";import"./sentry-C6Mao8WI.js";import"./intl-AKLEHPeO.js";import"./mana-matic-CEqvSwrJ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="d7654bb3-3d68-4211-9cd3-dcc93414d459",t._sentryDebugIdIdentifier="sentry-dbid-d7654bb3-3d68-4211-9cd3-dcc93414d459")}catch{}})();const ha=216n,td=(1n<<ha)-1n;function nd(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>ha).toString(),issuedId:(s&td).toString()}}function id(t){if(!t)return null;try{return nd(t).itemId}catch{return null}}const xa=["cancelled-listings"];function rd(t,s){s&&t.setQueryData(xa,l=>l!=null&&l.includes(s)?l:[...l??[],s])}function qi(t,s){var l;if(s)return(l=t.getQueryData(xa))!=null&&l.includes(s)?void 0:s}function Oi(t,s){return s.kind==="listed"?{...t,isOnSale:!0,listingPrice:s.priceCredits,tradeId:s.tradeId??t.tradeId}:{...t,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function xn(t,s,l){const{address:o,contractAddress:d,tokenId:u}=s;if(!d||!u)return;const x=`${d}-${u}`;t.cancelQueries({queryKey:["owned-token",d,u]}),t.cancelQueries({queryKey:["secondary-sale-state"]}),o&&t.cancelQueries({queryKey:["my-assets",o]});const f=l.kind==="gone";t.setQueriesData({queryKey:["owned-token",d,u]},$=>$&&(f?null:Oi($,l)));const m=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:m},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(f){const g=h.items.filter(y=>!(y.contractAddress===d&&y.tokenId===u));return{...h,items:g,total:Math.max(0,h.total-(h.items.length-g.length))}}return{...h,items:h.items.map(g=>g.contractAddress===d&&g.tokenId===u?Oi(g,l):g)}})}:$),t.setQueriesData({queryKey:["secondary-sale-state"]},$=>{var g;if(!$)return $;const h={...$};return l.kind==="removed"||l.kind==="gone"?delete h[x]:h[x]={priceCredits:l.priceCredits,tradeId:l.tradeId??((g=h[x])==null?void 0:g.tradeId)??""},h})}function ad(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}function fa(){const t=new Map,s=new Set,l=new Set,o=new Set;return{submitStarted:d=>{o.add(d)},submitFinished:d=>{o.delete(d)},broadcast:(d,u)=>{const x=t.get(d);x?x.add(u):t.set(d,new Set([u]))},reverted:d=>{s.add(d)},unobservable:d=>{l.add(d)},isInFlight:d=>o.has(d),mayBeConsumed:d=>{if(l.has(d))return!0;const u=t.get(d);if(!u)return!1;for(const x of u)if(!s.has(x))return!0;return!1}}}const sd=El("0.05");async function od(t){try{return(await new Pl(rt.rpcUrl).getBalance(t)).gte(sd)}catch{return!1}}async function ld(t,s){return Yt(t)?od(s):!1}function dd({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 cd=t=>ds(t.contractAddress,String(t.itemId));async function Ki(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return cs(await us(t.trade),t.coupon)}catch(l){return s.reportFailure!==!1&&pe(l,{flow:"buy",step:"mana_price"}),null}}function Hi(t){return t.kind==="trade"?t.trade.id:void 0}function Ui(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function zn({item:t,onClose:s,resume:l=!1}){const{session:o}=at(),{data:d}=Kr(o),{data:u}=es(o),x=ot(),f=st();async function m(){try{return await x.fetchQuery(ls())}catch{return}}async function $(){if(u!=null)return u;if(!o)return 0n;try{const j=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>hs(o.address),staleTime:3e4});return ie(j),j}catch{return 0n}}const h=Wo().packs.slice(0,qo),[g,y]=c.useState("loading"),[k,I]=c.useState(null),[C,S]=c.useState(null),[q,M]=c.useState(!1),[w,U]=c.useState(0),[a,K]=c.useState(""),[J,A]=c.useState(t.priceCredits),T=Math.max(0,J-((d==null?void 0:d.credits)??0)),{packs:X}=Oo(h,T),[V,oe]=c.useState(null),[ce,ie]=c.useState(null),O=u??ce??0n,[N,D]=c.useState(!1),[v,re]=c.useState(null),[R,z]=c.useState(0),[B,H]=c.useState(null),[ae,ve]=c.useState(!1),ee=c.useRef(null),G=c.useRef(!1),te=c.useRef(fa()),fe=(B==null?void 0:B.credits)??J,je=(d==null?void 0:d.credits)??0;c.useEffect(()=>(G.current=!1,()=>{G.current=!0}),[]);async function ke(j,P,F,E){const Q=await $();if(E!=null&&E())return;const ne=Q>0n,W=ne?await Ki(P):null;if(E!=null&&E())return;W!=null?oe(W):ne&&D(!0);const We=zi({priceCents:F,priceManaWei:W??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:Q}).options.some(Fe=>Fe.method==="mana"||Fe.method==="combined"),ye=j-((d==null?void 0:d.credits)??0),Et=h.find(Fe=>Fe.credits>=ye)??h[h.length-1];K(Et.id),We||Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:j,credits_balance:(d==null?void 0:d.credits)??0,shortfall:Math.max(0,ye)}),y("nofunds")}c.useEffect(()=>{let j=!1;if(!o){y("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const P=await Ko(t,o.address,ts,await m(),cd,ns);if(P.status==="own")throw new Error("You can't buy your own listing.");if(P.status==="no-price")throw new Error("price unavailable");if(P.status!=="buyable")throw new Error("not for sale");const F=Ho(P.line),E=P.line.usdCents,Q=nt(E);if(j)return;if(A(Q),re(F),z(E),d!=null&&d.credits<Q){await ke(Q,F,E,()=>j);return}l?lt({sale:F,usdCents:E}):y("ready")}catch(P){if(j)return;Z(be(P)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(P)}),ue(P)}})(),()=>{j=!0,ee.current&&o&&(bt([ee.current]),ee.current=null)}},[w]),c.useEffect(()=>{const j=(B==null?void 0:B.sale)??v;if(!j||g!=="ready"&&g!=="nofunds"||O<=0n||V!==null)return;let P=!1;return Ki(j,{reportFailure:!N}).then(F=>{P||(F!=null?oe(F):D(!0))}),()=>{P=!0}},[g,B,v,O,V,N]);const Y=zi({priceCents:R,priceManaWei:V??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:O});async function lt(j){const P=(B==null?void 0:B.sale)??(j==null?void 0:j.sale)??v,F=(B==null?void 0:B.usdCents)??(j==null?void 0:j.usdCents)??R;if(!o||!P||F<=0)return;y("processing"),I(null),ve(!1);let E=B;if(!E)try{const{credit:W,maxCreditedValue:xe,usdCents:We}=await Tn(o.identity,F,Hi(P),Ui(t));if(G.current){Le([W.id]);return}ee.current=W.id,x.invalidateQueries({queryKey:["usd-balance"]});const ye=nt(We);if(E={sale:P,credit:W,maxCreditedValue:xe,usdCents:We,credits:ye},H(E),ye!==nt(F)){A(ye),z(We),ve(!0),y("ready");return}}catch(W){if(Bl(W)){x.invalidateQueries({queryKey:["usd-balance"]}),await ke(nt(F),P,F);return}be(W)||pe(W,{flow:"buy",step:"authorize"}),Z(be(W)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(W)}),I(Ue(W,n("buyModal.error.generic"),{sale:!0})),y("error");return}if(!E)return;let Q=!1,ne;try{const W={purchase:bo(E.sale,[E.credit],E.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:xe})=>te.current.broadcast(E.credit.id,xe),onReverted:({txHash:xe})=>{xe&&te.current.reverted(xe)}};if(te.current.submitStarted(E.credit.id),sa())try{ne=await zl(W),te.current.broadcast(E.credit.id,ne),await da(ne),Q=!0}catch(xe){if(xe instanceof ca)Q=!0;else if(xe instanceof ua){if(xe.reason==="relayer-unreachable")throw te.current.unobservable(E.credit.id),xe;if(!Yt(o.providerType))throw xe;ne=await Fi(W)}else throw ne&&te.current.reverted(ne),xe}else ne=await Fi(W)}catch(W){te.current.submitFinished(E.credit.id),be(W)||pe(W,{flow:"buy",step:"submit",gasless:Q}),$e([E.credit.id]),ee.current=null,Z(be(W)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(W)}),x.invalidateQueries({queryKey:["usd-balance"]}),ue(W);return}te.current.submitFinished(E.credit.id),ee.current=null;try{Ei(t.coupon),yo(x,t),Z("Shop Completed Purchase",{...un([t]),payment_type:"credits",no_crypto_step:Q,transaction_hash:ne??null})}catch(W){pe(W,{flow:"buy",step:"post_purchase"})}y("complete")}function Le(j){if(!o||j.length===0)return Promise.resolve(!1);const P=j.filter(F=>!te.current.mayBeConsumed(F));return P.length===0?Promise.resolve(!1):Hr(o.identity,P).then(()=>!0,()=>!0)}function $e(j){M(!0),Le(j).then(P=>{P||M(!1)})}function bt(j){return Le(j.filter(P=>!te.current.isInFlight(P)))}function Rt(){Ei(t.coupon),x.invalidateQueries({queryKey:["mana-balance"]}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["detail-trade"]}),x.invalidateQueries({queryKey:["shop-item"]}),x.invalidateQueries({queryKey:["owned-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["public-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),x.invalidateQueries({queryKey:["shop-items"]}),x.invalidateQueries({queryKey:["catalog-items"]}),x.invalidateQueries({queryKey:["my-assets"]}),x.invalidateQueries({queryKey:["purchases"]}),x.invalidateQueries({queryKey:["owned-item-count"]}),x.invalidateQueries({queryKey:["overview-listings"]}),x.invalidateQueries({queryKey:["upsell-listings"]})}async function nn(){var P;const j=(B==null?void 0:B.sale)??v;if(!(!o||!j)){ee.current&&($e([ee.current]),ee.current=null),y("processing"),I(null);try{const F=(P=Bi(Y,"mana"))==null?void 0:P.manaWei,E=j.kind==="trade"?await jo({trade:j.trade,coupon:j.coupon,buyer:o.address,signer:o.signer,manaWei:F}):await ko({mint:j.mint,buyer:o.address,signer:o.signer,manaWei:F});Z("Shop Completed Purchase",{...un([t]),payment_type:"mana",transaction_hash:E??null}),Rt(),y("complete")}catch(F){be(F)||pe(F,{flow:"buy_mana",step:"submit"}),Z(be(F)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(F)}),ue(F)}}}async function Lt(){const j=(B==null?void 0:B.sale)??v,P=Bi(Y,"combined");if(!o||!j||!P)return;y("processing"),I(null),ee.current&&(await Le([ee.current])&&M(!0),ee.current=null);let F=null,E;try{const{credit:Q}=await Tn(o.identity,P.creditsCents,Hi(j),Ui(t));F=Q.id,te.current.submitStarted(Q.id);const ne={buyer:o.address,signer:o.signer,credits:[Q],manaGapWei:P.manaWei,providerType:o.providerType,onBroadcast:({txHash:W})=>te.current.broadcast(Q.id,W),onReverted:({txHash:W})=>{W&&te.current.reverted(W)},onUnobservable:()=>te.current.unobservable(Q.id)};E=j.kind==="trade"?await $o({trade:j.trade,coupon:j.coupon,...ne}):await Co({mint:j.mint,...ne})}catch(Q){F&&te.current.submitFinished(F),F&&$e([F]),be(Q)||pe(Q,{flow:"buy_credits_and_mana",step:"submit"}),Z(be(Q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(Q)}),x.invalidateQueries({queryKey:["usd-balance"]}),ue(Q);return}F&&te.current.submitFinished(F);try{Rt(),Z("Shop Completed Purchase",{...un([t]),payment_type:"credits_and_mana",transaction_hash:E??null})}catch(Q){pe(Q,{flow:"buy_credits_and_mana",step:"post_purchase"})}y("complete")}async function yt(){if(!(!a||!o)){try{sessionStorage.setItem(Di,JSON.stringify(t))}catch{}ee.current&&(Le([ee.current]),ee.current=null),H(null),y("loading");try{const j=await Uo(a,{address:o.address,identity:o.identity});if(j.url){window.location.href=j.url;return}if(!j.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");f(`/credits?order=${encodeURIComponent(j.orderId)}`)}catch(j){pe(j,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Di)}catch{}I(n("buyModal.error.creditsCheckout")),y("error")}}}const[Ce,Pe]=c.useState(null);function rn(j,P){const{spender:F,chainId:E}=Io(j,P);return vl(E,F)}function ue(j){if(I(Ue(j,n("buyModal.error.generic"),{sale:!0})),y("error"),!is(j)||!o)return;const P=j.required;(async()=>{if(await ld(o.providerType,o.address)){S(P);return}I(n("buyModal.error.relayDownNoRail"))})()}async function dt(j){if(o){S(null);try{await ps(o.web3Provider,j)}catch(P){be(P)||pe(P,{flow:"buy",step:"switch_chain"}),S(j);return}wt()}}function Ee(j){j==="mana"?nn():j==="combined"?Lt():lt()}const Ke=c.useRef(!1);async function Ye(j){var P;if(!Ke.current){Ke.current=!0;try{const F=(B==null?void 0:B.sale)??v;if(j==="credits"||!F||!o){Ee(j);return}const E=rn(j,F),Q=((P=Y.options.find(W=>W.method===j))==null?void 0:P.manaWei)??0n,ne=await oa(E,o.address,Q).catch(()=>!0);if(wl(o.providerType,ne)){Pe({auth:E,rail:j});return}Ee(j)}finally{Ke.current=!1}}}const Ie=Y.options.some(j=>j.method==="mana"||j.method==="combined"),Pt=g==="ready"&&(Ie||Y.manaShortfall!=null)||g==="nofunds"&&Ie;function wt(){I(null),H(null),ve(!1),M(!1),y("loading"),U(j=>j+1)}const vt=g==="error"&&C===null&&(!!ee.current||q),Je=g==="processing",an=g==="complete"?n("buyModal.titleComplete"):g==="error"?n("cartCheckout.errorTitle"):g==="nofunds"?n("buyModal.titleNoFunds"):n("buyModal.titleBuy");return Ce&&o?e.jsx(ea,{auth:Ce.auth,signer:o.signer,title:n(Ce.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:n(Ce.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:n(Ce.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:e.jsx("img",{src:yl,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:j}=Ce;Pe(null),Ee(j)},onCancel:()=>Pe(null),onClose:()=>{Pe(null),s()}}):e.jsxs(Qo,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(Vo,{onClick:Je?void 0:s,"aria-hidden":!0}),e.jsx(Go,{"data-tall":g==="processing"||g==="loading"||void 0,children:Pt?e.jsx(bl,{asset:{name:t.name,thumb:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null,caption:t.creator?e.jsx(rs,{address:t.creator}):null},priceCredits:fe,priceCents:R,options:Y.options,priceManaWei:V??0n,balanceCredits:je,manaBalanceWei:O,onBuy:j=>void Ye(j),onClose:s,busy:Je,notice:ae?n("buyModal.priceChanged"):d!=null&&d.held?n("buyModal.heldExplainer",{credits:d.held.credits,currency:De.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(Yo,{children:[e.jsxs(Jo,{children:[e.jsx(Xo,{children:an}),!Je&&e.jsx(Zo,{onClick:s,"aria-label":n("buyModal.close"),children:e.jsx(wo,{})})]}),e.jsxs(el,{children:[e.jsx(tl,{children:g==="nofunds"?n("buyModal.dclBalance"):n("buyModal.myCreditsBalance")}),e.jsx(nl,{}),e.jsx(il,{children:Dn(je)})]})]}),g==="loading"&&e.jsx(tt,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),g==="error"&&e.jsxs(tt,{children:[e.jsxs(rl,{"data-testid":"buy-error",children:[e.jsx(al,{src:vo,alt:"",width:64,height:80}),e.jsxs(sl,{children:[e.jsx("b",{children:n("cartCheckout.errorHeadline")})," ",k??(vt?null:n("cartCheckout.errorBody")),vt?e.jsxs(e.Fragment,{children:[k?" ":"",n("cartCheckout.heldLead",{currency:De.name}),e.jsx("b",{children:n("cartCheckout.heldBold")}),n("cartCheckout.heldTail",{currency:De.name})]}):null]})]}),C!==null?e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void dt(C),children:n("buyModal.error.switchAndRetry",{network:as(C)})})]}):vt?e.jsx(pt,{children:e.jsx(qe,{"data-variant":"purple","data-full":!0,onClick:s,children:n("cartCheckout.gotIt")})}):e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple",onClick:wt,children:n("cartCheckout.tryAgain")})]})]}),g==="nofunds"&&e.jsxs(tt,{children:[N&&V===null&&O>0n?e.jsxs(Wt,{"data-testid":"mana-price-unavailable",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.manaPriceUnavailable")})]}):null,d!=null&&d.held?e.jsxs(Wt,{"data-testid":"nofunds-held",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.heldExplainer",{credits:d.held.credits,currency:De.name})})]}):null,e.jsxs(Wt,{children:[e.jsx(qt,{}),e.jsxs(Ot,{children:[e.jsx("b",{children:n("buyModal.insufficientFunds")})," ",n("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:n("buyModal.warningCreditsAmount",{count:Math.max(1,fe-je)})})," ",n("buyModal.warningToPurchase",{count:1}),xt()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(ol,{href:ss("/credits"),target:"_blank",rel:"noopener noreferrer",children:n("buyModal.warningLearnMore")})]})]})]}),e.jsx(Qi,{item:t,priceCredits:fe}),xt()?null:e.jsx(e.Fragment,{children:e.jsx(ll,{packs:X,selectedId:a||void 0,onSelect:K})}),e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),xt()?null:e.jsx(qe,{"data-variant":"gradient",onClick:()=>void yt(),children:n("buyModal.buy")})]})]}),g==="ready"&&e.jsxs(tt,{children:[ae&&e.jsxs(Wt,{"data-testid":"price-changed",role:"status",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.priceChanged")})]}),e.jsx(Qi,{item:t,priceCredits:fe}),e.jsx(pt,{children:e.jsx(qe,{"data-variant":"gradient","data-full":!0,onClick:()=>void lt(),children:n("buyModal.buy")})})]}),g==="processing"&&e.jsxs(tt,{"data-processing":!0,children:[e.jsx(na,{src:ta,alt:"",width:61,height:61}),e.jsx(ia,{children:l?n("buyModal.completingPurchase"):n("buyModal.completingTransaction")}),e.jsx(ra,{"aria-hidden":!0,children:e.jsx(aa,{})})]}),g==="complete"&&e.jsxs(tt,{children:[e.jsx(_l,{}),e.jsxs(dl,{children:[e.jsx(dd,{}),e.jsxs(cl,{children:[e.jsx("b",{children:n("getCredits.successTitle")})," ",n("buyModal.successBody")]})]}),e.jsxs(pt,{"data-stack":!0,children:[e.jsx(qe,{"data-variant":"outline",onClick:()=>f(os([t.category])),children:n("buyModal.myAssets")}),xt()?e.jsx(Ni,{"data-variant":"ruby",href:Dl([t]),onClick:s,children:n("success.goToBackpack")}):e.jsxs(Ni,{"data-variant":"ruby",href:Wl,target:"_blank",rel:"noreferrer",onClick:s,children:[n("buyModal.tryInWorld"),e.jsx(ql,{})]})]})]})]})})]})}function Qi({item:t,priceCredits:s}){return e.jsxs(ul,{children:[e.jsx(pl,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(hl,{children:[e.jsxs("div",{children:[e.jsx(xl,{title:t.name,children:t.name||n("buyModal.itemFallback")}),t.creator?e.jsx(fl,{address:t.creator}):null]}),e.jsxs(ml,{children:[e.jsx(gl,{}),e.jsx("span",{children:Dn(s)})]})]})]})}function ud(){const{data:t}=se({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:xs,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const pd=r.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: 16px;
|
|
5
|
-
width: 100%;
|
|
6
|
-
max-width: 456px;
|
|
7
|
-
`,hd=r.span`
|
|
8
|
-
flex: none;
|
|
9
|
-
font-family: ${i.font.sans};
|
|
10
|
-
font-size: 18px;
|
|
11
|
-
color: ${i.colors.muted};
|
|
12
|
-
`,xd=r.p`
|
|
13
|
-
margin: 0;
|
|
14
|
-
font-family: ${i.font.sans};
|
|
15
|
-
font-size: 13px;
|
|
16
|
-
line-height: 1.5;
|
|
17
|
-
color: ${i.colors.muted};
|
|
18
|
-
text-align: center;
|
|
19
|
-
`,fd=r.p`
|
|
20
|
-
margin: 0;
|
|
21
|
-
font-family: ${i.font.sans};
|
|
22
|
-
font-size: 13px;
|
|
23
|
-
line-height: 1.5;
|
|
24
|
-
color: ${i.colors.text};
|
|
25
|
-
`;function ma(t,s){const[l,o]=c.useState(!1),[d,u]=c.useState(!1),[x,f]=c.useState(null),m=c.useRef(null);c.useEffect(()=>{const h=new AbortController;return m.current=h,()=>h.abort(new DOMException("Modal closed","AbortError"))},[]);async function $(h){if(!t||l)return!0;f(null);try{const g=await t.cancelCurrent({payGas:h,onWaiting:y=>u(y>2e4)});return g!=="ok"?(f(g==="relay-reverted"?"reverted":"pending"),!1):(o(!0),!0)}catch(g){return pe(g,{flow:"edit_price_cancel"}),s(Ue(g,n("listingEdit.cancelFailed"))),!1}finally{u(!1)}}return{cancelDone:l,slow:d,cancelFailed:x,setCancelFailed:f,cancelCurrent:$,signal:()=>{var h;return(h=m.current)==null?void 0:h.signal}}}function qn({state:t,canPayGas:s,busy:l,onPayGas:o,onLater:d,testId:u="edit-cancel-relay-failed"}){return e.jsxs(fd,{"data-testid":u,children:[s?t==="reverted"?n("itemDetail.cancelRelayReverted"):n("itemDetail.cancelRelayFailed"):n("itemDetail.cancelRelayRetry"),s?e.jsxs(e.Fragment,{children:[" ",e.jsx(Wi,{type:"button","data-testid":"cancel-pay-gas",onClick:o,disabled:l,children:n("itemDetail.cancelPayGas")}),d?e.jsxs(e.Fragment,{children:[" ",e.jsx(Wi,{type:"button","data-testid":"cancel-later",onClick:d,disabled:l,children:n("itemDetail.cancelLater")})]}):null]}):null]})}function ga({phase:t,managed:s,slow:l}){const d=t==="list"?2:1,u=`listingEdit.${s?"step":"confirm"}${t==="list"?"New":"Removal"}`;return e.jsxs(tt,{"data-processing":!0,"data-testid":"listing-steps",role:"status","aria-live":"polite",children:[e.jsx(na,{src:ta,alt:"",width:61,height:61}),e.jsx(ia,{children:n(u)}),e.jsxs(pd,{children:[e.jsx(ra,{"aria-hidden":!0,children:e.jsx(aa,{})}),e.jsxs(hd,{"data-testid":"listing-steps-count",children:[d,"/",2]})]}),l?e.jsx(xd,{"data-testid":"listing-steps-slow",children:n("listingEdit.slow")}):null]})}const fn=r.div`
|
|
26
|
-
position: fixed;
|
|
27
|
-
inset: 0;
|
|
28
|
-
z-index: 10000;
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
padding: 16px;
|
|
33
|
-
background: rgba(22, 21, 24, 0.55);
|
|
34
|
-
`,mn=r.div`
|
|
35
|
-
width: 560px;
|
|
36
|
-
max-width: 100%;
|
|
37
|
-
max-height: 92vh;
|
|
38
|
-
overflow-y: auto;
|
|
39
|
-
background: ${i.colors.white};
|
|
40
|
-
border-radius: 16px;
|
|
41
|
-
padding: 12px 16px 16px;
|
|
42
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
gap: 24px;
|
|
46
|
-
`,gn=r.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
justify-content: space-between;
|
|
50
|
-
gap: 8px;
|
|
51
|
-
padding-bottom: 16px;
|
|
52
|
-
border-bottom: 1px solid ${i.colors.gray4};
|
|
53
|
-
`,bn=r.h2`
|
|
54
|
-
margin: 0;
|
|
55
|
-
font-family: ${i.font.sans};
|
|
56
|
-
font-weight: 600;
|
|
57
|
-
font-size: 20px;
|
|
58
|
-
line-height: 1.6;
|
|
59
|
-
color: ${i.colors.text};
|
|
60
|
-
`,yn=r.button`
|
|
61
|
-
flex: none;
|
|
62
|
-
display: grid;
|
|
63
|
-
place-items: center;
|
|
64
|
-
width: 24px;
|
|
65
|
-
height: 24px;
|
|
66
|
-
border: 0;
|
|
67
|
-
background: none;
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
color: ${i.colors.text};
|
|
70
|
-
|
|
71
|
-
.ico {
|
|
72
|
-
width: 18px;
|
|
73
|
-
height: 18px;
|
|
74
|
-
}
|
|
75
|
-
&:disabled {
|
|
76
|
-
opacity: 0.4;
|
|
77
|
-
cursor: default;
|
|
78
|
-
}
|
|
79
|
-
&:focus-visible {
|
|
80
|
-
outline: 2px solid ${i.colors.accent};
|
|
81
|
-
outline-offset: 2px;
|
|
82
|
-
}
|
|
83
|
-
`,md=r.p`
|
|
84
|
-
margin: 0;
|
|
85
|
-
font-family: ${i.font.sans};
|
|
86
|
-
font-size: 14px;
|
|
87
|
-
line-height: 1.57;
|
|
88
|
-
color: ${i.colors.text};
|
|
89
|
-
text-align: left;
|
|
90
|
-
`,gd=r.div`
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
gap: 12px;
|
|
94
|
-
`,bd=r.div`
|
|
95
|
-
flex: none;
|
|
96
|
-
display: grid;
|
|
97
|
-
place-items: center;
|
|
98
|
-
width: 180px;
|
|
99
|
-
height: 180px;
|
|
100
|
-
border-radius: 16px;
|
|
101
|
-
background: ${i.colors.media};
|
|
102
|
-
border: 1px solid ${i.colors.gray4};
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
|
|
105
|
-
img {
|
|
106
|
-
width: 150px;
|
|
107
|
-
height: 150px;
|
|
108
|
-
object-fit: contain;
|
|
109
|
-
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
${i.media.maxWidth("mobile")} {
|
|
113
|
-
width: 120px;
|
|
114
|
-
height: 120px;
|
|
115
|
-
|
|
116
|
-
img {
|
|
117
|
-
width: 100px;
|
|
118
|
-
height: 100px;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
`,yd=r.div`
|
|
122
|
-
flex: 1 1 0;
|
|
123
|
-
min-width: 0;
|
|
124
|
-
display: flex;
|
|
125
|
-
flex-direction: column;
|
|
126
|
-
gap: 4px;
|
|
127
|
-
padding: 8px;
|
|
128
|
-
`,wd=r.p`
|
|
129
|
-
margin: 0;
|
|
130
|
-
font-family: ${i.font.sans};
|
|
131
|
-
font-weight: 600;
|
|
132
|
-
font-size: 20px;
|
|
133
|
-
line-height: 1.57;
|
|
134
|
-
color: ${i.colors.text};
|
|
135
|
-
`,vd=r.p`
|
|
136
|
-
margin: 0;
|
|
137
|
-
font-family: ${i.font.sans};
|
|
138
|
-
font-size: 10px;
|
|
139
|
-
line-height: 1.43;
|
|
140
|
-
color: ${i.colors.muted};
|
|
141
|
-
`,jd=r.div`
|
|
142
|
-
display: flex;
|
|
143
|
-
gap: 12px;
|
|
144
|
-
|
|
145
|
-
${i.media.maxWidth("mobile")} {
|
|
146
|
-
flex-direction: column;
|
|
147
|
-
}
|
|
148
|
-
`,Vi=r.label`
|
|
149
|
-
flex: 1 1 0;
|
|
150
|
-
min-width: 0;
|
|
151
|
-
display: flex;
|
|
152
|
-
flex-direction: column;
|
|
153
|
-
gap: 4px;
|
|
154
|
-
`,Gi=r.span`
|
|
155
|
-
font-family: ${i.font.sans};
|
|
156
|
-
font-size: 12px;
|
|
157
|
-
color: ${i.colors.muted};
|
|
158
|
-
`,kd=r.div`
|
|
159
|
-
display: flex;
|
|
160
|
-
align-items: center;
|
|
161
|
-
justify-content: space-between;
|
|
162
|
-
gap: 4px;
|
|
163
|
-
height: 42px;
|
|
164
|
-
padding: 0 8px;
|
|
165
|
-
border: 0.5px solid ${i.colors.text};
|
|
166
|
-
border-radius: 8px;
|
|
167
|
-
background: ${i.colors.white};
|
|
168
|
-
|
|
169
|
-
&:focus-within {
|
|
170
|
-
border-color: ${i.colors.magenta};
|
|
171
|
-
}
|
|
172
|
-
&[aria-invalid='true'] {
|
|
173
|
-
border-color: ${i.colors.err};
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.ccy {
|
|
177
|
-
flex: none;
|
|
178
|
-
width: 22px;
|
|
179
|
-
height: 22px;
|
|
180
|
-
color: ${i.colors.rarity};
|
|
181
|
-
}
|
|
182
|
-
.cal {
|
|
183
|
-
flex: none;
|
|
184
|
-
width: 18px;
|
|
185
|
-
height: 18px;
|
|
186
|
-
color: ${i.colors.text};
|
|
187
|
-
}
|
|
188
|
-
`,$d=r.input`
|
|
189
|
-
flex: 1 1 auto;
|
|
190
|
-
min-width: 0;
|
|
191
|
-
border: 0;
|
|
192
|
-
outline: none;
|
|
193
|
-
background: transparent;
|
|
194
|
-
font-family: ${i.font.sans};
|
|
195
|
-
font-size: 13px;
|
|
196
|
-
color: ${i.colors.text};
|
|
197
|
-
|
|
198
|
-
&::placeholder {
|
|
199
|
-
color: ${i.colors.muted2};
|
|
200
|
-
}
|
|
201
|
-
/* Strip the number spinners — the glyph + USD hint carry the affordance. */
|
|
202
|
-
&::-webkit-outer-spin-button,
|
|
203
|
-
&::-webkit-inner-spin-button {
|
|
204
|
-
-webkit-appearance: none;
|
|
205
|
-
margin: 0;
|
|
206
|
-
}
|
|
207
|
-
&[type='number'] {
|
|
208
|
-
-moz-appearance: textfield;
|
|
209
|
-
appearance: textfield;
|
|
210
|
-
}
|
|
211
|
-
`,Cd=r.span`
|
|
212
|
-
flex: none;
|
|
213
|
-
font-family: ${i.font.sans};
|
|
214
|
-
font-size: 10px;
|
|
215
|
-
color: ${i.colors.muted2};
|
|
216
|
-
`,Id=r.div`
|
|
217
|
-
.react-datepicker-wrapper {
|
|
218
|
-
display: block;
|
|
219
|
-
width: 100%;
|
|
220
|
-
}
|
|
221
|
-
.react-datepicker__input-container {
|
|
222
|
-
display: flex;
|
|
223
|
-
align-items: center;
|
|
224
|
-
}
|
|
225
|
-
.react-datepicker__input-container input {
|
|
226
|
-
width: 100%;
|
|
227
|
-
height: 42px;
|
|
228
|
-
padding: 0 8px;
|
|
229
|
-
border: 0.5px solid ${i.colors.text};
|
|
230
|
-
border-radius: 8px;
|
|
231
|
-
background: ${i.colors.white};
|
|
232
|
-
font-family: ${i.font.sans};
|
|
233
|
-
font-size: 13px;
|
|
234
|
-
color: ${i.colors.text};
|
|
235
|
-
outline: none;
|
|
236
|
-
}
|
|
237
|
-
.react-datepicker__input-container input:focus {
|
|
238
|
-
border-color: ${i.colors.magenta};
|
|
239
|
-
}
|
|
240
|
-
&[data-invalid='true'] .react-datepicker__input-container input {
|
|
241
|
-
border-color: ${i.colors.err};
|
|
242
|
-
}
|
|
243
|
-
/* The showIcon calendar glyph inside the field. */
|
|
244
|
-
.react-datepicker__calendar-icon {
|
|
245
|
-
fill: ${i.colors.text};
|
|
246
|
-
opacity: 0.85;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
${To}
|
|
250
|
-
`,Sd=r.button`
|
|
251
|
-
width: 100%;
|
|
252
|
-
height: 48px;
|
|
253
|
-
border: 0;
|
|
254
|
-
border-radius: 16px;
|
|
255
|
-
cursor: pointer;
|
|
256
|
-
background: ${i.colors.accent};
|
|
257
|
-
color: ${i.colors.white};
|
|
258
|
-
font-family: ${i.font.sans};
|
|
259
|
-
font-weight: 600;
|
|
260
|
-
font-size: 15px;
|
|
261
|
-
line-height: 24px;
|
|
262
|
-
letter-spacing: 0.46px;
|
|
263
|
-
text-transform: uppercase;
|
|
264
|
-
|
|
265
|
-
&:hover:not(:disabled) {
|
|
266
|
-
background: ${i.colors.accentHover};
|
|
267
|
-
}
|
|
268
|
-
&:focus-visible {
|
|
269
|
-
outline: 2px solid ${i.colors.accent};
|
|
270
|
-
outline-offset: 2px;
|
|
271
|
-
}
|
|
272
|
-
&:disabled {
|
|
273
|
-
cursor: not-allowed;
|
|
274
|
-
background: rgba(105, 31, 169, 0.2);
|
|
275
|
-
color: ${i.colors.white};
|
|
276
|
-
}
|
|
277
|
-
`;r.p`
|
|
278
|
-
margin: 0;
|
|
279
|
-
font-family: ${i.font.sans};
|
|
280
|
-
font-size: 13px;
|
|
281
|
-
color: ${i.colors.muted};
|
|
282
|
-
text-align: center;
|
|
283
|
-
`;const Ad=r.p`
|
|
284
|
-
margin: 0;
|
|
285
|
-
font-family: ${i.font.sans};
|
|
286
|
-
font-size: 12px;
|
|
287
|
-
line-height: 1.5;
|
|
288
|
-
color: ${i.colors.muted};
|
|
289
|
-
`,Md=r.div`
|
|
290
|
-
display: flex;
|
|
291
|
-
flex-direction: column;
|
|
292
|
-
align-items: center;
|
|
293
|
-
gap: 16px;
|
|
294
|
-
padding: 24px 16px;
|
|
295
|
-
border-radius: 16px;
|
|
296
|
-
background: rgba(193, 238, 207, 0.5);
|
|
297
|
-
text-align: center;
|
|
298
|
-
`,Rd=r.div`
|
|
299
|
-
display: grid;
|
|
300
|
-
place-items: center;
|
|
301
|
-
width: 64px;
|
|
302
|
-
height: 64px;
|
|
303
|
-
border-radius: 50%;
|
|
304
|
-
background: ${i.colors.ok};
|
|
305
|
-
color: ${i.colors.white};
|
|
306
|
-
|
|
307
|
-
.ico {
|
|
308
|
-
width: 34px;
|
|
309
|
-
height: 34px;
|
|
310
|
-
}
|
|
311
|
-
`,Ld=r.p`
|
|
312
|
-
margin: 0;
|
|
313
|
-
font-family: ${i.font.sans};
|
|
314
|
-
font-size: 20px;
|
|
315
|
-
line-height: 1.334;
|
|
316
|
-
color: ${i.colors.text2};
|
|
317
|
-
|
|
318
|
-
b {
|
|
319
|
-
font-weight: 700;
|
|
320
|
-
}
|
|
321
|
-
`,Pd=r.div`
|
|
322
|
-
display: flex;
|
|
323
|
-
gap: 12px;
|
|
324
|
-
|
|
325
|
-
${i.media.maxWidth("mobile")} {
|
|
326
|
-
flex-direction: column-reverse;
|
|
327
|
-
}
|
|
328
|
-
`,Ed=r.button`
|
|
329
|
-
flex: 1 1 0;
|
|
330
|
-
height: 48px;
|
|
331
|
-
border: 2px solid ${i.colors.accent};
|
|
332
|
-
border-radius: 12px;
|
|
333
|
-
background: transparent;
|
|
334
|
-
color: ${i.colors.accent};
|
|
335
|
-
cursor: pointer;
|
|
336
|
-
font-family: ${i.font.sans};
|
|
337
|
-
font-weight: 600;
|
|
338
|
-
font-size: 13px;
|
|
339
|
-
line-height: 24px;
|
|
340
|
-
letter-spacing: 0.46px;
|
|
341
|
-
text-transform: uppercase;
|
|
342
|
-
|
|
343
|
-
&:hover {
|
|
344
|
-
background: rgba(105, 31, 169, 0.06);
|
|
345
|
-
}
|
|
346
|
-
&:focus-visible {
|
|
347
|
-
outline: 2px solid ${i.colors.accent};
|
|
348
|
-
outline-offset: 2px;
|
|
349
|
-
}
|
|
350
|
-
`,Fd=r.button`
|
|
351
|
-
flex: 1 1 0;
|
|
352
|
-
height: 48px;
|
|
353
|
-
border: 0;
|
|
354
|
-
border-radius: 12px;
|
|
355
|
-
background: ${i.colors.accent};
|
|
356
|
-
color: ${i.colors.softWhite};
|
|
357
|
-
cursor: pointer;
|
|
358
|
-
font-family: ${i.font.sans};
|
|
359
|
-
font-weight: 600;
|
|
360
|
-
font-size: 13px;
|
|
361
|
-
line-height: 24px;
|
|
362
|
-
letter-spacing: 0.46px;
|
|
363
|
-
text-transform: uppercase;
|
|
364
|
-
|
|
365
|
-
&:hover {
|
|
366
|
-
background: ${i.colors.accentHover};
|
|
367
|
-
}
|
|
368
|
-
&:focus-visible {
|
|
369
|
-
outline: 2px solid ${i.colors.accent};
|
|
370
|
-
outline-offset: 2px;
|
|
371
|
-
}
|
|
372
|
-
`,Td=30;function Yi(t){const s=new Date;return s.setHours(0,0,0,0),s.setDate(s.getDate()+t),s}function zd({asset:t,session:s,creator:l,edit:o,onListed:d,onClose:u}){const x=ot(),f=st(),m=ud(),{data:$}=se({queryKey:["collection-meta",t.contractAddress],enabled:!l&&!!t.contractAddress,staleTime:5*6e4,queryFn:()=>Qr(t.contractAddress)}),h=l||($==null?void 0:$.creator),{data:g}=Jt(h),y=h?g!=null&&g.name?Xt(g.name):Wn(h):null,[k,I]=c.useState(o!=null&&o.currentCredits?String(o.currentCredits):"10"),[C,S]=c.useState(()=>Yi(Td)),[q,M]=c.useState(null),[w,U]=c.useState(!1),[a,K]=c.useState(null),[J,A]=c.useState("form"),T=c.useRef({}),{cancelDone:X,slow:V,cancelFailed:oe,setCancelFailed:ce,cancelCurrent:ie,signal:O}=ma(o,M),N=Zt(s),D=Number(k),v=Number.isInteger(D)&&D>0,re=!!o&&!X&&D===o.currentCredits,R=C?C.getTime():NaN,z=!!C&&R>Date.now(),B=Yi(1),H=v?`$${it(D).toFixed(2)}`:"$0";async function ae(G={}){if(M(null),!v){M(n("sellModal.errorWholeNumber"));return}if(!z){M(n("sellModal.invalidDate"));return}if(!N){U(!0);try{const te=_i(t.contractAddress,t.chainId),fe=await oa(te,s.address);if(U(!1),!fe){T.current=G,A("authorize");return}}catch{U(!1)}}await ve(G)}async function ve(G={}){var te,fe;if(M(null),!v){M(n("sellModal.errorWholeNumber"));return}if(!z){M(n("sellModal.invalidDate"));return}U(!0);try{if(!await ie(G.payGas))return;await jl({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId});const je=await kl({signer:s.signer,nft:{contractAddress:t.contractAddress,tokenId:t.tokenId,network:t.network,chainId:t.chainId},usdPrice:it(D),expiresAtMs:R}),ke=await(o?pa(je,s.identity,{signal:O()}):Ur(je,s.identity));(te=O())==null||te.throwIfAborted(),K(D),Z("Shop Listed Item",{item_id:t.itemId??t.tokenId??null,contract_address:t.contractAddress,price_credits:D,price_usd:it(D),listing_type:"secondary",is_primary:!1}),Mt.success(n(o?"listingEdit.toastUpdated":"sellModal.toastOnSale",{name:t.name})),x.invalidateQueries({queryKey:["my-assets",s.address]}),d==null||d(D,ke.id)}catch(je){if((fe=O())!=null&&fe.aborted)return;pe(je,{flow:"list_secondary"}),Z("Shop Listing Failed",{listing_type:"secondary",error_code:Se(je)}),M(Ue(je,n(o?"listingEdit.listFailedAfterCancel":"sellModal.errorGeneric")))}finally{U(!1)}}function ee(){u(),f("/my-items")}return a!==null?e.jsx(fn,{onClick:u,role:"presentation",children:e.jsxs(mn,{onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(o?"listingEdit.successHeader":"sellModal.successHeader"),children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n(o?"listingEdit.successHeader":"sellModal.successHeader")}),e.jsx(yn,{onClick:u,"aria-label":n("getCredits.done"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(Md,{children:[e.jsx(Rd,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsxs(Ld,{children:[e.jsx("b",{children:n(o?"listingEdit.successBody":"sellModal.successOnSale")})," ",n("sellModal.successManage")]})]}),e.jsxs(Pd,{children:[e.jsx(Ed,{onClick:ee,children:n("sellModal.myItems")}),e.jsx(Fd,{onClick:u,children:n("getCredits.done")})]})]})}):J==="authorize"?e.jsx(ea,{auth:_i(t.contractAddress,t.chainId),signer:s.signer,title:n("authorizeStep.sellTitle"),name:t.name,image:t.image,icon:e.jsx(L,{name:"pen",className:"ico"}),reason:n("authorizeStep.sellReason",{name:t.name}),onAuthorized:()=>{A("form"),ve(T.current)},onCancel:()=>A("form"),onClose:u}):o&&w?e.jsx(fn,{role:"presentation",children:e.jsxs(mn,{onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n("listingEdit.title")}),e.jsx(yn,{disabled:!0,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(ga,{phase:X?"list":"cancel",managed:N,slow:V})]})}):e.jsx(fn,{onClick:w?void 0:u,role:"presentation",children:e.jsxs(mn,{"data-testid":"modal",onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(o?"listingEdit.title":"sellModal.sellProduct"),children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n(o?"listingEdit.title":"sellModal.sellProduct")}),e.jsx(yn,{onClick:u,disabled:w,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(md,{children:n(o?"listingEdit.subtitle":"sellModal.subtitle")}),e.jsxs(gd,{children:[e.jsx(bd,{children:t.image?e.jsx("img",{src:t.image,alt:""}):null}),e.jsxs(yd,{children:[e.jsx(wd,{children:t.name}),y?e.jsx(vd,{children:n("sellModal.byCreator",{name:y})}):null]})]}),e.jsxs(jd,{children:[e.jsxs(Vi,{children:[e.jsx(Gi,{children:n("sellModal.priceShort")}),e.jsxs(kd,{"aria-invalid":k.length>0&&!v,children:[e.jsx(Re,{className:"ccy"}),e.jsx($d,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:k,onChange:G=>I(G.target.value),disabled:w,"aria-label":n("sellModal.priceLabel",{currency:"credits"})}),e.jsx(Cd,{"aria-hidden":!0,children:H})]})]}),e.jsxs(Vi,{children:[e.jsx(Gi,{children:n("sellModal.expirationLabel")}),e.jsx(Id,{"data-invalid":!!C&&!z,children:e.jsx(zo,{selected:C,onChange:S,minDate:B,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:w,showIcon:!0,showPopperArrow:!1,todayButton:n("sellModal.today"),ariaLabelledBy:void 0,"aria-label":n("sellModal.expirationLabel")})})]})]}),m&&v?e.jsx(Ad,{children:n("sellModal.proceedsCredits",{count:D})}):null,oe?e.jsx(qn,{state:oe,canPayGas:!!(o!=null&&o.canPayGas),busy:w,onPayGas:()=>void ae({payGas:!0}),onLater:()=>ce(null)}):null,e.jsx(Qe,{message:q}),e.jsx(Sd,{onClick:()=>void ae(),disabled:w||re||oe==="pending"||!v||!z,"data-testid":"list-submit",children:o?n(X?"sellModal.putUpForSale":"listingEdit.submit"):w?N?n("sellModal.puttingOnSale"):n("sellModal.confirmListing"):n("sellModal.putUpForSale")})]})})}const Nd=r.div`
|
|
373
|
-
position: fixed;
|
|
374
|
-
inset: 0;
|
|
375
|
-
z-index: 10000;
|
|
376
|
-
display: flex;
|
|
377
|
-
align-items: center;
|
|
378
|
-
justify-content: center;
|
|
379
|
-
padding: 16px;
|
|
380
|
-
background: rgba(22, 21, 24, 0.55);
|
|
381
|
-
`,Bd=r.div`
|
|
382
|
-
width: 560px;
|
|
383
|
-
max-width: 100%;
|
|
384
|
-
max-height: 92vh;
|
|
385
|
-
overflow-y: auto;
|
|
386
|
-
background: ${i.colors.white};
|
|
387
|
-
border-radius: 16px;
|
|
388
|
-
padding: 12px 16px 16px;
|
|
389
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
390
|
-
display: flex;
|
|
391
|
-
flex-direction: column;
|
|
392
|
-
gap: 24px;
|
|
393
|
-
|
|
394
|
-
${i.media.maxWidth("mobile")} {
|
|
395
|
-
padding: 12px 16px 16px;
|
|
396
|
-
}
|
|
397
|
-
`,_d=r.div`
|
|
398
|
-
display: flex;
|
|
399
|
-
flex-direction: column;
|
|
400
|
-
gap: 4px;
|
|
401
|
-
padding-bottom: 16px;
|
|
402
|
-
border-bottom: 1px solid ${i.colors.gray4};
|
|
403
|
-
`,Dd=r.div`
|
|
404
|
-
display: flex;
|
|
405
|
-
align-items: center;
|
|
406
|
-
justify-content: space-between;
|
|
407
|
-
gap: 8px;
|
|
408
|
-
`,Wd=r.h2`
|
|
409
|
-
margin: 0;
|
|
410
|
-
font-family: ${i.font.sans};
|
|
411
|
-
font-weight: 600;
|
|
412
|
-
font-size: 20px;
|
|
413
|
-
line-height: 1.6;
|
|
414
|
-
color: ${i.colors.text};
|
|
415
|
-
`,qd=r.button`
|
|
416
|
-
flex: none;
|
|
417
|
-
display: grid;
|
|
418
|
-
place-items: center;
|
|
419
|
-
width: 24px;
|
|
420
|
-
height: 24px;
|
|
421
|
-
border: 0;
|
|
422
|
-
background: none;
|
|
423
|
-
cursor: pointer;
|
|
424
|
-
color: ${i.colors.text};
|
|
425
|
-
|
|
426
|
-
.ico {
|
|
427
|
-
width: 18px;
|
|
428
|
-
height: 18px;
|
|
429
|
-
}
|
|
430
|
-
&:disabled {
|
|
431
|
-
opacity: 0.4;
|
|
432
|
-
cursor: default;
|
|
433
|
-
}
|
|
434
|
-
&:focus-visible {
|
|
435
|
-
outline: 2px solid ${i.colors.accent};
|
|
436
|
-
outline-offset: 2px;
|
|
437
|
-
}
|
|
438
|
-
`,Od=r.div`
|
|
439
|
-
display: flex;
|
|
440
|
-
align-items: center;
|
|
441
|
-
gap: 12px;
|
|
442
|
-
`,Kd=r.img`
|
|
443
|
-
flex: none;
|
|
444
|
-
width: 72px;
|
|
445
|
-
height: 72px;
|
|
446
|
-
border-radius: 12px;
|
|
447
|
-
object-fit: cover;
|
|
448
|
-
background: ${i.colors.media};
|
|
449
|
-
`,Hd=r.p`
|
|
450
|
-
margin: 0;
|
|
451
|
-
font-family: ${i.font.sans};
|
|
452
|
-
font-weight: 600;
|
|
453
|
-
font-size: 18px;
|
|
454
|
-
line-height: 1.4;
|
|
455
|
-
color: ${i.colors.text};
|
|
456
|
-
`,Ud=r.label`
|
|
457
|
-
display: flex;
|
|
458
|
-
flex-direction: column;
|
|
459
|
-
gap: 6px;
|
|
460
|
-
`,Qd=r.span`
|
|
461
|
-
font-family: ${i.font.sans};
|
|
462
|
-
font-size: 12px;
|
|
463
|
-
color: ${i.colors.muted};
|
|
464
|
-
`,Vd=r.input`
|
|
465
|
-
width: 100%;
|
|
466
|
-
height: 44px;
|
|
467
|
-
padding: 0 12px;
|
|
468
|
-
border: 1px solid ${i.colors.text};
|
|
469
|
-
border-radius: 8px;
|
|
470
|
-
background: ${i.colors.white};
|
|
471
|
-
font-family: ${i.font.sans};
|
|
472
|
-
font-size: 14px;
|
|
473
|
-
color: ${i.colors.text};
|
|
474
|
-
|
|
475
|
-
&::placeholder {
|
|
476
|
-
color: ${i.colors.muted2};
|
|
477
|
-
}
|
|
478
|
-
&:focus-visible {
|
|
479
|
-
outline: none;
|
|
480
|
-
border-color: ${i.colors.magenta};
|
|
481
|
-
}
|
|
482
|
-
&[aria-invalid='true'] {
|
|
483
|
-
border-color: ${i.colors.err};
|
|
484
|
-
}
|
|
485
|
-
&:disabled {
|
|
486
|
-
opacity: 0.6;
|
|
487
|
-
}
|
|
488
|
-
`,Gd=r.p`
|
|
489
|
-
margin: 0;
|
|
490
|
-
padding: 12px 14px;
|
|
491
|
-
border-radius: 10px;
|
|
492
|
-
background: rgba(255, 45, 85, 0.1);
|
|
493
|
-
font-family: ${i.font.sans};
|
|
494
|
-
font-size: 13px;
|
|
495
|
-
line-height: 1.5;
|
|
496
|
-
color: ${i.colors.text2};
|
|
497
|
-
`,Ji=r.div`
|
|
498
|
-
display: flex;
|
|
499
|
-
gap: 12px;
|
|
500
|
-
|
|
501
|
-
${i.media.maxWidth("mobile")} {
|
|
502
|
-
flex-direction: column-reverse;
|
|
503
|
-
}
|
|
504
|
-
`,Yd=r.button`
|
|
505
|
-
flex: 1;
|
|
506
|
-
height: 48px;
|
|
507
|
-
border: 2px solid ${i.colors.blackBtn};
|
|
508
|
-
border-radius: 16px;
|
|
509
|
-
background: transparent;
|
|
510
|
-
color: ${i.colors.text};
|
|
511
|
-
cursor: pointer;
|
|
512
|
-
font-family: ${i.font.sans};
|
|
513
|
-
font-weight: 600;
|
|
514
|
-
font-size: 15px;
|
|
515
|
-
line-height: 24px;
|
|
516
|
-
letter-spacing: 0.46px;
|
|
517
|
-
text-transform: uppercase;
|
|
518
|
-
|
|
519
|
-
&:hover:not(:disabled) {
|
|
520
|
-
background: rgba(36, 33, 41, 0.06);
|
|
521
|
-
}
|
|
522
|
-
&:focus-visible {
|
|
523
|
-
outline: 2px solid ${i.colors.accent};
|
|
524
|
-
outline-offset: 2px;
|
|
525
|
-
}
|
|
526
|
-
&:disabled {
|
|
527
|
-
opacity: 0.5;
|
|
528
|
-
cursor: default;
|
|
529
|
-
}
|
|
530
|
-
`,Xi=r.button`
|
|
531
|
-
flex: 1;
|
|
532
|
-
display: inline-flex;
|
|
533
|
-
align-items: center;
|
|
534
|
-
justify-content: center;
|
|
535
|
-
gap: 8px;
|
|
536
|
-
height: 48px;
|
|
537
|
-
border: 0;
|
|
538
|
-
border-radius: 16px;
|
|
539
|
-
background: ${i.colors.blackBtn};
|
|
540
|
-
color: ${i.colors.softWhite};
|
|
541
|
-
cursor: pointer;
|
|
542
|
-
font-family: ${i.font.sans};
|
|
543
|
-
font-weight: 600;
|
|
544
|
-
font-size: 15px;
|
|
545
|
-
line-height: 24px;
|
|
546
|
-
letter-spacing: 0.46px;
|
|
547
|
-
text-transform: uppercase;
|
|
548
|
-
|
|
549
|
-
&:hover:not(:disabled) {
|
|
550
|
-
filter: brightness(1.35);
|
|
551
|
-
}
|
|
552
|
-
&:focus-visible {
|
|
553
|
-
outline: 2px solid ${i.colors.accent};
|
|
554
|
-
outline-offset: 2px;
|
|
555
|
-
}
|
|
556
|
-
&:disabled {
|
|
557
|
-
opacity: 0.55;
|
|
558
|
-
cursor: default;
|
|
559
|
-
}
|
|
560
|
-
`,Jd=r.div`
|
|
561
|
-
display: flex;
|
|
562
|
-
flex-direction: column;
|
|
563
|
-
align-items: center;
|
|
564
|
-
gap: 16px;
|
|
565
|
-
padding: 24px 16px;
|
|
566
|
-
border-radius: 16px;
|
|
567
|
-
background: rgba(193, 238, 207, 0.5);
|
|
568
|
-
text-align: center;
|
|
569
|
-
`,Xd=r.div`
|
|
570
|
-
display: grid;
|
|
571
|
-
place-items: center;
|
|
572
|
-
width: 64px;
|
|
573
|
-
height: 64px;
|
|
574
|
-
border-radius: 50%;
|
|
575
|
-
background: ${i.colors.ok};
|
|
576
|
-
color: ${i.colors.white};
|
|
577
|
-
|
|
578
|
-
.ico {
|
|
579
|
-
width: 34px;
|
|
580
|
-
height: 34px;
|
|
581
|
-
}
|
|
582
|
-
`,Zd=r.p`
|
|
583
|
-
margin: 0;
|
|
584
|
-
font-family: ${i.font.sans};
|
|
585
|
-
font-size: 16px;
|
|
586
|
-
line-height: 1.34;
|
|
587
|
-
color: ${i.colors.text2};
|
|
588
|
-
|
|
589
|
-
b {
|
|
590
|
-
font-weight: 700;
|
|
591
|
-
}
|
|
592
|
-
`;function ec(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function tc({item:t,session:s,onClose:l,onTransferred:o}){const[d,u]=c.useState(""),[x,f]=c.useState(!1),[m,$]=c.useState(null),[h,g]=c.useState(!1),y=d.trim(),k=ec(y),I=k&&y.toLowerCase()===s.address.toLowerCase(),C=y.length===0?null:k?I?n("transfer.selfAddress"):null:n("transfer.invalidAddress"),S=k&&!I&&!x;async function q(){if(S){$(null),f(!0);try{await Po({contractAddress:t.contractAddress,chainId:t.chainId,tokenId:t.tokenId,to:y,signer:s.signer}),Z("Shop Transferred Item",{contract_address:t.contractAddress,token_id:t.tokenId}),g(!0),Mt.success(n("transfer.toastSuccess",{name:t.name})),o==null||o()}catch(M){mt(M)||pe(M,{flow:"transfer-item",tokenId:t.tokenId}),Z("Shop Transfer Failed",{error_code:Se(M)}),$(mt(M)?n("getCredits.errorCanceled"):Ue(M,n("transfer.errorGeneric")))}finally{f(!1)}}}return e.jsx(Nd,{onClick:x?void 0:l,role:"presentation",children:e.jsxs(Bd,{onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("transfer.title"),children:[e.jsx(_d,{children:e.jsxs(Dd,{children:[e.jsx(Wd,{children:n("transfer.title")}),e.jsx(qd,{onClick:l,disabled:x,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]})}),h?e.jsxs(e.Fragment,{children:[e.jsxs(Jd,{children:[e.jsx(Xd,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(Zd,{children:n("transfer.successBody",{name:t.name})})]}),e.jsx(Ji,{children:e.jsx(Xi,{onClick:l,children:n("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Od,{children:[t.thumbnail?e.jsx(Kd,{src:t.thumbnail,alt:""}):null,e.jsx(Hd,{children:t.name})]}),e.jsxs(Ud,{children:[e.jsx(Qd,{children:n("transfer.addressLabel")}),e.jsx(Vd,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:d,onChange:M=>u(M.target.value),disabled:x,"aria-invalid":!!C,"aria-label":n("transfer.addressLabel")}),C?e.jsx(Qe,{message:C}):null]}),e.jsx(Gd,{children:n("transfer.warning")}),e.jsx(Qe,{message:m}),e.jsxs(Ji,{children:[e.jsx(Yd,{onClick:l,disabled:x,children:n("sellModal.cancel")}),e.jsx(Xi,{onClick:()=>void q(),disabled:!S,children:x?n("transfer.transferring"):n("transfer.transfer")})]})]})]})})}const nc=r(Ol)`
|
|
593
|
-
width: min(500px, 92vw);
|
|
594
|
-
gap: 20px;
|
|
595
|
-
|
|
596
|
-
${i.media.maxWidth("mobile")} {
|
|
597
|
-
[data-actions] {
|
|
598
|
-
flex-direction: column-reverse;
|
|
599
|
-
}
|
|
600
|
-
[data-actions] > * {
|
|
601
|
-
width: 100%;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
`,ic=r(Ve)`
|
|
605
|
-
background: ${i.colors.accent};
|
|
606
|
-
color: ${i.colors.white};
|
|
607
|
-
text-transform: uppercase;
|
|
608
|
-
letter-spacing: 0.046em;
|
|
609
|
-
font-size: 13px;
|
|
610
|
-
|
|
611
|
-
&:hover:not(:disabled) {
|
|
612
|
-
background: ${i.colors.accentHover};
|
|
613
|
-
}
|
|
614
|
-
`;function rc({name:t,managed:s,canPayGas:l,cancel:o,onClose:d}){const[u,x]=c.useState(!1),[f,m]=c.useState(!1),[$,h]=c.useState(null),[g,y]=c.useState(null);async function k(I){h(null),y(null),x(!0);try{const C=await o({payGas:I,onWaiting:S=>m(S>2e4)});C==="ok"?d():y(C==="relay-reverted"?"reverted":"pending")}catch(C){const S=mt(C);S||pe(C,{flow:"remove-listing"});const q=n("myAssets.removeListingError");h(s?q:S?n("getCredits.errorCanceled"):Ue(C,q))}finally{x(!1),m(!1)}}return e.jsx(Kl,{onClick:u?void 0:d,role:"presentation",children:e.jsxs(nc,{onClick:I=>I.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("removeListing.title"),"data-testid":"remove-listing-modal",children:[e.jsx(Hl,{children:e.jsx(Ul,{children:n("removeListing.title")})}),e.jsx("p",{className:"muted",style:{margin:0},children:n("removeListing.body",{name:t})}),u&&f?e.jsx("p",{className:"muted small",style:{margin:0},"data-testid":"cancel-slow",children:n(l?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")}):null,g?e.jsx(qn,{state:g,canPayGas:l,busy:u,onPayGas:()=>void k(!0),testId:"cancel-gasless-failed"}):null,e.jsx(Qe,{message:$}),e.jsxs(Ql,{"data-actions":!0,children:[e.jsx(Ve,{variant:"outline",onClick:d,disabled:u,children:n("sellModal.cancel")}),e.jsx(ic,{onClick:()=>void k(),disabled:u||g==="pending","data-testid":"remove-confirm",children:u?e.jsx(Vl,{size:"small"}):n("itemDetail.manageRemove")})]})]})})}const wn=r.div`
|
|
615
|
-
position: fixed;
|
|
616
|
-
inset: 0;
|
|
617
|
-
z-index: 10000;
|
|
618
|
-
display: flex;
|
|
619
|
-
align-items: center;
|
|
620
|
-
justify-content: center;
|
|
621
|
-
padding: 16px;
|
|
622
|
-
background: rgba(22, 21, 24, 0.55);
|
|
623
|
-
`,vn=r.div`
|
|
624
|
-
width: 560px;
|
|
625
|
-
max-width: 100%;
|
|
626
|
-
max-height: 92vh;
|
|
627
|
-
overflow-y: auto;
|
|
628
|
-
background: ${i.colors.white};
|
|
629
|
-
border-radius: 16px;
|
|
630
|
-
padding: 12px 16px 16px;
|
|
631
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
632
|
-
display: flex;
|
|
633
|
-
flex-direction: column;
|
|
634
|
-
gap: 24px;
|
|
635
|
-
`,jn=r.div`
|
|
636
|
-
display: flex;
|
|
637
|
-
align-items: center;
|
|
638
|
-
justify-content: space-between;
|
|
639
|
-
gap: 8px;
|
|
640
|
-
padding-bottom: 16px;
|
|
641
|
-
border-bottom: 1px solid ${i.colors.gray4};
|
|
642
|
-
`,kn=r.h2`
|
|
643
|
-
margin: 0;
|
|
644
|
-
font-family: ${i.font.sans};
|
|
645
|
-
font-weight: 600;
|
|
646
|
-
font-size: 20px;
|
|
647
|
-
line-height: 1.6;
|
|
648
|
-
color: ${i.colors.text};
|
|
649
|
-
`,$n=r.button`
|
|
650
|
-
flex: none;
|
|
651
|
-
display: grid;
|
|
652
|
-
place-items: center;
|
|
653
|
-
width: 24px;
|
|
654
|
-
height: 24px;
|
|
655
|
-
border: 0;
|
|
656
|
-
background: none;
|
|
657
|
-
cursor: pointer;
|
|
658
|
-
color: ${i.colors.text};
|
|
659
|
-
|
|
660
|
-
.ico {
|
|
661
|
-
width: 18px;
|
|
662
|
-
height: 18px;
|
|
663
|
-
}
|
|
664
|
-
&:disabled {
|
|
665
|
-
opacity: 0.4;
|
|
666
|
-
cursor: default;
|
|
667
|
-
}
|
|
668
|
-
&:focus-visible {
|
|
669
|
-
outline: 2px solid ${i.colors.accent};
|
|
670
|
-
outline-offset: 2px;
|
|
671
|
-
}
|
|
672
|
-
`,ac=r.p`
|
|
673
|
-
margin: 0;
|
|
674
|
-
font-family: ${i.font.sans};
|
|
675
|
-
font-size: 14px;
|
|
676
|
-
line-height: 1.57;
|
|
677
|
-
color: ${i.colors.text};
|
|
678
|
-
text-align: left;
|
|
679
|
-
`,sc=r.div`
|
|
680
|
-
display: flex;
|
|
681
|
-
align-items: center;
|
|
682
|
-
gap: 12px;
|
|
683
|
-
`,oc=r.div`
|
|
684
|
-
flex: none;
|
|
685
|
-
display: grid;
|
|
686
|
-
place-items: center;
|
|
687
|
-
width: 180px;
|
|
688
|
-
height: 180px;
|
|
689
|
-
border-radius: 16px;
|
|
690
|
-
background: ${i.colors.media};
|
|
691
|
-
border: 1px solid ${i.colors.gray4};
|
|
692
|
-
overflow: hidden;
|
|
693
|
-
|
|
694
|
-
img {
|
|
695
|
-
width: 150px;
|
|
696
|
-
height: 150px;
|
|
697
|
-
object-fit: contain;
|
|
698
|
-
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
${i.media.maxWidth("mobile")} {
|
|
702
|
-
width: 120px;
|
|
703
|
-
height: 120px;
|
|
704
|
-
|
|
705
|
-
img {
|
|
706
|
-
width: 100px;
|
|
707
|
-
height: 100px;
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
`,lc=r.div`
|
|
711
|
-
flex: 1 1 0;
|
|
712
|
-
min-width: 0;
|
|
713
|
-
display: flex;
|
|
714
|
-
flex-direction: column;
|
|
715
|
-
gap: 4px;
|
|
716
|
-
padding: 8px;
|
|
717
|
-
`,dc=r.p`
|
|
718
|
-
margin: 0;
|
|
719
|
-
font-family: ${i.font.sans};
|
|
720
|
-
font-weight: 600;
|
|
721
|
-
font-size: 20px;
|
|
722
|
-
line-height: 1.57;
|
|
723
|
-
color: ${i.colors.text};
|
|
724
|
-
`,cc=r.p`
|
|
725
|
-
margin: 0;
|
|
726
|
-
font-family: ${i.font.sans};
|
|
727
|
-
font-size: 10px;
|
|
728
|
-
line-height: 1.43;
|
|
729
|
-
color: ${i.colors.muted};
|
|
730
|
-
`,uc=r.label`
|
|
731
|
-
display: flex;
|
|
732
|
-
flex-direction: column;
|
|
733
|
-
gap: 4px;
|
|
734
|
-
`,pc=r.span`
|
|
735
|
-
font-family: ${i.font.sans};
|
|
736
|
-
font-size: 12px;
|
|
737
|
-
color: ${i.colors.muted};
|
|
738
|
-
`,hc=r.div`
|
|
739
|
-
display: flex;
|
|
740
|
-
align-items: center;
|
|
741
|
-
justify-content: space-between;
|
|
742
|
-
gap: 4px;
|
|
743
|
-
height: 42px;
|
|
744
|
-
padding: 0 8px;
|
|
745
|
-
border: 0.5px solid ${i.colors.text};
|
|
746
|
-
border-radius: 8px;
|
|
747
|
-
background: ${i.colors.white};
|
|
748
|
-
|
|
749
|
-
&:focus-within {
|
|
750
|
-
border-color: ${i.colors.magenta};
|
|
751
|
-
}
|
|
752
|
-
&[aria-invalid='true'] {
|
|
753
|
-
border-color: ${i.colors.err};
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
.ccy {
|
|
757
|
-
flex: none;
|
|
758
|
-
width: 22px;
|
|
759
|
-
height: 22px;
|
|
760
|
-
color: ${i.colors.rarity};
|
|
761
|
-
}
|
|
762
|
-
`,xc=r.input`
|
|
763
|
-
flex: 1 1 auto;
|
|
764
|
-
min-width: 0;
|
|
765
|
-
border: 0;
|
|
766
|
-
outline: none;
|
|
767
|
-
background: transparent;
|
|
768
|
-
font-family: ${i.font.sans};
|
|
769
|
-
font-size: 13px;
|
|
770
|
-
color: ${i.colors.text};
|
|
771
|
-
|
|
772
|
-
&::placeholder {
|
|
773
|
-
color: ${i.colors.muted2};
|
|
774
|
-
}
|
|
775
|
-
/* Strip the number spinners — the glyph + USD hint carry the affordance. */
|
|
776
|
-
&::-webkit-outer-spin-button,
|
|
777
|
-
&::-webkit-inner-spin-button {
|
|
778
|
-
-webkit-appearance: none;
|
|
779
|
-
margin: 0;
|
|
780
|
-
}
|
|
781
|
-
&[type='number'] {
|
|
782
|
-
-moz-appearance: textfield;
|
|
783
|
-
appearance: textfield;
|
|
784
|
-
}
|
|
785
|
-
`,fc=r.span`
|
|
786
|
-
flex: none;
|
|
787
|
-
font-family: ${i.font.sans};
|
|
788
|
-
font-size: 10px;
|
|
789
|
-
color: ${i.colors.muted2};
|
|
790
|
-
`,Ht=r.p`
|
|
791
|
-
margin: 0;
|
|
792
|
-
font-family: ${i.font.sans};
|
|
793
|
-
font-size: 12px;
|
|
794
|
-
line-height: 1.5;
|
|
795
|
-
color: ${i.colors.muted};
|
|
796
|
-
`,mc=r.button`
|
|
797
|
-
width: 100%;
|
|
798
|
-
height: 48px;
|
|
799
|
-
border: 0;
|
|
800
|
-
border-radius: 16px;
|
|
801
|
-
cursor: pointer;
|
|
802
|
-
background: ${i.colors.accent};
|
|
803
|
-
color: ${i.colors.white};
|
|
804
|
-
font-family: ${i.font.sans};
|
|
805
|
-
font-weight: 600;
|
|
806
|
-
font-size: 15px;
|
|
807
|
-
line-height: 24px;
|
|
808
|
-
letter-spacing: 0.46px;
|
|
809
|
-
text-transform: uppercase;
|
|
810
|
-
|
|
811
|
-
&:hover:not(:disabled) {
|
|
812
|
-
background: ${i.colors.accentHover};
|
|
813
|
-
}
|
|
814
|
-
&:focus-visible {
|
|
815
|
-
outline: 2px solid ${i.colors.accent};
|
|
816
|
-
outline-offset: 2px;
|
|
817
|
-
}
|
|
818
|
-
&:disabled {
|
|
819
|
-
cursor: not-allowed;
|
|
820
|
-
background: rgba(105, 31, 169, 0.2);
|
|
821
|
-
color: ${i.colors.white};
|
|
822
|
-
}
|
|
823
|
-
`,gc=r.p`
|
|
824
|
-
margin: 0;
|
|
825
|
-
font-family: ${i.font.sans};
|
|
826
|
-
font-size: 13px;
|
|
827
|
-
color: ${i.colors.muted};
|
|
828
|
-
text-align: center;
|
|
829
|
-
`,bc=r.div`
|
|
830
|
-
display: flex;
|
|
831
|
-
flex-direction: column;
|
|
832
|
-
align-items: center;
|
|
833
|
-
gap: 16px;
|
|
834
|
-
padding: 24px 16px;
|
|
835
|
-
border-radius: 16px;
|
|
836
|
-
background: rgba(193, 238, 207, 0.5);
|
|
837
|
-
text-align: center;
|
|
838
|
-
`,yc=r.div`
|
|
839
|
-
display: grid;
|
|
840
|
-
place-items: center;
|
|
841
|
-
width: 64px;
|
|
842
|
-
height: 64px;
|
|
843
|
-
border-radius: 50%;
|
|
844
|
-
background: ${i.colors.ok};
|
|
845
|
-
color: ${i.colors.white};
|
|
846
|
-
|
|
847
|
-
.ico {
|
|
848
|
-
width: 34px;
|
|
849
|
-
height: 34px;
|
|
850
|
-
}
|
|
851
|
-
`,wc=r.p`
|
|
852
|
-
margin: 0;
|
|
853
|
-
font-family: ${i.font.sans};
|
|
854
|
-
font-size: 20px;
|
|
855
|
-
line-height: 1.334;
|
|
856
|
-
color: ${i.colors.text2};
|
|
857
|
-
|
|
858
|
-
b {
|
|
859
|
-
font-weight: 700;
|
|
860
|
-
}
|
|
861
|
-
`,vc=r.p`
|
|
862
|
-
margin: 0;
|
|
863
|
-
display: inline-flex;
|
|
864
|
-
align-items: center;
|
|
865
|
-
gap: 4px;
|
|
866
|
-
font-family: ${i.font.sans};
|
|
867
|
-
font-size: 14px;
|
|
868
|
-
line-height: 1.43;
|
|
869
|
-
color: ${i.colors.text2};
|
|
870
|
-
|
|
871
|
-
strong {
|
|
872
|
-
display: inline-flex;
|
|
873
|
-
align-items: center;
|
|
874
|
-
gap: 4px;
|
|
875
|
-
font-weight: 700;
|
|
876
|
-
}
|
|
877
|
-
.ccy-mark {
|
|
878
|
-
width: 18px;
|
|
879
|
-
height: 18px;
|
|
880
|
-
color: ${i.colors.rarity};
|
|
881
|
-
}
|
|
882
|
-
`,jc=r.div`
|
|
883
|
-
display: flex;
|
|
884
|
-
gap: 12px;
|
|
885
|
-
|
|
886
|
-
${i.media.maxWidth("mobile")} {
|
|
887
|
-
flex-direction: column-reverse;
|
|
888
|
-
}
|
|
889
|
-
`,kc=r.button`
|
|
890
|
-
flex: 1 1 0;
|
|
891
|
-
height: 48px;
|
|
892
|
-
border: 2px solid ${i.colors.accent};
|
|
893
|
-
border-radius: 12px;
|
|
894
|
-
background: transparent;
|
|
895
|
-
color: ${i.colors.accent};
|
|
896
|
-
cursor: pointer;
|
|
897
|
-
font-family: ${i.font.sans};
|
|
898
|
-
font-weight: 600;
|
|
899
|
-
font-size: 13px;
|
|
900
|
-
line-height: 24px;
|
|
901
|
-
letter-spacing: 0.46px;
|
|
902
|
-
text-transform: uppercase;
|
|
903
|
-
|
|
904
|
-
&:hover {
|
|
905
|
-
background: rgba(105, 31, 169, 0.06);
|
|
906
|
-
}
|
|
907
|
-
&:focus-visible {
|
|
908
|
-
outline: 2px solid ${i.colors.accent};
|
|
909
|
-
outline-offset: 2px;
|
|
910
|
-
}
|
|
911
|
-
`,$c=r.button`
|
|
912
|
-
flex: 1 1 0;
|
|
913
|
-
height: 48px;
|
|
914
|
-
border: 0;
|
|
915
|
-
border-radius: 12px;
|
|
916
|
-
background: ${i.colors.accent};
|
|
917
|
-
color: ${i.colors.softWhite};
|
|
918
|
-
cursor: pointer;
|
|
919
|
-
font-family: ${i.font.sans};
|
|
920
|
-
font-weight: 600;
|
|
921
|
-
font-size: 13px;
|
|
922
|
-
line-height: 24px;
|
|
923
|
-
letter-spacing: 0.46px;
|
|
924
|
-
text-transform: uppercase;
|
|
925
|
-
|
|
926
|
-
&:hover {
|
|
927
|
-
background: ${i.colors.accentHover};
|
|
928
|
-
}
|
|
929
|
-
&:focus-visible {
|
|
930
|
-
outline: 2px solid ${i.colors.accent};
|
|
931
|
-
outline-offset: 2px;
|
|
932
|
-
}
|
|
933
|
-
`,Cc=1e3*60*60*24*182;function Ic({item:t,session:s,edit:l,onListed:o,onClose:d}){const u=ot(),x=st(),[f,m]=c.useState(l!=null&&l.currentCredits?String(l.currentCredits):"10"),[$,h]=c.useState(null),[g,y]=c.useState(null),[k,I]=c.useState(!1),[C,S]=c.useState(null),[q,M]=c.useState(null),{cancelDone:w,slow:U,cancelFailed:a,setCancelFailed:K,cancelCurrent:J,signal:A}=ma(l,y),T=rt.chainId,X=Zt(s),{data:V}=Jt(s.address),oe=V!=null&&V.name?Xt(V.name):Wn(s.address),ce=Number(f),ie=Number.isInteger(ce)&&ce>0,O=!!l&&!w&&ce===l.currentCredits,N=ie?`$${it(ce).toFixed(2)}`:"$0";c.useEffect(()=>{let R=!1;return(async()=>{try{const z=await $l({contractAddress:t.contractAddress,chainId:T});R||S(z)}catch{R||S(!1)}})(),()=>{R=!0}},[t.contractAddress,T]);async function D(R={}){var B,H;y(null);const z=Number(f);if(!Number.isInteger(z)||z<=0){y(n("primaryList.errorWholeNumber"));return}I(!0);try{if(!await J(R.payGas))return;C||(h(n("primaryList.statusEnabling")),await Cl({signer:s.signer,contractAddress:t.contractAddress,chainId:T}),S(!0)),h(n("primaryList.statusPublishing"));const ae=await Il({signer:s.signer,item:{contractAddress:t.contractAddress,itemId:t.blockchainItemId,network:Ae.Network.MATIC,chainId:T},usdPrice:it(z),uses:t.remainingSupply,expiresAtMs:Date.now()+Cc});h(n("primaryList.statusFinishing"));const ve=await(l?pa(ae,s.identity,{signal:A()}):Ur(ae,s.identity));(B=A())==null||B.throwIfAborted(),h(null),M(z),Z("Shop Listed Item",{item_id:t.blockchainItemId,contract_address:t.contractAddress,price_credits:z,price_usd:it(z),listing_type:"primary",is_primary:!0}),Mt.success(n(l?"listingEdit.toastUpdated":"primaryList.toastOnSale",{name:t.name})),o==null||o(z,ve.id),u.invalidateQueries({queryKey:["publishable-items"]}),u.invalidateQueries({queryKey:["collection-sale-state"]}),u.invalidateQueries({queryKey:["shop-items"]}),u.invalidateQueries({queryKey:["catalog-items"]}),u.invalidateQueries({queryKey:["overview-listings"]}),u.invalidateQueries({queryKey:["upsell-listings"]})}catch(ae){if((H=A())!=null&&H.aborted)return;pe(ae,{flow:"list_primary"}),Z("Shop Listing Failed",{listing_type:"primary",error_code:Se(ae)}),y(Ue(ae,n(l?"listingEdit.listFailedAfterCancel":"primaryList.errorGeneric"))),h(null)}finally{I(!1)}}function v(){d(),x(fs(t.contractAddress,t.blockchainItemId))}const re=C===null?n("primaryList.checking"):l?n(w?"primaryList.putOnSale":"listingEdit.submit"):k?X?n("primaryList.publishing"):n("primaryList.confirmListing"):C===!1?n("primaryList.enableAndPutOnSale"):n("primaryList.putOnSale");return q!==null?e.jsx(wn,{onClick:d,role:"presentation",children:e.jsxs(vn,{onClick:R=>R.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(l?"listingEdit.successHeader":"primaryList.successTitle"),children:[e.jsxs(jn,{children:[e.jsx(kn,{children:n(l?"listingEdit.successHeader":"primaryList.successTitle")}),e.jsx($n,{onClick:d,"aria-label":n("getCredits.done"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(bc,{children:[e.jsx(yc,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(wc,{children:e.jsx("b",{children:t.name})}),e.jsxs(vc,{children:[n("primaryList.listedFor")," ",e.jsxs("strong",{children:[e.jsx(Re,{className:"ccy-mark"})," ",e.jsx(ge,{credits:q})]})," ",n("primaryList.dotAvailable",{count:t.remainingSupply})]})]}),e.jsxs(jc,{children:[e.jsx(kc,{onClick:d,children:n("getCredits.done")}),e.jsx($c,{onClick:v,children:n("primaryList.viewInShop")})]})]})}):l&&k?e.jsx(wn,{role:"presentation",children:e.jsxs(vn,{onClick:R=>R.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(jn,{children:[e.jsx(kn,{children:n("listingEdit.title")}),e.jsx($n,{disabled:!0,"aria-label":n("primaryList.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(ga,{phase:w?"list":"cancel",managed:X,slow:U})]})}):e.jsx(wn,{onClick:k?void 0:d,role:"presentation",children:e.jsxs(vn,{"data-testid":"modal",onClick:R=>R.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":l?n("listingEdit.title"):n("primaryList.publishTitle",{name:t.name}),children:[e.jsxs(jn,{children:[e.jsx(kn,{children:l?n("listingEdit.title"):n("primaryList.publishTitle",{name:t.name})}),e.jsx($n,{onClick:d,disabled:k,"aria-label":n("primaryList.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsx(ac,{children:n("primaryList.fromCollection",{collectionName:t.collectionName,count:t.remainingSupply})}),e.jsxs(sc,{children:[e.jsx(oc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(lc,{children:[e.jsx(dc,{children:t.name}),oe?e.jsx(cc,{children:n("primaryList.byCreator",{name:oe})}):null]})]}),e.jsxs(uc,{children:[e.jsx(pc,{children:n("primaryList.priceShort")}),e.jsxs(hc,{"aria-invalid":f.length>0&&!ie,children:[e.jsx(Re,{className:"ccy"}),e.jsx(xc,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:f,onChange:R=>m(R.target.value),disabled:k,"aria-label":n("primaryList.priceLabel",{currency:De.name})}),e.jsx(fc,{"aria-hidden":!0,children:N})]})]}),e.jsx(Ht,{children:n("primaryList.pricedInWhole",{currency:De.name,currencySingular:De.nameSingular})}),l?!k&&!w?e.jsx(Ht,{children:n("listingEdit.subtitle")}):null:C===!1&&!k?e.jsx(Ht,{children:X?n("primaryList.firstTimeManaged",{collectionName:t.collectionName}):n("primaryList.firstTimeConfirm",{collectionName:t.collectionName})}):C===!0&&!k?e.jsx(Ht,{children:X?n("primaryList.readyManaged"):n("primaryList.readyConfirm")}):null,a?e.jsx(qn,{state:a,canPayGas:!!(l!=null&&l.canPayGas),busy:k,onPayGas:()=>void D({payGas:!0}),onLater:()=>K(null)}):null,$&&!l?e.jsx(gc,{children:$}):null,e.jsx(Qe,{message:g}),e.jsx(mc,{onClick:()=>void D(),disabled:k||O||a==="pending"||C===null||!ie,"data-testid":"list-submit",children:re})]})})}const ba=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function ya(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function wa(t){return t.reduce((s,l)=>s+Math.max(0,Math.floor(l.amount||0)),0)}function Sc(t,s){const l=t.filter(d=>d.address.trim().length>0||(d.amount||0)>0);if(l.length===0)return!1;for(const d of l)if(!ya(d.address)||!Number.isInteger(d.amount)||d.amount<1)return!1;const o=wa(l);return o>=1&&o<=s}function Ac(t,s){const l=[],o=[];for(const d of t){const u=d.address.trim(),x=Math.max(0,Math.floor(d.amount||0));if(!(!u||x===0))for(let f=0;f<x;f++)l.push(u),o.push(s)}return{beneficiaries:l,itemIds:o}}async function Mc(t){const{contractAddress:s,chainId:l,beneficiaries:o,itemIds:d,signer:u}=t,x={...gs(bs.ERC721CollectionV2,l),address:s},f=new Tl(ba).encodeFunctionData("issueTokens",[o,d]),m=Ml(),$=Rl(u.provider,m),h=await Jl($,m,f,x,{serverURL:la.relayerUrl});return await Ll(h,"the mint"),h}async function Rc(t){const{signer:s,contractAddress:l,chainId:o,entries:d,itemId:u}=t,{beneficiaries:x,itemIds:f}=Ac(d,u);if(x.length===0)throw new Error("No copies to issue");if(la.enabled)try{return await Mc({contractAddress:l,chainId:o,beneficiaries:x,itemIds:f,signer:s})}catch(g){if(g instanceof Gl&&g.code===Yl.USER_DENIED||g instanceof Sl)throw g;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",g)}return await ms(s.provider,o),(await(await new Fl(l,ba,s).issueTokens(x,f,Al(o))).wait()).transactionHash}const Lc=r.div`
|
|
934
|
-
position: fixed;
|
|
935
|
-
inset: 0;
|
|
936
|
-
z-index: 10000;
|
|
937
|
-
display: flex;
|
|
938
|
-
align-items: center;
|
|
939
|
-
justify-content: center;
|
|
940
|
-
padding: 16px;
|
|
941
|
-
background: rgba(22, 21, 24, 0.55);
|
|
942
|
-
`,Pc=r.div`
|
|
943
|
-
width: 560px;
|
|
944
|
-
max-width: 100%;
|
|
945
|
-
max-height: 92vh;
|
|
946
|
-
overflow-y: auto;
|
|
947
|
-
background: ${i.colors.white};
|
|
948
|
-
border-radius: 16px;
|
|
949
|
-
padding: 12px 16px 16px;
|
|
950
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
951
|
-
display: flex;
|
|
952
|
-
flex-direction: column;
|
|
953
|
-
gap: 20px;
|
|
954
|
-
`,Ec=r.div`
|
|
955
|
-
display: flex;
|
|
956
|
-
align-items: center;
|
|
957
|
-
justify-content: space-between;
|
|
958
|
-
gap: 8px;
|
|
959
|
-
padding-bottom: 16px;
|
|
960
|
-
border-bottom: 1px solid ${i.colors.gray4};
|
|
961
|
-
`,Fc=r.h2`
|
|
962
|
-
margin: 0;
|
|
963
|
-
font-family: ${i.font.sans};
|
|
964
|
-
font-weight: 600;
|
|
965
|
-
font-size: 20px;
|
|
966
|
-
line-height: 1.6;
|
|
967
|
-
color: ${i.colors.text};
|
|
968
|
-
`,Tc=r.button`
|
|
969
|
-
flex: none;
|
|
970
|
-
display: grid;
|
|
971
|
-
place-items: center;
|
|
972
|
-
width: 24px;
|
|
973
|
-
height: 24px;
|
|
974
|
-
border: 0;
|
|
975
|
-
background: none;
|
|
976
|
-
cursor: pointer;
|
|
977
|
-
color: ${i.colors.text};
|
|
978
|
-
|
|
979
|
-
.ico {
|
|
980
|
-
width: 18px;
|
|
981
|
-
height: 18px;
|
|
982
|
-
}
|
|
983
|
-
&:disabled {
|
|
984
|
-
opacity: 0.4;
|
|
985
|
-
cursor: default;
|
|
986
|
-
}
|
|
987
|
-
&:focus-visible {
|
|
988
|
-
outline: 2px solid ${i.colors.accent};
|
|
989
|
-
outline-offset: 2px;
|
|
990
|
-
}
|
|
991
|
-
`,zc=r.p`
|
|
992
|
-
margin: 0;
|
|
993
|
-
font-family: ${i.font.sans};
|
|
994
|
-
font-size: 14px;
|
|
995
|
-
line-height: 1.57;
|
|
996
|
-
color: ${i.colors.text};
|
|
997
|
-
text-align: left;
|
|
998
|
-
`,Nc=r.div`
|
|
999
|
-
display: flex;
|
|
1000
|
-
align-items: center;
|
|
1001
|
-
gap: 12px;
|
|
1002
|
-
`,Bc=r.div`
|
|
1003
|
-
flex: none;
|
|
1004
|
-
display: grid;
|
|
1005
|
-
place-items: center;
|
|
1006
|
-
width: 56px;
|
|
1007
|
-
height: 56px;
|
|
1008
|
-
border-radius: 12px;
|
|
1009
|
-
background: ${i.colors.media};
|
|
1010
|
-
border: 1px solid ${i.colors.gray4};
|
|
1011
|
-
overflow: hidden;
|
|
1012
|
-
|
|
1013
|
-
img {
|
|
1014
|
-
width: 48px;
|
|
1015
|
-
height: 48px;
|
|
1016
|
-
object-fit: contain;
|
|
1017
|
-
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
1018
|
-
}
|
|
1019
|
-
`,_c=r.p`
|
|
1020
|
-
margin: 0;
|
|
1021
|
-
font-family: ${i.font.sans};
|
|
1022
|
-
font-weight: 600;
|
|
1023
|
-
font-size: 16px;
|
|
1024
|
-
line-height: 1.4;
|
|
1025
|
-
color: ${i.colors.text};
|
|
1026
|
-
`,Dc=r.div`
|
|
1027
|
-
display: flex;
|
|
1028
|
-
flex-direction: column;
|
|
1029
|
-
gap: 10px;
|
|
1030
|
-
`,Wc=r.div`
|
|
1031
|
-
display: flex;
|
|
1032
|
-
align-items: flex-start;
|
|
1033
|
-
gap: 8px;
|
|
1034
|
-
`,qc=r.label`
|
|
1035
|
-
flex: 1 1 auto;
|
|
1036
|
-
min-width: 0;
|
|
1037
|
-
display: flex;
|
|
1038
|
-
flex-direction: column;
|
|
1039
|
-
gap: 4px;
|
|
1040
|
-
`,Oc=r.label`
|
|
1041
|
-
flex: none;
|
|
1042
|
-
width: 96px;
|
|
1043
|
-
display: flex;
|
|
1044
|
-
flex-direction: column;
|
|
1045
|
-
gap: 4px;
|
|
1046
|
-
`,Zi=r.span`
|
|
1047
|
-
font-family: ${i.font.sans};
|
|
1048
|
-
font-size: 12px;
|
|
1049
|
-
color: ${i.colors.muted};
|
|
1050
|
-
`,er=r.input`
|
|
1051
|
-
height: 42px;
|
|
1052
|
-
padding: 0 10px;
|
|
1053
|
-
border: 0.5px solid ${i.colors.text};
|
|
1054
|
-
border-radius: 8px;
|
|
1055
|
-
background: ${i.colors.white};
|
|
1056
|
-
font-family: ${i.font.sans};
|
|
1057
|
-
font-size: 13px;
|
|
1058
|
-
color: ${i.colors.text};
|
|
1059
|
-
outline: none;
|
|
1060
|
-
|
|
1061
|
-
&::placeholder {
|
|
1062
|
-
color: ${i.colors.muted2};
|
|
1063
|
-
}
|
|
1064
|
-
&:focus {
|
|
1065
|
-
border-color: ${i.colors.magenta};
|
|
1066
|
-
}
|
|
1067
|
-
&[aria-invalid='true'] {
|
|
1068
|
-
border-color: ${i.colors.err};
|
|
1069
|
-
}
|
|
1070
|
-
/* Strip the number spinners on the amount input. */
|
|
1071
|
-
&::-webkit-outer-spin-button,
|
|
1072
|
-
&::-webkit-inner-spin-button {
|
|
1073
|
-
-webkit-appearance: none;
|
|
1074
|
-
margin: 0;
|
|
1075
|
-
}
|
|
1076
|
-
&[type='number'] {
|
|
1077
|
-
-moz-appearance: textfield;
|
|
1078
|
-
appearance: textfield;
|
|
1079
|
-
}
|
|
1080
|
-
`,Kc=r.button`
|
|
1081
|
-
flex: none;
|
|
1082
|
-
margin-top: 22px;
|
|
1083
|
-
display: grid;
|
|
1084
|
-
place-items: center;
|
|
1085
|
-
width: 42px;
|
|
1086
|
-
height: 42px;
|
|
1087
|
-
border: 0.5px solid ${i.colors.gray4};
|
|
1088
|
-
border-radius: 8px;
|
|
1089
|
-
background: ${i.colors.white};
|
|
1090
|
-
color: ${i.colors.muted};
|
|
1091
|
-
cursor: pointer;
|
|
1092
|
-
|
|
1093
|
-
.ico {
|
|
1094
|
-
width: 16px;
|
|
1095
|
-
height: 16px;
|
|
1096
|
-
}
|
|
1097
|
-
&:hover:not(:disabled) {
|
|
1098
|
-
color: ${i.colors.err};
|
|
1099
|
-
border-color: ${i.colors.err};
|
|
1100
|
-
}
|
|
1101
|
-
&:disabled {
|
|
1102
|
-
opacity: 0.35;
|
|
1103
|
-
cursor: default;
|
|
1104
|
-
}
|
|
1105
|
-
&:focus-visible {
|
|
1106
|
-
outline: 2px solid ${i.colors.accent};
|
|
1107
|
-
outline-offset: 2px;
|
|
1108
|
-
}
|
|
1109
|
-
`,Hc=r.button`
|
|
1110
|
-
align-self: flex-start;
|
|
1111
|
-
display: inline-flex;
|
|
1112
|
-
align-items: center;
|
|
1113
|
-
gap: 6px;
|
|
1114
|
-
border: 0;
|
|
1115
|
-
background: none;
|
|
1116
|
-
padding: 0;
|
|
1117
|
-
cursor: pointer;
|
|
1118
|
-
font-family: ${i.font.sans};
|
|
1119
|
-
font-weight: 600;
|
|
1120
|
-
font-size: 13px;
|
|
1121
|
-
color: ${i.colors.accent};
|
|
1122
|
-
|
|
1123
|
-
.ico {
|
|
1124
|
-
width: 16px;
|
|
1125
|
-
height: 16px;
|
|
1126
|
-
}
|
|
1127
|
-
&:disabled {
|
|
1128
|
-
opacity: 0.4;
|
|
1129
|
-
cursor: default;
|
|
1130
|
-
}
|
|
1131
|
-
&:focus-visible {
|
|
1132
|
-
outline: 2px solid ${i.colors.accent};
|
|
1133
|
-
outline-offset: 2px;
|
|
1134
|
-
}
|
|
1135
|
-
`,Uc=r.p`
|
|
1136
|
-
margin: 0;
|
|
1137
|
-
font-family: ${i.font.sans};
|
|
1138
|
-
font-size: 13px;
|
|
1139
|
-
line-height: 1.5;
|
|
1140
|
-
color: ${t=>t.over?i.colors.err:i.colors.text};
|
|
1141
|
-
|
|
1142
|
-
strong {
|
|
1143
|
-
font-weight: 700;
|
|
1144
|
-
}
|
|
1145
|
-
`,Qc=r.p`
|
|
1146
|
-
margin: 0;
|
|
1147
|
-
font-family: ${i.font.sans};
|
|
1148
|
-
font-size: 12px;
|
|
1149
|
-
line-height: 1.5;
|
|
1150
|
-
color: ${i.colors.muted};
|
|
1151
|
-
`;r.p`
|
|
1152
|
-
margin: 0;
|
|
1153
|
-
font-family: ${i.font.sans};
|
|
1154
|
-
font-size: 13px;
|
|
1155
|
-
color: ${i.colors.muted};
|
|
1156
|
-
text-align: center;
|
|
1157
|
-
`;const Vc=r.p`
|
|
1158
|
-
margin: 0;
|
|
1159
|
-
font-family: ${i.font.sans};
|
|
1160
|
-
font-size: 11px;
|
|
1161
|
-
color: ${i.colors.err};
|
|
1162
|
-
`,tr=r.div`
|
|
1163
|
-
display: flex;
|
|
1164
|
-
gap: 12px;
|
|
1165
|
-
|
|
1166
|
-
${i.media.maxWidth("mobile")} {
|
|
1167
|
-
flex-direction: column-reverse;
|
|
1168
|
-
}
|
|
1169
|
-
`,Gc=r.button`
|
|
1170
|
-
flex: 1 1 0;
|
|
1171
|
-
height: 48px;
|
|
1172
|
-
border: 2px solid ${i.colors.accent};
|
|
1173
|
-
border-radius: 12px;
|
|
1174
|
-
background: transparent;
|
|
1175
|
-
color: ${i.colors.accent};
|
|
1176
|
-
cursor: pointer;
|
|
1177
|
-
font-family: ${i.font.sans};
|
|
1178
|
-
font-weight: 600;
|
|
1179
|
-
font-size: 13px;
|
|
1180
|
-
line-height: 24px;
|
|
1181
|
-
letter-spacing: 0.46px;
|
|
1182
|
-
text-transform: uppercase;
|
|
1183
|
-
|
|
1184
|
-
&:hover:not(:disabled) {
|
|
1185
|
-
background: rgba(105, 31, 169, 0.06);
|
|
1186
|
-
}
|
|
1187
|
-
&:disabled {
|
|
1188
|
-
opacity: 0.5;
|
|
1189
|
-
cursor: not-allowed;
|
|
1190
|
-
}
|
|
1191
|
-
&:focus-visible {
|
|
1192
|
-
outline: 2px solid ${i.colors.accent};
|
|
1193
|
-
outline-offset: 2px;
|
|
1194
|
-
}
|
|
1195
|
-
`,nr=r.button`
|
|
1196
|
-
flex: 1 1 0;
|
|
1197
|
-
height: 48px;
|
|
1198
|
-
border: 0;
|
|
1199
|
-
border-radius: 12px;
|
|
1200
|
-
cursor: pointer;
|
|
1201
|
-
background: ${i.colors.accent};
|
|
1202
|
-
color: ${i.colors.white};
|
|
1203
|
-
font-family: ${i.font.sans};
|
|
1204
|
-
font-weight: 600;
|
|
1205
|
-
font-size: 13px;
|
|
1206
|
-
line-height: 24px;
|
|
1207
|
-
letter-spacing: 0.46px;
|
|
1208
|
-
text-transform: uppercase;
|
|
1209
|
-
|
|
1210
|
-
&:hover:not(:disabled) {
|
|
1211
|
-
background: ${i.colors.accentHover};
|
|
1212
|
-
}
|
|
1213
|
-
&:focus-visible {
|
|
1214
|
-
outline: 2px solid ${i.colors.accent};
|
|
1215
|
-
outline-offset: 2px;
|
|
1216
|
-
}
|
|
1217
|
-
&:disabled {
|
|
1218
|
-
cursor: not-allowed;
|
|
1219
|
-
background: rgba(105, 31, 169, 0.2);
|
|
1220
|
-
color: ${i.colors.white};
|
|
1221
|
-
}
|
|
1222
|
-
`,Yc=r.div`
|
|
1223
|
-
display: flex;
|
|
1224
|
-
flex-direction: column;
|
|
1225
|
-
align-items: center;
|
|
1226
|
-
gap: 16px;
|
|
1227
|
-
padding: 24px 16px;
|
|
1228
|
-
border-radius: 16px;
|
|
1229
|
-
background: rgba(193, 238, 207, 0.5);
|
|
1230
|
-
text-align: center;
|
|
1231
|
-
`,Jc=r.div`
|
|
1232
|
-
display: grid;
|
|
1233
|
-
place-items: center;
|
|
1234
|
-
width: 64px;
|
|
1235
|
-
height: 64px;
|
|
1236
|
-
border-radius: 50%;
|
|
1237
|
-
background: ${i.colors.ok};
|
|
1238
|
-
color: ${i.colors.white};
|
|
1239
|
-
|
|
1240
|
-
.ico {
|
|
1241
|
-
width: 34px;
|
|
1242
|
-
height: 34px;
|
|
1243
|
-
}
|
|
1244
|
-
`,Xc=r.p`
|
|
1245
|
-
margin: 0;
|
|
1246
|
-
font-family: ${i.font.sans};
|
|
1247
|
-
font-size: 20px;
|
|
1248
|
-
line-height: 1.334;
|
|
1249
|
-
color: ${i.colors.text2};
|
|
1250
|
-
|
|
1251
|
-
b {
|
|
1252
|
-
font-weight: 700;
|
|
1253
|
-
}
|
|
1254
|
-
`;function Zc(t){return t.map(s=>({address:s.address,amount:Number(s.amount)}))}function eu({item:t,session:s,onClose:l,onIssued:o}){const d=ot(),[u,x]=c.useState([{address:"",amount:"1"}]),[f,m]=c.useState(!1),[$,h]=c.useState(null),[g,y]=c.useState(null),k=c.useRef(null),I=Zt(s),C=Zc(u),S=wa(C),q=Sc(C,t.available),M=S>t.available;c.useEffect(()=>{var T;(T=k.current)==null||T.focus();function A(X){X.key==="Escape"&&!f&&l()}return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[f,l]);function w(A,T){x(X=>X.map((V,oe)=>oe===A?{...V,...T}:V))}function U(){x(A=>[...A,{address:"",amount:"1"}])}function a(A){x(T=>T.length<=1?T:T.filter((X,V)=>V!==A))}async function K(){if(!(!q||f)){h(null),m(!0);try{await Rc({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId,entries:C,itemId:t.itemId}),Z("Shop Issued Item",{contract_address:t.contractAddress,item_id:t.itemId,recipients:C.filter(A=>A.address.trim().length>0).length,copies:S}),y(S),Mt.success(n("issue.toastSuccess",{count:S,name:t.name})),d.invalidateQueries({queryKey:["publishable-item"]}),d.invalidateQueries({queryKey:["publishable-items"]}),o==null||o()}catch(A){mt(A)||pe(A,{flow:"issue-item",itemId:t.itemId}),Z("Shop Issue Failed",{error_code:Se(A)}),h(mt(A)?n("getCredits.errorCanceled"):Ue(A,n("issue.errorGeneric")))}finally{m(!1)}}}const J=f?I?n("issue.issuing"):n("issue.confirm"):S>0?n("issue.issueCount",{count:S}):n("issue.issue");return e.jsx(Lc,{onClick:f?void 0:l,role:"presentation",children:e.jsxs(Pc,{ref:k,tabIndex:-1,"data-testid":"issue-modal",onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("issue.title"),children:[e.jsxs(Ec,{children:[e.jsx(Fc,{children:n("issue.title")}),e.jsx(Tc,{onClick:l,disabled:f,"aria-label":n("sellModal.cancel"),children:e.jsx(L,{name:"close",className:"ico"})})]}),g!==null?e.jsxs(e.Fragment,{children:[e.jsxs(Yc,{children:[e.jsx(Jc,{"aria-hidden":!0,children:e.jsx(L,{name:"check",className:"ico"})}),e.jsx(Xc,{children:n("issue.successBody",{count:g,name:t.name})})]}),e.jsx(tr,{children:e.jsx(nr,{onClick:l,children:n("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Nc,{children:[e.jsx(Bc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsx(_c,{children:t.name})]}),e.jsx(zc,{children:n("issue.subtitle")}),e.jsx(Dc,{children:u.map((A,T)=>{const X=A.address.trim(),V=X.length>0&&!ya(X),oe=Number(A.amount),ce=A.amount.length>0&&(!Number.isInteger(oe)||oe<1);return e.jsxs(Wc,{children:[e.jsxs(qc,{children:[e.jsx(Zi,{children:n("issue.addressLabel")}),e.jsx(er,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:A.address,onChange:ie=>w(T,{address:ie.target.value}),disabled:f,"aria-invalid":V,"aria-label":n("issue.addressLabel")}),V?e.jsx(Vc,{children:n("issue.invalidAddress")}):null]}),e.jsxs(Oc,{children:[e.jsx(Zi,{children:n("issue.amountLabel")}),e.jsx(er,{type:"number",min:"1",step:"1",inputMode:"numeric",value:A.amount,onChange:ie=>w(T,{amount:ie.target.value}),disabled:f,"aria-invalid":ce,"aria-label":n("issue.amountLabel")})]}),e.jsx(Kc,{onClick:()=>a(T),disabled:f||u.length<=1,"aria-label":n("issue.removeRow"),children:e.jsx(L,{name:"close",className:"ico"})})]},T)})}),e.jsxs(Hc,{onClick:U,disabled:f,children:[e.jsx(L,{name:"plus",className:"ico"}),n("issue.addRow")]}),e.jsxs(Uc,{over:M,"aria-live":"polite",children:[e.jsx("strong",{children:S})," / ",t.available," ",n("issue.itemsToIssue")]}),M?e.jsx(Qc,{children:n("issue.overCap",{available:t.available})}):null,e.jsx(Qe,{message:$}),e.jsxs(tr,{children:[e.jsx(Gc,{onClick:l,disabled:f,children:n("sellModal.cancel")}),e.jsx(nr,{onClick:()=>void K(),disabled:!q||f,children:J})]})]})]})})}const tu=r.div`
|
|
1255
|
-
position: fixed;
|
|
1256
|
-
inset: 0;
|
|
1257
|
-
z-index: 10000;
|
|
1258
|
-
display: flex;
|
|
1259
|
-
align-items: center;
|
|
1260
|
-
justify-content: center;
|
|
1261
|
-
padding: 16px;
|
|
1262
|
-
background: rgba(22, 21, 24, 0.55);
|
|
1263
|
-
`,nu=r.div`
|
|
1264
|
-
width: 760px;
|
|
1265
|
-
max-width: 100%;
|
|
1266
|
-
background: ${i.colors.white};
|
|
1267
|
-
border-radius: 16px;
|
|
1268
|
-
padding: 12px 16px 16px;
|
|
1269
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1270
|
-
display: flex;
|
|
1271
|
-
flex-direction: column;
|
|
1272
|
-
gap: 16px;
|
|
1273
|
-
`,iu=r.div`
|
|
1274
|
-
display: flex;
|
|
1275
|
-
align-items: center;
|
|
1276
|
-
justify-content: space-between;
|
|
1277
|
-
gap: 8px;
|
|
1278
|
-
padding-bottom: 16px;
|
|
1279
|
-
border-bottom: 1px solid ${i.colors.gray4};
|
|
1280
|
-
`,ru=r.h2`
|
|
1281
|
-
margin: 0;
|
|
1282
|
-
font-family: ${i.font.sans};
|
|
1283
|
-
font-weight: 600;
|
|
1284
|
-
font-size: 20px;
|
|
1285
|
-
line-height: 1.6;
|
|
1286
|
-
color: ${i.colors.text};
|
|
1287
|
-
`,au=r.button`
|
|
1288
|
-
flex: none;
|
|
1289
|
-
display: grid;
|
|
1290
|
-
place-items: center;
|
|
1291
|
-
width: 24px;
|
|
1292
|
-
height: 24px;
|
|
1293
|
-
border: 0;
|
|
1294
|
-
background: none;
|
|
1295
|
-
cursor: pointer;
|
|
1296
|
-
color: ${i.colors.text};
|
|
1297
|
-
|
|
1298
|
-
.ico {
|
|
1299
|
-
width: 18px;
|
|
1300
|
-
height: 18px;
|
|
1301
|
-
}
|
|
1302
|
-
&:focus-visible {
|
|
1303
|
-
outline: 2px solid ${i.colors.accent};
|
|
1304
|
-
outline-offset: 2px;
|
|
1305
|
-
}
|
|
1306
|
-
`,su=r.video`
|
|
1307
|
-
display: block;
|
|
1308
|
-
width: 100%;
|
|
1309
|
-
max-height: 70vh;
|
|
1310
|
-
border-radius: 12px;
|
|
1311
|
-
background: ${i.colors.blackBtn};
|
|
1312
|
-
`;function ou({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(tu,{onClick:l,role:"presentation",children:e.jsxs(nu,{ref:o,tabIndex:-1,onClick:d=>d.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":n("itemDetail.showcaseTitle"),children:[e.jsxs(iu,{children:[e.jsx(ru,{children:s||n("itemDetail.showcaseTitle")}),e.jsx(au,{onClick:l,"aria-label":n("itemDetail.showcaseClose"),children:e.jsx(L,{name:"close",size:18})})]}),e.jsx(su,{src:t,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Oe,radius:lu}=i,du=r.div`
|
|
1313
|
-
position: fixed;
|
|
1314
|
-
inset: 0;
|
|
1315
|
-
z-index: 60;
|
|
1316
|
-
display: grid;
|
|
1317
|
-
place-items: center;
|
|
1318
|
-
padding: 20px;
|
|
1319
|
-
`,cu=r.div`
|
|
1320
|
-
position: absolute;
|
|
1321
|
-
inset: 0;
|
|
1322
|
-
background: rgba(22, 21, 24, 0.45);
|
|
1323
|
-
`,uu=r.div`
|
|
1324
|
-
position: relative;
|
|
1325
|
-
z-index: 1;
|
|
1326
|
-
width: 100%;
|
|
1327
|
-
max-width: 420px;
|
|
1328
|
-
background: ${Oe.white};
|
|
1329
|
-
border-radius: ${lu.banner};
|
|
1330
|
-
padding: 24px;
|
|
1331
|
-
box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
|
|
1332
|
-
animation: cart-pop-in 0.16s ease;
|
|
1333
|
-
`,pu=r.div`
|
|
1334
|
-
display: flex;
|
|
1335
|
-
align-items: center;
|
|
1336
|
-
gap: 14px;
|
|
1337
|
-
margin-bottom: 18px;
|
|
1338
|
-
`,hu=r.div`
|
|
1339
|
-
width: 64px;
|
|
1340
|
-
height: 64px;
|
|
1341
|
-
flex: none;
|
|
1342
|
-
border-radius: 12px;
|
|
1343
|
-
overflow: hidden;
|
|
1344
|
-
background: ${Oe.media};
|
|
1345
|
-
|
|
1346
|
-
& img {
|
|
1347
|
-
width: 100%;
|
|
1348
|
-
height: 100%;
|
|
1349
|
-
object-fit: contain;
|
|
1350
|
-
}
|
|
1351
|
-
`,xu=r.div`
|
|
1352
|
-
font-weight: 700;
|
|
1353
|
-
font-size: 16px;
|
|
1354
|
-
color: ${Oe.text};
|
|
1355
|
-
margin-bottom: 6px;
|
|
1356
|
-
`,fu=r.div`
|
|
1357
|
-
background: ${Oe.panel};
|
|
1358
|
-
border-radius: 14px;
|
|
1359
|
-
padding: 16px;
|
|
1360
|
-
margin-bottom: 14px;
|
|
1361
|
-
`,ir=r.div`
|
|
1362
|
-
color: ${Oe.muted};
|
|
1363
|
-
font-size: 13px;
|
|
1364
|
-
font-weight: 600;
|
|
1365
|
-
margin-bottom: 6px;
|
|
1366
|
-
`,rr=r.div`
|
|
1367
|
-
display: flex;
|
|
1368
|
-
align-items: center;
|
|
1369
|
-
gap: 8px;
|
|
1370
|
-
font-weight: 700;
|
|
1371
|
-
font-size: 24px;
|
|
1372
|
-
color: ${Oe.text};
|
|
1373
|
-
|
|
1374
|
-
&[data-approx] {
|
|
1375
|
-
color: ${Oe.text2};
|
|
1376
|
-
}
|
|
1377
|
-
`,mu=r.span`
|
|
1378
|
-
color: ${Oe.muted};
|
|
1379
|
-
`,ar=r(Re)`
|
|
1380
|
-
width: 20px;
|
|
1381
|
-
height: 20px;
|
|
1382
|
-
color: ${Oe.text};
|
|
1383
|
-
`,sr=r.div`
|
|
1384
|
-
margin-top: 6px;
|
|
1385
|
-
font-size: 13px;
|
|
1386
|
-
`,gu=r.div`
|
|
1387
|
-
font-size: 13px;
|
|
1388
|
-
margin-bottom: 6px;
|
|
1389
|
-
`,va=gt`
|
|
1390
|
-
margin: 6px 0 0;
|
|
1391
|
-
font-size: 13px;
|
|
1392
|
-
`,Cn=r.p`
|
|
1393
|
-
${va};
|
|
1394
|
-
`,bu=r(Qe)`
|
|
1395
|
-
${va};
|
|
1396
|
-
`,yu=r.div`
|
|
1397
|
-
display: flex;
|
|
1398
|
-
gap: 10px;
|
|
1399
|
-
margin-top: 18px;
|
|
1400
|
-
`,or=r(Ve)`
|
|
1401
|
-
flex: 1;
|
|
1402
|
-
`;function In(t){if(mt(t))return n("errors.rejected");const s=(t.message??"").toLowerCase();return s.includes("insufficient")?n("marketCheckout.error.insufficient",{currency:De.name}):s.includes("not found")||s.includes("no active listing")||s.includes("404")?n("marketCheckout.error.soldOrRemoved"):s.includes("your own listing")?n("errors.cantBuyOwn"):n("marketCheckout.error.generic")}function wu(t){return{id:t.tradeId,tradeId:t.tradeId,name:t.name,creator:t.creator,contractAddress:t.contractAddress,itemId:t.itemId,category:t.category,wearableCategory:t.wearableCategory??void 0,rarity:t.rarity,network:t.network,chainId:t.chainId,thumbnail:t.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function ja({listing:t,rate:s,onClose:l,onSold:o}){const{session:d}=at(),{data:u,isError:x}=Kr(d),f=ot(),m=st(),[$,h]=c.useState("confirm"),[g,y]=c.useState(n("marketCheckout.checkingListing")),[k,I]=c.useState(null),[C,S]=c.useState(null),[q,M]=c.useState(null),[w,U]=c.useState(!1),a=c.useRef(null),K=c.useRef(!1),J=c.useRef(fa());c.useEffect(()=>(K.current=!1,()=>{K.current=!0}),[]);const A=nt(pn(t.manaWei,s));c.useEffect(()=>{let O=!1;if(!d){h("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const D=await Gr(t.tradeId);if(!D)throw new Error("not found");if(!ws(D))throw new Error("not found");if(vs(D,d.address))throw new Error("You can't buy your own listing.");const v=pn(t.manaWei,s);if(!Number.isFinite(v)||v<=0)throw new Error("price unavailable");if(O)return;S({trade:D,usdCents:v,credits:nt(v)}),y("")}catch(D){if(O)return;console.error("[market] listing check failed",D),Z(be(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(D),value_usd:Math.round(pn(t.manaWei,s))/100}),h("error"),I(In(D))}})(),()=>{O=!0,a.current&&d&&(oe([a.current]),a.current=null)}},[]);const T=!!C&&u!=null&&u.credits<C.credits;async function X(){if(!d||!C)return;if(T){Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:C.credits,credits_balance:(u==null?void 0:u.credits)??0,shortfall:Math.max(0,C.credits-((u==null?void 0:u.credits)??0))}),a.current&&(await V([a.current])&&M(null),a.current=null),m("/credits");return}h("working"),I(null),U(!1);let O=q;if(!O){y(n("marketCheckout.lockingPrice"));try{const{credit:R,maxCreditedValue:z,usdCents:B}=await Tn(d.identity,C.usdCents,t.tradeId);if(K.current){V([R.id]);return}a.current=R.id,f.invalidateQueries({queryKey:["usd-balance"]});const H=nt(B);if(O={trade:C.trade,credit:R,maxCreditedValue:z,usdCents:B,credits:H},M(O),H!==C.credits){S({trade:C.trade,usdCents:B,credits:H}),U(!0),y(""),h("confirm");return}}catch(R){console.error("[market] authorize failed",R),be(R)||pe(R,{flow:"market_buy_now",step:"authorize"}),Z(be(R)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(R),value_usd:C.usdCents/100}),y(""),I(In(R)),h("error");return}}if(!O)return;const N=O;let D=!1,v;try{y(n("marketCheckout.confirming"));const R={trade:N.trade,buyer:d.address,signer:d.signer,credits:[N.credit],maxCreditedValue:N.maxCreditedValue,onBroadcast:({txHash:z})=>J.current.broadcast(N.credit.id,z),onReverted:({txHash:z})=>{z&&J.current.reverted(z)}};if(J.current.submitStarted(N.credit.id),sa())try{v=await Nl(R),J.current.broadcast(N.credit.id,v),await da(v),D=!0}catch(z){if(z instanceof ca)D=!0;else if(z instanceof ua){if(z.reason==="relayer-unreachable")throw J.current.unobservable(N.credit.id),z;if(!Yt(d.providerType))throw z;v=await Ti(R)}else throw v&&J.current.reverted(v),z}else v=await Ti(R)}catch(R){J.current.submitFinished(N.credit.id),console.error("[market] buy now failed",R),await V([N.credit.id])&&M(null),a.current=null,Z(be(R)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(R),value_usd:N.usdCents/100}),f.invalidateQueries({queryKey:["usd-balance"]}),I(In(R)),h("error");const z=(R.message??"").toLowerCase();(z.includes("not found")||z.includes("no active listing")||z.includes("404"))&&o();return}J.current.submitFinished(N.credit.id),a.current=null;try{f.invalidateQueries({queryKey:["usd-balance"]}),Z("Shop Completed Purchase",{items:[{item_id:t.itemId??null,contract_address:t.contractAddress,token_id:null,price_usd:N.usdCents/100,category:t.category,is_smart:!1}],value_credits:N.credits,value_usd:N.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:D,transaction_hash:v??null}),f.invalidateQueries({queryKey:["detail-trade"]}),f.invalidateQueries({queryKey:["shop-item"]}),f.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),f.invalidateQueries({queryKey:["shop-items"]}),f.invalidateQueries({queryKey:["catalog-items"]}),f.invalidateQueries({queryKey:["my-assets"]}),f.invalidateQueries({queryKey:["purchases"]})}catch(R){pe(R,{flow:"market_buy_now",step:"post_purchase"})}const re={items:[wu(t)],txHash:v};m("/success",{state:re})}async function V(O){if(!d||O.length===0)return!1;const N=O.filter(D=>!J.current.mayBeConsumed(D));if(N.length===0)return!1;try{return await Hr(d.identity,N),!0}catch{return!1}}function oe(O){V(O.filter(N=>!J.current.isInFlight(N)))}function ce(){d&&q&&V([q.credit.id]),a.current=null,l()}const ie=$==="working";return e.jsxs(du,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),children:[e.jsx(cu,{onClick:ie?void 0:ce,"aria-hidden":!0}),e.jsxs(uu,{children:[e.jsxs(pu,{children:[e.jsx(hu,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx(xu,{title:t.name,children:t.name||n("buyModal.itemFallback")}),e.jsx(Vr,{"data-variant":"rarity",children:t.rarity})]})]}),e.jsx(fu,{children:C?e.jsxs(e.Fragment,{children:[e.jsx(ir,{children:n("marketCheckout.finalPrice")}),e.jsxs(rr,{children:[e.jsx(ar,{}),e.jsx(ge,{credits:C.credits})," ",Mi(C.credits)]}),e.jsxs(sr,{className:"muted",children:["$",it(C.credits).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(ir,{children:n("marketCheckout.todaysPrice")}),e.jsxs(rr,{"data-approx":!0,children:[e.jsx(mu,{"aria-hidden":!0,children:"≈"}),e.jsx(ar,{}),e.jsx(ge,{credits:A})," ",Mi(A)]}),e.jsx(sr,{className:"muted",children:g||n("marketCheckout.checkingListing")})]})}),d?e.jsxs(gu,{className:"muted",children:[n("marketCheckout.yourBalance")," ",e.jsx(Re,{className:"ccy-mark"})," ",ys(u,x)]}):null,T?e.jsx(Cn,{className:"muted",children:n("marketCheckout.needMore",{currency:De.name})}):null,w?e.jsx(Cn,{"data-testid":"price-changed",role:"status",children:n("buyModal.priceChanged")}):null,g&&$==="working"?e.jsx(Cn,{className:"muted",children:g}):null,e.jsx(bu,{message:k}),e.jsxs(yu,{children:[e.jsx(or,{variant:"ghost",onClick:ce,disabled:ie,children:n("buyModal.cancel")}),e.jsx(or,{variant:"purple",onClick:()=>void X(),disabled:ie||!C||T&&xt(),children:ie?n("marketCheckout.buying"):T&&!xt()?n("nav.getCredits",{currency:De.name}):n("marketCheckout.confirmPurchase")})]})]})]})}function vu(t,s,{enabled:l=!0,first:o}={}){const{data:d,isFetched:u}=se({queryKey:["related-items",t,s,o],enabled:l&&!!t&&!!s,staleTime:3e5,queryFn:()=>js(t,s,{first:o})});return{items:d??[],isFetched:u}}const ka=15;function ju(t){return`${t.contractAddress}-${t.itemId??t.tokenId??t.id}`.toLowerCase()}function ku(t,s){return!!(s.id&&t.id===s.id||s.itemId&&t.itemId===s.itemId&&lr(t,s)||s.tokenId&&t.tokenId===s.tokenId&&lr(t,s))}function lr(t,s){var l;return s.contractAddress?((l=t.contractAddress)==null?void 0:l.toLowerCase())===s.contractAddress.toLowerCase():!1}function Sn(t,s,l=ka){const o=new Set,d=[];function u(f,m){for(const $ of f){if(d.length>=m)return;if(ku($,s))continue;const h=ju($);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 $u=20,Cu=30,dr=[];function Iu(t,s=ka){const{id:l,contractAddress:o,itemId:d,tokenId:u,creator:x}=t,f=c.useMemo(()=>({id:l,contractAddress:o,itemId:d,tokenId:u}),[l,o,d,u]),{data:m=dr,isFetched:$}=se({queryKey:["collection-items",o],enabled:!!o,queryFn:()=>$s(o,{first:$u}).then(U=>U.items)}),h=c.useMemo(()=>Sn({collection:m},f,s).items.length,[m,f,s]),g=$&&h<s,y=g&&!!x,k=se({queryKey:["suggestions-creator",x],enabled:y,staleTime:5*6e4,queryFn:()=>Cs({creator:x,isOnSale:!0,first:Cu}).then(U=>U.items)}),I=k.data??dr,C=!y||k.isSuccess||k.isError,S=c.useMemo(()=>Sn({collection:m,creator:I},f,s).items.length,[m,I,f,s]),{items:q}=vu(o,d??null,{enabled:g&&C&&S<s,first:s}),M=c.useMemo(()=>Sn({collection:m,creator:I,related:q},f,s),[m,I,q,f,s]),w=ks(M.items);return{...M,items:w,siblings:m,siblingsFetched:$}}function Su(t){const s=Is();return!s||!Ss(s.contracts,t)?null:s.label}const{colors:_e,media:On}=i,Au=As`
|
|
1403
|
-
to {
|
|
1404
|
-
transform: rotate(360deg);
|
|
1405
|
-
}
|
|
1406
|
-
`,Mu=r.div``,Ru=r.span`
|
|
1407
|
-
width: 34px;
|
|
1408
|
-
height: 34px;
|
|
1409
|
-
border-radius: 50%;
|
|
1410
|
-
border: 3px solid ${_e.line};
|
|
1411
|
-
border-top-color: ${_e.accent};
|
|
1412
|
-
animation: ${Au} 0.8s linear infinite;
|
|
1413
|
-
|
|
1414
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1415
|
-
animation-duration: 2.4s;
|
|
1416
|
-
}
|
|
1417
|
-
`,Lu=r.p``,Pu=r.div``,cr=r.button`
|
|
1418
|
-
border: 0;
|
|
1419
|
-
background: none;
|
|
1420
|
-
cursor: pointer;
|
|
1421
|
-
padding: 6px 16px;
|
|
1422
|
-
border-radius: 999px;
|
|
1423
|
-
font-weight: 600;
|
|
1424
|
-
font-size: 12px;
|
|
1425
|
-
text-transform: uppercase;
|
|
1426
|
-
letter-spacing: 0.04em;
|
|
1427
|
-
color: ${_e.muted};
|
|
1428
|
-
transition:
|
|
1429
|
-
background 0.12s ease,
|
|
1430
|
-
color 0.12s ease;
|
|
1431
|
-
|
|
1432
|
-
&[data-active] {
|
|
1433
|
-
background: ${_e.text};
|
|
1434
|
-
color: ${_e.white};
|
|
1435
|
-
}
|
|
1436
|
-
&:not([data-active]):hover {
|
|
1437
|
-
color: ${_e.text};
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
|
-
${On.maxWidth("lg")} {
|
|
1441
|
-
padding: 6px 12px;
|
|
1442
|
-
border-radius: 0;
|
|
1443
|
-
background: ${_e.white};
|
|
1444
|
-
color: ${_e.text2};
|
|
1445
|
-
|
|
1446
|
-
&[data-active] {
|
|
1447
|
-
background: ${_e.text};
|
|
1448
|
-
color: ${_e.white};
|
|
1449
|
-
}
|
|
1450
|
-
&:first-of-type {
|
|
1451
|
-
border-top-left-radius: 999px;
|
|
1452
|
-
border-bottom-left-radius: 999px;
|
|
1453
|
-
}
|
|
1454
|
-
&:last-of-type {
|
|
1455
|
-
border-top-right-radius: 999px;
|
|
1456
|
-
border-bottom-right-radius: 999px;
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
`,ur=r.span`
|
|
1460
|
-
${On.maxWidth("lg")} {
|
|
1461
|
-
display: none;
|
|
1462
|
-
}
|
|
1463
|
-
`,pr=r(L)`
|
|
1464
|
-
display: none;
|
|
1465
|
-
|
|
1466
|
-
${On.maxWidth("lg")} {
|
|
1467
|
-
display: block;
|
|
1468
|
-
}
|
|
1469
|
-
`,hr="shop-item-preview";function Eu({item:t}){const s=at(T=>{var X;return(X=T.session)==null?void 0:X.address}),{data:l,isLoading:o}=Jt(s),d=s&&l?s:"default",u=t.category==="emote",[x,f]=c.useState("avatar"),m=!u&&x==="item",$=m||!o,h=At(T=>T.fittingOpen),{ref:g,active:y}=Ms(),k=$&&y&&!h,[I,C]=c.useState(!0);c.useEffect(()=>{C(!0)},[t.id,m]),c.useEffect(()=>{k&&C(!0)},[k]);const S=c.useRef(null);c.useEffect(()=>{if(k)return()=>{Zl(S.current),S.current=null}},[k]);const[q,M]=c.useState(Ae.PreviewRenderer.UNITY),w=q===Ae.PreviewRenderer.BABYLON,U=!!s&&!!l,a=U&&Rs(t,Ls(l)),K=Ps(t)[0],J=U&&!a&&!u,A=t.urn?{urns:[t.urn]}:{contractAddress:t.contractAddress,tokenId:t.tokenId??void 0,itemId:t.tokenId?void 0:t.itemId??void 0};return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:g,"data-preview-viewport":!0,"aria-hidden":!0}),k?e.jsx(Es,{id:hr,...A,profile:m?void 0:a?d:"default",bodyShape:m||a?void 0:K,type:u?void 0:m?Ae.PreviewType.WEARABLE:Ae.PreviewType.AVATAR,emote:u||m?void 0:Ae.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:u?1.5:void 0,wheelStart:u?100:void 0,onRenderer:M,onLoad:()=>{var T;C(!1),S.current=((T=document.getElementById(hr))==null?void 0:T.contentWindow)??null}}):null,!k||I?e.jsx(Mu,{"data-preview-loading":!0,"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(Ru,{"aria-hidden":!0})}):null,J&&!m?e.jsx(Lu,{"data-preview-note":!0,children:n("itemPreview.shownOnBody",{shape:Fs(K)})}):null,!w||!u?null:e.jsx(Xl,{previewId:"shop-item-preview"}),!w||u?null:e.jsxs(Pu,{"data-preview-toggle":!0,role:"group","aria-label":n("itemPreview.previewMode"),children:[e.jsxs(cr,{type:"button","data-active":x==="avatar"||void 0,"aria-pressed":x==="avatar","aria-label":n("itemPreview.onAvatar"),onClick:()=>f("avatar"),children:[e.jsx(pr,{name:"view-avatar",size:18}),e.jsx(ur,{children:n("itemPreview.onAvatar")})]}),e.jsxs(cr,{type:"button","data-active":x==="item"||void 0,"aria-pressed":x==="item","aria-label":n("itemPreview.item"),onClick:()=>f("item"),children:[e.jsx(pr,{name:"view-item",size:18}),e.jsx(ur,{children:n("itemPreview.item")})]})]})]})}const Fu=r.div`
|
|
1470
|
-
position: fixed;
|
|
1471
|
-
inset: 0;
|
|
1472
|
-
z-index: 10000;
|
|
1473
|
-
display: flex;
|
|
1474
|
-
align-items: center;
|
|
1475
|
-
justify-content: center;
|
|
1476
|
-
padding: 16px;
|
|
1477
|
-
background: rgba(22, 21, 24, 0.55);
|
|
1478
|
-
`,Tu=r.div`
|
|
1479
|
-
display: flex;
|
|
1480
|
-
flex-direction: column;
|
|
1481
|
-
gap: 12px;
|
|
1482
|
-
width: 1128px;
|
|
1483
|
-
max-width: 100%;
|
|
1484
|
-
max-height: 92vh;
|
|
1485
|
-
background: ${i.colors.white};
|
|
1486
|
-
border-radius: 16px;
|
|
1487
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1488
|
-
|
|
1489
|
-
&:focus {
|
|
1490
|
-
outline: none;
|
|
1491
|
-
}
|
|
1492
|
-
`,zu=r.div`
|
|
1493
|
-
flex: none;
|
|
1494
|
-
display: flex;
|
|
1495
|
-
align-items: center;
|
|
1496
|
-
gap: 8px;
|
|
1497
|
-
padding: 16px;
|
|
1498
|
-
border-bottom: 1px solid ${i.colors.gray4};
|
|
1499
|
-
`,Nu=r.h2`
|
|
1500
|
-
flex: 1 1 auto;
|
|
1501
|
-
min-width: 0;
|
|
1502
|
-
margin: 0;
|
|
1503
|
-
font-family: ${i.font.sans};
|
|
1504
|
-
font-weight: 600;
|
|
1505
|
-
font-size: 20px;
|
|
1506
|
-
line-height: 1.6;
|
|
1507
|
-
color: ${i.colors.text};
|
|
1508
|
-
`,Bu=r.button`
|
|
1509
|
-
flex: none;
|
|
1510
|
-
display: grid;
|
|
1511
|
-
place-items: center;
|
|
1512
|
-
width: 18.5px;
|
|
1513
|
-
height: 18.5px;
|
|
1514
|
-
padding: 0;
|
|
1515
|
-
border: 0;
|
|
1516
|
-
background: none;
|
|
1517
|
-
cursor: pointer;
|
|
1518
|
-
color: ${i.colors.text};
|
|
1519
|
-
|
|
1520
|
-
.ico {
|
|
1521
|
-
width: 18.5px;
|
|
1522
|
-
height: 18.5px;
|
|
1523
|
-
}
|
|
1524
|
-
&:focus-visible {
|
|
1525
|
-
outline: 2px solid ${i.colors.accent};
|
|
1526
|
-
outline-offset: 4px;
|
|
1527
|
-
}
|
|
1528
|
-
`,_u=r.div`
|
|
1529
|
-
flex: 1 1 auto;
|
|
1530
|
-
min-height: 0;
|
|
1531
|
-
overflow-y: auto;
|
|
1532
|
-
display: flex;
|
|
1533
|
-
flex-direction: column;
|
|
1534
|
-
gap: 8px;
|
|
1535
|
-
padding: 0 16px 24px;
|
|
1536
|
-
`,Du=r.div`
|
|
1537
|
-
position: sticky;
|
|
1538
|
-
top: 0;
|
|
1539
|
-
z-index: 1;
|
|
1540
|
-
display: flex;
|
|
1541
|
-
align-items: center;
|
|
1542
|
-
justify-content: space-between;
|
|
1543
|
-
gap: 8px;
|
|
1544
|
-
padding-bottom: 8px;
|
|
1545
|
-
background: ${i.colors.white};
|
|
1546
|
-
`,Wu=r.p`
|
|
1547
|
-
margin: 0;
|
|
1548
|
-
font-family: ${i.font.sans};
|
|
1549
|
-
font-size: 14px;
|
|
1550
|
-
line-height: 1.43;
|
|
1551
|
-
color: ${i.colors.muted};
|
|
1552
|
-
`,qu=r.div`
|
|
1553
|
-
position: relative;
|
|
1554
|
-
flex: none;
|
|
1555
|
-
display: inline-flex;
|
|
1556
|
-
align-items: center;
|
|
1557
|
-
padding: 4px 4px 4px 12px;
|
|
1558
|
-
border: 0.5px solid ${i.colors.lineStrong};
|
|
1559
|
-
border-radius: 8px;
|
|
1560
|
-
background: ${i.colors.white};
|
|
1561
|
-
|
|
1562
|
-
select {
|
|
1563
|
-
appearance: none;
|
|
1564
|
-
/* 24px design gap + the 24px chevron that sits on top of it. */
|
|
1565
|
-
padding: 0 48px 0 0;
|
|
1566
|
-
border: 0;
|
|
1567
|
-
background: none;
|
|
1568
|
-
font-family: ${i.font.sans};
|
|
1569
|
-
font-weight: 500;
|
|
1570
|
-
font-size: 12px;
|
|
1571
|
-
line-height: 1.43;
|
|
1572
|
-
color: ${i.colors.text2};
|
|
1573
|
-
cursor: pointer;
|
|
1574
|
-
outline: none;
|
|
1575
|
-
}
|
|
1576
|
-
select:focus-visible {
|
|
1577
|
-
outline: 2px solid ${i.colors.accent};
|
|
1578
|
-
outline-offset: 2px;
|
|
1579
|
-
border-radius: 4px;
|
|
1580
|
-
}
|
|
1581
|
-
.chev {
|
|
1582
|
-
position: absolute;
|
|
1583
|
-
right: 4px;
|
|
1584
|
-
width: 24px;
|
|
1585
|
-
height: 24px;
|
|
1586
|
-
color: ${i.colors.text2};
|
|
1587
|
-
pointer-events: none;
|
|
1588
|
-
}
|
|
1589
|
-
`,Ou=r.div`
|
|
1590
|
-
flex: none;
|
|
1591
|
-
border: 1px solid ${i.colors.lineStrong};
|
|
1592
|
-
border-radius: 16px;
|
|
1593
|
-
/* The four equal columns need the design width to hold their content, so a narrower modal scrolls
|
|
1594
|
-
the table here rather than letting the page scroll sideways. */
|
|
1595
|
-
overflow-x: auto;
|
|
1596
|
-
overflow-y: hidden;
|
|
1597
|
-
background: ${i.colors.white};
|
|
1598
|
-
`,Ku=r.table`
|
|
1599
|
-
width: 100%;
|
|
1600
|
-
min-width: 1096px;
|
|
1601
|
-
table-layout: fixed;
|
|
1602
|
-
border-collapse: collapse;
|
|
1603
|
-
|
|
1604
|
-
th {
|
|
1605
|
-
height: 48px;
|
|
1606
|
-
padding: 8px 8px 8px 16px;
|
|
1607
|
-
text-align: left;
|
|
1608
|
-
vertical-align: middle;
|
|
1609
|
-
background: ${i.colors.media};
|
|
1610
|
-
border-right: 0.5px solid ${i.colors.lineStrong};
|
|
1611
|
-
font-family: ${i.font.sans};
|
|
1612
|
-
font-weight: 600;
|
|
1613
|
-
font-size: 16px;
|
|
1614
|
-
line-height: 1.5;
|
|
1615
|
-
color: ${i.colors.text};
|
|
1616
|
-
text-transform: capitalize;
|
|
1617
|
-
}
|
|
1618
|
-
th:last-of-type {
|
|
1619
|
-
border-right: 0;
|
|
1620
|
-
}
|
|
1621
|
-
|
|
1622
|
-
td {
|
|
1623
|
-
height: 56px;
|
|
1624
|
-
padding: 8px 8px 8px 16px;
|
|
1625
|
-
vertical-align: middle;
|
|
1626
|
-
border-right: 0.5px solid ${i.colors.lineStrong};
|
|
1627
|
-
border-bottom: 0.5px solid ${i.colors.lineStrong};
|
|
1628
|
-
font-family: ${i.font.sans};
|
|
1629
|
-
font-size: 14px;
|
|
1630
|
-
line-height: 1.43;
|
|
1631
|
-
color: ${i.colors.text2};
|
|
1632
|
-
}
|
|
1633
|
-
td:last-of-type {
|
|
1634
|
-
border-right: 0;
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
tbody tr:hover,
|
|
1638
|
-
tbody tr:focus-within {
|
|
1639
|
-
background: ${i.colors.media};
|
|
1640
|
-
}
|
|
1641
|
-
tbody tr:hover td,
|
|
1642
|
-
tbody tr:focus-within td {
|
|
1643
|
-
border-bottom-color: ${i.colors.media};
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
/* Stack every cell into a card — a 4-column grid is unusable at phone widths. The column name is
|
|
1647
|
-
carried on each cell's data-label so it survives translation. */
|
|
1648
|
-
${i.media.maxWidth("mobile")} {
|
|
1649
|
-
min-width: 0;
|
|
1650
|
-
|
|
1651
|
-
thead {
|
|
1652
|
-
display: none;
|
|
1653
|
-
}
|
|
1654
|
-
tr {
|
|
1655
|
-
display: block;
|
|
1656
|
-
border-bottom: 0.5px solid ${i.colors.lineStrong};
|
|
1657
|
-
}
|
|
1658
|
-
tr:last-of-type {
|
|
1659
|
-
border-bottom: 0;
|
|
1660
|
-
}
|
|
1661
|
-
td {
|
|
1662
|
-
display: block;
|
|
1663
|
-
height: auto;
|
|
1664
|
-
padding: 8px 16px;
|
|
1665
|
-
border-right: 0;
|
|
1666
|
-
border-bottom: 0;
|
|
1667
|
-
}
|
|
1668
|
-
td:first-of-type {
|
|
1669
|
-
padding-top: 12px;
|
|
1670
|
-
}
|
|
1671
|
-
td:last-of-type {
|
|
1672
|
-
padding-bottom: 12px;
|
|
1673
|
-
}
|
|
1674
|
-
td[data-label]::before {
|
|
1675
|
-
content: attr(data-label);
|
|
1676
|
-
display: block;
|
|
1677
|
-
margin-bottom: 2px;
|
|
1678
|
-
font-size: 12px;
|
|
1679
|
-
line-height: 1.43;
|
|
1680
|
-
color: ${i.colors.muted};
|
|
1681
|
-
text-transform: capitalize;
|
|
1682
|
-
}
|
|
1683
|
-
tbody tr:hover td,
|
|
1684
|
-
tbody tr:focus-within td {
|
|
1685
|
-
border-bottom-color: transparent;
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
`,$a=`
|
|
1689
|
-
display: flex;
|
|
1690
|
-
align-items: center;
|
|
1691
|
-
gap: 10px;
|
|
1692
|
-
min-width: 0;
|
|
1693
|
-
|
|
1694
|
-
.owner-ava {
|
|
1695
|
-
flex: none;
|
|
1696
|
-
display: inline-grid;
|
|
1697
|
-
place-items: center;
|
|
1698
|
-
width: 32px;
|
|
1699
|
-
height: 32px;
|
|
1700
|
-
border: 2.286px solid rgba(255, 255, 255, 0.5);
|
|
1701
|
-
border-radius: 50%;
|
|
1702
|
-
background: ${i.colors.media};
|
|
1703
|
-
object-fit: cover;
|
|
1704
|
-
overflow: hidden;
|
|
1705
|
-
color: ${i.colors.white};
|
|
1706
|
-
font-weight: 700;
|
|
1707
|
-
font-size: 13px;
|
|
1708
|
-
}
|
|
1709
|
-
.owner-name {
|
|
1710
|
-
min-width: 0;
|
|
1711
|
-
overflow: hidden;
|
|
1712
|
-
text-overflow: ellipsis;
|
|
1713
|
-
white-space: nowrap;
|
|
1714
|
-
font-family: ${i.font.sans};
|
|
1715
|
-
font-size: 14px;
|
|
1716
|
-
line-height: 1.43;
|
|
1717
|
-
color: ${i.colors.text2};
|
|
1718
|
-
}
|
|
1719
|
-
`,Hu=r.div`
|
|
1720
|
-
${$a}
|
|
1721
|
-
`,Uu=r.button`
|
|
1722
|
-
${$a}
|
|
1723
|
-
padding: 0;
|
|
1724
|
-
border: 0;
|
|
1725
|
-
background: none;
|
|
1726
|
-
font: inherit;
|
|
1727
|
-
text-align: left;
|
|
1728
|
-
cursor: pointer;
|
|
1729
|
-
|
|
1730
|
-
&:hover .owner-name {
|
|
1731
|
-
text-decoration: underline;
|
|
1732
|
-
}
|
|
1733
|
-
&:focus-visible {
|
|
1734
|
-
outline: 2px solid ${i.colors.accent};
|
|
1735
|
-
outline-offset: 2px;
|
|
1736
|
-
border-radius: 4px;
|
|
1737
|
-
}
|
|
1738
|
-
`,xr=r.span`
|
|
1739
|
-
color: ${i.colors.muted};
|
|
1740
|
-
`,Qu=r.div`
|
|
1741
|
-
display: flex;
|
|
1742
|
-
align-items: center;
|
|
1743
|
-
justify-content: space-between;
|
|
1744
|
-
gap: 4px;
|
|
1745
|
-
|
|
1746
|
-
.amount {
|
|
1747
|
-
display: inline-flex;
|
|
1748
|
-
align-items: center;
|
|
1749
|
-
gap: 4px;
|
|
1750
|
-
font-family: ${i.font.sans};
|
|
1751
|
-
font-weight: 600;
|
|
1752
|
-
font-size: 16px;
|
|
1753
|
-
line-height: 1.5;
|
|
1754
|
-
color: ${i.colors.text2};
|
|
1755
|
-
}
|
|
1756
|
-
/* The credits mark is always near-black here — never the violet accent. */
|
|
1757
|
-
.amount .ccy {
|
|
1758
|
-
flex: none;
|
|
1759
|
-
width: 22px;
|
|
1760
|
-
height: 22px;
|
|
1761
|
-
color: ${i.colors.text2};
|
|
1762
|
-
}
|
|
1763
|
-
.approx {
|
|
1764
|
-
color: ${i.colors.muted};
|
|
1765
|
-
font-weight: 600;
|
|
1766
|
-
}
|
|
1767
|
-
`,Vu=r.div`
|
|
1768
|
-
flex: none;
|
|
1769
|
-
display: flex;
|
|
1770
|
-
align-items: center;
|
|
1771
|
-
gap: 8px;
|
|
1772
|
-
opacity: 0;
|
|
1773
|
-
transition: opacity 0.12s ease;
|
|
1774
|
-
|
|
1775
|
-
tr:hover &,
|
|
1776
|
-
tr:focus-within &,
|
|
1777
|
-
&[data-persistent='true'] {
|
|
1778
|
-
opacity: 1;
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
@media (hover: none) {
|
|
1782
|
-
opacity: 1;
|
|
1783
|
-
}
|
|
1784
|
-
${i.media.maxWidth("mobile")} {
|
|
1785
|
-
opacity: 1;
|
|
1786
|
-
}
|
|
1787
|
-
`,Ca=`
|
|
1788
|
-
display: inline-flex;
|
|
1789
|
-
align-items: center;
|
|
1790
|
-
justify-content: center;
|
|
1791
|
-
gap: 8px;
|
|
1792
|
-
height: 40px;
|
|
1793
|
-
padding: 0 12px;
|
|
1794
|
-
border: 0;
|
|
1795
|
-
border-radius: 12px;
|
|
1796
|
-
cursor: pointer;
|
|
1797
|
-
font-family: ${i.font.sans};
|
|
1798
|
-
font-weight: 600;
|
|
1799
|
-
font-size: 13px;
|
|
1800
|
-
line-height: 24px;
|
|
1801
|
-
letter-spacing: 0.46px;
|
|
1802
|
-
text-transform: uppercase;
|
|
1803
|
-
text-align: center;
|
|
1804
|
-
white-space: nowrap;
|
|
1805
|
-
|
|
1806
|
-
.ico {
|
|
1807
|
-
width: 20px;
|
|
1808
|
-
height: 20px;
|
|
1809
|
-
}
|
|
1810
|
-
&:focus-visible {
|
|
1811
|
-
outline: 2px solid ${i.colors.accent};
|
|
1812
|
-
outline-offset: 2px;
|
|
1813
|
-
}
|
|
1814
|
-
`,Gu=r.button`
|
|
1815
|
-
${Ca}
|
|
1816
|
-
min-width: 106px;
|
|
1817
|
-
background: ${i.colors.text2};
|
|
1818
|
-
color: ${i.colors.softWhite};
|
|
1819
|
-
|
|
1820
|
-
&:hover:not(:disabled) {
|
|
1821
|
-
filter: brightness(1.35);
|
|
1822
|
-
}
|
|
1823
|
-
&:disabled {
|
|
1824
|
-
opacity: 0.55;
|
|
1825
|
-
cursor: default;
|
|
1826
|
-
}
|
|
1827
|
-
`,fr=r.button`
|
|
1828
|
-
${Ca}
|
|
1829
|
-
background: ${i.colors.accent};
|
|
1830
|
-
color: ${i.colors.softWhite};
|
|
1831
|
-
|
|
1832
|
-
&:hover:not(:disabled) {
|
|
1833
|
-
background: ${i.colors.accentHover};
|
|
1834
|
-
}
|
|
1835
|
-
`,Yu=r.span`
|
|
1836
|
-
display: inline-flex;
|
|
1837
|
-
align-items: center;
|
|
1838
|
-
height: 40px;
|
|
1839
|
-
padding: 0 12px;
|
|
1840
|
-
border-radius: 12px;
|
|
1841
|
-
background: ${i.colors.chip};
|
|
1842
|
-
font-family: ${i.font.sans};
|
|
1843
|
-
font-weight: 600;
|
|
1844
|
-
font-size: 13px;
|
|
1845
|
-
line-height: 24px;
|
|
1846
|
-
color: ${i.colors.muted};
|
|
1847
|
-
white-space: nowrap;
|
|
1848
|
-
`,Ju=r.div`
|
|
1849
|
-
flex: none;
|
|
1850
|
-
display: flex;
|
|
1851
|
-
align-items: center;
|
|
1852
|
-
justify-content: flex-end;
|
|
1853
|
-
gap: 8px;
|
|
1854
|
-
`,Xu=r.p`
|
|
1855
|
-
margin: 0;
|
|
1856
|
-
font-family: ${i.font.sans};
|
|
1857
|
-
font-size: 12px;
|
|
1858
|
-
line-height: 1;
|
|
1859
|
-
color: ${i.colors.gray0};
|
|
1860
|
-
`,mr=r.button`
|
|
1861
|
-
display: grid;
|
|
1862
|
-
place-items: center;
|
|
1863
|
-
padding: 10px;
|
|
1864
|
-
border: 1px solid ${i.colors.text2};
|
|
1865
|
-
border-radius: 4px;
|
|
1866
|
-
background: ${i.colors.white};
|
|
1867
|
-
color: ${i.colors.text2};
|
|
1868
|
-
cursor: pointer;
|
|
1869
|
-
|
|
1870
|
-
/* One chevron glyph turned into ‹ / › so no extra asset is needed. */
|
|
1871
|
-
.ico {
|
|
1872
|
-
width: 11px;
|
|
1873
|
-
height: 11px;
|
|
1874
|
-
transform: rotate(-90deg);
|
|
1875
|
-
}
|
|
1876
|
-
&[data-dir='prev'] .ico {
|
|
1877
|
-
transform: rotate(90deg);
|
|
1878
|
-
}
|
|
1879
|
-
&:disabled {
|
|
1880
|
-
border-color: ${i.colors.lineStrong};
|
|
1881
|
-
color: ${i.colors.lineStrong};
|
|
1882
|
-
cursor: default;
|
|
1883
|
-
}
|
|
1884
|
-
&:focus-visible {
|
|
1885
|
-
outline: 2px solid ${i.colors.accent};
|
|
1886
|
-
outline-offset: 2px;
|
|
1887
|
-
}
|
|
1888
|
-
`,Zu=r.p`
|
|
1889
|
-
margin: 0;
|
|
1890
|
-
padding: 32px 0;
|
|
1891
|
-
font-family: ${i.font.sans};
|
|
1892
|
-
font-size: 14px;
|
|
1893
|
-
line-height: 1.43;
|
|
1894
|
-
color: ${i.colors.muted};
|
|
1895
|
-
text-align: center;
|
|
1896
|
-
`;r.div`
|
|
1897
|
-
display: flex;
|
|
1898
|
-
flex-direction: column;
|
|
1899
|
-
gap: 8px;
|
|
1900
|
-
margin-top: 16px;
|
|
1901
|
-
|
|
1902
|
-
.classic-title {
|
|
1903
|
-
font-family: ${i.font.sans};
|
|
1904
|
-
font-weight: 600;
|
|
1905
|
-
font-size: 15px;
|
|
1906
|
-
color: ${i.colors.text2};
|
|
1907
|
-
}
|
|
1908
|
-
.classic-note {
|
|
1909
|
-
font-family: ${i.font.sans};
|
|
1910
|
-
font-size: 13px;
|
|
1911
|
-
color: ${i.colors.muted};
|
|
1912
|
-
}
|
|
1913
|
-
`;r.span`
|
|
1914
|
-
display: inline-flex;
|
|
1915
|
-
align-items: center;
|
|
1916
|
-
padding: 2px 8px;
|
|
1917
|
-
border-radius: ${i.radius.chip};
|
|
1918
|
-
background: ${i.colors.chip};
|
|
1919
|
-
font-family: ${i.font.sans};
|
|
1920
|
-
font-size: 11px;
|
|
1921
|
-
letter-spacing: 0.4px;
|
|
1922
|
-
text-transform: uppercase;
|
|
1923
|
-
color: ${i.colors.muted};
|
|
1924
|
-
`;r.a`
|
|
1925
|
-
display: inline-flex;
|
|
1926
|
-
align-items: center;
|
|
1927
|
-
gap: 6px;
|
|
1928
|
-
height: 40px;
|
|
1929
|
-
padding: 0 14px;
|
|
1930
|
-
border: 1px solid ${i.colors.lineStrong};
|
|
1931
|
-
border-radius: 12px;
|
|
1932
|
-
color: ${i.colors.accent};
|
|
1933
|
-
font-family: ${i.font.sans};
|
|
1934
|
-
font-weight: 600;
|
|
1935
|
-
font-size: 13px;
|
|
1936
|
-
text-decoration: none;
|
|
1937
|
-
|
|
1938
|
-
&:hover {
|
|
1939
|
-
background: ${i.colors.chip};
|
|
1940
|
-
}
|
|
1941
|
-
.ico {
|
|
1942
|
-
width: 14px;
|
|
1943
|
-
height: 14px;
|
|
1944
|
-
}
|
|
1945
|
-
`;const Ut=10,ep=!1;function tp(t){return/^0x[a-fA-F0-9]{40}$/.test(t)?`${t.slice(0,6)}…${t.slice(-4)}`:t}function np(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 ip(t,s){var l;return(((l=t==null?void 0:t.trim())==null?void 0:l[0])||s.replace(/^0x/i,"")[0]||"?").toUpperCase()}function rp(t){return t%100>=11&&t%100<=13?"th":["th","st","nd","rd"][t%10]??"th"}function ap(t,s){const l=new Date(t);return Number.isNaN(l.getTime())?"—":s==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(l)} ${l.getDate()}${rp(l.getDate())}, ${l.getFullYear()}`:new Intl.DateTimeFormat(s,{day:"numeric",month:"long",year:"numeric"}).format(l)}function sp(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 op({r:t,seller:s,issuedId:l,labels:o,locale:d,isOwn:u,isLegacy:x,inCart:f,fallbackImage:m,onAdd:$,onBuyNative:h,onBuyLegacy:g}){var a,K;const y=st(),{data:k}=Jt(s),I=(K=(a=k==null?void 0:k.avatar)==null?void 0:a.snapshots)==null?void 0:K.face256,[C,S]=c.useState(!1);c.useEffect(()=>S(!1),[I]);const q=!!I&&!C,M=s?k!=null&&k.name?Xt(k.name):tp(s):void 0,w=q?e.jsx("img",{className:"owner-ava",src:I,alt:"",loading:"lazy",onError:()=>S(!0)}):s?e.jsx("span",{className:"owner-ava",style:{backgroundColor:np(s)},"aria-hidden":!0,children:ip(k==null?void 0:k.name,s)}):m?e.jsx("img",{className:"owner-ava",src:m,alt:"","aria-hidden":!0}):e.jsx("span",{className:"owner-ava","aria-hidden":!0}),U=e.jsxs(e.Fragment,{children:[w,M?e.jsx("span",{className:"owner-name","data-testid":"resale-seller",children:M}):null]});return e.jsxs("tr",{"data-testid":"resale-row","data-source":t.source,"data-own":u?"true":void 0,children:[e.jsx("td",{"data-label":o.owner,children:s?e.jsx(Uu,{type:"button",onClick:()=>y(`/items/creator/${s}`),children:U}):e.jsx(Hu,{children:U})}),e.jsx("td",{"data-label":o.itemNumber,children:l?e.jsxs("span",{"data-testid":"resale-issued",children:["#",l]}):e.jsx(xr,{children:"—"})}),e.jsx("td",{"data-label":o.expiration,children:t.saleEndsAt?ap(t.saleEndsAt,d):e.jsx(xr,{children:"—"})}),e.jsx("td",{"data-label":o.price,children:e.jsxs(Qu,{children:[e.jsxs("span",{className:"amount",children:[x?e.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,e.jsx(Re,{className:"ccy"}),e.jsx("span",{children:Dn(t.priceCredits)})]}),e.jsx(Vu,{"data-persistent":u?"true":void 0,children:u?e.jsx(Yu,{"data-testid":"resale-own",children:n("resales.yourListing")}):x?e.jsx(fr,{onClick:g,"aria-label":n("assetCard.buyNow"),"data-testid":"resale-buy",children:n("resales.buy")}):e.jsxs(e.Fragment,{children:[e.jsxs(Gu,{onClick:$,disabled:f,"aria-label":f?n("assetCard.inCart"):n("assetCard.addToCart"),"data-testid":"resale-add",children:[e.jsx(L,{name:"cart",className:"ico"}),e.jsx("span",{children:f?n("assetCard.inCart"):n("resales.add")})]}),e.jsx(fr,{onClick:h,"aria-label":n("assetCard.buyNow"),"data-testid":"resale-buy",children:n("resales.buy")})]})})]})})]})}function lp({item:t,onClose:s}){var D;const l=t.contractAddress,o=t.itemId,d=ot(),u=At(v=>v.add),x=At(v=>v.items),{session:f}=at(),m=Yr(v=>v.locale),$=(D=f==null?void 0:f.address)==null?void 0:D.toLowerCase(),h=c.useRef(null),[g,y]=c.useState(null),[k,I]=c.useState(null),[C,S]=c.useState("cheapest"),[q,M]=c.useState(0),w=!!g||!!k;c.useEffect(()=>{var v;(v=h.current)==null||v.focus()},[]),c.useEffect(()=>{function v(R){R.key==="Escape"&&!w&&s()}window.addEventListener("keydown",v);const re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",v),document.body.style.overflow=re}},[w,s]);const{data:U=[],isLoading:a}=se({queryKey:["item-resales",l,o],enabled:!!l&&!!o,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Xr(l,o)}),K=c.useMemo(()=>C==="cheapest"?U:[...U].sort((v,re)=>re.priceCredits-v.priceCredits),[U,C]),J=Math.max(1,Math.ceil(K.length/Ut)),A=Math.min(q,J-1),T=K.slice(A*Ut,A*Ut+Ut),X=T.filter(v=>!v.seller||!v.issuedId).map(v=>v.tokenId).filter(v=>!!v),{data:V={}}=se({queryKey:["resale-token-info",l,X.join(",")],enabled:!!l&&X.length>0,staleTime:6e4,queryFn:()=>Ts(l,X)}),{data:oe=[]}=se({queryKey:["item-classic-orders",l,o],enabled:ep,queryFn:()=>zs(l,o)}),ce=U.some(v=>v.source==="legacy"),{data:ie}=Jr(ce);function O(){d.invalidateQueries({queryKey:["item-resales",l,o]})}const N={owner:n("resales.colOwner"),itemNumber:n("resales.colItemNumber"),expiration:n("resales.colExpiration"),price:n("resales.colPrice")};return e.jsxs(e.Fragment,{children:[e.jsx(Fu,{onClick:w?void 0:s,role:"presentation",children:e.jsxs(Tu,{ref:h,tabIndex:-1,onClick:v=>v.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("resales.modalTitle"),"data-testid":"resellers-modal",children:[e.jsxs(zu,{children:[e.jsx(Nu,{children:n("resales.modalTitle")}),e.jsx(Bu,{onClick:s,"aria-label":n("resales.close"),"data-testid":"resellers-close",children:e.jsx(L,{name:"close"})})]}),e.jsxs(_u,{children:[e.jsxs(Du,{children:[e.jsx(Wu,{"data-testid":"resales-count",children:n("resales.count",{count:U.length})}),e.jsxs(qu,{children:[e.jsxs("select",{value:C,onChange:v=>{S(v.target.value),M(0)},"aria-label":n("resales.sortLabel"),"data-testid":"resales-sort",children:[e.jsx("option",{value:"cheapest",children:n("resales.sortCheapest")}),e.jsx("option",{value:"most_expensive",children:n("resales.sortExpensive")})]}),e.jsx(L,{name:"chevron-down",className:"chev"})]})]}),a?null:K.length===0?e.jsx(Zu,{"data-testid":"resales-empty",children:n("resales.empty")}):null,K.length>0?e.jsxs(e.Fragment,{children:[e.jsx(Ou,{children:e.jsxs(Ku,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:N.owner}),e.jsx("th",{scope:"col",children:N.itemNumber}),e.jsx("th",{scope:"col",children:N.expiration}),e.jsx("th",{scope:"col",children:N.price})]})}),e.jsx("tbody",{children:T.map(v=>{const re=v.source==="legacy",R=x.some(ee=>ee.id===v.id),z=v.tokenId&&V[v.tokenId]||{},B=v.issuedId??z.issuedId,H=v.seller??z.seller,ae={...v,name:v.name||t.name,thumbnail:v.thumbnail||t.thumbnail,rarity:v.rarity||t.rarity,category:v.category||t.category,wearableCategory:v.wearableCategory??t.wearableCategory,gender:v.gender??t.gender},ve=!!H&&!!$&&H.toLowerCase()===$;return e.jsx(op,{r:ae,seller:H,issuedId:B,labels:N,locale:m,isOwn:ve,isLegacy:re,inCart:R,fallbackImage:ae.thumbnail,onAdd:()=>u(ae,"item_detail"),onBuyNative:()=>y(ae),onBuyLegacy:()=>I(sp(ae))},v.tradeId??v.id)})})]})}),J>1?e.jsxs(Ju,{children:[e.jsx(mr,{"data-dir":"prev",onClick:()=>M(v=>Math.max(0,v-1)),disabled:A===0,"aria-label":n("resales.prevPage"),"data-testid":"resale-prev-page",children:e.jsx(L,{name:"chevron-down"})}),e.jsx(Xu,{"data-testid":"resale-page-label",children:n("resales.page",{page:A+1,total:J})}),e.jsx(mr,{onClick:()=>M(v=>Math.min(J-1,v+1)),disabled:A>=J-1,"aria-label":n("resales.nextPage"),"data-testid":"resale-next-page",children:e.jsx(L,{name:"chevron-down"})})]}):null]}):null,null]})]})}),g?e.jsx(zn,{item:g,onClose:()=>{y(null),O()}}):null,k&&ie?e.jsx(ja,{listing:k,rate:ie,onClose:()=>I(null),onSold:()=>{I(null),O()}}):null]})}const dp="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='76'%20height='76'%20viewBox='0%200%2076%2076'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='weui:shop-outlined'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M25.3333%2022.1667V19C25.3333%2015.6406%2026.6679%2012.4188%2029.0433%2010.0433C31.4188%207.66785%2034.6406%206.33333%2038%206.33333C41.3594%206.33333%2044.5812%207.66785%2046.9567%2010.0433C49.3321%2012.4188%2050.6667%2015.6406%2050.6667%2019V22.1667H60.1667C61.9147%2022.1667%2063.3333%2023.5885%2063.3333%2025.3555V63.3587C63.3333%2066.842%2060.4992%2069.6667%2057.019%2069.6667H18.981C17.3074%2069.6667%2015.7023%2069.0023%2014.5183%2067.8195C13.3343%2066.6367%2012.6683%2065.0322%2012.6667%2063.3587V25.3587C12.6667%2023.5917%2014.0758%2022.1667%2015.8333%2022.1667H25.3333ZM29.1333%2022.1667H46.8667V19C46.8667%2016.6484%2045.9325%2014.3931%2044.2697%2012.7303C42.6069%2011.0675%2040.3516%2010.1333%2038%2010.1333C35.6484%2010.1333%2033.3931%2011.0675%2031.7303%2012.7303C30.0675%2014.3931%2029.1333%2016.6484%2029.1333%2019V22.1667ZM25.3333%2025.9667H16.4667V63.3587C16.4667%2064.7393%2017.594%2065.8667%2018.981%2065.8667H57.019C57.6847%2065.8667%2058.3233%2065.6026%2058.7947%2065.1325C59.266%2064.6623%2059.5317%2064.0244%2059.5333%2063.3587V25.9667H50.6667V34.8333H46.8667V25.9667H29.1333V34.8333H25.3333V25.9667Z'%20fill='url(%23paint0_linear_0_226)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_0_226'%20x1='36.6705'%20y1='6.33333'%20x2='32.2014'%20y2='69.3597'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF7439'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",{colors:me,font:Ia,radius:Kn,z:cp}=i,up=r.div`
|
|
1946
|
-
position: fixed;
|
|
1947
|
-
inset: 0;
|
|
1948
|
-
z-index: ${cp.overlay};
|
|
1949
|
-
display: flex;
|
|
1950
|
-
align-items: center;
|
|
1951
|
-
justify-content: center;
|
|
1952
|
-
overflow-y: auto;
|
|
1953
|
-
padding: 16px;
|
|
1954
|
-
background: rgba(22, 21, 24, 0.55);
|
|
1955
|
-
`,pp=r.div`
|
|
1956
|
-
width: 560px;
|
|
1957
|
-
max-width: 100%;
|
|
1958
|
-
max-height: 100%;
|
|
1959
|
-
overflow-y: auto;
|
|
1960
|
-
padding: 12px 16px 16px;
|
|
1961
|
-
border-radius: ${Kn.modal};
|
|
1962
|
-
background: ${me.white};
|
|
1963
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1964
|
-
display: flex;
|
|
1965
|
-
flex-direction: column;
|
|
1966
|
-
gap: 24px;
|
|
1967
|
-
font-family: ${Ia.sans};
|
|
1968
|
-
|
|
1969
|
-
/* Focused on mount for screen readers; it is not tab-reachable, so it never needs a visible ring. */
|
|
1970
|
-
&:focus {
|
|
1971
|
-
outline: none;
|
|
1972
|
-
}
|
|
1973
|
-
`,hp=r.div`
|
|
1974
|
-
display: flex;
|
|
1975
|
-
align-items: center;
|
|
1976
|
-
justify-content: space-between;
|
|
1977
|
-
gap: 8px;
|
|
1978
|
-
padding-bottom: 16px;
|
|
1979
|
-
border-bottom: 1px solid ${me.gray4};
|
|
1980
|
-
`,xp=r.h2`
|
|
1981
|
-
margin: 0;
|
|
1982
|
-
font-weight: 600;
|
|
1983
|
-
font-size: 20px;
|
|
1984
|
-
line-height: 1.6;
|
|
1985
|
-
color: ${me.text};
|
|
1986
|
-
`,fp=r.button`
|
|
1987
|
-
position: relative;
|
|
1988
|
-
flex: none;
|
|
1989
|
-
display: grid;
|
|
1990
|
-
place-items: center;
|
|
1991
|
-
width: 18.535px;
|
|
1992
|
-
height: 18.535px;
|
|
1993
|
-
padding: 0;
|
|
1994
|
-
border: 0;
|
|
1995
|
-
background: none;
|
|
1996
|
-
cursor: pointer;
|
|
1997
|
-
color: ${me.text};
|
|
1998
|
-
|
|
1999
|
-
.ico {
|
|
2000
|
-
width: 100%;
|
|
2001
|
-
height: 100%;
|
|
2002
|
-
}
|
|
2003
|
-
/* Keeps the glyph exactly where the design puts it while giving it a tappable hit area. */
|
|
2004
|
-
&::after {
|
|
2005
|
-
content: '';
|
|
2006
|
-
position: absolute;
|
|
2007
|
-
inset: -11px;
|
|
2008
|
-
}
|
|
2009
|
-
&:focus-visible {
|
|
2010
|
-
outline: 2px solid ${me.accent};
|
|
2011
|
-
outline-offset: 2px;
|
|
2012
|
-
}
|
|
2013
|
-
`,mp=r.div`
|
|
2014
|
-
padding: 24px 16px;
|
|
2015
|
-
border-radius: ${Kn.modal};
|
|
2016
|
-
background: ${me.promptLilac};
|
|
2017
|
-
display: flex;
|
|
2018
|
-
flex-direction: column;
|
|
2019
|
-
align-items: center;
|
|
2020
|
-
gap: 16px;
|
|
2021
|
-
text-align: center;
|
|
2022
|
-
`,gp=r.img`
|
|
2023
|
-
flex: none;
|
|
2024
|
-
width: 76px;
|
|
2025
|
-
height: 76px;
|
|
2026
|
-
`,bp=r.h3`
|
|
2027
|
-
margin: 0;
|
|
2028
|
-
font-weight: 700;
|
|
2029
|
-
font-size: 20px;
|
|
2030
|
-
line-height: 1.334;
|
|
2031
|
-
color: ${me.text2};
|
|
2032
|
-
`,gr=r.p`
|
|
2033
|
-
margin: 0;
|
|
2034
|
-
font-weight: 400;
|
|
2035
|
-
font-size: 16px;
|
|
2036
|
-
line-height: 1.334;
|
|
2037
|
-
color: ${me.text2};
|
|
2038
|
-
`,yp=r.div`
|
|
2039
|
-
display: flex;
|
|
2040
|
-
align-items: center;
|
|
2041
|
-
gap: 12px;
|
|
2042
|
-
`,Sa=`
|
|
2043
|
-
flex: 1 1 0;
|
|
2044
|
-
min-width: 0;
|
|
2045
|
-
display: inline-flex;
|
|
2046
|
-
align-items: center;
|
|
2047
|
-
justify-content: center;
|
|
2048
|
-
gap: 12px;
|
|
2049
|
-
height: 46px;
|
|
2050
|
-
padding: 0 12px;
|
|
2051
|
-
border-radius: ${Kn.card};
|
|
2052
|
-
font-family: ${Ia.sans};
|
|
2053
|
-
font-weight: 600;
|
|
2054
|
-
font-size: 13px;
|
|
2055
|
-
line-height: 24px;
|
|
2056
|
-
letter-spacing: 0.46px;
|
|
2057
|
-
text-transform: uppercase;
|
|
2058
|
-
cursor: pointer;
|
|
2059
|
-
transition:
|
|
2060
|
-
background 0.15s ease,
|
|
2061
|
-
color 0.15s ease;
|
|
2062
|
-
|
|
2063
|
-
&:focus-visible {
|
|
2064
|
-
outline: 2px solid ${me.accent};
|
|
2065
|
-
outline-offset: 2px;
|
|
2066
|
-
}
|
|
2067
|
-
`,wp=r.button`
|
|
2068
|
-
${Sa};
|
|
2069
|
-
border: 0.5px solid ${me.text};
|
|
2070
|
-
background: ${me.white};
|
|
2071
|
-
color: ${me.text2};
|
|
2072
|
-
|
|
2073
|
-
&:hover {
|
|
2074
|
-
background: ${me.panel};
|
|
2075
|
-
}
|
|
2076
|
-
`,vp=r.a`
|
|
2077
|
-
${Sa};
|
|
2078
|
-
border: 0;
|
|
2079
|
-
background: ${me.dclRed};
|
|
2080
|
-
color: ${me.softWhite};
|
|
2081
|
-
text-decoration: none;
|
|
2082
|
-
|
|
2083
|
-
&:hover {
|
|
2084
|
-
filter: brightness(1.08);
|
|
2085
|
-
}
|
|
2086
|
-
`,jp=r.span`
|
|
2087
|
-
flex: none;
|
|
2088
|
-
display: grid;
|
|
2089
|
-
place-items: center;
|
|
2090
|
-
width: 24px;
|
|
2091
|
-
height: 24px;
|
|
2092
|
-
|
|
2093
|
-
.ico {
|
|
2094
|
-
width: 100%;
|
|
2095
|
-
height: 100%;
|
|
2096
|
-
}
|
|
2097
|
-
`;function kp(t,s){return`${rt.marketplaceUrl}/contracts/${t}/tokens/${s}`}function $p(t,s){return`${rt.marketplaceUrl}/contracts/${t}/items/${s}`}function br(t){const{contractAddress:s,onClose:l}=t,o=t.variant==="buy",d=t.variant==="buy"?t.itemId:null,u=t.variant==="buy"?null:t.tokenId,x=t.variant==="buy"?$p(s,t.itemId):kp(s,t.tokenId),f=c.useRef(null),m=c.useRef(l);return m.current=l,c.useEffect(()=>{var h;(h=f.current)==null||h.focus();function $(g){g.key==="Escape"&&m.current()}return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[]),e.jsx(up,{role:"presentation",onClick:l,children:e.jsxs(pp,{ref:f,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:$=>$.stopPropagation(),children:[e.jsxs(hp,{children:[e.jsx(xp,{children:n("marketplaceRedirect.title")}),e.jsx(fp,{onClick:l,"aria-label":n("marketplaceRedirect.close"),children:e.jsx(L,{name:"close",className:"ico"})})]}),e.jsxs(mp,{children:[e.jsx(gp,{src:dp,alt:"","aria-hidden":!0}),e.jsx(bp,{children:n("marketplaceRedirect.heading")}),e.jsx(gr,{children:o?n("marketplaceRedirect.buyBody"):n("marketplaceRedirect.body")}),o?e.jsx(gr,{children:n("marketplaceRedirect.buyCurrencyNote")}):null]}),e.jsxs(yp,{children:[e.jsx(wp,{onClick:l,"data-testid":"marketplace-redirect-cancel",children:n("marketplaceRedirect.cancel")}),e.jsxs(vp,{href:x,target:"_blank",rel:"noreferrer","data-testid":"marketplace-redirect-continue",onClick:()=>Z("Shop Redirected To Marketplace",{direction:o?"buy":"resell",contract_address:s,item_id:d,token_id:u}),children:[n("marketplaceRedirect.continue"),e.jsx(jp,{"aria-hidden":!0,children:e.jsx(L,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function Hn(){return rt.shopServerUrl||null}function Aa(){return!!Hn()}async function Cp(t,s,l){const o=Hn();if(!o)return{subscribed:!1};const d=new URLSearchParams({contractAddress:t,itemId:s}),u=`${o}/notify-requests?${d.toString()}`,x=await Zr(u,{method:"GET",identity:l,metadata:{}});if(!x.ok)throw new Error(`getNotifyRequest ${x.status}`);return Sp(x,"getNotifyRequest")}async function Ip(t,s){const l=Hn();if(!l)throw new Error("createNotifyRequest: no shop-server host configured");const o=`${l}/notify-requests`,d=await Zr(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()&&!Ap(u))throw new Error("createNotifyRequest: response was not JSON")}async function Sp(t,s){try{return await t.json()}catch{throw new Error(`${s}: response was not JSON`)}}function Ap(t){try{return JSON.parse(t),!0}catch{return!1}}const{colors:Me,radius:Ma}=i,Ra=gt`
|
|
2098
|
-
display: flex;
|
|
2099
|
-
flex-direction: column;
|
|
2100
|
-
gap: 8px;
|
|
2101
|
-
width: 100%;
|
|
2102
|
-
`,Mp=r.form`
|
|
2103
|
-
${Ra};
|
|
2104
|
-
`,yr=r.div`
|
|
2105
|
-
${Ra};
|
|
2106
|
-
|
|
2107
|
-
&[data-done] {
|
|
2108
|
-
flex-direction: row;
|
|
2109
|
-
align-items: center;
|
|
2110
|
-
gap: 16px;
|
|
2111
|
-
padding: 12px;
|
|
2112
|
-
border-radius: 16px;
|
|
2113
|
-
background: #c1d8c9;
|
|
2114
|
-
}
|
|
2115
|
-
`,Rp=r.label`
|
|
2116
|
-
font-size: 14px;
|
|
2117
|
-
color: ${Me.softWhite};
|
|
2118
|
-
`,Lp=r.div`
|
|
2119
|
-
display: flex;
|
|
2120
|
-
align-items: stretch;
|
|
2121
|
-
gap: 8px;
|
|
2122
|
-
`,Pp=r.input`
|
|
2123
|
-
flex: 1;
|
|
2124
|
-
min-width: 0;
|
|
2125
|
-
height: 42px;
|
|
2126
|
-
padding: 0 16px;
|
|
2127
|
-
border: 1px solid ${Me.fieldBorder};
|
|
2128
|
-
border-radius: ${Ma.btn};
|
|
2129
|
-
background: rgba(255, 255, 255, 0.1);
|
|
2130
|
-
font-size: 16px;
|
|
2131
|
-
color: ${Me.softWhite};
|
|
2132
|
-
|
|
2133
|
-
&::placeholder {
|
|
2134
|
-
color: ${Me.gray4};
|
|
2135
|
-
}
|
|
2136
|
-
&:focus-visible {
|
|
2137
|
-
outline: none;
|
|
2138
|
-
border-color: ${Me.white};
|
|
2139
|
-
box-shadow: 0 0 0 1px ${Me.white};
|
|
2140
|
-
}
|
|
2141
|
-
`,wr=r.button`
|
|
2142
|
-
flex-shrink: 0;
|
|
2143
|
-
height: 40px;
|
|
2144
|
-
padding: 0 12px;
|
|
2145
|
-
border: 0;
|
|
2146
|
-
border-radius: ${Ma.card};
|
|
2147
|
-
background: ${Me.softWhite};
|
|
2148
|
-
color: ${Me.text};
|
|
2149
|
-
font-weight: 600;
|
|
2150
|
-
font-size: 15px;
|
|
2151
|
-
line-height: 24px;
|
|
2152
|
-
text-transform: uppercase;
|
|
2153
|
-
letter-spacing: 0.46px;
|
|
2154
|
-
cursor: pointer;
|
|
2155
|
-
transition: background 0.15s ease;
|
|
2156
|
-
|
|
2157
|
-
&[data-full] {
|
|
2158
|
-
width: 100%;
|
|
2159
|
-
flex-shrink: 1;
|
|
2160
|
-
}
|
|
2161
|
-
&:hover:not(:disabled) {
|
|
2162
|
-
background: ${Me.white};
|
|
2163
|
-
}
|
|
2164
|
-
&:disabled {
|
|
2165
|
-
opacity: 0.5;
|
|
2166
|
-
cursor: default;
|
|
2167
|
-
}
|
|
2168
|
-
`,Ep=r.span`
|
|
2169
|
-
display: inline-flex;
|
|
2170
|
-
align-items: center;
|
|
2171
|
-
justify-content: center;
|
|
2172
|
-
flex-shrink: 0;
|
|
2173
|
-
width: 20px;
|
|
2174
|
-
height: 20px;
|
|
2175
|
-
border-radius: 50%;
|
|
2176
|
-
background: #34ce76;
|
|
2177
|
-
color: ${Me.white};
|
|
2178
|
-
`,Fp=r.span`
|
|
2179
|
-
font-size: 16px;
|
|
2180
|
-
line-height: 1.5;
|
|
2181
|
-
color: ${Me.text2};
|
|
2182
|
-
`;function vr(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim())}function Tp({item:t}){const s=at(S=>S.session),l=at(S=>S.signIn),[o,d]=c.useState(""),[u,x]=c.useState(!1),[f,m]=c.useState(!1),[$,h]=c.useState(null),g=Aa(),y=g&&!!s&&!!t.contractAddress&&!!t.itemId,{data:k}=se({queryKey:["notify-request",t.contractAddress,t.itemId,s==null?void 0:s.address],enabled:y,queryFn:()=>Cp(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 Ns().then(q=>{!S&&q&&d(M=>M||q)}),()=>{S=!0}},[g,s]);const I=f||!!(k!=null&&k.subscribed);async function C(S){if(S.preventDefault(),!(!s||!t.itemId||!vr(o)||u)){x(!0),h(null);try{await Ip({contractAddress:t.contractAddress,itemId:t.itemId,chainId:t.chainId,email:o.trim()},s.identity),m(!0),Z("Shop Requested Notify",{item_id:t.itemId,contract_address:t.contractAddress})}catch(q){pe(q,{flow:"notify-me",contractAddress:t.contractAddress,itemId:t.itemId}),h(n("notifyMe.error"))}finally{x(!1)}}}return g?s?I?e.jsxs(yr,{"data-done":!0,"data-testid":"notify-subscribed",children:[e.jsx(Ep,{"aria-hidden":!0,children:e.jsx(L,{name:"check",size:12})}),e.jsx(Fp,{children:n("notifyMe.subscribedBody")})]}):e.jsxs(Mp,{onSubmit:S=>void C(S),"data-testid":"notify",children:[e.jsx(Rp,{htmlFor:"notify-email",children:n("notifyMe.label")}),e.jsxs(Lp,{children:[e.jsx(Pp,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:n("notifyMe.placeholder"),value:o,onChange:S=>d(S.target.value),"data-testid":"notify-email"}),e.jsx(wr,{type:"submit",disabled:!vr(o)||u,"data-testid":"notify-submit",children:u?n("notifyMe.working"):n("notifyMe.cta")})]}),e.jsx(Qe,{message:$})]}):e.jsx(yr,{"data-testid":"notify",children:e.jsx(wr,{type:"button","data-full":!0,onClick:l,"data-testid":"notify-signin",children:n("notifyMe.signInCta")})}):null}const zp=r.div`
|
|
2183
|
-
display: flex;
|
|
2184
|
-
flex-direction: column;
|
|
2185
|
-
gap: 4px;
|
|
2186
|
-
width: 100%;
|
|
2187
|
-
font-family: ${i.font.sans};
|
|
2188
|
-
`,Np=r.div`
|
|
2189
|
-
display: flex;
|
|
2190
|
-
align-items: flex-start;
|
|
2191
|
-
justify-content: space-between;
|
|
2192
|
-
gap: 12px;
|
|
2193
|
-
font-size: 12px;
|
|
2194
|
-
`,Bp=r.span`
|
|
2195
|
-
font-weight: 600;
|
|
2196
|
-
line-height: 1.57;
|
|
2197
|
-
color: ${i.colors.muted2};
|
|
2198
|
-
/* Drawn in caps, like the PRICE and STOCK labels beside it. Cased here rather than in the string so a
|
|
2199
|
-
translation is not forced to shout in a language where that reads badly. */
|
|
2200
|
-
text-transform: uppercase;
|
|
2201
|
-
white-space: nowrap;
|
|
2202
|
-
`,jr=r.span`
|
|
2203
|
-
/* Sized here, not inherited from the head row: the same element also sits UNDER the bar, outside it. */
|
|
2204
|
-
font-size: 12px;
|
|
2205
|
-
font-weight: 400;
|
|
2206
|
-
line-height: 22px;
|
|
2207
|
-
color: ${i.colors.softWhite};
|
|
2208
|
-
text-transform: lowercase;
|
|
2209
|
-
white-space: nowrap;
|
|
2210
|
-
`,_p=r.div`
|
|
2211
|
-
position: relative;
|
|
2212
|
-
width: 100%;
|
|
2213
|
-
height: 10px;
|
|
2214
|
-
border-radius: 100px;
|
|
2215
|
-
background: rgba(255, 255, 255, 0.2);
|
|
2216
|
-
/* The fill is a child with its own radius; clipping here keeps a full bar's ends round. */
|
|
2217
|
-
overflow: hidden;
|
|
2218
|
-
`,Dp=r.div`
|
|
2219
|
-
position: absolute;
|
|
2220
|
-
left: 0;
|
|
2221
|
-
top: 0;
|
|
2222
|
-
height: 10px;
|
|
2223
|
-
border-radius: 100px;
|
|
2224
|
-
background: ${i.colors.dclRed};
|
|
2225
|
-
transition: width 0.3s ease;
|
|
2226
|
-
|
|
2227
|
-
@media (prefers-reduced-motion: reduce) {
|
|
2228
|
-
transition: none;
|
|
2229
|
-
}
|
|
2230
|
-
`;function Wp({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(zp,{className:l,"data-testid":o,children:[e.jsxs(Np,{children:[e.jsx(Bp,{children:n("offerStock.label")}),e.jsx(jr,{children:n("offerStock.claimed",{claimed:d,total:s})})]}),e.jsx(_p,{role:"progressbar","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":d,"aria-label":n("offerStock.claimed",{claimed:d,total:s}),children:e.jsx(Dp,{style:{width:`${u}%`}})}),e.jsx(jr,{children:n("offerStock.percent",{pct:u})})]})}const qp=new Map(Object.entries(Bs).flatMap(([t,s])=>s.length===1?[[s[0],t]]:[])),ft="/items";function Op(t){return t?`${ft}?rarities=${encodeURIComponent(t.toLowerCase())}`:null}function Kp(t){const s=t.wearableCategory;if(s){const l=qp.get(s);return l?`${ft}?category=wearable&subCategory=${encodeURIComponent(l)}`:`${ft}?category=wearable`}return t.category==="emote"?`${ft}?category=emote`:t.category==="wearable"?`${ft}?category=wearable`:null}function Hp(){return`${ft}?smart=true`}const Up=r(_s)`
|
|
2231
|
-
display: flex;
|
|
2232
|
-
flex-direction: column;
|
|
2233
|
-
overflow: hidden;
|
|
2234
|
-
gap: 1px;
|
|
2235
|
-
background: ${i.colors.lineStrong};
|
|
2236
|
-
|
|
2237
|
-
/* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
|
|
2238
|
-
full height. */
|
|
2239
|
-
& [data-collage-row] {
|
|
2240
|
-
display: flex;
|
|
2241
|
-
flex: 1 1 50%;
|
|
2242
|
-
min-height: 0;
|
|
2243
|
-
gap: 1px;
|
|
2244
|
-
}
|
|
2245
|
-
& [data-collage-row][data-full] {
|
|
2246
|
-
flex-basis: 100%;
|
|
2247
|
-
}
|
|
2248
|
-
& [data-collage-row] img {
|
|
2249
|
-
flex: 1 1 0;
|
|
2250
|
-
min-width: 0;
|
|
2251
|
-
width: 100%;
|
|
2252
|
-
height: 100%;
|
|
2253
|
-
object-fit: cover;
|
|
2254
|
-
display: block;
|
|
2255
|
-
}
|
|
2256
|
-
`;function Qp({contractAddress:t,name:s,items:l,className:o}){const d=st();if(!t||!s)return null;const u=(l??[]).map(m=>m.thumbnail).filter(m=>!!m).slice(0,4),x=u.slice(0,2),f=u.slice(2,4);return e.jsxs(Ds,{as:"button","data-link":!0,className:o,"data-testid":"creator",onClick:m=>{m.stopPropagation(),d(`/collection/${t}`)},children:[u.length>0?e.jsxs(Up,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{"data-collage-row":!0,"data-full":f.length===0||void 0,children:x.map((m,$)=>e.jsx("img",{src:m,alt:""},$))}),f.length>0?e.jsx("span",{"data-collage-row":!0,children:f.map((m,$)=>e.jsx("img",{src:m,alt:""},$))}):null]}):null,e.jsx(Ws,{"data-testid":"creator-name",children:Xt(s)})]})}const{colors:b,radius:Ge,media:de,font:Vp,gradients:Gp}=i,Yp=r.div`
|
|
2257
|
-
max-width: 1721px;
|
|
2258
|
-
margin: 0 auto;
|
|
2259
|
-
|
|
2260
|
-
${de.maxWidth("lg")} {
|
|
2261
|
-
padding-bottom: 88px;
|
|
2262
|
-
}
|
|
2263
|
-
`,Jp=r.nav`
|
|
2264
|
-
display: flex;
|
|
2265
|
-
align-items: center;
|
|
2266
|
-
gap: 8px;
|
|
2267
|
-
font-size: 13px;
|
|
2268
|
-
color: ${b.gray4};
|
|
2269
|
-
margin-bottom: 24px;
|
|
2270
|
-
${ed};
|
|
2271
|
-
`,Xp=r.button`
|
|
2272
|
-
background: none;
|
|
2273
|
-
border: 0;
|
|
2274
|
-
padding: 0;
|
|
2275
|
-
font: inherit;
|
|
2276
|
-
color: ${b.gray4};
|
|
2277
|
-
|
|
2278
|
-
&:hover {
|
|
2279
|
-
color: ${b.white};
|
|
2280
|
-
}
|
|
2281
|
-
`,Zp=r.span`
|
|
2282
|
-
color: ${b.muted2};
|
|
2283
|
-
`,eh=r.span`
|
|
2284
|
-
color: ${b.softWhite};
|
|
2285
|
-
font-weight: 600;
|
|
2286
|
-
`,th=r.div`
|
|
2287
|
-
position: relative;
|
|
2288
|
-
/* Confines the glow's negative z-index, which would otherwise escape to the root stacking context. */
|
|
2289
|
-
isolation: isolate;
|
|
2290
|
-
display: grid;
|
|
2291
|
-
grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
|
|
2292
|
-
gap: 48px;
|
|
2293
|
-
align-items: start;
|
|
2294
|
-
|
|
2295
|
-
/* Preview column width, re-derived from the tracks above so the glow's pivot cannot drift. */
|
|
2296
|
-
--preview-col-w: calc((100% - 48px) * 1045 / 1559);
|
|
2297
|
-
/* Oversized so the glow reaches past the frame while the gradient still finishes fading inside its
|
|
2298
|
-
own box: the radii cannot exceed 50% without ending outside the box and painting a hard rectangle. */
|
|
2299
|
-
--glow-box: 1.76;
|
|
2300
|
-
|
|
2301
|
-
/* Avatar glow, hung off the grid container because the preview frame clips its own overflow. Sits
|
|
2302
|
-
under the frame and, by document order, above the body symbols on the same z-index. */
|
|
2303
|
-
&::before {
|
|
2304
|
-
content: '';
|
|
2305
|
-
position: absolute;
|
|
2306
|
-
z-index: -1;
|
|
2307
|
-
pointer-events: none;
|
|
2308
|
-
top: 0;
|
|
2309
|
-
left: calc(var(--preview-col-w) / 2);
|
|
2310
|
-
width: calc(var(--preview-col-w) * var(--glow-box));
|
|
2311
|
-
aspect-ratio: 1045 / 752;
|
|
2312
|
-
transform: translate(-50%, calc(50% / var(--glow-box) - 50%));
|
|
2313
|
-
background: radial-gradient(
|
|
2314
|
-
50% 50% at 50% 52%,
|
|
2315
|
-
rgb(var(--glow-core, ${b.glowCyanRgb})) 0%,
|
|
2316
|
-
rgb(var(--glow-rgb, ${b.glowCyanRgb}) / 0.9) 20%,
|
|
2317
|
-
45%,
|
|
2318
|
-
rgb(var(--glow-rgb, ${b.glowCyanRgb}) / 0) 100%
|
|
2319
|
-
);
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2322
|
-
${de.maxWidth("lg")} {
|
|
2323
|
-
grid-template-columns: 1fr;
|
|
2324
|
-
gap: 24px;
|
|
2325
|
-
|
|
2326
|
-
/* The track maths is desktop-only; one column puts the pivot nowhere meaningful. */
|
|
2327
|
-
&::before {
|
|
2328
|
-
display: none;
|
|
2329
|
-
}
|
|
2330
|
-
}
|
|
2331
|
-
`,nh=r.div`
|
|
2332
|
-
position: relative;
|
|
2333
|
-
aspect-ratio: 1045 / 752;
|
|
2334
|
-
border-radius: ${Ge.banner};
|
|
2335
|
-
overflow: hidden;
|
|
2336
|
-
|
|
2337
|
-
/* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
|
|
2338
|
-
shell's gutter instead of sitting inside it. No transform, which would make this the containing block
|
|
2339
|
-
for the absolutely-positioned controls below. */
|
|
2340
|
-
${de.maxWidth("lg")} {
|
|
2341
|
-
aspect-ratio: 1 / 1;
|
|
2342
|
-
width: 100vw;
|
|
2343
|
-
margin-left: calc(-50vw + 50%);
|
|
2344
|
-
border-radius: 0;
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
& iframe,
|
|
2348
|
-
& > * {
|
|
2349
|
-
width: 100%;
|
|
2350
|
-
height: 100%;
|
|
2351
|
-
border: 0;
|
|
2352
|
-
display: block;
|
|
2353
|
-
}
|
|
2354
|
-
|
|
2355
|
-
/* Soft edges so legs and the cast shadow dissolve instead of being sliced by the overflow clip — on the
|
|
2356
|
-
iframe alone, so the pills and note stay crisp, and intersected linears rather than one radial, which
|
|
2357
|
-
would round the corners. The bands stay clear of the controls aang draws ~40px inside its canvas. */
|
|
2358
|
-
& iframe {
|
|
2359
|
-
-webkit-mask-image:
|
|
2360
|
-
linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
|
|
2361
|
-
linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
|
|
2362
|
-
-webkit-mask-composite: source-in;
|
|
2363
|
-
mask-image:
|
|
2364
|
-
linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
|
|
2365
|
-
linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
|
|
2366
|
-
mask-composite: intersect;
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
/* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
|
|
2370
|
-
Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
|
|
2371
|
-
above) nor blocks the preview controls. */
|
|
2372
|
-
& > [data-preview-viewport] {
|
|
2373
|
-
position: absolute;
|
|
2374
|
-
inset: 0;
|
|
2375
|
-
pointer-events: none;
|
|
2376
|
-
z-index: 0;
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
& > [data-preview-toggle] {
|
|
2380
|
-
position: absolute;
|
|
2381
|
-
top: 16px;
|
|
2382
|
-
left: 16px;
|
|
2383
|
-
z-index: 2;
|
|
2384
|
-
width: auto;
|
|
2385
|
-
height: auto;
|
|
2386
|
-
display: inline-flex;
|
|
2387
|
-
gap: 2px;
|
|
2388
|
-
padding: 3px;
|
|
2389
|
-
background: rgba(255, 255, 255, 0.92);
|
|
2390
|
-
border: 1px solid ${b.line};
|
|
2391
|
-
border-radius: 999px;
|
|
2392
|
-
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
|
2393
|
-
|
|
2394
|
-
/* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
|
|
2395
|
-
container carries no fill, gap or padding of its own there. */
|
|
2396
|
-
${de.maxWidth("lg")} {
|
|
2397
|
-
top: auto;
|
|
2398
|
-
left: auto;
|
|
2399
|
-
right: 16px;
|
|
2400
|
-
bottom: 16px;
|
|
2401
|
-
gap: 0;
|
|
2402
|
-
padding: 0;
|
|
2403
|
-
background: none;
|
|
2404
|
-
border: 0;
|
|
2405
|
-
box-shadow: none;
|
|
2406
|
-
overflow: hidden;
|
|
2407
|
-
}
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
& > [data-preview-note] {
|
|
2411
|
-
position: absolute;
|
|
2412
|
-
bottom: 14px;
|
|
2413
|
-
left: 50%;
|
|
2414
|
-
transform: translateX(-50%);
|
|
2415
|
-
z-index: 2;
|
|
2416
|
-
width: auto;
|
|
2417
|
-
height: auto;
|
|
2418
|
-
max-width: 88%;
|
|
2419
|
-
margin: 0;
|
|
2420
|
-
text-align: center;
|
|
2421
|
-
background: rgba(22, 21, 24, 0.78);
|
|
2422
|
-
color: ${b.white};
|
|
2423
|
-
font-size: 12px;
|
|
2424
|
-
font-weight: 500;
|
|
2425
|
-
padding: 6px 12px;
|
|
2426
|
-
border-radius: 999px;
|
|
2427
|
-
}
|
|
2428
|
-
|
|
2429
|
-
& > [data-preview-loading] {
|
|
2430
|
-
position: absolute;
|
|
2431
|
-
inset: 0;
|
|
2432
|
-
z-index: 1;
|
|
2433
|
-
display: flex;
|
|
2434
|
-
align-items: center;
|
|
2435
|
-
justify-content: center;
|
|
2436
|
-
width: 100%;
|
|
2437
|
-
height: 100%;
|
|
2438
|
-
background: transparent;
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
|
-
& > [data-fav-preview] {
|
|
2442
|
-
display: none;
|
|
2443
|
-
}
|
|
2444
|
-
|
|
2445
|
-
/* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
|
|
2446
|
-
wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
|
|
2447
|
-
& > [data-play-showcase] {
|
|
2448
|
-
position: absolute;
|
|
2449
|
-
bottom: 16px;
|
|
2450
|
-
left: 16px;
|
|
2451
|
-
z-index: 2;
|
|
2452
|
-
width: auto;
|
|
2453
|
-
height: auto;
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
|
-
${de.maxWidth("lg")} {
|
|
2457
|
-
& > [data-preview-toggle] {
|
|
2458
|
-
top: auto;
|
|
2459
|
-
left: auto;
|
|
2460
|
-
bottom: 12px;
|
|
2461
|
-
right: 12px;
|
|
2462
|
-
gap: 0;
|
|
2463
|
-
padding: 0;
|
|
2464
|
-
background: transparent;
|
|
2465
|
-
border: 0;
|
|
2466
|
-
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2467
|
-
overflow: hidden;
|
|
2468
|
-
}
|
|
2469
|
-
& > [data-fav-preview] {
|
|
2470
|
-
display: inline-flex;
|
|
2471
|
-
position: absolute;
|
|
2472
|
-
top: 12px;
|
|
2473
|
-
right: 12px;
|
|
2474
|
-
z-index: 3;
|
|
2475
|
-
width: auto;
|
|
2476
|
-
min-width: 40px;
|
|
2477
|
-
height: 40px;
|
|
2478
|
-
background: rgba(255, 255, 255, 0.92);
|
|
2479
|
-
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2480
|
-
}
|
|
2481
|
-
& > [data-fav-preview]:hover {
|
|
2482
|
-
background: ${b.white};
|
|
2483
|
-
}
|
|
2484
|
-
}
|
|
2485
|
-
`,ih=r.div``,rh=r.span`
|
|
2486
|
-
position: absolute;
|
|
2487
|
-
inset: 0;
|
|
2488
|
-
width: 100%;
|
|
2489
|
-
height: 100%;
|
|
2490
|
-
border-radius: inherit;
|
|
2491
|
-
`,ah=r.div`
|
|
2492
|
-
display: flex;
|
|
2493
|
-
flex-direction: column;
|
|
2494
|
-
gap: 0;
|
|
2495
|
-
`,sh=r.div`
|
|
2496
|
-
display: flex;
|
|
2497
|
-
align-items: flex-start;
|
|
2498
|
-
justify-content: space-between;
|
|
2499
|
-
gap: 12px;
|
|
2500
|
-
|
|
2501
|
-
${de.maxWidth("lg")} {
|
|
2502
|
-
order: 0;
|
|
2503
|
-
}
|
|
2504
|
-
`,oh=r.h1`
|
|
2505
|
-
font-size: 28px;
|
|
2506
|
-
font-weight: 600;
|
|
2507
|
-
line-height: 34px;
|
|
2508
|
-
color: ${b.softWhite};
|
|
2509
|
-
|
|
2510
|
-
${de.maxWidth("lg")} {
|
|
2511
|
-
font-size: 20px;
|
|
2512
|
-
line-height: 24px;
|
|
2513
|
-
}
|
|
2514
|
-
`,kr=r.button`
|
|
2515
|
-
flex: none;
|
|
2516
|
-
min-width: 40px;
|
|
2517
|
-
height: 40px;
|
|
2518
|
-
padding: 0;
|
|
2519
|
-
border-radius: ${Ge.pill};
|
|
2520
|
-
border: 0;
|
|
2521
|
-
background: rgba(255, 255, 255, 0.16);
|
|
2522
|
-
display: inline-flex;
|
|
2523
|
-
align-items: center;
|
|
2524
|
-
justify-content: center;
|
|
2525
|
-
gap: 6px;
|
|
2526
|
-
color: ${b.softWhite};
|
|
2527
|
-
cursor: pointer;
|
|
2528
|
-
transition:
|
|
2529
|
-
color 0.12s ease,
|
|
2530
|
-
background 0.12s ease;
|
|
2531
|
-
|
|
2532
|
-
&[data-count] {
|
|
2533
|
-
padding: 0 14px 0 12px;
|
|
2534
|
-
}
|
|
2535
|
-
&:hover {
|
|
2536
|
-
background: rgba(255, 255, 255, 0.28);
|
|
2537
|
-
}
|
|
2538
|
-
&[data-on] {
|
|
2539
|
-
color: ${b.dclRed};
|
|
2540
|
-
}
|
|
2541
|
-
|
|
2542
|
-
${de.maxWidth("lg")} {
|
|
2543
|
-
color: ${b.text};
|
|
2544
|
-
&[data-fav-title] {
|
|
2545
|
-
display: none;
|
|
2546
|
-
}
|
|
2547
|
-
}
|
|
2548
|
-
`,$r=r.span`
|
|
2549
|
-
font-size: 13px;
|
|
2550
|
-
font-weight: 600;
|
|
2551
|
-
line-height: 1;
|
|
2552
|
-
color: ${b.softWhite};
|
|
2553
|
-
|
|
2554
|
-
${de.maxWidth("lg")} {
|
|
2555
|
-
color: ${b.text};
|
|
2556
|
-
}
|
|
2557
|
-
`,lh=r.button`
|
|
2558
|
-
display: inline-flex;
|
|
2559
|
-
align-items: center;
|
|
2560
|
-
gap: 8px;
|
|
2561
|
-
padding: 8px 14px;
|
|
2562
|
-
border: 1px solid ${b.line};
|
|
2563
|
-
border-radius: ${Ge.pill};
|
|
2564
|
-
background: rgba(255, 255, 255, 0.94);
|
|
2565
|
-
backdrop-filter: blur(6px);
|
|
2566
|
-
box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
|
|
2567
|
-
color: ${b.text};
|
|
2568
|
-
font-size: 13px;
|
|
2569
|
-
font-weight: 600;
|
|
2570
|
-
cursor: pointer;
|
|
2571
|
-
transition: background 0.12s ease;
|
|
2572
|
-
|
|
2573
|
-
&:hover {
|
|
2574
|
-
background: ${b.white};
|
|
2575
|
-
}
|
|
2576
|
-
&:focus-visible {
|
|
2577
|
-
outline: 2px solid ${b.accent};
|
|
2578
|
-
outline-offset: 2px;
|
|
2579
|
-
}
|
|
2580
|
-
`,ht=r.div`
|
|
2581
|
-
display: inline-flex;
|
|
2582
|
-
align-items: center;
|
|
2583
|
-
gap: 5px;
|
|
2584
|
-
font-size: 12px;
|
|
2585
|
-
font-weight: 500;
|
|
2586
|
-
text-transform: uppercase;
|
|
2587
|
-
letter-spacing: 0;
|
|
2588
|
-
color: ${b.gray4};
|
|
2589
|
-
`,dh=r.div`
|
|
2590
|
-
display: flex;
|
|
2591
|
-
align-items: center;
|
|
2592
|
-
gap: 8px;
|
|
2593
|
-
flex-wrap: wrap;
|
|
2594
|
-
margin-top: 12px;
|
|
2595
|
-
|
|
2596
|
-
${de.maxWidth("lg")} {
|
|
2597
|
-
order: 1;
|
|
2598
|
-
margin-top: 10px;
|
|
2599
|
-
}
|
|
2600
|
-
`,Be=r(Vr)`
|
|
2601
|
-
height: 24px;
|
|
2602
|
-
padding: 0 8px;
|
|
2603
|
-
gap: 3px;
|
|
2604
|
-
font-size: 13px;
|
|
2605
|
-
font-weight: 500;
|
|
2606
|
-
border-radius: 4px;
|
|
2607
|
-
letter-spacing: 0.02em;
|
|
2608
|
-
text-transform: uppercase;
|
|
2609
|
-
background: rgba(255, 255, 255, 0.14);
|
|
2610
|
-
color: ${b.softWhite};
|
|
2611
|
-
|
|
2612
|
-
& .ico {
|
|
2613
|
-
color: ${b.softWhite};
|
|
2614
|
-
}
|
|
2615
|
-
&[data-variant='cat'] {
|
|
2616
|
-
background: rgba(255, 255, 255, 0.14);
|
|
2617
|
-
color: ${b.softWhite};
|
|
2618
|
-
}
|
|
2619
|
-
|
|
2620
|
-
/* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
|
|
2621
|
-
#ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
|
|
2622
|
-
one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
|
|
2623
|
-
&[data-variant='blocked'] {
|
|
2624
|
-
background: rgba(255, 116, 57, 0.2);
|
|
2625
|
-
color: #ff7439;
|
|
2626
|
-
cursor: help;
|
|
2627
|
-
}
|
|
2628
|
-
&[data-variant='blocked']:focus-visible {
|
|
2629
|
-
outline: 2px solid #ff7439;
|
|
2630
|
-
outline-offset: 2px;
|
|
2631
|
-
}
|
|
2632
|
-
`,Qt=r(Be.withComponent(qr))`
|
|
2633
|
-
text-decoration: none;
|
|
2634
|
-
cursor: pointer;
|
|
2635
|
-
transition: background 0.15s ease;
|
|
2636
|
-
|
|
2637
|
-
&:hover,
|
|
2638
|
-
&:focus-visible {
|
|
2639
|
-
background: rgba(255, 255, 255, 0.26);
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
/* The rarity chip carries its own colour inline, so a background hover would be overridden and the
|
|
2643
|
-
chip would look inert. It gets a ring instead, which reads on any fill. */
|
|
2644
|
-
&[data-variant='rarity']:hover,
|
|
2645
|
-
&[data-variant='rarity']:focus-visible {
|
|
2646
|
-
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
|
|
2647
|
-
}
|
|
2648
|
-
`,ch=r.div`
|
|
2649
|
-
display: flex;
|
|
2650
|
-
flex-direction: column;
|
|
2651
|
-
align-items: flex-start;
|
|
2652
|
-
gap: 8px;
|
|
2653
|
-
`,Nn=r(ch)`
|
|
2654
|
-
gap: 11px;
|
|
2655
|
-
`,Cr=r.p`
|
|
2656
|
-
margin: 0;
|
|
2657
|
-
color: ${b.softWhite};
|
|
2658
|
-
font-size: 14px;
|
|
2659
|
-
line-height: 30px;
|
|
2660
|
-
display: -webkit-box;
|
|
2661
|
-
-webkit-box-orient: vertical;
|
|
2662
|
-
-webkit-line-clamp: 4;
|
|
2663
|
-
overflow: hidden;
|
|
2664
|
-
|
|
2665
|
-
&[data-expanded] {
|
|
2666
|
-
-webkit-line-clamp: unset;
|
|
2667
|
-
overflow: visible;
|
|
2668
|
-
}
|
|
2669
|
-
`,uh=r.button`
|
|
2670
|
-
font-size: 13px;
|
|
2671
|
-
align-self: flex-start;
|
|
2672
|
-
`,La=gt`
|
|
2673
|
-
display: grid;
|
|
2674
|
-
grid-template-columns: 1fr 1fr;
|
|
2675
|
-
gap: 16px;
|
|
2676
|
-
`,Pa=r.div`
|
|
2677
|
-
${La};
|
|
2678
|
-
/* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
|
|
2679
|
-
description belongs to the heading block it follows, the creator/collection pair is a new subject. */
|
|
2680
|
-
margin-top: 24px;
|
|
2681
|
-
|
|
2682
|
-
${de.maxWidth("lg")} {
|
|
2683
|
-
order: 3;
|
|
2684
|
-
grid-template-columns: 1fr;
|
|
2685
|
-
/* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
|
|
2686
|
-
gap: 20px;
|
|
2687
|
-
margin-top: 20px;
|
|
2688
|
-
}
|
|
2689
|
-
`,Bn=r.div`
|
|
2690
|
-
min-width: 0;
|
|
2691
|
-
`,Ea=r.div`
|
|
2692
|
-
${La};
|
|
2693
|
-
margin-top: 32px;
|
|
2694
|
-
|
|
2695
|
-
${de.maxWidth("lg")} {
|
|
2696
|
-
order: 2;
|
|
2697
|
-
margin-top: 20px;
|
|
2698
|
-
}
|
|
2699
|
-
`,St=r.div`
|
|
2700
|
-
display: flex;
|
|
2701
|
-
flex-direction: column;
|
|
2702
|
-
gap: 15px;
|
|
2703
|
-
min-width: 0;
|
|
2704
|
-
|
|
2705
|
-
&[data-collection] {
|
|
2706
|
-
align-items: flex-start;
|
|
2707
|
-
}
|
|
2708
|
-
`,Fa=gt`
|
|
2709
|
-
&[data-testid='creator'] {
|
|
2710
|
-
color: ${b.softWhite};
|
|
2711
|
-
font-size: 14px;
|
|
2712
|
-
gap: 12px;
|
|
2713
|
-
}
|
|
2714
|
-
[data-avatar] {
|
|
2715
|
-
width: 48px;
|
|
2716
|
-
height: 48px;
|
|
2717
|
-
}
|
|
2718
|
-
[data-letter] {
|
|
2719
|
-
font-size: 18px;
|
|
2720
|
-
}
|
|
2721
|
-
[data-testid='creator-name'] {
|
|
2722
|
-
color: ${b.softWhite};
|
|
2723
|
-
font-weight: 500;
|
|
2724
|
-
text-decoration: underline;
|
|
2725
|
-
}
|
|
2726
|
-
&[data-link]:hover [data-testid='creator-name'] {
|
|
2727
|
-
color: ${b.gray4};
|
|
2728
|
-
}
|
|
2729
|
-
`,ph=r(Os)`
|
|
2730
|
-
${Fa}
|
|
2731
|
-
`,hh=r(Qp)`
|
|
2732
|
-
${Fa}
|
|
2733
|
-
`,Ta=r.hr`
|
|
2734
|
-
border: 0;
|
|
2735
|
-
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
2736
|
-
margin: 24px 0 0;
|
|
2737
|
-
width: 100%;
|
|
2738
|
-
|
|
2739
|
-
/* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
|
|
2740
|
-
so it closes the price rather than separating it from the description. */
|
|
2741
|
-
${de.maxWidth("lg")} {
|
|
2742
|
-
order: 5;
|
|
2743
|
-
margin-top: 16px;
|
|
2744
|
-
}
|
|
2745
|
-
`,xh=r(qs)`
|
|
2746
|
-
margin-bottom: 12px;
|
|
2747
|
-
`,fh=r.div`
|
|
2748
|
-
margin-top: 16px;
|
|
2749
|
-
/* The design's Pricing frame stacks its rows 16px apart; without it the stock scale sat against the
|
|
2750
|
-
underside of the price and read as part of it. */
|
|
2751
|
-
display: flex;
|
|
2752
|
-
flex-direction: column;
|
|
2753
|
-
gap: 16px;
|
|
2754
|
-
|
|
2755
|
-
${de.maxWidth("lg")} {
|
|
2756
|
-
order: 4;
|
|
2757
|
-
margin-top: 16px;
|
|
2758
|
-
}
|
|
2759
|
-
`,mh=r.div`
|
|
2760
|
-
display: flex;
|
|
2761
|
-
align-items: flex-start;
|
|
2762
|
-
gap: 16px;
|
|
2763
|
-
width: 100%;
|
|
2764
|
-
`,gh=r.div`
|
|
2765
|
-
flex: 1 1 auto;
|
|
2766
|
-
min-width: 0;
|
|
2767
|
-
display: flex;
|
|
2768
|
-
flex-direction: column;
|
|
2769
|
-
gap: 8px;
|
|
2770
|
-
`,Ir=r.div`
|
|
2771
|
-
flex: 0 0 auto;
|
|
2772
|
-
display: flex;
|
|
2773
|
-
flex-direction: column;
|
|
2774
|
-
align-items: flex-end;
|
|
2775
|
-
gap: 8px;
|
|
2776
|
-
text-align: right;
|
|
2777
|
-
`,An=r.div`
|
|
2778
|
-
font-size: 18px;
|
|
2779
|
-
font-weight: 500;
|
|
2780
|
-
line-height: 1;
|
|
2781
|
-
color: ${b.softWhite};
|
|
2782
|
-
|
|
2783
|
-
&[data-out] {
|
|
2784
|
-
font-size: 14px;
|
|
2785
|
-
font-weight: 600;
|
|
2786
|
-
text-transform: uppercase;
|
|
2787
|
-
letter-spacing: 0.02em;
|
|
2788
|
-
color: ${b.gray4};
|
|
2789
|
-
}
|
|
2790
|
-
`,Mn=r.div`
|
|
2791
|
-
font-size: 14px;
|
|
2792
|
-
font-weight: 600;
|
|
2793
|
-
text-transform: uppercase;
|
|
2794
|
-
letter-spacing: 0;
|
|
2795
|
-
color: ${b.muted2};
|
|
2796
|
-
`,Ct=r.div`
|
|
2797
|
-
display: flex;
|
|
2798
|
-
align-items: center;
|
|
2799
|
-
gap: 8px;
|
|
2800
|
-
font-weight: 700;
|
|
2801
|
-
color: ${b.softWhite};
|
|
2802
|
-
|
|
2803
|
-
/* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
|
|
2804
|
-
&[data-variant='none'] {
|
|
2805
|
-
display: inline-flex;
|
|
2806
|
-
align-items: center;
|
|
2807
|
-
gap: 6px;
|
|
2808
|
-
font-size: 14px;
|
|
2809
|
-
font-weight: 600;
|
|
2810
|
-
color: ${b.softWhite};
|
|
2811
|
-
}
|
|
2812
|
-
/*
|
|
2813
|
-
* White, not red. The tag above the title is what announces the discount; painting the number red too
|
|
2814
|
-
* said it a second time and left the price itself the least legible thing in its own row.
|
|
2815
|
-
*/
|
|
2816
|
-
&[data-variant='sale'] {
|
|
2817
|
-
flex-wrap: wrap;
|
|
2818
|
-
gap: 4px 8px;
|
|
2819
|
-
color: ${b.white};
|
|
2820
|
-
}
|
|
2821
|
-
`;r.span`
|
|
2822
|
-
display: flex;
|
|
2823
|
-
align-items: center;
|
|
2824
|
-
gap: 10px;
|
|
2825
|
-
font-weight: 700;
|
|
2826
|
-
color: ${b.dclRed};
|
|
2827
|
-
`;const It=r.span`
|
|
2828
|
-
font-size: 30px;
|
|
2829
|
-
line-height: 1;
|
|
2830
|
-
`,bh=r.span`
|
|
2831
|
-
display: inline-flex;
|
|
2832
|
-
color: ${b.muted2};
|
|
2833
|
-
cursor: help;
|
|
2834
|
-
|
|
2835
|
-
&:focus-visible {
|
|
2836
|
-
outline: 2px solid ${b.accent};
|
|
2837
|
-
outline-offset: 2px;
|
|
2838
|
-
border-radius: ${Ge.chip};
|
|
2839
|
-
}
|
|
2840
|
-
`,yh=r.span`
|
|
2841
|
-
font-size: 24px;
|
|
2842
|
-
font-weight: 700;
|
|
2843
|
-
color: ${b.softWhite};
|
|
2844
|
-
margin-right: -2px;
|
|
2845
|
-
`,wh=r.div`
|
|
2846
|
-
font-size: 13px;
|
|
2847
|
-
margin-top: 6px;
|
|
2848
|
-
color: ${b.gray4};
|
|
2849
|
-
`;r.div`
|
|
2850
|
-
flex-basis: 100%;
|
|
2851
|
-
display: flex;
|
|
2852
|
-
align-items: center;
|
|
2853
|
-
flex-wrap: wrap;
|
|
2854
|
-
gap: 8px 12px;
|
|
2855
|
-
`;const vh=r.div`
|
|
2856
|
-
font-size: 13px;
|
|
2857
|
-
font-weight: 600;
|
|
2858
|
-
color: ${b.dclRed};
|
|
2859
|
-
`,jh=r.span`
|
|
2860
|
-
display: inline-flex;
|
|
2861
|
-
align-items: center;
|
|
2862
|
-
color: ${b.muted2};
|
|
2863
|
-
text-decoration: line-through;
|
|
2864
|
-
font-weight: 400;
|
|
2865
|
-
font-size: 20px;
|
|
2866
|
-
`;r.span`
|
|
2867
|
-
display: inline-flex;
|
|
2868
|
-
align-items: center;
|
|
2869
|
-
background: ${b.dclRed};
|
|
2870
|
-
color: ${b.white};
|
|
2871
|
-
font-weight: 800;
|
|
2872
|
-
font-size: 13px;
|
|
2873
|
-
letter-spacing: 0.03em;
|
|
2874
|
-
text-transform: uppercase;
|
|
2875
|
-
border-radius: 6px;
|
|
2876
|
-
padding: 4px 10px;
|
|
2877
|
-
`;r(No)`
|
|
2878
|
-
display: inline-flex;
|
|
2879
|
-
align-items: center;
|
|
2880
|
-
gap: 5px;
|
|
2881
|
-
background: ${b.rarityBg};
|
|
2882
|
-
color: ${b.accent};
|
|
2883
|
-
font-size: 13px;
|
|
2884
|
-
font-weight: 700;
|
|
2885
|
-
border-radius: 6px;
|
|
2886
|
-
padding: 4px 10px;
|
|
2887
|
-
white-space: nowrap;
|
|
2888
|
-
`;const kh=r.div`
|
|
2889
|
-
display: flex;
|
|
2890
|
-
flex-direction: column;
|
|
2891
|
-
gap: 12px;
|
|
2892
|
-
margin-top: 20px;
|
|
2893
|
-
|
|
2894
|
-
${de.maxWidth("lg")} {
|
|
2895
|
-
order: 6;
|
|
2896
|
-
|
|
2897
|
-
&[data-buttons] {
|
|
2898
|
-
position: fixed;
|
|
2899
|
-
left: 0;
|
|
2900
|
-
right: 0;
|
|
2901
|
-
bottom: 0;
|
|
2902
|
-
z-index: 40;
|
|
2903
|
-
margin-top: 0;
|
|
2904
|
-
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
|
2905
|
-
background: #2b0e44;
|
|
2906
|
-
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
|
|
2907
|
-
}
|
|
2908
|
-
&[data-dual] {
|
|
2909
|
-
flex-direction: row;
|
|
2910
|
-
align-items: stretch;
|
|
2911
|
-
gap: 12px;
|
|
2912
|
-
}
|
|
2913
|
-
}
|
|
2914
|
-
`,en=gt`
|
|
2915
|
-
&& {
|
|
2916
|
-
width: 100%;
|
|
2917
|
-
height: 48px;
|
|
2918
|
-
border-radius: 16px;
|
|
2919
|
-
padding: 0 12px;
|
|
2920
|
-
display: flex;
|
|
2921
|
-
align-items: center;
|
|
2922
|
-
justify-content: center;
|
|
2923
|
-
gap: 8px;
|
|
2924
|
-
font-size: 15px;
|
|
2925
|
-
font-weight: 600;
|
|
2926
|
-
line-height: 24px;
|
|
2927
|
-
letter-spacing: 0.46px;
|
|
2928
|
-
text-transform: uppercase;
|
|
2929
|
-
}
|
|
2930
|
-
`,Rn=r(Ve)`
|
|
2931
|
-
${en};
|
|
2932
|
-
/* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
|
|
2933
|
-
cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
|
|
2934
|
-
sampled off the flattened render rather than the node's fill. */
|
|
2935
|
-
&& {
|
|
2936
|
-
background: ${Gp.buyBtn};
|
|
2937
|
-
}
|
|
2938
|
-
&&::before {
|
|
2939
|
-
content: none;
|
|
2940
|
-
}
|
|
2941
|
-
&&:hover:not(:disabled) {
|
|
2942
|
-
background-image: linear-gradient(${b.dclRed}, ${b.dclRed});
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
${de.maxWidth("lg")} {
|
|
2946
|
-
[data-dual] && {
|
|
2947
|
-
flex: 1 1 auto;
|
|
2948
|
-
width: auto;
|
|
2949
|
-
}
|
|
2950
|
-
}
|
|
2951
|
-
`,$h=r(Ve)`
|
|
2952
|
-
${en};
|
|
2953
|
-
&& {
|
|
2954
|
-
background: ${b.blackBtn};
|
|
2955
|
-
color: ${b.softWhite};
|
|
2956
|
-
border: 0;
|
|
2957
|
-
|
|
2958
|
-
.ico {
|
|
2959
|
-
width: 20px;
|
|
2960
|
-
height: 20px;
|
|
2961
|
-
}
|
|
2962
|
-
}
|
|
2963
|
-
&&:hover:not(:disabled) {
|
|
2964
|
-
background: ${b.blackBtn};
|
|
2965
|
-
filter: brightness(1.35);
|
|
2966
|
-
}
|
|
2967
|
-
`,Sr=r.button`
|
|
2968
|
-
align-self: center;
|
|
2969
|
-
border: 0;
|
|
2970
|
-
background: none;
|
|
2971
|
-
padding: 8px 0;
|
|
2972
|
-
color: ${i.colors.accent};
|
|
2973
|
-
font-weight: 600;
|
|
2974
|
-
font-size: 13px;
|
|
2975
|
-
line-height: 24px;
|
|
2976
|
-
letter-spacing: 0.46px;
|
|
2977
|
-
text-transform: uppercase;
|
|
2978
|
-
text-decoration: underline;
|
|
2979
|
-
cursor: pointer;
|
|
2980
|
-
|
|
2981
|
-
/* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
|
|
2982
|
-
but invisible against it. Not a change to the shared colour: the other uses live inside
|
|
2983
|
-
GaslessNotice, whose light fill is what that accent was picked for. */
|
|
2984
|
-
&[data-on-purple] {
|
|
2985
|
-
color: ${i.colors.white};
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
|
-
&:disabled {
|
|
2989
|
-
opacity: 0.5;
|
|
2990
|
-
cursor: default;
|
|
2991
|
-
}
|
|
2992
|
-
`,Ch=r(Ve)`
|
|
2993
|
-
${en};
|
|
2994
|
-
&& {
|
|
2995
|
-
background: rgba(255, 255, 255, 0.2);
|
|
2996
|
-
color: ${b.softWhite};
|
|
2997
|
-
border: 0;
|
|
2998
|
-
|
|
2999
|
-
.ico {
|
|
3000
|
-
width: 20px;
|
|
3001
|
-
height: 20px;
|
|
3002
|
-
}
|
|
3003
|
-
}
|
|
3004
|
-
&&:hover:not(:disabled) {
|
|
3005
|
-
background: rgba(255, 255, 255, 0.3);
|
|
3006
|
-
}
|
|
3007
|
-
&&:disabled {
|
|
3008
|
-
opacity: 0.5;
|
|
3009
|
-
}
|
|
3010
|
-
`,Ar=r(Ve)`
|
|
3011
|
-
${en};
|
|
3012
|
-
&& {
|
|
3013
|
-
background: rgba(0, 0, 0, 0.4);
|
|
3014
|
-
color: ${b.white};
|
|
3015
|
-
border: 0;
|
|
3016
|
-
}
|
|
3017
|
-
&&:hover:not(:disabled) {
|
|
3018
|
-
background: rgba(0, 0, 0, 0.55);
|
|
3019
|
-
}
|
|
3020
|
-
&&:disabled {
|
|
3021
|
-
opacity: 0.5;
|
|
3022
|
-
}
|
|
3023
|
-
`,Ln=r.span`
|
|
3024
|
-
display: none;
|
|
3025
|
-
align-items: center;
|
|
3026
|
-
gap: 6px;
|
|
3027
|
-
|
|
3028
|
-
${de.maxWidth("lg")} {
|
|
3029
|
-
[data-dual] & {
|
|
3030
|
-
display: inline-flex;
|
|
3031
|
-
}
|
|
3032
|
-
}
|
|
3033
|
-
`,Mr=r.button`
|
|
3034
|
-
width: 100%;
|
|
3035
|
-
height: 48px;
|
|
3036
|
-
display: flex;
|
|
3037
|
-
align-items: center;
|
|
3038
|
-
justify-content: center;
|
|
3039
|
-
gap: 8px;
|
|
3040
|
-
/* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
|
|
3041
|
-
treatment as the card's ADD TO CART. */
|
|
3042
|
-
background: rgba(255, 255, 255, 0.2);
|
|
3043
|
-
color: ${b.softWhite};
|
|
3044
|
-
border: 0;
|
|
3045
|
-
border-radius: 16px;
|
|
3046
|
-
font-weight: 600;
|
|
3047
|
-
font-size: 15px;
|
|
3048
|
-
text-transform: uppercase;
|
|
3049
|
-
letter-spacing: 0.46px;
|
|
3050
|
-
cursor: pointer;
|
|
3051
|
-
transition: background 0.15s ease;
|
|
3052
|
-
|
|
3053
|
-
&:hover:not(:disabled) {
|
|
3054
|
-
background: ${b.softWhite};
|
|
3055
|
-
color: ${b.text2};
|
|
3056
|
-
}
|
|
3057
|
-
&:disabled {
|
|
3058
|
-
background: rgba(255, 255, 255, 0.12);
|
|
3059
|
-
color: rgba(252, 252, 252, 0.7);
|
|
3060
|
-
cursor: default;
|
|
3061
|
-
}
|
|
3062
|
-
|
|
3063
|
-
${de.maxWidth("lg")} {
|
|
3064
|
-
[data-dual] & {
|
|
3065
|
-
flex: 0 0 auto;
|
|
3066
|
-
width: 56px;
|
|
3067
|
-
padding: 0;
|
|
3068
|
-
}
|
|
3069
|
-
[data-dual] & .ico {
|
|
3070
|
-
margin: 0;
|
|
3071
|
-
}
|
|
3072
|
-
}
|
|
3073
|
-
`,Rr=r.span`
|
|
3074
|
-
${de.maxWidth("lg")} {
|
|
3075
|
-
[data-dual] & {
|
|
3076
|
-
display: none;
|
|
3077
|
-
}
|
|
3078
|
-
}
|
|
3079
|
-
`,Ih=r.p`
|
|
3080
|
-
margin: 12px 0 0;
|
|
3081
|
-
font-size: 13px;
|
|
3082
|
-
color: ${b.gray4};
|
|
3083
|
-
|
|
3084
|
-
& a {
|
|
3085
|
-
color: ${b.softWhite};
|
|
3086
|
-
font-weight: 600;
|
|
3087
|
-
}
|
|
3088
|
-
`;r.p`
|
|
3089
|
-
margin: 4px 0 0;
|
|
3090
|
-
font-size: 13px;
|
|
3091
|
-
color: ${b.gray4};
|
|
3092
|
-
|
|
3093
|
-
& a {
|
|
3094
|
-
color: ${b.accent};
|
|
3095
|
-
font-weight: 600;
|
|
3096
|
-
}
|
|
3097
|
-
`;const Sh=r.div`
|
|
3098
|
-
max-width: 1721px;
|
|
3099
|
-
margin: 0 auto;
|
|
3100
|
-
min-height: 46vh;
|
|
3101
|
-
display: flex;
|
|
3102
|
-
flex-direction: column;
|
|
3103
|
-
align-items: center;
|
|
3104
|
-
justify-content: center;
|
|
3105
|
-
text-align: center;
|
|
3106
|
-
gap: 14px;
|
|
3107
|
-
color: ${b.softWhite};
|
|
3108
|
-
`,Ah=r.p`
|
|
3109
|
-
margin: 0;
|
|
3110
|
-
color: ${b.gray4};
|
|
3111
|
-
`,Mh=r(Ve)`
|
|
3112
|
-
margin-top: 6px;
|
|
3113
|
-
`,Rh=r(L)`
|
|
3114
|
-
opacity: 0.4;
|
|
3115
|
-
`,Lh=r.h1`
|
|
3116
|
-
font-size: 22px;
|
|
3117
|
-
`,Ph=r.div`
|
|
3118
|
-
display: flex;
|
|
3119
|
-
flex-direction: column;
|
|
3120
|
-
`,Lr=r.span`
|
|
3121
|
-
display: block;
|
|
3122
|
-
height: 15px;
|
|
3123
|
-
width: 84px;
|
|
3124
|
-
border-radius: 4px;
|
|
3125
|
-
`,Eh=r.div`
|
|
3126
|
-
display: flex;
|
|
3127
|
-
flex-direction: column;
|
|
3128
|
-
align-self: stretch;
|
|
3129
|
-
gap: 16px;
|
|
3130
|
-
padding: 8px 0;
|
|
3131
|
-
`,Fh=r.span`
|
|
3132
|
-
display: inline-flex;
|
|
3133
|
-
align-items: center;
|
|
3134
|
-
height: 48px;
|
|
3135
|
-
gap: 10px;
|
|
3136
|
-
background: none !important;
|
|
3137
|
-
|
|
3138
|
-
&::before,
|
|
3139
|
-
&::after {
|
|
3140
|
-
content: '';
|
|
3141
|
-
display: block;
|
|
3142
|
-
}
|
|
3143
|
-
&::before {
|
|
3144
|
-
width: 40px;
|
|
3145
|
-
height: 40px;
|
|
3146
|
-
border-radius: 50%;
|
|
3147
|
-
background: ${b.media};
|
|
3148
|
-
}
|
|
3149
|
-
&::after {
|
|
3150
|
-
width: 96px;
|
|
3151
|
-
height: 14px;
|
|
3152
|
-
border-radius: 6px;
|
|
3153
|
-
background: ${b.media};
|
|
3154
|
-
}
|
|
3155
|
-
`,Th=r.span`
|
|
3156
|
-
height: 34px;
|
|
3157
|
-
width: 70%;
|
|
3158
|
-
margin: 3px 0;
|
|
3159
|
-
border-radius: 8px;
|
|
3160
|
-
`,zh=r.div`
|
|
3161
|
-
display: flex;
|
|
3162
|
-
gap: 8px;
|
|
3163
|
-
/* Same as Chips above, so the row does not move when the real chips arrive. */
|
|
3164
|
-
margin-top: 12px;
|
|
3165
|
-
`,Pn=r.span`
|
|
3166
|
-
height: 24px;
|
|
3167
|
-
width: 88px;
|
|
3168
|
-
border-radius: 6px;
|
|
3169
|
-
`,En=r.span`
|
|
3170
|
-
height: 14px;
|
|
3171
|
-
width: 100%;
|
|
3172
|
-
border-radius: 6px;
|
|
3173
|
-
|
|
3174
|
-
&[data-short] {
|
|
3175
|
-
width: 55%;
|
|
3176
|
-
}
|
|
3177
|
-
`,Nh=r.span`
|
|
3178
|
-
display: block;
|
|
3179
|
-
height: 30px;
|
|
3180
|
-
width: 40%;
|
|
3181
|
-
margin: 16px 0 13px;
|
|
3182
|
-
border-radius: 8px;
|
|
3183
|
-
`,Bh=r.span`
|
|
3184
|
-
display: block;
|
|
3185
|
-
height: 42px;
|
|
3186
|
-
width: 100%;
|
|
3187
|
-
border-radius: 8px;
|
|
3188
|
-
margin-top: 20px;
|
|
3189
|
-
`,Vt=r(Re)`
|
|
3190
|
-
width: 30px;
|
|
3191
|
-
height: 30px;
|
|
3192
|
-
color: ${b.softWhite};
|
|
3193
|
-
|
|
3194
|
-
&[data-was] {
|
|
3195
|
-
width: 20px;
|
|
3196
|
-
height: 20px;
|
|
3197
|
-
color: ${b.gray4};
|
|
3198
|
-
}
|
|
3199
|
-
`,Fn=r(Re)`
|
|
3200
|
-
width: 20px;
|
|
3201
|
-
height: 20px;
|
|
3202
|
-
`,_h=r.div`
|
|
3203
|
-
display: flex;
|
|
3204
|
-
align-items: center;
|
|
3205
|
-
justify-content: space-between;
|
|
3206
|
-
gap: 8px;
|
|
3207
|
-
padding: 8px;
|
|
3208
|
-
margin: 16px 0;
|
|
3209
|
-
border-radius: ${Ge.btn};
|
|
3210
|
-
background: rgba(22, 21, 24, 0.55);
|
|
3211
|
-
`,Dh=r.span`
|
|
3212
|
-
display: flex;
|
|
3213
|
-
align-items: center;
|
|
3214
|
-
gap: 8px;
|
|
3215
|
-
font-size: 14px;
|
|
3216
|
-
line-height: 14px;
|
|
3217
|
-
color: ${b.softWhite};
|
|
3218
|
-
`,Wh=r(L)`
|
|
3219
|
-
width: 20px;
|
|
3220
|
-
height: 20px;
|
|
3221
|
-
color: ${b.softWhite};
|
|
3222
|
-
`,qh=r(L)`
|
|
3223
|
-
width: 24px;
|
|
3224
|
-
height: 24px;
|
|
3225
|
-
color: ${b.white};
|
|
3226
|
-
`,Oh=r.div`
|
|
3227
|
-
display: flex;
|
|
3228
|
-
align-items: center;
|
|
3229
|
-
justify-content: space-between;
|
|
3230
|
-
gap: 8px;
|
|
3231
|
-
width: 100%;
|
|
3232
|
-
margin-top: 16px;
|
|
3233
|
-
|
|
3234
|
-
&[data-centered] {
|
|
3235
|
-
justify-content: center;
|
|
3236
|
-
}
|
|
3237
|
-
`,Kh=r.span`
|
|
3238
|
-
display: flex;
|
|
3239
|
-
align-items: center;
|
|
3240
|
-
gap: 2px;
|
|
3241
|
-
font-size: 14px;
|
|
3242
|
-
font-weight: 600;
|
|
3243
|
-
color: ${b.gray4};
|
|
3244
|
-
|
|
3245
|
-
& .ico {
|
|
3246
|
-
width: 20px;
|
|
3247
|
-
height: 20px;
|
|
3248
|
-
color: ${b.gray4};
|
|
3249
|
-
}
|
|
3250
|
-
`,Hh=r.span`
|
|
3251
|
-
font-size: 16px;
|
|
3252
|
-
font-weight: 700;
|
|
3253
|
-
padding-left: 2px;
|
|
3254
|
-
`,_n=r.button`
|
|
3255
|
-
border: 0;
|
|
3256
|
-
background: none;
|
|
3257
|
-
padding: 0;
|
|
3258
|
-
cursor: pointer;
|
|
3259
|
-
font-family: ${Vp.sans};
|
|
3260
|
-
font-size: 13px;
|
|
3261
|
-
font-weight: 600;
|
|
3262
|
-
letter-spacing: 0.46px;
|
|
3263
|
-
text-transform: uppercase;
|
|
3264
|
-
text-decoration: underline;
|
|
3265
|
-
color: ${b.softWhite};
|
|
3266
|
-
|
|
3267
|
-
&:hover {
|
|
3268
|
-
color: ${b.gray4};
|
|
3269
|
-
}
|
|
3270
|
-
&:focus-visible {
|
|
3271
|
-
outline: 2px solid ${b.white};
|
|
3272
|
-
outline-offset: 2px;
|
|
3273
|
-
border-radius: ${Ge.chip};
|
|
3274
|
-
}
|
|
3275
|
-
`,Uh=r(_n)`
|
|
3276
|
-
width: 100%;
|
|
3277
|
-
height: 40px;
|
|
3278
|
-
text-align: center;
|
|
3279
|
-
border-radius: ${Ge.card};
|
|
3280
|
-
|
|
3281
|
-
/* Hover is a translucent fill with the label left alone (Figma 868:67246), not the colour shift
|
|
3282
|
-
ResellersLink uses. That one is an inline link sitting beside a price, where dimming the text is the
|
|
3283
|
-
only surface there is; this is a full-width button, so the button itself is what should react. */
|
|
3284
|
-
&:hover {
|
|
3285
|
-
color: ${b.softWhite};
|
|
3286
|
-
background: ${b.glass};
|
|
3287
|
-
}
|
|
3288
|
-
`,Qh=r.div`
|
|
3289
|
-
display: flex;
|
|
3290
|
-
flex-direction: column;
|
|
3291
|
-
gap: 16px;
|
|
3292
|
-
width: 100%;
|
|
3293
|
-
padding: 16px 0;
|
|
3294
|
-
`,Pr=r.div`
|
|
3295
|
-
display: flex;
|
|
3296
|
-
align-items: center;
|
|
3297
|
-
justify-content: space-between;
|
|
3298
|
-
gap: 8px;
|
|
3299
|
-
width: 100%;
|
|
3300
|
-
|
|
3301
|
-
&[data-variant='original'] {
|
|
3302
|
-
color: ${b.muted2};
|
|
3303
|
-
}
|
|
3304
|
-
`,Er=r.span`
|
|
3305
|
-
display: flex;
|
|
3306
|
-
align-items: center;
|
|
3307
|
-
gap: 4px;
|
|
3308
|
-
font-size: 14px;
|
|
3309
|
-
font-weight: 600;
|
|
3310
|
-
|
|
3311
|
-
[data-variant='original'] & {
|
|
3312
|
-
color: ${b.muted2};
|
|
3313
|
-
}
|
|
3314
|
-
[data-variant='resale'] & {
|
|
3315
|
-
color: ${b.text};
|
|
3316
|
-
}
|
|
3317
|
-
`,Fr=r.span`
|
|
3318
|
-
display: flex;
|
|
3319
|
-
align-items: center;
|
|
3320
|
-
gap: 2px;
|
|
3321
|
-
padding: 0 2px;
|
|
3322
|
-
|
|
3323
|
-
[data-variant='original'] & .ico {
|
|
3324
|
-
width: 20px;
|
|
3325
|
-
height: 20px;
|
|
3326
|
-
color: ${b.muted2};
|
|
3327
|
-
}
|
|
3328
|
-
[data-variant='resale'] & .ico {
|
|
3329
|
-
width: 24px;
|
|
3330
|
-
height: 24px;
|
|
3331
|
-
color: ${b.rarity};
|
|
3332
|
-
}
|
|
3333
|
-
`,Tr=r.span`
|
|
3334
|
-
[data-variant='original'] & {
|
|
3335
|
-
font-size: 16px;
|
|
3336
|
-
font-weight: 700;
|
|
3337
|
-
text-decoration: line-through;
|
|
3338
|
-
}
|
|
3339
|
-
[data-variant='resale'] & {
|
|
3340
|
-
font-size: 25px;
|
|
3341
|
-
font-weight: 700;
|
|
3342
|
-
color: ${b.text};
|
|
3343
|
-
}
|
|
3344
|
-
`,Vh=r.span`
|
|
3345
|
-
font-size: 14px;
|
|
3346
|
-
font-weight: 600;
|
|
3347
|
-
|
|
3348
|
-
[data-variant='original'] & {
|
|
3349
|
-
color: ${b.muted2};
|
|
3350
|
-
}
|
|
3351
|
-
`,Gh=r.span`
|
|
3352
|
-
font-size: 14px;
|
|
3353
|
-
font-weight: 600;
|
|
3354
|
-
color: ${b.text2};
|
|
3355
|
-
`,zr=r.span`
|
|
3356
|
-
display: inline-flex;
|
|
3357
|
-
width: 12px;
|
|
3358
|
-
height: 12px;
|
|
3359
|
-
color: ${b.muted2};
|
|
3360
|
-
`,Yh=r.div`
|
|
3361
|
-
display: flex;
|
|
3362
|
-
flex-direction: column;
|
|
3363
|
-
gap: 12px;
|
|
3364
|
-
width: 100%;
|
|
3365
|
-
`,Jh=r.div`
|
|
3366
|
-
display: flex;
|
|
3367
|
-
justify-content: center;
|
|
3368
|
-
`,tn=gt`
|
|
3369
|
-
display: block;
|
|
3370
|
-
background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
|
|
3371
|
-
background-size: 200% 100%;
|
|
3372
|
-
animation: shimmer 1.4s infinite linear;
|
|
3373
|
-
|
|
3374
|
-
@media (prefers-reduced-motion: reduce) {
|
|
3375
|
-
animation: none;
|
|
3376
|
-
}
|
|
3377
|
-
`,Xh=r.div`
|
|
3378
|
-
display: flex;
|
|
3379
|
-
flex-direction: column;
|
|
3380
|
-
gap: 12px;
|
|
3381
|
-
width: 100%;
|
|
3382
|
-
/* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
|
|
3383
|
-
padding-top: 4px;
|
|
3384
|
-
`,Zh=r.span`
|
|
3385
|
-
${tn};
|
|
3386
|
-
width: 120px;
|
|
3387
|
-
height: 30px;
|
|
3388
|
-
border-radius: ${Ge.btn};
|
|
3389
|
-
margin-bottom: 4px;
|
|
3390
|
-
`,Nr=r.span`
|
|
3391
|
-
${tn};
|
|
3392
|
-
width: 100%;
|
|
3393
|
-
height: 48px;
|
|
3394
|
-
border-radius: 16px;
|
|
3395
|
-
`,Br=r.div`
|
|
3396
|
-
display: flex;
|
|
3397
|
-
align-items: center;
|
|
3398
|
-
gap: 12px;
|
|
3399
|
-
`,_r=r.span`
|
|
3400
|
-
${tn};
|
|
3401
|
-
flex: none;
|
|
3402
|
-
width: 48px;
|
|
3403
|
-
height: 48px;
|
|
3404
|
-
border-radius: 50%;
|
|
3405
|
-
`,Dr=r.span`
|
|
3406
|
-
${tn};
|
|
3407
|
-
width: 96px;
|
|
3408
|
-
height: 16px;
|
|
3409
|
-
border-radius: 6px;
|
|
3410
|
-
`;function ex(t){return Object.values(Ae.Rarity).includes(t)}function tx(t){return t==="male"?n("itemDetail.genderMale"):t==="female"?n("itemDetail.genderFemale"):t==="unisex"?n("itemDetail.genderUnisex"):null}function Gt(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?n("itemDetail.categoryEmote"):n("itemDetail.categoryWearable")}const Wr=8;function Ex(){const{pathname:t}=Or();return e.jsx(nx,{},t)}function nx(){var Ii,Si,Ai;const{contractAddress:t,itemId:s,tokenId:l}=Za(),o=hn(t),d=Su(o),u=hn(s),x=hn(l),f=!!x,m=u??id(x)??null,$=Or(),h=$.state,g=st(),y=!!(h!=null&&h.market),k=(h==null?void 0:h.marketPriceCredits)??null,I=ot(),C=At(p=>p.add),S=So(p=>p.spent),q=At(p=>p.items),M=Ks(p=>p.toggle),{session:w,signIn:U}=at(),[a,K]=c.useState(()=>{if(h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};return f?{...p,tokenId:x,itemId:p.itemId??m}:{...p,tokenId:void 0,itemId:u??p.itemId}}return{id:`${o}-${x??u}`,name:"",creator:"",contractAddress:o??"",itemId:m,category:"wearable",rarity:"common",network:"MATIC",chainId:rt.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:x??void 0,tradeId:h==null?void 0:h.tradeId}}),[J,A]=c.useState(!1),[T,X]=c.useState(!!(h!=null&&h.resumeBuy));c.useEffect(()=>{h!=null&&h.resumeBuy&&A(!0)},[h==null?void 0:h.resumeBuy]);function V(){const p=a.priceCredits>0?a.priceCredits:null;Z("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:p,cart_value_usd:p===null?null:lo(p)}),A(!0)}function oe(){if(w){V();return}y||Lo({type:"item-buy",path:$.pathname}),U()}const ce=c.useRef(!1);c.useEffect(()=>{if(!w||ce.current)return;const p=Ao("item-buy");!p||p.path!==$.pathname||(ce.current=!0,X(!0),V())},[w]);const ie=c.useMemo(()=>a.contractAddress&&(a.itemId??m)?[`${a.contractAddress.toLowerCase()}-${a.itemId??m}`]:void 0,[a.contractAddress,a.itemId,m]),O=Hs(Wr,{exclude:ie}),N=Us({enabled:O.enabled,hasSignal:O.hasSignal,isLoading:O.isLoading,isError:O.isError,personalized:(Ii=O.result)==null?void 0:Ii.personalized,rowCount:((Si=O.result)==null?void 0:Si.data.length)??0}),{items:D,isCollectionOnly:v,siblings:re,siblingsFetched:R}=Iu({id:a.id,contractAddress:a.contractAddress,itemId:a.itemId??m,tokenId:a.tokenId,creator:a.creator}),{data:z,isLoading:B}=se({queryKey:["shop-item",a.contractAddress,m],enabled:!y&&!f&&!!a.contractAddress&&!!m,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>uo(a.contractAddress,m)}),H=f?void 0:z;c.useEffect(()=>{H&&K(p=>p.tradeId?{...p,tradeId:H.tradeId,priceCredits:H.priceCredits,manaWei:H.manaWei,available:H.available??p.available,acquisition:H.acquisition,wearableCategory:p.wearableCategory??H.wearableCategory}:{...p,...H})},[H]);const[ae,ve]=c.useState(!1),{data:ee=""}=se({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>po(a.contractAddress,a.itemId)}),{data:G,isLoading:te}=se({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>Qr(a.contractAddress)});c.useEffect(()=>{const p=(H==null?void 0:H.creator)||(G==null?void 0:G.creator);p&&K(le=>le.creator?le:{...le,creator:p})},[H,G]);const fe=c.useMemo(()=>{if(!(f||a.name||H||re.length===0))return(m?re.find(p=>p.itemId===m):void 0)??re.find(p=>p.contractAddress===a.contractAddress)},[f,a.name,a.contractAddress,H,re,m]);c.useEffect(()=>{fe&&K(p=>({...fe,tradeId:p.tradeId??fe.tradeId}))},[fe]);const{data:je,isLoading:ke}=se({queryKey:["detail-trade",a.id,a.tradeId,a.contractAddress,a.itemId],enabled:!!a.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(a.tradeId)return a.tradeId;if(!f&&a.itemId){const p=await ho(a.contractAddress,a.itemId);return(p==null?void 0:p.id)??null}return null}}),{data:Y}=se({queryKey:["item-traits",a.contractAddress,m],enabled:!!a.contractAddress&&!!m,staleTime:5*6e4,retry:1,queryFn:()=>xo(a.contractAddress,m)}),lt=(Y==null?void 0:Y.isSmart)??a.isSmart,Le=(Y==null?void 0:Y.utility)??null,$e=c.useMemo(()=>({...a,wearableCategory:a.wearableCategory??(Y==null?void 0:Y.wearableCategory)??void 0,gender:a.gender??(Y==null?void 0:Y.gender)??null}),[a,Y==null?void 0:Y.wearableCategory,Y==null?void 0:Y.gender]),bt=(Y==null?void 0:Y.urn)??null,{data:Rt}=se({queryKey:["item-vrm",bt],enabled:!!bt&&a.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>fo(bt)}),[nn,Lt]=c.useState(!1),{data:yt}=se({queryKey:["item-video",a.contractAddress,m],enabled:lt&&!!a.contractAddress&&!!m,staleTime:30*6e4,retry:!1,queryFn:()=>_o(a.contractAddress,m)}),Ce=c.useMemo(()=>a.emoteLoop!==void 0?a:(m?re.find(le=>le.itemId===m):void 0)??a,[a,re,m]),Pe=qi(I,a.tradeId)??qi(I,je),rn=a.acquisition==="store"&&(a.available??0)>0,ue=!!Pe||rn,dt=Qs(),{data:Ee=[]}=se({queryKey:["item-resales",a.contractAddress,a.itemId],enabled:dt&&!y&&!!a.contractAddress&&!!a.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Xr(a.contractAddress,a.itemId)}),Ke=Ee.length>0?Ee[0].priceCredits:null,Ye=f&&a.tokenId?Ee.find(p=>p.tokenId===a.tokenId)??null:null,Ie=c.useMemo(()=>{const p=Ee[0];return p?{...p,name:p.name||a.name,thumbnail:p.thumbnail||a.thumbnail,rarity:p.rarity||a.rarity,category:p.category||a.category,wearableCategory:p.wearableCategory??a.wearableCategory,gender:p.gender??a.gender}:null},[Ee,a]),[Pt,wt]=c.useState(null),[vt,Je]=c.useState(!1),[an,j]=c.useState(!1),[P,F]=c.useState(!1),E=a.manaWei??null,{data:Q}=Jr(y||!!E),ne=E&&Q?Vs(E,Q):null;c.useEffect(()=>{ne!=null&&K(p=>p.priceCredits===ne?p:{...p,priceCredits:ne})},[ne,a.priceCredits]);const W=c.useMemo(()=>{if(!y||!(h!=null&&h.item))return null;const p=h.item;return p.manaWei?{tradeId:p.tradeId??p.id,listingType:"primary",contractAddress:p.contractAddress,itemId:p.itemId??"",name:p.name,thumbnail:p.thumbnail,rarity:p.rarity,category:p.category,wearableCategory:p.wearableCategory??null,creator:p.creator,manaWei:p.manaWei,available:1,network:p.network,chainId:p.chainId,createdAt:0}:null},[y,h==null?void 0:h.item]),xe=y&&k!=null&&!!Q&&!!W,We=Gs({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),ye=(()=>{var we,ut;if(!We)return null;const p=Mo(S,a.coupon),le=Number(((ut=(we=a.coupon)==null?void 0:we.checks)==null?void 0:ut.uses)??0);return le>0&&p<=le?{claimed:p,total:le}:null})(),Et=(()=>{if(!We||a.saleUnitsLeft==null)return null;const p=ye?ye.total-ye.claimed:1/0;return a.saleUnitsLeft<p?a.saleUnitsLeft:null})(),Fe=c.useMemo(()=>({...a,tradeId:Pe,id:Pe??a.id}),[a,Pe]),sn=q.some(p=>p.id===Fe.id),Ft=!Fe.tokenId,za=((Ai=q.find(p=>p.id===Fe.id))==null?void 0:Ai.quantity)??0,on=Ft&&typeof a.available=="number"&&za>=a.available,{key:Un,faved:Xe}=Ys(a),He=Js(a),Na=Yr(p=>p.locale),Tt=He===void 0?null:He.toLocaleString(Na),Qn=Xe?n("assetCard.removeFromFavorites"):n("assetCard.addToFavorites"),Vn=He===void 0?Qn:n("itemDetail.favoriteAria",{action:Qn,count:He}),Gn=c.useRef(null);c.useEffect(()=>{!a.name||ke||Gn.current===a.id||(Gn.current=a.id,Z("Shop Viewed Item",{...Xs(a),for_sale:ue}),Zs(a))},[a.id,a.name,ke,ue]);const zt=`${o}/${x??u}`,Yn=c.useRef(zt);c.useEffect(()=>{if(Yn.current!==zt){if(Yn.current=zt,h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};K(f?{...p,tokenId:x,itemId:p.itemId??m}:{...p,tokenId:void 0,itemId:u??p.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[zt]);function Ba(){!ue||ln||ke||!Ft&&sn||on||C(Fe,"item_detail")}const Ze=ex(a.rarity)?a.rarity:Ae.Rarity.COMMON,Jn=tx($e.gender),Nt=eo($e),Xn=to($e.gender),Zn=Op(a.rarity),ei=Kp($e),ti=ue&&We,_a=v?n("itemDetail.moreFromCollection"):n("itemDetail.youMightAlsoLike"),ln=no(a,w==null?void 0:w.address),[Da,ni]=c.useState(!1),[Wa,ii]=c.useState(!1),[qa,ri]=c.useState(!1),[Oa,ai]=c.useState(!1),[jt,kt]=c.useState(null),[Ka,si]=c.useState(!1),[oi,li]=c.useState(!1),di=Yt(w==null?void 0:w.providerType),{data:_,isLoading:Bt}=se({queryKey:["owned-token",a.contractAddress,a.tokenId,w==null?void 0:w.address],enabled:!y&&!!(w!=null&&w.address)&&!!a.contractAddress&&!!a.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>w?Pi(w.address,a.contractAddress,a.tokenId):null});c.useEffect(()=>{_&&K(p=>p.name?{...p,issuedId:p.issuedId??_.issuedId,priceCredits:_.listingPrice??0,tradeId:_.tradeId}:{id:_.id,name:_.name,creator:"",contractAddress:_.contractAddress,itemId:_.itemId,category:_.category,rarity:_.rarity??"common",network:_.network,chainId:_.chainId,thumbnail:_.image,priceCredits:_.listingPrice??0,gender:null,isSmart:!1,tokenId:_.tokenId,issuedId:_.issuedId,tradeId:_.tradeId})},[_]),c.useEffect(()=>{Ye&&K(p=>p.priceCredits===Ye.priceCredits&&p.tradeId?p:{...p,priceCredits:Ye.priceCredits,tradeId:p.tradeId??Ye.tradeId})},[Ye]),c.useEffect(()=>{jt!=null&&_!=null&&_.isOnSale&&_.listingPrice===jt&&kt(null)},[_,jt]);const ci=!y&&!!a.contractAddress&&!!a.tokenId&&!a.name&&!H&&!Bt&&!_,{data:he,isFetched:Ha}=se({queryKey:["public-token",a.contractAddress,a.tokenId],enabled:ci,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>mo(a.contractAddress,a.tokenId)});c.useEffect(()=>{he&&K(p=>p.name?p.issuedId?p:{...p,issuedId:he.issuedId}:{id:he.id,name:he.name,creator:"",contractAddress:he.contractAddress,itemId:he.itemId,category:he.category,rarity:he.rarity??"common",network:he.network,chainId:he.chainId,thumbnail:he.image,priceCredits:he.listingPrice??0,gender:null,isSmart:!1,tokenId:he.tokenId,issuedId:he.issuedId,tradeId:he.tradeId})},[he]);const{data:Te}=se({queryKey:["publishable-item",a.contractAddress,a.itemId,w==null?void 0:w.address],enabled:ln&&!!w&&!!a.itemId,queryFn:async()=>w?(await Do(w.address,w.identity)).find(le=>le.contractAddress.toLowerCase()===a.contractAddress.toLowerCase()&&le.blockchainItemId===a.itemId)??null:null}),ze=f&&!!_,dn=!f&&ln,Ne=!y&&(dn||ze),ui=jt!=null?!0:ze?!!(_!=null&&_.isOnSale):ue,_t=ze?_==null?void 0:_.tradeId:Pe,pi=ze?!!_:!!Te,hi=dn||ze&&dt,cn=jt??(ze?(_==null?void 0:_.listingPrice)??0:0),{data:xi=0}=se({queryKey:["owned-item-count",a.contractAddress,u,w==null?void 0:w.address],enabled:!f&&!y&&!!(w!=null&&w.address)&&!!a.contractAddress&&!!u,staleTime:3e4,queryFn:()=>w?go(w.address,a.contractAddress,u):0});async function et(){await Promise.all([I.invalidateQueries({queryKey:["owned-token",a.contractAddress,a.tokenId]}),I.invalidateQueries({queryKey:["detail-trade"]}),I.invalidateQueries({queryKey:["shop-item"]}),I.invalidateQueries({queryKey:["collection-sale-state"]}),I.invalidateQueries({queryKey:["shop-items"]}),I.invalidateQueries({queryKey:["catalog-items"]}),I.invalidateQueries({queryKey:["publishable-items"]}),I.invalidateQueries({queryKey:["publishable-item",a.contractAddress,a.itemId]}),I.invalidateQueries({queryKey:["item-resales",a.contractAddress,a.itemId]})])}async function Ua(p){if(!w||!_t)throw new Error("No listing to take down");const le=await Gr(_t);await Fo({trade:le,signer:w.signer,mode:p.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(ze){if(!a.tokenId)return!1;const we=await Pi(w.address,a.contractAddress,a.tokenId);return we!==null&&!we.isOnSale}return a.itemId?await co(a.contractAddress,a.itemId)===null:!1}catch{return!1}},onWaiting:p.onWaiting}}),p.silent||Mt.success(n("myAssets.removedFromSale",{name:a.name})),kt(null),rd(I,_t),K(we=>we.tradeId===_t?{...we,tradeId:void 0}:we),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"removed"})}const fi=p=>async({payGas:le,onWaiting:we})=>{try{return await Ua({silent:p,payGas:le,onWaiting:we}),"ok"}catch(ut){if(ut instanceof Eo)return ut.definitive?"relay-reverted":"relay-pending";throw ut}},mi={currentCredits:cn||a.priceCredits||void 0,canPayGas:di,cancelCurrent:fi(!0)};function gi({edit:p=!1}={}){p||Z("Shop Started Listing",{listing_type:ze?"secondary":"primary",item_id:a.itemId??a.tokenId??null}),li(p),ze?ni(!0):ii(!0)}function bi(){ni(!1),ii(!1),li(!1),et()}const yi=ue?ke?n("itemDetail.checking"):on?n("itemDetail.maxInCart"):!Ft&&sn?n("assetCard.inCart"):n("assetCard.addToCart"):n("itemDetail.notForSale"),$t=a.available??(Y==null?void 0:Y.available)??null,Qa=typeof $t=="number"&&$t>0&&!a.tokenId&&!y,wi=!y&&!a.tokenId&&$t===0,vi=a.network==="ETHEREUM",ct=wi&&!Ne&&!!Ie,Dt=!!Ie&&q.some(p=>p.id===Ie.id),Va=!Ne&&ue&&!y,Ga=y||!Ne&&(ue||ct&&!!Ie||Aa()),Ya=!a.name&&(!!H||!!_||!!he||!!fe),ji=B||!!a.contractAddress&&!R||!a.name&&Bt||Ya||ci&&!Ha,ki=!a.name&&!ji,Ja=!!a.name&&ad({isMarket:y,forSale:ue,priceKnown:a.priceCredits>0&&(!E||ne!=null)||Ne,stillResolving:ji||!!E&&ne==null,manage:Ne,soldOutWithResale:ct,resolvingTrade:ke,isTokenRoute:f,ownedAssetLoading:Bt,deepLinkLoading:B}),$i=!a.creator&&(B||te||Bt),Ci=!(G!=null&&G.name)&&te,Xa=/^https?:\/\//i.test(a.thumbnail);return io(ki?{title:n("seo.item.notFoundTitle"),noindex:!0}:a.name?{title:a.name,description:ee||n("seo.item.fallbackDescription",{name:a.name,rarity:a.rarity,category:Gt($e),creator:Wn(a.creator)}),image:Xa?a.thumbnail:void 0,type:"product"}:{}),ki?e.jsxs(Sh,{"data-notfound":!0,children:[e.jsx(Rh,{name:"cart"}),e.jsx(Lh,{children:n("itemDetail.notAvailableTitle")}),e.jsx(Ah,{children:n("itemDetail.notAvailableBody")}),e.jsx(Mh,{variant:"white",onClick:()=>g("/items"),children:n("notFound.cta")})]}):e.jsxs(Yp,{children:[e.jsxs(Jp,{"aria-label":n("itemDetail.breadcrumbAria"),children:[e.jsx(Xp,{onClick:()=>g("/items"),children:n("nav.collectibles")}),e.jsx(Zp,{children:"/"}),e.jsx(eh,{children:a.name||n("itemDetail.itemFallback")})]}),e.jsxs(th,{style:{"--glow-rgb":so(Ze),"--glow-core":ao(Ze)},children:[e.jsxs(nh,{"data-testid":"item-preview",children:[a.name?e.jsx(Eu,{item:a}):e.jsx(ih,{"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(rh,{className:"skeleton","aria-hidden":!0})}),Un?e.jsxs(kr,{"data-fav-preview":!0,"data-on":Xe||void 0,"data-count":Tt??void 0,onClick:()=>M(a,"item_detail"),"aria-pressed":Xe,"aria-label":Vn,children:[e.jsx(L,{name:Xe?"heart-solid":"heart",size:18}),He!==void 0?e.jsx($r,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count-preview",children:Tt}):null]}):null,yt?e.jsxs(lh,{"data-play-showcase":!0,onClick:()=>Lt(!0),"data-testid":"play-showcase",children:[e.jsx(L,{name:"play",size:18}),n("itemDetail.playShowcase")]}):null]}),e.jsx(ah,{"data-testid":"item-info",children:a.name?e.jsxs(e.Fragment,{children:[ti&&a.compareAtCredits!=null?e.jsx(xh,{pct:ro(a.compareAtCredits,a.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(sh,{children:[e.jsxs(oh,{children:[a.name,f&&a.issuedId?` #${a.issuedId}`:""]}),Un?e.jsxs(kr,{"data-fav-title":!0,"data-on":Xe||void 0,"data-count":Tt??void 0,onClick:()=>M(a,"item_detail"),"aria-pressed":Xe,"aria-label":Vn,children:[e.jsx(L,{name:Xe?"heart-solid":"heart",size:18}),He!==void 0?e.jsx($r,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count",children:Tt}):null]}):null]}),e.jsxs(dh,{children:[Zn?e.jsx(Kt,{content:Li(a.rarity),children:e.jsx(Qt,{to:Zn,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Ri(Ze)},children:a.rarity})}):e.jsx(Kt,{content:Li(a.rarity),children:e.jsx(Be,{"data-variant":"rarity",style:{background:Ri(Ze)},children:a.rarity})}),ei?e.jsxs(Qt,{to:ei,"data-testid":"detail-category-link",title:n("filter.browseByCategory",{category:Gt($e)}),children:[Nt?e.jsx(L,{name:Nt,size:18}):null,Gt($e)]}):e.jsxs(Be,{children:[Nt?e.jsx(L,{name:Nt,size:18}):null,Gt($e)]}),Jn?e.jsxs(Be,{children:[Xn?e.jsx(L,{name:Xn,size:18}):null,Jn]}):null,!f&&a.issuedId?e.jsxs(Be,{"data-testid":"detail-issued",children:["#",a.issuedId]}):null,d?e.jsxs(Qt,{to:"/event","data-testid":"detail-event",title:d,children:[e.jsx(L,{name:"star-rounded",size:18}),d]}):null,lt?e.jsxs(Qt,{to:Hp(),"data-testid":"detail-smart",title:n("filter.browseBySmart"),children:[e.jsx(L,{name:"smart",size:18}),n("itemDetail.smart")]}):null,Ce.emoteLoop!==void 0?e.jsxs(Be,{"data-testid":"detail-play-mode",children:[e.jsx(L,{name:Ce.emoteLoop?"play-loop":"play-once",size:18}),Ce.emoteLoop?n("itemDetail.playLoop"):n("itemDetail.playOnce")]}):null,Ce.emoteHasSound?e.jsxs(Be,{"data-testid":"detail-sound",children:[e.jsx(L,{name:"sound",size:18}),n("itemDetail.emoteSound")]}):null,Ce.emoteHasProps?e.jsxs(Be,{"data-testid":"detail-props",children:[e.jsx(L,{name:"props",size:18}),n("itemDetail.emoteProps")]}):null,Rt?e.jsx(Kt,{content:n("itemDetail.exportBlockedTooltip"),children:e.jsxs(Be,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":n("itemDetail.exportBlockedTooltip"),children:[e.jsx(L,{name:"ban",size:16}),n("itemDetail.exportBlocked")]})}):null,Le?e.jsxs(Be,{"data-testid":"detail-utility-chip",children:[e.jsx(L,{name:"utility",size:18}),n("itemDetail.utility")]}):null]}),ee||Le?e.jsxs(Pa,{children:[ee?e.jsx(Bn,{children:e.jsxs(Nn,{children:[e.jsx(ht,{children:n("itemDetail.description")}),e.jsx(Cr,{"data-expanded":ae||void 0,children:ee}),ee.length>140?e.jsx(uh,{className:"link",onClick:()=>ve(p=>!p),children:ae?n("itemDetail.showLess"):n("itemDetail.readMore")}):null]})}):null,Le?e.jsx(Bn,{children:e.jsxs(Nn,{"data-testid":"detail-utility",children:[e.jsx(ht,{children:n("itemDetail.utility")}),e.jsx(Cr,{"data-expanded":!0,children:Le})]})}):null]}):null,!vi&&(a.creator||$i)||G!=null&&G.name||Ci?e.jsxs(Ea,{children:[vi?null:a.creator?e.jsxs(St,{children:[e.jsx(ht,{children:n("itemDetail.creator")}),e.jsx(ph,{address:a.creator,linkToProfile:!0,hidePrefix:!0})]}):$i?e.jsxs(St,{children:[e.jsx(ht,{children:n("itemDetail.creator")}),e.jsxs(Br,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(_r,{}),e.jsx(Dr,{})]})]}):null,G!=null&&G.name?e.jsxs(St,{"data-collection":!0,children:[e.jsx(ht,{children:n("itemDetail.collection")}),e.jsx(hh,{contractAddress:a.contractAddress,name:G.name,items:re})]}):Ci?e.jsxs(St,{"data-collection":!0,children:[e.jsx(ht,{children:n("itemDetail.collection")}),e.jsxs(Br,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(_r,{}),e.jsx(Dr,{})]})]}):null]}):null,e.jsx(Ta,{}),Ja?e.jsxs(Xh,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(Zh,{}),e.jsx(Nr,{}),e.jsx(Nr,{})]}):e.jsxs(e.Fragment,{children:[dt&&!Ne&&!y&&ue&&!a.tokenId?e.jsxs(_h,{"data-testid":"buy-from-creator",children:[e.jsxs(Dh,{children:[e.jsx(Wh,{name:"buy-from-creator"}),n("itemDetail.buyFromCreator")]}),e.jsx(qh,{name:"check-rounded"})]}):null,ct?e.jsxs(Qh,{"data-testid":"sold-out",children:[e.jsxs(Pr,{"data-variant":"original",children:[e.jsxs(Er,{children:[n("itemDetail.originalPrice"),e.jsxs(Fr,{children:[e.jsx(Re,{className:"ico"}),e.jsx(Tr,{children:e.jsx(ge,{credits:a.priceCredits})})]}),e.jsx(zr,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsx(Vh,{"data-testid":"out-of-stock",children:n("itemDetail.soldOut")})]}),e.jsxs(Pr,{"data-variant":"resale",children:[e.jsxs(Er,{children:[n("itemDetail.resalePrice"),e.jsxs(Fr,{children:[e.jsx(Re,{className:"ico"}),e.jsx(Tr,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(zr,{"aria-hidden":!0,children:e.jsx(L,{name:"info",size:12})})]}),e.jsxs(Gh,{children:[n("itemDetail.stock")," ",Ee.length,"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]})]})]}):e.jsxs(fh,{children:[e.jsxs(mh,{children:[e.jsxs(gh,{children:[y||ue?e.jsx(Mn,{children:n("itemDetail.price")}):null,y?e.jsxs(e.Fragment,{children:[e.jsx(Ct,{"data-variant":"market","data-testid":"item-price",children:k==null?e.jsx(It,{children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx(yh,{"aria-hidden":!0,children:"≈"}),e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:k})})]})}),e.jsx(wh,{children:n("assetCard.marketPrice")})]}):ue?ti?e.jsxs(Ct,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:a.priceCredits})}),e.jsx(jh,{"data-testid":"detail-price-was",children:e.jsx(ge,{credits:a.compareAtCredits})}),e.jsx(Bo,{until:a.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs(Ct,{"data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:a.priceCredits})})]}):ui&&cn?e.jsxs(Ct,{"data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:cn})})]}):Ne?null:e.jsxs(Ct,{"data-variant":"none","data-testid":"item-price",children:[e.jsx("span",{children:n("itemDetail.notForSale")}),e.jsx(Kt,{content:n("itemDetail.notForSaleHint"),children:e.jsx(bh,{tabIndex:0,role:"img","aria-label":n("itemDetail.notForSaleHint"),children:e.jsx(L,{name:"info",size:14})})})]})]}),Qa?e.jsxs(Ir,{children:[e.jsx(Mn,{children:n("itemDetail.stock")}),e.jsxs(An,{children:[($t??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]})]}):wi?e.jsxs(Ir,{children:[e.jsx(Mn,{children:n("itemDetail.stock")}),e.jsxs(An,{children:[($t??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]}),e.jsx(An,{"data-out":!0,"data-testid":"out-of-stock",children:n("itemDetail.outOfStock")})]}):null]}),ye?e.jsx(Wp,{claimed:ye.claimed,total:ye.total,testId:"detail-offer-stock"}):null,Et!=null?e.jsx(vh,{"data-testid":"detail-units-left",children:n("assetCard.unitsLeftAtThisPrice",{count:Et})}):null]}),e.jsx(kh,{"data-buttons":Ga||void 0,"data-dual":Va||void 0,children:y?e.jsxs(Rn,{variant:"purple",onClick:oe,disabled:!xe,children:[e.jsx("span",{children:n("assetCard.buyNow")}),k!=null?e.jsxs(Ln,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:k})]}):null]}):Ne?e.jsxs(Yh,{"data-testid":"manage-actions",children:[ui?e.jsxs(e.Fragment,{children:[hi?e.jsxs(Ch,{onClick:()=>gi({edit:!0}),disabled:!pi,"data-testid":"edit-price",children:[e.jsx(L,{name:"pen",className:"ico"}),e.jsx("span",{children:n("itemDetail.manageUpdatePrice")})]}):null,e.jsx(Ar,{onClick:()=>si(!0),"data-testid":"remove-listing",children:e.jsx("span",{children:n("itemDetail.manageRemove")})})]}):e.jsxs(e.Fragment,{children:[hi?e.jsx($h,{onClick:()=>gi(),disabled:!pi,children:e.jsx("span",{children:n("itemDetail.manageList")})}):null,ze?e.jsxs(e.Fragment,{children:[e.jsx(Ar,{onClick:()=>ri(!0),children:e.jsx("span",{children:n("itemDetail.manageTransfer")})}),e.jsx(Sr,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>j(!0),children:n("itemDetail.manageResell")})]}):null]}),dn&&Te?e.jsx(Sr,{type:"button","data-on-purple":!0,onClick:()=>ai(!0),children:n("itemDetail.manageIssue")}):null,Ke!=null?e.jsx(Jh,{children:e.jsx(_n,{onClick:()=>Je(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})}):null]}):ue?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:oe,disabled:ke,children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Ln,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:a.priceCredits})]})]}),e.jsxs(Mr,{onClick:Ba,disabled:ke||(Ft?on:sn),"aria-label":yi,children:[e.jsx(L,{name:"cart"}),e.jsx(Rr,{children:yi})]})]}):ct&&Ie?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:()=>w?wt(Ie):U(),children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Ln,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:Ie.priceCredits})]})]}),e.jsxs(Mr,{onClick:()=>{Dt||C(Ie,"item_detail")},disabled:Dt,"aria-label":Dt?n("assetCard.inCart"):n("assetCard.addToCart"),children:[e.jsx(L,{name:"cart"}),e.jsx(Rr,{children:Dt?n("assetCard.inCart"):n("assetCard.addToCart")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Tp,{item:a}),a.itemId?e.jsx(Uh,{onClick:()=>{Z("Shop Clicked Buy Resale",{item_id:a.itemId,contract_address:a.contractAddress,has_shop_resale:!!Ie}),F(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:n("itemDetail.buyResale")}):null]})}),!Ne&&!y&&Ke!=null?e.jsxs(Oh,{"data-testid":"lowest-price","data-centered":ct||void 0,children:[ct?null:e.jsxs(Kh,{children:[n("itemDetail.lowestPrice"),e.jsx(Re,{className:"ico"}),e.jsx(Hh,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(_n,{onClick:()=>Je(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})]}):null,!Ne&&!y&&xi>0?e.jsxs(Ih,{"data-testid":"you-own-note",children:[n("itemDetail.youOwnN",{count:xi})," ",e.jsx(qr,{to:"/my-items",children:n("nav.myAssets")})]}):null]})]}):e.jsx(ix,{})})]}),e.jsx(oo,{exclude:ie,title:n("itemDetail.becauseYouOwn"),surface:"pdp",first:Wr}),N!==null&&e.jsx(Ro,{title:_a,items:D,onViewAll:v&&a.contractAddress?()=>g(`/collection/${a.contractAddress}`):void 0}),J&&y&&W&&Q?e.jsx(ja,{listing:W,rate:Q,onClose:()=>A(!1),onSold:()=>A(!1)}):J&&!y?e.jsx(zn,{item:Fe,resume:T,onClose:()=>{A(!1),X(!1)}}):null,Pt?e.jsx(zn,{item:Pt,onClose:()=>{wt(null),et()}}):null,dt&&vt&&a.itemId?e.jsx(lp,{item:a,onClose:()=>Je(!1)}):null,an&&x?e.jsx(br,{contractAddress:o??"",tokenId:x,onClose:()=>j(!1)}):null,P&&a.itemId&&o?e.jsx(br,{variant:"buy",contractAddress:o,itemId:a.itemId,onClose:()=>F(!1)}):null,Da&&_&&w?e.jsx(zd,{asset:_,session:w,creator:a.creator,edit:oi?mi:void 0,onListed:(p,le)=>{kt(p),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"listed",priceCredits:p,tradeId:le})},onClose:bi}):null,Ka&&w?e.jsx(rc,{name:a.name,managed:Zt(w),canPayGas:di,cancel:fi(!1),onClose:()=>si(!1)}):null,qa&&w&&a.tokenId?e.jsx(tc,{item:{contractAddress:a.contractAddress,chainId:a.chainId,tokenId:a.tokenId,name:a.name,thumbnail:a.thumbnail},session:w,onClose:()=>{ri(!1),et()},onTransferred:()=>{kt(null),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"gone"})}}):null,Wa&&Te&&w?e.jsx(Ic,{item:Te,session:w,edit:oi?mi:void 0,onListed:(p,le)=>{kt(p),K(we=>({...we,tradeId:le}))},onClose:bi}):null,Oa&&Te&&w?e.jsx(eu,{item:{contractAddress:Te.contractAddress,chainId:rt.chainId,itemId:Te.blockchainItemId,name:Te.name,thumbnail:Te.thumbnail,available:Te.remainingSupply},session:w,onClose:()=>{ai(!1),et()}}):null,nn&&yt?e.jsx(ou,{src:yt,itemName:a.name,onClose:()=>Lt(!1)}):null]})}function ix(){return e.jsxs(Ph,{"aria-hidden":!0,children:[e.jsx(Th,{className:"skeleton"}),e.jsxs(zh,{children:[e.jsx(Pn,{className:"skeleton"}),e.jsx(Pn,{className:"skeleton"}),e.jsx(Pn,{className:"skeleton"})]}),e.jsx(Pa,{children:[0,1].map(t=>e.jsx(Bn,{children:e.jsxs(Nn,{children:[e.jsx(Lr,{className:"skeleton"}),e.jsxs(Eh,{children:[e.jsx(En,{className:"skeleton"}),e.jsx(En,{className:"skeleton"}),e.jsx(En,{className:"skeleton","data-short":!0})]})]})},t))}),e.jsx(Ea,{children:[0,1].map(t=>e.jsxs(St,{...t===1?{"data-collection":!0}:{},children:[e.jsx(Lr,{className:"skeleton"}),e.jsx(Fh,{})]},t))}),e.jsx(Ta,{}),e.jsx(Nh,{className:"skeleton"}),e.jsx(Bh,{className:"skeleton"})]})}export{nx as ItemDetail,Ex as ItemDetailRoute,nx as default};
|
|
3411
|
-
//# sourceMappingURL=ItemDetail-big_cmBY.js.map
|