@dcl/shop 1.9.3-32728272723.commit-675c39d → 1.9.3-32743160136.commit-b84a6df
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-wiQBOvJZ.js → Activity-QAKKW4Vj.js} +9 -9
- package/_assets/{AnimatedBackground-RthAgKMY.js → AnimatedBackground-RzTR5pnn.js} +6 -6
- package/_assets/{Assets-Cn69OQsu.js → Assets-DL6YgWYt.js} +21 -21
- package/_assets/{Authorizations-DQkwMniZ.js → Authorizations-fcwMQvEN.js} +2 -2
- package/_assets/Cart-D2KxXi3r.js +748 -0
- package/_assets/{Collection-DQS4BBsd.js → Collection-BbupMgKn.js} +9 -9
- package/_assets/CollectionCarousel-KtrjUFTp.js +834 -0
- package/_assets/{Confetti-CnwifU5L.js → Confetti-B_SGZDIW.js} +4 -4
- package/_assets/{ConstantsUtil-Cnnb7DY5.js → ConstantsUtil-BUQvDf5H.js} +2 -2
- package/_assets/{ContentClient-Z56PWhtK.js → ContentClient-BAcYQSIO.js} +2 -2
- package/_assets/{Creator-Z-kdGyX0.js → Creator-B02TUwGa.js} +11 -11
- package/_assets/{DeploymentBuilder-C1TR_QtL.js → DeploymentBuilder-B77L0L_H.js} +2 -2
- package/_assets/{EmotePlaybackBar-B4bFL84Q.js → EmotePlaybackBar-6-X8QjVO.js} +4 -4
- package/_assets/{ErrorNotice-DB0NutQX.js → ErrorNotice-BVVq2BBw.js} +2 -2
- package/_assets/{ExchangeController-DQsWu6kG.js → ExchangeController-BKu6gC8H.js} +2 -2
- package/_assets/{Faq-B-KjBhpt.js → Faq-D9k3ABvT.js} +2 -2
- package/_assets/{GetCredits-B7o-ahFl.js → GetCredits-Dpn8gB9T.js} +79 -34
- package/_assets/Grow-tHCcyL-r.js +2 -0
- package/_assets/{HelpersUtil-CDlApuwl.js → HelpersUtil-zX6_tyAi.js} +2 -2
- package/_assets/ItemDetail-D4i816QV.js +3671 -0
- package/_assets/{LoadMore-yHCzMVX9.js → LoadMore-BrnolAMt.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-Bkk6IoAa.js → ManaPricingBanner.styles-CLIn26ZQ.js} +9 -9
- package/_assets/{MyAssets-DPBr4EqO.js → MyAssets-0hzzKkK-.js} +4 -4
- package/_assets/{MyFavorites-DIh3AJ72.js → MyFavorites-DI52kW4T.js} +6 -6
- package/_assets/{NetworkUtil-YfaeL3XJ.js → NetworkUtil-B_9c-U8Q.js} +2 -2
- package/_assets/{NotFound-EGQC517r.js → NotFound-OU0x4dCG.js} +2 -2
- package/_assets/NotificationsBell-B31uvOC8.js +142 -0
- package/_assets/{OutfitDetail-D2gRsLmD.js → OutfitDetail-U5OMt9MB.js} +10 -10
- package/_assets/{OutfitPreview-CFbrD7aI.js → OutfitPreview-fsnJyCY_.js} +3 -3
- package/_assets/{OutfitStudio-BkXEDStE.js → OutfitStudio-1fjhOirp.js} +10 -10
- package/_assets/{StoreSettings-BTzgYL0y.js → StoreSettings-Dtc2cFNu.js} +2 -2
- package/_assets/{Success-x2GWyHwZ.js → Success-DmniYPt7.js} +2 -2
- package/_assets/{SwapController-CmNQixyT.js → SwapController-DAEACGPq.js} +2 -2
- package/_assets/{TradeService-DNGia0OJ.js → TradeService-BcpRovgR.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-BT9sgsfW.js → W3MFrameProviderSingleton-BClgaXM6.js} +4 -4
- package/_assets/{WebCryptoP256-V66v1WyH.js → WebCryptoP256-Bzqct4AR.js} +2 -2
- package/_assets/authorizations-Bq00FRrP.js +2 -0
- package/_assets/{basic-S2U2MIXo.js → basic-v2yN93R9.js} +2 -2
- package/_assets/{biconomy-B3GclgM5.js → biconomy-BbyLh2rY.js} +2 -2
- package/_assets/{browseLayout.styles-DdoX94ao.js → browseLayout.styles-DsbssS1X.js} +8 -8
- package/_assets/{browser-Yr5YHIXb.js → browser-B3a9BIYV.js} +2 -2
- package/_assets/{browser-ponyfill-7e35X2wE.js → browser-ponyfill-Dukw0TjS.js} +2 -2
- package/_assets/{builder-ZuQFtHN7.js → builder-DysINipi.js} +2 -2
- package/_assets/buy-DZz-IuoV.js +2 -0
- package/_assets/{buy-gasless-C-8JY4JE.js → buy-gasless-B29llLau.js} +2 -2
- package/_assets/{categories-orB_QPDP.js → categories-ByT980ve.js} +2 -2
- package/_assets/{ccip-GIdsv8rm.js → ccip-BRPx_ZlG.js} +2 -2
- package/_assets/{ccip-BmDS_bTy.js → ccip-DYkZfgm6.js} +2 -2
- package/_assets/{chains-Ca51A7Ks.js → chains-DZroLyZV.js} +2 -2
- package/_assets/{collectionPage.styles-Dh90G62H.js → collectionPage.styles-Djchm0Nm.js} +6 -6
- package/_assets/{common-DQUwV3Gu.js → common-DYJHHIB9.js} +2 -2
- package/_assets/{controller-BJsJcDQe.js → controller-BOWAb87t.js} +3 -3
- package/_assets/{core-Ctn9qkOR.js → core-Bw4v_vQY.js} +5 -5
- package/_assets/createSvgIcon-CaKhLrQG.js +75 -0
- package/_assets/{custom-Do5QPS7e.js → custom-BzZXMtsn.js} +2 -2
- package/_assets/{data-capture-CgHHR5Aj.js → data-capture-BRuFpOfW.js} +2 -2
- package/_assets/{dcl-schemas-BrhDU8Ob.js → dcl-schemas-CN-1-wGb.js} +2 -2
- package/_assets/{decimals-CnKheYha.js → decimals-BPF9JuRG.js} +2 -2
- package/_assets/{decimals-BW_s4s-s.js → decimals-BlaBlIXg.js} +2 -2
- package/_assets/{detectExtension-Bfwwsutx.js → detectExtension-Cpjv7w9d.js} +2 -2
- package/_assets/{disposePreview-DqlQXFBW.js → disposePreview-DvbibLHk.js} +2 -2
- package/_assets/{email-DUmzs_tF.js → email-DRfEf-Gg.js} +2 -2
- package/_assets/{embedded-wallet-Bv1KSoBX.js → embedded-wallet-k-rK_Tzp.js} +2 -2
- package/_assets/emotion-styled.browser.esm-7mw60jip.js +2 -0
- package/_assets/{engine-DEYwEW_p.js → engine-Ds8WBhQq.js} +2 -2
- package/_assets/{errors-CHeQ52EG.js → errors-DUsd8eGX.js} +2 -2
- package/_assets/{estimate-l1-fee-DtiVNA82.js → estimate-l1-fee-BqWlqB6P.js} +2 -2
- package/_assets/{eth_estimateGas-C0J4pFj3.js → eth_estimateGas-Dj0RarmM.js} +2 -2
- package/_assets/{eth_getStorageAt-D_VuzNfo.js → eth_getStorageAt-C2kSbou7.js} +2 -2
- package/_assets/{eth_getTransactionCount-C9QdrrgN.js → eth_getTransactionCount-DxqQ7LF-.js} +2 -2
- package/_assets/{ethereum-D98YbqZW.js → ethereum-CMQLQ53m.js} +2 -2
- package/_assets/{ethers-13WTbgZT.js → ethers-3hUTVH_L.js} +2 -2
- package/_assets/{events-Bfmg7Rrt.js → events-BAvGtdFA.js} +2 -2
- package/_assets/{execute-BKduu7xa.js → execute-B-kQuKck.js} +3 -3
- package/_assets/{extractIPFS-BoSTMqtl.js → extractIPFS-C9V9S9Vx.js} +2 -2
- package/_assets/{features-CiOwD_FL.js → features-D9eM9k8d.js} +2 -2
- package/_assets/{fetchTokenMetadata-CYea_Ae0.js → fetchTokenMetadata-1AbceoZv.js} +3 -3
- package/_assets/{field.styles-1ph2By3r.js → field.styles-DwpKCezV.js} +2 -2
- package/_assets/{fortmatic-FXRUPZdn.js → fortmatic-CeTGzQ72.js} +2 -2
- package/_assets/{get-bytecode-DsFs5fZG.js → get-bytecode-B4ZUFLU7.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-CrXYfBwJ.js → get-ecosystem-wallet-info-Da9XiCOd.js} +2 -2
- package/_assets/{getBalance-CkyNP7Sk.js → getBalance-CJap-JGo.js} +3 -3
- package/_assets/{getInstalledModules-BJjlqPjw.js → getInstalledModules-Do6d5mXY.js} +2 -2
- package/_assets/getNFT-CAMw_8Xw.js +3 -0
- package/_assets/getNFT-CLshkBBY.js +2 -0
- package/_assets/{grid.styles-xN-7VEdz.js → grid.styles-C5Gu9fMU.js} +2 -2
- package/_assets/{hashTypedData-DKoi13N6.js → hashTypedData-BUtmFCdm.js} +2 -2
- package/_assets/{hashTypedData-Csm33HiU.js → hashTypedData-Vr7bI_tu.js} +2 -2
- package/_assets/{in-app-DiZ1z2bU.js → in-app-nwWqF9c8.js} +2 -2
- package/_assets/{in-app-wallet-calls-D_BXC_ak.js → in-app-wallet-calls-N7orXys6.js} +2 -2
- package/_assets/{index-_QehBQtS.js → index-7V82xXhB.js} +2 -2
- package/_assets/{index-BMZPGByj.js → index-8nD-GtHU.js} +2 -2
- package/_assets/{index-CONlhNBW.js → index-9Kw5Rztb.js} +2 -2
- package/_assets/{index-CjDgPW_g.js → index-Ardj6yky.js} +2 -2
- package/_assets/{index-D_MyRErw.js → index-B-dIqjhn.js} +13 -13
- package/_assets/{index-Lagqhz0D.js → index-B5BlLi8g.js} +2 -2
- package/_assets/{index-C66Uqb3h.js → index-BASnFl3W.js} +4 -4
- package/_assets/{index-BbfrgiQ2.js → index-BMDWzXEE.js} +3 -3
- package/_assets/{index-z50ayPbm.js → index-BQ9y6ZaA.js} +2 -2
- package/_assets/{index-FVl1HwRo.js → index-BQb3Wk5r.js} +2 -2
- package/_assets/index-BRQaaXvE.js +29 -0
- package/_assets/{index-DnFe-nlA.js → index-BRZfndrv.js} +5 -5
- package/_assets/{index-BvWdVY3S.js → index-BV9RyOEp.js} +2 -2
- package/_assets/{index-C1mRjPET.js → index-BYVFrjrb.js} +3 -3
- package/_assets/{index-CE_9QqpM.js → index-BaO4bMuZ.js} +2 -2
- package/_assets/{index-CoGsK86G.js → index-BdeCgajO.js} +2 -2
- package/_assets/{index-Ceh2dU74.js → index-Bk-sREBo.js} +3 -3
- package/_assets/{index-D3G8Fdkz.js → index-Bl1ek_ne.js} +8 -8
- package/_assets/{index-YXtOvMCg.js → index-BmpxmYmS.js} +6 -6
- package/_assets/{index-D12w4DAh.js → index-C24_ekJb.js} +3 -3
- package/_assets/{index-pU44WsoO.js → index-C5IAd4qq.js} +2 -2
- package/_assets/{index-FoEkr-Gx.js → index-C5ykZ17C.js} +4 -4
- package/_assets/{index-B-VnvrXk.js → index-C6yqnRel.js} +2 -2
- package/_assets/{index-BLCZsXPx.js → index-C7ZiEK10.js} +5 -5
- package/_assets/index-C7dG5MlC.js +2 -0
- package/_assets/{index-CaUZtRY4.js → index-C8CrTE0H.js} +4 -4
- package/_assets/{index-DK3Qx85d.js → index-CIonCZaH.js} +2 -2
- package/_assets/{index-DoiWiVM0.js → index-CKPrX-hd.js} +2 -2
- package/_assets/{index-1fc9icEt.js → index-CLkhQUQ6.js} +2 -2
- package/_assets/{index-jlD47_Vi.js → index-CPFt5W7a.js} +2 -2
- package/_assets/index-CTkFcWFW.js +31 -0
- package/_assets/{index-BiOg6MaL.js → index-CU8_wCvl.js} +2 -2
- package/_assets/{index-DHZrYG6U.js → index-CW_28RYg.js} +2 -2
- package/_assets/{index-ClWm5BzQ.js → index-Casvq6JB.js} +5 -5
- package/_assets/{index-C0UpQJ3R.js → index-CeMUz1Vt.js} +2 -2
- package/_assets/index-CoOoDCex.js +3 -0
- package/_assets/{index-Dnn6D-aI.js → index-CqtWNRv-.js} +4 -4
- package/_assets/{index-Cw7Ynnas.js → index-CyD5pQGT.js} +6 -6
- package/_assets/{index-CwJ5xwPT.js → index-CyMO1hqV.js} +2 -2
- package/_assets/{index-B9dxuRhp.js → index-CzJG485v.js} +4 -4
- package/_assets/index-D165_lhw.js +2 -0
- package/_assets/{index-Ch6rsL_B.js → index-D7jo6ksh.js} +3 -3
- package/_assets/{index-BIH4pLmB.js → index-DL9BGlLg.js} +9 -9
- package/_assets/{index-sUOR8hyr.js → index-DN4pkOIt.js} +2 -2
- package/_assets/{index-UB89SKfu.js → index-DUZQbok2.js} +2 -2
- package/_assets/{index-BIuwf8hd.js → index-DUiscdsk.js} +2 -2
- package/_assets/{index-C_ZwEBoo.js → index-DaYk4f8v.js} +4 -4
- package/_assets/{index-3lrmnEWw.js → index-DcHviZ_A.js} +2 -2
- package/_assets/{index-CWGgaCTU.js → index-DrBZNwIH.js} +9 -9
- package/_assets/{index-B_ujx6Xm.js → index-DxNecTCT.js} +3 -3
- package/_assets/{index-DOlrtt3M.js → index-DxcjAnEQ.js} +6 -6
- package/_assets/{index-BW-svIkd.js → index-DyxdGNpO.js} +2 -2
- package/_assets/{index-CHQCW37d.js → index-FcM585jS.js} +2 -2
- package/_assets/{index-Clnwiuqm.js → index-GpII3RQe.js} +7 -7
- package/_assets/{index-D3e9i18Z.js → index-N6bLRe9n.js} +2 -2
- package/_assets/{index-nbIX4Ytl.js → index-NxvojHai.js} +3 -3
- package/_assets/{index-Iy_1muGf.js → index-PD4xoiKM.js} +2 -2
- package/_assets/{index-DbYBtUCy.js → index-ZsDPPnJO.js} +2 -2
- package/_assets/{index-8ghXpAgH.js → index-_r_ufyIV.js} +5 -5
- package/_assets/{index-BurKCVaZ.js → index-arksk5Cj.js} +3 -3
- package/_assets/{index-VFfx8OgX.js → index-eBmw3fXZ.js} +3 -3
- package/_assets/{index-D7I_eFC7.js → index-eN8iGXCt.js} +2 -2
- package/_assets/{index-BBW9JwC1.js → index-hVKWyt40.js} +2 -2
- package/_assets/{index-DHDyWXF3.js → index-j4G49haZ.js} +2 -2
- package/_assets/{index-C4ca7Vt-.js → index-mJBnQ2Dj.js} +2 -2
- package/_assets/{index-crQcv9Ov.js → index-o602nshH.js} +2 -2
- package/_assets/{index-BqvS0YcJ.js → index-otS3prm0.js} +2 -2
- package/_assets/{index.es-CgnmJs4M.js → index.es-BYlgbFaR.js} +5 -5
- package/_assets/{index.es-BEhJZqhV.js → index.es-Cv5GXMGv.js} +2 -2
- package/_assets/{index.es-ro7appUX.js → index.es-D6r5jb9y.js} +2 -2
- package/_assets/{index.es-eBlnNE_8.js → index.es-N9rocrKW.js} +2 -2
- package/_assets/{items-empty-DO2UT8K2.js → items-empty-DHu8EAf0.js} +2 -2
- package/_assets/{jump-Bhj8Kohh.js → jump-CZr_KgFH.js} +2 -2
- package/_assets/{linkAccount-BRQ8Ev1P.js → linkAccount-DDn4BnMD.js} +2 -2
- package/_assets/{localBatchGatewayRequest-B4LC5KML.js → localBatchGatewayRequest-D-Y_ipMD.js} +2 -2
- package/_assets/{native-Bvt0W0jA.js → native-EhJtXu3y.js} +2 -2
- package/_assets/{networks-CaAL5XAk.js → networks-Bu5S3nZh.js} +2 -2
- package/_assets/{onramp-Cp8_0NX3.js → onramp-DafTmJEE.js} +2 -2
- package/_assets/{openzeppelin-DW0vhDwF.js → openzeppelin-DrjFStIu.js} +2 -2
- package/_assets/{ownerOf-DHZ-ngeW.js → ownerOf-C6L3B_bp.js} +2 -2
- package/_assets/{parseNft-CEwkovMr.js → parseNft-Blq_Sjtq.js} +3 -3
- package/_assets/{parseSignature-ifLHrMWV.js → parseSignature-GSnulywH.js} +4 -4
- package/_assets/{parseSignature-Duwa-2pX.js → parseSignature-Q7C9dXBW.js} +2 -2
- package/_assets/passkeys-BKUjWMsd.js +2 -0
- package/_assets/{pay-with-exchange-Yn92eb0n.js → pay-with-exchange-ChWZJZmh.js} +2 -2
- package/_assets/{prepare-contract-call-BZBDdYDD.js → prepare-contract-call-B2J2TZU4.js} +2 -2
- package/_assets/{qr-overlay-8DGBc2-N.js → qr-overlay-Dp5EKTi4.js} +4 -4
- package/_assets/{react-DjOKjwAj.js → react-DcSw8tCD.js} +2 -2
- package/_assets/{receive-CN3FejJq.js → receive-jGBB6R5D.js} +2 -2
- package/_assets/{resolveImplementation-Ckhnk_N2.js → resolveImplementation-mqgPq49O.js} +2 -2
- package/_assets/{resume-buy--hmhwjSU.js → resume-buy-CEzVJZQm.js} +2 -2
- package/_assets/{rpc-C6etA5rL.js → rpc-DYUIG9Ju.js} +2 -2
- package/_assets/{sales-empty-C0l-l75T.js → sales-empty-Vn4xVfP7.js} +2 -2
- package/_assets/{search-empty-BhlZHJF-.js → search-empty-PfWp7qfl.js} +2 -2
- package/_assets/{secp256k1-C4HGjRo8.js → secp256k1-Bh8CfHpQ.js} +2 -2
- package/_assets/{secp256k1-BvDOJrZj.js → secp256k1-Dse58ee0.js} +2 -2
- package/_assets/{secp256k1-BAAt2AsC.js → secp256k1-N8bNn80H.js} +2 -2
- package/_assets/{send-batch-transaction-0FOgO-ET.js → send-batch-transaction-BpqXJtGJ.js} +2 -2
- package/_assets/{send-eip712-transaction-BOK7YDZz.js → send-eip712-transaction-D2-3cTz5.js} +3 -3
- package/_assets/{send-gasless-transaction-Cu--gdaY.js → send-gasless-transaction-DvU-irYQ.js} +3 -3
- package/_assets/{send-BI0btOc6.js → send-h29mxUrF.js} +2 -2
- package/_assets/send-transaction-FUszabPU.js +3 -0
- package/_assets/sendMetaTransaction-CcfiyKVp.js +2 -0
- package/_assets/{sendRawTransaction-C3ZoitjG.js → sendRawTransaction-BQgltNSJ.js} +4 -4
- package/_assets/{sentry-BxdwO3pv.js → sentry-CAS3BNIy.js} +3 -3
- package/_assets/{serializeTransaction-pYtrV7RU.js → serializeTransaction-__k14-5R.js} +2 -2
- package/_assets/{session-proposal-Db_N4_Gn.js → session-proposal-C3dOHBpp.js} +2 -2
- package/_assets/{session-request-B7eT8WJX.js → session-request-La1Lz5pY.js} +3 -3
- package/_assets/{sha256-3PO3xhiT.js → sha256-CLzVl0-i.js} +2 -2
- package/_assets/{signing-wiPQ7Wvz.js → signing-ClZDdyWr.js} +4 -4
- package/_assets/{skeleton.styles-DTnZygMc.js → skeleton.styles-BideLusx.js} +2 -2
- package/_assets/{socials-bRUEtmju.js → socials-DU6TufzI.js} +2 -2
- package/_assets/{styled-DV3ca-sF.js → styled-lv29vbU7.js} +3 -3
- package/_assets/{swaps-B-elkyix.js → swaps-DsEkYfnN.js} +8 -8
- package/_assets/{thirdweb-U2M04SJR.js → thirdweb-ByxuX0DY.js} +4 -4
- package/_assets/{to-serializable-transaction-C460Jpwk.js → to-serializable-transaction-B9MSl050.js} +3 -3
- package/_assets/{totalSupply-Go9y-Ilv.js → totalSupply-DOU8z336.js} +2 -2
- package/_assets/{transaction-Dh6qJ7PN.js → transaction-CuK5IUGr.js} +2 -2
- package/_assets/{transactionReceipt-MlvCCpAz.js → transactionReceipt-jeQgFWvn.js} +2 -2
- package/_assets/transactions-C5_JA1NE.js +17 -0
- package/_assets/{useCreditPacks-CsOWjtuZ.js → useCreditPacks-CU0lRdPq.js} +2 -2
- package/_assets/{useInfiniteGrid-BRJtiYn-.js → useInfiniteGrid-BPtTRHIB.js} +2 -2
- package/_assets/{useStore-DvwWBFUP.js → useStore-rPC8Gwuv.js} +3 -3
- package/_assets/{useTheme-Clcy27dj.js → useTheme-C_44BN3j.js} +2 -2
- package/_assets/{utils-C47sFUWS.js → utils-BV4hvYlV.js} +2 -2
- package/_assets/{verifyHash-CgNpRrLI.js → verifyHash-qwpY3McX.js} +2 -2
- package/_assets/{w3m-modal-CsqnZdOv.js → w3m-modal-IH0P0x8g.js} +2 -2
- package/_assets/{w3m-modal-iB_Jyio2.js → w3m-modal-RWmLMEhq.js} +2 -2
- package/_assets/{wait-for-tx-receipt-CZmHSBIy.js → wait-for-tx-receipt-CfUmETfV.js} +2 -2
- package/_assets/{wallets-D0ayx2Ud.js → wallets-DBFKTZVz.js} +6 -6
- package/_assets/{web-connector-CoAY_9Ez.js → web-connector-5O3sqPuw.js} +4 -4
- package/_assets/{writeContract-CAHluxuL.js → writeContract-CwGPT4Iu.js} +2 -2
- package/_assets/{zora-sepolia-CwYmHh_e.js → zora-sepolia-CLbV2B8e.js} +2 -2
- package/_assets/{zoraTestnet-CYFRaB4W.js → zoraTestnet-wnoXWuLz.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Cart-BzK8CObO.js +0 -645
- package/_assets/CircularProgress-vVxuKRO3.js +0 -29
- package/_assets/CollectionCarousel-BAdWBmbr.js +0 -937
- package/_assets/Grow-CiHUKYJJ.js +0 -2
- package/_assets/ItemDetail-CnsFOTP0.js +0 -3655
- package/_assets/NotificationsBell-cEMFVXUQ.js +0 -142
- package/_assets/app-store-4P6uzW8u.svg +0 -34
- package/_assets/authorizations-DbYL1SFo.js +0 -2
- package/_assets/buy-VoaFL0gA.js +0 -2
- package/_assets/clsx-BEtG4eYu.js +0 -2
- package/_assets/createSvgIcon-DuQr81Ef.js +0 -75
- package/_assets/download-on-the-app-store-D7CmsZZO.svg +0 -25
- package/_assets/emotion-styled.browser.esm-Bmaw-B0u.js +0 -2
- package/_assets/get-in-on-google-play-Cqt13Ucn.svg +0 -23
- package/_assets/get-in-on-play-store-button-49Za7I2x.svg +0 -11
- package/_assets/getNFT-BK80hZpF.js +0 -3
- package/_assets/getNFT-CaFBE3dG.js +0 -2
- package/_assets/index-B6Acsbwr.js +0 -2
- package/_assets/index-CyPssfNz.js +0 -2
- package/_assets/index-D0CrRpvU.js +0 -3
- package/_assets/index-DM273JHq.js +0 -31
- package/_assets/index-DaMpIpZ6.js +0 -2
- package/_assets/logo-pattern-D4X-bvlg.webp +0 -0
- package/_assets/man-default1-BEO13leF.png +0 -0
- package/_assets/passkeys-FupWf6Qe.js +0 -2
- package/_assets/qr-android-MBrMPexN.svg +0 -1
- package/_assets/send-transaction-BRv4xPkp.js +0 -3
- package/_assets/sendMetaTransaction-kIltSLeV.js +0 -2
- package/_assets/transactions-Bkojvbe9.js +0 -17
|
@@ -0,0 +1,3671 @@
|
|
|
1
|
+
var Ql=Object.defineProperty;var Vl=(n,a,t)=>a in n?Ql(n,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[a]=t;var W=(n,a,t)=>Vl(n,typeof a!="symbol"?a+"":a,t);import{r as v,e as Ul,j as s,b as pn,l as sc,R as _,h as Gl,L as cc,d as Xl,a as lc}from"./react-DcSw8tCD.js";import{s as g,t as d,aC as Nt,b as m,I as V,an as Jl,q as Oe,E as Ot,C as Xe,bc as zo,W as Ur,c as Lt,o as on,bf as dc,bg as Zl,r as fn,bo as ed,ad as fe,bu as Qe,bt as Ne,bq as Ka,h as Me,bs as wa,br as uc,i as td,d as nd,D as Zn,be as rd,bd as ad,F as od,R as id,bp as sd,cP as cd,cQ as ld,cR as dd,p as ud,l as ye,aG as pd,Z as Gr,b7 as Xr,v as ro,b8 as en,Q as pc,w as or,bQ as fc,ao as $e,cS as fd,X as hd,g as md,f as gd,B as Rn,A as On,aA as ka,a5 as hc,cT as qo,cw as xd,O as mc,aB as yd,cU as bd,cV as vd,bD as wd,m as kd,ab as tr,a$ as Dd,cW as Cd,a1 as Sd,cX as Md,b1 as _d,cY as jd,cZ as Id,J as gc,c_ as xc,c$ as Pd,d0 as Ed,a as yc,d1 as Td,d2 as $d,d3 as Nd,d4 as Rd,z as Od,d5 as Ad,H as Ld,V as Fd,U as Yd,d6 as Wd,d7 as Bd,d8 as Hd,ap as zd,aq as qd,d9 as Kd,n as Qd,at as Ko,as as Vd,da as Qo,bn as Ud,db as Vo,dc as Gd,dd as Xd,de as Jd,df as Zd,dg as eu,dh as tu,di as nu}from"./index-B-dIqjhn.js";import{d as st}from"./dcl-schemas-CN-1-wGb.js";import{O as Uo,a1 as ru,Y as au,U as bc,m as ou,M as iu,S as su,C as cu,H as lu,a as du,T as uu,X as pu,b as fu,B as hu,c as mu,d as gu,e as xu,f as vn,g as yu,h as bu,i as vu,j as wu,k as wn,l as yt,W as gr,p as xr,q as yr,r as ku,y as Du,z as Cu,D as Su,E as Mu,F as _u,G as ju,I as Iu,J as Pu,K as Eu,N as Tu,L as $u,P as Nu,n as Ru,o as Ou,a3 as Au,a4 as Lu,a5 as Fu,A as Yu,s as Wu,t as Bu,u as Hu,v as zu,w as qu,x as Ku,a6 as Go,a7 as Qu,a8 as Vu,a9 as Uu,aa as Gu,Z as Xu,Q as Ju,R as Zu,V as ep}from"./CollectionCarousel-KtrjUFTp.js";import{j as Xo,d as tp,f as np,t as rp,i as ap,e as op,a as ip,l as sp,q as Jo,c as cp,G as lp}from"./buy-DZz-IuoV.js";import{b as dp,a as up}from"./builder-DysINipi.js";import{u as pp,M as fp,e as hp,a as mp,c as gp}from"./useCreditPacks-CU0lRdPq.js";import{m as Zo}from"./mana-matic-CEqvSwrJ.js";import{k as vc,e as wc,n as xp,l as yp,c as ei,g as kc,j as bp,r as vp,m as wp,i as kp}from"./authorizations-Bq00FRrP.js";import{J as Dp,p as Cp,C as Sp,I as Mp}from"./ethers-3hUTVH_L.js";import{a as _p,w as Dc,S as Cc,G as Sc,c as jp}from"./buy-gasless-B29llLau.js";import{R as ti}from"./resume-buy-CEzVJZQm.js";import{a as Ip,f as sn,i as In}from"./errors-DUsd8eGX.js";import{C as Pp}from"./Confetti-B_SGZDIW.js";import{J as Ep,a as Tp}from"./jump-CZr_KgFH.js";import{E as Ft}from"./ErrorNotice-BVVq2BBw.js";import{M as $p,E as Np,s as Rp}from"./sendMetaTransaction-CcfiyKVp.js";import{E as Op}from"./EmotePlaybackBar-6-X8QjVO.js";import{d as Ap}from"./disposePreview-DvbibLHk.js";import{S as Lp,T as ni}from"./categories-ByT980ve.js";import"./sentry-CAS3BNIy.js";import"./intl-AKLEHPeO.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="a41d8556-4d07-4a05-a27b-3f9aec91ea53",n._sentryDebugIdIdentifier="sentry-dbid-a41d8556-4d07-4a05-a27b-3f9aec91ea53")}catch{}})();const Pn=Math.min,tn=Math.max,Rr=Math.round,br=Math.floor,vt=n=>({x:n,y:n}),Fp={left:"right",right:"left",bottom:"top",top:"bottom"};function Yp(n,a,t){return tn(n,Pn(a,t))}function Jr(n,a){return typeof n=="function"?n(a):n}function En(n){return n.split("-")[0]}function ir(n){return n.split("-")[1]}function Wp(n){return n==="x"?"y":"x"}function ao(n){return n==="y"?"height":"width"}function Jt(n){const a=n[0];return a==="t"||a==="b"?"y":"x"}function oo(n){return Wp(Jt(n))}function Bp(n,a,t){t===void 0&&(t=!1);const e=ir(n),r=oo(n),o=ao(r);let i=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return a.reference[o]>a.floating[o]&&(i=Or(i)),[i,Or(i)]}function Hp(n){const a=Or(n);return[Qa(n),a,Qa(a)]}function Qa(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const ri=["left","right"],ai=["right","left"],zp=["top","bottom"],qp=["bottom","top"];function Kp(n,a,t){switch(n){case"top":case"bottom":return t?a?ai:ri:a?ri:ai;case"left":case"right":return a?zp:qp;default:return[]}}function Qp(n,a,t,e){const r=ir(n);let o=Kp(En(n),t==="start",e);return r&&(o=o.map(i=>i+"-"+r),a&&(o=o.concat(o.map(Qa)))),o}function Or(n){const a=En(n);return Fp[a]+n.slice(a.length)}function Vp(n){var a,t,e,r;return{top:(a=n.top)!=null?a:0,right:(t=n.right)!=null?t:0,bottom:(e=n.bottom)!=null?e:0,left:(r=n.left)!=null?r:0}}function Mc(n){return typeof n!="number"?Vp(n):{top:n,right:n,bottom:n,left:n}}function Ar(n){const{x:a,y:t,width:e,height:r}=n;return{width:e,height:r,top:t,left:a,right:a+e,bottom:t+r,x:a,y:t}}function oi(n,a,t){let{reference:e,floating:r}=n;const o=Jt(a),i=oo(a),c=ao(i),l=En(a),p=o==="y",u=e.x+e.width/2-r.width/2,h=e.y+e.height/2-r.height/2,x=e[c]/2-r[c]/2;let b;switch(l){case"top":b={x:u,y:e.y-r.height};break;case"bottom":b={x:u,y:e.y+e.height};break;case"right":b={x:e.x+e.width,y:h};break;case"left":b={x:e.x-r.width,y:h};break;default:b={x:e.x,y:e.y}}const y=ir(a);return y&&(b[i]+=x*(y==="end"?1:-1)*(t&&p?-1:1)),b}async function Up(n,a){var t;a===void 0&&(a={});const{x:e,y:r,platform:o,rects:i,elements:c,strategy:l}=n,{boundary:p="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:x=!1,padding:b=0}=Jr(a,n),y=Mc(b),k=c[x?h==="floating"?"reference":"floating":h],f=Ar(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(k)))==null||t?k:k.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:p,rootBoundary:u,strategy:l})),C=h==="floating"?{x:e,y:r,width:i.floating.width,height:i.floating.height}:i.reference,P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(P))&&await(o.getScale==null?void 0:o.getScale(P))||{x:1,y:1},N=Ar(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:P,strategy:l}):C);return{top:(f.top-N.top+y.top)/T.y,bottom:(N.bottom-f.bottom+y.bottom)/T.y,left:(f.left-N.left+y.left)/T.x,right:(N.right-f.right+y.right)/T.x}}const Gp=50,Xp=async(n,a,t)=>{const{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:i}=t,c=i.detectOverflow?i:{...i,detectOverflow:Up},l=await(i.isRTL==null?void 0:i.isRTL(a));let p=await i.getElementRects({reference:n,floating:a,strategy:r}),{x:u,y:h}=oi(p,e,l),x=e,b=0;const y={};for(let w=0;w<o.length;w++){const k=o[w];if(!k)continue;const{name:f,fn:C}=k,{x:P,y:T,data:N,reset:R}=await C({x:u,y:h,initialPlacement:e,placement:x,strategy:r,middlewareData:y,rects:p,platform:c,elements:{reference:n,floating:a}});u=P??u,h=T??h,y[f]={...y[f],...N},R&&b<Gp&&(b++,typeof R=="object"&&(R.placement&&(x=R.placement),R.rects&&(p=R.rects===!0?await i.getElementRects({reference:n,floating:a,strategy:r}):R.rects),{x:u,y:h}=oi(p,x,l)),w=-1)}return{x:u,y:h,placement:x,strategy:r,middlewareData:y}},Jp=n=>({name:"arrow",options:n,async fn(a){const{x:t,y:e,placement:r,rects:o,platform:i,elements:c,middlewareData:l}=a,{element:p,padding:u=0}=Jr(n,a)||{};if(p==null)return{};const h=Mc(u),x={x:t,y:e},b=oo(r),y=ao(b),w=await i.getDimensions(p),k=b==="y",f=k?"top":"left",C=k?"bottom":"right",P=k?"clientHeight":"clientWidth",T=o.reference[y]+o.reference[b]-x[b]-o.floating[y],N=x[b]-o.reference[b],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(p));let S=R?R[P]:0;(!S||!await(i.isElement==null?void 0:i.isElement(R)))&&(S=c.floating[P]||o.floating[y]);const D=T/2-N/2,j=S/2-w[y]/2-1,A=Pn(h[f],j),H=Pn(h[C],j),F=S-w[y]-H,K=S/2-w[y]/2+D,G=Yp(A,K,F),z=!l.arrow&&ir(r)!=null&&K!==G&&o.reference[y]/2-(K<A?A:H)-w[y]/2<0,E=z?K<A?K-A:K-F:0;return{[b]:x[b]+E,data:{[b]:G,centerOffset:K-G-E,...z&&{alignmentOffset:E}},reset:z}}}),Zp=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var t,e;const{placement:r,middlewareData:o,rects:i,initialPlacement:c,platform:l,elements:p}=a,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:w=!0,...k}=Jr(n,a);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const f=En(r),C=Jt(c),P=En(c)===c,T=await(l.isRTL==null?void 0:l.isRTL(p.floating)),N=x||(P||!w?[Or(c)]:Hp(c)),R=y!=="none";!x&&R&&N.push(...Qp(c,w,y,T));const S=[c,...N],D=await l.detectOverflow(a,k),j=[];let A=((e=o.flip)==null?void 0:e.overflows)||[];if(u&&j.push(D[f]),h){const G=Bp(r,i,T);j.push(D[G[0]],D[G[1]])}if(A=[...A,{placement:r,overflows:j}],!j.every(G=>G<=0)){var H,F;const G=(((H=o.flip)==null?void 0:H.index)||0)+1,z=S[G];if(z&&(!(h==="alignment"?C!==Jt(z):!1)||A.every(M=>Jt(M.placement)===C?M.overflows[0]>0:!0)))return{data:{index:G,overflows:A},reset:{placement:z}};let E=(F=A.filter(B=>B.overflows[0]<=0).sort((B,M)=>B.overflows[1]-M.overflows[1])[0])==null?void 0:F.placement;if(!E)switch(b){case"bestFit":{var K;const B=(K=A.filter(M=>{if(R){const X=Jt(M.placement);return X===C||X==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(X=>X>0).reduce((X,q)=>X+q,0)]).sort((M,X)=>M[1]-X[1])[0])==null?void 0:K[0];B&&(E=B);break}case"initialPlacement":E=c;break}if(r!==E)return{reset:{placement:E}}}return{}}}},ef=new Set(["left","top"]);async function tf(n,a){const{placement:t,platform:e,elements:r}=n,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),i=En(t),c=ir(t),l=Jt(t)==="y",p=ef.has(i)?-1:1,u=o&&l?-1:1,h=Jr(a,n);let{mainAxis:x,crossAxis:b,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof y=="number"&&(b=c==="end"?y*-1:y),l?{x:b*u,y:x*p}:{x:x*p,y:b*u}}const nf=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var t,e;const{x:r,y:o,placement:i,middlewareData:c}=a,l=await tf(a,n);return i===((t=c.offset)==null?void 0:t.placement)&&(e=c.arrow)!=null&&e.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:i}}}}};function Zr(){return typeof window<"u"}function An(n){return _c(n)?(n.nodeName||"").toLowerCase():"#document"}function Ae(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function _t(n){var a;return(a=(_c(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function _c(n){return Zr()?n instanceof Node||n instanceof Ae(n).Node:!1}function Re(n){return Zr()?n instanceof Element||n instanceof Ae(n).Element:!1}function Wt(n){return Zr()?n instanceof HTMLElement||n instanceof Ae(n).HTMLElement:!1}function ii(n){return!Zr()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ae(n).ShadowRoot}function ea(n){const{overflow:a,overflowX:t,overflowY:e,display:r}=Ze(n);return/auto|scroll|overlay|hidden|clip/.test(a+e+t)&&r!=="inline"&&r!=="contents"}function rf(n){return/^(table|td|th)$/.test(An(n))}function ta(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const af=/transform|translate|scale|rotate|perspective|filter/,of=/paint|layout|strict|content/,Gt=n=>!!n&&n!=="none";let Da;function io(n){const a=Re(n)?Ze(n):n;return Gt(a.transform)||Gt(a.translate)||Gt(a.scale)||Gt(a.rotate)||Gt(a.perspective)||!so()&&(Gt(a.backdropFilter)||Gt(a.filter))||af.test(a.willChange||"")||of.test(a.contain||"")}function sf(n){let a=cn(n);for(;Wt(a)&&!nr(a);){if(io(a))return a;if(ta(a))return null;a=cn(a)}return null}function so(){return Da==null&&(Da=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Da}function nr(n){return/^(html|body|#document)$/.test(An(n))}function Ze(n){return Ae(n).getComputedStyle(n)}function na(n){return Re(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function cn(n){if(An(n)==="html")return n;const a=n.assignedSlot||n.parentNode||ii(n)&&n.host||_t(n);return ii(a)?a.host:a}function jc(n){const a=cn(n);return nr(a)?(n.ownerDocument||n).body:Wt(a)&&ea(a)?a:jc(a)}function rr(n,a,t){var e;a===void 0&&(a=[]),t===void 0&&(t=!0);const r=jc(n),o=r===((e=n.ownerDocument)==null?void 0:e.body),i=Ae(r);if(o){const c=Va(i);return a.concat(i,i.visualViewport||[],ea(r)?r:[],c&&t?rr(c):[])}else return a.concat(r,rr(r,[],t))}function Va(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Ic(n){const a=Ze(n);let t=parseFloat(a.width)||0,e=parseFloat(a.height)||0;const r=Wt(n),o=r?n.offsetWidth:t,i=r?n.offsetHeight:e,c=Rr(t)!==o||Rr(e)!==i;return c&&(t=o,e=i),{width:t,height:e,$:c}}function co(n){return Re(n)?n:n.contextElement}function _n(n){const a=co(n);if(!Wt(a))return vt(1);const t=a.getBoundingClientRect(),{width:e,height:r,$:o}=Ic(a);let i=(o?Rr(t.width):t.width)/e,c=(o?Rr(t.height):t.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const cf=vt(0);function Pc(n){const a=Ae(n);return!so()||!a.visualViewport?cf:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function lf(n,a,t){return a===void 0&&(a=!1),!!t&&a&&t===Ae(n)}function ln(n,a,t,e){a===void 0&&(a=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),o=co(n);let i=vt(1);a&&(e?Re(e)&&(i=_n(e)):i=_n(n));const c=lf(o,t,e)?Pc(o):vt(0);let l=(r.left+c.x)/i.x,p=(r.top+c.y)/i.y,u=r.width/i.x,h=r.height/i.y;if(o&&e){const x=Ae(o),b=Re(e)?Ae(e):e;let y=x,w=Va(y);for(;w&&b!==y;){const k=_n(w),f=w.getBoundingClientRect(),C=Ze(w),P=f.left+(w.clientLeft+parseFloat(C.paddingLeft))*k.x,T=f.top+(w.clientTop+parseFloat(C.paddingTop))*k.y;l*=k.x,p*=k.y,u*=k.x,h*=k.y,l+=P,p+=T,y=Ae(w),w=Va(y)}}return Ar({width:u,height:h,x:l,y:p})}function ra(n,a){const t=na(n).scrollLeft;return a?a.left+t:ln(_t(n)).left+t}function Ec(n,a){const t=n.getBoundingClientRect(),e=t.left+a.scrollLeft-ra(n,t),r=t.top+a.scrollTop;return{x:e,y:r}}function df(n){let{elements:a,rect:t,offsetParent:e,strategy:r}=n;const o=r==="fixed",i=_t(e),c=a?ta(a.floating):!1;if(e===i||c&&o)return t;let l={scrollLeft:0,scrollTop:0},p=vt(1);const u=vt(0),h=Wt(e);if((h||!o)&&((An(e)!=="body"||ea(i))&&(l=na(e)),h)){const b=ln(e);p=_n(e),u.x=b.x+e.clientLeft,u.y=b.y+e.clientTop}const x=i&&!h&&!o?Ec(i,l):vt(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-l.scrollLeft*p.x+u.x+x.x,y:t.y*p.y-l.scrollTop*p.y+u.y+x.y}}function uf(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function pf(n){const a=na(n),t=n.ownerDocument.body,e=tn(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),r=tn(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight);let o=-a.scrollLeft+ra(n);const i=-a.scrollTop;return Ze(t).direction==="rtl"&&(o+=tn(n.clientWidth,t.clientWidth)-e),{width:e,height:r,x:o,y:i}}const ff=25;function hf(n,a,t){t===void 0&&(t="viewport");const e=t==="layoutViewport",r=Ae(n),o=_t(n),i=r.visualViewport;let c=o.clientWidth,l=o.clientHeight,p=0,u=0;if(i){const x=!so()||a==="fixed";e?x||(p=-i.offsetLeft,u=-i.offsetTop):(c=i.width,l=i.height,x&&(p=i.offsetLeft,u=i.offsetTop))}if(ra(o)<=0){const x=o.ownerDocument,b=x.body,y=getComputedStyle(b),w=x.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,k=Math.abs(o.clientWidth-b.clientWidth-w),f=getComputedStyle(o).scrollbarGutter==="stable both-edges"?k/2:k;f<=ff&&(c-=f)}return{width:c,height:l,x:p,y:u}}function mf(n,a){const t=ln(n,!0,a==="fixed"),e=t.top+n.clientTop,r=t.left+n.clientLeft,o=_n(n),i=n.clientWidth*o.x,c=n.clientHeight*o.y,l=r*o.x,p=e*o.y;return{width:i,height:c,x:l,y:p}}function si(n,a,t){let e;if(a==="viewport"||a==="layoutViewport")e=hf(n,t,a);else if(a==="document")e=pf(_t(n));else if(Re(a))e=mf(a,t);else{const r=Pc(n);e={x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}return Ar(e)}function gf(n,a){const t=a.get(n);if(t)return t;let e=rr(n,[],!1).filter(c=>Re(c)&&An(c)!=="body"),r=null;const o=Ze(n).position==="fixed";let i=o?cn(n):n;for(;Re(i)&&!nr(i);){const c=Ze(i),l=io(i),p=r?r.position:o?"fixed":"";!l&&(p==="fixed"||p==="absolute"&&c.position==="static")?e=e.filter(h=>h!==i):r=c,i=cn(i)}return a.set(n,e),e}function xf(n){let{element:a,boundary:t,rootBoundary:e,strategy:r}=n;const i=[...t==="clippingAncestors"?ta(a)?[]:gf(a,this._c):[].concat(t),e],c=si(a,i[0],r);let l=c.top,p=c.right,u=c.bottom,h=c.left;for(let x=1;x<i.length;x++){const b=si(a,i[x],r);l=tn(b.top,l),p=Pn(b.right,p),u=Pn(b.bottom,u),h=tn(b.left,h)}return{width:p-h,height:u-l,x:h,y:l}}function yf(n){const{width:a,height:t}=Ic(n);return{width:a,height:t}}function bf(n,a,t){const e=Wt(a),r=_t(a),o=t==="fixed",i=ln(n,!0,o,a);let c={scrollLeft:0,scrollTop:0};const l=vt(0);if((e||!o)&&((An(a)!=="body"||ea(r))&&(c=na(a)),e)){const x=ln(a,!0,o,a);l.x=x.x+a.clientLeft,l.y=x.y+a.clientTop}!e&&r&&(l.x=ra(r));const p=r&&!e&&!o?Ec(r,c):vt(0),u=i.left+c.scrollLeft-l.x-p.x,h=i.top+c.scrollTop-l.y-p.y;return{x:u,y:h,width:i.width,height:i.height}}function Ca(n){return Ze(n).position==="static"}function ci(n,a){if(!Wt(n)||Ze(n).position==="fixed")return null;if(a)return a(n);let t=n.offsetParent;return _t(n)===t&&(t=t.ownerDocument.body),t}function Tc(n,a){const t=Ae(n);if(ta(n))return t;if(!Wt(n)){let r=cn(n);for(;r&&!nr(r);){if(Re(r)&&!Ca(r))return r;r=cn(r)}return t}let e=ci(n,a);for(;e&&rf(e)&&Ca(e);)e=ci(e,a);return e&&nr(e)&&Ca(e)&&!io(e)?t:e||sf(n)||t}const vf=async function(n){const a=this.getOffsetParent||Tc,t=this.getDimensions,e=await t(n.floating);return{reference:bf(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function wf(n){return Ze(n).direction==="rtl"}const kf={convertOffsetParentRelativeRectToViewportRelativeRect:df,getDocumentElement:_t,getClippingRect:xf,getOffsetParent:Tc,getElementRects:vf,getClientRects:uf,getDimensions:yf,getScale:_n,isElement:Re,isRTL:wf};function $c(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function Df(n,a,t){let e=null,r;const o=_t(n);function i(){var u;clearTimeout(r),(u=e)==null||u.disconnect(),e=null}function c(u,h){u===void 0&&(u=!1),h===void 0&&(h=1),i();const x=n.getBoundingClientRect(),{left:b,top:y,width:w,height:k}=x;if(u||a(),!w||!k)return;const f=br(y),C=br(o.clientWidth-(b+w)),P=br(o.clientHeight-(y+k)),T=br(b),R={rootMargin:-f+"px "+-C+"px "+-P+"px "+-T+"px",threshold:tn(0,Pn(1,h))||1};let S=!0;function D(j){const A=j[0].intersectionRatio;if(!$c(x,n.getBoundingClientRect()))return c();if(A!==h){if(!S)return c();A?c(!1,A):r=setTimeout(()=>{c(!1,1e-7)},1e3)}S=!1}try{e=new IntersectionObserver(D,{...R,root:o.ownerDocument})}catch{e=new IntersectionObserver(D,R)}e.observe(n)}const l=Ae(n),p=()=>c(t);return l.addEventListener("resize",p),c(!0),()=>{l.removeEventListener("resize",p),i()}}function Cf(n,a,t,e){e===void 0&&(e={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=e,p=co(n),u=r||o?[...p?rr(p):[],...a?rr(a):[]]:[];u.forEach(f=>{r&&f.addEventListener("scroll",t),o&&f.addEventListener("resize",t)});const h=p&&c?Df(p,t,o):null;let x=-1,b=null;i&&(b=new ResizeObserver(f=>{let[C]=f;C&&C.target===p&&b&&a&&(b.unobserve(a),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var P;(P=b)==null||P.observe(a)})),t()}),p&&!l&&b.observe(p),a&&b.observe(a));let y,w=l?ln(n):null;l&&k();function k(){const f=ln(n);w&&!$c(w,f)&&t(),w=f,y=requestAnimationFrame(k)}return t(),()=>{var f;u.forEach(C=>{r&&C.removeEventListener("scroll",t),o&&C.removeEventListener("resize",t)}),h==null||h(),(f=b)==null||f.disconnect(),b=null,l&&cancelAnimationFrame(y)}}const Sf=nf,Mf=Zp,li=Jp,_f=(n,a,t)=>{const e=new Map,r=t??{},o={...kf,...r.platform,_c:e};return Xp(n,a,{...r,platform:o})};var jf=typeof document<"u",If=function(){},Ir=jf?v.useLayoutEffect:If;function Lr(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let t,e,r;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==a.length)return!1;for(e=t;e--!==0;)if(!Lr(n[e],a[e]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(a).length)return!1;for(e=t;e--!==0;)if(!{}.hasOwnProperty.call(a,r[e]))return!1;for(e=t;e--!==0;){const o=r[e];if(!(o==="_owner"&&n.$$typeof)&&!Lr(n[o],a[o]))return!1}return!0}return n!==n&&a!==a}function Nc(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function di(n,a){const t=Nc(n);return Math.round(a*t)/t}function Sa(n){const a=v.useRef(n);return Ir(()=>{a.current=n}),a}function Pf(n){n===void 0&&(n={});const{placement:a="bottom",strategy:t="absolute",middleware:e=[],platform:r,elements:{reference:o,floating:i}={},transform:c=!0,whileElementsMounted:l,open:p}=n,[u,h]=v.useState({x:0,y:0,strategy:t,placement:a,middlewareData:{},isPositioned:!1}),[x,b]=v.useState(e);Lr(x,e)||b(e);const[y,w]=v.useState(null),[k,f]=v.useState(null),C=v.useCallback(M=>{M!==R.current&&(R.current=M,w(M))},[]),P=v.useCallback(M=>{M!==S.current&&(S.current=M,f(M))},[]),T=o||y,N=i||k,R=v.useRef(null),S=v.useRef(null),D=v.useRef(u),j=l!=null,A=Sa(l),H=Sa(r),F=Sa(p),K=v.useCallback(()=>{if(!R.current||!S.current)return;const M={placement:a,strategy:t,middleware:x};H.current&&(M.platform=H.current),_f(R.current,S.current,M).then(X=>{const q={...X,isPositioned:F.current!==!1};G.current&&!Lr(D.current,q)&&(D.current=q,Ul.flushSync(()=>{h(q)}))})},[x,a,t,H,F]);Ir(()=>{p===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(M=>({...M,isPositioned:!1})))},[p]);const G=v.useRef(!1);Ir(()=>(G.current=!0,()=>{G.current=!1}),[]),Ir(()=>{if(T&&(R.current=T),N&&(S.current=N),T&&N){if(A.current)return A.current(T,N,K);K()}},[T,N,K,A,j]);const z=v.useMemo(()=>({reference:R,floating:S,setReference:C,setFloating:P}),[C,P]),E=v.useMemo(()=>({reference:T,floating:N}),[T,N]),B=v.useMemo(()=>{const M={position:t,left:0,top:0};if(!E.floating)return M;const X=di(E.floating,u.x),q=di(E.floating,u.y);return c?{...M,transform:"translate("+X+"px, "+q+"px)",...Nc(E.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:X,top:q}},[t,c,E.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:K,refs:z,elements:E,floatingStyles:B}),[u,K,z,E,B])}const Ef=n=>{function a(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:e,padding:r}=typeof n=="function"?n(t):n;return e&&a(e)?e.current!=null?li({element:e.current,padding:r}).fn(t):{}:e?li({element:e,padding:r}).fn(t):{}}}},Tf=(n,a)=>{const t=Sf(n);return{name:t.name,fn:t.fn,options:[n,a]}},$f=(n,a)=>{const t=Mf(n);return{name:t.name,fn:t.fn,options:[n,a]}},Nf=(n,a)=>{const t=Ef(n);return{name:t.name,fn:t.fn,options:[n,a]}},Rc=216n,Rf=(1n<<Rc)-1n;function Of(n){const a=typeof n=="bigint"?n:BigInt(n.trim());if(a<0n)throw new Error(`Invalid tokenId: ${String(n)}`);return{itemId:(a>>Rc).toString(),issuedId:(a&Rf).toString()}}function Af(n){if(!n)return null;try{return Of(n).itemId}catch{return null}}const Oc=["cancelled-listings"];function Lf(n,a){a&&n.setQueryData(Oc,t=>t!=null&&t.includes(a)?t:[...t??[],a])}function ui(n,a){var t;if(a)return(t=n.getQueryData(Oc))!=null&&t.includes(a)?void 0:a}function pi(n,a){return a.kind==="listed"?{...n,isOnSale:!0,listingPrice:a.priceCredits,tradeId:a.tradeId??n.tradeId}:{...n,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function Ma(n,a,t){const{address:e,contractAddress:r,tokenId:o}=a;if(!r||!o)return;const i=`${r}-${o}`;n.cancelQueries({queryKey:["owned-token",r,o]}),n.cancelQueries({queryKey:["secondary-sale-state"]}),e&&n.cancelQueries({queryKey:["my-assets",e]});const c=t.kind==="gone";n.setQueriesData({queryKey:["owned-token",r,o]},p=>p&&(c?null:pi(p,t)));const l=e?["my-assets",e]:["my-assets"];n.setQueriesData({queryKey:l},p=>p!=null&&p.pages?{...p,pages:p.pages.map(u=>{if(c){const h=u.items.filter(x=>!(x.contractAddress===r&&x.tokenId===o));return{...u,items:h,total:Math.max(0,u.total-(u.items.length-h.length))}}return{...u,items:u.items.map(h=>h.contractAddress===r&&h.tokenId===o?pi(h,t):h)}})}:p),n.setQueriesData({queryKey:["secondary-sale-state"]},p=>{var h;if(!p)return p;const u={...p};return t.kind==="removed"||t.kind==="gone"?delete u[i]:u[i]={priceCredits:t.priceCredits,tradeId:t.tradeId??((h=u[i])==null?void 0:h.tradeId)??""},u})}function Ff(n){return!(n.isMarket||n.forSale&&n.priceKnown||n.manage||n.soldOutWithResale||!n.stillResolving&&!n.resolvingTrade&&(n.isTokenRoute?!n.ownedAssetLoading:!n.deepLinkLoading))}const Yf="data:image/webp;base64,UklGRqgOAABXRUJQVlA4IJwOAACwOwCdASqEAIsAPj0YikMiIaEWuib4IAPEtQBl0QC/bukK7J6X8cPZP5F69/Nvhj8oPlD3odY/QB8RXPv/C+3n59+izzA/0l/3/9064PmD/bH9Zvey/33r8/2PqC/zH/fdaX6EX7O+nP+3Xwlfub+33tOf/+7N8wTMuJT/znss7V9qD/DcDplr/deudN0/Rcajjp49/Q//7vLR70+4X+tP/R9az//+3r9z/Yk/ZVVfCa+jj+kU2kxc+zPDZIZQYWF19BTevkFTZdPnQBT3YukdDX/AtCNcmvBrFJ96eYkUWaCCtnOpfB+/IETSsPYuwsabIrqSWHYoPBskXi/DUubCFDAf/6+0pCLU1kmMIueWH8HebltZsATbIO+vXwG1gHAXjGECElz7j/+GXHZJM9ORAFgOa/b/pGdMUEE9PfuMHx1G3GpnRw8WEP5FknNoUNOyb6iY5VX/W5w6pnS5r1srs4CXTuHzUJLdvXVpyiQNuBwCyLYlukPjvLuqqHRrv5/jHTa1L+iumi2wLA8NzahM3euE6fvC7shIbIWajyLkVYhWOOdMRjOWdhSN1wi7JvE4t+bFXSVHOX+4DnQxVhhUKacLKMYPHhQKLZSdyYzM66dZ22undenNBcAjNHjBW+9t0W2glcAA/v44VaU8mJJP1Vz1l456kKu23B2wH7M9h1OtAwoGAGj8t///XA7H+OEVSxGjYfFAlM1Upvv/NmvKOBdxK8JXyQLqAqwy0bgja/QQTJKOEDkKXVg8HRGbA4YhU/9KZ5ulhbrnm7S6a3XhSmzHNxDfaPRezgQ0/P9ZW+KbLltsoK42ORYMdpD+ZNjvwybgVPBD9EHv+g73MeRCpYGemyJk33SfCLWO6KdUBlYRNr8Mo+qAoyC9JkWFe7IXV7Z97jmAJIiqXCgQLxyeB+hbtaa+FYbgl1eFTp7G94pdaY/8UctUnxSI5D+T1JSv+XjPm9esp935RnwxdbS6hotafVZHEYXhNE4yJuAqxUJUaOkBZ4Q5Np6wPjASRuycYuHZCHt2R3u3m2lnPOuVzRIM8oEZ+8HzouhdC8oAvg58NyHo8Vf/7w6NRKTABd/OXH580LMQQTdyszsubdMC9/V6zXxPvXQB4tlSIcLFtIZFgSmZyjuhvazQPJXERNOoR7CaZw2muWotmc1HOhl5YIiupxst1r61HraNl8+SaP5hh5c7eE4Z6mR6kPSQtsPTv801VocMwO0llrMRk3g20bZASEJCSF4Xx+DAKcXCpAzekMGHeOQQlMSqol0oZ2ysJ28N7WILeisnEJpp8bXhs8i8xP/JPeJ2mWM/qBOuL4jtzJRTFsHCrSkF/+pIoYxOUwFvqJ2lIDhsQ+Dz/qLXkaF2dV0Db/02Uizaa1nU3ROJmPBQ6h+88RI0hr61bueh7niiMRqzuJoERGL1qHWPKkBT/sDemsRnxsjKFqcFLTTAMZxAHbmHPs5H+gAJu4EWTOsRVgo4wVNO7iEWnl8abB2NKiM08EauUs8uWo5Z315p9I4R8yNXBrdAFfvjjpJnweJotSWdraKLe8Nl/IYJ30/Dch5FFjZQDeUJyDjNQ7UncafuesORQsS8gbMBhIjaMpkz6lFhQXTEwXffXf7Igim1f2TvIBMbUucINFHNBalbwuR9n4nktwHAAfhJinTX1ZSIcI1ivEBZqhr0PihAYnQEI4t+UIeMlIexMcD9pex7ffiC7xTypCNQZ4els7i0w1dRQPGkGSiqBhVpmYU/fa5AEsstEza3yJiyo46A8tdBZR7k+QjkjZi4R3JTDru7uAH8uAs99WmAWo7EtCfnIVcFLpMMVm4ysLp+H8w7tsa7oiAMOicQjpI206qt9gXJK0SRDCqXnpQPO5Za/sa0F9pFtQdk0IWV1bUZl50bsz1jRSgkgGLnG7codLl+O70us5JrrEAGElgaaXnHmCBhRme/TrpssMp3xOmZk0SYGH4jXStL3ojRg1WS450m9OdBzDKSErTczJlZu3nVH0YlqU/vLXp8ZUrVMqDnxO/EDMcahK1NulV8mcj+VKn2kPGku5QKF7iJJ93wd472rPI/Ty+MgECIrxo3TeA9OD96pLAgpF+t5iFercE6smtM9t5wruffSJ5YsS5pfMVNDdsPVS/vqwqHZRqUOSVWSD7wcqsWWt/WN3HUKS6iMJZmWe1iI77VOQ3eXgNA3zI7C5meewdOYjeaBg8EZ4cvdhJKn/67zSZITA8+fLTxDPm67nxcLbn0wDujGAF6ej27TC1GqzrpfQw+lBiRxSz4jn8x6VpAlKugU0gBAuZ2+zgZzWdAbq7juw3/PLVwGoU2eek5v1hW8Yi+T4pFEd7BdDbQRpv5l060TsIDWyr9/Pu6Tx8Sw/pTLwo9gG5L/9I96u2gJNoTogVbEpdYwfpMHBIK4E6gJ5WN2U5wK1nBhrHIFmBXZAyRjaCkurXxFowaB+aWWdVEz+6qj68/QnbWxjpU4xFg9mlaF5HokpyipN1BP+k6+3NQScKOSoApBIXm21svSUNNsYAQ+zgmQ6ZkAuSAynxgKswcfJiuA/e2Nuv6ODDw2h2Ceq5hldyZOZeMHbiAYuM60m33jsww0Uz8+4/Bry8tjZgXaLV/rlL5uP5pLf69IGbOFb1crxcN24yoKmIUAdtPf/co1SMQaxe913fYm8SZSj915c3LIj6HJguanjJB6xbKrwwZw9vmhrhshZpL2fNE3anpscm25z86/pFd9p//RYhaUgA56qx4HTvcD8lvvGAIW22PuYEMmYiZSbeHxpCKrG9iOKsxe7LXBfbQYCY12ed09vd/sLTpEmjuW1E/TSy9EhvRhF69d0KSSUeK1/2fqD9GZPe2s80Jdih9w6NwLxO/AC8AeZjS8gZIOafjhXVpzaKvhix8s1cO27cpUc/x13ywHu7WNVApWpCMNak9/QsanffreW5zk5UGrb/XFcJBpw/fp7Y3P/TiVlv9tm+xxsH4iw1MojhGsNJqBf9G0EGCyYh/OIjLOgv/KiVKn4KT9JKP/Uc0gvWfojQoL2cbQ/YHropMzIdwcarcB8fu08LL6cIHAPb9B2z/Rf4UJL/Ubdmy6jlxdkE01o3uWTeD2rD+IAvKf/22mdXvFK7jqHe499e/ceQouvvdG6cBfIpIAkF5/R7eOANm/YyxLS/ZfMwsdOv+JfuzzugHhAo470jWPURUr0Xn4njgpqI+Qj94gnkGTC0ReIxqIPS1b+RbjDc4MZZ9MAklPArtww4KsqO2JaWOom1/1AxsyPutOFrKBiuTdjE382yfu5g+GJKuwQu3cq2dabFpJyy44S7v5bpURssVtr1D8mxEYVlQ8fly+KRc+ozMRv8u9dj5jffRCTLisRHP3X8ahsJ2oZhd4aftYRWOx0T+gZ97rtkDRPJzlhfgLyMqiSvJjpxVKpv3PStthRNe8R8F9H8DFoPHSzHLmhe/uDSPeh3WffAKbjMKv32PUBbzp6f4GfwfjQD/xKCCRvV98FxqiqzNKlGnRzdZ6TCwaGLcgYygtYmNZKzhf7rOF9XXcVsNe/FloRRkBYeol7dma2BOGazDoZhxAkI5TWDGkO8Rd23eAUtpTOtgLoJdxik+XTsCLBz3xztmixjiZMgk33zVBoTsxJCpowT8UgJm56EBgWIJ8zDHdKSIvYtAuQo90BfPpwlqLFvQ62szIXGObwVCJBdaPQ6AOlSDrg/4M1Xptssca7lnD2z+0dh3f4AYJrPrGcXP9SGBq30IEgvBsrZOjfe7U2ZVguXost19mo1m/Hb/FwWSc3O9fFFBQJhZEYd9T8i0MIYbgdWdTEH41gDraRIKZizyjK4jVPPgi35lSRpQkyGFqloeLs0ULHVnqozYp97FxyjGuHBsWiA1dhcOzxWfb+9L2kk8EkzMe++yJQ9GqbD1xtOvYtb2UOexwpbDJAFJlPRYBxrMkATgGwSW4A2LWZy+pBo0GmiM1YGavhsPEBxglF83gZ9QIggiukPYB85BDmmb8ru99wD+DQvP4hu2YCz6A5kp/sJD3qOI7HIsJxRDkaO3sf/bYfZuqa3LdVmIT853KYb79N6neXufSxFSQnyi30mJHYwVcLOmAbDRvHYwF83Y4b3NN8NOUSH4LXUFaZBoYelYzeiQg8IgkLa+g/RwRCUThxaOaTGfQNDGN2fFLJrDqh88e6T9bmWy9AzEoG29fv9hO+1zA0iEWnoTtNr1dBlC2eHYfWgoiWCBVcaC6cO6fIpEIncf2VapcojDaS3FujWm+w8IoiKoq9+Zzm1wng7TIKJKpp1mkbm3M2In/0vTqkGRtDVzLmUu/MzvzlpfyE7VFsAdsreB5BqSs60/mfodU1+j2SN84H1YurnWx4Z0u73N5QCNLLIlXEzvcE48IcvnvHogKXfYviH/f2iBtI3vrK3GIiThSR8ykXmUtIrxTtqbHvy82xxbyqM/ya2sKPKRdTrD85uEPL0Z8dvPiUfiVRCut4V5CnXWKzMKwmyXh2zdT/Wx1klkw4ixJ8NP/3JGF0lDVYVde7ZwEYrPdHJhgCgfH5KfwXpHykSyj20QwjG+7rDeFrrmlBS2dEbI2bOB2rMTgueOmZlfczR+dUuIss1K61IE1X8XChw2KIfkpCOP4G5DW2FBnK7MOx72/39EtlmaGIvi2uPD/S5KJCGWSH/ADxGkdDXJbT7IjwL0GTIWO1pkQgtPfrQ4KW84E+PdkU9hIuQO3a3Vgp9tGVCmDEX5bfo3c8W46FFBoLX5w3HFzNNkhTPTtJV+IO6h3yF4X9d2YxLqM+HnAwS2XyEvNrrcQbJx60XMbhF2fZy8hFLKLl0VHYvud4N/vW3v2siUFHw/s3F2S/62Z0mef3ERpa+28r0gvweNyUduP3KKmphD4cnGwoSlKz/BeXUnlO/hw9Eftd/qtYsyl+fxCu6ydlFSjlf8r5gsxR3kPUVtX3Z+hYk0O6LvcRQsJSnlitd9TCW4zGE59EoMxN2N0izBRDgAAAAAAA==",Wf="data:image/webp;base64,UklGRgwMAABXRUJQVlA4IAAMAABQMwCdASqOAI4APjkYiUMiIaEZqk6cIAOEtQBlWQCsPxs/GflL+WHzA1P+zfhD+l/sr8cvBbpH0DOTP9j/evah/rPUf5gn6af7r+49dfzDfsz+yPvGf6f1W/4r/M+wB/P/9T/8+wi9BLyzP28+En9t/3N9pH/y+wB///UA///FKf5/td/0HnLBOfeD9h6++yHaw/yO+agA+p/ExpOMeXoT54Xq72Df1z9Mz2AfuT7OS8YmVmOsmf5jqgueuMtdVDf7/8IGxCrKJVChp/KFp2oKFsO3+XUmwngaj6/KEi7C1DSuCh+zzCla9qnnEkR/lN/ebybUtOwxC/p+mhLOJMySpLEWwLMbmUzXCqcNK16hnpbCN+9vw3+nXHO91JFWS3EIj7YQRHRQllV+lVSTFM7EpzAIoof/7r+m1Y4VEnW29BCxuD7ccWEUcsaJd2V30EeDTbQCaEKZWFPJDxNOW38bQtKqiq2JW1YTvNG580QG2R6n6RStIpR01qX2WRZI0IQp89aKwHBuygxv09yseoLGd7tytCoaI5ow7+H+adzdekfWYAD+/t14UP643nlJr6+fzCSALmONrhm1HM9r/VJjGO780J/4xzq4fmwzMh+yAP7ORoQMYPQFL8+iKum/1qkeJnhtmLx36EDUhiylPQ1f/qsUYuEhCbZyW2XdXCBD6slorbYJhPZwGmkvNnewiRvcjvWe/0lvRe9+QjeaSNVOY2ffJT8NEWYqjJz0kA+mY53/IW+QpHju9l0d6eT6y8FYqHsW468sTTOvbtnAoyEhXaKkNND6o8lteDtnWHy+Odw4k0hfK3nM0cM+kp2GLZ+CT8ioE50GyNbNgn8B8vCW4Eb1K4YoeNGuq1kvFzfgCWvcW2sZTTO3e5pXWr9cnX3FbDGqPTujc9duJ35YmVbpjyAcEoH1KCsTRrycxu43ZGHhfL+GmEAA8o+8wd8lAHeorj9Ryp7uuWZ38R9AQACcqcUXurMjB7gxTl/8xweLH63MF21d2KMg4fem8ZkD3SkUG7Q2rP54BMmdjxJ9JgaZUrMBrV9GFqpJczgl9UAaP3Q/7R7nbexZ2UeB3HiCy5MKPjugecflKlll5aFJ07nRCYyOLOH9fb16mNlL9mWM259E31qcK4wpda3WGYMHOBOaKNfOxovW/u1df+qNevMn1SC/4vGKJstZ9PqE5btrilfwv0nSAQj/Q8dWAb3WKIAty9DT33t9vLz+e4aQNXru1U9rK+wTBmpCqEX9pSfSBywG8++6tF9Dzvt2dp4Ly/5FJPaOcH8+nU1a4l+XoTwpqk+yKJ0iY57ceXfl4fU77cs/8L0P1s44NWEIIX86Dx3zJvZGkQIn7YASFbLuKUuL3yyRmjK3epZIzS8q6ehQeQqVqnUw5eIPN0EX1yynGeDQjR24rjnxVtUlIqynCfszNLYPYyMIwwON0q2nCWvku6CZCUlEuZx+rruZ0xqcBzHF3xWmXItXuids516hkBSbPMThKqgTUZMGMMZ62azX5N94SBL7v+uS3P1ZCIza02Pgn8T/7NTE78CT0LmzqBEC1cH4OXLHyTqY4j+Cv4FoAejB3EJwCMhQiMLdnkb5qW+J4vEOTFUB7Xtvd2QgBXt0k5szm1QueRBDJMGAt549zXUvC1ayeSEuaGWhwb/JWOZA0tRqXLQIHMmA82/fqojN7zFdCeuCpV6YJGfleJFx9hM3E7DqKfRPG4dnevUWEzc89PCbOwSauxRXX967+DJbLaRzaXYPAP/+OlZ3hsk3xp6FDz62cJz/7UaqZ+L8ljKHJDJWb9z+bmcBGTKwg/bFy7aMSTVyVg/9Enj7xbwkU2zfy1/pKg7+NgTQWum04uv1OJbN57ArGK7D490MId38WjC65l78Pzu7NrN+B5ijzNoWH04e9Pcl73tni1fiORqqFrog6q/CamsBAlZRZWBLHKtN6Yh//b8qVGprn8VPF/VK7nZW70N1XtzyT2leLRfwRBqo4SIhuvqxOdHKNJHg1LXTlB/coShBHuyLS6wu/+o/YEwXybvqf7Ojys881X2cXNmexU04k0vUcyy+rKGmM6FnI6THfe2Tix72WnhHh2AingEVPQUoIIJG/7B5WrgJ2xfS2lCjFca1D73Hm7ye+fLOZSi+2TchrOAv2hi5xEYo5KiLYwKu2IfS0p+QqzkMEFyCIOuC5NFapFAWKWQ4O86kaENGqe1+v1ZILPmw86ztmGYuIizbkFakccHhURH+Ve+h8AyTPfiC9+E5uxgWh8E6sT7nhJN09IOah7RxqqKRX6/DFYH2bNmBZyWTrbWW1s1eweEC3mN7vG3Xt9bpw4bRqMuHNPiNK85445nBEmityQdIjtjF3JrZ9HpOaGrIuaaeW3iH7C44ITfsHcVJY/vTdpC3tqmtf6/BZ93mlQFBY0MluEiRTe7oUB1E7LiUGz8rkQZKJJIZ8JMSfjqUHyhDrL+B56rUW+pbd3PqVOLYiTglN+0DPhK3WpSI6wpdyvXOsWHG4Ta5xPCXk5JZSlld8F/X2O2QLiHXW587NTGkyZLQ6JCTo39tmm7vd3es4poNsDPbjhYJyGpRAqxjHLWCeyeJlvbDOieNltR+r952RSdtbkG3oHdvfxW6Pjb2YAyxaThXMTTyT/zYYm1Io6wic5GHpk2XOYbuPpM7ZevMxHtXuBU8xAFZEdeyKTe9uH/UGK8BYHm+N3bjkSBBpccHo+7RNVIX0s99vCP2NiXc4nAAswcNqVIDGDGL6yw9mQLnqJf67m0nhpkYMDU727dp0HJr9Ha4iu2nYrY4WbHC36j2N6iLfMKcTWaiJt5jGxWzb8A4vlC0YiHxi5G6hurHxARx6MMSf0bJmtyeeiRQVN0qy7dj2EAbarH0fHm8s8R9FBsmP+MaJ0EUAPwv7ty5BsY6D6Hyr/0JE2SgiBzriUqckvhNPR/OwC+JD1Mm2bjOFSq3qsiw9Kiw1KRymrWkF4Qd4V3XEi19kg/72fWqSSD/uvXkbLvcUeuGxmWIlDoBdKEkl/ld8xhLrLwdg7FyqOP4DS3VTAlFdd9/5MRMl56GDvO+HKTHXbsW9X+r6GRr2IX31uEVBI3/pfOScwYkF4hYkTmzP22VY8UCUvDruM6mfYED5HA88Gd+rn0t/0+v1vs1ArAcyeSS+U1QWvfTziu2+evgTaZB/x2HIzCmH0LGpMC6803Upr2innO/UcDUHEYKg6Un3+HxdlU2lPbniy4HPzLfzrAE94TRlcuoeOqrcTI7eAgYRNKwXh7XIeFrCsmIRgrt8YMu2v4jM0icqwly+QPuy2Kw8J6cXH2BA7K2LAF85VIVNVoRlDLXxjwsBb4heeCxAzkU+gm7I1b5uvL3i2xq/xj+lhL8t6XTKJliRrlPGHQuVR3ZceU87KLxOQcICfVOCe7B88mxyvsB2FmiotOM3UOnG+VcZ3jL1W+JFDzYyR9Y3KsZNaeJAazd5ajmnZLTYIY7gJ4N4t99U2hY/CMgI0yMNLaq3cJB0CNBsd1hRKl7lZ1wMh16/EZx5jig5JWvlZNPTMuJFHvpW42fyFjIfKslwVHB/SJKWDRr3w9uFCRm/Z3ABn2ydMFGvXjMZEaTsZlqF17J76wjrLkgmgcbtrtL9N8T3dXsKhM4LPscSPo2kc9MfW3dmjuo98vCdxBR/RvMAgm0VzEuXulny1QdmDMzoBUfPseIFkTNYFg89+m4OKn/8Xc28jcPteGx8v0vwYyKNlOAZvi/yt7OImF7kADj+rzqjSoqwVTnCCjOKrF1Gt1i+6oeDggdd5wEh1ghvxdHELxvJeJE8x82cfHEVXhE9Nheu7Q1WycLXUTZA8oZHsdBaBFpk6vyYdYFT8YTShaCjPle1+2DJHzXzhRUQ6ZY/HcDs/vS2V8+jO+pjV23u5WL6yRWULzVi+0qUXIiJzd9qj65YnWPMxIubcSpm+5n8vMpysoMuGzoNwBmNszF+S+b8acZRgm2Gi0UT5OGuYwq4wZ5kmd8OqnDzhze2RxwMRtRm+17eKYWzLWtgVuOca/HWuBI58UC9FNZtBLv1l2htg7Iyehb/cr9uKvXkPXh0LFeyfEc49dOsGvppssGqOAAAAA=",Bf=g.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 24px;
|
|
5
|
+
padding: 12px 16px 16px;
|
|
6
|
+
min-height: 0;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
`,Hf=g.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
padding-bottom: 16px;
|
|
14
|
+
border-bottom: 1px solid ${d.colors.gray4};
|
|
15
|
+
`,zf=g.h2`
|
|
16
|
+
margin: 0;
|
|
17
|
+
font-family: ${d.font.sans};
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
font-size: 20px;
|
|
20
|
+
line-height: 1.6;
|
|
21
|
+
color: ${d.colors.text};
|
|
22
|
+
`,qf=g.button`
|
|
23
|
+
flex: none;
|
|
24
|
+
display: grid;
|
|
25
|
+
place-items: center;
|
|
26
|
+
width: 18.535px;
|
|
27
|
+
height: 18.535px;
|
|
28
|
+
border: 0;
|
|
29
|
+
background: none;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
color: ${d.colors.text};
|
|
32
|
+
|
|
33
|
+
&:disabled {
|
|
34
|
+
opacity: 0.4;
|
|
35
|
+
cursor: default;
|
|
36
|
+
}
|
|
37
|
+
&:focus-visible {
|
|
38
|
+
outline: 2px solid ${d.colors.accent};
|
|
39
|
+
outline-offset: 2px;
|
|
40
|
+
}
|
|
41
|
+
`,Kf=g.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 12px;
|
|
45
|
+
`,Qf=g.div`
|
|
46
|
+
flex: none;
|
|
47
|
+
display: grid;
|
|
48
|
+
place-items: center;
|
|
49
|
+
width: 180.465px;
|
|
50
|
+
height: 179.763px;
|
|
51
|
+
border-radius: 15.746px;
|
|
52
|
+
background: ${d.colors.media};
|
|
53
|
+
border: 0.176px solid ${d.colors.muted2};
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
|
|
56
|
+
img {
|
|
57
|
+
width: 149.568px;
|
|
58
|
+
height: 148.866px;
|
|
59
|
+
object-fit: contain;
|
|
60
|
+
filter: drop-shadow(0.736px 2.945px 3.682px rgba(0, 0, 0, 0.1));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
${d.media.maxWidth("mobile")} {
|
|
64
|
+
width: 120px;
|
|
65
|
+
height: 120px;
|
|
66
|
+
}
|
|
67
|
+
`,Vf=g.div`
|
|
68
|
+
flex: 1 1 0;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: 32px;
|
|
73
|
+
padding: 8px;
|
|
74
|
+
`,Uf=g.p`
|
|
75
|
+
margin: 0;
|
|
76
|
+
font-family: ${d.font.sans};
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
font-size: 20px;
|
|
79
|
+
line-height: 1.57;
|
|
80
|
+
color: ${d.colors.text};
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
`,Gf=g.div`
|
|
84
|
+
> div {
|
|
85
|
+
font-family: ${d.font.sans};
|
|
86
|
+
font-size: 10px;
|
|
87
|
+
line-height: 1.43;
|
|
88
|
+
color: ${d.colors.muted};
|
|
89
|
+
}
|
|
90
|
+
`,Xf=g.div`
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
gap: 4px;
|
|
94
|
+
|
|
95
|
+
/* A 24px slot holding a 19.855px glyph — keep both boxes rather than one flat size. */
|
|
96
|
+
.ico {
|
|
97
|
+
width: 24px;
|
|
98
|
+
height: 24px;
|
|
99
|
+
background: ${d.colors.text2};
|
|
100
|
+
-webkit-mask-size: 19.855px 19.855px;
|
|
101
|
+
mask-size: 19.855px 19.855px;
|
|
102
|
+
-webkit-mask-position: left center;
|
|
103
|
+
mask-position: left center;
|
|
104
|
+
}
|
|
105
|
+
span {
|
|
106
|
+
font-family: ${d.font.sans};
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
font-size: 24px;
|
|
109
|
+
color: ${d.colors.text2};
|
|
110
|
+
}
|
|
111
|
+
`,Jf=g.div`
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
gap: 12px;
|
|
115
|
+
`,fi=g.button`
|
|
116
|
+
position: relative;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: space-between;
|
|
120
|
+
width: 100%;
|
|
121
|
+
padding: 12px 12px 12px 0;
|
|
122
|
+
border-radius: 12px;
|
|
123
|
+
border: 0;
|
|
124
|
+
background: ${d.colors.white};
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
text-align: left;
|
|
127
|
+
font-family: ${d.font.sans};
|
|
128
|
+
|
|
129
|
+
&::after {
|
|
130
|
+
content: '';
|
|
131
|
+
position: absolute;
|
|
132
|
+
inset: 0;
|
|
133
|
+
border-radius: inherit;
|
|
134
|
+
border: 0.5px solid ${d.colors.muted};
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-selected='true'] {
|
|
139
|
+
background: ${d.colors.media};
|
|
140
|
+
}
|
|
141
|
+
/* The gradient is masked to the border band alone, so the ring paints over nothing: a padding-box fill
|
|
142
|
+
here would sit on top of the row's content, since this layer is above it. */
|
|
143
|
+
&[data-selected='true']::after {
|
|
144
|
+
border: 3px solid transparent;
|
|
145
|
+
background: ${d.gradients.flare} border-box;
|
|
146
|
+
-webkit-mask:
|
|
147
|
+
linear-gradient(#000 0 0) padding-box,
|
|
148
|
+
linear-gradient(#000 0 0);
|
|
149
|
+
-webkit-mask-composite: xor;
|
|
150
|
+
mask-composite: exclude;
|
|
151
|
+
}
|
|
152
|
+
&[data-disabled='true'] {
|
|
153
|
+
cursor: not-allowed;
|
|
154
|
+
opacity: 0.55;
|
|
155
|
+
}
|
|
156
|
+
&:focus-visible {
|
|
157
|
+
outline: 2px solid ${d.colors.accent};
|
|
158
|
+
outline-offset: 2px;
|
|
159
|
+
}
|
|
160
|
+
`,hi=g.div`
|
|
161
|
+
flex: none;
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
min-width: 36px;
|
|
166
|
+
/* 12px on the left (per review) so the control clears the row's rounded corner; 9px elsewhere. */
|
|
167
|
+
padding: 9px 9px 9px 12px;
|
|
168
|
+
`,mi=g.span`
|
|
169
|
+
display: grid;
|
|
170
|
+
place-items: center;
|
|
171
|
+
width: 20px;
|
|
172
|
+
height: 20px;
|
|
173
|
+
border-radius: 4px;
|
|
174
|
+
border: 2px solid ${d.colors.muted2};
|
|
175
|
+
background: ${d.colors.white};
|
|
176
|
+
|
|
177
|
+
&[data-checked='true'] {
|
|
178
|
+
border-color: ${d.colors.text};
|
|
179
|
+
background: ${d.colors.text};
|
|
180
|
+
}
|
|
181
|
+
.ico {
|
|
182
|
+
width: 14px;
|
|
183
|
+
height: 14px;
|
|
184
|
+
background: ${d.colors.white};
|
|
185
|
+
}
|
|
186
|
+
`,gi=g.div`
|
|
187
|
+
flex: 1 1 0;
|
|
188
|
+
min-width: 0;
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: space-between;
|
|
192
|
+
gap: 8px;
|
|
193
|
+
`,xi=g.div`
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: 13px;
|
|
197
|
+
min-width: 0;
|
|
198
|
+
`,yi=g.span`
|
|
199
|
+
flex: none;
|
|
200
|
+
display: grid;
|
|
201
|
+
place-items: center;
|
|
202
|
+
`,bi=g.img`
|
|
203
|
+
flex: none;
|
|
204
|
+
display: block;
|
|
205
|
+
width: ${({w:n})=>n}px;
|
|
206
|
+
height: ${({h:n})=>n}px;
|
|
207
|
+
object-fit: contain;
|
|
208
|
+
`,vi=g.div`
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
min-width: 0;
|
|
212
|
+
`,wi=g.span`
|
|
213
|
+
text-transform: capitalize;
|
|
214
|
+
font-family: ${d.font.sans};
|
|
215
|
+
font-weight: 700;
|
|
216
|
+
font-size: 15px;
|
|
217
|
+
line-height: 26px;
|
|
218
|
+
letter-spacing: -0.2px;
|
|
219
|
+
color: ${d.colors.text2};
|
|
220
|
+
`,ki=g.span`
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
gap: 4px;
|
|
224
|
+
font-family: ${d.font.sans};
|
|
225
|
+
font-size: 12px;
|
|
226
|
+
line-height: 1;
|
|
227
|
+
color: ${d.colors.muted1};
|
|
228
|
+
|
|
229
|
+
/* A 13px slot holding a 10.4px glyph. */
|
|
230
|
+
.ico {
|
|
231
|
+
width: 13px;
|
|
232
|
+
height: 13px;
|
|
233
|
+
background: ${d.colors.text};
|
|
234
|
+
-webkit-mask-size: 10.4px 10.4px;
|
|
235
|
+
mask-size: 10.4px 10.4px;
|
|
236
|
+
-webkit-mask-position: left center;
|
|
237
|
+
mask-position: left center;
|
|
238
|
+
}
|
|
239
|
+
`,Di=g.span`
|
|
240
|
+
font-size: 10.4px;
|
|
241
|
+
color: ${d.colors.text};
|
|
242
|
+
`;g.span`
|
|
243
|
+
font-family: ${d.font.sans};
|
|
244
|
+
font-size: 12px;
|
|
245
|
+
font-weight: 600;
|
|
246
|
+
color: ${d.colors.dclRed};
|
|
247
|
+
`;const Ci=g.div`
|
|
248
|
+
flex: none;
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
gap: 6px;
|
|
252
|
+
|
|
253
|
+
.ico {
|
|
254
|
+
width: 24px;
|
|
255
|
+
height: 24px;
|
|
256
|
+
background: ${d.colors.text2};
|
|
257
|
+
-webkit-mask-size: 19.855px 19.855px;
|
|
258
|
+
mask-size: 19.855px 19.855px;
|
|
259
|
+
-webkit-mask-position: left center;
|
|
260
|
+
mask-position: left center;
|
|
261
|
+
}
|
|
262
|
+
span {
|
|
263
|
+
font-family: ${d.font.sans};
|
|
264
|
+
font-weight: 600;
|
|
265
|
+
font-size: 20px;
|
|
266
|
+
color: ${d.colors.text2};
|
|
267
|
+
}
|
|
268
|
+
`,Si=g.div`
|
|
269
|
+
flex: none;
|
|
270
|
+
display: flex;
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
align-items: flex-end;
|
|
273
|
+
gap: 2px;
|
|
274
|
+
`,Zf=g.button`
|
|
275
|
+
width: 100%;
|
|
276
|
+
height: 46px;
|
|
277
|
+
border: 0;
|
|
278
|
+
border-radius: 12px;
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
background: ${d.gradients.amethyst};
|
|
281
|
+
color: ${d.colors.softWhite};
|
|
282
|
+
font-family: ${d.font.sans};
|
|
283
|
+
font-weight: 600;
|
|
284
|
+
font-size: 15px;
|
|
285
|
+
line-height: 24px;
|
|
286
|
+
letter-spacing: 0.46px;
|
|
287
|
+
text-transform: uppercase;
|
|
288
|
+
|
|
289
|
+
&:hover:not(:disabled) {
|
|
290
|
+
filter: brightness(1.05);
|
|
291
|
+
}
|
|
292
|
+
&:focus-visible {
|
|
293
|
+
outline: 2px solid ${d.colors.accent};
|
|
294
|
+
outline-offset: 2px;
|
|
295
|
+
}
|
|
296
|
+
&:disabled {
|
|
297
|
+
opacity: 0.6;
|
|
298
|
+
cursor: default;
|
|
299
|
+
}
|
|
300
|
+
`,eh=g.img`
|
|
301
|
+
width: 13px;
|
|
302
|
+
height: 13px;
|
|
303
|
+
display: block;
|
|
304
|
+
`,th=g.img`
|
|
305
|
+
width: 24px;
|
|
306
|
+
height: 24px;
|
|
307
|
+
display: block;
|
|
308
|
+
`;g.span`
|
|
309
|
+
flex: none;
|
|
310
|
+
width: 32px;
|
|
311
|
+
display: grid;
|
|
312
|
+
gap: 2px;
|
|
313
|
+
place-items: center;
|
|
314
|
+
|
|
315
|
+
.ico {
|
|
316
|
+
width: 15px;
|
|
317
|
+
height: 15px;
|
|
318
|
+
background: ${d.colors.text2};
|
|
319
|
+
}
|
|
320
|
+
img {
|
|
321
|
+
width: 15px;
|
|
322
|
+
height: 15px;
|
|
323
|
+
display: block;
|
|
324
|
+
}
|
|
325
|
+
`;g.div`
|
|
326
|
+
flex: none;
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
gap: 4px;
|
|
330
|
+
|
|
331
|
+
.ico {
|
|
332
|
+
width: 18px;
|
|
333
|
+
height: 18px;
|
|
334
|
+
background: ${d.colors.text2};
|
|
335
|
+
}
|
|
336
|
+
img {
|
|
337
|
+
width: 18px;
|
|
338
|
+
height: 18px;
|
|
339
|
+
display: block;
|
|
340
|
+
}
|
|
341
|
+
span {
|
|
342
|
+
font-family: ${d.font.sans};
|
|
343
|
+
font-weight: 600;
|
|
344
|
+
font-size: 17px;
|
|
345
|
+
color: ${d.colors.text2};
|
|
346
|
+
}
|
|
347
|
+
`;g.span`
|
|
348
|
+
font-family: ${d.font.sans};
|
|
349
|
+
font-weight: 600;
|
|
350
|
+
font-size: 15px;
|
|
351
|
+
color: ${d.colors.muted};
|
|
352
|
+
`;const nh=g.span`
|
|
353
|
+
font-family: ${d.font.sans};
|
|
354
|
+
font-size: 11px;
|
|
355
|
+
line-height: 1.35;
|
|
356
|
+
color: ${d.colors.muted};
|
|
357
|
+
`,rh=g.p`
|
|
358
|
+
display: flex;
|
|
359
|
+
align-items: flex-start;
|
|
360
|
+
gap: 12px;
|
|
361
|
+
margin: 0;
|
|
362
|
+
background: rgba(255, 162, 90, 0.3);
|
|
363
|
+
border-radius: ${d.radius.btn};
|
|
364
|
+
padding: 16px;
|
|
365
|
+
font-family: ${d.font.sans};
|
|
366
|
+
font-size: 14px;
|
|
367
|
+
line-height: 1.334;
|
|
368
|
+
color: ${d.colors.text2};
|
|
369
|
+
`;function ah({item:n,priceCredits:a,priceCents:t,options:e,priceManaWei:r,balanceCredits:o,manaBalanceWei:i,onBuy:c,onClose:l,busy:p=!1,notice:u}){const h=e.find(D=>D.method==="credits")??null,x=e.find(D=>D.method==="mana")??null,b=e.find(D=>D.method==="combined")??null,[y,w]=v.useState(()=>h?new Set(["credits"]):b?new Set(["credits","mana"]):x?new Set(["mana"]):new Set),k=!!h||!!b,f=!!x||!!b;v.useEffect(()=>{w(D=>{const j=new Set(D);return j.has("credits")&&!k&&j.delete("credits"),j.has("mana")&&!f&&j.delete("mana"),j.size===D.size?D:j})},[k,f]);const C=y.has("credits"),P=y.has("mana"),T=C&&P?b?"combined":null:C?h?"credits":null:P&&x?"mana":null,N=T==="combined"&&b?b.credits:(h==null?void 0:h.credits)??Nt(t),R=T==="combined"&&b?b.manaWei:(x==null?void 0:x.manaWei)??r;function S(D){w(j=>{const A=new Set(j);return A.has(D)?A.delete(D):A.add(D),A})}return s.jsxs(Bf,{children:[s.jsxs(Hf,{children:[s.jsx(zf,{children:m("buyModal.choosePayment")}),s.jsx(qf,{onClick:l,disabled:p,"aria-label":m("buyModal.close"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsxs(Kf,{children:[s.jsx(Qf,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs(Vf,{children:[s.jsxs("div",{children:[s.jsx(Uf,{title:n.name,children:n.name||m("buyModal.itemFallback")}),n.creator?s.jsx(Gf,{children:s.jsx(Jl,{address:n.creator})}):null]}),s.jsxs(Xf,{children:[s.jsx(Oe,{}),s.jsx("span",{children:Ot(a)})]})]})]}),s.jsxs(Jf,{children:[s.jsxs(fi,{type:"button","data-testid":"pay-with-credits","data-selected":C,"data-disabled":!k,disabled:p||!k,"aria-pressed":C,onClick:()=>S("credits"),children:[s.jsx(hi,{children:s.jsx(mi,{"data-checked":C,children:s.jsx(V,{name:"check",className:"ico"})})}),s.jsxs(gi,{children:[s.jsxs(xi,{children:[s.jsx(yi,{children:s.jsx(bi,{src:Yf,w:32.582,h:34.401,alt:"","aria-hidden":!0})}),s.jsxs(vi,{children:[s.jsx(wi,{children:Xe.name}),s.jsxs(ki,{children:[m("buyModal.creditsBalanceLabel"),s.jsx(Oe,{}),s.jsx(Di,{children:Ot(o)})]})]})]}),s.jsx(Si,{children:s.jsxs(Ci,{children:[s.jsx(Oe,{}),s.jsx("span",{children:Ot(N)})]})})]})]}),s.jsxs(fi,{type:"button","data-testid":"pay-with-mana","data-selected":P,"data-disabled":!f,disabled:p||!f,"aria-pressed":P,onClick:()=>S("mana"),children:[s.jsx(hi,{children:s.jsx(mi,{"data-checked":P,children:s.jsx(V,{name:"check",className:"ico"})})}),s.jsxs(gi,{children:[s.jsxs(xi,{children:[s.jsx(yi,{children:s.jsx(bi,{src:Wf,w:35.328,h:35.328,alt:"","aria-hidden":!0})}),s.jsxs(vi,{children:[s.jsx(wi,{children:m("buyModal.methodMana")}),s.jsxs(ki,{children:[m("buyModal.manaBalanceLabel"),s.jsx(eh,{src:Zo,alt:"","aria-hidden":!0}),s.jsx(Di,{children:zo(i)})]})]})]}),s.jsx(Si,{children:f?s.jsx(s.Fragment,{children:s.jsxs(Ci,{children:[s.jsx(th,{src:Zo,alt:"","aria-hidden":!0}),s.jsx("span",{children:zo(R)})]})}):s.jsx(nh,{"data-testid":"mana-shortfall-note",children:m("buyModal.notEnoughMana")})})]})]})]}),u?s.jsx(rh,{"data-testid":"price-changed",role:"status",children:u}):null,s.jsx(Zf,{type:"button","data-testid":"confirm-payment",disabled:p||T===null,onClick:()=>T&&c(T),children:m("buyModal.buy")})]})}function Ac(){const n=new Map,a=new Set,t=new Set,e=new Set;return{submitStarted:r=>{e.add(r)},submitFinished:r=>{e.delete(r)},broadcast:(r,o)=>{const i=n.get(r);i?i.add(o):n.set(r,new Set([o]))},reverted:r=>{a.add(r)},unobservable:r=>{t.add(r)},isInFlight:r=>e.has(r),mayBeConsumed:r=>{if(t.has(r))return!0;const o=n.get(r);if(!o)return!1;for(const i of o)if(!a.has(i))return!0;return!1}}}const oh=Cp("0.05");async function ih(n){try{return(await new Dp(Lt.rpcUrl).getBalance(n)).gte(oh)}catch{return!1}}async function sh(n,a){return Ur(n)?ih(a):!1}function ch({size:n=64,...a}){return s.jsxs("svg",{viewBox:"0 0 64 64",width:n,height:n,"aria-hidden":!0,...a,children:[s.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),s.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const lh=n=>sd(n.contractAddress,String(n.itemId));async function Mi(n,a={}){if(n.kind==="store")return BigInt(n.mint.item.priceWei);try{return await cd(n.trade)}catch(t){return a.reportFailure!==!1&&Me(t,{flow:"buy",step:"mana_price"}),null}}function _i(n){return n.kind==="trade"?n.trade.id:void 0}function ji(n){return n.contractAddress&&n.itemId!=null?{contractAddress:n.contractAddress,itemId:String(n.itemId)}:void 0}function Ua({item:n,onClose:a,resume:t=!1}){var Tt,xn;const{session:e}=on(),{data:r}=dc(e),{data:o}=Zl(e),i=fn(),c=pn();async function l(){try{return await i.fetchQuery({queryKey:["mana-rate",Lt.chainId],queryFn:()=>id(Lt.chainId),staleTime:6e4})}catch{return}}async function p(){if(o!=null)return o;if(!e)return 0n;try{const $=await i.fetchQuery({queryKey:["mana-balance",e.address],queryFn:()=>dd(e.address),staleTime:3e4});return G($),$}catch{return 0n}}const u=pp().packs.slice(0,fp),[h,x]=v.useState("loading"),[b,y]=v.useState(null),[w,k]=v.useState(null),[f,C]=v.useState(!1),[P,T]=v.useState(0),[N,R]=v.useState(""),[S,D]=v.useState(n.priceCredits),j=Math.max(0,S-((r==null?void 0:r.credits)??0)),A=(()=>{if(j<=0)return u;const $=u.filter(Q=>Q.credits>=j);return $.length>0?$:u})(),[H,F]=v.useState(null),[K,G]=v.useState(null),z=o??K??0n,[E,B]=v.useState(!1),[M,X]=v.useState(null),[q,Z]=v.useState(0),[ae,Le]=v.useState(null),[je,ue]=v.useState(!1),xe=v.useRef(null),jt=v.useRef(!1),pe=v.useRef(Ac()),It=(ae==null?void 0:ae.credits)??S,Fn=(r==null?void 0:r.credits)??0;v.useEffect(()=>(jt.current=!1,()=>{jt.current=!0}),[]);async function lr($,Q,U,J){const re=await p();if(J!=null&&J())return;const we=re>0n,ee=we?await Mi(Q):null;if(J!=null&&J())return;ee!=null?F(ee):we&&B(!0);const Qt=Uo({priceCents:U,priceManaWei:ee??0n,balanceCents:(r==null?void 0:r.balanceCents)??0,manaBalanceWei:re}).options.some(gt=>gt.method==="mana"||gt.method==="combined"),Ue=$-((r==null?void 0:r.credits)??0),pr=u.find(gt=>gt.credits>=Ue)??u[u.length-1];R(pr.id),Qt||fe("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:$,credits_balance:(r==null?void 0:r.credits)??0,shortfall:Math.max(0,Ue)}),x("nofunds")}v.useEffect(()=>{let $=!1;if(!e){x("error"),y(m("buyModal.signInToCheckout"));return}return(async()=>{try{const Q=await hp(n,e.address,ed,await l(),lh);if(Q.status==="own")throw new Error("You can't buy your own listing.");if(Q.status==="no-price")throw new Error("price unavailable");if(Q.status!=="buyable")throw new Error("not for sale");const U=mp(Q.line),J=Q.line.usdCents,re=Nt(J);if($)return;if(D(re),X(U),Z(J),r!=null&&r.credits<re){await lr(re,U,J,()=>$);return}t?Bt({sale:U,usdCents:J}):x("ready")}catch(Q){if($)return;fe(Ne(Q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Qe(Q)}),Ht(Q)}})(),()=>{$=!0,xe.current&&e&&(ua([xe.current]),xe.current=null)}},[P]),v.useEffect(()=>{const $=(ae==null?void 0:ae.sale)??M;if(!$||h!=="ready"&&h!=="nofunds"||z<=0n||H!==null)return;let Q=!1;return Mi($,{reportFailure:!E}).then(U=>{Q||(U!=null?F(U):B(!0))}),()=>{Q=!0}},[h,ae,M,z,H,E]);const ft=Uo({priceCents:q,priceManaWei:H??0n,balanceCents:(r==null?void 0:r.balanceCents)??0,manaBalanceWei:z});async function Bt($){const Q=(ae==null?void 0:ae.sale)??($==null?void 0:$.sale)??M,U=(ae==null?void 0:ae.usdCents)??($==null?void 0:$.usdCents)??q;if(!e||!Q||U<=0)return;x("processing"),y(null),ue(!1);let J=ae;if(!J)try{const{credit:ee,maxCreditedValue:Ce,usdCents:Qt}=await Ka(e.identity,U,_i(Q),ji(n));if(jt.current){Ve([ee.id]);return}xe.current=ee.id,i.invalidateQueries({queryKey:["usd-balance"]});const Ue=Nt(Qt);if(J={sale:Q,credit:ee,maxCreditedValue:Ce,usdCents:Qt,credits:Ue},Le(J),Ue!==Nt(U)){D(Ue),Z(Qt),ue(!0),x("ready");return}}catch(ee){if(Ip(ee)){i.invalidateQueries({queryKey:["usd-balance"]}),await lr(Nt(U),Q,U);return}Ne(ee)||Me(ee,{flow:"buy",step:"authorize"}),fe(Ne(ee)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Qe(ee)}),y(sn(ee,m("buyModal.error.generic"),{sale:!0})),x("error");return}if(!J)return;let re=!1,we;try{const ee={purchase:ru(J.sale,[J.credit],J.maxCreditedValue),buyer:e.address,signer:e.signer,onBroadcast:({txHash:Ce})=>pe.current.broadcast(J.credit.id,Ce),onReverted:({txHash:Ce})=>{Ce&&pe.current.reverted(Ce)}};if(pe.current.submitStarted(J.credit.id),vc())try{we=await _p(ee),pe.current.broadcast(J.credit.id,we),await Dc(we),re=!0}catch(Ce){if(Ce instanceof Cc)re=!0;else if(Ce instanceof Sc){if(Ce.reason==="relayer-unreachable")throw pe.current.unobservable(J.credit.id),Ce;if(!Ur(e.providerType))throw Ce;we=await Xo(ee)}else throw we&&pe.current.reverted(we),Ce}else we=await Xo(ee)}catch(ee){pe.current.submitFinished(J.credit.id),Ne(ee)||Me(ee,{flow:"buy",step:"submit",gasless:re}),ht([J.credit.id]),xe.current=null,fe(Ne(ee)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Qe(ee)}),i.invalidateQueries({queryKey:["usd-balance"]}),Ht(ee);return}pe.current.submitFinished(J.credit.id),xe.current=null;try{au(i,n),fe("Shop Completed Purchase",{...wa([n]),payment_type:"credits",no_crypto_step:re,transaction_hash:we??null})}catch(ee){Me(ee,{flow:"buy",step:"post_purchase"})}x("complete")}function Ve($){if(!e||$.length===0)return Promise.resolve(!1);const Q=$.filter(U=>!pe.current.mayBeConsumed(U));return Q.length===0?Promise.resolve(!1):uc(e.identity,Q).then(()=>!0,()=>!0)}function ht($){C(!0),Ve($).then(Q=>{Q||C(!1)})}function ua($){return Ve($.filter(Q=>!pe.current.isInFlight(Q)))}function Ie(){i.invalidateQueries({queryKey:["mana-balance"]}),i.invalidateQueries({queryKey:["usd-balance"]}),i.invalidateQueries({queryKey:["detail-trade"]}),i.invalidateQueries({queryKey:["shop-item"]}),i.invalidateQueries({queryKey:["owned-token",n.contractAddress,n.tokenId]}),i.invalidateQueries({queryKey:["public-token",n.contractAddress,n.tokenId]}),i.invalidateQueries({queryKey:["item-resales",n.contractAddress,n.itemId]}),i.invalidateQueries({queryKey:["shop-items"]}),i.invalidateQueries({queryKey:["catalog-items"]}),i.invalidateQueries({queryKey:["my-assets"]}),i.invalidateQueries({queryKey:["purchases"]}),i.invalidateQueries({queryKey:["owned-item-count"]}),i.invalidateQueries({queryKey:["overview-listings"]}),i.invalidateQueries({queryKey:["upsell-listings"]})}async function mn(){var Q;const $=(ae==null?void 0:ae.sale)??M;if(!(!e||!$)){xe.current&&(ht([xe.current]),xe.current=null),x("processing"),y(null);try{const U=(Q=Go(ft,"mana"))==null?void 0:Q.manaWei,J=$.kind==="trade"?await Qu({trade:$.trade,buyer:e.address,signer:e.signer,manaWei:U}):await Vu({mint:$.mint,buyer:e.address,signer:e.signer,manaWei:U});fe("Shop Completed Purchase",{...wa([n]),payment_type:"mana",transaction_hash:J??null}),Ie(),x("complete")}catch(U){Ne(U)||Me(U,{flow:"buy_mana",step:"submit"}),fe(Ne(U)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Qe(U)}),Ht(U)}}}async function Pt(){const $=(ae==null?void 0:ae.sale)??M,Q=Go(ft,"combined");if(!e||!$||!Q)return;x("processing"),y(null),xe.current&&(await Ve([xe.current])&&C(!0),xe.current=null);let U=null,J;try{const{credit:re}=await Ka(e.identity,Q.creditsCents,_i($),ji(n));U=re.id,pe.current.submitStarted(re.id);const we={buyer:e.address,signer:e.signer,credits:[re],manaGapWei:Q.manaWei,providerType:e.providerType,onBroadcast:({txHash:ee})=>pe.current.broadcast(re.id,ee),onReverted:({txHash:ee})=>{ee&&pe.current.reverted(ee)},onUnobservable:()=>pe.current.unobservable(re.id)};J=$.kind==="trade"?await Uu({trade:$.trade,...we}):await Gu({mint:$.mint,...we})}catch(re){U&&pe.current.submitFinished(U),U&&ht([U]),Ne(re)||Me(re,{flow:"buy_credits_and_mana",step:"submit"}),fe(Ne(re)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Qe(re)}),i.invalidateQueries({queryKey:["usd-balance"]}),Ht(re);return}U&&pe.current.submitFinished(U);try{Ie(),fe("Shop Completed Purchase",{...wa([n]),payment_type:"credits_and_mana",transaction_hash:J??null})}catch(re){Me(re,{flow:"buy_credits_and_mana",step:"post_purchase"})}x("complete")}async function gn(){if(!(!N||!e)){try{sessionStorage.setItem(ti,JSON.stringify(n))}catch{}xe.current&&(Ve([xe.current]),xe.current=null),Le(null),x("loading");try{const $=await gp(N,{address:e.address,identity:e.identity});if($.url){window.location.href=$.url;return}c("/credits")}catch($){Me($,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(ti)}catch{}y(m("buyModal.error.creditsCheckout")),x("error")}}}const[ze,Fe]=v.useState(null);function dr($,Q){const{spender:U,chainId:J}=Xu($,Q);return yp(J,U)}function Ht($){if(y(sn($,m("buyModal.error.generic"),{sale:!0})),x("error"),!td($)||!e)return;const Q=$.required;(async()=>{if(await sh(e.providerType,e.address)){k(Q);return}y(m("buyModal.error.relayDownNoRail"))})()}async function pa($){if(e){k(null);try{await ld(e.web3Provider,$)}catch(Q){Ne(Q)||Me(Q,{flow:"buy",step:"switch_chain"}),k($);return}mt()}}function zt($){$==="mana"?mn():$==="combined"?Pt():Bt()}const Yn=v.useRef(!1);async function ur($){var Q;if(!Yn.current){Yn.current=!0;try{const U=(ae==null?void 0:ae.sale)??M;if($==="credits"||!U||!e){zt($);return}const J=dr($,U),re=((Q=ft.options.find(ee=>ee.method===$))==null?void 0:Q.manaWei)??0n,we=await wc(J,e.address,re).catch(()=>!0);if(xp(e.providerType,we)){Fe({auth:J,rail:$});return}zt($)}finally{Yn.current=!1}}}const Et=ft.options.some($=>$.method==="mana"||$.method==="combined"),qt=h==="ready"&&(Et||ft.manaShortfall!=null)||h==="nofunds"&&Et;function mt(){y(null),Le(null),ue(!1),C(!1),x("loading"),T($=>$+1)}const Kt=h==="error"&&w===null&&(!!xe.current||f),Wn=h==="processing",fa=h==="complete"?m("buyModal.titleComplete"):h==="error"?m("cartCheckout.errorTitle"):h==="nofunds"?m("buyModal.titleNoFunds"):m("buyModal.titleBuy");return ze&&e?s.jsx(bc,{auth:ze.auth,signer:e.signer,title:m(ze.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:m(ze.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:m(ze.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:s.jsx("img",{src:ou,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:$}=ze;Fe(null),zt($)},onCancel:()=>Fe(null),onClose:()=>{Fe(null),a()}}):s.jsxs(iu,{role:"dialog","aria-modal":"true","aria-label":m("buyModal.dialogAria",{name:n.name}),"data-testid":"buy-modal",children:[s.jsx(su,{onClick:Wn?void 0:a,"aria-hidden":!0}),s.jsx(cu,{"data-tall":h==="processing"||h==="loading"||void 0,children:qt?s.jsx(ah,{item:n,priceCredits:It,priceCents:q,options:ft.options,priceManaWei:H??0n,balanceCredits:Fn,manaBalanceWei:z,onBuy:$=>void ur($),onClose:a,busy:Wn,notice:je?m("buyModal.priceChanged"):r!=null&&r.held?m("buyModal.heldExplainer",{credits:r.held.credits,currency:Xe.name}):null}):s.jsxs(s.Fragment,{children:[s.jsxs(lu,{children:[s.jsxs(du,{children:[s.jsx(uu,{children:fa}),!Wn&&s.jsx(pu,{onClick:a,"aria-label":m("buyModal.close"),children:s.jsx(fu,{})})]}),s.jsxs(hu,{children:[s.jsx(mu,{children:h==="nofunds"?m("buyModal.dclBalance"):m("buyModal.myCreditsBalance")}),s.jsx(gu,{}),s.jsx(xu,{children:Ot(Fn)})]})]}),h==="loading"&&s.jsx(vn,{"data-processing":!0,children:s.jsx("span",{className:"spinner","aria-hidden":!0})}),h==="error"&&s.jsxs(vn,{children:[s.jsxs(yu,{"data-testid":"buy-error",children:[s.jsx(bu,{src:vu,alt:"",width:64,height:80}),s.jsxs(wu,{children:[s.jsx("b",{children:m("cartCheckout.errorHeadline")})," ",b??(Kt?null:m("cartCheckout.errorBody")),Kt?s.jsxs(s.Fragment,{children:[b?" ":"",m("cartCheckout.heldLead",{currency:Xe.name}),s.jsx("b",{children:m("cartCheckout.heldBold")}),m("cartCheckout.heldTail",{currency:Xe.name})]}):null]})]}),w!==null?s.jsxs(wn,{children:[s.jsx(yt,{"data-variant":"outline",onClick:a,children:m("buyModal.cancel")}),s.jsx(yt,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void pa(w),children:m("buyModal.error.switchAndRetry",{network:nd(w)})})]}):Kt?s.jsx(wn,{children:s.jsx(yt,{"data-variant":"purple","data-full":!0,onClick:a,children:m("cartCheckout.gotIt")})}):s.jsxs(wn,{children:[s.jsx(yt,{"data-variant":"outline",onClick:a,children:m("buyModal.cancel")}),s.jsx(yt,{"data-variant":"purple",onClick:mt,children:m("cartCheckout.tryAgain")})]})]}),h==="nofunds"&&s.jsxs(vn,{children:[E&&H===null&&z>0n?s.jsxs(gr,{"data-testid":"mana-price-unavailable",children:[s.jsx(xr,{}),s.jsx(yr,{children:m("buyModal.manaPriceUnavailable")})]}):null,r!=null&&r.held?s.jsxs(gr,{"data-testid":"nofunds-held",children:[s.jsx(xr,{}),s.jsx(yr,{children:m("buyModal.heldExplainer",{credits:r.held.credits,currency:Xe.name})})]}):null,s.jsxs(gr,{children:[s.jsx(xr,{}),s.jsxs(yr,{children:[s.jsx("b",{children:m("buyModal.insufficientFunds")})," ",m("buyModal.warningNeedToBuy")," ",s.jsx("b",{children:m("buyModal.warningCreditsAmount",{count:Math.max(1,It-Fn)})})," ",m("buyModal.warningToPurchase",{count:1}),Zn()?null:s.jsxs(s.Fragment,{children:[" ",s.jsx(ku,{href:rd("/credits"),target:"_blank",rel:"noopener noreferrer",children:m("buyModal.warningLearnMore")})]})]})]}),s.jsx(Ii,{item:n,priceCredits:It}),Zn()?null:s.jsxs(s.Fragment,{children:[s.jsx(Du,{"data-testid":"credit-packs",children:A.map($=>{const Q=$.credits,U=$.id===N;return s.jsxs(Cu,{"data-on":U||void 0,onClick:()=>R($.id),children:[s.jsx(Su,{src:Mu,alt:""}),s.jsx(_u,{children:Ot(Q)}),s.jsxs(ju,{children:["($",$.usd.toFixed(2),")"]})]},$.id)})}),s.jsxs(Iu,{children:[s.jsxs(Pu,{children:[s.jsx(Eu,{}),s.jsx("span",{children:Ot(((Tt=A.find($=>$.id===N))==null?void 0:Tt.credits)??0)})]}),s.jsxs(Tu,{children:["$",(((xn=A.find($=>$.id===N))==null?void 0:xn.usd)??0).toFixed(2)]})]})]}),s.jsxs(wn,{children:[s.jsx(yt,{"data-variant":"outline",onClick:a,children:m("buyModal.cancel")}),Zn()?null:s.jsx(yt,{"data-variant":"gradient",onClick:()=>void gn(),children:m("buyModal.buy")})]})]}),h==="ready"&&s.jsxs(vn,{children:[je&&s.jsxs(gr,{"data-testid":"price-changed",role:"status",children:[s.jsx(xr,{}),s.jsx(yr,{children:m("buyModal.priceChanged")})]}),s.jsx(Ii,{item:n,priceCredits:It}),s.jsx(wn,{children:s.jsx(yt,{"data-variant":"gradient","data-full":!0,onClick:()=>void Bt(),children:m("buyModal.buy")})})]}),h==="processing"&&s.jsxs(vn,{"data-processing":!0,children:[s.jsx($u,{src:ad,alt:"",width:61,height:61}),s.jsx(Nu,{children:t?m("buyModal.completingPurchase"):m("buyModal.completingTransaction")}),s.jsx(Ru,{"aria-hidden":!0,children:s.jsx(Ou,{})})]}),h==="complete"&&s.jsxs(vn,{children:[s.jsx(Pp,{}),s.jsxs(Au,{children:[s.jsx(ch,{}),s.jsxs(Lu,{children:[s.jsx("b",{children:m("getCredits.successTitle")})," ",m("buyModal.successBody")]})]}),s.jsxs(wn,{"data-stack":!0,children:[s.jsx(yt,{"data-variant":"outline",onClick:()=>c(od([n.category])),children:m("buyModal.myAssets")}),s.jsxs(Fu,{"data-variant":"ruby",href:Ep,target:"_blank",rel:"noreferrer",onClick:a,children:[m("buyModal.tryInWorld"),s.jsx(Tp,{})]})]})]})]})})]})}function Ii({item:n,priceCredits:a}){return s.jsxs(Yu,{children:[s.jsx(Wu,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs(Bu,{children:[s.jsxs("div",{children:[s.jsx(Hu,{title:n.name,children:n.name||m("buyModal.itemFallback")}),n.creator?s.jsx(zu,{address:n.creator}):null]}),s.jsxs(qu,{children:[s.jsx(Ku,{}),s.jsx("span",{children:Ot(a)})]})]})]})}function Lc(n){var a,t,e="";if(typeof n=="string"||typeof n=="number")e+=n;else if(typeof n=="object")if(Array.isArray(n)){var r=n.length;for(a=0;a<r;a++)n[a]&&(t=Lc(n[a]))&&(e&&(e+=" "),e+=t)}else for(t in n)n[t]&&(e&&(e+=" "),e+=t);return e}function _e(){for(var n,a,t=0,e="",r=arguments.length;t<r;t++)(n=arguments[t])&&(a=Lc(n))&&(e&&(e+=" "),e+=a);return e}function Y(n){const a=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&a==="[object Date]"?new n.constructor(+n):typeof n=="number"||a==="[object Number]"||typeof n=="string"||a==="[object String]"?new Date(n):new Date(NaN)}function le(n,a){return n instanceof Date?new n.constructor(a):new Date(a)}function Je(n,a){const t=Y(n);return isNaN(a)?le(n,NaN):(a&&t.setDate(t.getDate()+a),t)}function et(n,a){const t=Y(n);if(isNaN(a))return le(n,NaN);if(!a)return t;const e=t.getDate(),r=le(n,t.getTime());r.setMonth(t.getMonth()+a+1,0);const o=r.getDate();return e>=o?r:(t.setFullYear(r.getFullYear(),r.getMonth(),e),t)}function lo(n,a){const t=+Y(n);return le(n,t+a)}const Fc=6048e5,dh=864e5,aa=6e4,oa=36e5,uh=1e3;function ph(n,a){return lo(n,a*oa)}let fh={};function hn(){return fh}function St(n,a){var c,l,p,u;const t=hn(),e=(a==null?void 0:a.weekStartsOn)??((l=(c=a==null?void 0:a.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((u=(p=t.locale)==null?void 0:p.options)==null?void 0:u.weekStartsOn)??0,r=Y(n),o=r.getDay(),i=(o<e?7:0)+o-e;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function Tn(n){return St(n,{weekStartsOn:1})}function Yc(n){const a=Y(n),t=a.getFullYear(),e=le(n,0);e.setFullYear(t+1,0,4),e.setHours(0,0,0,0);const r=Tn(e),o=le(n,0);o.setFullYear(t,0,4),o.setHours(0,0,0,0);const i=Tn(o);return a.getTime()>=r.getTime()?t+1:a.getTime()>=i.getTime()?t:t-1}function dn(n){const a=Y(n);return a.setHours(0,0,0,0),a}function Fr(n){const a=Y(n),t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return t.setUTCFullYear(a.getFullYear()),+n-+t}function $n(n,a){const t=dn(n),e=dn(a),r=+t-Fr(t),o=+e-Fr(e);return Math.round((r-o)/dh)}function hh(n){const a=Yc(n),t=le(n,0);return t.setFullYear(a,0,4),t.setHours(0,0,0,0),Tn(t)}function Ga(n,a){return lo(n,a*aa)}function uo(n,a){const t=a*3;return et(n,t)}function mh(n,a){return lo(n,a*1e3)}function Yr(n,a){const t=a*7;return Je(n,t)}function wt(n,a){return et(n,a*12)}function Pi(n){let a;return n.forEach(function(t){const e=Y(t);(a===void 0||a<e||isNaN(Number(e)))&&(a=e)}),a||new Date(NaN)}function Ei(n){let a;return n.forEach(t=>{const e=Y(t);(!a||a>e||isNaN(+e))&&(a=e)}),a||new Date(NaN)}function gh(n,a){const t=dn(n),e=dn(a);return+t==+e}function kt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Wr(n){if(!kt(n)&&typeof n!="number")return!1;const a=Y(n);return!isNaN(Number(a))}function Br(n,a){const t=Y(n),e=Y(a),r=t.getFullYear()-e.getFullYear(),o=t.getMonth()-e.getMonth();return r*12+o}function nn(n){const a=Y(n);return Math.trunc(a.getMonth()/3)+1}function Hr(n,a){const t=Y(n),e=Y(a),r=t.getFullYear()-e.getFullYear(),o=nn(t)-nn(e);return r*4+o}function zr(n,a){const t=Y(n),e=Y(a);return t.getFullYear()-e.getFullYear()}function xh(n,a){const t=Y(n),e=Y(a),r=Ti(t,e),o=Math.abs($n(t,e));t.setDate(t.getDate()-r*o);const i=+(Ti(t,e)===-r),c=r*(o-i);return c===0?0:c}function Ti(n,a){const t=n.getFullYear()-a.getFullYear()||n.getMonth()-a.getMonth()||n.getDate()-a.getDate()||n.getHours()-a.getHours()||n.getMinutes()-a.getMinutes()||n.getSeconds()-a.getSeconds()||n.getMilliseconds()-a.getMilliseconds();return t<0?-1:t>0?1:t}function Wc(n){const a=Y(n);return a.setHours(23,59,59,999),a}function Bc(n){const a=Y(n),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function Xa(n){const a=Y(n),t=a.getMonth(),e=t-t%3;return a.setMonth(e,1),a.setHours(0,0,0,0),a}function Hc(n){const a=Y(n);return a.setDate(1),a.setHours(0,0,0,0),a}function zc(n){const a=Y(n),t=a.getFullYear();return a.setFullYear(t+1,0,0),a.setHours(23,59,59,999),a}function ia(n){const a=Y(n),t=le(n,0);return t.setFullYear(a.getFullYear(),0,1),t.setHours(0,0,0,0),t}function yh(n,a){var c,l;const t=hn(),e=t.weekStartsOn??((l=(c=t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??0,r=Y(n),o=r.getDay(),i=(o<e?-7:0)+6-(o-e);return r.setDate(r.getDate()+i),r.setHours(23,59,59,999),r}const bh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vh=(n,a,t)=>{let e;const r=bh[n];return typeof r=="string"?e=r:a===1?e=r.one:e=r.other.replace("{{count}}",a.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+e:e+" ago":e};function _a(n){return(a={})=>{const t=a.width?String(a.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const wh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Dh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ch={date:_a({formats:wh,defaultWidth:"full"}),time:_a({formats:kh,defaultWidth:"full"}),dateTime:_a({formats:Dh,defaultWidth:"full"})},Sh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Mh=(n,a,t,e)=>Sh[n];function zn(n){return(a,t)=>{const e=t!=null&&t.context?String(t.context):"standalone";let r;if(e==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,c=t!=null&&t.width?String(t.width):i;r=n.formattingValues[c]||n.formattingValues[i]}else{const i=n.defaultWidth,c=t!=null&&t.width?String(t.width):n.defaultWidth;r=n.values[c]||n.values[i]}const o=n.argumentCallback?n.argumentCallback(a):a;return r[o]}}const _h={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},jh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ih={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ph={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Eh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Th={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$h=(n,a)=>{const t=Number(n),e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Nh={ordinalNumber:$h,era:zn({values:_h,defaultWidth:"wide"}),quarter:zn({values:jh,defaultWidth:"wide",argumentCallback:n=>n-1}),month:zn({values:Ih,defaultWidth:"wide"}),day:zn({values:Ph,defaultWidth:"wide"}),dayPeriod:zn({values:Eh,defaultWidth:"wide",formattingValues:Th,defaultFormattingWidth:"wide"})};function qn(n){return(a,t={})=>{const e=t.width,r=e&&n.matchPatterns[e]||n.matchPatterns[n.defaultMatchWidth],o=a.match(r);if(!o)return null;const i=o[0],c=e&&n.parsePatterns[e]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(c)?Oh(c,h=>h.test(i)):Rh(c,h=>h.test(i));let p;p=n.valueCallback?n.valueCallback(l):l,p=t.valueCallback?t.valueCallback(p):p;const u=a.slice(i.length);return{value:p,rest:u}}}function Rh(n,a){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&a(n[t]))return t}function Oh(n,a){for(let t=0;t<n.length;t++)if(a(n[t]))return t}function Ah(n){return(a,t={})=>{const e=a.match(n.matchPattern);if(!e)return null;const r=e[0],o=a.match(n.parsePattern);if(!o)return null;let i=n.valueCallback?n.valueCallback(o[0]):o[0];i=t.valueCallback?t.valueCallback(i):i;const c=a.slice(r.length);return{value:i,rest:c}}}const Lh=/^(\d+)(th|st|nd|rd)?/i,Fh=/\d+/i,Yh={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Wh={any:[/^b/i,/^(a|c)/i]},Bh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Hh={any:[/1/i,/2/i,/3/i,/4/i]},zh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},qh={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Kh={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Qh={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Vh={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Uh={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Gh={ordinalNumber:Ah({matchPattern:Lh,parsePattern:Fh,valueCallback:n=>parseInt(n,10)}),era:qn({matchPatterns:Yh,defaultMatchWidth:"wide",parsePatterns:Wh,defaultParseWidth:"any"}),quarter:qn({matchPatterns:Bh,defaultMatchWidth:"wide",parsePatterns:Hh,defaultParseWidth:"any",valueCallback:n=>n+1}),month:qn({matchPatterns:zh,defaultMatchWidth:"wide",parsePatterns:qh,defaultParseWidth:"any"}),day:qn({matchPatterns:Kh,defaultMatchWidth:"wide",parsePatterns:Qh,defaultParseWidth:"any"}),dayPeriod:qn({matchPatterns:Vh,defaultMatchWidth:"any",parsePatterns:Uh,defaultParseWidth:"any"})},qc={code:"en-US",formatDistance:vh,formatLong:Ch,formatRelative:Mh,localize:Nh,match:Gh,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xh(n){const a=Y(n);return $n(a,ia(a))+1}function po(n){const a=Y(n),t=+Tn(a)-+hh(a);return Math.round(t/Fc)+1}function fo(n,a){var u,h,x,b;const t=Y(n),e=t.getFullYear(),r=hn(),o=(a==null?void 0:a.firstWeekContainsDate)??((h=(u=a==null?void 0:a.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((b=(x=r.locale)==null?void 0:x.options)==null?void 0:b.firstWeekContainsDate)??1,i=le(n,0);i.setFullYear(e+1,0,o),i.setHours(0,0,0,0);const c=St(i,a),l=le(n,0);l.setFullYear(e,0,o),l.setHours(0,0,0,0);const p=St(l,a);return t.getTime()>=c.getTime()?e+1:t.getTime()>=p.getTime()?e:e-1}function Jh(n,a){var c,l,p,u;const t=hn(),e=(a==null?void 0:a.firstWeekContainsDate)??((l=(c=a==null?void 0:a.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((u=(p=t.locale)==null?void 0:p.options)==null?void 0:u.firstWeekContainsDate)??1,r=fo(n,a),o=le(n,0);return o.setFullYear(r,0,e),o.setHours(0,0,0,0),St(o,a)}function Kc(n,a){const t=Y(n),e=+St(t,a)-+Jh(t,a);return Math.round(e/Fc)+1}function ce(n,a){const t=n<0?"-":"",e=Math.abs(n).toString().padStart(a,"0");return t+e}const $t={y(n,a){const t=n.getFullYear(),e=t>0?t:1-t;return ce(a==="yy"?e%100:e,a.length)},M(n,a){const t=n.getMonth();return a==="M"?String(t+1):ce(t+1,2)},d(n,a){return ce(n.getDate(),a.length)},a(n,a){const t=n.getHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,a){return ce(n.getHours()%12||12,a.length)},H(n,a){return ce(n.getHours(),a.length)},m(n,a){return ce(n.getMinutes(),a.length)},s(n,a){return ce(n.getSeconds(),a.length)},S(n,a){const t=a.length,e=n.getMilliseconds(),r=Math.trunc(e*Math.pow(10,t-3));return ce(r,a.length)}},kn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$i={G:function(n,a,t){const e=n.getFullYear()>0?1:0;switch(a){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"});case"GGGGG":return t.era(e,{width:"narrow"});case"GGGG":default:return t.era(e,{width:"wide"})}},y:function(n,a,t){if(a==="yo"){const e=n.getFullYear(),r=e>0?e:1-e;return t.ordinalNumber(r,{unit:"year"})}return $t.y(n,a)},Y:function(n,a,t,e){const r=fo(n,e),o=r>0?r:1-r;if(a==="YY"){const i=o%100;return ce(i,2)}return a==="Yo"?t.ordinalNumber(o,{unit:"year"}):ce(o,a.length)},R:function(n,a){const t=Yc(n);return ce(t,a.length)},u:function(n,a){const t=n.getFullYear();return ce(t,a.length)},Q:function(n,a,t){const e=Math.ceil((n.getMonth()+1)/3);switch(a){case"Q":return String(e);case"QQ":return ce(e,2);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(e,{width:"wide",context:"formatting"})}},q:function(n,a,t){const e=Math.ceil((n.getMonth()+1)/3);switch(a){case"q":return String(e);case"qq":return ce(e,2);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(e,{width:"wide",context:"standalone"})}},M:function(n,a,t){const e=n.getMonth();switch(a){case"M":case"MM":return $t.M(n,a);case"Mo":return t.ordinalNumber(e+1,{unit:"month"});case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(e,{width:"wide",context:"formatting"})}},L:function(n,a,t){const e=n.getMonth();switch(a){case"L":return String(e+1);case"LL":return ce(e+1,2);case"Lo":return t.ordinalNumber(e+1,{unit:"month"});case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(e,{width:"wide",context:"standalone"})}},w:function(n,a,t,e){const r=Kc(n,e);return a==="wo"?t.ordinalNumber(r,{unit:"week"}):ce(r,a.length)},I:function(n,a,t){const e=po(n);return a==="Io"?t.ordinalNumber(e,{unit:"week"}):ce(e,a.length)},d:function(n,a,t){return a==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):$t.d(n,a)},D:function(n,a,t){const e=Xh(n);return a==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):ce(e,a.length)},E:function(n,a,t){const e=n.getDay();switch(a){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"});case"EEEE":default:return t.day(e,{width:"wide",context:"formatting"})}},e:function(n,a,t,e){const r=n.getDay(),o=(r-e.weekStartsOn+8)%7||7;switch(a){case"e":return String(o);case"ee":return ce(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"});case"eeee":default:return t.day(r,{width:"wide",context:"formatting"})}},c:function(n,a,t,e){const r=n.getDay(),o=(r-e.weekStartsOn+8)%7||7;switch(a){case"c":return String(o);case"cc":return ce(o,a.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"});case"cccc":default:return t.day(r,{width:"wide",context:"standalone"})}},i:function(n,a,t){const e=n.getDay(),r=e===0?7:e;switch(a){case"i":return String(r);case"ii":return ce(r,a.length);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return t.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(e,{width:"short",context:"formatting"});case"iiii":default:return t.day(e,{width:"wide",context:"formatting"})}},a:function(n,a,t){const r=n.getHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,a,t){const e=n.getHours();let r;switch(e===12?r=kn.noon:e===0?r=kn.midnight:r=e/12>=1?"pm":"am",a){case"b":case"bb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(n,a,t){const e=n.getHours();let r;switch(e>=17?r=kn.evening:e>=12?r=kn.afternoon:e>=4?r=kn.morning:r=kn.night,a){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(n,a,t){if(a==="ho"){let e=n.getHours()%12;return e===0&&(e=12),t.ordinalNumber(e,{unit:"hour"})}return $t.h(n,a)},H:function(n,a,t){return a==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):$t.H(n,a)},K:function(n,a,t){const e=n.getHours()%12;return a==="Ko"?t.ordinalNumber(e,{unit:"hour"}):ce(e,a.length)},k:function(n,a,t){let e=n.getHours();return e===0&&(e=24),a==="ko"?t.ordinalNumber(e,{unit:"hour"}):ce(e,a.length)},m:function(n,a,t){return a==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):$t.m(n,a)},s:function(n,a,t){return a==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):$t.s(n,a)},S:function(n,a){return $t.S(n,a)},X:function(n,a,t){const e=n.getTimezoneOffset();if(e===0)return"Z";switch(a){case"X":return Ri(e);case"XXXX":case"XX":return Xt(e);case"XXXXX":case"XXX":default:return Xt(e,":")}},x:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"x":return Ri(e);case"xxxx":case"xx":return Xt(e);case"xxxxx":case"xxx":default:return Xt(e,":")}},O:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"O":case"OO":case"OOO":return"GMT"+Ni(e,":");case"OOOO":default:return"GMT"+Xt(e,":")}},z:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"z":case"zz":case"zzz":return"GMT"+Ni(e,":");case"zzzz":default:return"GMT"+Xt(e,":")}},t:function(n,a,t){const e=Math.trunc(n.getTime()/1e3);return ce(e,a.length)},T:function(n,a,t){const e=n.getTime();return ce(e,a.length)}};function Ni(n,a=""){const t=n>0?"-":"+",e=Math.abs(n),r=Math.trunc(e/60),o=e%60;return o===0?t+String(r):t+String(r)+a+ce(o,2)}function Ri(n,a){return n%60===0?(n>0?"-":"+")+ce(Math.abs(n)/60,2):Xt(n,a)}function Xt(n,a=""){const t=n>0?"-":"+",e=Math.abs(n),r=ce(Math.trunc(e/60),2),o=ce(e%60,2);return t+r+a+o}const Oi=(n,a)=>{switch(n){case"P":return a.date({width:"short"});case"PP":return a.date({width:"medium"});case"PPP":return a.date({width:"long"});case"PPPP":default:return a.date({width:"full"})}},Qc=(n,a)=>{switch(n){case"p":return a.time({width:"short"});case"pp":return a.time({width:"medium"});case"ppp":return a.time({width:"long"});case"pppp":default:return a.time({width:"full"})}},Zh=(n,a)=>{const t=n.match(/(P+)(p+)?/)||[],e=t[1],r=t[2];if(!r)return Oi(n,a);let o;switch(e){case"P":o=a.dateTime({width:"short"});break;case"PP":o=a.dateTime({width:"medium"});break;case"PPP":o=a.dateTime({width:"long"});break;case"PPPP":default:o=a.dateTime({width:"full"});break}return o.replace("{{date}}",Oi(e,a)).replace("{{time}}",Qc(r,a))},qr={p:Qc,P:Zh},em=/^D+$/,tm=/^Y+$/,nm=["D","DD","YY","YYYY"];function Vc(n){return em.test(n)}function Uc(n){return tm.test(n)}function Ja(n,a,t){const e=rm(n,a,t);if(console.warn(e),nm.includes(n))throw new RangeError(e)}function rm(n,a,t){const e=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${a}\`) for formatting ${e} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const am=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,om=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,im=/^'([^]*?)'?$/,sm=/''/g,cm=/[a-zA-Z]/;function Ai(n,a,t){var u,h,x,b,y,w,k,f;const e=hn(),r=(t==null?void 0:t.locale)??e.locale??qc,o=(t==null?void 0:t.firstWeekContainsDate)??((h=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??e.firstWeekContainsDate??((b=(x=e.locale)==null?void 0:x.options)==null?void 0:b.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((w=(y=t==null?void 0:t.locale)==null?void 0:y.options)==null?void 0:w.weekStartsOn)??e.weekStartsOn??((f=(k=e.locale)==null?void 0:k.options)==null?void 0:f.weekStartsOn)??0,c=Y(n);if(!Wr(c))throw new RangeError("Invalid time value");let l=a.match(om).map(C=>{const P=C[0];if(P==="p"||P==="P"){const T=qr[P];return T(C,r.formatLong)}return C}).join("").match(am).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const P=C[0];if(P==="'")return{isToken:!1,value:lm(C)};if($i[P])return{isToken:!0,value:C};if(P.match(cm))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");return{isToken:!1,value:C}});r.localize.preprocessor&&(l=r.localize.preprocessor(c,l));const p={firstWeekContainsDate:o,weekStartsOn:i,locale:r};return l.map(C=>{if(!C.isToken)return C.value;const P=C.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Uc(P)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Vc(P))&&Ja(P,a,String(n));const T=$i[P[0]];return T(c,P,r.localize,p)}).join("")}function lm(n){const a=n.match(im);return a?a[1].replace(sm,"'"):n}function Li(n){return Y(n).getDate()}function dm(n){return Y(n).getDay()}function um(n){const a=Y(n),t=a.getFullYear(),e=a.getMonth(),r=le(n,0);return r.setFullYear(t,e+1,0),r.setHours(0,0,0,0),r.getDate()}function pm(){return Object.assign({},hn())}function ut(n){return Y(n).getHours()}function fm(n){let t=Y(n).getDay();return t===0&&(t=7),t}function pt(n){return Y(n).getMinutes()}function Ee(n){return Y(n).getMonth()}function Dt(n){return Y(n).getSeconds()}function Za(n){return Y(n).getTime()}function ne(n){return Y(n).getFullYear()}function Yt(n,a){const t=Y(n),e=Y(a);return t.getTime()>e.getTime()}function un(n,a){const t=Y(n),e=Y(a);return+t<+e}function hm(n,a){const t=Y(n),e=Y(a);return+t==+e}function mm(n,a){const t=a instanceof Date?le(a,0):new a(0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}const gm=10;class Gc{constructor(){W(this,"subPriority",0)}validate(a,t){return!0}}class xm extends Gc{constructor(a,t,e,r,o){super(),this.value=a,this.validateValue=t,this.setValue=e,this.priority=r,o&&(this.subPriority=o)}validate(a,t){return this.validateValue(a,this.value,t)}set(a,t,e){return this.setValue(a,t,this.value,e)}}class ym extends Gc{constructor(){super(...arguments);W(this,"priority",gm);W(this,"subPriority",-1)}set(t,e){return e.timestampIsSet?t:le(t,mm(t,Date))}}class se{run(a,t,e,r){const o=this.parse(a,t,e,r);return o?{setter:new xm(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(a,t,e){return!0}}class bm extends se{constructor(){super(...arguments);W(this,"priority",140);W(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}const be={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ct={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ve(n,a){return n&&{value:a(n.value),rest:n.rest}}function me(n,a){const t=a.match(n);return t?{value:parseInt(t[0],10),rest:a.slice(t[0].length)}:null}function lt(n,a){const t=a.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:a.slice(1)};const e=t[1]==="+"?1:-1,r=t[2]?parseInt(t[2],10):0,o=t[3]?parseInt(t[3],10):0,i=t[5]?parseInt(t[5],10):0;return{value:e*(r*oa+o*aa+i*uh),rest:a.slice(t[0].length)}}function Xc(n){return me(be.anyDigitsSigned,n)}function ge(n,a){switch(n){case 1:return me(be.singleDigit,a);case 2:return me(be.twoDigits,a);case 3:return me(be.threeDigits,a);case 4:return me(be.fourDigits,a);default:return me(new RegExp("^\\d{1,"+n+"}"),a)}}function Kr(n,a){switch(n){case 1:return me(be.singleDigitSigned,a);case 2:return me(be.twoDigitsSigned,a);case 3:return me(be.threeDigitsSigned,a);case 4:return me(be.fourDigitsSigned,a);default:return me(new RegExp("^-?\\d{1,"+n+"}"),a)}}function ho(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Jc(n,a){const t=a>0,e=t?a:1-a;let r;if(e<=50)r=n||100;else{const o=e+50,i=Math.trunc(o/100)*100,c=n>=o%100;r=n+i-(c?100:0)}return t?r:1-r}function Zc(n){return n%400===0||n%4===0&&n%100!==0}class vm extends se{constructor(){super(...arguments);W(this,"priority",130);W(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){const o=i=>({year:i,isTwoDigitYear:e==="yy"});switch(e){case"y":return ve(ge(4,t),o);case"yo":return ve(r.ordinalNumber(t,{unit:"year"}),o);default:return ve(ge(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){const o=t.getFullYear();if(r.isTwoDigitYear){const c=Jc(r.year,o);return t.setFullYear(c,0,1),t.setHours(0,0,0,0),t}const i=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class wm extends se{constructor(){super(...arguments);W(this,"priority",130);W(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){const o=i=>({year:i,isTwoDigitYear:e==="YY"});switch(e){case"Y":return ve(ge(4,t),o);case"Yo":return ve(r.ordinalNumber(t,{unit:"year"}),o);default:return ve(ge(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,o){const i=fo(t,o);if(r.isTwoDigitYear){const l=Jc(r.year,i);return t.setFullYear(l,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),St(t,o)}const c=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(c,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),St(t,o)}}class km extends se{constructor(){super(...arguments);W(this,"priority",130);W(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return Kr(e==="R"?4:e.length,t)}set(t,e,r){const o=le(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Tn(o)}}class Dm extends se{constructor(){super(...arguments);W(this,"priority",130);W(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return Kr(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}class Cm extends se{constructor(){super(...arguments);W(this,"priority",120);W(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return ge(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class Sm extends se{constructor(){super(...arguments);W(this,"priority",120);W(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return ge(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class Mm extends se{constructor(){super(...arguments);W(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);W(this,"priority",110)}parse(t,e,r){const o=i=>i-1;switch(e){case"M":return ve(me(be.month,t),o);case"MM":return ve(ge(2,t),o);case"Mo":return ve(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class _m extends se{constructor(){super(...arguments);W(this,"priority",110);W(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){const o=i=>i-1;switch(e){case"L":return ve(me(be.month,t),o);case"LL":return ve(ge(2,t),o);case"Lo":return ve(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}function jm(n,a,t){const e=Y(n),r=Kc(e,t)-a;return e.setDate(e.getDate()-r*7),e}class Im extends se{constructor(){super(...arguments);W(this,"priority",100);W(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return me(be.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return ge(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,o){return St(jm(t,r,o),o)}}function Pm(n,a){const t=Y(n),e=po(t)-a;return t.setDate(t.getDate()-e*7),t}class Em extends se{constructor(){super(...arguments);W(this,"priority",100);W(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return me(be.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return ge(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Tn(Pm(t,r))}}const Tm=[31,28,31,30,31,30,31,31,30,31,30,31],$m=[31,29,31,30,31,30,31,31,30,31,30,31];class Nm extends se{constructor(){super(...arguments);W(this,"priority",90);W(this,"subPriority",1);W(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return me(be.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return ge(e.length,t)}}validate(t,e){const r=t.getFullYear(),o=Zc(r),i=t.getMonth();return o?e>=1&&e<=$m[i]:e>=1&&e<=Tm[i]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}class Rm extends se{constructor(){super(...arguments);W(this,"priority",90);W(this,"subpriority",1);W(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return me(be.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return ge(e.length,t)}}validate(t,e){const r=t.getFullYear();return Zc(r)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}}function mo(n,a,t){var h,x,b,y;const e=hn(),r=(t==null?void 0:t.weekStartsOn)??((x=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:x.weekStartsOn)??e.weekStartsOn??((y=(b=e.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,o=Y(n),i=o.getDay(),l=(a%7+7)%7,p=7-r,u=a<0||a>6?a-(i+p)%7:(l+p)%7-(i+p)%7;return Je(o,u)}class Om extends se{constructor(){super(...arguments);W(this,"priority",90);W(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,o){return t=mo(t,r,o),t.setHours(0,0,0,0),t}}class Am extends se{constructor(){super(...arguments);W(this,"priority",90);W(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,o){const i=c=>{const l=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+l};switch(e){case"e":case"ee":return ve(ge(e.length,t),i);case"eo":return ve(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,o){return t=mo(t,r,o),t.setHours(0,0,0,0),t}}class Lm extends se{constructor(){super(...arguments);W(this,"priority",90);W(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,o){const i=c=>{const l=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+l};switch(e){case"c":case"cc":return ve(ge(e.length,t),i);case"co":return ve(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,o){return t=mo(t,r,o),t.setHours(0,0,0,0),t}}function Fm(n,a){const t=Y(n),e=fm(t),r=a-e;return Je(t,r)}class Ym extends se{constructor(){super(...arguments);W(this,"priority",90);W(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){const o=i=>i===0?7:i;switch(e){case"i":case"ii":return ge(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return ve(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return ve(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return ve(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return ve(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=Fm(t,r),t.setHours(0,0,0,0),t}}class Wm extends se{constructor(){super(...arguments);W(this,"priority",80);W(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(ho(r),0,0,0),t}}class Bm extends se{constructor(){super(...arguments);W(this,"priority",80);W(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(ho(r),0,0,0),t}}class Hm extends se{constructor(){super(...arguments);W(this,"priority",80);W(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(ho(r),0,0,0),t}}class zm extends se{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return me(be.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return ge(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}}class qm extends se{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return me(be.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return ge(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class Km extends se{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return me(be.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return ge(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}}class Qm extends se{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return me(be.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return ge(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}}class Vm extends se{constructor(){super(...arguments);W(this,"priority",60);W(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return me(be.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return ge(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class Um extends se{constructor(){super(...arguments);W(this,"priority",50);W(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return me(be.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return ge(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class Gm extends se{constructor(){super(...arguments);W(this,"priority",30);W(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=o=>Math.trunc(o*Math.pow(10,-e.length+3));return ve(ge(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class Xm extends se{constructor(){super(...arguments);W(this,"priority",10);W(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return lt(ct.basicOptionalMinutes,t);case"XX":return lt(ct.basic,t);case"XXXX":return lt(ct.basicOptionalSeconds,t);case"XXXXX":return lt(ct.extendedOptionalSeconds,t);case"XXX":default:return lt(ct.extended,t)}}set(t,e,r){return e.timestampIsSet?t:le(t,t.getTime()-Fr(t)-r)}}class Jm extends se{constructor(){super(...arguments);W(this,"priority",10);W(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return lt(ct.basicOptionalMinutes,t);case"xx":return lt(ct.basic,t);case"xxxx":return lt(ct.basicOptionalSeconds,t);case"xxxxx":return lt(ct.extendedOptionalSeconds,t);case"xxx":default:return lt(ct.extended,t)}}set(t,e,r){return e.timestampIsSet?t:le(t,t.getTime()-Fr(t)-r)}}class Zm extends se{constructor(){super(...arguments);W(this,"priority",40);W(this,"incompatibleTokens","*")}parse(t){return Xc(t)}set(t,e,r){return[le(t,r*1e3),{timestampIsSet:!0}]}}class eg extends se{constructor(){super(...arguments);W(this,"priority",20);W(this,"incompatibleTokens","*")}parse(t){return Xc(t)}set(t,e,r){return[le(t,r),{timestampIsSet:!0}]}}const tg={G:new bm,y:new vm,Y:new wm,R:new km,u:new Dm,Q:new Cm,q:new Sm,M:new Mm,L:new _m,w:new Im,I:new Em,d:new Nm,D:new Rm,E:new Om,e:new Am,c:new Lm,i:new Ym,a:new Wm,b:new Bm,B:new Hm,h:new zm,H:new qm,K:new Km,k:new Qm,m:new Vm,s:new Um,S:new Gm,X:new Xm,x:new Jm,t:new Zm,T:new eg},ng=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ag=/^'([^]*?)'?$/,og=/''/g,ig=/\S/,sg=/[a-zA-Z]/;function ja(n,a,t,e){var w,k,f,C,P,T,N,R;const r=pm(),o=(e==null?void 0:e.locale)??r.locale??qc,i=(e==null?void 0:e.firstWeekContainsDate)??((k=(w=e==null?void 0:e.locale)==null?void 0:w.options)==null?void 0:k.firstWeekContainsDate)??r.firstWeekContainsDate??((C=(f=r.locale)==null?void 0:f.options)==null?void 0:C.firstWeekContainsDate)??1,c=(e==null?void 0:e.weekStartsOn)??((T=(P=e==null?void 0:e.locale)==null?void 0:P.options)==null?void 0:T.weekStartsOn)??r.weekStartsOn??((R=(N=r.locale)==null?void 0:N.options)==null?void 0:R.weekStartsOn)??0;if(a==="")return n===""?Y(t):le(t,NaN);const l={firstWeekContainsDate:i,weekStartsOn:c,locale:o},p=[new ym],u=a.match(rg).map(S=>{const D=S[0];if(D in qr){const j=qr[D];return j(S,o.formatLong)}return S}).join("").match(ng),h=[];for(let S of u){!(e!=null&&e.useAdditionalWeekYearTokens)&&Uc(S)&&Ja(S,a,n),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Vc(S)&&Ja(S,a,n);const D=S[0],j=tg[D];if(j){const{incompatibleTokens:A}=j;if(Array.isArray(A)){const F=h.find(K=>A.includes(K.token)||K.token===D);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${S}\` at the same time`)}else if(j.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);h.push({token:D,fullToken:S});const H=j.run(n,S,o.match,l);if(!H)return le(t,NaN);p.push(H.setter),n=H.rest}else{if(D.match(sg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");if(S==="''"?S="'":D==="'"&&(S=cg(S)),n.indexOf(S)===0)n=n.slice(S.length);else return le(t,NaN)}}if(n.length>0&&ig.test(n))return le(t,NaN);const x=p.map(S=>S.priority).sort((S,D)=>D-S).filter((S,D,j)=>j.indexOf(S)===D).map(S=>p.filter(D=>D.priority===S).sort((D,j)=>j.subPriority-D.subPriority)).map(S=>S[0]);let b=Y(t);if(isNaN(b.getTime()))return le(t,NaN);const y={};for(const S of x){if(!S.validate(b,l))return le(t,NaN);const D=S.set(b,y,l);Array.isArray(D)?(b=D[0],Object.assign(y,D[1])):b=D}return le(t,b)}function cg(n){return n.match(ag)[1].replace(og,"'")}function lg(n,a){const t=Y(n),e=Y(a);return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function dg(n,a){const t=Xa(n),e=Xa(a);return+t==+e}function ug(n,a){const t=Y(n),e=Y(a);return t.getFullYear()===e.getFullYear()}function ar(n,a){const t=+Y(n),[e,r]=[+Y(a.start),+Y(a.end)].sort((o,i)=>o-i);return t>=e&&t<=r}function pg(n,a){return Je(n,-1)}function fg(n,a){const e=xg(n);let r;if(e.date){const l=yg(e.date,2);r=bg(l.restDateString,l.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);const o=r.getTime();let i=0,c;if(e.time&&(i=vg(e.time),isNaN(i)))return new Date(NaN);if(e.timezone){if(c=wg(e.timezone),isNaN(c))return new Date(NaN)}else{const l=new Date(o+i),p=new Date(0);return p.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),p.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),p}return new Date(o+i+c)}const vr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},hg=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,mg=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,gg=/^([+-])(\d{2})(?::?(\d{2}))?$/;function xg(n){const a={},t=n.split(vr.dateTimeDelimiter);let e;if(t.length>2)return a;if(/:/.test(t[0])?e=t[0]:(a.date=t[0],e=t[1],vr.timeZoneDelimiter.test(a.date)&&(a.date=n.split(vr.timeZoneDelimiter)[0],e=n.substr(a.date.length,n.length))),e){const r=vr.timezone.exec(e);r?(a.time=e.replace(r[1],""),a.timezone=r[1]):a.time=e}return a}function yg(n,a){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+a)+"})|(\\d{2}|[+-]\\d{"+(2+a)+"})$)"),e=n.match(t);if(!e)return{year:NaN,restDateString:""};const r=e[1]?parseInt(e[1]):null,o=e[2]?parseInt(e[2]):null;return{year:o===null?r:o*100,restDateString:n.slice((e[1]||e[2]).length)}}function bg(n,a){if(a===null)return new Date(NaN);const t=n.match(hg);if(!t)return new Date(NaN);const e=!!t[4],r=Kn(t[1]),o=Kn(t[2])-1,i=Kn(t[3]),c=Kn(t[4]),l=Kn(t[5])-1;if(e)return Mg(a,c,l)?kg(a,c,l):new Date(NaN);{const p=new Date(0);return!Cg(a,o,i)||!Sg(a,r)?new Date(NaN):(p.setUTCFullYear(a,o,Math.max(r,i)),p)}}function Kn(n){return n?parseInt(n):1}function vg(n){const a=n.match(mg);if(!a)return NaN;const t=Ia(a[1]),e=Ia(a[2]),r=Ia(a[3]);return _g(t,e,r)?t*oa+e*aa+r*1e3:NaN}function Ia(n){return n&&parseFloat(n.replace(",","."))||0}function wg(n){if(n==="Z")return 0;const a=n.match(gg);if(!a)return 0;const t=a[1]==="+"?-1:1,e=parseInt(a[2]),r=a[3]&&parseInt(a[3])||0;return jg(e,r)?t*(e*oa+r*aa):NaN}function kg(n,a,t){const e=new Date(0);e.setUTCFullYear(n,0,4);const r=e.getUTCDay()||7,o=(a-1)*7+t+1-r;return e.setUTCDate(e.getUTCDate()+o),e}const Dg=[31,null,31,30,31,30,31,31,30,31,30,31];function el(n){return n%400===0||n%4===0&&n%100!==0}function Cg(n,a,t){return a>=0&&a<=11&&t>=1&&t<=(Dg[a]||(el(n)?29:28))}function Sg(n,a){return a>=1&&a<=(el(n)?366:365)}function Mg(n,a,t){return a>=1&&a<=53&&t>=0&&t<=6}function _g(n,a,t){return n===24?a===0&&t===0:t>=0&&t<60&&a>=0&&a<60&&n>=0&&n<25}function jg(n,a){return a>=0&&a<=59}function He(n,a){const t=Y(n),e=t.getFullYear(),r=t.getDate(),o=le(n,0);o.setFullYear(e,a,15),o.setHours(0,0,0,0);const i=um(o);return t.setMonth(a,Math.min(r,i)),t}function Ig(n,a){let t=Y(n);return isNaN(+t)?le(n,NaN):(a.year!=null&&t.setFullYear(a.year),a.month!=null&&(t=He(t,a.month)),a.date!=null&&t.setDate(a.date),a.hours!=null&&t.setHours(a.hours),a.minutes!=null&&t.setMinutes(a.minutes),a.seconds!=null&&t.setSeconds(a.seconds),a.milliseconds!=null&&t.setMilliseconds(a.milliseconds),t)}function Pr(n,a){const t=Y(n);return t.setHours(a),t}function Er(n,a){const t=Y(n);return t.setMinutes(a),t}function Sn(n,a){const t=Y(n),e=Math.trunc(t.getMonth()/3)+1,r=a-e;return He(t,t.getMonth()+r*3)}function Tr(n,a){const t=Y(n);return t.setSeconds(a),t}function ot(n,a){const t=Y(n);return isNaN(+t)?le(n,NaN):(t.setFullYear(a),t)}function rn(n,a){return et(n,-a)}function tl(n,a){return uo(n,-1)}function Fi(n,a){return Yr(n,-1)}function Nn(n,a){return wt(n,-a)}var Pg=typeof document<"u",Eg=function(){},Qr=Pg?v.useLayoutEffect:Eg;const Tg={...sc},$g=Tg.useInsertionEffect,Ng=$g||(n=>n());function Rg(n){const a=v.useRef(()=>{});return Ng(()=>{a.current=n}),v.useCallback(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return a.current==null?void 0:a.current(...e)},[])}const Og={...sc};let Yi=!1,Ag=0;const Wi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ag++;function Lg(){const[n,a]=v.useState(()=>Yi?Wi():void 0);return Qr(()=>{n==null&&a(Wi())},[]),v.useEffect(()=>{Yi=!0},[]),n}const Fg=Og.useId,nl=Fg||Lg,Yg=v.forwardRef(function(a,t){const{context:{placement:e,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:c=14,height:l=7,tipRadius:p=0,strokeWidth:u=0,staticOffset:h,stroke:x,d:b,style:{transform:y,...w}={},...k}=a,f=nl(),[C,P]=v.useState(!1);if(Qr(()=>{if(!r)return;Ze(r).direction==="rtl"&&P(!0)},[r]),!r)return null;const[T,N]=e.split("-"),R=T==="top"||T==="bottom";let S=h;(R&&i!=null&&i.x||!R&&i!=null&&i.y)&&(S=null);const D=u*2,j=D/2,A=c/2*(p/-8+1),H=l/2*p/4,F=!!b,K=S&&N==="end"?"bottom":"top";let G=S&&N==="end"?"right":"left";S&&C&&(G=N==="end"?"left":"right");const z=(o==null?void 0:o.x)!=null?S||o.x:"",E=(o==null?void 0:o.y)!=null?S||o.y:"",B=b||"M0,0"+(" H"+c)+(" L"+(c-A)+","+(l-H))+(" Q"+c/2+","+l+" "+A+","+(l-H))+" Z",M={top:F?"rotate(180deg)":"",left:F?"rotate(90deg)":"rotate(-90deg)",bottom:F?"":"rotate(180deg)",right:F?"rotate(-90deg)":"rotate(90deg)"}[T];return s.jsxs("svg",{...k,"aria-hidden":!0,ref:t,width:F?c:c+D,height:c,viewBox:"0 0 "+c+" "+(l>c?l:c),style:{position:"absolute",pointerEvents:"none",[G]:z,[K]:E,[T]:R||F?"100%":"calc(100% - "+D/2+"px)",transform:[M,y].filter(X=>!!X).join(" "),...w},children:[D>0&&s.jsx("path",{clipPath:"url(#"+f+")",fill:"none",stroke:x,strokeWidth:D+(b?0:1),d:B}),s.jsx("path",{stroke:D&&!b?k.fill:"none",d:B}),s.jsx("clipPath",{id:f,children:s.jsx("rect",{x:-j,y:j*(F?-1:1),width:c+D,height:c})})]})});function Wg(){const n=new Map;return{emit(a,t){var e;(e=n.get(a))==null||e.forEach(r=>r(t))},on(a,t){n.has(a)||n.set(a,new Set),n.get(a).add(t)},off(a,t){var e;(e=n.get(a))==null||e.delete(t)}}}const Bg=v.createContext(null),Hg=v.createContext(null),zg=()=>{var n;return((n=v.useContext(Bg))==null?void 0:n.id)||null},qg=()=>v.useContext(Hg);function Kg(n){const{open:a=!1,onOpenChange:t,elements:e}=n,r=nl(),o=v.useRef({}),[i]=v.useState(()=>Wg()),c=zg()!=null,[l,p]=v.useState(e.reference),u=Rg((b,y,w)=>{o.current.openEvent=b?y:void 0,i.emit("openchange",{open:b,event:y,reason:w,nested:c}),t==null||t(b,y,w)}),h=v.useMemo(()=>({setPositionReference:p}),[]),x=v.useMemo(()=>({reference:l||e.reference||null,floating:e.floating||null,domReference:e.reference}),[l,e.reference,e.floating]);return v.useMemo(()=>({dataRef:o,open:a,onOpenChange:u,elements:x,events:i,floatingId:r,refs:h}),[a,u,x,i,r,h])}function Qg(n){var a,t;let{elements:e,...r}=n===void 0?{}:n;const{nodeId:o}=r,i=Kg({...r,elements:{reference:(a=e==null?void 0:e.reference)!=null?a:null,floating:(t=e==null?void 0:e.floating)!=null?t:null}}),c=r.rootContext||i,l=c.elements,[p,u]=v.useState(null),[h,x]=v.useState(null),y=(l==null?void 0:l.domReference)||p,w=v.useRef(null),k=qg();Qr(()=>{y&&(w.current=y)},[y]);const f=Pf({...r,elements:{...l,...h&&{reference:h}}}),C=v.useCallback(S=>{const D=Re(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),getClientRects:()=>S.getClientRects(),contextElement:S}:S;x(D),f.refs.setReference(D)},[f.refs]),P=v.useCallback(S=>{(Re(S)||S===null)&&(w.current=S,u(S)),(Re(f.refs.reference.current)||f.refs.reference.current===null||S!==null&&!Re(S))&&f.refs.setReference(S)},[f.refs]),T=v.useMemo(()=>({...f.refs,setReference:P,setPositionReference:C,domReference:w}),[f.refs,P,C]),N=v.useMemo(()=>({...f.elements,domReference:y}),[f.elements,y]),R=v.useMemo(()=>({...f,...c,refs:T,elements:N,nodeId:o}),[f,T,N,o,c]);return Qr(()=>{c.dataRef.current.floatingContext=R;const S=k==null?void 0:k.nodesRef.current.find(D=>D.id===o);S&&(S.context=R)}),v.useMemo(()=>({...f,context:R,refs:T,elements:N}),[f,T,N,R])}/*!
|
|
370
|
+
react-datepicker v7.6.0
|
|
371
|
+
https://github.com/Hacker0x01/react-datepicker
|
|
372
|
+
Released under the MIT License.
|
|
373
|
+
*/var eo=function(a,t){return eo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},eo(a,t)};function De(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");eo(n,a);function t(){this.constructor=n}n.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)}var ie=function(){return ie=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ie.apply(this,arguments)};function dt(n,a,t){if(t||arguments.length===2)for(var e=0,r=a.length,o;e<r;e++)(o||!(e in a))&&(o||(o=Array.prototype.slice.call(a,0,e)),o[e]=a[e]);return n.concat(o||Array.prototype.slice.call(a))}var Vg=function(n){var a=n.showTimeSelectOnly,t=a===void 0?!1:a,e=n.showTime,r=e===void 0?!1:e,o=n.className,i=n.children,c=t?"Choose Time":"Choose Date".concat(r?" and Time":"");return _.createElement("div",{className:o,role:"dialog","aria-label":c,"aria-modal":"true"},i)},Ug=function(n,a){var t=v.useRef(null),e=v.useRef(n);e.current=n;var r=v.useCallback(function(o){var i;t.current&&!t.current.contains(o.target)&&(a&&o.target instanceof HTMLElement&&o.target.classList.contains(a)||(i=e.current)===null||i===void 0||i.call(e,o))},[a]);return v.useEffect(function(){return document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}},[r]),t},sa=function(n){var a=n.children,t=n.onClickOutside,e=n.className,r=n.containerRef,o=n.style,i=n.ignoreClass,c=Ug(t,i);return _.createElement("div",{className:e,style:o,ref:function(l){c.current=l,r&&(r.current=l)}},a)},L;(function(n){n.ArrowUp="ArrowUp",n.ArrowDown="ArrowDown",n.ArrowLeft="ArrowLeft",n.ArrowRight="ArrowRight",n.PageUp="PageUp",n.PageDown="PageDown",n.Home="Home",n.End="End",n.Enter="Enter",n.Space=" ",n.Tab="Tab",n.Escape="Escape",n.Backspace="Backspace",n.X="x"})(L||(L={}));function rl(){var n=typeof window<"u"?window:globalThis;return n}var sr=12,Gg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function de(n){if(n==null)return new Date;var a=typeof n=="string"?fg(n):Y(n);return bt(a)?a:new Date}function Pa(n,a,t,e,r){var o,i=null,c=an(t)||an(er()),l=!0;if(Array.isArray(a))return a.forEach(function(u){var h=ja(n,u,new Date,{locale:c,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});e&&(l=bt(h,r)&&n===he(h,u,t)),bt(h,r)&&l&&(i=h)}),i;if(i=ja(n,a,new Date,{locale:c,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0}),e)l=bt(i)&&n===he(i,a,t);else if(!bt(i)){var p=((o=a.match(Gg))!==null&&o!==void 0?o:[]).map(function(u){var h=u[0];if(h==="p"||h==="P"){var x=qr[h];return c?x(u,c.formatLong):h}return u}).join("");n.length>0&&(i=ja(n,p.slice(0,n.length),new Date,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})),bt(i)||(i=new Date(n))}return bt(i)&&l?i:null}function bt(n,a){return Wr(n)&&!un(n,a??new Date("1/1/1800"))}function he(n,a,t){if(t==="en")return Ai(n,a,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var e=t?an(t):void 0;return t&&!e&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),!e&&er()&&an(er())&&(e=an(er())),Ai(n,a,{locale:e,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function qe(n,a){var t=a.dateFormat,e=a.locale,r=Array.isArray(t)&&t.length>0?t[0]:t;return n&&he(n,r,e)||""}function Xg(n,a,t){if(!n)return"";var e=qe(n,t),r=a?qe(a,t):"";return"".concat(e," - ").concat(r)}function Jg(n,a){if(!(n!=null&&n.length))return"";var t=n[0]?qe(n[0],a):"";if(n.length===1)return t;if(n.length===2&&n[1]){var e=qe(n[1],a);return"".concat(t,", ").concat(e)}var r=n.length-1;return"".concat(t," (+").concat(r,")")}function Ea(n,a){var t=a.hour,e=t===void 0?0:t,r=a.minute,o=r===void 0?0:r,i=a.second,c=i===void 0?0:i;return Pr(Er(Tr(n,c),o),e)}function Zg(n){return po(n)}function ex(n,a){return he(n,"ddd",a)}function $r(n){return dn(n)}function At(n,a,t){var e=an(a||er());return St(n,{locale:e,weekStartsOn:t})}function Ct(n){return Hc(n)}function Gn(n){return ia(n)}function Bi(n){return Xa(n)}function Hi(){return dn(de())}function zi(n){return Wc(n)}function tx(n){return yh(n)}function nx(n){return Bc(n)}function it(n,a){return n&&a?ug(n,a):!n&&!a}function Pe(n,a){return n&&a?lg(n,a):!n&&!a}function Vr(n,a){return n&&a?dg(n,a):!n&&!a}function oe(n,a){return n&&a?gh(n,a):!n&&!a}function Zt(n,a){return n&&a?hm(n,a):!n&&!a}function Xn(n,a,t){var e,r=dn(a),o=Wc(t);try{e=ar(n,{start:r,end:o})}catch{e=!1}return e}function er(){var n=rl();return n.__localeId__}function an(n){if(typeof n=="string"){var a=rl();return a.__localeData__?a.__localeData__[n]:void 0}else return n}function rx(n,a,t){return a(he(n,"EEEE",t))}function ax(n,a){return he(n,"EEEEEE",a)}function ox(n,a){return he(n,"EEE",a)}function go(n,a){return he(He(de(),n),"LLLL",a)}function al(n,a){return he(He(de(),n),"LLL",a)}function ix(n,a){return he(Sn(de(),n),"QQQ",a)}function Ke(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.excludeDateIntervals,c=t.includeDates,l=t.includeDateIntervals,p=t.filterDate;return cr(n,{minDate:e,maxDate:r})||o&&o.some(function(u){return u instanceof Date?oe(n,u):oe(n,u.date)})||i&&i.some(function(u){var h=u.start,x=u.end;return ar(n,{start:h,end:x})})||c&&!c.some(function(u){return oe(n,u)})||l&&!l.some(function(u){var h=u.start,x=u.end;return ar(n,{start:h,end:x})})||p&&!p(de(n))||!1}function xo(n,a){var t=a===void 0?{}:a,e=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(o){var i=o.start,c=o.end;return ar(n,{start:i,end:c})}):e&&e.some(function(o){var i;return o instanceof Date?oe(n,o):oe(n,(i=o.date)!==null&&i!==void 0?i:new Date)})||!1}function ol(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates,c=t.filterDate;return cr(n,{minDate:e?Hc(e):void 0,maxDate:r?Bc(r):void 0})||(o==null?void 0:o.some(function(l){return Pe(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Pe(n,l)})||c&&!c(de(n))||!1}function wr(n,a,t,e){var r=ne(n),o=Ee(n),i=ne(a),c=Ee(a),l=ne(e);return r===i&&r===l?o<=t&&t<=c:r<i?l===r&&o<=t||l===i&&c>=t||l<i&&l>r:!1}function sx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates;return cr(n,{minDate:e,maxDate:r})||o&&o.some(function(c){return Pe(c instanceof Date?c:c.date,n)})||i&&!i.some(function(c){return Pe(c,n)})||!1}function kr(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates,c=t.filterDate;return cr(n,{minDate:e,maxDate:r})||(o==null?void 0:o.some(function(l){return Vr(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Vr(n,l)})||c&&!c(de(n))||!1}function Dr(n,a,t){if(!a||!t||!Wr(a)||!Wr(t))return!1;var e=ne(a),r=ne(t);return e<=n&&r>=n}function Nr(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates,c=t.filterDate,l=new Date(n,0,1);return cr(l,{minDate:e?ia(e):void 0,maxDate:r?zc(r):void 0})||(o==null?void 0:o.some(function(p){return it(l,p instanceof Date?p:p.date)}))||i&&!i.some(function(p){return it(l,p)})||c&&!c(de(l))||!1}function Cr(n,a,t,e){var r=ne(n),o=nn(n),i=ne(a),c=nn(a),l=ne(e);return r===i&&r===l?o<=t&&t<=c:r<i?l===r&&o<=t||l===i&&c>=t||l<i&&l>r:!1}function cr(n,a){var t,e=a===void 0?{}:a,r=e.minDate,o=e.maxDate;return(t=r&&$n(n,r)<0||o&&$n(n,o)>0)!==null&&t!==void 0?t:!1}function qi(n,a){return a.some(function(t){return ut(t)===ut(n)&&pt(t)===pt(n)&&Dt(t)===Dt(n)})}function Ki(n,a){var t=a===void 0?{}:a,e=t.excludeTimes,r=t.includeTimes,o=t.filterTime;return e&&qi(n,e)||r&&!qi(n,r)||o&&!o(n)||!1}function Qi(n,a){var t=a.minTime,e=a.maxTime;if(!t||!e)throw new Error("Both minTime and maxTime props required");var r=de();r=Pr(r,ut(n)),r=Er(r,pt(n)),r=Tr(r,Dt(n));var o=de();o=Pr(o,ut(t)),o=Er(o,pt(t)),o=Tr(o,Dt(t));var i=de();i=Pr(i,ut(e)),i=Er(i,pt(e)),i=Tr(i,Dt(e));var c;try{c=!ar(r,{start:o,end:i})}catch{c=!1}return c}function Vi(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=rn(n,1);return e&&Br(e,o)>0||r&&r.every(function(i){return Br(i,o)>0})||!1}function Ui(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=et(n,1);return e&&Br(o,e)>0||r&&r.every(function(i){return Br(o,i)>0})||!1}function cx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=ia(n),i=tl(o);return e&&Hr(e,i)>0||r&&r.every(function(c){return Hr(c,i)>0})||!1}function lx(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=zc(n),i=uo(o,1);return e&&Hr(i,e)>0||r&&r.every(function(c){return Hr(i,c)>0})||!1}function Gi(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=Nn(n,1);return e&&zr(e,o)>0||r&&r.every(function(i){return zr(i,o)>0})||!1}function dx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.yearItemNumber,o=r===void 0?sr:r,i=Gn(Nn(n,o)),c=Rt(i,o).endPeriod,l=e&&ne(e);return l&&l>c||!1}function Xi(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=wt(n,1);return e&&zr(o,e)>0||r&&r.every(function(i){return zr(o,i)>0})||!1}function ux(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.yearItemNumber,o=r===void 0?sr:r,i=wt(n,o),c=Rt(i,o).startPeriod,l=e&&ne(e);return l&&l<c||!1}function il(n){var a=n.minDate,t=n.includeDates;if(t&&a){var e=t.filter(function(r){return $n(r,a)>=0});return Ei(e)}else return t?Ei(t):a}function sl(n){var a=n.maxDate,t=n.includeDates;if(t&&a){var e=t.filter(function(r){return $n(r,a)<=0});return Pi(e)}else return t?Pi(t):a}function Ji(n,a){var t;n===void 0&&(n=[]),a===void 0&&(a="react-datepicker__day--highlighted");for(var e=new Map,r=0,o=n.length;r<o;r++){var i=n[r];if(kt(i)){var c=he(i,"MM.dd.yyyy"),l=e.get(c)||[];l.includes(a)||(l.push(a),e.set(c,l))}else if(typeof i=="object"){var p=Object.keys(i),u=(t=p[0])!==null&&t!==void 0?t:"",h=i[u];if(typeof u=="string"&&Array.isArray(h))for(var x=0,b=h.length;x<b;x++){var y=h[x];if(y){var c=he(y,"MM.dd.yyyy"),l=e.get(c)||[];l.includes(u)||(l.push(u),e.set(c,l))}}}}return e}function px(n,a){return n.length!==a.length?!1:n.every(function(t,e){return t===a[e]})}function fx(n,a){n===void 0&&(n=[]),a===void 0&&(a="react-datepicker__day--holidays");var t=new Map;return n.forEach(function(e){var r=e.date,o=e.holidayName;if(kt(r)){var i=he(r,"MM.dd.yyyy"),c=t.get(i)||{className:"",holidayNames:[]};if(!("className"in c&&c.className===a&&px(c.holidayNames,[o]))){c.className=a;var l=c.holidayNames;c.holidayNames=l?dt(dt([],l,!0),[o],!1):[o],t.set(i,c)}}}),t}function hx(n,a,t,e,r){for(var o=r.length,i=[],c=0;c<o;c++){var l=n,p=r[c];p&&(l=ph(l,ut(p)),l=Ga(l,pt(p)),l=mh(l,Dt(p)));var u=Ga(n,(t+1)*e);Yt(l,a)&&un(l,u)&&p!=null&&i.push(p)}return i}function Zi(n){return n<10?"0".concat(n):"".concat(n)}function Rt(n,a){a===void 0&&(a=sr);var t=Math.ceil(ne(n)/a)*a,e=t-(a-1);return{startPeriod:e,endPeriod:t}}function mx(n){var a=new Date(n.getFullYear(),n.getMonth(),n.getDate()),t=new Date(n.getFullYear(),n.getMonth(),n.getDate(),24);return Math.round((+t-+a)/36e5)}function es(n){var a=n.getSeconds(),t=n.getMilliseconds();return Y(n.getTime()-a*1e3-t)}function gx(n,a){return es(n).getTime()===es(a).getTime()}function ts(n){if(!kt(n))throw new Error("Invalid date");var a=new Date(n);return a.setHours(0,0,0,0),a}function ns(n,a){if(!kt(n)||!kt(a))throw new Error("Invalid date received");var t=ts(n),e=ts(a);return un(t,e)}function cl(n){return n.key===L.Space}var xx=(function(n){De(a,n);function a(t){var e=n.call(this,t)||this;return e.inputRef=_.createRef(),e.onTimeChange=function(r){var o,i;e.setState({time:r});var c=e.props.date,l=c instanceof Date&&!isNaN(+c),p=l?c:new Date;if(r!=null&&r.includes(":")){var u=r.split(":"),h=u[0],x=u[1];p.setHours(Number(h)),p.setMinutes(Number(x))}(i=(o=e.props).onChange)===null||i===void 0||i.call(o,p)},e.renderTimeInput=function(){var r=e.state.time,o=e.props,i=o.date,c=o.timeString,l=o.customTimeInput;return l?v.cloneElement(l,{date:i,value:r,onChange:e.onTimeChange}):_.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:e.inputRef,onClick:function(){var p;(p=e.inputRef.current)===null||p===void 0||p.focus()},required:!0,value:r,onChange:function(p){e.onTimeChange(p.target.value||c)}})},e.state={time:e.props.timeString},e}return a.getDerivedStateFromProps=function(t,e){return t.timeString!==e.time?{time:t.timeString}:null},a.prototype.render=function(){return _.createElement("div",{className:"react-datepicker__input-time-container"},_.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),_.createElement("div",{className:"react-datepicker-time__input-container"},_.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},a})(v.Component),yx=(function(n){De(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.dayEl=v.createRef(),t.handleClick=function(e){!t.isDisabled()&&t.props.onClick&&t.props.onClick(e)},t.handleMouseEnter=function(e){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(e)},t.handleOnKeyDown=function(e){var r,o,i=e.key;i===L.Space&&(e.preventDefault(),e.key=L.Enter),(o=(r=t.props).handleOnKeyDown)===null||o===void 0||o.call(r,e)},t.isSameDay=function(e){return oe(t.props.day,e)},t.isKeyboardSelected=function(){var e;if(t.props.disabledKeyboardNavigation)return!1;var r=t.props.selectsMultiple?(e=t.props.selectedDates)===null||e===void 0?void 0:e.some(function(i){return t.isSameDayOrWeek(i)}):t.isSameDayOrWeek(t.props.selected),o=t.props.preSelection&&t.isDisabled(t.props.preSelection);return!r&&t.isSameDayOrWeek(t.props.preSelection)&&!o},t.isDisabled=function(e){return e===void 0&&(e=t.props.day),Ke(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(){return xo(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return oe(t.props.day,At(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(e){return t.props.showWeekPicker&&oe(e,At(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameDayOrWeek=function(e){return t.isSameDay(e)||t.isSameWeek(e)},t.getHighLightedClass=function(){var e=t.props,r=e.day,o=e.highlightDates;if(!o)return!1;var i=he(r,"MM.dd.yyyy");return o.get(i)},t.getHolidaysClass=function(){var e,r=t.props,o=r.day,i=r.holidays;if(!i)return[void 0];var c=he(o,"MM.dd.yyyy");return i.has(c)?[(e=i.get(c))===null||e===void 0?void 0:e.className]:[void 0]},t.isInRange=function(){var e=t.props,r=e.day,o=e.startDate,i=e.endDate;return!o||!i?!1:Xn(r,o,i)},t.isInSelectingRange=function(){var e,r=t.props,o=r.day,i=r.selectsStart,c=r.selectsEnd,l=r.selectsRange,p=r.selectsDisabledDaysInRange,u=r.startDate,h=r.endDate,x=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return!(i||c||l)||!x||!p&&t.isDisabled()?!1:i&&h&&(un(x,h)||Zt(x,h))?Xn(o,x,h):c&&u&&(Yt(x,u)||Zt(x,u))||l&&u&&!h&&(Yt(x,u)||Zt(x,u))?Xn(o,u,x):!1},t.isSelectingRangeStart=function(){var e;if(!t.isInSelectingRange())return!1;var r=t.props,o=r.day,i=r.startDate,c=r.selectsStart,l=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return c?oe(o,l):oe(o,i)},t.isSelectingRangeEnd=function(){var e;if(!t.isInSelectingRange())return!1;var r=t.props,o=r.day,i=r.endDate,c=r.selectsEnd,l=r.selectsRange,p=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return c||l?oe(o,p):oe(o,i)},t.isRangeStart=function(){var e=t.props,r=e.day,o=e.startDate,i=e.endDate;return!o||!i?!1:oe(o,r)},t.isRangeEnd=function(){var e=t.props,r=e.day,o=e.startDate,i=e.endDate;return!o||!i?!1:oe(i,r)},t.isWeekend=function(){var e=dm(t.props.day);return e===0||e===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===Ee(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(Ee(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(de())},t.isSelected=function(){var e;return t.props.selectsMultiple?(e=t.props.selectedDates)===null||e===void 0?void 0:e.some(function(r){return t.isSameDayOrWeek(r)}):t.isSameDayOrWeek(t.props.selected)},t.getClassNames=function(e){var r=t.props.dayClassName?t.props.dayClassName(e):void 0;return _e("react-datepicker__day",r,"react-datepicker__day--"+ex(t.props.day),{"react-datepicker__day--disabled":t.isDisabled(),"react-datepicker__day--excluded":t.isExcluded(),"react-datepicker__day--selected":t.isSelected(),"react-datepicker__day--keyboard-selected":t.isKeyboardSelected(),"react-datepicker__day--range-start":t.isRangeStart(),"react-datepicker__day--range-end":t.isRangeEnd(),"react-datepicker__day--in-range":t.isInRange(),"react-datepicker__day--in-selecting-range":t.isInSelectingRange(),"react-datepicker__day--selecting-range-start":t.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":t.isSelectingRangeEnd(),"react-datepicker__day--today":t.isCurrentDay(),"react-datepicker__day--weekend":t.isWeekend(),"react-datepicker__day--outside-month":t.isAfterMonth()||t.isBeforeMonth()},t.getHighLightedClass(),t.getHolidaysClass())},t.getAriaLabel=function(){var e=t.props,r=e.day,o=e.ariaLabelPrefixWhenEnabled,i=o===void 0?"Choose":o,c=e.ariaLabelPrefixWhenDisabled,l=c===void 0?"Not available":c,p=t.isDisabled()||t.isExcluded()?l:i;return"".concat(p," ").concat(he(r,"PPPP",t.props.locale))},t.getTitle=function(){var e=t.props,r=e.day,o=e.holidays,i=o===void 0?new Map:o,c=e.excludeDates,l=he(r,"MM.dd.yyyy"),p=[];return i.has(l)&&p.push.apply(p,i.get(l).holidayNames),t.isExcluded()&&p.push(c==null?void 0:c.filter(function(u){return u instanceof Date?oe(u,r):oe(u==null?void 0:u.date,r)}).map(function(u){if(!(u instanceof Date))return u==null?void 0:u.message})),p.join(", ")},t.getTabIndex=function(){var e=t.props.selected,r=t.props.preSelection,o=!(t.props.showWeekPicker&&(t.props.showWeekNumber||!t.isStartOfWeek()))&&(t.isKeyboardSelected()||t.isSameDay(e)&&oe(r,e))?0:-1;return o},t.handleFocusDay=function(){var e;t.shouldFocusDay()&&((e=t.dayEl.current)===null||e===void 0||e.focus({preventScroll:!0}))},t.renderDayContents=function(){return t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()||t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()?null:t.props.renderDayContents?t.props.renderDayContents(Li(t.props.day),t.props.day):Li(t.props.day)},t.render=function(){return _.createElement("div",{ref:t.dayEl,className:t.getClassNames(t.props.day),onKeyDown:t.handleOnKeyDown,onClick:t.handleClick,onMouseEnter:t.props.usePointerEvent?void 0:t.handleMouseEnter,onPointerEnter:t.props.usePointerEvent?t.handleMouseEnter:void 0,tabIndex:t.getTabIndex(),"aria-label":t.getAriaLabel(),role:"option",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&_.createElement("span",{className:"overlay"},t.getTitle()))},t}return a.prototype.componentDidMount=function(){this.handleFocusDay()},a.prototype.componentDidUpdate=function(){this.handleFocusDay()},a.prototype.shouldFocusDay=function(){var t=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(t=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(t=!1),this.isDayActiveElement()&&(t=!0),this.isDuplicateDay()&&(t=!1)),t},a.prototype.isDayActiveElement=function(){var t,e,r;return((e=(t=this.props.containerRef)===null||t===void 0?void 0:t.current)===null||e===void 0?void 0:e.contains(document.activeElement))&&((r=document.activeElement)===null||r===void 0?void 0:r.classList.contains("react-datepicker__day"))},a.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},a})(v.Component),bx=(function(n){De(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.weekNumberEl=v.createRef(),t.handleClick=function(e){t.props.onClick&&t.props.onClick(e)},t.handleOnKeyDown=function(e){var r,o,i=e.key;i===L.Space&&(e.preventDefault(),e.key=L.Enter),(o=(r=t.props).handleOnKeyDown)===null||o===void 0||o.call(r,e)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!oe(t.props.date,t.props.selected)&&oe(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||oe(t.props.date,t.props.selected)&&oe(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(e){var r=!1;t.getTabIndex()===0&&!(e!=null&&e.isInputFocused)&&oe(t.props.date,t.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(r=!0),t.props.inline&&!t.props.shouldFocusDayInline&&(r=!1),t.props.containerRef&&t.props.containerRef.current&&t.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(r=!0)),r&&t.weekNumberEl.current&&t.weekNumberEl.current.focus({preventScroll:!0})},t}return Object.defineProperty(a,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},a.prototype.componentDidUpdate=function(t){this.handleFocusWeekNumber(t)},a.prototype.render=function(){var t=this.props,e=t.weekNumber,r=t.isWeekDisabled,o=t.ariaLabelPrefix,i=o===void 0?a.defaultProps.ariaLabelPrefix:o,c=t.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!c&&!r,"react-datepicker__week-number--selected":!!c&&oe(this.props.date,this.props.selected)};return _.createElement("div",{ref:this.weekNumberEl,className:_e(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},e)},a})(v.Component),vx=(function(n){De(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.isDisabled=function(e){return Ke(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.handleDayClick=function(e,r){t.props.onDayClick&&t.props.onDayClick(e,r)},t.handleDayMouseEnter=function(e){t.props.onDayMouseEnter&&t.props.onDayMouseEnter(e)},t.handleWeekClick=function(e,r,o){for(var i,c,l,p=new Date(e),u=0;u<7;u++){var h=new Date(e);h.setDate(h.getDate()+u);var x=!t.isDisabled(h);if(x){p=h;break}}typeof t.props.onWeekSelect=="function"&&t.props.onWeekSelect(p,r,o),t.props.showWeekPicker&&t.handleDayClick(p,o),((i=t.props.shouldCloseOnSelect)!==null&&i!==void 0?i:a.defaultProps.shouldCloseOnSelect)&&((l=(c=t.props).setOpen)===null||l===void 0||l.call(c,!1))},t.formatWeekNumber=function(e){return t.props.formatWeekNumber?t.props.formatWeekNumber(e):Zg(e)},t.isWeekDisabled=function(){for(var e=t.startOfWeek(),r=Je(e,6),o=new Date(e);o<=r;){if(!t.isDisabled(o))return!1;o=Je(o,1)}return!0},t.renderDays=function(){var e=t.startOfWeek(),r=[],o=t.formatWeekNumber(e);if(t.props.showWeekNumber){var i=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,e,o):void 0;r.push(_.createElement(bx,ie({key:"W"},a.defaultProps,t.props,{weekNumber:o,isWeekDisabled:t.isWeekDisabled(),date:e,onClick:i})))}return r.concat([0,1,2,3,4,5,6].map(function(c){var l=Je(e,c);return _.createElement(yx,ie({},a.defaultProps,t.props,{ariaLabelPrefixWhenEnabled:t.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:t.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:t.handleDayClick.bind(t,l),onMouseEnter:t.handleDayMouseEnter.bind(t,l)}))}))},t.startOfWeek=function(){return At(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!oe(t.startOfWeek(),t.props.selected)&&oe(t.startOfWeek(),t.props.preSelection)},t}return Object.defineProperty(a,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),a.prototype.render=function(){var t={"react-datepicker__week":!0,"react-datepicker__week--selected":oe(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return _.createElement("div",{className:_e(t)},this.renderDays())},a})(v.Component),Qn,wx=6,jn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Ta=(Qn={},Qn[jn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Qn[jn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Qn[jn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Qn),Sr=1;function rs(n,a){return n?jn.FOUR_COLUMNS:a?jn.TWO_COLUMNS:jn.THREE_COLUMNS}var kx=(function(n){De(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.MONTH_REFS=dt([],Array(12),!0).map(function(){return v.createRef()}),t.QUARTER_REFS=dt([],Array(4),!0).map(function(){return v.createRef()}),t.isDisabled=function(e){return Ke(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(e){return xo(e,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(e,r){var o,i;(i=(o=t.props).onDayClick)===null||i===void 0||i.call(o,e,r,t.props.orderInDisplay)},t.handleDayMouseEnter=function(e){var r,o;(o=(r=t.props).onDayMouseEnter)===null||o===void 0||o.call(r,e)},t.handleMouseLeave=function(){var e,r;(r=(e=t.props).onMouseLeave)===null||r===void 0||r.call(e)},t.isRangeStartMonth=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:Pe(He(o,e),i)},t.isRangeStartQuarter=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:Vr(Sn(o,e),i)},t.isRangeEndMonth=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:Pe(He(o,e),c)},t.isRangeEndQuarter=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:Vr(Sn(o,e),c)},t.isInSelectingRangeMonth=function(e){var r,o=t.props,i=o.day,c=o.selectsStart,l=o.selectsEnd,p=o.selectsRange,u=o.startDate,h=o.endDate,x=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return!(c||l||p)||!x?!1:c&&h?wr(x,h,e,i):l&&u||p&&u&&!h?wr(u,x,e,i):!1},t.isSelectingMonthRangeStart=function(e){var r;if(!t.isInSelectingRangeMonth(e))return!1;var o=t.props,i=o.day,c=o.startDate,l=o.selectsStart,p=He(i,e),u=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return l?Pe(p,u):Pe(p,c)},t.isSelectingMonthRangeEnd=function(e){var r;if(!t.isInSelectingRangeMonth(e))return!1;var o=t.props,i=o.day,c=o.endDate,l=o.selectsEnd,p=o.selectsRange,u=He(i,e),h=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return l||p?Pe(u,h):Pe(u,c)},t.isInSelectingRangeQuarter=function(e){var r,o=t.props,i=o.day,c=o.selectsStart,l=o.selectsEnd,p=o.selectsRange,u=o.startDate,h=o.endDate,x=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return!(c||l||p)||!x?!1:c&&h?Cr(x,h,e,i):l&&u||p&&u&&!h?Cr(u,x,e,i):!1},t.isWeekInMonth=function(e){var r=t.props.day,o=Je(e,6);return Pe(e,r)||Pe(o,r)},t.isCurrentMonth=function(e,r){return ne(e)===ne(de())&&r===Ee(de())},t.isCurrentQuarter=function(e,r){return ne(e)===ne(de())&&r===nn(de())},t.isSelectedMonth=function(e,r,o){return Ee(o)===r&&ne(e)===ne(o)},t.isSelectMonthInList=function(e,r,o){return o.some(function(i){return t.isSelectedMonth(e,r,i)})},t.isSelectedQuarter=function(e,r,o){return nn(e)===r&&ne(e)===ne(o)},t.renderWeeks=function(){for(var e=[],r=t.props.fixedHeight,o=0,i=!1,c=At(Ct(t.props.day),t.props.locale,t.props.calendarStartDay),l=function(y){return t.props.showWeekPicker?At(y,t.props.locale,t.props.calendarStartDay):t.props.preSelection},p=function(y){return t.props.showWeekPicker?At(y,t.props.locale,t.props.calendarStartDay):t.props.selected},u=t.props.selected?p(t.props.selected):void 0,h=t.props.preSelection?l(t.props.preSelection):void 0;e.push(_.createElement(vx,ie({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:o,day:c,month:Ee(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:u,preSelection:h,showWeekNumber:t.props.showWeekNumbers}))),!i;){o++,c=Yr(c,1);var x=r&&o>=wx,b=!r&&!t.isWeekInMonth(c);if(x||b)if(t.props.peekNextMonth)i=!0;else break}return e},t.onMonthClick=function(e,r){var o=t.isMonthDisabledForLabelDate(r),i=o.isDisabled,c=o.labelDate;i||t.handleDayClick(Ct(c),e)},t.onMonthMouseEnter=function(e){var r=t.isMonthDisabledForLabelDate(e),o=r.isDisabled,i=r.labelDate;o||t.handleDayMouseEnter(Ct(i))},t.handleMonthNavigation=function(e,r){var o,i,c,l;(i=(o=t.props).setPreSelection)===null||i===void 0||i.call(o,r),(l=(c=t.MONTH_REFS[e])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus()},t.handleKeyboardNavigation=function(e,r,o){var i,c=t.props,l=c.selected,p=c.preSelection,u=c.setPreSelection,h=c.minDate,x=c.maxDate,b=c.showFourColumnMonthYearPicker,y=c.showTwoColumnMonthYearPicker;if(p){var w=rs(b,y),k=t.getVerticalOffset(w),f=(i=Ta[w])===null||i===void 0?void 0:i.grid,C=function(S,D,j){var A,H,F=D,K=j;switch(S){case L.ArrowRight:F=et(D,Sr),K=j===11?0:j+Sr;break;case L.ArrowLeft:F=rn(D,Sr),K=j===0?11:j-Sr;break;case L.ArrowUp:F=rn(D,k),K=!((A=f==null?void 0:f[0])===null||A===void 0)&&A.includes(j)?j+12-k:j-k;break;case L.ArrowDown:F=et(D,k),K=!((H=f==null?void 0:f[f.length-1])===null||H===void 0)&&H.includes(j)?j-12+k:j+k;break}return{newCalculatedDate:F,newCalculatedMonth:K}},P=function(S,D,j){for(var A=40,H=S,F=!1,K=0,G=C(H,D,j),z=G.newCalculatedDate,E=G.newCalculatedMonth;!F;){if(K>=A){z=D,E=j;break}if(h&&z<h){H=L.ArrowRight;var B=C(H,z,E);z=B.newCalculatedDate,E=B.newCalculatedMonth}if(x&&z>x){H=L.ArrowLeft;var B=C(H,z,E);z=B.newCalculatedDate,E=B.newCalculatedMonth}if(sx(z,t.props)){var B=C(H,z,E);z=B.newCalculatedDate,E=B.newCalculatedMonth}else F=!0;K++}return{newCalculatedDate:z,newCalculatedMonth:E}};if(r===L.Enter){t.isMonthDisabled(o)||(t.onMonthClick(e,o),u==null||u(l));return}var T=P(r,p,o),N=T.newCalculatedDate,R=T.newCalculatedMonth;switch(r){case L.ArrowRight:case L.ArrowLeft:case L.ArrowUp:case L.ArrowDown:t.handleMonthNavigation(R,N);break}}},t.getVerticalOffset=function(e){var r,o;return(o=(r=Ta[e])===null||r===void 0?void 0:r.verticalNavigationOffset)!==null&&o!==void 0?o:0},t.onMonthKeyDown=function(e,r){var o=t.props,i=o.disabledKeyboardNavigation,c=o.handleOnMonthKeyDown,l=e.key;l!==L.Tab&&e.preventDefault(),i||t.handleKeyboardNavigation(e,l,r),c&&c(e)},t.onQuarterClick=function(e,r){var o=Sn(t.props.day,r);kr(o,t.props)||t.handleDayClick(Bi(o),e)},t.onQuarterMouseEnter=function(e){var r=Sn(t.props.day,e);kr(r,t.props)||t.handleDayMouseEnter(Bi(r))},t.handleQuarterNavigation=function(e,r){var o,i,c,l;t.isDisabled(r)||t.isExcluded(r)||((i=(o=t.props).setPreSelection)===null||i===void 0||i.call(o,r),(l=(c=t.QUARTER_REFS[e-1])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus())},t.onQuarterKeyDown=function(e,r){var o,i,c=e.key;if(!t.props.disabledKeyboardNavigation)switch(c){case L.Enter:t.onQuarterClick(e,r),(i=(o=t.props).setPreSelection)===null||i===void 0||i.call(o,t.props.selected);break;case L.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(r===4?1:r+1,uo(t.props.preSelection,1));break;case L.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(r===1?4:r-1,tl(t.props.preSelection));break}},t.isMonthDisabledForLabelDate=function(e){var r,o=t.props,i=o.day,c=o.minDate,l=o.maxDate,p=o.excludeDates,u=o.includeDates,h=He(i,e);return{isDisabled:(r=(c||l||p||u)&&ol(h,t.props))!==null&&r!==void 0?r:!1,labelDate:h}},t.isMonthDisabled=function(e){var r=t.isMonthDisabledForLabelDate(e).isDisabled;return r},t.getMonthClassNames=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate,l=r.preSelection,p=r.monthClassName,u=p?p(He(o,e)):void 0,h=t.getSelection();return _e("react-datepicker__month-text","react-datepicker__month-".concat(e),u,{"react-datepicker__month-text--disabled":t.isMonthDisabled(e),"react-datepicker__month-text--selected":h?t.isSelectMonthInList(o,e,h):void 0,"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&l&&t.isSelectedMonth(o,e,l)&&!t.isMonthDisabled(e),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(e),"react-datepicker__month-text--in-range":i&&c?wr(i,c,e,o):void 0,"react-datepicker__month-text--range-start":t.isRangeStartMonth(e),"react-datepicker__month-text--range-end":t.isRangeEndMonth(e),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(e),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(e),"react-datepicker__month-text--today":t.isCurrentMonth(o,e)})},t.getTabIndex=function(e){if(t.props.preSelection==null)return"-1";var r=Ee(t.props.preSelection),o=t.isMonthDisabledForLabelDate(r).isDisabled,i=e===r&&!(o||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getQuarterTabIndex=function(e){if(t.props.preSelection==null)return"-1";var r=nn(t.props.preSelection),o=kr(t.props.day,t.props),i=e===r&&!(o||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getAriaLabel=function(e){var r=t.props,o=r.chooseDayAriaLabelPrefix,i=o===void 0?"Choose":o,c=r.disabledDayAriaLabelPrefix,l=c===void 0?"Not available":c,p=r.day,u=r.locale,h=He(p,e),x=t.isDisabled(h)||t.isExcluded(h)?l:i;return"".concat(x," ").concat(he(h,"MMMM yyyy",u))},t.getQuarterClassNames=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate,l=r.selected,p=r.minDate,u=r.maxDate,h=r.excludeDates,x=r.includeDates,b=r.filterDate,y=r.preSelection,w=r.disabledKeyboardNavigation,k=(p||u||h||x||b)&&kr(Sn(o,e),t.props);return _e("react-datepicker__quarter-text","react-datepicker__quarter-".concat(e),{"react-datepicker__quarter-text--disabled":k,"react-datepicker__quarter-text--selected":l?t.isSelectedQuarter(o,e,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!w&&y&&t.isSelectedQuarter(o,e,y)&&!k,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(e),"react-datepicker__quarter-text--in-range":i&&c?Cr(i,c,e,o):void 0,"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(e),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(e)})},t.getMonthContent=function(e){var r=t.props,o=r.showFullMonthYearPicker,i=r.renderMonthContent,c=r.locale,l=r.day,p=al(e,c),u=go(e,c);return i?i(e,p,u,l):o?u:p},t.getQuarterContent=function(e){var r,o=t.props,i=o.renderQuarterContent,c=o.locale,l=ix(e,c);return(r=i==null?void 0:i(e,l))!==null&&r!==void 0?r:l},t.renderMonths=function(){var e,r=t.props,o=r.showTwoColumnMonthYearPicker,i=r.showFourColumnMonthYearPicker,c=r.day,l=r.selected,p=(e=Ta[rs(i,o)])===null||e===void 0?void 0:e.grid;return p==null?void 0:p.map(function(u,h){return _.createElement("div",{className:"react-datepicker__month-wrapper",key:h},u.map(function(x,b){return _.createElement("div",{ref:t.MONTH_REFS[x],key:b,onClick:function(y){t.onMonthClick(y,x)},onKeyDown:function(y){cl(y)&&(y.preventDefault(),y.key=L.Enter),t.onMonthKeyDown(y,x)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onMonthMouseEnter(x)},onPointerEnter:t.props.usePointerEvent?function(){return t.onMonthMouseEnter(x)}:void 0,tabIndex:Number(t.getTabIndex(x)),className:t.getMonthClassNames(x),"aria-disabled":t.isMonthDisabled(x),role:"option","aria-label":t.getAriaLabel(x),"aria-current":t.isCurrentMonth(c,x)?"date":void 0,"aria-selected":l?t.isSelectedMonth(c,x,l):void 0},t.getMonthContent(x))}))})},t.renderQuarters=function(){var e=t.props,r=e.day,o=e.selected,i=[1,2,3,4];return _.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(c,l){return _.createElement("div",{key:l,ref:t.QUARTER_REFS[l],role:"option",onClick:function(p){t.onQuarterClick(p,c)},onKeyDown:function(p){t.onQuarterKeyDown(p,c)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onQuarterMouseEnter(c)},onPointerEnter:t.props.usePointerEvent?function(){return t.onQuarterMouseEnter(c)}:void 0,className:t.getQuarterClassNames(c),"aria-selected":o?t.isSelectedQuarter(r,c,o):void 0,tabIndex:Number(t.getQuarterTabIndex(c)),"aria-current":t.isCurrentQuarter(r,c)?"date":void 0},t.getQuarterContent(c))}))},t.getClassNames=function(){var e=t.props,r=e.selectingDate,o=e.selectsStart,i=e.selectsEnd,c=e.showMonthYearPicker,l=e.showQuarterYearPicker,p=e.showWeekPicker;return _e("react-datepicker__month",{"react-datepicker__month--selecting-range":r&&(o||i)},{"react-datepicker__monthPicker":c},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":p})},t}return a.prototype.getSelection=function(){var t=this.props,e=t.selected,r=t.selectedDates,o=t.selectsMultiple;if(o)return r;if(e)return[e]},a.prototype.render=function(){var t=this.props,e=t.showMonthYearPicker,r=t.showQuarterYearPicker,o=t.day,i=t.ariaLabelPrefix,c=i===void 0?"Month ":i,l=c?c.trim()+" ":"";return _.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(he(o,"MMMM, yyyy",this.props.locale)),role:"listbox"},e?this.renderMonths():r?this.renderQuarters():this.renderWeeks())},a})(v.Component),Dx=(function(n){De(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.isSelectedMonth=function(e){return t.props.month===e},t.renderOptions=function(){return t.props.monthNames.map(function(e,r){return _.createElement("div",{className:t.isSelectedMonth(r)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:e,onClick:t.onChange.bind(t,r),"aria-selected":t.isSelectedMonth(r)?"true":void 0},t.isSelectedMonth(r)?_.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",e)})},t.onChange=function(e){return t.props.onChange(e)},t.handleClickOutside=function(){return t.props.onCancel()},t}return a.prototype.render=function(){return _.createElement(sa,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},a})(v.Component),Cx=(function(n){De(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(e){return e.map(function(r,o){return _.createElement("option",{key:r,value:o},r)})},t.renderSelectMode=function(e){return _.createElement("select",{value:t.props.month,className:"react-datepicker__month-select",onChange:function(r){return t.onChange(parseInt(r.target.value))}},t.renderSelectOptions(e))},t.renderReadView=function(e,r){return _.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},_.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),_.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},r[t.props.month]))},t.renderDropdown=function(e){return _.createElement(Dx,ie({key:"dropdown"},t.props,{monthNames:e,onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(e){var r=t.state.dropdownVisible,o=[t.renderReadView(!r,e)];return r&&o.unshift(t.renderDropdown(e)),o},t.onChange=function(e){t.toggleDropdown(),e!==t.props.month&&t.props.onChange(e)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return a.prototype.render=function(){var t=this,e=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(o){return al(o,t.props.locale)}:function(o){return go(o,t.props.locale)}),r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode(e);break;case"select":r=this.renderSelectMode(e);break}return _.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},r)},a})(v.Component);function Sx(n,a){for(var t=[],e=Ct(n),r=Ct(a);!Yt(e,r);)t.push(de(e)),e=et(e,1);return t}var Mx=(function(n){De(a,n);function a(t){var e=n.call(this,t)||this;return e.renderOptions=function(){return e.state.monthYearsList.map(function(r){var o=Za(r),i=it(e.props.date,r)&&Pe(e.props.date,r);return _.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:o,onClick:e.onChange.bind(e,o),"aria-selected":i?"true":void 0},i?_.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",he(r,e.props.dateFormat,e.props.locale))})},e.onChange=function(r){return e.props.onChange(r)},e.handleClickOutside=function(){e.props.onCancel()},e.state={monthYearsList:Sx(e.props.minDate,e.props.maxDate)},e}return a.prototype.render=function(){var t=_e({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return _.createElement(sa,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},a})(v.Component),_x=(function(n){De(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var e=Ct(t.props.minDate),r=Ct(t.props.maxDate),o=[];!Yt(e,r);){var i=Za(e);o.push(_.createElement("option",{key:i,value:i},he(e,t.props.dateFormat,t.props.locale))),e=et(e,1)}return o},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return _.createElement("select",{value:Za(Ct(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){var r=he(t.props.date,t.props.dateFormat,t.props.locale);return _.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},_.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),_.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},r))},t.renderDropdown=function(){return _.createElement(Mx,ie({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var e=t.state.dropdownVisible,r=[t.renderReadView(!e)];return e&&r.unshift(t.renderDropdown()),r},t.onChange=function(e){t.toggleDropdown();var r=de(e);it(t.props.date,r)&&Pe(t.props.date,r)||t.props.onChange(r)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return a.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return _.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},a})(v.Component),jx=(function(n){De(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={height:null},t.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var e,r,o;t.list&&(t.list.scrollTop=(o=t.centerLi&&a.calcCenterPosition(t.props.monthRef?t.props.monthRef.clientHeight-((r=(e=t.header)===null||e===void 0?void 0:e.clientHeight)!==null&&r!==void 0?r:0):t.list.clientHeight,t.centerLi))!==null&&o!==void 0?o:0)})},t.handleClick=function(e){var r,o;(t.props.minTime||t.props.maxTime)&&Qi(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&Ki(e,t.props)||(o=(r=t.props).onChange)===null||o===void 0||o.call(r,e)},t.isSelectedTime=function(e){return t.props.selected&&gx(t.props.selected,e)},t.isDisabledTime=function(e){return(t.props.minTime||t.props.maxTime)&&Qi(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&Ki(e,t.props)},t.liClasses=function(e){var r,o=["react-datepicker__time-list-item",t.props.timeClassName?t.props.timeClassName(e):void 0];return t.isSelectedTime(e)&&o.push("react-datepicker__time-list-item--selected"),t.isDisabledTime(e)&&o.push("react-datepicker__time-list-item--disabled"),t.props.injectTimes&&(ut(e)*3600+pt(e)*60+Dt(e))%(((r=t.props.intervals)!==null&&r!==void 0?r:a.defaultProps.intervals)*60)!==0&&o.push("react-datepicker__time-list-item--injected"),o.join(" ")},t.handleOnKeyDown=function(e,r){var o,i;e.key===L.Space&&(e.preventDefault(),e.key=L.Enter),(e.key===L.ArrowUp||e.key===L.ArrowLeft)&&e.target instanceof HTMLElement&&e.target.previousSibling&&(e.preventDefault(),e.target.previousSibling instanceof HTMLElement&&e.target.previousSibling.focus()),(e.key===L.ArrowDown||e.key===L.ArrowRight)&&e.target instanceof HTMLElement&&e.target.nextSibling&&(e.preventDefault(),e.target.nextSibling instanceof HTMLElement&&e.target.nextSibling.focus()),e.key===L.Enter&&t.handleClick(r),(i=(o=t.props).handleOnKeyDown)===null||i===void 0||i.call(o,e)},t.renderTimes=function(){for(var e,r=[],o=typeof t.props.format=="string"?t.props.format:"p",i=(e=t.props.intervals)!==null&&e!==void 0?e:a.defaultProps.intervals,c=t.props.selected||t.props.openToDate||de(),l=$r(c),p=t.props.injectTimes&&t.props.injectTimes.sort(function(k,f){return k.getTime()-f.getTime()}),u=60*mx(c),h=u/i,x=0;x<h;x++){var b=Ga(l,x*i);if(r.push(b),p){var y=hx(l,b,x,i,p);r=r.concat(y)}}var w=r.reduce(function(k,f){return f.getTime()<=c.getTime()?f:k},r[0]);return r.map(function(k){return _.createElement("li",{key:k.valueOf(),onClick:t.handleClick.bind(t,k),className:t.liClasses(k),ref:function(f){k===w&&(t.centerLi=f)},onKeyDown:function(f){t.handleOnKeyDown(f,k)},tabIndex:k===w?0:-1,role:"option","aria-selected":t.isSelectedTime(k)?"true":void 0,"aria-disabled":t.isDisabledTime(k)?"true":void 0},he(k,o,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?_.createElement(_.Fragment,null):_.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(t.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(e){t.header=e}},_.createElement("div",{className:"react-datepicker-time__header"},t.props.timeCaption))},t}return Object.defineProperty(a,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},a.prototype.render=function(){var t=this,e,r=this.state.height;return _.createElement("div",{className:"react-datepicker__time-container ".concat(((e=this.props.todayButton)!==null&&e!==void 0?e:a.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),_.createElement("div",{className:"react-datepicker__time"},_.createElement("div",{className:"react-datepicker__time-box"},_.createElement("ul",{className:"react-datepicker__time-list",ref:function(o){t.list=o},style:r?{height:r}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},a.calcCenterPosition=function(t,e){return e.offsetTop-(t/2-e.clientHeight/2)},a})(v.Component),as=3,Ix=(function(n){De(a,n);function a(t){var e=n.call(this,t)||this;return e.YEAR_REFS=dt([],Array(e.props.yearItemNumber),!0).map(function(){return v.createRef()}),e.isDisabled=function(r){return Ke(r,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(r){return xo(r,{excludeDates:e.props.excludeDates})},e.selectingDate=function(){var r;return(r=e.props.selectingDate)!==null&&r!==void 0?r:e.props.preSelection},e.updateFocusOnPaginate=function(r){var o=function(){var i,c;(c=(i=e.YEAR_REFS[r])===null||i===void 0?void 0:i.current)===null||c===void 0||c.focus()};window.requestAnimationFrame(o)},e.handleYearClick=function(r,o){e.props.onDayClick&&e.props.onDayClick(r,o)},e.handleYearNavigation=function(r,o){var i,c,l,p,u=e.props,h=u.date,x=u.yearItemNumber;if(!(h===void 0||x===void 0)){var b=Rt(h,x).startPeriod;e.isDisabled(o)||e.isExcluded(o)||((c=(i=e.props).setPreSelection)===null||c===void 0||c.call(i,o),r-b<0?e.updateFocusOnPaginate(x-(b-r)):r-b>=x?e.updateFocusOnPaginate(Math.abs(x-(r-b))):(p=(l=e.YEAR_REFS[r-b])===null||l===void 0?void 0:l.current)===null||p===void 0||p.focus())}},e.isSameDay=function(r,o){return oe(r,o)},e.isCurrentYear=function(r){return r===ne(de())},e.isRangeStart=function(r){return e.props.startDate&&e.props.endDate&&it(ot(de(),r),e.props.startDate)},e.isRangeEnd=function(r){return e.props.startDate&&e.props.endDate&&it(ot(de(),r),e.props.endDate)},e.isInRange=function(r){return Dr(r,e.props.startDate,e.props.endDate)},e.isInSelectingRange=function(r){var o=e.props,i=o.selectsStart,c=o.selectsEnd,l=o.selectsRange,p=o.startDate,u=o.endDate;return!(i||c||l)||!e.selectingDate()?!1:i&&u?Dr(r,e.selectingDate(),u):c&&p||l&&p&&!u?Dr(r,p,e.selectingDate()):!1},e.isSelectingRangeStart=function(r){var o;if(!e.isInSelectingRange(r))return!1;var i=e.props,c=i.startDate,l=i.selectsStart,p=ot(de(),r);return l?it(p,(o=e.selectingDate())!==null&&o!==void 0?o:null):it(p,c??null)},e.isSelectingRangeEnd=function(r){var o;if(!e.isInSelectingRange(r))return!1;var i=e.props,c=i.endDate,l=i.selectsEnd,p=i.selectsRange,u=ot(de(),r);return l||p?it(u,(o=e.selectingDate())!==null&&o!==void 0?o:null):it(u,c??null)},e.isKeyboardSelected=function(r){if(!(e.props.date===void 0||e.props.selected==null||e.props.preSelection==null)){var o=e.props,i=o.minDate,c=o.maxDate,l=o.excludeDates,p=o.includeDates,u=o.filterDate,h=Gn(ot(e.props.date,r)),x=(i||c||l||p||u)&&Nr(r,e.props);return!e.props.disabledKeyboardNavigation&&!e.props.inline&&!oe(h,Gn(e.props.selected))&&oe(h,Gn(e.props.preSelection))&&!x}},e.onYearClick=function(r,o){var i=e.props.date;i!==void 0&&e.handleYearClick(Gn(ot(i,o)),r)},e.onYearKeyDown=function(r,o){var i,c,l=r.key,p=e.props,u=p.date,h=p.yearItemNumber,x=p.handleOnKeyDown;if(l!==L.Tab&&r.preventDefault(),!e.props.disabledKeyboardNavigation)switch(l){case L.Enter:if(e.props.selected==null)break;e.onYearClick(r,o),(c=(i=e.props).setPreSelection)===null||c===void 0||c.call(i,e.props.selected);break;case L.ArrowRight:if(e.props.preSelection==null)break;e.handleYearNavigation(o+1,wt(e.props.preSelection,1));break;case L.ArrowLeft:if(e.props.preSelection==null)break;e.handleYearNavigation(o-1,Nn(e.props.preSelection,1));break;case L.ArrowUp:{if(u===void 0||h===void 0||e.props.preSelection==null)break;var b=Rt(u,h).startPeriod,y=as,w=o-y;if(w<b){var k=h%y;o>=b&&o<b+k?y=k:y+=k,w=o-y}e.handleYearNavigation(w,Nn(e.props.preSelection,y));break}case L.ArrowDown:{if(u===void 0||h===void 0||e.props.preSelection==null)break;var f=Rt(u,h).endPeriod,y=as,w=o+y;if(w>f){var k=h%y;o<=f&&o>f-k?y=k:y+=k,w=o+y}e.handleYearNavigation(w,wt(e.props.preSelection,y));break}}x&&x(r)},e.getYearClassNames=function(r){var o=e.props,i=o.date,c=o.minDate,l=o.maxDate,p=o.selected,u=o.excludeDates,h=o.includeDates,x=o.filterDate,b=o.yearClassName;return _e("react-datepicker__year-text","react-datepicker__year-".concat(r),i?b==null?void 0:b(ot(i,r)):void 0,{"react-datepicker__year-text--selected":p?r===ne(p):void 0,"react-datepicker__year-text--disabled":(c||l||u||h||x)&&Nr(r,e.props),"react-datepicker__year-text--keyboard-selected":e.isKeyboardSelected(r),"react-datepicker__year-text--range-start":e.isRangeStart(r),"react-datepicker__year-text--range-end":e.isRangeEnd(r),"react-datepicker__year-text--in-range":e.isInRange(r),"react-datepicker__year-text--in-selecting-range":e.isInSelectingRange(r),"react-datepicker__year-text--selecting-range-start":e.isSelectingRangeStart(r),"react-datepicker__year-text--selecting-range-end":e.isSelectingRangeEnd(r),"react-datepicker__year-text--today":e.isCurrentYear(r)})},e.getYearTabIndex=function(r){if(e.props.disabledKeyboardNavigation||e.props.preSelection==null)return"-1";var o=ne(e.props.preSelection),i=Nr(r,e.props);return r===o&&!i?"0":"-1"},e.getYearContent=function(r){return e.props.renderYearContent?e.props.renderYearContent(r):r},e}return a.prototype.render=function(){var t=this,e=[],r=this.props,o=r.date,i=r.yearItemNumber,c=r.onYearMouseEnter,l=r.onYearMouseLeave;if(o===void 0)return null;for(var p=Rt(o,i),u=p.startPeriod,h=p.endPeriod,x=function(w){e.push(_.createElement("div",{ref:b.YEAR_REFS[w-u],onClick:function(k){t.onYearClick(k,w)},onKeyDown:function(k){cl(k)&&(k.preventDefault(),k.key=L.Enter),t.onYearKeyDown(k,w)},tabIndex:Number(b.getYearTabIndex(w)),className:b.getYearClassNames(w),onMouseEnter:b.props.usePointerEvent?void 0:function(k){return c(k,w)},onPointerEnter:b.props.usePointerEvent?function(k){return c(k,w)}:void 0,onMouseLeave:b.props.usePointerEvent?void 0:function(k){return l(k,w)},onPointerLeave:b.props.usePointerEvent?function(k){return l(k,w)}:void 0,key:w,"aria-current":b.isCurrentYear(w)?"date":void 0},b.getYearContent(w)))},b=this,y=u;y<=h;y++)x(y);return _.createElement("div",{className:"react-datepicker__year"},_.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},e))},a})(v.Component);function Px(n,a,t,e){for(var r=[],o=0;o<2*a+1;o++){var i=n+a-o,c=!0;t&&(c=ne(t)<=i),e&&c&&(c=ne(e)>=i),c&&r.push(i)}return r}var Ex=(function(n){De(a,n);function a(t){var e=n.call(this,t)||this;e.renderOptions=function(){var c=e.props.year,l=e.state.yearsList.map(function(h){return _.createElement("div",{className:c===h?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:h,onClick:e.onChange.bind(e,h),"aria-selected":c===h?"true":void 0},c===h?_.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",h)}),p=e.props.minDate?ne(e.props.minDate):null,u=e.props.maxDate?ne(e.props.maxDate):null;return(!u||!e.state.yearsList.find(function(h){return h===u}))&&l.unshift(_.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:e.incrementYears},_.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!p||!e.state.yearsList.find(function(h){return h===p}))&&l.push(_.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:e.decrementYears},_.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},e.onChange=function(c){e.props.onChange(c)},e.handleClickOutside=function(){e.props.onCancel()},e.shiftYears=function(c){var l=e.state.yearsList.map(function(p){return p+c});e.setState({yearsList:l})},e.incrementYears=function(){return e.shiftYears(1)},e.decrementYears=function(){return e.shiftYears(-1)};var r=t.yearDropdownItemNumber,o=t.scrollableYearDropdown,i=r||(o?10:5);return e.state={yearsList:Px(e.props.year,i,e.props.minDate,e.props.maxDate)},e.dropdownRef=v.createRef(),e}return a.prototype.componentDidMount=function(){var t=this.dropdownRef.current;if(t){var e=t.children?Array.from(t.children):null,r=e?e.find(function(o){return o.ariaSelected}):null;t.scrollTop=r&&r instanceof HTMLElement?r.offsetTop+(r.clientHeight-t.clientHeight)/2:(t.scrollHeight-t.clientHeight)/2}},a.prototype.render=function(){var t=_e({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return _.createElement(sa,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},a})(v.Component),Tx=(function(n){De(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var e=t.props.minDate?ne(t.props.minDate):1900,r=t.props.maxDate?ne(t.props.maxDate):2100,o=[],i=e;i<=r;i++)o.push(_.createElement("option",{key:i,value:i},i));return o},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return _.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){return _.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(r){return t.toggleDropdown(r)}},_.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),_.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return _.createElement(Ex,ie({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var e=t.state.dropdownVisible,r=[t.renderReadView(!e)];return e&&r.unshift(t.renderDropdown()),r},t.onChange=function(e){t.toggleDropdown(),e!==t.props.year&&t.props.onChange(e)},t.toggleDropdown=function(e){t.setState({dropdownVisible:!t.state.dropdownVisible},function(){t.props.adjustDateOnChange&&t.handleYearChange(t.props.date,e)})},t.handleYearChange=function(e,r){var o;(o=t.onSelect)===null||o===void 0||o.call(t,e,r),t.setOpen()},t.onSelect=function(e,r){var o,i;(i=(o=t.props).onSelect)===null||i===void 0||i.call(o,e,r)},t.setOpen=function(){var e,r;(r=(e=t.props).setOpen)===null||r===void 0||r.call(e,!0)},t}return a.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return _.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},a})(v.Component),$x=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Nx=function(n){var a=(n.className||"").split(/\s+/);return $x.some(function(t){return a.indexOf(t)>=0})},Rx=(function(n){De(a,n);function a(t){var e=n.call(this,t)||this;return e.monthContainer=void 0,e.handleClickOutside=function(r){e.props.onClickOutside(r)},e.setClickOutsideRef=function(){return e.containerRef.current},e.handleDropdownFocus=function(r){var o,i;Nx(r.target)&&((i=(o=e.props).onDropdownFocus)===null||i===void 0||i.call(o,r))},e.getDateInView=function(){var r=e.props,o=r.preSelection,i=r.selected,c=r.openToDate,l=il(e.props),p=sl(e.props),u=de(),h=c||i||o;return h||(l&&un(u,l)?l:p&&Yt(u,p)?p:u)},e.increaseMonth=function(){e.setState(function(r){var o=r.date;return{date:et(o,1)}},function(){return e.handleMonthChange(e.state.date)})},e.decreaseMonth=function(){e.setState(function(r){var o=r.date;return{date:rn(o,1)}},function(){return e.handleMonthChange(e.state.date)})},e.handleDayClick=function(r,o,i){e.props.onSelect(r,o,i),e.props.setPreSelection&&e.props.setPreSelection(r)},e.handleDayMouseEnter=function(r){e.setState({selectingDate:r}),e.props.onDayMouseEnter&&e.props.onDayMouseEnter(r)},e.handleMonthMouseLeave=function(){e.setState({selectingDate:void 0}),e.props.onMonthMouseLeave&&e.props.onMonthMouseLeave()},e.handleYearMouseEnter=function(r,o){e.setState({selectingDate:ot(de(),o)}),e.props.onYearMouseEnter&&e.props.onYearMouseEnter(r,o)},e.handleYearMouseLeave=function(r,o){e.props.onYearMouseLeave&&e.props.onYearMouseLeave(r,o)},e.handleYearChange=function(r){var o,i,c,l;(i=(o=e.props).onYearChange)===null||i===void 0||i.call(o,r),e.setState({isRenderAriaLiveMessage:!0}),e.props.adjustDateOnChange&&(e.props.onSelect(r),(l=(c=e.props).setOpen)===null||l===void 0||l.call(c,!0)),e.props.setPreSelection&&e.props.setPreSelection(r)},e.getEnabledPreSelectionDateForMonth=function(r){if(!Ke(r,e.props))return r;for(var o=Ct(r),i=nx(r),c=xh(i,o),l=null,p=0;p<=c;p++){var u=Je(o,p);if(!Ke(u,e.props)){l=u;break}}return l},e.handleMonthChange=function(r){var o,i,c,l=(o=e.getEnabledPreSelectionDateForMonth(r))!==null&&o!==void 0?o:r;e.handleCustomMonthChange(l),e.props.adjustDateOnChange&&(e.props.onSelect(l),(c=(i=e.props).setOpen)===null||c===void 0||c.call(i,!0)),e.props.setPreSelection&&e.props.setPreSelection(l)},e.handleCustomMonthChange=function(r){var o,i;(i=(o=e.props).onMonthChange)===null||i===void 0||i.call(o,r),e.setState({isRenderAriaLiveMessage:!0})},e.handleMonthYearChange=function(r){e.handleYearChange(r),e.handleMonthChange(r)},e.changeYear=function(r){e.setState(function(o){var i=o.date;return{date:ot(i,Number(r))}},function(){return e.handleYearChange(e.state.date)})},e.changeMonth=function(r){e.setState(function(o){var i=o.date;return{date:He(i,Number(r))}},function(){return e.handleMonthChange(e.state.date)})},e.changeMonthYear=function(r){e.setState(function(o){var i=o.date;return{date:ot(He(i,Ee(r)),ne(r))}},function(){return e.handleMonthYearChange(e.state.date)})},e.header=function(r){r===void 0&&(r=e.state.date);var o=At(r,e.props.locale,e.props.calendarStartDay),i=[];return e.props.showWeekNumbers&&i.push(_.createElement("div",{key:"W",className:"react-datepicker__day-name"},e.props.weekLabel||"#")),i.concat([0,1,2,3,4,5,6].map(function(c){var l=Je(o,c),p=e.formatWeekday(l,e.props.locale),u=e.props.weekDayClassName?e.props.weekDayClassName(l):void 0;return _.createElement("div",{key:c,"aria-label":he(l,"EEEE",e.props.locale),className:_e("react-datepicker__day-name",u)},p)}))},e.formatWeekday=function(r,o){return e.props.formatWeekDay?rx(r,e.props.formatWeekDay,o):e.props.useWeekdaysShort?ox(r,o):ax(r,o)},e.decreaseYear=function(){e.setState(function(r){var o,i=r.date;return{date:Nn(i,e.props.showYearPicker?(o=e.props.yearItemNumber)!==null&&o!==void 0?o:a.defaultProps.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})},e.clearSelectingDate=function(){e.setState({selectingDate:void 0})},e.renderPreviousButton=function(){var r,o,i;if(!e.props.renderCustomHeader){var c=(r=e.props.monthsShown)!==null&&r!==void 0?r:a.defaultProps.monthsShown,l=e.props.showPreviousMonths?c-1:0,p=(o=e.props.monthSelectedIn)!==null&&o!==void 0?o:l,u=rn(e.state.date,p),h;switch(!0){case e.props.showMonthYearPicker:h=Gi(e.state.date,e.props);break;case e.props.showYearPicker:h=dx(e.state.date,e.props);break;case e.props.showQuarterYearPicker:h=cx(e.state.date,e.props);break;default:h=Vi(u,e.props);break}if(!(!((i=e.props.forceShowMonthNavigation)!==null&&i!==void 0?i:a.defaultProps.forceShowMonthNavigation)&&!e.props.showDisabledMonthNavigation&&h||e.props.showTimeSelectOnly)){var x=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],b=["react-datepicker__navigation","react-datepicker__navigation--previous"],y=e.decreaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(y=e.decreaseYear),h&&e.props.showDisabledMonthNavigation&&(b.push("react-datepicker__navigation--previous--disabled"),y=void 0);var w=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,k=e.props,f=k.previousMonthButtonLabel,C=f===void 0?a.defaultProps.previousMonthButtonLabel:f,P=k.previousYearButtonLabel,T=P===void 0?a.defaultProps.previousYearButtonLabel:P,N=e.props,R=N.previousMonthAriaLabel,S=R===void 0?typeof C=="string"?C:"Previous Month":R,D=N.previousYearAriaLabel,j=D===void 0?typeof T=="string"?T:"Previous Year":D;return _.createElement("button",{type:"button",className:b.join(" "),onClick:y,onKeyDown:e.props.handleOnKeyDown,"aria-label":w?j:S},_.createElement("span",{className:x.join(" ")},w?T:C))}}},e.increaseYear=function(){e.setState(function(r){var o,i=r.date;return{date:wt(i,e.props.showYearPicker?(o=e.props.yearItemNumber)!==null&&o!==void 0?o:a.defaultProps.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})},e.renderNextButton=function(){var r;if(!e.props.renderCustomHeader){var o;switch(!0){case e.props.showMonthYearPicker:o=Xi(e.state.date,e.props);break;case e.props.showYearPicker:o=ux(e.state.date,e.props);break;case e.props.showQuarterYearPicker:o=lx(e.state.date,e.props);break;default:o=Ui(e.state.date,e.props);break}if(!(!((r=e.props.forceShowMonthNavigation)!==null&&r!==void 0?r:a.defaultProps.forceShowMonthNavigation)&&!e.props.showDisabledMonthNavigation&&o||e.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],c=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];e.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),e.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=e.increaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(l=e.increaseYear),o&&e.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var p=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,u=e.props,h=u.nextMonthButtonLabel,x=h===void 0?a.defaultProps.nextMonthButtonLabel:h,b=u.nextYearButtonLabel,y=b===void 0?a.defaultProps.nextYearButtonLabel:b,w=e.props,k=w.nextMonthAriaLabel,f=k===void 0?typeof x=="string"?x:"Next Month":k,C=w.nextYearAriaLabel,P=C===void 0?typeof y=="string"?y:"Next Year":C;return _.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:e.props.handleOnKeyDown,"aria-label":p?P:f},_.createElement("span",{className:c.join(" ")},p?y:x))}}},e.renderCurrentMonth=function(r){r===void 0&&(r=e.state.date);var o=["react-datepicker__current-month"];return e.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),e.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),e.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),_.createElement("h2",{className:o.join(" ")},he(r,e.props.dateFormat,e.props.locale))},e.renderYearDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showYearDropdown||r))return _.createElement(Tx,ie({},a.defaultProps,e.props,{date:e.state.date,onChange:e.changeYear,year:ne(e.state.date)}))},e.renderMonthDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showMonthDropdown||r))return _.createElement(Cx,ie({},a.defaultProps,e.props,{month:Ee(e.state.date),onChange:e.changeMonth}))},e.renderMonthYearDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showMonthYearDropdown||r))return _.createElement(_x,ie({},a.defaultProps,e.props,{date:e.state.date,onChange:e.changeMonthYear}))},e.handleTodayButtonClick=function(r){e.props.onSelect(Hi(),r),e.props.setPreSelection&&e.props.setPreSelection(Hi())},e.renderTodayButton=function(){if(!(!e.props.todayButton||e.props.showTimeSelectOnly))return _.createElement("div",{className:"react-datepicker__today-button",onClick:e.handleTodayButtonClick},e.props.todayButton)},e.renderDefaultHeader=function(r){var o=r.monthDate,i=r.i;return _.createElement("div",{className:"react-datepicker__header ".concat(e.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},e.renderCurrentMonth(o),_.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(e.props.dropdownMode),onFocus:e.handleDropdownFocus},e.renderMonthDropdown(i!==0),e.renderMonthYearDropdown(i!==0),e.renderYearDropdown(i!==0)),_.createElement("div",{className:"react-datepicker__day-names"},e.header(o)))},e.renderCustomHeader=function(r){var o,i,c=r.monthDate,l=r.i;if(e.props.showTimeSelect&&!e.state.monthContainer||e.props.showTimeSelectOnly)return null;var p=Vi(e.state.date,e.props),u=Ui(e.state.date,e.props),h=Gi(e.state.date,e.props),x=Xi(e.state.date,e.props),b=!e.props.showMonthYearPicker&&!e.props.showQuarterYearPicker&&!e.props.showYearPicker;return _.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:e.props.onDropdownFocus},(i=(o=e.props).renderCustomHeader)===null||i===void 0?void 0:i.call(o,ie(ie({},e.state),{customHeaderCount:l,monthDate:c,changeMonth:e.changeMonth,changeYear:e.changeYear,decreaseMonth:e.decreaseMonth,increaseMonth:e.increaseMonth,decreaseYear:e.decreaseYear,increaseYear:e.increaseYear,prevMonthButtonDisabled:p,nextMonthButtonDisabled:u,prevYearButtonDisabled:h,nextYearButtonDisabled:x})),b&&_.createElement("div",{className:"react-datepicker__day-names"},e.header(c)))},e.renderYearHeader=function(r){var o=r.monthDate,i=e.props,c=i.showYearPicker,l=i.yearItemNumber,p=l===void 0?a.defaultProps.yearItemNumber:l,u=Rt(o,p),h=u.startPeriod,x=u.endPeriod;return _.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},c?"".concat(h," - ").concat(x):ne(o))},e.renderHeader=function(r){var o=r.monthDate,i=r.i,c=i===void 0?0:i,l={monthDate:o,i:c};switch(!0){case e.props.renderCustomHeader!==void 0:return e.renderCustomHeader(l);case(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker):return e.renderYearHeader(l);default:return e.renderDefaultHeader(l)}},e.renderMonths=function(){var r,o;if(!(e.props.showTimeSelectOnly||e.props.showYearPicker)){for(var i=[],c=(r=e.props.monthsShown)!==null&&r!==void 0?r:a.defaultProps.monthsShown,l=e.props.showPreviousMonths?c-1:0,p=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?wt(e.state.date,l):rn(e.state.date,l),u=(o=e.props.monthSelectedIn)!==null&&o!==void 0?o:l,h=0;h<c;++h){var x=h-u+l,b=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?wt(p,x):et(p,x),y="month-".concat(h),w=h<c-1,k=h>0;i.push(_.createElement("div",{key:y,ref:function(f){e.monthContainer=f??void 0},className:"react-datepicker__month-container"},e.renderHeader({monthDate:b,i:h}),_.createElement(kx,ie({},a.defaultProps,e.props,{ariaLabelPrefix:e.props.monthAriaLabelPrefix,day:b,onDayClick:e.handleDayClick,handleOnKeyDown:e.props.handleOnDayKeyDown,handleOnMonthKeyDown:e.props.handleOnKeyDown,onDayMouseEnter:e.handleDayMouseEnter,onMouseLeave:e.handleMonthMouseLeave,orderInDisplay:h,selectingDate:e.state.selectingDate,monthShowsDuplicateDaysEnd:w,monthShowsDuplicateDaysStart:k}))))}return i}},e.renderYears=function(){if(!e.props.showTimeSelectOnly&&e.props.showYearPicker)return _.createElement("div",{className:"react-datepicker__year--container"},e.renderHeader({monthDate:e.state.date}),_.createElement(Ix,ie({},a.defaultProps,e.props,{selectingDate:e.state.selectingDate,date:e.state.date,onDayClick:e.handleDayClick,clearSelectingDate:e.clearSelectingDate,onYearMouseEnter:e.handleYearMouseEnter,onYearMouseLeave:e.handleYearMouseLeave})))},e.renderTimeSection=function(){if(e.props.showTimeSelect&&(e.state.monthContainer||e.props.showTimeSelectOnly))return _.createElement(jx,ie({},a.defaultProps,e.props,{onChange:e.props.onTimeChange,format:e.props.timeFormat,intervals:e.props.timeIntervals,monthRef:e.state.monthContainer}))},e.renderInputTimeSection=function(){var r=e.props.selected?new Date(e.props.selected):void 0,o=r&&bt(r)&&!!e.props.selected,i=o?"".concat(Zi(r.getHours()),":").concat(Zi(r.getMinutes())):"";if(e.props.showTimeInput)return _.createElement(xx,ie({},a.defaultProps,e.props,{date:r,timeString:i,onChange:e.props.onTimeChange}))},e.renderAriaLiveRegion=function(){var r,o=Rt(e.state.date,(r=e.props.yearItemNumber)!==null&&r!==void 0?r:a.defaultProps.yearItemNumber),i=o.startPeriod,c=o.endPeriod,l;return e.props.showYearPicker?l="".concat(i," - ").concat(c):e.props.showMonthYearPicker||e.props.showQuarterYearPicker?l=ne(e.state.date):l="".concat(go(Ee(e.state.date),e.props.locale)," ").concat(ne(e.state.date)),_.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},e.state.isRenderAriaLiveMessage&&l)},e.renderChildren=function(){if(e.props.children)return _.createElement("div",{className:"react-datepicker__children-container"},e.props.children)},e.containerRef=v.createRef(),e.state={date:e.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},e}return Object.defineProperty(a,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:sr}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){var t=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){t.setState({monthContainer:t.monthContainer})})())},a.prototype.componentDidUpdate=function(t){var e=this;if(this.props.preSelection&&(!oe(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var r=!Pe(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return r&&e.handleCustomMonthChange(e.state.date)})}else this.props.openToDate&&!oe(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},a.prototype.render=function(){var t=this.props.container||Vg;return _.createElement(sa,{onClickOutside:this.handleClickOutside,style:{display:"contents"},containerRef:this.containerRef,ignoreClass:this.props.outsideClickIgnoreClass},_.createElement(t,{className:_e("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))},a})(v.Component),Ox=function(n){var a=n.icon,t=n.className,e=t===void 0?"":t,r=n.onClick,o="react-datepicker__calendar-icon";return typeof a=="string"?_.createElement("i",{className:"".concat(o," ").concat(a," ").concat(e),"aria-hidden":"true",onClick:r}):_.isValidElement(a)?_.cloneElement(a,{className:"".concat(a.props.className||""," ").concat(o," ").concat(e),onClick:function(i){typeof a.props.onClick=="function"&&a.props.onClick(i),typeof r=="function"&&r(i)}}):_.createElement("svg",{className:"".concat(o," ").concat(e),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:r},_.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},ll=(function(n){De(a,n);function a(t){var e=n.call(this,t)||this;return e.portalRoot=null,e.el=document.createElement("div"),e}return a.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},a.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},a.prototype.render=function(){return Gl.createPortal(this.props.children,this.el)},a})(v.Component),Ax="[tabindex], a, button, input, select, textarea",Lx=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},dl=(function(n){De(a,n);function a(t){var e=n.call(this,t)||this;return e.getTabChildren=function(){var r;return Array.prototype.slice.call((r=e.tabLoopRef.current)===null||r===void 0?void 0:r.querySelectorAll(Ax),1,-1).filter(Lx)},e.handleFocusStart=function(){var r=e.getTabChildren();r&&r.length>1&&r[r.length-1].focus()},e.handleFocusEnd=function(){var r=e.getTabChildren();r&&r.length>1&&r[0].focus()},e.tabLoopRef=v.createRef(),e}return a.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:a.defaultProps.enableTabLoop)?_.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},_.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,_.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},a.defaultProps={enableTabLoop:!0},a})(v.Component);function Fx(n){var a=function(t){var e,r=typeof t.hidePopper=="boolean"?t.hidePopper:!0,o=v.useRef(null),i=Qg(ie({open:!r,whileElementsMounted:Cf,placement:t.popperPlacement,middleware:dt([$f({padding:15}),Tf(10),Nf({element:o})],(e=t.popperModifiers)!==null&&e!==void 0?e:[],!0)},t.popperProps)),c=ie(ie({},t),{hidePopper:r,popperProps:ie(ie({},i),{arrowRef:o})});return _.createElement(n,ie({},c))};return a}var Yx=(function(n){De(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(a,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),a.prototype.render=function(){var t=this.props,e=t.className,r=t.wrapperClassName,o=t.hidePopper,i=o===void 0?a.defaultProps.hidePopper:o,c=t.popperComponent,l=t.targetComponent,p=t.enableTabLoop,u=t.popperOnKeyDown,h=t.portalId,x=t.portalHost,b=t.popperProps,y=t.showArrow,w=void 0;if(!i){var k=_e("react-datepicker-popper",e);w=_.createElement(dl,{enableTabLoop:p},_.createElement("div",{ref:b.refs.setFloating,style:b.floatingStyles,className:k,"data-placement":b.placement,onKeyDown:u},c,y&&_.createElement(Yg,{ref:b.arrowRef,context:b.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(w=v.createElement(this.props.popperContainer,{},w)),h&&!i&&(w=_.createElement(ll,{portalId:h,portalHost:x},w));var f=_e("react-datepicker-wrapper",r);return _.createElement(_.Fragment,null,_.createElement("div",{ref:b.refs.setReference,className:f},l),w)},a})(v.Component),Wx=Fx(Yx),os="react-datepicker-ignore-onclickoutside";function Bx(n,a){return n&&a?Ee(n)!==Ee(a)||ne(n)!==ne(a):n!==a}var $a="Date input not valid.",Hx=(function(n){De(a,n);function a(t){var e=n.call(this,t)||this;return e.calendar=null,e.input=null,e.getPreSelection=function(){return e.props.openToDate?e.props.openToDate:e.props.selectsEnd&&e.props.startDate?e.props.startDate:e.props.selectsStart&&e.props.endDate?e.props.endDate:de()},e.modifyHolidays=function(){var r;return(r=e.props.holidays)===null||r===void 0?void 0:r.reduce(function(o,i){var c=new Date(i.date);return bt(c)?dt(dt([],o,!0),[ie(ie({},i),{date:c})],!1):o},[])},e.calcInitialState=function(){var r,o=e.getPreSelection(),i=il(e.props),c=sl(e.props),l=i&&un(o,$r(i))?i:c&&Yt(o,zi(c))?c:o;return{open:e.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(r=e.props.selectsRange?e.props.startDate:e.props.selected)!==null&&r!==void 0?r:l,highlightDates:Ji(e.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},e.resetHiddenStatus=function(){e.setState(ie(ie({},e.state),{wasHidden:!1}))},e.setHiddenStatus=function(){e.setState(ie(ie({},e.state),{wasHidden:!0}))},e.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&e.setHiddenStatus()},e.clearPreventFocusTimeout=function(){e.preventFocusTimeout&&clearTimeout(e.preventFocusTimeout)},e.safeFocus=function(){setTimeout(function(){var r,o;(o=(r=e.input)===null||r===void 0?void 0:r.focus)===null||o===void 0||o.call(r,{preventScroll:!0})},0)},e.safeBlur=function(){setTimeout(function(){var r,o;(o=(r=e.input)===null||r===void 0?void 0:r.blur)===null||o===void 0||o.call(r)},0)},e.setFocus=function(){e.safeFocus()},e.setBlur=function(){e.safeBlur(),e.cancelFocusInput()},e.setOpen=function(r,o){o===void 0&&(o=!1),e.setState({open:r,preSelection:r&&e.state.open?e.state.preSelection:e.calcInitialState().preSelection,lastPreSelectChange:Na},function(){r||e.setState(function(i){return{focused:o?i.focused:!1}},function(){!o&&e.setBlur(),e.setState({inputValue:null})})})},e.inputOk=function(){return kt(e.state.preSelection)},e.isCalendarOpen=function(){return e.props.open===void 0?e.state.open&&!e.props.disabled&&!e.props.readOnly:e.props.open},e.handleFocus=function(r){var o,i,c=e.state.wasHidden,l=c?e.state.open:!0;c&&e.resetHiddenStatus(),!e.state.preventFocus&&l&&((i=(o=e.props).onFocus)===null||i===void 0||i.call(o,r),!e.props.preventOpenOnFocus&&!e.props.readOnly&&e.setOpen(!0)),e.setState({focused:!0})},e.sendFocusBackToInput=function(){e.preventFocusTimeout&&e.clearPreventFocusTimeout(),e.setState({preventFocus:!0},function(){e.preventFocusTimeout=setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})})},e.cancelFocusInput=function(){clearTimeout(e.inputFocusTimeout),e.inputFocusTimeout=void 0},e.deferFocusInput=function(){e.cancelFocusInput(),e.inputFocusTimeout=setTimeout(function(){return e.setFocus()},1)},e.handleDropdownFocus=function(){e.cancelFocusInput()},e.handleBlur=function(r){var o,i;(!e.state.open||e.props.withPortal||e.props.showTimeInput)&&((i=(o=e.props).onBlur)===null||i===void 0||i.call(o,r)),e.setState({focused:!1})},e.handleCalendarClickOutside=function(r){var o,i;e.props.inline||e.setOpen(!1),(i=(o=e.props).onClickOutside)===null||i===void 0||i.call(o,r),e.props.withPortal&&r.preventDefault()},e.handleChange=function(){for(var r,o,i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];var l=i[0];if(!(e.props.onChangeRaw&&(e.props.onChangeRaw.apply(e,i),!l||typeof l.isDefaultPrevented!="function"||l.isDefaultPrevented()))){e.setState({inputValue:(l==null?void 0:l.target)instanceof HTMLInputElement?l.target.value:null,lastPreSelectChange:zx});var p=e.props,u=p.dateFormat,h=u===void 0?a.defaultProps.dateFormat:u,x=p.strictParsing,b=x===void 0?a.defaultProps.strictParsing:x,y=p.selectsRange,w=p.startDate,k=p.endDate,f=(l==null?void 0:l.target)instanceof HTMLInputElement?l.target.value:"";if(y){var C=f.split("-",2).map(function(A){return A.trim()}),P=C[0],T=C[1],N=Pa(P??"",h,e.props.locale,b),R=Pa(T??"",h,e.props.locale,b),S=(w==null?void 0:w.getTime())!==(N==null?void 0:N.getTime()),D=(k==null?void 0:k.getTime())!==(R==null?void 0:R.getTime());if(!S&&!D||N&&Ke(N,e.props)||R&&Ke(R,e.props))return;(o=(r=e.props).onChange)===null||o===void 0||o.call(r,[N,R],l)}else{var j=Pa(f,h,e.props.locale,b,e.props.minDate);e.props.showTimeSelectOnly&&e.props.selected&&j&&!oe(j,e.props.selected)&&(j=Ig(e.props.selected,{hours:ut(j),minutes:pt(j),seconds:Dt(j)})),(j||!f)&&e.setSelected(j,l,!0)}}},e.handleSelect=function(r,o,i){if(e.props.shouldCloseOnSelect&&!e.props.showTimeSelect&&e.sendFocusBackToInput(),e.props.onChangeRaw&&e.props.onChangeRaw(o),e.setSelected(r,o,!1,i),e.props.showDateSelect&&e.setState({isRenderAriaLiveMessage:!0}),!e.props.shouldCloseOnSelect||e.props.showTimeSelect)e.setPreSelection(r);else if(!e.props.inline){e.props.selectsRange||e.setOpen(!1);var c=e.props,l=c.startDate,p=c.endDate;l&&!p&&(e.props.swapRange||!ns(r,l))&&e.setOpen(!1)}},e.setSelected=function(r,o,i,c){var l,p,u=r;if(e.props.showYearPicker){if(u!==null&&Nr(ne(u),e.props))return}else if(e.props.showMonthYearPicker){if(u!==null&&ol(u,e.props))return}else if(u!==null&&Ke(u,e.props))return;var h=e.props,x=h.onChange,b=h.selectsRange,y=h.startDate,w=h.endDate,k=h.selectsMultiple,f=h.selectedDates,C=h.minTime,P=h.swapRange;if(!Zt(e.props.selected,u)||e.props.allowSameDay||b||k)if(u!==null&&(e.props.selected&&(!i||!e.props.showTimeSelect&&!e.props.showTimeSelectOnly&&!e.props.showTimeInput)&&(u=Ea(u,{hour:ut(e.props.selected),minute:pt(e.props.selected),second:Dt(e.props.selected)})),!i&&(e.props.showTimeSelect||e.props.showTimeSelectOnly)&&C&&(u=Ea(u,{hour:C.getHours(),minute:C.getMinutes(),second:C.getSeconds()})),e.props.inline||e.setState({preSelection:u}),e.props.focusSelectedMonth||e.setState({monthSelectedIn:c})),b){var T=!y&&!w,N=y&&!w,R=y&&w;T?x==null||x([u,null],o):N&&(u===null?x==null||x([null,null],o):ns(u,y)?P?x==null||x([u,y],o):x==null||x([u,null],o):x==null||x([y,u],o)),R&&(x==null||x([u,null],o))}else if(k){if(u!==null)if(!(f!=null&&f.length))x==null||x([u],o);else{var S=f.some(function(j){return oe(j,u)});if(S){var D=f.filter(function(j){return!oe(j,u)});x==null||x(D,o)}else x==null||x(dt(dt([],f,!0),[u],!1),o)}}else x==null||x(u,o);i||((p=(l=e.props).onSelect)===null||p===void 0||p.call(l,u,o),e.setState({inputValue:null}))},e.setPreSelection=function(r){var o=kt(e.props.minDate),i=kt(e.props.maxDate),c=!0;if(r){var l=$r(r);if(o&&i)c=Xn(r,e.props.minDate,e.props.maxDate);else if(o){var p=$r(e.props.minDate);c=Yt(r,p)||Zt(l,p)}else if(i){var u=zi(e.props.maxDate);c=un(r,u)||Zt(l,u)}}c&&e.setState({preSelection:r})},e.toggleCalendar=function(){e.setOpen(!e.state.open)},e.handleTimeChange=function(r){var o,i;if(!(e.props.selectsRange||e.props.selectsMultiple)){var c=e.props.selected?e.props.selected:e.getPreSelection(),l=e.props.selected?r:Ea(c,{hour:ut(r),minute:pt(r)});e.setState({preSelection:l}),(i=(o=e.props).onChange)===null||i===void 0||i.call(o,l),e.props.shouldCloseOnSelect&&!e.props.showTimeInput&&(e.sendFocusBackToInput(),e.setOpen(!1)),e.props.showTimeInput&&e.setOpen(!0),(e.props.showTimeSelectOnly||e.props.showTimeSelect)&&e.setState({isRenderAriaLiveMessage:!0}),e.setState({inputValue:null})}},e.onInputClick=function(){var r,o;!e.props.disabled&&!e.props.readOnly&&e.setOpen(!0),(o=(r=e.props).onInputClick)===null||o===void 0||o.call(r)},e.onInputKeyDown=function(r){var o,i,c,l,p,u;(i=(o=e.props).onKeyDown)===null||i===void 0||i.call(o,r);var h=r.key;if(!e.state.open&&!e.props.inline&&!e.props.preventOpenOnFocus){(h===L.ArrowDown||h===L.ArrowUp||h===L.Enter)&&((c=e.onInputClick)===null||c===void 0||c.call(e));return}if(e.state.open){if(h===L.ArrowDown||h===L.ArrowUp){r.preventDefault();var x=e.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":e.props.showWeekPicker&&e.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':e.props.showFullMonthYearPicker||e.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',b=((l=e.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&e.calendar.containerRef.current.querySelector(x);b instanceof HTMLElement&&b.focus({preventScroll:!0});return}var y=de(e.state.preSelection);h===L.Enter?(r.preventDefault(),r.target.blur(),e.inputOk()&&e.state.lastPreSelectChange===Na?(e.handleSelect(y,r),!e.props.shouldCloseOnSelect&&e.setPreSelection(y)):e.setOpen(!1)):h===L.Escape?(r.preventDefault(),r.target.blur(),e.sendFocusBackToInput(),e.setOpen(!1)):h===L.Tab&&e.setOpen(!1),e.inputOk()||(u=(p=e.props).onInputError)===null||u===void 0||u.call(p,{code:1,msg:$a})}},e.onPortalKeyDown=function(r){var o=r.key;o===L.Escape&&(r.preventDefault(),e.setState({preventFocus:!0},function(){e.setOpen(!1),setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})}))},e.onDayKeyDown=function(r){var o,i,c,l,p,u,h=e.props,x=h.minDate,b=h.maxDate,y=h.disabledKeyboardNavigation,w=h.showWeekPicker,k=h.shouldCloseOnSelect,f=h.locale,C=h.calendarStartDay,P=h.adjustDateOnChange,T=h.inline;if((i=(o=e.props).onKeyDown)===null||i===void 0||i.call(o,r),!y){var N=r.key,R=r.shiftKey,S=de(e.state.preSelection),D=function(z,E){var B=E;switch(z){case L.ArrowRight:B=w?Yr(E,1):Je(E,1);break;case L.ArrowLeft:B=w?Fi(E):pg(E);break;case L.ArrowUp:B=Fi(E);break;case L.ArrowDown:B=Yr(E,1);break;case L.PageUp:B=R?Nn(E,1):rn(E,1);break;case L.PageDown:B=R?wt(E,1):et(E,1);break;case L.Home:B=At(E,f,C);break;case L.End:B=tx(E);break}return B},j=function(z,E){for(var B=40,M=z,X=!1,q=0,Z=D(z,E);!X;){if(q>=B){Z=E;break}x&&Z<x&&(M=L.ArrowRight,Z=Ke(x,e.props)?D(M,Z):x),b&&Z>b&&(M=L.ArrowLeft,Z=Ke(b,e.props)?D(M,Z):b),Ke(Z,e.props)?((M===L.PageUp||M===L.Home)&&(M=L.ArrowRight),(M===L.PageDown||M===L.End)&&(M=L.ArrowLeft),Z=D(M,Z)):X=!0,q++}return Z};if(N===L.Enter){r.preventDefault(),e.handleSelect(S,r),!k&&e.setPreSelection(S);return}else if(N===L.Escape){r.preventDefault(),e.setOpen(!1),e.inputOk()||(l=(c=e.props).onInputError)===null||l===void 0||l.call(c,{code:1,msg:$a});return}var A=null;switch(N){case L.ArrowLeft:case L.ArrowRight:case L.ArrowUp:case L.ArrowDown:case L.PageUp:case L.PageDown:case L.Home:case L.End:A=j(N,S);break}if(!A){(u=(p=e.props).onInputError)===null||u===void 0||u.call(p,{code:1,msg:$a});return}if(r.preventDefault(),e.setState({lastPreSelectChange:Na}),P&&e.setSelected(A),e.setPreSelection(A),T){var H=Ee(S),F=Ee(A),K=ne(S),G=ne(A);H!==F||K!==G?e.setState({shouldFocusDayInline:!0}):e.setState({shouldFocusDayInline:!1})}}},e.onPopperKeyDown=function(r){var o=r.key;o===L.Escape&&(r.preventDefault(),e.sendFocusBackToInput())},e.onClearClick=function(r){r&&r.preventDefault&&r.preventDefault(),e.sendFocusBackToInput();var o=e.props,i=o.selectsRange,c=o.onChange;i?c==null||c([null,null],r):c==null||c(null,r),e.setState({inputValue:null})},e.clear=function(){e.onClearClick()},e.onScroll=function(r){typeof e.props.closeOnScroll=="boolean"&&e.props.closeOnScroll?(r.target===document||r.target===document.documentElement||r.target===document.body)&&e.setOpen(!1):typeof e.props.closeOnScroll=="function"&&e.props.closeOnScroll(r)&&e.setOpen(!1)},e.renderCalendar=function(){var r,o;return!e.props.inline&&!e.isCalendarOpen()?null:_.createElement(Rx,ie({showMonthYearDropdown:void 0,ref:function(i){e.calendar=i}},e.props,e.state,{setOpen:e.setOpen,dateFormat:(r=e.props.dateFormatCalendar)!==null&&r!==void 0?r:a.defaultProps.dateFormatCalendar,onSelect:e.handleSelect,onClickOutside:e.handleCalendarClickOutside,holidays:fx(e.modifyHolidays()),outsideClickIgnoreClass:os,onDropdownFocus:e.handleDropdownFocus,onTimeChange:e.handleTimeChange,className:e.props.calendarClassName,container:e.props.calendarContainer,handleOnKeyDown:e.props.onKeyDown,handleOnDayKeyDown:e.onDayKeyDown,setPreSelection:e.setPreSelection,dropdownMode:(o=e.props.dropdownMode)!==null&&o!==void 0?o:a.defaultProps.dropdownMode}),e.props.children)},e.renderAriaLiveRegion=function(){var r=e.props,o=r.dateFormat,i=o===void 0?a.defaultProps.dateFormat:o,c=r.locale,l=e.props.showTimeInput||e.props.showTimeSelect,p=l?"PPPPp":"PPPP",u;return e.props.selectsRange?u="Selected start date: ".concat(qe(e.props.startDate,{dateFormat:p,locale:c}),". ").concat(e.props.endDate?"End date: "+qe(e.props.endDate,{dateFormat:p,locale:c}):""):e.props.showTimeSelectOnly?u="Selected time: ".concat(qe(e.props.selected,{dateFormat:i,locale:c})):e.props.showYearPicker?u="Selected year: ".concat(qe(e.props.selected,{dateFormat:"yyyy",locale:c})):e.props.showMonthYearPicker?u="Selected month: ".concat(qe(e.props.selected,{dateFormat:"MMMM yyyy",locale:c})):e.props.showQuarterYearPicker?u="Selected quarter: ".concat(qe(e.props.selected,{dateFormat:"yyyy, QQQ",locale:c})):u="Selected date: ".concat(qe(e.props.selected,{dateFormat:p,locale:c})),_.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},u)},e.renderDateInput=function(){var r,o,i,c=_e(e.props.className,(r={},r[os]=e.state.open,r)),l=e.props.customInput||_.createElement("input",{type:"text"}),p=e.props.customInputRef||"ref",u=e.props,h=u.dateFormat,x=h===void 0?a.defaultProps.dateFormat:h,b=u.locale,y=typeof e.props.value=="string"?e.props.value:typeof e.state.inputValue=="string"?e.state.inputValue:e.props.selectsRange?Xg(e.props.startDate,e.props.endDate,{dateFormat:x,locale:b}):e.props.selectsMultiple?Jg((i=e.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:x,locale:b}):qe(e.props.selected,{dateFormat:x,locale:b});return v.cloneElement(l,(o={},o[p]=function(w){e.input=w},o.value=y,o.onBlur=e.handleBlur,o.onChange=e.handleChange,o.onClick=e.onInputClick,o.onFocus=e.handleFocus,o.onKeyDown=e.onInputKeyDown,o.id=e.props.id,o.name=e.props.name,o.form=e.props.form,o.autoFocus=e.props.autoFocus,o.placeholder=e.props.placeholderText,o.disabled=e.props.disabled,o.autoComplete=e.props.autoComplete,o.className=_e(l.props.className,c),o.title=e.props.title,o.readOnly=e.props.readOnly,o.required=e.props.required,o.tabIndex=e.props.tabIndex,o["aria-describedby"]=e.props.ariaDescribedBy,o["aria-invalid"]=e.props.ariaInvalid,o["aria-labelledby"]=e.props.ariaLabelledBy,o["aria-required"]=e.props.ariaRequired,o))},e.renderClearButton=function(){var r=e.props,o=r.isClearable,i=r.disabled,c=r.selected,l=r.startDate,p=r.endDate,u=r.clearButtonTitle,h=r.clearButtonClassName,x=h===void 0?"":h,b=r.ariaLabelClose,y=b===void 0?"Close":b,w=r.selectedDates;return o&&(c!=null||l!=null||p!=null||w!=null&&w.length)?_.createElement("button",{type:"button",className:_e("react-datepicker__close-icon",x,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":y,onClick:e.onClearClick,title:u,tabIndex:-1}):null},e.state=e.calcInitialState(),e.preventFocusTimeout=void 0,e}return Object.defineProperty(a,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:sr,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},a.prototype.componentDidUpdate=function(t,e){var r,o,i,c;t.inline&&Bx(t.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&t.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),t.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Ji(this.props.highlightDates)}),!e.focused&&!Zt(t.selected,this.props.selected)&&this.setState({inputValue:null}),e.open!==this.state.open&&(e.open===!1&&this.state.open===!0&&((o=(r=this.props).onCalendarOpen)===null||o===void 0||o.call(r)),e.open===!0&&this.state.open===!1&&((c=(i=this.props).onCalendarClose)===null||c===void 0||c.call(i)))},a.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},a.prototype.renderInputContainer=function(){var t=this.props,e=t.showIcon,r=t.icon,o=t.calendarIconClassname,i=t.calendarIconClassName,c=t.toggleCalendarOnIconClick,l=this.state.open;return o&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),_.createElement("div",{className:"react-datepicker__input-container".concat(e?" react-datepicker__view-calendar-icon":"")},e&&_.createElement(Ox,ie({icon:r,className:_e(i,!i&&o,l&&"react-datepicker-ignore-onclickoutside")},c?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},a.prototype.render=function(){var t=this.renderCalendar();if(this.props.inline)return t;if(this.props.withPortal){var e=this.state.open?_.createElement(dl,{enableTabLoop:this.props.enableTabLoop},_.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(e=_.createElement(ll,ie({portalId:this.props.portalId},this.props),e)),_.createElement("div",null,this.renderInputContainer(),e)}return _.createElement(Wx,ie({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},a})(v.Component),zx="input",Na="navigate";function ca(n){return!!n&&!ud(n.providerType)}function qx(){const{data:n}=ye({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:pd,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return n===!0}const is=g.div`
|
|
374
|
+
position: fixed;
|
|
375
|
+
inset: 0;
|
|
376
|
+
z-index: 10000;
|
|
377
|
+
display: flex;
|
|
378
|
+
align-items: center;
|
|
379
|
+
justify-content: center;
|
|
380
|
+
padding: 16px;
|
|
381
|
+
background: rgba(22, 21, 24, 0.55);
|
|
382
|
+
`,ss=g.div`
|
|
383
|
+
width: 560px;
|
|
384
|
+
max-width: 100%;
|
|
385
|
+
max-height: 92vh;
|
|
386
|
+
overflow-y: auto;
|
|
387
|
+
background: ${d.colors.white};
|
|
388
|
+
border-radius: 16px;
|
|
389
|
+
padding: 12px 16px 16px;
|
|
390
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
391
|
+
display: flex;
|
|
392
|
+
flex-direction: column;
|
|
393
|
+
gap: 24px;
|
|
394
|
+
`,cs=g.div`
|
|
395
|
+
display: flex;
|
|
396
|
+
align-items: center;
|
|
397
|
+
justify-content: space-between;
|
|
398
|
+
gap: 8px;
|
|
399
|
+
padding-bottom: 16px;
|
|
400
|
+
border-bottom: 1px solid ${d.colors.gray4};
|
|
401
|
+
`,ls=g.h2`
|
|
402
|
+
margin: 0;
|
|
403
|
+
font-family: ${d.font.sans};
|
|
404
|
+
font-weight: 600;
|
|
405
|
+
font-size: 20px;
|
|
406
|
+
line-height: 1.6;
|
|
407
|
+
color: ${d.colors.text};
|
|
408
|
+
`,ds=g.button`
|
|
409
|
+
flex: none;
|
|
410
|
+
display: grid;
|
|
411
|
+
place-items: center;
|
|
412
|
+
width: 24px;
|
|
413
|
+
height: 24px;
|
|
414
|
+
border: 0;
|
|
415
|
+
background: none;
|
|
416
|
+
cursor: pointer;
|
|
417
|
+
color: ${d.colors.text};
|
|
418
|
+
|
|
419
|
+
.ico {
|
|
420
|
+
width: 18px;
|
|
421
|
+
height: 18px;
|
|
422
|
+
}
|
|
423
|
+
&:disabled {
|
|
424
|
+
opacity: 0.4;
|
|
425
|
+
cursor: default;
|
|
426
|
+
}
|
|
427
|
+
&:focus-visible {
|
|
428
|
+
outline: 2px solid ${d.colors.accent};
|
|
429
|
+
outline-offset: 2px;
|
|
430
|
+
}
|
|
431
|
+
`,Kx=g.p`
|
|
432
|
+
margin: 0;
|
|
433
|
+
font-family: ${d.font.sans};
|
|
434
|
+
font-size: 14px;
|
|
435
|
+
line-height: 1.57;
|
|
436
|
+
color: ${d.colors.text};
|
|
437
|
+
text-align: left;
|
|
438
|
+
`,Qx=g.div`
|
|
439
|
+
display: flex;
|
|
440
|
+
align-items: center;
|
|
441
|
+
gap: 12px;
|
|
442
|
+
`,Vx=g.div`
|
|
443
|
+
flex: none;
|
|
444
|
+
display: grid;
|
|
445
|
+
place-items: center;
|
|
446
|
+
width: 180px;
|
|
447
|
+
height: 180px;
|
|
448
|
+
border-radius: 16px;
|
|
449
|
+
background: ${d.colors.media};
|
|
450
|
+
border: 1px solid ${d.colors.gray4};
|
|
451
|
+
overflow: hidden;
|
|
452
|
+
|
|
453
|
+
img {
|
|
454
|
+
width: 150px;
|
|
455
|
+
height: 150px;
|
|
456
|
+
object-fit: contain;
|
|
457
|
+
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
${d.media.maxWidth("mobile")} {
|
|
461
|
+
width: 120px;
|
|
462
|
+
height: 120px;
|
|
463
|
+
|
|
464
|
+
img {
|
|
465
|
+
width: 100px;
|
|
466
|
+
height: 100px;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
`,Ux=g.div`
|
|
470
|
+
flex: 1 1 0;
|
|
471
|
+
min-width: 0;
|
|
472
|
+
display: flex;
|
|
473
|
+
flex-direction: column;
|
|
474
|
+
gap: 4px;
|
|
475
|
+
padding: 8px;
|
|
476
|
+
`,Gx=g.p`
|
|
477
|
+
margin: 0;
|
|
478
|
+
font-family: ${d.font.sans};
|
|
479
|
+
font-weight: 600;
|
|
480
|
+
font-size: 20px;
|
|
481
|
+
line-height: 1.57;
|
|
482
|
+
color: ${d.colors.text};
|
|
483
|
+
`,Xx=g.p`
|
|
484
|
+
margin: 0;
|
|
485
|
+
font-family: ${d.font.sans};
|
|
486
|
+
font-size: 10px;
|
|
487
|
+
line-height: 1.43;
|
|
488
|
+
color: ${d.colors.muted};
|
|
489
|
+
`,Jx=g.div`
|
|
490
|
+
display: flex;
|
|
491
|
+
gap: 12px;
|
|
492
|
+
|
|
493
|
+
${d.media.maxWidth("mobile")} {
|
|
494
|
+
flex-direction: column;
|
|
495
|
+
}
|
|
496
|
+
`,us=g.label`
|
|
497
|
+
flex: 1 1 0;
|
|
498
|
+
min-width: 0;
|
|
499
|
+
display: flex;
|
|
500
|
+
flex-direction: column;
|
|
501
|
+
gap: 4px;
|
|
502
|
+
`,ps=g.span`
|
|
503
|
+
font-family: ${d.font.sans};
|
|
504
|
+
font-size: 12px;
|
|
505
|
+
color: ${d.colors.muted};
|
|
506
|
+
`,Zx=g.div`
|
|
507
|
+
display: flex;
|
|
508
|
+
align-items: center;
|
|
509
|
+
justify-content: space-between;
|
|
510
|
+
gap: 4px;
|
|
511
|
+
height: 42px;
|
|
512
|
+
padding: 0 8px;
|
|
513
|
+
border: 0.5px solid ${d.colors.text};
|
|
514
|
+
border-radius: 8px;
|
|
515
|
+
background: ${d.colors.white};
|
|
516
|
+
|
|
517
|
+
&:focus-within {
|
|
518
|
+
border-color: ${d.colors.magenta};
|
|
519
|
+
}
|
|
520
|
+
&[aria-invalid='true'] {
|
|
521
|
+
border-color: ${d.colors.err};
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.ccy {
|
|
525
|
+
flex: none;
|
|
526
|
+
width: 22px;
|
|
527
|
+
height: 22px;
|
|
528
|
+
color: ${d.colors.rarity};
|
|
529
|
+
}
|
|
530
|
+
.cal {
|
|
531
|
+
flex: none;
|
|
532
|
+
width: 18px;
|
|
533
|
+
height: 18px;
|
|
534
|
+
color: ${d.colors.text};
|
|
535
|
+
}
|
|
536
|
+
`,ey=g.input`
|
|
537
|
+
flex: 1 1 auto;
|
|
538
|
+
min-width: 0;
|
|
539
|
+
border: 0;
|
|
540
|
+
outline: none;
|
|
541
|
+
background: transparent;
|
|
542
|
+
font-family: ${d.font.sans};
|
|
543
|
+
font-size: 13px;
|
|
544
|
+
color: ${d.colors.text};
|
|
545
|
+
|
|
546
|
+
&::placeholder {
|
|
547
|
+
color: ${d.colors.muted2};
|
|
548
|
+
}
|
|
549
|
+
/* Strip the number spinners — the glyph + USD hint carry the affordance. */
|
|
550
|
+
&::-webkit-outer-spin-button,
|
|
551
|
+
&::-webkit-inner-spin-button {
|
|
552
|
+
-webkit-appearance: none;
|
|
553
|
+
margin: 0;
|
|
554
|
+
}
|
|
555
|
+
&[type='number'] {
|
|
556
|
+
-moz-appearance: textfield;
|
|
557
|
+
appearance: textfield;
|
|
558
|
+
}
|
|
559
|
+
`,ty=g.span`
|
|
560
|
+
flex: none;
|
|
561
|
+
font-family: ${d.font.sans};
|
|
562
|
+
font-size: 10px;
|
|
563
|
+
color: ${d.colors.muted2};
|
|
564
|
+
`,ny=g.div`
|
|
565
|
+
.react-datepicker-wrapper {
|
|
566
|
+
display: block;
|
|
567
|
+
width: 100%;
|
|
568
|
+
}
|
|
569
|
+
.react-datepicker__input-container {
|
|
570
|
+
display: flex;
|
|
571
|
+
align-items: center;
|
|
572
|
+
}
|
|
573
|
+
.react-datepicker__input-container input {
|
|
574
|
+
width: 100%;
|
|
575
|
+
height: 42px;
|
|
576
|
+
padding: 0 8px;
|
|
577
|
+
border: 0.5px solid ${d.colors.text};
|
|
578
|
+
border-radius: 8px;
|
|
579
|
+
background: ${d.colors.white};
|
|
580
|
+
font-family: ${d.font.sans};
|
|
581
|
+
font-size: 13px;
|
|
582
|
+
color: ${d.colors.text};
|
|
583
|
+
outline: none;
|
|
584
|
+
}
|
|
585
|
+
.react-datepicker__input-container input:focus {
|
|
586
|
+
border-color: ${d.colors.magenta};
|
|
587
|
+
}
|
|
588
|
+
&[data-invalid='true'] .react-datepicker__input-container input {
|
|
589
|
+
border-color: ${d.colors.err};
|
|
590
|
+
}
|
|
591
|
+
/* The showIcon calendar glyph inside the field. */
|
|
592
|
+
.react-datepicker__calendar-icon {
|
|
593
|
+
fill: ${d.colors.text};
|
|
594
|
+
opacity: 0.85;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/* ---- Calendar popup: white / on-brand (override react-datepicker defaults) ---- */
|
|
598
|
+
.react-datepicker-popper {
|
|
599
|
+
z-index: 40;
|
|
600
|
+
}
|
|
601
|
+
.react-datepicker {
|
|
602
|
+
font-family: ${d.font.sans};
|
|
603
|
+
font-size: 13px;
|
|
604
|
+
color: ${d.colors.text};
|
|
605
|
+
background: ${d.colors.white};
|
|
606
|
+
border: 1px solid rgba(22, 21, 24, 0.1);
|
|
607
|
+
border-radius: 12px;
|
|
608
|
+
box-shadow: 0 12px 32px rgba(22, 21, 24, 0.14);
|
|
609
|
+
overflow: hidden;
|
|
610
|
+
}
|
|
611
|
+
.react-datepicker__triangle {
|
|
612
|
+
display: none;
|
|
613
|
+
}
|
|
614
|
+
.react-datepicker__header {
|
|
615
|
+
background: ${d.colors.white};
|
|
616
|
+
border-bottom: 1px solid rgba(22, 21, 24, 0.1);
|
|
617
|
+
padding-top: 12px;
|
|
618
|
+
}
|
|
619
|
+
.react-datepicker__current-month {
|
|
620
|
+
color: ${d.colors.text};
|
|
621
|
+
font-weight: 600;
|
|
622
|
+
font-size: 14px;
|
|
623
|
+
}
|
|
624
|
+
.react-datepicker__day-name {
|
|
625
|
+
color: ${d.colors.muted2};
|
|
626
|
+
}
|
|
627
|
+
.react-datepicker__day {
|
|
628
|
+
color: ${d.colors.text};
|
|
629
|
+
border-radius: 8px;
|
|
630
|
+
}
|
|
631
|
+
.react-datepicker__day:hover {
|
|
632
|
+
background: rgba(105, 31, 169, 0.1);
|
|
633
|
+
}
|
|
634
|
+
.react-datepicker__day--selected,
|
|
635
|
+
.react-datepicker__day--keyboard-selected {
|
|
636
|
+
background: ${d.colors.accent};
|
|
637
|
+
color: ${d.colors.white};
|
|
638
|
+
}
|
|
639
|
+
.react-datepicker__day--today {
|
|
640
|
+
font-weight: 700;
|
|
641
|
+
}
|
|
642
|
+
.react-datepicker__day--disabled {
|
|
643
|
+
color: ${d.colors.muted2};
|
|
644
|
+
opacity: 0.5;
|
|
645
|
+
}
|
|
646
|
+
.react-datepicker__navigation-icon::before {
|
|
647
|
+
border-color: ${d.colors.accent};
|
|
648
|
+
}
|
|
649
|
+
.react-datepicker__today-button {
|
|
650
|
+
background: ${d.colors.white};
|
|
651
|
+
border-top: 1px solid rgba(22, 21, 24, 0.1);
|
|
652
|
+
color: ${d.colors.accent};
|
|
653
|
+
font-weight: 600;
|
|
654
|
+
padding: 10px;
|
|
655
|
+
}
|
|
656
|
+
`,ry=g.button`
|
|
657
|
+
width: 100%;
|
|
658
|
+
height: 48px;
|
|
659
|
+
border: 0;
|
|
660
|
+
border-radius: 16px;
|
|
661
|
+
cursor: pointer;
|
|
662
|
+
background: ${d.colors.accent};
|
|
663
|
+
color: ${d.colors.white};
|
|
664
|
+
font-family: ${d.font.sans};
|
|
665
|
+
font-weight: 600;
|
|
666
|
+
font-size: 15px;
|
|
667
|
+
line-height: 24px;
|
|
668
|
+
letter-spacing: 0.46px;
|
|
669
|
+
text-transform: uppercase;
|
|
670
|
+
|
|
671
|
+
&:hover:not(:disabled) {
|
|
672
|
+
background: ${d.colors.accentHover};
|
|
673
|
+
}
|
|
674
|
+
&:focus-visible {
|
|
675
|
+
outline: 2px solid ${d.colors.accent};
|
|
676
|
+
outline-offset: 2px;
|
|
677
|
+
}
|
|
678
|
+
&:disabled {
|
|
679
|
+
cursor: not-allowed;
|
|
680
|
+
background: rgba(105, 31, 169, 0.2);
|
|
681
|
+
color: ${d.colors.white};
|
|
682
|
+
}
|
|
683
|
+
`;g.p`
|
|
684
|
+
margin: 0;
|
|
685
|
+
font-family: ${d.font.sans};
|
|
686
|
+
font-size: 13px;
|
|
687
|
+
color: ${d.colors.muted};
|
|
688
|
+
text-align: center;
|
|
689
|
+
`;const ay=g.p`
|
|
690
|
+
margin: 0;
|
|
691
|
+
font-family: ${d.font.sans};
|
|
692
|
+
font-size: 12px;
|
|
693
|
+
line-height: 1.5;
|
|
694
|
+
color: ${d.colors.muted};
|
|
695
|
+
`,oy=g.div`
|
|
696
|
+
display: flex;
|
|
697
|
+
flex-direction: column;
|
|
698
|
+
align-items: center;
|
|
699
|
+
gap: 16px;
|
|
700
|
+
padding: 24px 16px;
|
|
701
|
+
border-radius: 16px;
|
|
702
|
+
background: rgba(193, 238, 207, 0.5);
|
|
703
|
+
text-align: center;
|
|
704
|
+
`,iy=g.div`
|
|
705
|
+
display: grid;
|
|
706
|
+
place-items: center;
|
|
707
|
+
width: 64px;
|
|
708
|
+
height: 64px;
|
|
709
|
+
border-radius: 50%;
|
|
710
|
+
background: ${d.colors.ok};
|
|
711
|
+
color: ${d.colors.white};
|
|
712
|
+
|
|
713
|
+
.ico {
|
|
714
|
+
width: 34px;
|
|
715
|
+
height: 34px;
|
|
716
|
+
}
|
|
717
|
+
`,sy=g.p`
|
|
718
|
+
margin: 0;
|
|
719
|
+
font-family: ${d.font.sans};
|
|
720
|
+
font-size: 20px;
|
|
721
|
+
line-height: 1.334;
|
|
722
|
+
color: ${d.colors.text2};
|
|
723
|
+
|
|
724
|
+
b {
|
|
725
|
+
font-weight: 700;
|
|
726
|
+
}
|
|
727
|
+
`,cy=g.div`
|
|
728
|
+
display: flex;
|
|
729
|
+
gap: 12px;
|
|
730
|
+
|
|
731
|
+
${d.media.maxWidth("mobile")} {
|
|
732
|
+
flex-direction: column-reverse;
|
|
733
|
+
}
|
|
734
|
+
`,ly=g.button`
|
|
735
|
+
flex: 1 1 0;
|
|
736
|
+
height: 48px;
|
|
737
|
+
border: 2px solid ${d.colors.accent};
|
|
738
|
+
border-radius: 12px;
|
|
739
|
+
background: transparent;
|
|
740
|
+
color: ${d.colors.accent};
|
|
741
|
+
cursor: pointer;
|
|
742
|
+
font-family: ${d.font.sans};
|
|
743
|
+
font-weight: 600;
|
|
744
|
+
font-size: 13px;
|
|
745
|
+
line-height: 24px;
|
|
746
|
+
letter-spacing: 0.46px;
|
|
747
|
+
text-transform: uppercase;
|
|
748
|
+
|
|
749
|
+
&:hover {
|
|
750
|
+
background: rgba(105, 31, 169, 0.06);
|
|
751
|
+
}
|
|
752
|
+
&:focus-visible {
|
|
753
|
+
outline: 2px solid ${d.colors.accent};
|
|
754
|
+
outline-offset: 2px;
|
|
755
|
+
}
|
|
756
|
+
`,dy=g.button`
|
|
757
|
+
flex: 1 1 0;
|
|
758
|
+
height: 48px;
|
|
759
|
+
border: 0;
|
|
760
|
+
border-radius: 12px;
|
|
761
|
+
background: ${d.colors.accent};
|
|
762
|
+
color: ${d.colors.softWhite};
|
|
763
|
+
cursor: pointer;
|
|
764
|
+
font-family: ${d.font.sans};
|
|
765
|
+
font-weight: 600;
|
|
766
|
+
font-size: 13px;
|
|
767
|
+
line-height: 24px;
|
|
768
|
+
letter-spacing: 0.46px;
|
|
769
|
+
text-transform: uppercase;
|
|
770
|
+
|
|
771
|
+
&:hover {
|
|
772
|
+
background: ${d.colors.accentHover};
|
|
773
|
+
}
|
|
774
|
+
&:focus-visible {
|
|
775
|
+
outline: 2px solid ${d.colors.accent};
|
|
776
|
+
outline-offset: 2px;
|
|
777
|
+
}
|
|
778
|
+
`,uy=30;function fs(n){const a=new Date;return a.setHours(0,0,0,0),a.setDate(a.getDate()+n),a}function py({asset:n,session:a,creator:t,onListed:e,onClose:r}){const o=fn(),i=pn(),c=qx(),{data:l}=ye({queryKey:["collection-meta",n.contractAddress],enabled:!t&&!!n.contractAddress,staleTime:5*6e4,queryFn:()=>fc(n.contractAddress)}),p=t||(l==null?void 0:l.creator),{data:u}=Gr(p),h=p?u!=null&&u.name?Xr(u.name):ro(p):null,[x,b]=v.useState("10"),[y,w]=v.useState(()=>fs(uy)),[k,f]=v.useState(null),[C,P]=v.useState(!1),[T,N]=v.useState(null),[R,S]=v.useState("form"),D=ca(a),j=Number(x),A=Number.isInteger(j)&&j>0,H=y?y.getTime():NaN,F=!!y&&H>Date.now(),K=fs(1),G=A?`$${en(j).toFixed(2)}`:"$0";async function z(){if(f(null),!A){f(m("sellModal.errorWholeNumber"));return}if(!F){f(m("sellModal.invalidDate"));return}if(!D){P(!0);try{const M=ei(n.contractAddress,n.chainId),X=await wc(M,a.address);if(P(!1),!X){S("authorize");return}}catch{P(!1)}}await E()}async function E(){if(f(null),!A){f(m("sellModal.errorWholeNumber"));return}if(!F){f(m("sellModal.invalidDate"));return}P(!0);try{await tp({signer:a.signer,contractAddress:n.contractAddress,chainId:n.chainId});const M=await np({signer:a.signer,nft:{contractAddress:n.contractAddress,tokenId:n.tokenId,network:n.network,chainId:n.chainId},usdPrice:en(j),expiresAtMs:H}),X=await pc(M,a.identity);N(j),fe("Shop Listed Item",{item_id:n.itemId??n.tokenId??null,contract_address:n.contractAddress,price_credits:j,price_usd:en(j),listing_type:"secondary",is_primary:!1}),or.success(m("sellModal.toastOnSale",{name:n.name})),o.invalidateQueries({queryKey:["my-assets",a.address]}),e==null||e(j,X==null?void 0:X.id)}catch(M){Me(M,{flow:"list_secondary"}),fe("Shop Listing Failed",{listing_type:"secondary",error_code:Qe(M)}),f(sn(M,m("sellModal.errorGeneric")))}finally{P(!1)}}function B(){r(),i("/my-items")}return T!==null?s.jsx(is,{onClick:r,role:"presentation",children:s.jsxs(ss,{onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("sellModal.successHeader"),children:[s.jsxs(cs,{children:[s.jsx(ls,{children:m("sellModal.successHeader")}),s.jsx(ds,{onClick:r,"aria-label":m("getCredits.done"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsxs(oy,{children:[s.jsx(iy,{"aria-hidden":!0,children:s.jsx(V,{name:"check",className:"ico"})}),s.jsxs(sy,{children:[s.jsx("b",{children:m("sellModal.successOnSale")})," ",m("sellModal.successManage")]})]}),s.jsxs(cy,{children:[s.jsx(ly,{onClick:B,children:m("sellModal.myItems")}),s.jsx(dy,{onClick:r,children:m("getCredits.done")})]})]})}):R==="authorize"?s.jsx(bc,{auth:ei(n.contractAddress,n.chainId),signer:a.signer,title:m("authorizeStep.sellTitle"),name:n.name,image:n.image,icon:s.jsx(V,{name:"pen",className:"ico"}),reason:m("authorizeStep.sellReason",{name:n.name}),onAuthorized:()=>{S("form"),E()},onCancel:()=>S("form"),onClose:r}):s.jsx(is,{onClick:C?void 0:r,role:"presentation",children:s.jsxs(ss,{"data-testid":"modal",onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("sellModal.sellProduct"),children:[s.jsxs(cs,{children:[s.jsx(ls,{children:m("sellModal.sellProduct")}),s.jsx(ds,{onClick:r,disabled:C,"aria-label":m("sellModal.cancel"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsx(Kx,{children:m("sellModal.subtitle")}),s.jsxs(Qx,{children:[s.jsx(Vx,{children:n.image?s.jsx("img",{src:n.image,alt:""}):null}),s.jsxs(Ux,{children:[s.jsx(Gx,{children:n.name}),h?s.jsx(Xx,{children:m("sellModal.byCreator",{name:h})}):null]})]}),s.jsxs(Jx,{children:[s.jsxs(us,{children:[s.jsx(ps,{children:m("sellModal.priceShort")}),s.jsxs(Zx,{"aria-invalid":x.length>0&&!A,children:[s.jsx(Oe,{className:"ccy"}),s.jsx(ey,{type:"number",min:"1",step:"1",inputMode:"numeric",value:x,onChange:M=>b(M.target.value),disabled:C,"aria-label":m("sellModal.priceLabel",{currency:"credits"})}),s.jsx(ty,{"aria-hidden":!0,children:G})]})]}),s.jsxs(us,{children:[s.jsx(ps,{children:m("sellModal.expirationLabel")}),s.jsx(ny,{"data-invalid":!!y&&!F,children:s.jsx(Hx,{selected:y,onChange:w,minDate:K,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:C,showIcon:!0,showPopperArrow:!1,todayButton:m("sellModal.today"),ariaLabelledBy:void 0,"aria-label":m("sellModal.expirationLabel")})})]})]}),c&&A?s.jsx(ay,{children:m("sellModal.proceedsCredits",{count:j})}):null,s.jsx(Ft,{message:k}),s.jsx(ry,{onClick:()=>void z(),disabled:C||!A||!F,children:C?D?m("sellModal.puttingOnSale"):m("sellModal.confirmListing"):m("sellModal.putUpForSale")})]})})}const fy=g.div`
|
|
779
|
+
position: fixed;
|
|
780
|
+
inset: 0;
|
|
781
|
+
z-index: 10000;
|
|
782
|
+
display: flex;
|
|
783
|
+
align-items: center;
|
|
784
|
+
justify-content: center;
|
|
785
|
+
padding: 16px;
|
|
786
|
+
background: rgba(22, 21, 24, 0.55);
|
|
787
|
+
`,hy=g.div`
|
|
788
|
+
width: 560px;
|
|
789
|
+
max-width: 100%;
|
|
790
|
+
max-height: 92vh;
|
|
791
|
+
overflow-y: auto;
|
|
792
|
+
background: ${d.colors.white};
|
|
793
|
+
border-radius: 16px;
|
|
794
|
+
padding: 12px 16px 16px;
|
|
795
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
796
|
+
display: flex;
|
|
797
|
+
flex-direction: column;
|
|
798
|
+
gap: 24px;
|
|
799
|
+
|
|
800
|
+
${d.media.maxWidth("mobile")} {
|
|
801
|
+
padding: 12px 16px 16px;
|
|
802
|
+
}
|
|
803
|
+
`,my=g.div`
|
|
804
|
+
display: flex;
|
|
805
|
+
flex-direction: column;
|
|
806
|
+
gap: 4px;
|
|
807
|
+
padding-bottom: 16px;
|
|
808
|
+
border-bottom: 1px solid ${d.colors.gray4};
|
|
809
|
+
`,gy=g.div`
|
|
810
|
+
display: flex;
|
|
811
|
+
align-items: center;
|
|
812
|
+
justify-content: space-between;
|
|
813
|
+
gap: 8px;
|
|
814
|
+
`,xy=g.h2`
|
|
815
|
+
margin: 0;
|
|
816
|
+
font-family: ${d.font.sans};
|
|
817
|
+
font-weight: 600;
|
|
818
|
+
font-size: 20px;
|
|
819
|
+
line-height: 1.6;
|
|
820
|
+
color: ${d.colors.text};
|
|
821
|
+
`,yy=g.button`
|
|
822
|
+
flex: none;
|
|
823
|
+
display: grid;
|
|
824
|
+
place-items: center;
|
|
825
|
+
width: 24px;
|
|
826
|
+
height: 24px;
|
|
827
|
+
border: 0;
|
|
828
|
+
background: none;
|
|
829
|
+
cursor: pointer;
|
|
830
|
+
color: ${d.colors.text};
|
|
831
|
+
|
|
832
|
+
.ico {
|
|
833
|
+
width: 18px;
|
|
834
|
+
height: 18px;
|
|
835
|
+
}
|
|
836
|
+
&:disabled {
|
|
837
|
+
opacity: 0.4;
|
|
838
|
+
cursor: default;
|
|
839
|
+
}
|
|
840
|
+
&:focus-visible {
|
|
841
|
+
outline: 2px solid ${d.colors.accent};
|
|
842
|
+
outline-offset: 2px;
|
|
843
|
+
}
|
|
844
|
+
`,by=g.div`
|
|
845
|
+
display: flex;
|
|
846
|
+
align-items: center;
|
|
847
|
+
gap: 12px;
|
|
848
|
+
`,vy=g.img`
|
|
849
|
+
flex: none;
|
|
850
|
+
width: 72px;
|
|
851
|
+
height: 72px;
|
|
852
|
+
border-radius: 12px;
|
|
853
|
+
object-fit: cover;
|
|
854
|
+
background: ${d.colors.media};
|
|
855
|
+
`,wy=g.p`
|
|
856
|
+
margin: 0;
|
|
857
|
+
font-family: ${d.font.sans};
|
|
858
|
+
font-weight: 600;
|
|
859
|
+
font-size: 18px;
|
|
860
|
+
line-height: 1.4;
|
|
861
|
+
color: ${d.colors.text};
|
|
862
|
+
`,ky=g.label`
|
|
863
|
+
display: flex;
|
|
864
|
+
flex-direction: column;
|
|
865
|
+
gap: 6px;
|
|
866
|
+
`,Dy=g.span`
|
|
867
|
+
font-family: ${d.font.sans};
|
|
868
|
+
font-size: 12px;
|
|
869
|
+
color: ${d.colors.muted};
|
|
870
|
+
`,Cy=g.input`
|
|
871
|
+
width: 100%;
|
|
872
|
+
height: 44px;
|
|
873
|
+
padding: 0 12px;
|
|
874
|
+
border: 1px solid ${d.colors.text};
|
|
875
|
+
border-radius: 8px;
|
|
876
|
+
background: ${d.colors.white};
|
|
877
|
+
font-family: ${d.font.sans};
|
|
878
|
+
font-size: 14px;
|
|
879
|
+
color: ${d.colors.text};
|
|
880
|
+
|
|
881
|
+
&::placeholder {
|
|
882
|
+
color: ${d.colors.muted2};
|
|
883
|
+
}
|
|
884
|
+
&:focus-visible {
|
|
885
|
+
outline: none;
|
|
886
|
+
border-color: ${d.colors.magenta};
|
|
887
|
+
}
|
|
888
|
+
&[aria-invalid='true'] {
|
|
889
|
+
border-color: ${d.colors.err};
|
|
890
|
+
}
|
|
891
|
+
&:disabled {
|
|
892
|
+
opacity: 0.6;
|
|
893
|
+
}
|
|
894
|
+
`,Sy=g.p`
|
|
895
|
+
margin: 0;
|
|
896
|
+
padding: 12px 14px;
|
|
897
|
+
border-radius: 10px;
|
|
898
|
+
background: rgba(255, 45, 85, 0.1);
|
|
899
|
+
font-family: ${d.font.sans};
|
|
900
|
+
font-size: 13px;
|
|
901
|
+
line-height: 1.5;
|
|
902
|
+
color: ${d.colors.text2};
|
|
903
|
+
`,hs=g.div`
|
|
904
|
+
display: flex;
|
|
905
|
+
gap: 12px;
|
|
906
|
+
|
|
907
|
+
${d.media.maxWidth("mobile")} {
|
|
908
|
+
flex-direction: column-reverse;
|
|
909
|
+
}
|
|
910
|
+
`,My=g.button`
|
|
911
|
+
flex: 1;
|
|
912
|
+
height: 48px;
|
|
913
|
+
border: 2px solid ${d.colors.blackBtn};
|
|
914
|
+
border-radius: 16px;
|
|
915
|
+
background: transparent;
|
|
916
|
+
color: ${d.colors.text};
|
|
917
|
+
cursor: pointer;
|
|
918
|
+
font-family: ${d.font.sans};
|
|
919
|
+
font-weight: 600;
|
|
920
|
+
font-size: 15px;
|
|
921
|
+
line-height: 24px;
|
|
922
|
+
letter-spacing: 0.46px;
|
|
923
|
+
text-transform: uppercase;
|
|
924
|
+
|
|
925
|
+
&:hover:not(:disabled) {
|
|
926
|
+
background: rgba(36, 33, 41, 0.06);
|
|
927
|
+
}
|
|
928
|
+
&:focus-visible {
|
|
929
|
+
outline: 2px solid ${d.colors.accent};
|
|
930
|
+
outline-offset: 2px;
|
|
931
|
+
}
|
|
932
|
+
&:disabled {
|
|
933
|
+
opacity: 0.5;
|
|
934
|
+
cursor: default;
|
|
935
|
+
}
|
|
936
|
+
`,ms=g.button`
|
|
937
|
+
flex: 1;
|
|
938
|
+
display: inline-flex;
|
|
939
|
+
align-items: center;
|
|
940
|
+
justify-content: center;
|
|
941
|
+
gap: 8px;
|
|
942
|
+
height: 48px;
|
|
943
|
+
border: 0;
|
|
944
|
+
border-radius: 16px;
|
|
945
|
+
background: ${d.colors.blackBtn};
|
|
946
|
+
color: ${d.colors.softWhite};
|
|
947
|
+
cursor: pointer;
|
|
948
|
+
font-family: ${d.font.sans};
|
|
949
|
+
font-weight: 600;
|
|
950
|
+
font-size: 15px;
|
|
951
|
+
line-height: 24px;
|
|
952
|
+
letter-spacing: 0.46px;
|
|
953
|
+
text-transform: uppercase;
|
|
954
|
+
|
|
955
|
+
&:hover:not(:disabled) {
|
|
956
|
+
filter: brightness(1.35);
|
|
957
|
+
}
|
|
958
|
+
&:focus-visible {
|
|
959
|
+
outline: 2px solid ${d.colors.accent};
|
|
960
|
+
outline-offset: 2px;
|
|
961
|
+
}
|
|
962
|
+
&:disabled {
|
|
963
|
+
opacity: 0.55;
|
|
964
|
+
cursor: default;
|
|
965
|
+
}
|
|
966
|
+
`,_y=g.div`
|
|
967
|
+
display: flex;
|
|
968
|
+
flex-direction: column;
|
|
969
|
+
align-items: center;
|
|
970
|
+
gap: 16px;
|
|
971
|
+
padding: 24px 16px;
|
|
972
|
+
border-radius: 16px;
|
|
973
|
+
background: rgba(193, 238, 207, 0.5);
|
|
974
|
+
text-align: center;
|
|
975
|
+
`,jy=g.div`
|
|
976
|
+
display: grid;
|
|
977
|
+
place-items: center;
|
|
978
|
+
width: 64px;
|
|
979
|
+
height: 64px;
|
|
980
|
+
border-radius: 50%;
|
|
981
|
+
background: ${d.colors.ok};
|
|
982
|
+
color: ${d.colors.white};
|
|
983
|
+
|
|
984
|
+
.ico {
|
|
985
|
+
width: 34px;
|
|
986
|
+
height: 34px;
|
|
987
|
+
}
|
|
988
|
+
`,Iy=g.p`
|
|
989
|
+
margin: 0;
|
|
990
|
+
font-family: ${d.font.sans};
|
|
991
|
+
font-size: 16px;
|
|
992
|
+
line-height: 1.34;
|
|
993
|
+
color: ${d.colors.text2};
|
|
994
|
+
|
|
995
|
+
b {
|
|
996
|
+
font-weight: 700;
|
|
997
|
+
}
|
|
998
|
+
`;function Py(n){return/^0x[a-fA-F0-9]{40}$/.test(n.trim())}function Ey({item:n,session:a,onClose:t,onTransferred:e}){const[r,o]=v.useState(""),[i,c]=v.useState(!1),[l,p]=v.useState(null),[u,h]=v.useState(!1),x=r.trim(),b=Py(x),y=b&&x.toLowerCase()===a.address.toLowerCase(),w=x.length===0?null:b?y?m("transfer.selfAddress"):null:m("transfer.invalidAddress"),k=b&&!y&&!i;async function f(){if(k){p(null),c(!0);try{await rp({contractAddress:n.contractAddress,chainId:n.chainId,tokenId:n.tokenId,to:x,signer:a.signer}),fe("Shop Transferred Item",{contract_address:n.contractAddress,token_id:n.tokenId}),h(!0),or.success(m("transfer.toastSuccess",{name:n.name})),e==null||e()}catch(C){In(C)||Me(C,{flow:"transfer-item",tokenId:n.tokenId}),fe("Shop Transfer Failed",{error_code:Qe(C)}),p(In(C)?m("getCredits.errorCanceled"):sn(C,m("transfer.errorGeneric")))}finally{c(!1)}}}return s.jsx(fy,{onClick:i?void 0:t,role:"presentation",children:s.jsxs(hy,{onClick:C=>C.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("transfer.title"),children:[s.jsx(my,{children:s.jsxs(gy,{children:[s.jsx(xy,{children:m("transfer.title")}),s.jsx(yy,{onClick:t,disabled:i,"aria-label":m("sellModal.cancel"),children:s.jsx(V,{name:"close",className:"ico"})})]})}),u?s.jsxs(s.Fragment,{children:[s.jsxs(_y,{children:[s.jsx(jy,{"aria-hidden":!0,children:s.jsx(V,{name:"check",className:"ico"})}),s.jsx(Iy,{children:m("transfer.successBody",{name:n.name})})]}),s.jsx(hs,{children:s.jsx(ms,{onClick:t,children:m("getCredits.done")})})]}):s.jsxs(s.Fragment,{children:[s.jsxs(by,{children:[n.thumbnail?s.jsx(vy,{src:n.thumbnail,alt:""}):null,s.jsx(wy,{children:n.name})]}),s.jsxs(ky,{children:[s.jsx(Dy,{children:m("transfer.addressLabel")}),s.jsx(Cy,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:r,onChange:C=>o(C.target.value),disabled:i,"aria-invalid":!!w,"aria-label":m("transfer.addressLabel")}),w?s.jsx(Ft,{message:w}):null]}),s.jsx(Sy,{children:m("transfer.warning")}),s.jsx(Ft,{message:l}),s.jsxs(hs,{children:[s.jsx(My,{onClick:t,disabled:i,children:m("sellModal.cancel")}),s.jsx(ms,{onClick:()=>void f(),disabled:!k,children:i?m("transfer.transferring"):m("transfer.transfer")})]})]})]})})}const gs=g.div`
|
|
999
|
+
position: fixed;
|
|
1000
|
+
inset: 0;
|
|
1001
|
+
z-index: 10000;
|
|
1002
|
+
display: flex;
|
|
1003
|
+
align-items: center;
|
|
1004
|
+
justify-content: center;
|
|
1005
|
+
padding: 16px;
|
|
1006
|
+
background: rgba(22, 21, 24, 0.55);
|
|
1007
|
+
`,xs=g.div`
|
|
1008
|
+
width: 560px;
|
|
1009
|
+
max-width: 100%;
|
|
1010
|
+
max-height: 92vh;
|
|
1011
|
+
overflow-y: auto;
|
|
1012
|
+
background: ${d.colors.white};
|
|
1013
|
+
border-radius: 16px;
|
|
1014
|
+
padding: 12px 16px 16px;
|
|
1015
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1016
|
+
display: flex;
|
|
1017
|
+
flex-direction: column;
|
|
1018
|
+
gap: 24px;
|
|
1019
|
+
`,ys=g.div`
|
|
1020
|
+
display: flex;
|
|
1021
|
+
align-items: center;
|
|
1022
|
+
justify-content: space-between;
|
|
1023
|
+
gap: 8px;
|
|
1024
|
+
padding-bottom: 16px;
|
|
1025
|
+
border-bottom: 1px solid ${d.colors.gray4};
|
|
1026
|
+
`,bs=g.h2`
|
|
1027
|
+
margin: 0;
|
|
1028
|
+
font-family: ${d.font.sans};
|
|
1029
|
+
font-weight: 600;
|
|
1030
|
+
font-size: 20px;
|
|
1031
|
+
line-height: 1.6;
|
|
1032
|
+
color: ${d.colors.text};
|
|
1033
|
+
`,vs=g.button`
|
|
1034
|
+
flex: none;
|
|
1035
|
+
display: grid;
|
|
1036
|
+
place-items: center;
|
|
1037
|
+
width: 24px;
|
|
1038
|
+
height: 24px;
|
|
1039
|
+
border: 0;
|
|
1040
|
+
background: none;
|
|
1041
|
+
cursor: pointer;
|
|
1042
|
+
color: ${d.colors.text};
|
|
1043
|
+
|
|
1044
|
+
.ico {
|
|
1045
|
+
width: 18px;
|
|
1046
|
+
height: 18px;
|
|
1047
|
+
}
|
|
1048
|
+
&:disabled {
|
|
1049
|
+
opacity: 0.4;
|
|
1050
|
+
cursor: default;
|
|
1051
|
+
}
|
|
1052
|
+
&:focus-visible {
|
|
1053
|
+
outline: 2px solid ${d.colors.accent};
|
|
1054
|
+
outline-offset: 2px;
|
|
1055
|
+
}
|
|
1056
|
+
`,Ty=g.p`
|
|
1057
|
+
margin: 0;
|
|
1058
|
+
font-family: ${d.font.sans};
|
|
1059
|
+
font-size: 14px;
|
|
1060
|
+
line-height: 1.57;
|
|
1061
|
+
color: ${d.colors.text};
|
|
1062
|
+
text-align: left;
|
|
1063
|
+
`,$y=g.div`
|
|
1064
|
+
display: flex;
|
|
1065
|
+
align-items: center;
|
|
1066
|
+
gap: 12px;
|
|
1067
|
+
`,Ny=g.div`
|
|
1068
|
+
flex: none;
|
|
1069
|
+
display: grid;
|
|
1070
|
+
place-items: center;
|
|
1071
|
+
width: 180px;
|
|
1072
|
+
height: 180px;
|
|
1073
|
+
border-radius: 16px;
|
|
1074
|
+
background: ${d.colors.media};
|
|
1075
|
+
border: 1px solid ${d.colors.gray4};
|
|
1076
|
+
overflow: hidden;
|
|
1077
|
+
|
|
1078
|
+
img {
|
|
1079
|
+
width: 150px;
|
|
1080
|
+
height: 150px;
|
|
1081
|
+
object-fit: contain;
|
|
1082
|
+
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
${d.media.maxWidth("mobile")} {
|
|
1086
|
+
width: 120px;
|
|
1087
|
+
height: 120px;
|
|
1088
|
+
|
|
1089
|
+
img {
|
|
1090
|
+
width: 100px;
|
|
1091
|
+
height: 100px;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
`,Ry=g.div`
|
|
1095
|
+
flex: 1 1 0;
|
|
1096
|
+
min-width: 0;
|
|
1097
|
+
display: flex;
|
|
1098
|
+
flex-direction: column;
|
|
1099
|
+
gap: 4px;
|
|
1100
|
+
padding: 8px;
|
|
1101
|
+
`,Oy=g.p`
|
|
1102
|
+
margin: 0;
|
|
1103
|
+
font-family: ${d.font.sans};
|
|
1104
|
+
font-weight: 600;
|
|
1105
|
+
font-size: 20px;
|
|
1106
|
+
line-height: 1.57;
|
|
1107
|
+
color: ${d.colors.text};
|
|
1108
|
+
`,Ay=g.p`
|
|
1109
|
+
margin: 0;
|
|
1110
|
+
font-family: ${d.font.sans};
|
|
1111
|
+
font-size: 10px;
|
|
1112
|
+
line-height: 1.43;
|
|
1113
|
+
color: ${d.colors.muted};
|
|
1114
|
+
`,Ly=g.label`
|
|
1115
|
+
display: flex;
|
|
1116
|
+
flex-direction: column;
|
|
1117
|
+
gap: 4px;
|
|
1118
|
+
`,Fy=g.span`
|
|
1119
|
+
font-family: ${d.font.sans};
|
|
1120
|
+
font-size: 12px;
|
|
1121
|
+
color: ${d.colors.muted};
|
|
1122
|
+
`,Yy=g.div`
|
|
1123
|
+
display: flex;
|
|
1124
|
+
align-items: center;
|
|
1125
|
+
justify-content: space-between;
|
|
1126
|
+
gap: 4px;
|
|
1127
|
+
height: 42px;
|
|
1128
|
+
padding: 0 8px;
|
|
1129
|
+
border: 0.5px solid ${d.colors.text};
|
|
1130
|
+
border-radius: 8px;
|
|
1131
|
+
background: ${d.colors.white};
|
|
1132
|
+
|
|
1133
|
+
&:focus-within {
|
|
1134
|
+
border-color: ${d.colors.magenta};
|
|
1135
|
+
}
|
|
1136
|
+
&[aria-invalid='true'] {
|
|
1137
|
+
border-color: ${d.colors.err};
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
.ccy {
|
|
1141
|
+
flex: none;
|
|
1142
|
+
width: 22px;
|
|
1143
|
+
height: 22px;
|
|
1144
|
+
color: ${d.colors.rarity};
|
|
1145
|
+
}
|
|
1146
|
+
`,Wy=g.input`
|
|
1147
|
+
flex: 1 1 auto;
|
|
1148
|
+
min-width: 0;
|
|
1149
|
+
border: 0;
|
|
1150
|
+
outline: none;
|
|
1151
|
+
background: transparent;
|
|
1152
|
+
font-family: ${d.font.sans};
|
|
1153
|
+
font-size: 13px;
|
|
1154
|
+
color: ${d.colors.text};
|
|
1155
|
+
|
|
1156
|
+
&::placeholder {
|
|
1157
|
+
color: ${d.colors.muted2};
|
|
1158
|
+
}
|
|
1159
|
+
/* Strip the number spinners — the glyph + USD hint carry the affordance. */
|
|
1160
|
+
&::-webkit-outer-spin-button,
|
|
1161
|
+
&::-webkit-inner-spin-button {
|
|
1162
|
+
-webkit-appearance: none;
|
|
1163
|
+
margin: 0;
|
|
1164
|
+
}
|
|
1165
|
+
&[type='number'] {
|
|
1166
|
+
-moz-appearance: textfield;
|
|
1167
|
+
appearance: textfield;
|
|
1168
|
+
}
|
|
1169
|
+
`,By=g.span`
|
|
1170
|
+
flex: none;
|
|
1171
|
+
font-family: ${d.font.sans};
|
|
1172
|
+
font-size: 10px;
|
|
1173
|
+
color: ${d.colors.muted2};
|
|
1174
|
+
`,Ra=g.p`
|
|
1175
|
+
margin: 0;
|
|
1176
|
+
font-family: ${d.font.sans};
|
|
1177
|
+
font-size: 12px;
|
|
1178
|
+
line-height: 1.5;
|
|
1179
|
+
color: ${d.colors.muted};
|
|
1180
|
+
`,Hy=g.button`
|
|
1181
|
+
width: 100%;
|
|
1182
|
+
height: 48px;
|
|
1183
|
+
border: 0;
|
|
1184
|
+
border-radius: 16px;
|
|
1185
|
+
cursor: pointer;
|
|
1186
|
+
background: ${d.colors.accent};
|
|
1187
|
+
color: ${d.colors.white};
|
|
1188
|
+
font-family: ${d.font.sans};
|
|
1189
|
+
font-weight: 600;
|
|
1190
|
+
font-size: 15px;
|
|
1191
|
+
line-height: 24px;
|
|
1192
|
+
letter-spacing: 0.46px;
|
|
1193
|
+
text-transform: uppercase;
|
|
1194
|
+
|
|
1195
|
+
&:hover:not(:disabled) {
|
|
1196
|
+
background: ${d.colors.accentHover};
|
|
1197
|
+
}
|
|
1198
|
+
&:focus-visible {
|
|
1199
|
+
outline: 2px solid ${d.colors.accent};
|
|
1200
|
+
outline-offset: 2px;
|
|
1201
|
+
}
|
|
1202
|
+
&:disabled {
|
|
1203
|
+
cursor: not-allowed;
|
|
1204
|
+
background: rgba(105, 31, 169, 0.2);
|
|
1205
|
+
color: ${d.colors.white};
|
|
1206
|
+
}
|
|
1207
|
+
`,zy=g.p`
|
|
1208
|
+
margin: 0;
|
|
1209
|
+
font-family: ${d.font.sans};
|
|
1210
|
+
font-size: 13px;
|
|
1211
|
+
color: ${d.colors.muted};
|
|
1212
|
+
text-align: center;
|
|
1213
|
+
`,qy=g.div`
|
|
1214
|
+
display: flex;
|
|
1215
|
+
flex-direction: column;
|
|
1216
|
+
align-items: center;
|
|
1217
|
+
gap: 16px;
|
|
1218
|
+
padding: 24px 16px;
|
|
1219
|
+
border-radius: 16px;
|
|
1220
|
+
background: rgba(193, 238, 207, 0.5);
|
|
1221
|
+
text-align: center;
|
|
1222
|
+
`,Ky=g.div`
|
|
1223
|
+
display: grid;
|
|
1224
|
+
place-items: center;
|
|
1225
|
+
width: 64px;
|
|
1226
|
+
height: 64px;
|
|
1227
|
+
border-radius: 50%;
|
|
1228
|
+
background: ${d.colors.ok};
|
|
1229
|
+
color: ${d.colors.white};
|
|
1230
|
+
|
|
1231
|
+
.ico {
|
|
1232
|
+
width: 34px;
|
|
1233
|
+
height: 34px;
|
|
1234
|
+
}
|
|
1235
|
+
`,Qy=g.p`
|
|
1236
|
+
margin: 0;
|
|
1237
|
+
font-family: ${d.font.sans};
|
|
1238
|
+
font-size: 20px;
|
|
1239
|
+
line-height: 1.334;
|
|
1240
|
+
color: ${d.colors.text2};
|
|
1241
|
+
|
|
1242
|
+
b {
|
|
1243
|
+
font-weight: 700;
|
|
1244
|
+
}
|
|
1245
|
+
`,Vy=g.p`
|
|
1246
|
+
margin: 0;
|
|
1247
|
+
display: inline-flex;
|
|
1248
|
+
align-items: center;
|
|
1249
|
+
gap: 4px;
|
|
1250
|
+
font-family: ${d.font.sans};
|
|
1251
|
+
font-size: 14px;
|
|
1252
|
+
line-height: 1.43;
|
|
1253
|
+
color: ${d.colors.text2};
|
|
1254
|
+
|
|
1255
|
+
strong {
|
|
1256
|
+
display: inline-flex;
|
|
1257
|
+
align-items: center;
|
|
1258
|
+
gap: 4px;
|
|
1259
|
+
font-weight: 700;
|
|
1260
|
+
}
|
|
1261
|
+
.ccy-mark {
|
|
1262
|
+
width: 18px;
|
|
1263
|
+
height: 18px;
|
|
1264
|
+
color: ${d.colors.rarity};
|
|
1265
|
+
}
|
|
1266
|
+
`,Uy=g.div`
|
|
1267
|
+
display: flex;
|
|
1268
|
+
gap: 12px;
|
|
1269
|
+
|
|
1270
|
+
${d.media.maxWidth("mobile")} {
|
|
1271
|
+
flex-direction: column-reverse;
|
|
1272
|
+
}
|
|
1273
|
+
`,Gy=g.button`
|
|
1274
|
+
flex: 1 1 0;
|
|
1275
|
+
height: 48px;
|
|
1276
|
+
border: 2px solid ${d.colors.accent};
|
|
1277
|
+
border-radius: 12px;
|
|
1278
|
+
background: transparent;
|
|
1279
|
+
color: ${d.colors.accent};
|
|
1280
|
+
cursor: pointer;
|
|
1281
|
+
font-family: ${d.font.sans};
|
|
1282
|
+
font-weight: 600;
|
|
1283
|
+
font-size: 13px;
|
|
1284
|
+
line-height: 24px;
|
|
1285
|
+
letter-spacing: 0.46px;
|
|
1286
|
+
text-transform: uppercase;
|
|
1287
|
+
|
|
1288
|
+
&:hover {
|
|
1289
|
+
background: rgba(105, 31, 169, 0.06);
|
|
1290
|
+
}
|
|
1291
|
+
&:focus-visible {
|
|
1292
|
+
outline: 2px solid ${d.colors.accent};
|
|
1293
|
+
outline-offset: 2px;
|
|
1294
|
+
}
|
|
1295
|
+
`,Xy=g.button`
|
|
1296
|
+
flex: 1 1 0;
|
|
1297
|
+
height: 48px;
|
|
1298
|
+
border: 0;
|
|
1299
|
+
border-radius: 12px;
|
|
1300
|
+
background: ${d.colors.accent};
|
|
1301
|
+
color: ${d.colors.softWhite};
|
|
1302
|
+
cursor: pointer;
|
|
1303
|
+
font-family: ${d.font.sans};
|
|
1304
|
+
font-weight: 600;
|
|
1305
|
+
font-size: 13px;
|
|
1306
|
+
line-height: 24px;
|
|
1307
|
+
letter-spacing: 0.46px;
|
|
1308
|
+
text-transform: uppercase;
|
|
1309
|
+
|
|
1310
|
+
&:hover {
|
|
1311
|
+
background: ${d.colors.accentHover};
|
|
1312
|
+
}
|
|
1313
|
+
&:focus-visible {
|
|
1314
|
+
outline: 2px solid ${d.colors.accent};
|
|
1315
|
+
outline-offset: 2px;
|
|
1316
|
+
}
|
|
1317
|
+
`,Jy=1e3*60*60*24*182;function Zy({item:n,session:a,onListed:t,onClose:e}){const r=fn(),o=pn(),[i,c]=v.useState("10"),[l,p]=v.useState(null),[u,h]=v.useState(null),[x,b]=v.useState(!1),[y,w]=v.useState(null),[k,f]=v.useState(null),C=Lt.chainId,P=ca(a),{data:T}=Gr(a.address),N=T!=null&&T.name?Xr(T.name):ro(a.address),R=Number(i),S=Number.isInteger(R)&&R>0,D=S?`$${en(R).toFixed(2)}`:"$0";v.useEffect(()=>{let F=!1;return(async()=>{try{const K=await ap({contractAddress:n.contractAddress,chainId:C});F||w(K)}catch{F||w(!1)}})(),()=>{F=!0}},[n.contractAddress,C]);async function j(){h(null);const F=Number(i);if(!Number.isInteger(F)||F<=0){h(m("primaryList.errorWholeNumber"));return}b(!0);try{y||(p(m("primaryList.statusEnabling")),await op({signer:a.signer,contractAddress:n.contractAddress,chainId:C}),w(!0)),p(m("primaryList.statusPublishing"));const K=await ip({signer:a.signer,item:{contractAddress:n.contractAddress,itemId:n.blockchainItemId,network:st.Network.MATIC,chainId:C},usdPrice:en(F),uses:n.remainingSupply,expiresAtMs:Date.now()+Jy});p(m("primaryList.statusFinishing")),await pc(K,a.identity),p(null),f(F),fe("Shop Listed Item",{item_id:n.blockchainItemId,contract_address:n.contractAddress,price_credits:F,price_usd:en(F),listing_type:"primary",is_primary:!0}),or.success(m("primaryList.toastOnSale",{name:n.name})),t==null||t(F),r.invalidateQueries({queryKey:["publishable-items"]}),r.invalidateQueries({queryKey:["collection-sale-state"]}),r.invalidateQueries({queryKey:["shop-items"]}),r.invalidateQueries({queryKey:["catalog-items"]}),r.invalidateQueries({queryKey:["overview-listings"]}),r.invalidateQueries({queryKey:["upsell-listings"]})}catch(K){Me(K,{flow:"list_primary"}),fe("Shop Listing Failed",{listing_type:"primary",error_code:Qe(K)}),h(sn(K,m("primaryList.errorGeneric"))),p(null)}finally{b(!1)}}function A(){e(),o(fd(n.contractAddress,n.blockchainItemId))}const H=y===null?m("primaryList.checking"):x?P?m("primaryList.publishing"):m("primaryList.confirmListing"):y===!1?m("primaryList.enableAndPutOnSale"):m("primaryList.putOnSale");return k!==null?s.jsx(gs,{onClick:e,role:"presentation",children:s.jsxs(xs,{onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("primaryList.successTitle"),children:[s.jsxs(ys,{children:[s.jsx(bs,{children:m("primaryList.successTitle")}),s.jsx(vs,{onClick:e,"aria-label":m("getCredits.done"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsxs(qy,{children:[s.jsx(Ky,{"aria-hidden":!0,children:s.jsx(V,{name:"check",className:"ico"})}),s.jsx(Qy,{children:s.jsx("b",{children:n.name})}),s.jsxs(Vy,{children:[m("primaryList.listedFor")," ",s.jsxs("strong",{children:[s.jsx(Oe,{className:"ccy-mark"})," ",s.jsx($e,{credits:k})]})," ",m("primaryList.dotAvailable",{count:n.remainingSupply})]})]}),s.jsxs(Uy,{children:[s.jsx(Gy,{onClick:e,children:m("getCredits.done")}),s.jsx(Xy,{onClick:A,children:m("primaryList.viewInShop")})]})]})}):s.jsx(gs,{onClick:x?void 0:e,role:"presentation",children:s.jsxs(xs,{"data-testid":"modal",onClick:F=>F.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("primaryList.publishTitle",{name:n.name}),children:[s.jsxs(ys,{children:[s.jsx(bs,{children:m("primaryList.publishTitle",{name:n.name})}),s.jsx(vs,{onClick:e,disabled:x,"aria-label":m("primaryList.cancel"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsx(Ty,{children:m("primaryList.fromCollection",{collectionName:n.collectionName,count:n.remainingSupply})}),s.jsxs($y,{children:[s.jsx(Ny,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs(Ry,{children:[s.jsx(Oy,{children:n.name}),N?s.jsx(Ay,{children:m("primaryList.byCreator",{name:N})}):null]})]}),s.jsxs(Ly,{children:[s.jsx(Fy,{children:m("primaryList.priceShort")}),s.jsxs(Yy,{"aria-invalid":i.length>0&&!S,children:[s.jsx(Oe,{className:"ccy"}),s.jsx(Wy,{type:"number",min:"1",step:"1",inputMode:"numeric",value:i,onChange:F=>c(F.target.value),disabled:x,"aria-label":m("primaryList.priceLabel",{currency:Xe.name})}),s.jsx(By,{"aria-hidden":!0,children:D})]})]}),s.jsx(Ra,{children:m("primaryList.pricedInWhole",{currency:Xe.name,currencySingular:Xe.nameSingular})}),y===!1&&!x?s.jsx(Ra,{children:P?m("primaryList.firstTimeManaged",{collectionName:n.collectionName}):m("primaryList.firstTimeConfirm",{collectionName:n.collectionName})}):y===!0&&!x?s.jsx(Ra,{children:P?m("primaryList.readyManaged"):m("primaryList.readyConfirm")}):null,l?s.jsx(zy,{children:l}):null,s.jsx(Ft,{message:u}),s.jsx(Hy,{onClick:()=>void j(),disabled:x||y===null||!S,children:H})]})})}const ul=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function pl(n){return/^0x[a-fA-F0-9]{40}$/.test(n.trim())}function fl(n){return n.reduce((a,t)=>a+Math.max(0,Math.floor(t.amount||0)),0)}function eb(n,a){const t=n.filter(r=>r.address.trim().length>0||(r.amount||0)>0);if(t.length===0)return!1;for(const r of t)if(!pl(r.address)||!Number.isInteger(r.amount)||r.amount<1)return!1;const e=fl(t);return e>=1&&e<=a}function tb(n,a){const t=[],e=[];for(const r of n){const o=r.address.trim(),i=Math.max(0,Math.floor(r.amount||0));if(!(!o||i===0))for(let c=0;c<i;c++)t.push(o),e.push(a)}return{beneficiaries:t,itemIds:e}}async function nb(n){const{contractAddress:a,chainId:t,beneficiaries:e,itemIds:r,signer:o}=n,i={...md(gd.ERC721CollectionV2,t),address:a},c=new Mp(ul).encodeFunctionData("issueTokens",[e,r]),l=vp(),p=wp(o.provider,l),u=await Rp(p,l,c,i,{serverURL:kc.relayerUrl});return await kp(u,"the mint"),u}async function rb(n){const{signer:a,contractAddress:t,chainId:e,entries:r,itemId:o}=n,{beneficiaries:i,itemIds:c}=tb(r,o);if(i.length===0)throw new Error("No copies to issue");if(kc.enabled)try{return await nb({contractAddress:t,chainId:e,beneficiaries:i,itemIds:c,signer:a})}catch(h){if(h instanceof $p&&h.code===Np.USER_DENIED||h instanceof bp)throw h;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",h)}return await hd(a.provider,e),(await(await new Sp(t,ul,a).issueTokens(i,c,sp(e))).wait()).transactionHash}const ab=g.div`
|
|
1318
|
+
position: fixed;
|
|
1319
|
+
inset: 0;
|
|
1320
|
+
z-index: 10000;
|
|
1321
|
+
display: flex;
|
|
1322
|
+
align-items: center;
|
|
1323
|
+
justify-content: center;
|
|
1324
|
+
padding: 16px;
|
|
1325
|
+
background: rgba(22, 21, 24, 0.55);
|
|
1326
|
+
`,ob=g.div`
|
|
1327
|
+
width: 560px;
|
|
1328
|
+
max-width: 100%;
|
|
1329
|
+
max-height: 92vh;
|
|
1330
|
+
overflow-y: auto;
|
|
1331
|
+
background: ${d.colors.white};
|
|
1332
|
+
border-radius: 16px;
|
|
1333
|
+
padding: 12px 16px 16px;
|
|
1334
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1335
|
+
display: flex;
|
|
1336
|
+
flex-direction: column;
|
|
1337
|
+
gap: 20px;
|
|
1338
|
+
`,ib=g.div`
|
|
1339
|
+
display: flex;
|
|
1340
|
+
align-items: center;
|
|
1341
|
+
justify-content: space-between;
|
|
1342
|
+
gap: 8px;
|
|
1343
|
+
padding-bottom: 16px;
|
|
1344
|
+
border-bottom: 1px solid ${d.colors.gray4};
|
|
1345
|
+
`,sb=g.h2`
|
|
1346
|
+
margin: 0;
|
|
1347
|
+
font-family: ${d.font.sans};
|
|
1348
|
+
font-weight: 600;
|
|
1349
|
+
font-size: 20px;
|
|
1350
|
+
line-height: 1.6;
|
|
1351
|
+
color: ${d.colors.text};
|
|
1352
|
+
`,cb=g.button`
|
|
1353
|
+
flex: none;
|
|
1354
|
+
display: grid;
|
|
1355
|
+
place-items: center;
|
|
1356
|
+
width: 24px;
|
|
1357
|
+
height: 24px;
|
|
1358
|
+
border: 0;
|
|
1359
|
+
background: none;
|
|
1360
|
+
cursor: pointer;
|
|
1361
|
+
color: ${d.colors.text};
|
|
1362
|
+
|
|
1363
|
+
.ico {
|
|
1364
|
+
width: 18px;
|
|
1365
|
+
height: 18px;
|
|
1366
|
+
}
|
|
1367
|
+
&:disabled {
|
|
1368
|
+
opacity: 0.4;
|
|
1369
|
+
cursor: default;
|
|
1370
|
+
}
|
|
1371
|
+
&:focus-visible {
|
|
1372
|
+
outline: 2px solid ${d.colors.accent};
|
|
1373
|
+
outline-offset: 2px;
|
|
1374
|
+
}
|
|
1375
|
+
`,lb=g.p`
|
|
1376
|
+
margin: 0;
|
|
1377
|
+
font-family: ${d.font.sans};
|
|
1378
|
+
font-size: 14px;
|
|
1379
|
+
line-height: 1.57;
|
|
1380
|
+
color: ${d.colors.text};
|
|
1381
|
+
text-align: left;
|
|
1382
|
+
`,db=g.div`
|
|
1383
|
+
display: flex;
|
|
1384
|
+
align-items: center;
|
|
1385
|
+
gap: 12px;
|
|
1386
|
+
`,ub=g.div`
|
|
1387
|
+
flex: none;
|
|
1388
|
+
display: grid;
|
|
1389
|
+
place-items: center;
|
|
1390
|
+
width: 56px;
|
|
1391
|
+
height: 56px;
|
|
1392
|
+
border-radius: 12px;
|
|
1393
|
+
background: ${d.colors.media};
|
|
1394
|
+
border: 1px solid ${d.colors.gray4};
|
|
1395
|
+
overflow: hidden;
|
|
1396
|
+
|
|
1397
|
+
img {
|
|
1398
|
+
width: 48px;
|
|
1399
|
+
height: 48px;
|
|
1400
|
+
object-fit: contain;
|
|
1401
|
+
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
1402
|
+
}
|
|
1403
|
+
`,pb=g.p`
|
|
1404
|
+
margin: 0;
|
|
1405
|
+
font-family: ${d.font.sans};
|
|
1406
|
+
font-weight: 600;
|
|
1407
|
+
font-size: 16px;
|
|
1408
|
+
line-height: 1.4;
|
|
1409
|
+
color: ${d.colors.text};
|
|
1410
|
+
`,fb=g.div`
|
|
1411
|
+
display: flex;
|
|
1412
|
+
flex-direction: column;
|
|
1413
|
+
gap: 10px;
|
|
1414
|
+
`,hb=g.div`
|
|
1415
|
+
display: flex;
|
|
1416
|
+
align-items: flex-start;
|
|
1417
|
+
gap: 8px;
|
|
1418
|
+
`,mb=g.label`
|
|
1419
|
+
flex: 1 1 auto;
|
|
1420
|
+
min-width: 0;
|
|
1421
|
+
display: flex;
|
|
1422
|
+
flex-direction: column;
|
|
1423
|
+
gap: 4px;
|
|
1424
|
+
`,gb=g.label`
|
|
1425
|
+
flex: none;
|
|
1426
|
+
width: 96px;
|
|
1427
|
+
display: flex;
|
|
1428
|
+
flex-direction: column;
|
|
1429
|
+
gap: 4px;
|
|
1430
|
+
`,ws=g.span`
|
|
1431
|
+
font-family: ${d.font.sans};
|
|
1432
|
+
font-size: 12px;
|
|
1433
|
+
color: ${d.colors.muted};
|
|
1434
|
+
`,ks=g.input`
|
|
1435
|
+
height: 42px;
|
|
1436
|
+
padding: 0 10px;
|
|
1437
|
+
border: 0.5px solid ${d.colors.text};
|
|
1438
|
+
border-radius: 8px;
|
|
1439
|
+
background: ${d.colors.white};
|
|
1440
|
+
font-family: ${d.font.sans};
|
|
1441
|
+
font-size: 13px;
|
|
1442
|
+
color: ${d.colors.text};
|
|
1443
|
+
outline: none;
|
|
1444
|
+
|
|
1445
|
+
&::placeholder {
|
|
1446
|
+
color: ${d.colors.muted2};
|
|
1447
|
+
}
|
|
1448
|
+
&:focus {
|
|
1449
|
+
border-color: ${d.colors.magenta};
|
|
1450
|
+
}
|
|
1451
|
+
&[aria-invalid='true'] {
|
|
1452
|
+
border-color: ${d.colors.err};
|
|
1453
|
+
}
|
|
1454
|
+
/* Strip the number spinners on the amount input. */
|
|
1455
|
+
&::-webkit-outer-spin-button,
|
|
1456
|
+
&::-webkit-inner-spin-button {
|
|
1457
|
+
-webkit-appearance: none;
|
|
1458
|
+
margin: 0;
|
|
1459
|
+
}
|
|
1460
|
+
&[type='number'] {
|
|
1461
|
+
-moz-appearance: textfield;
|
|
1462
|
+
appearance: textfield;
|
|
1463
|
+
}
|
|
1464
|
+
`,xb=g.button`
|
|
1465
|
+
flex: none;
|
|
1466
|
+
margin-top: 22px;
|
|
1467
|
+
display: grid;
|
|
1468
|
+
place-items: center;
|
|
1469
|
+
width: 42px;
|
|
1470
|
+
height: 42px;
|
|
1471
|
+
border: 0.5px solid ${d.colors.gray4};
|
|
1472
|
+
border-radius: 8px;
|
|
1473
|
+
background: ${d.colors.white};
|
|
1474
|
+
color: ${d.colors.muted};
|
|
1475
|
+
cursor: pointer;
|
|
1476
|
+
|
|
1477
|
+
.ico {
|
|
1478
|
+
width: 16px;
|
|
1479
|
+
height: 16px;
|
|
1480
|
+
}
|
|
1481
|
+
&:hover:not(:disabled) {
|
|
1482
|
+
color: ${d.colors.err};
|
|
1483
|
+
border-color: ${d.colors.err};
|
|
1484
|
+
}
|
|
1485
|
+
&:disabled {
|
|
1486
|
+
opacity: 0.35;
|
|
1487
|
+
cursor: default;
|
|
1488
|
+
}
|
|
1489
|
+
&:focus-visible {
|
|
1490
|
+
outline: 2px solid ${d.colors.accent};
|
|
1491
|
+
outline-offset: 2px;
|
|
1492
|
+
}
|
|
1493
|
+
`,yb=g.button`
|
|
1494
|
+
align-self: flex-start;
|
|
1495
|
+
display: inline-flex;
|
|
1496
|
+
align-items: center;
|
|
1497
|
+
gap: 6px;
|
|
1498
|
+
border: 0;
|
|
1499
|
+
background: none;
|
|
1500
|
+
padding: 0;
|
|
1501
|
+
cursor: pointer;
|
|
1502
|
+
font-family: ${d.font.sans};
|
|
1503
|
+
font-weight: 600;
|
|
1504
|
+
font-size: 13px;
|
|
1505
|
+
color: ${d.colors.accent};
|
|
1506
|
+
|
|
1507
|
+
.ico {
|
|
1508
|
+
width: 16px;
|
|
1509
|
+
height: 16px;
|
|
1510
|
+
}
|
|
1511
|
+
&:disabled {
|
|
1512
|
+
opacity: 0.4;
|
|
1513
|
+
cursor: default;
|
|
1514
|
+
}
|
|
1515
|
+
&:focus-visible {
|
|
1516
|
+
outline: 2px solid ${d.colors.accent};
|
|
1517
|
+
outline-offset: 2px;
|
|
1518
|
+
}
|
|
1519
|
+
`,bb=g.p`
|
|
1520
|
+
margin: 0;
|
|
1521
|
+
font-family: ${d.font.sans};
|
|
1522
|
+
font-size: 13px;
|
|
1523
|
+
line-height: 1.5;
|
|
1524
|
+
color: ${n=>n.over?d.colors.err:d.colors.text};
|
|
1525
|
+
|
|
1526
|
+
strong {
|
|
1527
|
+
font-weight: 700;
|
|
1528
|
+
}
|
|
1529
|
+
`,vb=g.p`
|
|
1530
|
+
margin: 0;
|
|
1531
|
+
font-family: ${d.font.sans};
|
|
1532
|
+
font-size: 12px;
|
|
1533
|
+
line-height: 1.5;
|
|
1534
|
+
color: ${d.colors.muted};
|
|
1535
|
+
`;g.p`
|
|
1536
|
+
margin: 0;
|
|
1537
|
+
font-family: ${d.font.sans};
|
|
1538
|
+
font-size: 13px;
|
|
1539
|
+
color: ${d.colors.muted};
|
|
1540
|
+
text-align: center;
|
|
1541
|
+
`;const wb=g.p`
|
|
1542
|
+
margin: 0;
|
|
1543
|
+
font-family: ${d.font.sans};
|
|
1544
|
+
font-size: 11px;
|
|
1545
|
+
color: ${d.colors.err};
|
|
1546
|
+
`,Ds=g.div`
|
|
1547
|
+
display: flex;
|
|
1548
|
+
gap: 12px;
|
|
1549
|
+
|
|
1550
|
+
${d.media.maxWidth("mobile")} {
|
|
1551
|
+
flex-direction: column-reverse;
|
|
1552
|
+
}
|
|
1553
|
+
`,kb=g.button`
|
|
1554
|
+
flex: 1 1 0;
|
|
1555
|
+
height: 48px;
|
|
1556
|
+
border: 2px solid ${d.colors.accent};
|
|
1557
|
+
border-radius: 12px;
|
|
1558
|
+
background: transparent;
|
|
1559
|
+
color: ${d.colors.accent};
|
|
1560
|
+
cursor: pointer;
|
|
1561
|
+
font-family: ${d.font.sans};
|
|
1562
|
+
font-weight: 600;
|
|
1563
|
+
font-size: 13px;
|
|
1564
|
+
line-height: 24px;
|
|
1565
|
+
letter-spacing: 0.46px;
|
|
1566
|
+
text-transform: uppercase;
|
|
1567
|
+
|
|
1568
|
+
&:hover:not(:disabled) {
|
|
1569
|
+
background: rgba(105, 31, 169, 0.06);
|
|
1570
|
+
}
|
|
1571
|
+
&:disabled {
|
|
1572
|
+
opacity: 0.5;
|
|
1573
|
+
cursor: not-allowed;
|
|
1574
|
+
}
|
|
1575
|
+
&:focus-visible {
|
|
1576
|
+
outline: 2px solid ${d.colors.accent};
|
|
1577
|
+
outline-offset: 2px;
|
|
1578
|
+
}
|
|
1579
|
+
`,Cs=g.button`
|
|
1580
|
+
flex: 1 1 0;
|
|
1581
|
+
height: 48px;
|
|
1582
|
+
border: 0;
|
|
1583
|
+
border-radius: 12px;
|
|
1584
|
+
cursor: pointer;
|
|
1585
|
+
background: ${d.colors.accent};
|
|
1586
|
+
color: ${d.colors.white};
|
|
1587
|
+
font-family: ${d.font.sans};
|
|
1588
|
+
font-weight: 600;
|
|
1589
|
+
font-size: 13px;
|
|
1590
|
+
line-height: 24px;
|
|
1591
|
+
letter-spacing: 0.46px;
|
|
1592
|
+
text-transform: uppercase;
|
|
1593
|
+
|
|
1594
|
+
&:hover:not(:disabled) {
|
|
1595
|
+
background: ${d.colors.accentHover};
|
|
1596
|
+
}
|
|
1597
|
+
&:focus-visible {
|
|
1598
|
+
outline: 2px solid ${d.colors.accent};
|
|
1599
|
+
outline-offset: 2px;
|
|
1600
|
+
}
|
|
1601
|
+
&:disabled {
|
|
1602
|
+
cursor: not-allowed;
|
|
1603
|
+
background: rgba(105, 31, 169, 0.2);
|
|
1604
|
+
color: ${d.colors.white};
|
|
1605
|
+
}
|
|
1606
|
+
`,Db=g.div`
|
|
1607
|
+
display: flex;
|
|
1608
|
+
flex-direction: column;
|
|
1609
|
+
align-items: center;
|
|
1610
|
+
gap: 16px;
|
|
1611
|
+
padding: 24px 16px;
|
|
1612
|
+
border-radius: 16px;
|
|
1613
|
+
background: rgba(193, 238, 207, 0.5);
|
|
1614
|
+
text-align: center;
|
|
1615
|
+
`,Cb=g.div`
|
|
1616
|
+
display: grid;
|
|
1617
|
+
place-items: center;
|
|
1618
|
+
width: 64px;
|
|
1619
|
+
height: 64px;
|
|
1620
|
+
border-radius: 50%;
|
|
1621
|
+
background: ${d.colors.ok};
|
|
1622
|
+
color: ${d.colors.white};
|
|
1623
|
+
|
|
1624
|
+
.ico {
|
|
1625
|
+
width: 34px;
|
|
1626
|
+
height: 34px;
|
|
1627
|
+
}
|
|
1628
|
+
`,Sb=g.p`
|
|
1629
|
+
margin: 0;
|
|
1630
|
+
font-family: ${d.font.sans};
|
|
1631
|
+
font-size: 20px;
|
|
1632
|
+
line-height: 1.334;
|
|
1633
|
+
color: ${d.colors.text2};
|
|
1634
|
+
|
|
1635
|
+
b {
|
|
1636
|
+
font-weight: 700;
|
|
1637
|
+
}
|
|
1638
|
+
`;function Mb(n){return n.map(a=>({address:a.address,amount:Number(a.amount)}))}function _b({item:n,session:a,onClose:t,onIssued:e}){const r=fn(),[o,i]=v.useState([{address:"",amount:"1"}]),[c,l]=v.useState(!1),[p,u]=v.useState(null),[h,x]=v.useState(null),b=v.useRef(null),y=ca(a),w=Mb(o),k=fl(w),f=eb(w,n.available),C=k>n.available;v.useEffect(()=>{var j;(j=b.current)==null||j.focus();function D(A){A.key==="Escape"&&!c&&t()}return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[c,t]);function P(D,j){i(A=>A.map((H,F)=>F===D?{...H,...j}:H))}function T(){i(D=>[...D,{address:"",amount:"1"}])}function N(D){i(j=>j.length<=1?j:j.filter((A,H)=>H!==D))}async function R(){if(!(!f||c)){u(null),l(!0);try{await rb({signer:a.signer,contractAddress:n.contractAddress,chainId:n.chainId,entries:w,itemId:n.itemId}),fe("Shop Issued Item",{contract_address:n.contractAddress,item_id:n.itemId,recipients:w.filter(D=>D.address.trim().length>0).length,copies:k}),x(k),or.success(m("issue.toastSuccess",{count:k,name:n.name})),r.invalidateQueries({queryKey:["publishable-item"]}),r.invalidateQueries({queryKey:["publishable-items"]}),e==null||e()}catch(D){In(D)||Me(D,{flow:"issue-item",itemId:n.itemId}),fe("Shop Issue Failed",{error_code:Qe(D)}),u(In(D)?m("getCredits.errorCanceled"):sn(D,m("issue.errorGeneric")))}finally{l(!1)}}}const S=c?y?m("issue.issuing"):m("issue.confirm"):k>0?m("issue.issueCount",{count:k}):m("issue.issue");return s.jsx(ab,{onClick:c?void 0:t,role:"presentation",children:s.jsxs(ob,{ref:b,tabIndex:-1,"data-testid":"issue-modal",onClick:D=>D.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("issue.title"),children:[s.jsxs(ib,{children:[s.jsx(sb,{children:m("issue.title")}),s.jsx(cb,{onClick:t,disabled:c,"aria-label":m("sellModal.cancel"),children:s.jsx(V,{name:"close",className:"ico"})})]}),h!==null?s.jsxs(s.Fragment,{children:[s.jsxs(Db,{children:[s.jsx(Cb,{"aria-hidden":!0,children:s.jsx(V,{name:"check",className:"ico"})}),s.jsx(Sb,{children:m("issue.successBody",{count:h,name:n.name})})]}),s.jsx(Ds,{children:s.jsx(Cs,{onClick:t,children:m("getCredits.done")})})]}):s.jsxs(s.Fragment,{children:[s.jsxs(db,{children:[s.jsx(ub,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsx(pb,{children:n.name})]}),s.jsx(lb,{children:m("issue.subtitle")}),s.jsx(fb,{children:o.map((D,j)=>{const A=D.address.trim(),H=A.length>0&&!pl(A),F=Number(D.amount),K=D.amount.length>0&&(!Number.isInteger(F)||F<1);return s.jsxs(hb,{children:[s.jsxs(mb,{children:[s.jsx(ws,{children:m("issue.addressLabel")}),s.jsx(ks,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:D.address,onChange:G=>P(j,{address:G.target.value}),disabled:c,"aria-invalid":H,"aria-label":m("issue.addressLabel")}),H?s.jsx(wb,{children:m("issue.invalidAddress")}):null]}),s.jsxs(gb,{children:[s.jsx(ws,{children:m("issue.amountLabel")}),s.jsx(ks,{type:"number",min:"1",step:"1",inputMode:"numeric",value:D.amount,onChange:G=>P(j,{amount:G.target.value}),disabled:c,"aria-invalid":K,"aria-label":m("issue.amountLabel")})]}),s.jsx(xb,{onClick:()=>N(j),disabled:c||o.length<=1,"aria-label":m("issue.removeRow"),children:s.jsx(V,{name:"close",className:"ico"})})]},j)})}),s.jsxs(yb,{onClick:T,disabled:c,children:[s.jsx(V,{name:"plus",className:"ico"}),m("issue.addRow")]}),s.jsxs(bb,{over:C,"aria-live":"polite",children:[s.jsx("strong",{children:k})," / ",n.available," ",m("issue.itemsToIssue")]}),C?s.jsx(vb,{children:m("issue.overCap",{available:n.available})}):null,s.jsx(Ft,{message:p}),s.jsxs(Ds,{children:[s.jsx(kb,{onClick:t,disabled:c,children:m("sellModal.cancel")}),s.jsx(Cs,{onClick:()=>void R(),disabled:!f||c,children:S})]})]})]})})}const jb=g.div`
|
|
1639
|
+
position: fixed;
|
|
1640
|
+
inset: 0;
|
|
1641
|
+
z-index: 10000;
|
|
1642
|
+
display: flex;
|
|
1643
|
+
align-items: center;
|
|
1644
|
+
justify-content: center;
|
|
1645
|
+
padding: 16px;
|
|
1646
|
+
background: rgba(22, 21, 24, 0.55);
|
|
1647
|
+
`,Ib=g.div`
|
|
1648
|
+
width: 760px;
|
|
1649
|
+
max-width: 100%;
|
|
1650
|
+
background: ${d.colors.white};
|
|
1651
|
+
border-radius: 16px;
|
|
1652
|
+
padding: 12px 16px 16px;
|
|
1653
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1654
|
+
display: flex;
|
|
1655
|
+
flex-direction: column;
|
|
1656
|
+
gap: 16px;
|
|
1657
|
+
`,Pb=g.div`
|
|
1658
|
+
display: flex;
|
|
1659
|
+
align-items: center;
|
|
1660
|
+
justify-content: space-between;
|
|
1661
|
+
gap: 8px;
|
|
1662
|
+
padding-bottom: 16px;
|
|
1663
|
+
border-bottom: 1px solid ${d.colors.gray4};
|
|
1664
|
+
`,Eb=g.h2`
|
|
1665
|
+
margin: 0;
|
|
1666
|
+
font-family: ${d.font.sans};
|
|
1667
|
+
font-weight: 600;
|
|
1668
|
+
font-size: 20px;
|
|
1669
|
+
line-height: 1.6;
|
|
1670
|
+
color: ${d.colors.text};
|
|
1671
|
+
`,Tb=g.button`
|
|
1672
|
+
flex: none;
|
|
1673
|
+
display: grid;
|
|
1674
|
+
place-items: center;
|
|
1675
|
+
width: 24px;
|
|
1676
|
+
height: 24px;
|
|
1677
|
+
border: 0;
|
|
1678
|
+
background: none;
|
|
1679
|
+
cursor: pointer;
|
|
1680
|
+
color: ${d.colors.text};
|
|
1681
|
+
|
|
1682
|
+
.ico {
|
|
1683
|
+
width: 18px;
|
|
1684
|
+
height: 18px;
|
|
1685
|
+
}
|
|
1686
|
+
&:focus-visible {
|
|
1687
|
+
outline: 2px solid ${d.colors.accent};
|
|
1688
|
+
outline-offset: 2px;
|
|
1689
|
+
}
|
|
1690
|
+
`,$b=g.video`
|
|
1691
|
+
display: block;
|
|
1692
|
+
width: 100%;
|
|
1693
|
+
max-height: 70vh;
|
|
1694
|
+
border-radius: 12px;
|
|
1695
|
+
background: ${d.colors.blackBtn};
|
|
1696
|
+
`;function Nb({src:n,itemName:a,onClose:t}){const e=v.useRef(null);return v.useEffect(()=>{var o;(o=e.current)==null||o.focus();function r(i){i.key==="Escape"&&t()}return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t]),s.jsx(jb,{onClick:t,role:"presentation",children:s.jsxs(Ib,{ref:e,tabIndex:-1,onClick:r=>r.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":m("itemDetail.showcaseTitle"),children:[s.jsxs(Pb,{children:[s.jsx(Eb,{children:a||m("itemDetail.showcaseTitle")}),s.jsx(Tb,{onClick:t,"aria-label":m("itemDetail.showcaseClose"),children:s.jsx(V,{name:"close",size:18})})]}),s.jsx($b,{src:n,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Mt,radius:Rb}=d,Ob=g.div`
|
|
1697
|
+
position: fixed;
|
|
1698
|
+
inset: 0;
|
|
1699
|
+
z-index: 60;
|
|
1700
|
+
display: grid;
|
|
1701
|
+
place-items: center;
|
|
1702
|
+
padding: 20px;
|
|
1703
|
+
`,Ab=g.div`
|
|
1704
|
+
position: absolute;
|
|
1705
|
+
inset: 0;
|
|
1706
|
+
background: rgba(22, 21, 24, 0.45);
|
|
1707
|
+
`,Lb=g.div`
|
|
1708
|
+
position: relative;
|
|
1709
|
+
z-index: 1;
|
|
1710
|
+
width: 100%;
|
|
1711
|
+
max-width: 420px;
|
|
1712
|
+
background: ${Mt.white};
|
|
1713
|
+
border-radius: ${Rb.banner};
|
|
1714
|
+
padding: 24px;
|
|
1715
|
+
box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
|
|
1716
|
+
animation: cart-pop-in 0.16s ease;
|
|
1717
|
+
`,Fb=g.div`
|
|
1718
|
+
display: flex;
|
|
1719
|
+
align-items: center;
|
|
1720
|
+
gap: 14px;
|
|
1721
|
+
margin-bottom: 18px;
|
|
1722
|
+
`,Yb=g.div`
|
|
1723
|
+
width: 64px;
|
|
1724
|
+
height: 64px;
|
|
1725
|
+
flex: none;
|
|
1726
|
+
border-radius: 12px;
|
|
1727
|
+
overflow: hidden;
|
|
1728
|
+
background: ${Mt.media};
|
|
1729
|
+
|
|
1730
|
+
& img {
|
|
1731
|
+
width: 100%;
|
|
1732
|
+
height: 100%;
|
|
1733
|
+
object-fit: contain;
|
|
1734
|
+
}
|
|
1735
|
+
`,Wb=g.div`
|
|
1736
|
+
font-weight: 700;
|
|
1737
|
+
font-size: 16px;
|
|
1738
|
+
color: ${Mt.text};
|
|
1739
|
+
margin-bottom: 6px;
|
|
1740
|
+
`,Bb=g.div`
|
|
1741
|
+
background: ${Mt.panel};
|
|
1742
|
+
border-radius: 14px;
|
|
1743
|
+
padding: 16px;
|
|
1744
|
+
margin-bottom: 14px;
|
|
1745
|
+
`,Ss=g.div`
|
|
1746
|
+
color: ${Mt.muted};
|
|
1747
|
+
font-size: 13px;
|
|
1748
|
+
font-weight: 600;
|
|
1749
|
+
margin-bottom: 6px;
|
|
1750
|
+
`,Ms=g.div`
|
|
1751
|
+
display: flex;
|
|
1752
|
+
align-items: center;
|
|
1753
|
+
gap: 8px;
|
|
1754
|
+
font-weight: 700;
|
|
1755
|
+
font-size: 24px;
|
|
1756
|
+
color: ${Mt.text};
|
|
1757
|
+
|
|
1758
|
+
&[data-approx] {
|
|
1759
|
+
color: ${Mt.text2};
|
|
1760
|
+
}
|
|
1761
|
+
`,Hb=g.span`
|
|
1762
|
+
color: ${Mt.muted};
|
|
1763
|
+
`,_s=g(Oe)`
|
|
1764
|
+
width: 20px;
|
|
1765
|
+
height: 20px;
|
|
1766
|
+
color: ${Mt.text};
|
|
1767
|
+
`,js=g.div`
|
|
1768
|
+
margin-top: 6px;
|
|
1769
|
+
font-size: 13px;
|
|
1770
|
+
`,zb=g.div`
|
|
1771
|
+
font-size: 13px;
|
|
1772
|
+
margin-bottom: 6px;
|
|
1773
|
+
`,hl=On`
|
|
1774
|
+
margin: 6px 0 0;
|
|
1775
|
+
font-size: 13px;
|
|
1776
|
+
`,Oa=g.p`
|
|
1777
|
+
${hl};
|
|
1778
|
+
`,qb=g(Ft)`
|
|
1779
|
+
${hl};
|
|
1780
|
+
`,Kb=g.div`
|
|
1781
|
+
display: flex;
|
|
1782
|
+
gap: 10px;
|
|
1783
|
+
margin-top: 18px;
|
|
1784
|
+
`,Is=g(Rn)`
|
|
1785
|
+
flex: 1;
|
|
1786
|
+
`;function Aa(n){if(In(n))return m("errors.rejected");const a=(n.message??"").toLowerCase();return a.includes("insufficient")?m("marketCheckout.error.insufficient",{currency:Xe.name}):a.includes("not found")||a.includes("no active listing")||a.includes("404")?m("marketCheckout.error.soldOrRemoved"):a.includes("your own listing")?m("errors.cantBuyOwn"):m("marketCheckout.error.generic")}function Qb(n){return{id:n.tradeId,tradeId:n.tradeId,name:n.name,creator:n.creator,contractAddress:n.contractAddress,itemId:n.itemId,category:n.category,wearableCategory:n.wearableCategory??void 0,rarity:n.rarity,network:n.network,chainId:n.chainId,thumbnail:n.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function ml({listing:n,rate:a,onClose:t,onSold:e}){const{session:r}=on(),{data:o,isError:i}=dc(r),c=fn(),l=pn(),[p,u]=v.useState("confirm"),[h,x]=v.useState(m("marketCheckout.checkingListing")),[b,y]=v.useState(null),[w,k]=v.useState(null),[f,C]=v.useState(null),[P,T]=v.useState(!1),N=v.useRef(null),R=v.useRef(!1),S=v.useRef(Ac());v.useEffect(()=>(R.current=!1,()=>{R.current=!0}),[]);const D=Nt(ka(n.manaWei,a));v.useEffect(()=>{let z=!1;if(!r){u("error"),y(m("buyModal.signInToCheckout"));return}return(async()=>{try{const B=await mc(n.tradeId);if(!B)throw new Error("not found");if(yd(B,r.address))throw new Error("You can't buy your own listing.");const M=ka(n.manaWei,a);if(!Number.isFinite(M)||M<=0)throw new Error("price unavailable");if(z)return;k({trade:B,usdCents:M,credits:Nt(M)}),x("")}catch(B){if(z)return;console.error("[market] listing check failed",B),fe(Ne(B)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Qe(B),value_usd:Math.round(ka(n.manaWei,a))/100}),u("error"),y(Aa(B))}})(),()=>{z=!0,N.current&&r&&(F([N.current]),N.current=null)}},[]);const j=!!w&&o!=null&&o.credits<w.credits;async function A(){if(!r||!w)return;if(j){fe("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:w.credits,credits_balance:(o==null?void 0:o.credits)??0,shortfall:Math.max(0,w.credits-((o==null?void 0:o.credits)??0))}),N.current&&(await H([N.current])&&C(null),N.current=null),l("/credits");return}u("working"),y(null),T(!1);let z=f;if(!z){x(m("marketCheckout.lockingPrice"));try{const{credit:q,maxCreditedValue:Z,usdCents:ae}=await Ka(r.identity,w.usdCents,n.tradeId);if(R.current){H([q.id]);return}N.current=q.id,c.invalidateQueries({queryKey:["usd-balance"]});const Le=Nt(ae);if(z={trade:w.trade,credit:q,maxCreditedValue:Z,usdCents:ae,credits:Le},C(z),Le!==w.credits){k({trade:w.trade,usdCents:ae,credits:Le}),T(!0),x(""),u("confirm");return}}catch(q){console.error("[market] authorize failed",q),Ne(q)||Me(q,{flow:"market_buy_now",step:"authorize"}),fe(Ne(q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Qe(q),value_usd:w.usdCents/100}),x(""),y(Aa(q)),u("error");return}}if(!z)return;const E=z;let B=!1,M;try{x(m("marketCheckout.confirming"));const q={trade:E.trade,buyer:r.address,signer:r.signer,credits:[E.credit],maxCreditedValue:E.maxCreditedValue,onBroadcast:({txHash:Z})=>S.current.broadcast(E.credit.id,Z),onReverted:({txHash:Z})=>{Z&&S.current.reverted(Z)}};if(S.current.submitStarted(E.credit.id),vc())try{M=await jp(q),S.current.broadcast(E.credit.id,M),await Dc(M),B=!0}catch(Z){if(Z instanceof Cc)B=!0;else if(Z instanceof Sc){if(Z.reason==="relayer-unreachable")throw S.current.unobservable(E.credit.id),Z;if(!Ur(r.providerType))throw Z;M=await Jo(q)}else throw M&&S.current.reverted(M),Z}else M=await Jo(q)}catch(q){S.current.submitFinished(E.credit.id),console.error("[market] buy now failed",q),await H([E.credit.id])&&C(null),N.current=null,fe(Ne(q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Qe(q),value_usd:E.usdCents/100}),c.invalidateQueries({queryKey:["usd-balance"]}),y(Aa(q)),u("error");const Z=(q.message??"").toLowerCase();(Z.includes("not found")||Z.includes("no active listing")||Z.includes("404"))&&e();return}S.current.submitFinished(E.credit.id),N.current=null;try{c.invalidateQueries({queryKey:["usd-balance"]}),fe("Shop Completed Purchase",{items:[{item_id:n.itemId??null,contract_address:n.contractAddress,token_id:null,price_usd:E.usdCents/100,category:n.category,is_smart:!1}],value_credits:E.credits,value_usd:E.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:B,transaction_hash:M??null}),c.invalidateQueries({queryKey:["detail-trade"]}),c.invalidateQueries({queryKey:["shop-item"]}),c.invalidateQueries({queryKey:["item-resales",n.contractAddress,n.itemId]}),c.invalidateQueries({queryKey:["shop-items"]}),c.invalidateQueries({queryKey:["catalog-items"]}),c.invalidateQueries({queryKey:["my-assets"]}),c.invalidateQueries({queryKey:["purchases"]})}catch(q){Me(q,{flow:"market_buy_now",step:"post_purchase"})}const X={items:[Qb(n)],txHash:M};l("/success",{state:X})}async function H(z){if(!r||z.length===0)return!1;const E=z.filter(B=>!S.current.mayBeConsumed(B));if(E.length===0)return!1;try{return await uc(r.identity,E),!0}catch{return!1}}function F(z){H(z.filter(E=>!S.current.isInFlight(E)))}function K(){r&&f&&H([f.credit.id]),N.current=null,t()}const G=p==="working";return s.jsxs(Ob,{role:"dialog","aria-modal":"true","aria-label":m("buyModal.dialogAria",{name:n.name}),children:[s.jsx(Ab,{onClick:G?void 0:K,"aria-hidden":!0}),s.jsxs(Lb,{children:[s.jsxs(Fb,{children:[s.jsx(Yb,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs("div",{children:[s.jsx(Wb,{title:n.name,children:n.name||m("buyModal.itemFallback")}),s.jsx(hc,{"data-variant":"rarity",children:n.rarity})]})]}),s.jsx(Bb,{children:w?s.jsxs(s.Fragment,{children:[s.jsx(Ss,{children:m("marketCheckout.finalPrice")}),s.jsxs(Ms,{children:[s.jsx(_s,{}),s.jsx($e,{credits:w.credits})," ",qo(w.credits)]}),s.jsxs(js,{className:"muted",children:["$",en(w.credits).toFixed(2)]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ss,{children:m("marketCheckout.todaysPrice")}),s.jsxs(Ms,{"data-approx":!0,children:[s.jsx(Hb,{"aria-hidden":!0,children:"≈"}),s.jsx(_s,{}),s.jsx($e,{credits:D})," ",qo(D)]}),s.jsx(js,{className:"muted",children:h||m("marketCheckout.checkingListing")})]})}),r?s.jsxs(zb,{className:"muted",children:[m("marketCheckout.yourBalance")," ",s.jsx(Oe,{className:"ccy-mark"})," ",xd(o,i)]}):null,j?s.jsx(Oa,{className:"muted",children:m("marketCheckout.needMore",{currency:Xe.name})}):null,P?s.jsx(Oa,{"data-testid":"price-changed",role:"status",children:m("buyModal.priceChanged")}):null,h&&p==="working"?s.jsx(Oa,{className:"muted",children:h}):null,s.jsx(qb,{message:b}),s.jsxs(Kb,{children:[s.jsx(Is,{variant:"ghost",onClick:K,disabled:G,children:m("buyModal.cancel")}),s.jsx(Is,{variant:"purple",onClick:()=>void A(),disabled:G||!w||j&&Zn(),children:G?m("marketCheckout.buying"):j&&!Zn()?m("nav.getCredits",{currency:Xe.name}):m("marketCheckout.confirmPurchase")})]})]})]})}function Vb(n,a,{enabled:t=!0,first:e}={}){const{data:r,isFetched:o}=ye({queryKey:["related-items",n,a,e],enabled:t&&!!n&&!!a,staleTime:3e5,queryFn:()=>bd(n,a,{first:e})});return{items:r??[],isFetched:o}}const gl=15;function Ub(n){return`${n.contractAddress}-${n.itemId??n.tokenId??n.id}`.toLowerCase()}function Gb(n,a){return!!(a.id&&n.id===a.id||a.itemId&&n.itemId===a.itemId&&Ps(n,a)||a.tokenId&&n.tokenId===a.tokenId&&Ps(n,a))}function Ps(n,a){var t;return a.contractAddress?((t=n.contractAddress)==null?void 0:t.toLowerCase())===a.contractAddress.toLowerCase():!1}function La(n,a,t=gl){const e=new Set,r=[];function o(c,l){for(const p of c){if(r.length>=l)return;if(Gb(p,a))continue;const u=Ub(p);e.has(u)||(e.add(u),r.push(p))}}o(n.collection,1/0);const i=r.length;return o(n.creator??[],t),o(n.related??[],t),{items:r,isCollectionOnly:r.length>0&&r.length===i}}const Xb=20,Jb=30,Es=[];function Zb(n,a=gl){const{id:t,contractAddress:e,itemId:r,tokenId:o,creator:i}=n,c=v.useMemo(()=>({id:t,contractAddress:e,itemId:r,tokenId:o}),[t,e,r,o]),{data:l=Es,isFetched:p}=ye({queryKey:["collection-items",e],enabled:!!e,queryFn:()=>vd(e,{first:Xb}).then(P=>P.items)}),u=v.useMemo(()=>La({collection:l},c,a).items.length,[l,c,a]),h=p&&u<a,x=h&&!!i,b=ye({queryKey:["suggestions-creator",i],enabled:x,staleTime:5*6e4,queryFn:()=>wd({creator:i,isOnSale:!0,first:Jb}).then(P=>P.items)}),y=b.data??Es,w=!x||b.isSuccess||b.isError,k=v.useMemo(()=>La({collection:l,creator:y},c,a).items.length,[l,y,c,a]),{items:f}=Vb(e,r??null,{enabled:h&&w&&k<a,first:a});return{...v.useMemo(()=>La({collection:l,creator:y,related:f},c,a),[l,y,f,c,a]),siblings:l,siblingsFetched:p}}const{colors:at,media:yo}=d,ev=kd`
|
|
1787
|
+
to {
|
|
1788
|
+
transform: rotate(360deg);
|
|
1789
|
+
}
|
|
1790
|
+
`,tv=g.div``,nv=g.span`
|
|
1791
|
+
width: 34px;
|
|
1792
|
+
height: 34px;
|
|
1793
|
+
border-radius: 50%;
|
|
1794
|
+
border: 3px solid ${at.line};
|
|
1795
|
+
border-top-color: ${at.accent};
|
|
1796
|
+
animation: ${ev} 0.8s linear infinite;
|
|
1797
|
+
|
|
1798
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1799
|
+
animation-duration: 2.4s;
|
|
1800
|
+
}
|
|
1801
|
+
`,rv=g.p``,av=g.div``,Ts=g.button`
|
|
1802
|
+
border: 0;
|
|
1803
|
+
background: none;
|
|
1804
|
+
cursor: pointer;
|
|
1805
|
+
padding: 6px 16px;
|
|
1806
|
+
border-radius: 999px;
|
|
1807
|
+
font-weight: 600;
|
|
1808
|
+
font-size: 12px;
|
|
1809
|
+
text-transform: uppercase;
|
|
1810
|
+
letter-spacing: 0.04em;
|
|
1811
|
+
color: ${at.muted};
|
|
1812
|
+
transition:
|
|
1813
|
+
background 0.12s ease,
|
|
1814
|
+
color 0.12s ease;
|
|
1815
|
+
|
|
1816
|
+
&[data-active] {
|
|
1817
|
+
background: ${at.text};
|
|
1818
|
+
color: ${at.white};
|
|
1819
|
+
}
|
|
1820
|
+
&:not([data-active]):hover {
|
|
1821
|
+
color: ${at.text};
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
${yo.maxWidth("lg")} {
|
|
1825
|
+
padding: 6px 12px;
|
|
1826
|
+
border-radius: 0;
|
|
1827
|
+
background: ${at.white};
|
|
1828
|
+
color: ${at.text2};
|
|
1829
|
+
|
|
1830
|
+
&[data-active] {
|
|
1831
|
+
background: ${at.text};
|
|
1832
|
+
color: ${at.white};
|
|
1833
|
+
}
|
|
1834
|
+
&:first-of-type {
|
|
1835
|
+
border-top-left-radius: 999px;
|
|
1836
|
+
border-bottom-left-radius: 999px;
|
|
1837
|
+
}
|
|
1838
|
+
&:last-of-type {
|
|
1839
|
+
border-top-right-radius: 999px;
|
|
1840
|
+
border-bottom-right-radius: 999px;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
`,$s=g.span`
|
|
1844
|
+
${yo.maxWidth("lg")} {
|
|
1845
|
+
display: none;
|
|
1846
|
+
}
|
|
1847
|
+
`,Ns=g(V)`
|
|
1848
|
+
display: none;
|
|
1849
|
+
|
|
1850
|
+
${yo.maxWidth("lg")} {
|
|
1851
|
+
display: block;
|
|
1852
|
+
}
|
|
1853
|
+
`,Rs="shop-item-preview";function ov({item:n}){const a=on(D=>{var j;return(j=D.session)==null?void 0:j.address}),{data:t,isLoading:e}=Gr(a),r=a&&t?a:"default",o=n.category==="emote",[i,c]=v.useState("avatar"),l=!o&&i==="item",p=l||!e,u=tr(D=>D.fittingOpen),{ref:h,active:x}=Dd(),b=p&&x&&!u,[y,w]=v.useState(!0);v.useEffect(()=>{w(!0)},[n.id,l]),v.useEffect(()=>{b&&w(!0)},[b]);const k=v.useRef(null);v.useEffect(()=>{if(b)return()=>{Ap(k.current),k.current=null}},[b]);const[f,C]=v.useState(st.PreviewRenderer.UNITY),P=f===st.PreviewRenderer.BABYLON,T=!!a&&!!t,N=T&&Cd(n,Sd(t)),R=Md(n)[0],S=T&&!N&&!o;return s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:h,"data-preview-viewport":!0,"aria-hidden":!0}),b?s.jsx(_d,{id:Rs,contractAddress:n.contractAddress,tokenId:n.tokenId??void 0,itemId:n.tokenId?void 0:n.itemId??void 0,profile:l?void 0:N?r:"default",bodyShape:l||N?void 0:R,type:o?void 0:l?st.PreviewType.WEARABLE:st.PreviewType.AVATAR,emote:o||l?void 0:st.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:o?1.5:void 0,wheelStart:o?100:void 0,onRenderer:C,onLoad:()=>{var D;w(!1),k.current=((D=document.getElementById(Rs))==null?void 0:D.contentWindow)??null}}):null,!b||y?s.jsx(tv,{"data-preview-loading":!0,"aria-busy":"true","aria-label":m("itemPreview.loading"),children:s.jsx(nv,{"aria-hidden":!0})}):null,S&&!l?s.jsx(rv,{"data-preview-note":!0,children:m("itemPreview.shownOnBody",{shape:jd(R)})}):null,!P||!o?null:s.jsx(Op,{previewId:"shop-item-preview"}),!P||o?null:s.jsxs(av,{"data-preview-toggle":!0,role:"group","aria-label":m("itemPreview.previewMode"),children:[s.jsxs(Ts,{type:"button","data-active":i==="avatar"||void 0,"aria-pressed":i==="avatar","aria-label":m("itemPreview.onAvatar"),onClick:()=>c("avatar"),children:[s.jsx(Ns,{name:"view-avatar",size:18}),s.jsx($s,{children:m("itemPreview.onAvatar")})]}),s.jsxs(Ts,{type:"button","data-active":i==="item"||void 0,"aria-pressed":i==="item","aria-label":m("itemPreview.item"),onClick:()=>c("item"),children:[s.jsx(Ns,{name:"view-item",size:18}),s.jsx($s,{children:m("itemPreview.item")})]})]})]})}const iv=g.div`
|
|
1854
|
+
position: fixed;
|
|
1855
|
+
inset: 0;
|
|
1856
|
+
z-index: 10000;
|
|
1857
|
+
display: flex;
|
|
1858
|
+
align-items: center;
|
|
1859
|
+
justify-content: center;
|
|
1860
|
+
padding: 16px;
|
|
1861
|
+
background: rgba(22, 21, 24, 0.55);
|
|
1862
|
+
`,sv=g.div`
|
|
1863
|
+
display: flex;
|
|
1864
|
+
flex-direction: column;
|
|
1865
|
+
gap: 12px;
|
|
1866
|
+
width: 1128px;
|
|
1867
|
+
max-width: 100%;
|
|
1868
|
+
max-height: 92vh;
|
|
1869
|
+
background: ${d.colors.white};
|
|
1870
|
+
border-radius: 16px;
|
|
1871
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1872
|
+
|
|
1873
|
+
&:focus {
|
|
1874
|
+
outline: none;
|
|
1875
|
+
}
|
|
1876
|
+
`,cv=g.div`
|
|
1877
|
+
flex: none;
|
|
1878
|
+
display: flex;
|
|
1879
|
+
align-items: center;
|
|
1880
|
+
gap: 8px;
|
|
1881
|
+
padding: 16px;
|
|
1882
|
+
border-bottom: 1px solid ${d.colors.gray4};
|
|
1883
|
+
`,lv=g.h2`
|
|
1884
|
+
flex: 1 1 auto;
|
|
1885
|
+
min-width: 0;
|
|
1886
|
+
margin: 0;
|
|
1887
|
+
font-family: ${d.font.sans};
|
|
1888
|
+
font-weight: 600;
|
|
1889
|
+
font-size: 20px;
|
|
1890
|
+
line-height: 1.6;
|
|
1891
|
+
color: ${d.colors.text};
|
|
1892
|
+
`,dv=g.button`
|
|
1893
|
+
flex: none;
|
|
1894
|
+
display: grid;
|
|
1895
|
+
place-items: center;
|
|
1896
|
+
width: 18.5px;
|
|
1897
|
+
height: 18.5px;
|
|
1898
|
+
padding: 0;
|
|
1899
|
+
border: 0;
|
|
1900
|
+
background: none;
|
|
1901
|
+
cursor: pointer;
|
|
1902
|
+
color: ${d.colors.text};
|
|
1903
|
+
|
|
1904
|
+
.ico {
|
|
1905
|
+
width: 18.5px;
|
|
1906
|
+
height: 18.5px;
|
|
1907
|
+
}
|
|
1908
|
+
&:focus-visible {
|
|
1909
|
+
outline: 2px solid ${d.colors.accent};
|
|
1910
|
+
outline-offset: 4px;
|
|
1911
|
+
}
|
|
1912
|
+
`,uv=g.div`
|
|
1913
|
+
flex: 1 1 auto;
|
|
1914
|
+
min-height: 0;
|
|
1915
|
+
overflow-y: auto;
|
|
1916
|
+
display: flex;
|
|
1917
|
+
flex-direction: column;
|
|
1918
|
+
gap: 8px;
|
|
1919
|
+
padding: 0 16px 24px;
|
|
1920
|
+
`,pv=g.div`
|
|
1921
|
+
position: sticky;
|
|
1922
|
+
top: 0;
|
|
1923
|
+
z-index: 1;
|
|
1924
|
+
display: flex;
|
|
1925
|
+
align-items: center;
|
|
1926
|
+
justify-content: space-between;
|
|
1927
|
+
gap: 8px;
|
|
1928
|
+
padding-bottom: 8px;
|
|
1929
|
+
background: ${d.colors.white};
|
|
1930
|
+
`,fv=g.p`
|
|
1931
|
+
margin: 0;
|
|
1932
|
+
font-family: ${d.font.sans};
|
|
1933
|
+
font-size: 14px;
|
|
1934
|
+
line-height: 1.43;
|
|
1935
|
+
color: ${d.colors.muted};
|
|
1936
|
+
`,hv=g.div`
|
|
1937
|
+
position: relative;
|
|
1938
|
+
flex: none;
|
|
1939
|
+
display: inline-flex;
|
|
1940
|
+
align-items: center;
|
|
1941
|
+
padding: 4px 4px 4px 12px;
|
|
1942
|
+
border: 0.5px solid ${d.colors.lineStrong};
|
|
1943
|
+
border-radius: 8px;
|
|
1944
|
+
background: ${d.colors.white};
|
|
1945
|
+
|
|
1946
|
+
select {
|
|
1947
|
+
appearance: none;
|
|
1948
|
+
/* 24px design gap + the 24px chevron that sits on top of it. */
|
|
1949
|
+
padding: 0 48px 0 0;
|
|
1950
|
+
border: 0;
|
|
1951
|
+
background: none;
|
|
1952
|
+
font-family: ${d.font.sans};
|
|
1953
|
+
font-weight: 500;
|
|
1954
|
+
font-size: 12px;
|
|
1955
|
+
line-height: 1.43;
|
|
1956
|
+
color: ${d.colors.text2};
|
|
1957
|
+
cursor: pointer;
|
|
1958
|
+
outline: none;
|
|
1959
|
+
}
|
|
1960
|
+
select:focus-visible {
|
|
1961
|
+
outline: 2px solid ${d.colors.accent};
|
|
1962
|
+
outline-offset: 2px;
|
|
1963
|
+
border-radius: 4px;
|
|
1964
|
+
}
|
|
1965
|
+
.chev {
|
|
1966
|
+
position: absolute;
|
|
1967
|
+
right: 4px;
|
|
1968
|
+
width: 24px;
|
|
1969
|
+
height: 24px;
|
|
1970
|
+
color: ${d.colors.text2};
|
|
1971
|
+
pointer-events: none;
|
|
1972
|
+
}
|
|
1973
|
+
`,mv=g.div`
|
|
1974
|
+
flex: none;
|
|
1975
|
+
border: 1px solid ${d.colors.lineStrong};
|
|
1976
|
+
border-radius: 16px;
|
|
1977
|
+
/* The four equal columns need the design width to hold their content, so a narrower modal scrolls
|
|
1978
|
+
the table here rather than letting the page scroll sideways. */
|
|
1979
|
+
overflow-x: auto;
|
|
1980
|
+
overflow-y: hidden;
|
|
1981
|
+
background: ${d.colors.white};
|
|
1982
|
+
`,gv=g.table`
|
|
1983
|
+
width: 100%;
|
|
1984
|
+
min-width: 1096px;
|
|
1985
|
+
table-layout: fixed;
|
|
1986
|
+
border-collapse: collapse;
|
|
1987
|
+
|
|
1988
|
+
th {
|
|
1989
|
+
height: 48px;
|
|
1990
|
+
padding: 8px 8px 8px 16px;
|
|
1991
|
+
text-align: left;
|
|
1992
|
+
vertical-align: middle;
|
|
1993
|
+
background: ${d.colors.media};
|
|
1994
|
+
border-right: 0.5px solid ${d.colors.lineStrong};
|
|
1995
|
+
font-family: ${d.font.sans};
|
|
1996
|
+
font-weight: 600;
|
|
1997
|
+
font-size: 16px;
|
|
1998
|
+
line-height: 1.5;
|
|
1999
|
+
color: ${d.colors.text};
|
|
2000
|
+
text-transform: capitalize;
|
|
2001
|
+
}
|
|
2002
|
+
th:last-of-type {
|
|
2003
|
+
border-right: 0;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
td {
|
|
2007
|
+
height: 56px;
|
|
2008
|
+
padding: 8px 8px 8px 16px;
|
|
2009
|
+
vertical-align: middle;
|
|
2010
|
+
border-right: 0.5px solid ${d.colors.lineStrong};
|
|
2011
|
+
border-bottom: 0.5px solid ${d.colors.lineStrong};
|
|
2012
|
+
font-family: ${d.font.sans};
|
|
2013
|
+
font-size: 14px;
|
|
2014
|
+
line-height: 1.43;
|
|
2015
|
+
color: ${d.colors.text2};
|
|
2016
|
+
}
|
|
2017
|
+
td:last-of-type {
|
|
2018
|
+
border-right: 0;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
tbody tr:hover,
|
|
2022
|
+
tbody tr:focus-within {
|
|
2023
|
+
background: ${d.colors.media};
|
|
2024
|
+
}
|
|
2025
|
+
tbody tr:hover td,
|
|
2026
|
+
tbody tr:focus-within td {
|
|
2027
|
+
border-bottom-color: ${d.colors.media};
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
/* Stack every cell into a card — a 4-column grid is unusable at phone widths. The column name is
|
|
2031
|
+
carried on each cell's data-label so it survives translation. */
|
|
2032
|
+
${d.media.maxWidth("mobile")} {
|
|
2033
|
+
min-width: 0;
|
|
2034
|
+
|
|
2035
|
+
thead {
|
|
2036
|
+
display: none;
|
|
2037
|
+
}
|
|
2038
|
+
tr {
|
|
2039
|
+
display: block;
|
|
2040
|
+
border-bottom: 0.5px solid ${d.colors.lineStrong};
|
|
2041
|
+
}
|
|
2042
|
+
tr:last-of-type {
|
|
2043
|
+
border-bottom: 0;
|
|
2044
|
+
}
|
|
2045
|
+
td {
|
|
2046
|
+
display: block;
|
|
2047
|
+
height: auto;
|
|
2048
|
+
padding: 8px 16px;
|
|
2049
|
+
border-right: 0;
|
|
2050
|
+
border-bottom: 0;
|
|
2051
|
+
}
|
|
2052
|
+
td:first-of-type {
|
|
2053
|
+
padding-top: 12px;
|
|
2054
|
+
}
|
|
2055
|
+
td:last-of-type {
|
|
2056
|
+
padding-bottom: 12px;
|
|
2057
|
+
}
|
|
2058
|
+
td[data-label]::before {
|
|
2059
|
+
content: attr(data-label);
|
|
2060
|
+
display: block;
|
|
2061
|
+
margin-bottom: 2px;
|
|
2062
|
+
font-size: 12px;
|
|
2063
|
+
line-height: 1.43;
|
|
2064
|
+
color: ${d.colors.muted};
|
|
2065
|
+
text-transform: capitalize;
|
|
2066
|
+
}
|
|
2067
|
+
tbody tr:hover td,
|
|
2068
|
+
tbody tr:focus-within td {
|
|
2069
|
+
border-bottom-color: transparent;
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
`,xl=`
|
|
2073
|
+
display: flex;
|
|
2074
|
+
align-items: center;
|
|
2075
|
+
gap: 10px;
|
|
2076
|
+
min-width: 0;
|
|
2077
|
+
|
|
2078
|
+
.owner-ava {
|
|
2079
|
+
flex: none;
|
|
2080
|
+
display: inline-grid;
|
|
2081
|
+
place-items: center;
|
|
2082
|
+
width: 32px;
|
|
2083
|
+
height: 32px;
|
|
2084
|
+
border: 2.286px solid rgba(255, 255, 255, 0.5);
|
|
2085
|
+
border-radius: 50%;
|
|
2086
|
+
background: ${d.colors.media};
|
|
2087
|
+
object-fit: cover;
|
|
2088
|
+
overflow: hidden;
|
|
2089
|
+
color: ${d.colors.white};
|
|
2090
|
+
font-weight: 700;
|
|
2091
|
+
font-size: 13px;
|
|
2092
|
+
}
|
|
2093
|
+
.owner-name {
|
|
2094
|
+
min-width: 0;
|
|
2095
|
+
overflow: hidden;
|
|
2096
|
+
text-overflow: ellipsis;
|
|
2097
|
+
white-space: nowrap;
|
|
2098
|
+
font-family: ${d.font.sans};
|
|
2099
|
+
font-size: 14px;
|
|
2100
|
+
line-height: 1.43;
|
|
2101
|
+
color: ${d.colors.text2};
|
|
2102
|
+
}
|
|
2103
|
+
`,xv=g.div`
|
|
2104
|
+
${xl}
|
|
2105
|
+
`,yv=g.button`
|
|
2106
|
+
${xl}
|
|
2107
|
+
padding: 0;
|
|
2108
|
+
border: 0;
|
|
2109
|
+
background: none;
|
|
2110
|
+
font: inherit;
|
|
2111
|
+
text-align: left;
|
|
2112
|
+
cursor: pointer;
|
|
2113
|
+
|
|
2114
|
+
&:hover .owner-name {
|
|
2115
|
+
text-decoration: underline;
|
|
2116
|
+
}
|
|
2117
|
+
&:focus-visible {
|
|
2118
|
+
outline: 2px solid ${d.colors.accent};
|
|
2119
|
+
outline-offset: 2px;
|
|
2120
|
+
border-radius: 4px;
|
|
2121
|
+
}
|
|
2122
|
+
`,Os=g.span`
|
|
2123
|
+
color: ${d.colors.muted};
|
|
2124
|
+
`,bv=g.div`
|
|
2125
|
+
display: flex;
|
|
2126
|
+
align-items: center;
|
|
2127
|
+
justify-content: space-between;
|
|
2128
|
+
gap: 4px;
|
|
2129
|
+
|
|
2130
|
+
.amount {
|
|
2131
|
+
display: inline-flex;
|
|
2132
|
+
align-items: center;
|
|
2133
|
+
gap: 4px;
|
|
2134
|
+
font-family: ${d.font.sans};
|
|
2135
|
+
font-weight: 600;
|
|
2136
|
+
font-size: 16px;
|
|
2137
|
+
line-height: 1.5;
|
|
2138
|
+
color: ${d.colors.text2};
|
|
2139
|
+
}
|
|
2140
|
+
/* The credits mark is always near-black here — never the violet accent. */
|
|
2141
|
+
.amount .ccy {
|
|
2142
|
+
flex: none;
|
|
2143
|
+
width: 22px;
|
|
2144
|
+
height: 22px;
|
|
2145
|
+
color: ${d.colors.text2};
|
|
2146
|
+
}
|
|
2147
|
+
.approx {
|
|
2148
|
+
color: ${d.colors.muted};
|
|
2149
|
+
font-weight: 600;
|
|
2150
|
+
}
|
|
2151
|
+
`,vv=g.div`
|
|
2152
|
+
flex: none;
|
|
2153
|
+
display: flex;
|
|
2154
|
+
align-items: center;
|
|
2155
|
+
gap: 8px;
|
|
2156
|
+
opacity: 0;
|
|
2157
|
+
transition: opacity 0.12s ease;
|
|
2158
|
+
|
|
2159
|
+
tr:hover &,
|
|
2160
|
+
tr:focus-within &,
|
|
2161
|
+
&[data-persistent='true'] {
|
|
2162
|
+
opacity: 1;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
@media (hover: none) {
|
|
2166
|
+
opacity: 1;
|
|
2167
|
+
}
|
|
2168
|
+
${d.media.maxWidth("mobile")} {
|
|
2169
|
+
opacity: 1;
|
|
2170
|
+
}
|
|
2171
|
+
`,yl=`
|
|
2172
|
+
display: inline-flex;
|
|
2173
|
+
align-items: center;
|
|
2174
|
+
justify-content: center;
|
|
2175
|
+
gap: 8px;
|
|
2176
|
+
height: 40px;
|
|
2177
|
+
padding: 0 12px;
|
|
2178
|
+
border: 0;
|
|
2179
|
+
border-radius: 12px;
|
|
2180
|
+
cursor: pointer;
|
|
2181
|
+
font-family: ${d.font.sans};
|
|
2182
|
+
font-weight: 600;
|
|
2183
|
+
font-size: 13px;
|
|
2184
|
+
line-height: 24px;
|
|
2185
|
+
letter-spacing: 0.46px;
|
|
2186
|
+
text-transform: uppercase;
|
|
2187
|
+
text-align: center;
|
|
2188
|
+
white-space: nowrap;
|
|
2189
|
+
|
|
2190
|
+
.ico {
|
|
2191
|
+
width: 20px;
|
|
2192
|
+
height: 20px;
|
|
2193
|
+
}
|
|
2194
|
+
&:focus-visible {
|
|
2195
|
+
outline: 2px solid ${d.colors.accent};
|
|
2196
|
+
outline-offset: 2px;
|
|
2197
|
+
}
|
|
2198
|
+
`,wv=g.button`
|
|
2199
|
+
${yl}
|
|
2200
|
+
min-width: 106px;
|
|
2201
|
+
background: ${d.colors.text2};
|
|
2202
|
+
color: ${d.colors.softWhite};
|
|
2203
|
+
|
|
2204
|
+
&:hover:not(:disabled) {
|
|
2205
|
+
filter: brightness(1.35);
|
|
2206
|
+
}
|
|
2207
|
+
&:disabled {
|
|
2208
|
+
opacity: 0.55;
|
|
2209
|
+
cursor: default;
|
|
2210
|
+
}
|
|
2211
|
+
`,As=g.button`
|
|
2212
|
+
${yl}
|
|
2213
|
+
background: ${d.colors.accent};
|
|
2214
|
+
color: ${d.colors.softWhite};
|
|
2215
|
+
|
|
2216
|
+
&:hover:not(:disabled) {
|
|
2217
|
+
background: ${d.colors.accentHover};
|
|
2218
|
+
}
|
|
2219
|
+
`,kv=g.span`
|
|
2220
|
+
display: inline-flex;
|
|
2221
|
+
align-items: center;
|
|
2222
|
+
height: 40px;
|
|
2223
|
+
padding: 0 12px;
|
|
2224
|
+
border-radius: 12px;
|
|
2225
|
+
background: ${d.colors.chip};
|
|
2226
|
+
font-family: ${d.font.sans};
|
|
2227
|
+
font-weight: 600;
|
|
2228
|
+
font-size: 13px;
|
|
2229
|
+
line-height: 24px;
|
|
2230
|
+
color: ${d.colors.muted};
|
|
2231
|
+
white-space: nowrap;
|
|
2232
|
+
`,Dv=g.div`
|
|
2233
|
+
flex: none;
|
|
2234
|
+
display: flex;
|
|
2235
|
+
align-items: center;
|
|
2236
|
+
justify-content: flex-end;
|
|
2237
|
+
gap: 8px;
|
|
2238
|
+
`,Cv=g.p`
|
|
2239
|
+
margin: 0;
|
|
2240
|
+
font-family: ${d.font.sans};
|
|
2241
|
+
font-size: 12px;
|
|
2242
|
+
line-height: 1;
|
|
2243
|
+
color: ${d.colors.gray0};
|
|
2244
|
+
`,Ls=g.button`
|
|
2245
|
+
display: grid;
|
|
2246
|
+
place-items: center;
|
|
2247
|
+
padding: 10px;
|
|
2248
|
+
border: 1px solid ${d.colors.text2};
|
|
2249
|
+
border-radius: 4px;
|
|
2250
|
+
background: ${d.colors.white};
|
|
2251
|
+
color: ${d.colors.text2};
|
|
2252
|
+
cursor: pointer;
|
|
2253
|
+
|
|
2254
|
+
/* One chevron glyph turned into ‹ / › so no extra asset is needed. */
|
|
2255
|
+
.ico {
|
|
2256
|
+
width: 11px;
|
|
2257
|
+
height: 11px;
|
|
2258
|
+
transform: rotate(-90deg);
|
|
2259
|
+
}
|
|
2260
|
+
&[data-dir='prev'] .ico {
|
|
2261
|
+
transform: rotate(90deg);
|
|
2262
|
+
}
|
|
2263
|
+
&:disabled {
|
|
2264
|
+
border-color: ${d.colors.lineStrong};
|
|
2265
|
+
color: ${d.colors.lineStrong};
|
|
2266
|
+
cursor: default;
|
|
2267
|
+
}
|
|
2268
|
+
&:focus-visible {
|
|
2269
|
+
outline: 2px solid ${d.colors.accent};
|
|
2270
|
+
outline-offset: 2px;
|
|
2271
|
+
}
|
|
2272
|
+
`,Sv=g.p`
|
|
2273
|
+
margin: 0;
|
|
2274
|
+
padding: 32px 0;
|
|
2275
|
+
font-family: ${d.font.sans};
|
|
2276
|
+
font-size: 14px;
|
|
2277
|
+
line-height: 1.43;
|
|
2278
|
+
color: ${d.colors.muted};
|
|
2279
|
+
text-align: center;
|
|
2280
|
+
`;g.div`
|
|
2281
|
+
display: flex;
|
|
2282
|
+
flex-direction: column;
|
|
2283
|
+
gap: 8px;
|
|
2284
|
+
margin-top: 16px;
|
|
2285
|
+
|
|
2286
|
+
.classic-title {
|
|
2287
|
+
font-family: ${d.font.sans};
|
|
2288
|
+
font-weight: 600;
|
|
2289
|
+
font-size: 15px;
|
|
2290
|
+
color: ${d.colors.text2};
|
|
2291
|
+
}
|
|
2292
|
+
.classic-note {
|
|
2293
|
+
font-family: ${d.font.sans};
|
|
2294
|
+
font-size: 13px;
|
|
2295
|
+
color: ${d.colors.muted};
|
|
2296
|
+
}
|
|
2297
|
+
`;g.span`
|
|
2298
|
+
display: inline-flex;
|
|
2299
|
+
align-items: center;
|
|
2300
|
+
padding: 2px 8px;
|
|
2301
|
+
border-radius: ${d.radius.chip};
|
|
2302
|
+
background: ${d.colors.chip};
|
|
2303
|
+
font-family: ${d.font.sans};
|
|
2304
|
+
font-size: 11px;
|
|
2305
|
+
letter-spacing: 0.4px;
|
|
2306
|
+
text-transform: uppercase;
|
|
2307
|
+
color: ${d.colors.muted};
|
|
2308
|
+
`;g.a`
|
|
2309
|
+
display: inline-flex;
|
|
2310
|
+
align-items: center;
|
|
2311
|
+
gap: 6px;
|
|
2312
|
+
height: 40px;
|
|
2313
|
+
padding: 0 14px;
|
|
2314
|
+
border: 1px solid ${d.colors.lineStrong};
|
|
2315
|
+
border-radius: 12px;
|
|
2316
|
+
color: ${d.colors.accent};
|
|
2317
|
+
font-family: ${d.font.sans};
|
|
2318
|
+
font-weight: 600;
|
|
2319
|
+
font-size: 13px;
|
|
2320
|
+
text-decoration: none;
|
|
2321
|
+
|
|
2322
|
+
&:hover {
|
|
2323
|
+
background: ${d.colors.chip};
|
|
2324
|
+
}
|
|
2325
|
+
.ico {
|
|
2326
|
+
width: 14px;
|
|
2327
|
+
height: 14px;
|
|
2328
|
+
}
|
|
2329
|
+
`;const Mr=10,Mv=!1;function _v(n){return/^0x[a-fA-F0-9]{40}$/.test(n)?`${n.slice(0,6)}…${n.slice(-4)}`:n}function jv(n){let a=0;for(let t=0;t<n.length;t++)a=a*31+n.charCodeAt(t)>>>0;return`hsl(${a%360}, 52%, 45%)`}function Iv(n,a){var t;return(((t=n==null?void 0:n.trim())==null?void 0:t[0])||a.replace(/^0x/i,"")[0]||"?").toUpperCase()}function Pv(n){return n%100>=11&&n%100<=13?"th":["th","st","nd","rd"][n%10]??"th"}function Ev(n,a){const t=new Date(n);return Number.isNaN(t.getTime())?"—":a==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(t)} ${t.getDate()}${Pv(t.getDate())}, ${t.getFullYear()}`:new Intl.DateTimeFormat(a,{day:"numeric",month:"long",year:"numeric"}).format(t)}function Tv(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function $v({r:n,seller:a,issuedId:t,labels:e,locale:r,isOwn:o,isLegacy:i,inCart:c,fallbackImage:l,onAdd:p,onBuyNative:u,onBuyLegacy:h}){var N,R;const x=pn(),{data:b}=Gr(a),y=(R=(N=b==null?void 0:b.avatar)==null?void 0:N.snapshots)==null?void 0:R.face256,[w,k]=v.useState(!1);v.useEffect(()=>k(!1),[y]);const f=!!y&&!w,C=a?b!=null&&b.name?Xr(b.name):_v(a):void 0,P=f?s.jsx("img",{className:"owner-ava",src:y,alt:"",loading:"lazy",onError:()=>k(!0)}):a?s.jsx("span",{className:"owner-ava",style:{backgroundColor:jv(a)},"aria-hidden":!0,children:Iv(b==null?void 0:b.name,a)}):l?s.jsx("img",{className:"owner-ava",src:l,alt:"","aria-hidden":!0}):s.jsx("span",{className:"owner-ava","aria-hidden":!0}),T=s.jsxs(s.Fragment,{children:[P,C?s.jsx("span",{className:"owner-name","data-testid":"resale-seller",children:C}):null]});return s.jsxs("tr",{"data-testid":"resale-row","data-source":n.source,"data-own":o?"true":void 0,children:[s.jsx("td",{"data-label":e.owner,children:a?s.jsx(yv,{type:"button",onClick:()=>x(`/items/creator/${a}`),children:T}):s.jsx(xv,{children:T})}),s.jsx("td",{"data-label":e.itemNumber,children:t?s.jsxs("span",{"data-testid":"resale-issued",children:["#",t]}):s.jsx(Os,{children:"—"})}),s.jsx("td",{"data-label":e.expiration,children:n.saleEndsAt?Ev(n.saleEndsAt,r):s.jsx(Os,{children:"—"})}),s.jsx("td",{"data-label":e.price,children:s.jsxs(bv,{children:[s.jsxs("span",{className:"amount",children:[i?s.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,s.jsx(Oe,{className:"ccy"}),s.jsx("span",{children:Ot(n.priceCredits)})]}),s.jsx(vv,{"data-persistent":o?"true":void 0,children:o?s.jsx(kv,{"data-testid":"resale-own",children:m("resales.yourListing")}):i?s.jsx(As,{onClick:h,"aria-label":m("assetCard.buyNow"),"data-testid":"resale-buy",children:m("resales.buy")}):s.jsxs(s.Fragment,{children:[s.jsxs(wv,{onClick:p,disabled:c,"aria-label":c?m("assetCard.inCart"):m("assetCard.addToCart"),"data-testid":"resale-add",children:[s.jsx(V,{name:"cart",className:"ico"}),s.jsx("span",{children:c?m("assetCard.inCart"):m("resales.add")})]}),s.jsx(As,{onClick:u,"aria-label":m("assetCard.buyNow"),"data-testid":"resale-buy",children:m("resales.buy")})]})})]})})]})}function Nv({item:n,onClose:a}){var B;const t=n.contractAddress,e=n.itemId,r=fn(),o=tr(M=>M.add),i=tr(M=>M.items),{session:c}=on(),l=Id(M=>M.locale),p=(B=c==null?void 0:c.address)==null?void 0:B.toLowerCase(),u=v.useRef(null),[h,x]=v.useState(null),[b,y]=v.useState(null),[w,k]=v.useState("cheapest"),[f,C]=v.useState(0),P=!!h||!!b;v.useEffect(()=>{var M;(M=u.current)==null||M.focus()},[]),v.useEffect(()=>{function M(q){q.key==="Escape"&&!P&&a()}window.addEventListener("keydown",M);const X=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",M),document.body.style.overflow=X}},[P,a]);const{data:T=[],isLoading:N}=ye({queryKey:["item-resales",t,e],enabled:!!t&&!!e,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>xc(t,e)}),R=v.useMemo(()=>w==="cheapest"?T:[...T].sort((M,X)=>X.priceCredits-M.priceCredits),[T,w]),S=Math.max(1,Math.ceil(R.length/Mr)),D=Math.min(f,S-1),j=R.slice(D*Mr,D*Mr+Mr),A=j.filter(M=>!M.seller||!M.issuedId).map(M=>M.tokenId).filter(M=>!!M),{data:H={}}=ye({queryKey:["resale-token-info",t,A.join(",")],enabled:!!t&&A.length>0,staleTime:6e4,queryFn:()=>Pd(t,A)}),{data:F=[]}=ye({queryKey:["item-classic-orders",t,e],enabled:Mv,queryFn:()=>Ed(t,e)}),K=T.some(M=>M.source==="legacy"),{data:G}=gc(K);function z(){r.invalidateQueries({queryKey:["item-resales",t,e]})}const E={owner:m("resales.colOwner"),itemNumber:m("resales.colItemNumber"),expiration:m("resales.colExpiration"),price:m("resales.colPrice")};return s.jsxs(s.Fragment,{children:[s.jsx(iv,{onClick:P?void 0:a,role:"presentation",children:s.jsxs(sv,{ref:u,tabIndex:-1,onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("resales.modalTitle"),"data-testid":"resellers-modal",children:[s.jsxs(cv,{children:[s.jsx(lv,{children:m("resales.modalTitle")}),s.jsx(dv,{onClick:a,"aria-label":m("resales.close"),"data-testid":"resellers-close",children:s.jsx(V,{name:"close"})})]}),s.jsxs(uv,{children:[s.jsxs(pv,{children:[s.jsx(fv,{"data-testid":"resales-count",children:m("resales.count",{count:T.length})}),s.jsxs(hv,{children:[s.jsxs("select",{value:w,onChange:M=>{k(M.target.value),C(0)},"aria-label":m("resales.sortLabel"),"data-testid":"resales-sort",children:[s.jsx("option",{value:"cheapest",children:m("resales.sortCheapest")}),s.jsx("option",{value:"most_expensive",children:m("resales.sortExpensive")})]}),s.jsx(V,{name:"chevron-down",className:"chev"})]})]}),N?null:R.length===0?s.jsx(Sv,{"data-testid":"resales-empty",children:m("resales.empty")}):null,R.length>0?s.jsxs(s.Fragment,{children:[s.jsx(mv,{children:s.jsxs(gv,{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:E.owner}),s.jsx("th",{scope:"col",children:E.itemNumber}),s.jsx("th",{scope:"col",children:E.expiration}),s.jsx("th",{scope:"col",children:E.price})]})}),s.jsx("tbody",{children:j.map(M=>{const X=M.source==="legacy",q=i.some(xe=>xe.id===M.id),Z=M.tokenId&&H[M.tokenId]||{},ae=M.issuedId??Z.issuedId,Le=M.seller??Z.seller,je={...M,name:M.name||n.name,thumbnail:M.thumbnail||n.thumbnail,rarity:M.rarity||n.rarity,category:M.category||n.category,wearableCategory:M.wearableCategory??n.wearableCategory,gender:M.gender??n.gender},ue=!!Le&&!!p&&Le.toLowerCase()===p;return s.jsx($v,{r:je,seller:Le,issuedId:ae,labels:E,locale:l,isOwn:ue,isLegacy:X,inCart:q,fallbackImage:je.thumbnail,onAdd:()=>o(je,"item_detail"),onBuyNative:()=>x(je),onBuyLegacy:()=>y(Tv(je))},M.tradeId??M.id)})})]})}),S>1?s.jsxs(Dv,{children:[s.jsx(Ls,{"data-dir":"prev",onClick:()=>C(M=>Math.max(0,M-1)),disabled:D===0,"aria-label":m("resales.prevPage"),"data-testid":"resale-prev-page",children:s.jsx(V,{name:"chevron-down"})}),s.jsx(Cv,{"data-testid":"resale-page-label",children:m("resales.page",{page:D+1,total:S})}),s.jsx(Ls,{onClick:()=>C(M=>Math.min(S-1,M+1)),disabled:D>=S-1,"aria-label":m("resales.nextPage"),"data-testid":"resale-next-page",children:s.jsx(V,{name:"chevron-down"})})]}):null]}):null,null]})]})}),h?s.jsx(Ua,{item:h,onClose:()=>{x(null),z()}}):null,b&&G?s.jsx(ml,{listing:b,rate:G,onClose:()=>y(null),onSold:()=>{y(null),z()}}):null]})}const Rv="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:Te,font:bl,radius:bo,z:Ov}=d,Av=g.div`
|
|
2330
|
+
position: fixed;
|
|
2331
|
+
inset: 0;
|
|
2332
|
+
z-index: ${Ov.overlay};
|
|
2333
|
+
display: flex;
|
|
2334
|
+
align-items: center;
|
|
2335
|
+
justify-content: center;
|
|
2336
|
+
overflow-y: auto;
|
|
2337
|
+
padding: 16px;
|
|
2338
|
+
background: rgba(22, 21, 24, 0.55);
|
|
2339
|
+
`,Lv=g.div`
|
|
2340
|
+
width: 560px;
|
|
2341
|
+
max-width: 100%;
|
|
2342
|
+
max-height: 100%;
|
|
2343
|
+
overflow-y: auto;
|
|
2344
|
+
padding: 12px 16px 16px;
|
|
2345
|
+
border-radius: ${bo.modal};
|
|
2346
|
+
background: ${Te.white};
|
|
2347
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
2348
|
+
display: flex;
|
|
2349
|
+
flex-direction: column;
|
|
2350
|
+
gap: 24px;
|
|
2351
|
+
font-family: ${bl.sans};
|
|
2352
|
+
|
|
2353
|
+
/* Focused on mount for screen readers; it is not tab-reachable, so it never needs a visible ring. */
|
|
2354
|
+
&:focus {
|
|
2355
|
+
outline: none;
|
|
2356
|
+
}
|
|
2357
|
+
`,Fv=g.div`
|
|
2358
|
+
display: flex;
|
|
2359
|
+
align-items: center;
|
|
2360
|
+
justify-content: space-between;
|
|
2361
|
+
gap: 8px;
|
|
2362
|
+
padding-bottom: 16px;
|
|
2363
|
+
border-bottom: 1px solid ${Te.gray4};
|
|
2364
|
+
`,Yv=g.h2`
|
|
2365
|
+
margin: 0;
|
|
2366
|
+
font-weight: 600;
|
|
2367
|
+
font-size: 20px;
|
|
2368
|
+
line-height: 1.6;
|
|
2369
|
+
color: ${Te.text};
|
|
2370
|
+
`,Wv=g.button`
|
|
2371
|
+
position: relative;
|
|
2372
|
+
flex: none;
|
|
2373
|
+
display: grid;
|
|
2374
|
+
place-items: center;
|
|
2375
|
+
width: 18.535px;
|
|
2376
|
+
height: 18.535px;
|
|
2377
|
+
padding: 0;
|
|
2378
|
+
border: 0;
|
|
2379
|
+
background: none;
|
|
2380
|
+
cursor: pointer;
|
|
2381
|
+
color: ${Te.text};
|
|
2382
|
+
|
|
2383
|
+
.ico {
|
|
2384
|
+
width: 100%;
|
|
2385
|
+
height: 100%;
|
|
2386
|
+
}
|
|
2387
|
+
/* Keeps the glyph exactly where the design puts it while giving it a tappable hit area. */
|
|
2388
|
+
&::after {
|
|
2389
|
+
content: '';
|
|
2390
|
+
position: absolute;
|
|
2391
|
+
inset: -11px;
|
|
2392
|
+
}
|
|
2393
|
+
&:focus-visible {
|
|
2394
|
+
outline: 2px solid ${Te.accent};
|
|
2395
|
+
outline-offset: 2px;
|
|
2396
|
+
}
|
|
2397
|
+
`,Bv=g.div`
|
|
2398
|
+
padding: 24px 16px;
|
|
2399
|
+
border-radius: ${bo.modal};
|
|
2400
|
+
background: ${Te.promptLilac};
|
|
2401
|
+
display: flex;
|
|
2402
|
+
flex-direction: column;
|
|
2403
|
+
align-items: center;
|
|
2404
|
+
gap: 16px;
|
|
2405
|
+
text-align: center;
|
|
2406
|
+
`,Hv=g.img`
|
|
2407
|
+
flex: none;
|
|
2408
|
+
width: 76px;
|
|
2409
|
+
height: 76px;
|
|
2410
|
+
`,zv=g.h3`
|
|
2411
|
+
margin: 0;
|
|
2412
|
+
font-weight: 700;
|
|
2413
|
+
font-size: 20px;
|
|
2414
|
+
line-height: 1.334;
|
|
2415
|
+
color: ${Te.text2};
|
|
2416
|
+
`,qv=g.p`
|
|
2417
|
+
margin: 0;
|
|
2418
|
+
font-weight: 400;
|
|
2419
|
+
font-size: 16px;
|
|
2420
|
+
line-height: 1.334;
|
|
2421
|
+
color: ${Te.text2};
|
|
2422
|
+
`,Kv=g.div`
|
|
2423
|
+
display: flex;
|
|
2424
|
+
align-items: center;
|
|
2425
|
+
gap: 12px;
|
|
2426
|
+
`,vl=`
|
|
2427
|
+
flex: 1 1 0;
|
|
2428
|
+
min-width: 0;
|
|
2429
|
+
display: inline-flex;
|
|
2430
|
+
align-items: center;
|
|
2431
|
+
justify-content: center;
|
|
2432
|
+
gap: 12px;
|
|
2433
|
+
height: 46px;
|
|
2434
|
+
padding: 0 12px;
|
|
2435
|
+
border-radius: ${bo.card};
|
|
2436
|
+
font-family: ${bl.sans};
|
|
2437
|
+
font-weight: 600;
|
|
2438
|
+
font-size: 13px;
|
|
2439
|
+
line-height: 24px;
|
|
2440
|
+
letter-spacing: 0.46px;
|
|
2441
|
+
text-transform: uppercase;
|
|
2442
|
+
cursor: pointer;
|
|
2443
|
+
transition:
|
|
2444
|
+
background 0.15s ease,
|
|
2445
|
+
color 0.15s ease;
|
|
2446
|
+
|
|
2447
|
+
&:focus-visible {
|
|
2448
|
+
outline: 2px solid ${Te.accent};
|
|
2449
|
+
outline-offset: 2px;
|
|
2450
|
+
}
|
|
2451
|
+
`,Qv=g.button`
|
|
2452
|
+
${vl};
|
|
2453
|
+
border: 0.5px solid ${Te.text};
|
|
2454
|
+
background: ${Te.white};
|
|
2455
|
+
color: ${Te.text2};
|
|
2456
|
+
|
|
2457
|
+
&:hover {
|
|
2458
|
+
background: ${Te.panel};
|
|
2459
|
+
}
|
|
2460
|
+
`,Vv=g.a`
|
|
2461
|
+
${vl};
|
|
2462
|
+
border: 0;
|
|
2463
|
+
background: ${Te.dclRed};
|
|
2464
|
+
color: ${Te.softWhite};
|
|
2465
|
+
text-decoration: none;
|
|
2466
|
+
|
|
2467
|
+
&:hover {
|
|
2468
|
+
filter: brightness(1.08);
|
|
2469
|
+
}
|
|
2470
|
+
`,Uv=g.span`
|
|
2471
|
+
flex: none;
|
|
2472
|
+
display: grid;
|
|
2473
|
+
place-items: center;
|
|
2474
|
+
width: 24px;
|
|
2475
|
+
height: 24px;
|
|
2476
|
+
|
|
2477
|
+
.ico {
|
|
2478
|
+
width: 100%;
|
|
2479
|
+
height: 100%;
|
|
2480
|
+
}
|
|
2481
|
+
`;function Gv(n,a){return`${Lt.marketplaceUrl}/contracts/${n}/tokens/${a}`}function Xv({contractAddress:n,tokenId:a,onClose:t}){const e=v.useRef(null),r=v.useRef(t);return r.current=t,v.useEffect(()=>{var i;(i=e.current)==null||i.focus();function o(c){c.key==="Escape"&&r.current()}return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[]),s.jsx(Av,{role:"presentation",onClick:t,children:s.jsxs(Lv,{ref:e,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":m("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:o=>o.stopPropagation(),children:[s.jsxs(Fv,{children:[s.jsx(Yv,{children:m("marketplaceRedirect.title")}),s.jsx(Wv,{onClick:t,"aria-label":m("marketplaceRedirect.close"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsxs(Bv,{children:[s.jsx(Hv,{src:Rv,alt:"","aria-hidden":!0}),s.jsx(zv,{children:m("marketplaceRedirect.heading")}),s.jsx(qv,{children:m("marketplaceRedirect.body")})]}),s.jsxs(Kv,{children:[s.jsx(Qv,{onClick:t,"data-testid":"marketplace-redirect-cancel",children:m("marketplaceRedirect.cancel")}),s.jsxs(Vv,{href:Gv(n,a),target:"_blank",rel:"noreferrer","data-testid":"marketplace-redirect-continue",children:[m("marketplaceRedirect.continue"),s.jsx(Uv,{"aria-hidden":!0,children:s.jsx(V,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function vo(){return Lt.shopServerUrl||null}function wl(){return!!vo()}async function Jv(n,a,t){const e=vo();if(!e)return{subscribed:!1};const r=new URLSearchParams({contractAddress:n,itemId:a}),o=`${e}/notify-requests?${r.toString()}`,i=await yc(o,{method:"GET",identity:t,metadata:{}});if(!i.ok)throw new Error(`getNotifyRequest ${i.status}`);return e0(i,"getNotifyRequest")}async function Zv(n,a){const t=vo();if(!t)throw new Error("createNotifyRequest: no shop-server host configured");const e=`${t}/notify-requests`,r=await yc(e,{method:"POST",identity:a,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new Error(`createNotifyRequest ${r.status}: ${await r.text()}`);const o=await r.text();if(o.trim()&&!t0(o))throw new Error("createNotifyRequest: response was not JSON")}async function e0(n,a){try{return await n.json()}catch{throw new Error(`${a}: response was not JSON`)}}function t0(n){try{return JSON.parse(n),!0}catch{return!1}}const{colors:Ge,radius:kl}=d,Dl=On`
|
|
2482
|
+
display: flex;
|
|
2483
|
+
flex-direction: column;
|
|
2484
|
+
gap: 8px;
|
|
2485
|
+
width: 100%;
|
|
2486
|
+
`,n0=g.form`
|
|
2487
|
+
${Dl};
|
|
2488
|
+
`,Fs=g.div`
|
|
2489
|
+
${Dl};
|
|
2490
|
+
|
|
2491
|
+
&[data-done] {
|
|
2492
|
+
flex-direction: row;
|
|
2493
|
+
align-items: center;
|
|
2494
|
+
gap: 16px;
|
|
2495
|
+
padding: 12px;
|
|
2496
|
+
border-radius: 16px;
|
|
2497
|
+
background: #c1d8c9;
|
|
2498
|
+
}
|
|
2499
|
+
`,r0=g.label`
|
|
2500
|
+
font-size: 14px;
|
|
2501
|
+
color: ${Ge.softWhite};
|
|
2502
|
+
`,a0=g.div`
|
|
2503
|
+
display: flex;
|
|
2504
|
+
align-items: stretch;
|
|
2505
|
+
gap: 8px;
|
|
2506
|
+
`,o0=g.input`
|
|
2507
|
+
flex: 1;
|
|
2508
|
+
min-width: 0;
|
|
2509
|
+
height: 42px;
|
|
2510
|
+
padding: 0 16px;
|
|
2511
|
+
border: 1px solid ${Ge.fieldBorder};
|
|
2512
|
+
border-radius: ${kl.btn};
|
|
2513
|
+
background: rgba(255, 255, 255, 0.1);
|
|
2514
|
+
font-size: 16px;
|
|
2515
|
+
color: ${Ge.softWhite};
|
|
2516
|
+
|
|
2517
|
+
&::placeholder {
|
|
2518
|
+
color: ${Ge.gray4};
|
|
2519
|
+
}
|
|
2520
|
+
&:focus-visible {
|
|
2521
|
+
outline: none;
|
|
2522
|
+
border-color: ${Ge.white};
|
|
2523
|
+
box-shadow: 0 0 0 1px ${Ge.white};
|
|
2524
|
+
}
|
|
2525
|
+
`,Ys=g.button`
|
|
2526
|
+
flex-shrink: 0;
|
|
2527
|
+
height: 40px;
|
|
2528
|
+
padding: 0 12px;
|
|
2529
|
+
border: 0;
|
|
2530
|
+
border-radius: ${kl.card};
|
|
2531
|
+
background: ${Ge.softWhite};
|
|
2532
|
+
color: ${Ge.text};
|
|
2533
|
+
font-weight: 600;
|
|
2534
|
+
font-size: 15px;
|
|
2535
|
+
line-height: 24px;
|
|
2536
|
+
text-transform: uppercase;
|
|
2537
|
+
letter-spacing: 0.46px;
|
|
2538
|
+
cursor: pointer;
|
|
2539
|
+
transition: background 0.15s ease;
|
|
2540
|
+
|
|
2541
|
+
&[data-full] {
|
|
2542
|
+
width: 100%;
|
|
2543
|
+
flex-shrink: 1;
|
|
2544
|
+
}
|
|
2545
|
+
&:hover:not(:disabled) {
|
|
2546
|
+
background: ${Ge.white};
|
|
2547
|
+
}
|
|
2548
|
+
&:disabled {
|
|
2549
|
+
opacity: 0.5;
|
|
2550
|
+
cursor: default;
|
|
2551
|
+
}
|
|
2552
|
+
`,i0=g.span`
|
|
2553
|
+
display: inline-flex;
|
|
2554
|
+
align-items: center;
|
|
2555
|
+
justify-content: center;
|
|
2556
|
+
flex-shrink: 0;
|
|
2557
|
+
width: 20px;
|
|
2558
|
+
height: 20px;
|
|
2559
|
+
border-radius: 50%;
|
|
2560
|
+
background: #34ce76;
|
|
2561
|
+
color: ${Ge.white};
|
|
2562
|
+
`,s0=g.span`
|
|
2563
|
+
font-size: 16px;
|
|
2564
|
+
line-height: 1.5;
|
|
2565
|
+
color: ${Ge.text2};
|
|
2566
|
+
`;function Ws(n){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.trim())}function c0({item:n}){const a=on(k=>k.session),t=on(k=>k.signIn),[e,r]=v.useState(""),[o,i]=v.useState(!1),[c,l]=v.useState(!1),[p,u]=v.useState(null),h=wl(),x=h&&!!a&&!!n.contractAddress&&!!n.itemId,{data:b}=ye({queryKey:["notify-request",n.contractAddress,n.itemId,a==null?void 0:a.address],enabled:x,queryFn:()=>Jv(n.contractAddress,n.itemId,a.identity)});v.useEffect(()=>{b!=null&&b.email&&r(k=>k||b.email)},[b==null?void 0:b.email]),v.useEffect(()=>{if(!a||!h)return;let k=!1;return Td().then(f=>{!k&&f&&r(C=>C||f)}),()=>{k=!0}},[h,a]);const y=c||!!(b!=null&&b.subscribed);async function w(k){if(k.preventDefault(),!(!a||!n.itemId||!Ws(e)||o)){i(!0),u(null);try{await Zv({contractAddress:n.contractAddress,itemId:n.itemId,chainId:n.chainId,email:e.trim()},a.identity),l(!0)}catch(f){Me(f,{flow:"notify-me",contractAddress:n.contractAddress,itemId:n.itemId}),u(m("notifyMe.error"))}finally{i(!1)}}}return h?a?y?s.jsxs(Fs,{"data-done":!0,"data-testid":"notify-subscribed",children:[s.jsx(i0,{"aria-hidden":!0,children:s.jsx(V,{name:"check",size:12})}),s.jsx(s0,{children:m("notifyMe.subscribedBody")})]}):s.jsxs(n0,{onSubmit:k=>void w(k),"data-testid":"notify",children:[s.jsx(r0,{htmlFor:"notify-email",children:m("notifyMe.label")}),s.jsxs(a0,{children:[s.jsx(o0,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:m("notifyMe.placeholder"),value:e,onChange:k=>r(k.target.value),"data-testid":"notify-email"}),s.jsx(Ys,{type:"submit",disabled:!Ws(e)||o,"data-testid":"notify-submit",children:o?m("notifyMe.working"):m("notifyMe.cta")})]}),s.jsx(Ft,{message:p})]}):s.jsx(Fs,{"data-testid":"notify",children:s.jsx(Ys,{type:"button","data-full":!0,onClick:t,"data-testid":"notify-signin",children:m("notifyMe.signInCta")})}):null}const l0=new Map(Object.entries(Lp).flatMap(([n,a])=>a.length===1?[[a[0],n]]:[])),Mn="/items";function d0(n){return n?`${Mn}?rarities=${encodeURIComponent(n.toLowerCase())}`:null}function u0(n){const a=n.wearableCategory;if(a){const t=l0.get(a);return t?`${Mn}?category=wearable&subCategory=${encodeURIComponent(t)}`:`${Mn}?category=wearable`}return n.category==="emote"?`${Mn}?category=emote`:n.category==="wearable"?`${Mn}?category=wearable`:null}function p0(){return`${Mn}?smart=true`}const Cl="shop:recently-viewed",Sl=12;function f0(){try{const n=localStorage.getItem(Cl);if(!n)return[];const a=JSON.parse(n);return Array.isArray(a)?a.slice(0,Sl):[]}catch{return[]}}function h0(n){if(n!=null&&n.id)try{const a=[n,...f0().filter(t=>t.id!==n.id)].slice(0,Sl);localStorage.setItem(Cl,JSON.stringify(a))}catch{}}const m0=g($d)`
|
|
2567
|
+
display: flex;
|
|
2568
|
+
flex-direction: column;
|
|
2569
|
+
overflow: hidden;
|
|
2570
|
+
gap: 1px;
|
|
2571
|
+
background: ${d.colors.lineStrong};
|
|
2572
|
+
|
|
2573
|
+
/* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
|
|
2574
|
+
full height. */
|
|
2575
|
+
& [data-collage-row] {
|
|
2576
|
+
display: flex;
|
|
2577
|
+
flex: 1 1 50%;
|
|
2578
|
+
min-height: 0;
|
|
2579
|
+
gap: 1px;
|
|
2580
|
+
}
|
|
2581
|
+
& [data-collage-row][data-full] {
|
|
2582
|
+
flex-basis: 100%;
|
|
2583
|
+
}
|
|
2584
|
+
& [data-collage-row] img {
|
|
2585
|
+
flex: 1 1 0;
|
|
2586
|
+
min-width: 0;
|
|
2587
|
+
width: 100%;
|
|
2588
|
+
height: 100%;
|
|
2589
|
+
object-fit: cover;
|
|
2590
|
+
display: block;
|
|
2591
|
+
}
|
|
2592
|
+
`;function g0({contractAddress:n,name:a,items:t,className:e}){const r=pn();if(!n||!a)return null;const o=(t??[]).map(l=>l.thumbnail).filter(l=>!!l).slice(0,4),i=o.slice(0,2),c=o.slice(2,4);return s.jsxs(Nd,{as:"button","data-link":!0,className:e,"data-testid":"creator",onClick:l=>{l.stopPropagation(),r(`/collection/${n}`)},children:[o.length>0?s.jsxs(m0,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[s.jsx("span",{"data-collage-row":!0,"data-full":c.length===0||void 0,children:i.map((l,p)=>s.jsx("img",{src:l,alt:""},p))}),c.length>0?s.jsx("span",{"data-collage-row":!0,children:c.map((l,p)=>s.jsx("img",{src:l,alt:""},p))}):null]}):null,s.jsx(Rd,{"data-testid":"creator-name",children:Xr(a)})]})}const{colors:O,radius:Ln,media:ke,font:x0,gradients:y0}=d,b0=g.div`
|
|
2593
|
+
max-width: 1721px;
|
|
2594
|
+
margin: 0 auto;
|
|
2595
|
+
|
|
2596
|
+
${ke.maxWidth("lg")} {
|
|
2597
|
+
padding-bottom: 88px;
|
|
2598
|
+
}
|
|
2599
|
+
`,v0=g.nav`
|
|
2600
|
+
display: flex;
|
|
2601
|
+
align-items: center;
|
|
2602
|
+
gap: 8px;
|
|
2603
|
+
font-size: 13px;
|
|
2604
|
+
color: ${O.gray4};
|
|
2605
|
+
margin-bottom: 24px;
|
|
2606
|
+
`,w0=g.button`
|
|
2607
|
+
background: none;
|
|
2608
|
+
border: 0;
|
|
2609
|
+
padding: 0;
|
|
2610
|
+
font: inherit;
|
|
2611
|
+
color: ${O.gray4};
|
|
2612
|
+
|
|
2613
|
+
&:hover {
|
|
2614
|
+
color: ${O.white};
|
|
2615
|
+
}
|
|
2616
|
+
`,k0=g.span`
|
|
2617
|
+
color: ${O.muted2};
|
|
2618
|
+
`,D0=g.span`
|
|
2619
|
+
color: ${O.softWhite};
|
|
2620
|
+
font-weight: 600;
|
|
2621
|
+
`,C0=g.div`
|
|
2622
|
+
display: grid;
|
|
2623
|
+
grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
|
|
2624
|
+
gap: 48px;
|
|
2625
|
+
align-items: start;
|
|
2626
|
+
|
|
2627
|
+
${ke.maxWidth("lg")} {
|
|
2628
|
+
grid-template-columns: 1fr;
|
|
2629
|
+
gap: 24px;
|
|
2630
|
+
}
|
|
2631
|
+
`,S0=g.div`
|
|
2632
|
+
position: relative;
|
|
2633
|
+
aspect-ratio: 1045 / 752;
|
|
2634
|
+
border-radius: ${Ln.banner};
|
|
2635
|
+
overflow: hidden;
|
|
2636
|
+
/* Light surface, deliberately AGAINST the Figma's translucent black (1052:151284): the dark violet
|
|
2637
|
+
backdrop muted every item, so the preview keeps the light stage. The iframe is transparent — this
|
|
2638
|
+
is the scene's backdrop. */
|
|
2639
|
+
background: ${O.media};
|
|
2640
|
+
|
|
2641
|
+
/* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
|
|
2642
|
+
shell's gutter instead of sitting inside it. No transform, which would make this the containing block
|
|
2643
|
+
for the absolutely-positioned controls below. */
|
|
2644
|
+
${ke.maxWidth("lg")} {
|
|
2645
|
+
aspect-ratio: 1 / 1;
|
|
2646
|
+
width: 100vw;
|
|
2647
|
+
margin-left: calc(-50vw + 50%);
|
|
2648
|
+
border-radius: 0;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
& iframe,
|
|
2652
|
+
& > * {
|
|
2653
|
+
width: 100%;
|
|
2654
|
+
height: 100%;
|
|
2655
|
+
border: 0;
|
|
2656
|
+
display: block;
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
/* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
|
|
2660
|
+
Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
|
|
2661
|
+
above) nor blocks the preview controls. */
|
|
2662
|
+
& > [data-preview-viewport] {
|
|
2663
|
+
position: absolute;
|
|
2664
|
+
inset: 0;
|
|
2665
|
+
pointer-events: none;
|
|
2666
|
+
z-index: 0;
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
& > [data-preview-toggle] {
|
|
2670
|
+
position: absolute;
|
|
2671
|
+
top: 16px;
|
|
2672
|
+
left: 16px;
|
|
2673
|
+
z-index: 2;
|
|
2674
|
+
width: auto;
|
|
2675
|
+
height: auto;
|
|
2676
|
+
display: inline-flex;
|
|
2677
|
+
gap: 2px;
|
|
2678
|
+
padding: 3px;
|
|
2679
|
+
background: rgba(255, 255, 255, 0.92);
|
|
2680
|
+
border: 1px solid ${O.line};
|
|
2681
|
+
border-radius: 999px;
|
|
2682
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
|
2683
|
+
|
|
2684
|
+
/* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
|
|
2685
|
+
container carries no fill, gap or padding of its own there. */
|
|
2686
|
+
${ke.maxWidth("lg")} {
|
|
2687
|
+
top: auto;
|
|
2688
|
+
left: auto;
|
|
2689
|
+
right: 16px;
|
|
2690
|
+
bottom: 16px;
|
|
2691
|
+
gap: 0;
|
|
2692
|
+
padding: 0;
|
|
2693
|
+
background: none;
|
|
2694
|
+
border: 0;
|
|
2695
|
+
box-shadow: none;
|
|
2696
|
+
overflow: hidden;
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2700
|
+
& > [data-preview-note] {
|
|
2701
|
+
position: absolute;
|
|
2702
|
+
bottom: 14px;
|
|
2703
|
+
left: 50%;
|
|
2704
|
+
transform: translateX(-50%);
|
|
2705
|
+
z-index: 2;
|
|
2706
|
+
width: auto;
|
|
2707
|
+
height: auto;
|
|
2708
|
+
max-width: 88%;
|
|
2709
|
+
margin: 0;
|
|
2710
|
+
text-align: center;
|
|
2711
|
+
background: rgba(22, 21, 24, 0.78);
|
|
2712
|
+
color: ${O.white};
|
|
2713
|
+
font-size: 12px;
|
|
2714
|
+
font-weight: 500;
|
|
2715
|
+
padding: 6px 12px;
|
|
2716
|
+
border-radius: 999px;
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2719
|
+
& > [data-preview-loading] {
|
|
2720
|
+
position: absolute;
|
|
2721
|
+
inset: 0;
|
|
2722
|
+
z-index: 1;
|
|
2723
|
+
display: flex;
|
|
2724
|
+
align-items: center;
|
|
2725
|
+
justify-content: center;
|
|
2726
|
+
width: 100%;
|
|
2727
|
+
height: 100%;
|
|
2728
|
+
background: transparent;
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
& > [data-fav-preview] {
|
|
2732
|
+
display: none;
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
/* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
|
|
2736
|
+
wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
|
|
2737
|
+
& > [data-play-showcase] {
|
|
2738
|
+
position: absolute;
|
|
2739
|
+
bottom: 16px;
|
|
2740
|
+
left: 16px;
|
|
2741
|
+
z-index: 2;
|
|
2742
|
+
width: auto;
|
|
2743
|
+
height: auto;
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2746
|
+
${ke.maxWidth("lg")} {
|
|
2747
|
+
& > [data-preview-toggle] {
|
|
2748
|
+
top: auto;
|
|
2749
|
+
left: auto;
|
|
2750
|
+
bottom: 12px;
|
|
2751
|
+
right: 12px;
|
|
2752
|
+
gap: 0;
|
|
2753
|
+
padding: 0;
|
|
2754
|
+
background: transparent;
|
|
2755
|
+
border: 0;
|
|
2756
|
+
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2757
|
+
overflow: hidden;
|
|
2758
|
+
}
|
|
2759
|
+
& > [data-fav-preview] {
|
|
2760
|
+
display: grid;
|
|
2761
|
+
position: absolute;
|
|
2762
|
+
top: 12px;
|
|
2763
|
+
right: 12px;
|
|
2764
|
+
z-index: 3;
|
|
2765
|
+
width: 40px;
|
|
2766
|
+
height: 40px;
|
|
2767
|
+
background: rgba(255, 255, 255, 0.92);
|
|
2768
|
+
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2769
|
+
}
|
|
2770
|
+
& > [data-fav-preview]:hover {
|
|
2771
|
+
background: ${O.white};
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
`,M0=g.div``;g.span`
|
|
2775
|
+
position: absolute;
|
|
2776
|
+
inset: 0;
|
|
2777
|
+
width: 100%;
|
|
2778
|
+
height: 100%;
|
|
2779
|
+
border-radius: inherit;
|
|
2780
|
+
`;const _0=g.div`
|
|
2781
|
+
display: flex;
|
|
2782
|
+
flex-direction: column;
|
|
2783
|
+
gap: 0;
|
|
2784
|
+
`,j0=g.div`
|
|
2785
|
+
display: flex;
|
|
2786
|
+
align-items: flex-start;
|
|
2787
|
+
justify-content: space-between;
|
|
2788
|
+
gap: 12px;
|
|
2789
|
+
|
|
2790
|
+
${ke.maxWidth("lg")} {
|
|
2791
|
+
order: 0;
|
|
2792
|
+
}
|
|
2793
|
+
`,I0=g.h1`
|
|
2794
|
+
font-size: 28px;
|
|
2795
|
+
font-weight: 600;
|
|
2796
|
+
line-height: 34px;
|
|
2797
|
+
color: ${O.softWhite};
|
|
2798
|
+
|
|
2799
|
+
${ke.maxWidth("lg")} {
|
|
2800
|
+
font-size: 20px;
|
|
2801
|
+
line-height: 24px;
|
|
2802
|
+
}
|
|
2803
|
+
`,Bs=g.button`
|
|
2804
|
+
flex: none;
|
|
2805
|
+
width: 40px;
|
|
2806
|
+
height: 40px;
|
|
2807
|
+
border-radius: 50%;
|
|
2808
|
+
border: 0;
|
|
2809
|
+
background: rgba(255, 255, 255, 0.16);
|
|
2810
|
+
display: grid;
|
|
2811
|
+
place-items: center;
|
|
2812
|
+
color: ${O.softWhite};
|
|
2813
|
+
cursor: pointer;
|
|
2814
|
+
transition:
|
|
2815
|
+
color 0.12s ease,
|
|
2816
|
+
background 0.12s ease;
|
|
2817
|
+
|
|
2818
|
+
&:hover {
|
|
2819
|
+
background: rgba(255, 255, 255, 0.28);
|
|
2820
|
+
}
|
|
2821
|
+
&[data-on] {
|
|
2822
|
+
color: ${O.dclRed};
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
${ke.maxWidth("lg")} {
|
|
2826
|
+
color: ${O.text};
|
|
2827
|
+
&[data-fav-title] {
|
|
2828
|
+
display: none;
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
`,P0=g.button`
|
|
2832
|
+
display: inline-flex;
|
|
2833
|
+
align-items: center;
|
|
2834
|
+
gap: 8px;
|
|
2835
|
+
padding: 8px 14px;
|
|
2836
|
+
border: 1px solid ${O.line};
|
|
2837
|
+
border-radius: ${Ln.pill};
|
|
2838
|
+
background: rgba(255, 255, 255, 0.94);
|
|
2839
|
+
backdrop-filter: blur(6px);
|
|
2840
|
+
box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
|
|
2841
|
+
color: ${O.text};
|
|
2842
|
+
font-size: 13px;
|
|
2843
|
+
font-weight: 600;
|
|
2844
|
+
cursor: pointer;
|
|
2845
|
+
transition: background 0.12s ease;
|
|
2846
|
+
|
|
2847
|
+
&:hover {
|
|
2848
|
+
background: ${O.white};
|
|
2849
|
+
}
|
|
2850
|
+
&:focus-visible {
|
|
2851
|
+
outline: 2px solid ${O.accent};
|
|
2852
|
+
outline-offset: 2px;
|
|
2853
|
+
}
|
|
2854
|
+
`,Dn=g.div`
|
|
2855
|
+
display: inline-flex;
|
|
2856
|
+
align-items: center;
|
|
2857
|
+
gap: 5px;
|
|
2858
|
+
font-size: 12px;
|
|
2859
|
+
font-weight: 500;
|
|
2860
|
+
text-transform: uppercase;
|
|
2861
|
+
letter-spacing: 0;
|
|
2862
|
+
color: ${O.gray4};
|
|
2863
|
+
`,E0=g.div`
|
|
2864
|
+
display: flex;
|
|
2865
|
+
align-items: center;
|
|
2866
|
+
gap: 8px;
|
|
2867
|
+
flex-wrap: wrap;
|
|
2868
|
+
margin-top: 12px;
|
|
2869
|
+
|
|
2870
|
+
${ke.maxWidth("lg")} {
|
|
2871
|
+
order: 1;
|
|
2872
|
+
margin-top: 10px;
|
|
2873
|
+
}
|
|
2874
|
+
`,rt=g(hc)`
|
|
2875
|
+
height: 24px;
|
|
2876
|
+
padding: 0 8px;
|
|
2877
|
+
gap: 3px;
|
|
2878
|
+
font-size: 13px;
|
|
2879
|
+
font-weight: 500;
|
|
2880
|
+
border-radius: 4px;
|
|
2881
|
+
letter-spacing: 0.02em;
|
|
2882
|
+
text-transform: uppercase;
|
|
2883
|
+
background: rgba(255, 255, 255, 0.14);
|
|
2884
|
+
color: ${O.softWhite};
|
|
2885
|
+
|
|
2886
|
+
& .ico {
|
|
2887
|
+
color: ${O.softWhite};
|
|
2888
|
+
}
|
|
2889
|
+
&[data-variant='cat'] {
|
|
2890
|
+
background: rgba(255, 255, 255, 0.14);
|
|
2891
|
+
color: ${O.softWhite};
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
/* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
|
|
2895
|
+
#ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
|
|
2896
|
+
one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
|
|
2897
|
+
&[data-variant='blocked'] {
|
|
2898
|
+
background: rgba(255, 116, 57, 0.2);
|
|
2899
|
+
color: #ff7439;
|
|
2900
|
+
cursor: help;
|
|
2901
|
+
}
|
|
2902
|
+
&[data-variant='blocked']:focus-visible {
|
|
2903
|
+
outline: 2px solid #ff7439;
|
|
2904
|
+
outline-offset: 2px;
|
|
2905
|
+
}
|
|
2906
|
+
`,Fa=g(rt.withComponent(cc))`
|
|
2907
|
+
text-decoration: none;
|
|
2908
|
+
cursor: pointer;
|
|
2909
|
+
transition: background 0.15s ease;
|
|
2910
|
+
|
|
2911
|
+
&:hover,
|
|
2912
|
+
&:focus-visible {
|
|
2913
|
+
background: rgba(255, 255, 255, 0.26);
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
/* The rarity chip carries its own colour inline, so a background hover would be overridden and the
|
|
2917
|
+
chip would look inert. It gets a ring instead, which reads on any fill. */
|
|
2918
|
+
&[data-variant='rarity']:hover,
|
|
2919
|
+
&[data-variant='rarity']:focus-visible {
|
|
2920
|
+
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
|
|
2921
|
+
}
|
|
2922
|
+
`,T0=g.div`
|
|
2923
|
+
display: flex;
|
|
2924
|
+
flex-direction: column;
|
|
2925
|
+
align-items: flex-start;
|
|
2926
|
+
gap: 8px;
|
|
2927
|
+
`,to=g(T0)`
|
|
2928
|
+
gap: 11px;
|
|
2929
|
+
`,Hs=g.p`
|
|
2930
|
+
margin: 0;
|
|
2931
|
+
color: ${O.softWhite};
|
|
2932
|
+
font-size: 14px;
|
|
2933
|
+
line-height: 30px;
|
|
2934
|
+
display: -webkit-box;
|
|
2935
|
+
-webkit-box-orient: vertical;
|
|
2936
|
+
-webkit-line-clamp: 4;
|
|
2937
|
+
overflow: hidden;
|
|
2938
|
+
|
|
2939
|
+
&[data-expanded] {
|
|
2940
|
+
-webkit-line-clamp: unset;
|
|
2941
|
+
overflow: visible;
|
|
2942
|
+
}
|
|
2943
|
+
`,$0=g.button`
|
|
2944
|
+
font-size: 13px;
|
|
2945
|
+
align-self: flex-start;
|
|
2946
|
+
`,Ml=On`
|
|
2947
|
+
display: grid;
|
|
2948
|
+
grid-template-columns: 1fr 1fr;
|
|
2949
|
+
gap: 16px;
|
|
2950
|
+
`,_l=g.div`
|
|
2951
|
+
${Ml};
|
|
2952
|
+
/* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
|
|
2953
|
+
description belongs to the heading block it follows, the creator/collection pair is a new subject. */
|
|
2954
|
+
margin-top: 24px;
|
|
2955
|
+
|
|
2956
|
+
${ke.maxWidth("lg")} {
|
|
2957
|
+
order: 3;
|
|
2958
|
+
grid-template-columns: 1fr;
|
|
2959
|
+
/* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
|
|
2960
|
+
gap: 20px;
|
|
2961
|
+
margin-top: 20px;
|
|
2962
|
+
}
|
|
2963
|
+
`,no=g.div`
|
|
2964
|
+
min-width: 0;
|
|
2965
|
+
`,jl=g.div`
|
|
2966
|
+
${Ml};
|
|
2967
|
+
margin-top: 32px;
|
|
2968
|
+
|
|
2969
|
+
${ke.maxWidth("lg")} {
|
|
2970
|
+
order: 2;
|
|
2971
|
+
margin-top: 20px;
|
|
2972
|
+
}
|
|
2973
|
+
`,Jn=g.div`
|
|
2974
|
+
display: flex;
|
|
2975
|
+
flex-direction: column;
|
|
2976
|
+
gap: 15px;
|
|
2977
|
+
min-width: 0;
|
|
2978
|
+
|
|
2979
|
+
&[data-collection] {
|
|
2980
|
+
align-items: flex-start;
|
|
2981
|
+
}
|
|
2982
|
+
`,Il=On`
|
|
2983
|
+
&[data-testid='creator'] {
|
|
2984
|
+
color: ${O.softWhite};
|
|
2985
|
+
font-size: 14px;
|
|
2986
|
+
gap: 12px;
|
|
2987
|
+
}
|
|
2988
|
+
[data-avatar] {
|
|
2989
|
+
width: 48px;
|
|
2990
|
+
height: 48px;
|
|
2991
|
+
}
|
|
2992
|
+
[data-letter] {
|
|
2993
|
+
font-size: 18px;
|
|
2994
|
+
}
|
|
2995
|
+
[data-testid='creator-name'] {
|
|
2996
|
+
color: ${O.softWhite};
|
|
2997
|
+
font-weight: 500;
|
|
2998
|
+
text-decoration: underline;
|
|
2999
|
+
}
|
|
3000
|
+
&[data-link]:hover [data-testid='creator-name'] {
|
|
3001
|
+
color: ${O.gray4};
|
|
3002
|
+
}
|
|
3003
|
+
`,N0=g(Od)`
|
|
3004
|
+
${Il}
|
|
3005
|
+
`,R0=g(g0)`
|
|
3006
|
+
${Il}
|
|
3007
|
+
`,Pl=g.hr`
|
|
3008
|
+
border: 0;
|
|
3009
|
+
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
3010
|
+
margin: 24px 0 0;
|
|
3011
|
+
width: 100%;
|
|
3012
|
+
|
|
3013
|
+
/* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
|
|
3014
|
+
so it closes the price rather than separating it from the description. */
|
|
3015
|
+
${ke.maxWidth("lg")} {
|
|
3016
|
+
order: 5;
|
|
3017
|
+
margin-top: 16px;
|
|
3018
|
+
}
|
|
3019
|
+
`,O0=g.div`
|
|
3020
|
+
margin-top: 16px;
|
|
3021
|
+
|
|
3022
|
+
${ke.maxWidth("lg")} {
|
|
3023
|
+
order: 4;
|
|
3024
|
+
margin-top: 16px;
|
|
3025
|
+
}
|
|
3026
|
+
`,A0=g.div`
|
|
3027
|
+
display: flex;
|
|
3028
|
+
align-items: flex-start;
|
|
3029
|
+
gap: 16px;
|
|
3030
|
+
width: 100%;
|
|
3031
|
+
`,L0=g.div`
|
|
3032
|
+
flex: 1 1 auto;
|
|
3033
|
+
min-width: 0;
|
|
3034
|
+
display: flex;
|
|
3035
|
+
flex-direction: column;
|
|
3036
|
+
gap: 8px;
|
|
3037
|
+
`,zs=g.div`
|
|
3038
|
+
flex: 0 0 auto;
|
|
3039
|
+
display: flex;
|
|
3040
|
+
flex-direction: column;
|
|
3041
|
+
align-items: flex-end;
|
|
3042
|
+
gap: 8px;
|
|
3043
|
+
text-align: right;
|
|
3044
|
+
`,qs=g.div`
|
|
3045
|
+
font-size: 18px;
|
|
3046
|
+
font-weight: 500;
|
|
3047
|
+
line-height: 1;
|
|
3048
|
+
color: ${O.softWhite};
|
|
3049
|
+
|
|
3050
|
+
&[data-out] {
|
|
3051
|
+
font-size: 14px;
|
|
3052
|
+
font-weight: 600;
|
|
3053
|
+
text-transform: uppercase;
|
|
3054
|
+
letter-spacing: 0.02em;
|
|
3055
|
+
color: ${O.gray4};
|
|
3056
|
+
}
|
|
3057
|
+
`,Ks=g.div`
|
|
3058
|
+
font-size: 14px;
|
|
3059
|
+
font-weight: 600;
|
|
3060
|
+
text-transform: uppercase;
|
|
3061
|
+
letter-spacing: 0;
|
|
3062
|
+
color: ${O.muted2};
|
|
3063
|
+
`,Cn=g.div`
|
|
3064
|
+
display: flex;
|
|
3065
|
+
align-items: center;
|
|
3066
|
+
gap: 10px;
|
|
3067
|
+
font-weight: 700;
|
|
3068
|
+
color: ${O.softWhite};
|
|
3069
|
+
|
|
3070
|
+
/* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
|
|
3071
|
+
&[data-variant='none'] {
|
|
3072
|
+
display: inline-flex;
|
|
3073
|
+
align-items: center;
|
|
3074
|
+
gap: 6px;
|
|
3075
|
+
font-size: 14px;
|
|
3076
|
+
font-weight: 600;
|
|
3077
|
+
color: ${O.softWhite};
|
|
3078
|
+
}
|
|
3079
|
+
&[data-variant='sale'] {
|
|
3080
|
+
flex-wrap: wrap;
|
|
3081
|
+
gap: 10px 14px;
|
|
3082
|
+
color: ${O.dclRed};
|
|
3083
|
+
}
|
|
3084
|
+
`;g.span`
|
|
3085
|
+
display: flex;
|
|
3086
|
+
align-items: center;
|
|
3087
|
+
gap: 10px;
|
|
3088
|
+
font-weight: 700;
|
|
3089
|
+
color: ${O.dclRed};
|
|
3090
|
+
`;const Vn=g.span`
|
|
3091
|
+
font-size: 30px;
|
|
3092
|
+
line-height: 1;
|
|
3093
|
+
`,F0=g.span`
|
|
3094
|
+
display: inline-flex;
|
|
3095
|
+
color: ${O.muted2};
|
|
3096
|
+
cursor: help;
|
|
3097
|
+
|
|
3098
|
+
&:focus-visible {
|
|
3099
|
+
outline: 2px solid ${O.accent};
|
|
3100
|
+
outline-offset: 2px;
|
|
3101
|
+
border-radius: ${Ln.chip};
|
|
3102
|
+
}
|
|
3103
|
+
`,Y0=g.span`
|
|
3104
|
+
font-size: 24px;
|
|
3105
|
+
font-weight: 700;
|
|
3106
|
+
color: ${O.softWhite};
|
|
3107
|
+
margin-right: -2px;
|
|
3108
|
+
`,W0=g.div`
|
|
3109
|
+
font-size: 13px;
|
|
3110
|
+
margin-top: 6px;
|
|
3111
|
+
color: ${O.gray4};
|
|
3112
|
+
`,B0=g.span`
|
|
3113
|
+
display: inline-flex;
|
|
3114
|
+
align-items: center;
|
|
3115
|
+
gap: 6px;
|
|
3116
|
+
color: ${O.muted};
|
|
3117
|
+
text-decoration: line-through;
|
|
3118
|
+
font-weight: 600;
|
|
3119
|
+
font-size: 20px;
|
|
3120
|
+
`,H0=g.span`
|
|
3121
|
+
display: inline-flex;
|
|
3122
|
+
align-items: center;
|
|
3123
|
+
background: ${O.dclRed};
|
|
3124
|
+
color: ${O.white};
|
|
3125
|
+
font-weight: 800;
|
|
3126
|
+
font-size: 13px;
|
|
3127
|
+
letter-spacing: 0.03em;
|
|
3128
|
+
text-transform: uppercase;
|
|
3129
|
+
border-radius: 6px;
|
|
3130
|
+
padding: 4px 10px;
|
|
3131
|
+
`,z0=g(Ad)`
|
|
3132
|
+
display: inline-flex;
|
|
3133
|
+
align-items: center;
|
|
3134
|
+
gap: 5px;
|
|
3135
|
+
background: ${O.rarityBg};
|
|
3136
|
+
color: ${O.accent};
|
|
3137
|
+
font-size: 13px;
|
|
3138
|
+
font-weight: 700;
|
|
3139
|
+
border-radius: 6px;
|
|
3140
|
+
padding: 4px 10px;
|
|
3141
|
+
white-space: nowrap;
|
|
3142
|
+
`,q0=g.div`
|
|
3143
|
+
display: flex;
|
|
3144
|
+
flex-direction: column;
|
|
3145
|
+
gap: 12px;
|
|
3146
|
+
margin-top: 20px;
|
|
3147
|
+
|
|
3148
|
+
${ke.maxWidth("lg")} {
|
|
3149
|
+
order: 6;
|
|
3150
|
+
|
|
3151
|
+
&[data-buttons] {
|
|
3152
|
+
position: fixed;
|
|
3153
|
+
left: 0;
|
|
3154
|
+
right: 0;
|
|
3155
|
+
bottom: 0;
|
|
3156
|
+
z-index: 40;
|
|
3157
|
+
margin-top: 0;
|
|
3158
|
+
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
|
3159
|
+
background: #2b0e44;
|
|
3160
|
+
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
|
|
3161
|
+
}
|
|
3162
|
+
&[data-dual] {
|
|
3163
|
+
flex-direction: row;
|
|
3164
|
+
align-items: stretch;
|
|
3165
|
+
gap: 12px;
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3168
|
+
`,la=On`
|
|
3169
|
+
&& {
|
|
3170
|
+
width: 100%;
|
|
3171
|
+
height: 48px;
|
|
3172
|
+
border-radius: 16px;
|
|
3173
|
+
padding: 0 12px;
|
|
3174
|
+
display: flex;
|
|
3175
|
+
align-items: center;
|
|
3176
|
+
justify-content: center;
|
|
3177
|
+
gap: 8px;
|
|
3178
|
+
font-size: 15px;
|
|
3179
|
+
font-weight: 600;
|
|
3180
|
+
line-height: 24px;
|
|
3181
|
+
letter-spacing: 0.46px;
|
|
3182
|
+
text-transform: uppercase;
|
|
3183
|
+
}
|
|
3184
|
+
`,Ya=g(Rn)`
|
|
3185
|
+
${la};
|
|
3186
|
+
/* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
|
|
3187
|
+
cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
|
|
3188
|
+
sampled off the flattened render rather than the node's fill. */
|
|
3189
|
+
&& {
|
|
3190
|
+
background: ${y0.buyBtn};
|
|
3191
|
+
}
|
|
3192
|
+
&&::before {
|
|
3193
|
+
content: none;
|
|
3194
|
+
}
|
|
3195
|
+
&&:hover:not(:disabled) {
|
|
3196
|
+
background-image: linear-gradient(${O.dclRed}, ${O.dclRed});
|
|
3197
|
+
}
|
|
3198
|
+
|
|
3199
|
+
${ke.maxWidth("lg")} {
|
|
3200
|
+
[data-dual] && {
|
|
3201
|
+
flex: 1 1 auto;
|
|
3202
|
+
width: auto;
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
`,K0=g(Rn)`
|
|
3206
|
+
${la};
|
|
3207
|
+
&& {
|
|
3208
|
+
background: ${O.blackBtn};
|
|
3209
|
+
color: ${O.softWhite};
|
|
3210
|
+
border: 0;
|
|
3211
|
+
|
|
3212
|
+
.ico {
|
|
3213
|
+
width: 20px;
|
|
3214
|
+
height: 20px;
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
&&:hover:not(:disabled) {
|
|
3218
|
+
background: ${O.blackBtn};
|
|
3219
|
+
filter: brightness(1.35);
|
|
3220
|
+
}
|
|
3221
|
+
`,_r=g.button`
|
|
3222
|
+
align-self: center;
|
|
3223
|
+
border: 0;
|
|
3224
|
+
background: none;
|
|
3225
|
+
padding: 8px 0;
|
|
3226
|
+
color: ${d.colors.accent};
|
|
3227
|
+
font-weight: 600;
|
|
3228
|
+
font-size: 13px;
|
|
3229
|
+
line-height: 24px;
|
|
3230
|
+
letter-spacing: 0.46px;
|
|
3231
|
+
text-transform: uppercase;
|
|
3232
|
+
text-decoration: underline;
|
|
3233
|
+
cursor: pointer;
|
|
3234
|
+
|
|
3235
|
+
/* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
|
|
3236
|
+
but invisible against it. Not a change to the shared colour: the other uses live inside
|
|
3237
|
+
GaslessNotice, whose light fill is what that accent was picked for. */
|
|
3238
|
+
&[data-on-purple] {
|
|
3239
|
+
color: ${d.colors.white};
|
|
3240
|
+
}
|
|
3241
|
+
|
|
3242
|
+
&:disabled {
|
|
3243
|
+
opacity: 0.5;
|
|
3244
|
+
cursor: default;
|
|
3245
|
+
}
|
|
3246
|
+
`,Q0=g(Rn)`
|
|
3247
|
+
${la};
|
|
3248
|
+
&& {
|
|
3249
|
+
background: rgba(255, 255, 255, 0.2);
|
|
3250
|
+
color: ${O.softWhite};
|
|
3251
|
+
border: 0;
|
|
3252
|
+
|
|
3253
|
+
.ico {
|
|
3254
|
+
width: 20px;
|
|
3255
|
+
height: 20px;
|
|
3256
|
+
}
|
|
3257
|
+
}
|
|
3258
|
+
&&:hover:not(:disabled) {
|
|
3259
|
+
background: rgba(255, 255, 255, 0.3);
|
|
3260
|
+
}
|
|
3261
|
+
&&:disabled {
|
|
3262
|
+
opacity: 0.5;
|
|
3263
|
+
}
|
|
3264
|
+
`,Qs=g(Rn)`
|
|
3265
|
+
${la};
|
|
3266
|
+
&& {
|
|
3267
|
+
background: rgba(0, 0, 0, 0.4);
|
|
3268
|
+
color: ${O.white};
|
|
3269
|
+
border: 0;
|
|
3270
|
+
}
|
|
3271
|
+
&&:hover:not(:disabled) {
|
|
3272
|
+
background: rgba(0, 0, 0, 0.55);
|
|
3273
|
+
}
|
|
3274
|
+
&&:disabled {
|
|
3275
|
+
opacity: 0.5;
|
|
3276
|
+
}
|
|
3277
|
+
`,Wa=g.span`
|
|
3278
|
+
display: none;
|
|
3279
|
+
align-items: center;
|
|
3280
|
+
gap: 6px;
|
|
3281
|
+
|
|
3282
|
+
${ke.maxWidth("lg")} {
|
|
3283
|
+
[data-dual] & {
|
|
3284
|
+
display: inline-flex;
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
`,Vs=g.button`
|
|
3288
|
+
width: 100%;
|
|
3289
|
+
height: 48px;
|
|
3290
|
+
display: flex;
|
|
3291
|
+
align-items: center;
|
|
3292
|
+
justify-content: center;
|
|
3293
|
+
gap: 8px;
|
|
3294
|
+
/* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
|
|
3295
|
+
treatment as the card's ADD TO CART. */
|
|
3296
|
+
background: rgba(255, 255, 255, 0.2);
|
|
3297
|
+
color: ${O.softWhite};
|
|
3298
|
+
border: 0;
|
|
3299
|
+
border-radius: 16px;
|
|
3300
|
+
font-weight: 600;
|
|
3301
|
+
font-size: 15px;
|
|
3302
|
+
text-transform: uppercase;
|
|
3303
|
+
letter-spacing: 0.46px;
|
|
3304
|
+
cursor: pointer;
|
|
3305
|
+
transition: background 0.15s ease;
|
|
3306
|
+
|
|
3307
|
+
&:hover:not(:disabled) {
|
|
3308
|
+
background: ${O.softWhite};
|
|
3309
|
+
color: ${O.text2};
|
|
3310
|
+
}
|
|
3311
|
+
&:disabled {
|
|
3312
|
+
background: rgba(255, 255, 255, 0.12);
|
|
3313
|
+
color: rgba(252, 252, 252, 0.7);
|
|
3314
|
+
cursor: default;
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
${ke.maxWidth("lg")} {
|
|
3318
|
+
[data-dual] & {
|
|
3319
|
+
flex: 0 0 auto;
|
|
3320
|
+
width: 56px;
|
|
3321
|
+
padding: 0;
|
|
3322
|
+
}
|
|
3323
|
+
[data-dual] & .ico {
|
|
3324
|
+
margin: 0;
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
`,Us=g.span`
|
|
3328
|
+
${ke.maxWidth("lg")} {
|
|
3329
|
+
[data-dual] & {
|
|
3330
|
+
display: none;
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
`,V0=g.p`
|
|
3334
|
+
margin: 12px 0 0;
|
|
3335
|
+
font-size: 13px;
|
|
3336
|
+
color: ${O.gray4};
|
|
3337
|
+
|
|
3338
|
+
& a {
|
|
3339
|
+
color: ${O.softWhite};
|
|
3340
|
+
font-weight: 600;
|
|
3341
|
+
}
|
|
3342
|
+
`,U0=g.p`
|
|
3343
|
+
margin: 4px 0 0;
|
|
3344
|
+
font-size: 13px;
|
|
3345
|
+
color: ${O.gray4};
|
|
3346
|
+
|
|
3347
|
+
& a {
|
|
3348
|
+
color: ${O.accent};
|
|
3349
|
+
font-weight: 600;
|
|
3350
|
+
}
|
|
3351
|
+
`,G0=g.div`
|
|
3352
|
+
max-width: 1721px;
|
|
3353
|
+
margin: 0 auto;
|
|
3354
|
+
min-height: 46vh;
|
|
3355
|
+
display: flex;
|
|
3356
|
+
flex-direction: column;
|
|
3357
|
+
align-items: center;
|
|
3358
|
+
justify-content: center;
|
|
3359
|
+
text-align: center;
|
|
3360
|
+
gap: 14px;
|
|
3361
|
+
color: ${O.softWhite};
|
|
3362
|
+
`,X0=g.p`
|
|
3363
|
+
margin: 0;
|
|
3364
|
+
color: ${O.gray4};
|
|
3365
|
+
`,J0=g(Rn)`
|
|
3366
|
+
margin-top: 6px;
|
|
3367
|
+
`,Z0=g(V)`
|
|
3368
|
+
opacity: 0.4;
|
|
3369
|
+
`,ew=g.h1`
|
|
3370
|
+
font-size: 22px;
|
|
3371
|
+
`,tw=g.div`
|
|
3372
|
+
display: flex;
|
|
3373
|
+
flex-direction: column;
|
|
3374
|
+
`,Gs=g.span`
|
|
3375
|
+
display: block;
|
|
3376
|
+
height: 15px;
|
|
3377
|
+
width: 84px;
|
|
3378
|
+
border-radius: 4px;
|
|
3379
|
+
`,nw=g.div`
|
|
3380
|
+
display: flex;
|
|
3381
|
+
flex-direction: column;
|
|
3382
|
+
align-self: stretch;
|
|
3383
|
+
gap: 16px;
|
|
3384
|
+
padding: 8px 0;
|
|
3385
|
+
`,rw=g.span`
|
|
3386
|
+
display: inline-flex;
|
|
3387
|
+
align-items: center;
|
|
3388
|
+
height: 48px;
|
|
3389
|
+
gap: 10px;
|
|
3390
|
+
background: none !important;
|
|
3391
|
+
|
|
3392
|
+
&::before,
|
|
3393
|
+
&::after {
|
|
3394
|
+
content: '';
|
|
3395
|
+
display: block;
|
|
3396
|
+
}
|
|
3397
|
+
&::before {
|
|
3398
|
+
width: 40px;
|
|
3399
|
+
height: 40px;
|
|
3400
|
+
border-radius: 50%;
|
|
3401
|
+
background: ${O.media};
|
|
3402
|
+
}
|
|
3403
|
+
&::after {
|
|
3404
|
+
width: 96px;
|
|
3405
|
+
height: 14px;
|
|
3406
|
+
border-radius: 6px;
|
|
3407
|
+
background: ${O.media};
|
|
3408
|
+
}
|
|
3409
|
+
`,aw=g.span`
|
|
3410
|
+
height: 34px;
|
|
3411
|
+
width: 70%;
|
|
3412
|
+
margin: 3px 0;
|
|
3413
|
+
border-radius: 8px;
|
|
3414
|
+
`,ow=g.div`
|
|
3415
|
+
display: flex;
|
|
3416
|
+
gap: 8px;
|
|
3417
|
+
/* Same as Chips above, so the row does not move when the real chips arrive. */
|
|
3418
|
+
margin-top: 12px;
|
|
3419
|
+
`,Ba=g.span`
|
|
3420
|
+
height: 24px;
|
|
3421
|
+
width: 88px;
|
|
3422
|
+
border-radius: 6px;
|
|
3423
|
+
`,Ha=g.span`
|
|
3424
|
+
height: 14px;
|
|
3425
|
+
width: 100%;
|
|
3426
|
+
border-radius: 6px;
|
|
3427
|
+
|
|
3428
|
+
&[data-short] {
|
|
3429
|
+
width: 55%;
|
|
3430
|
+
}
|
|
3431
|
+
`,iw=g.span`
|
|
3432
|
+
display: block;
|
|
3433
|
+
height: 30px;
|
|
3434
|
+
width: 40%;
|
|
3435
|
+
margin: 16px 0 13px;
|
|
3436
|
+
border-radius: 8px;
|
|
3437
|
+
`,sw=g.span`
|
|
3438
|
+
display: block;
|
|
3439
|
+
height: 42px;
|
|
3440
|
+
width: 100%;
|
|
3441
|
+
border-radius: 8px;
|
|
3442
|
+
margin-top: 20px;
|
|
3443
|
+
`,Un=g(Oe)`
|
|
3444
|
+
width: 30px;
|
|
3445
|
+
height: 30px;
|
|
3446
|
+
color: ${O.softWhite};
|
|
3447
|
+
|
|
3448
|
+
&[data-was] {
|
|
3449
|
+
width: 20px;
|
|
3450
|
+
height: 20px;
|
|
3451
|
+
color: ${O.gray4};
|
|
3452
|
+
}
|
|
3453
|
+
`,za=g(Oe)`
|
|
3454
|
+
width: 20px;
|
|
3455
|
+
height: 20px;
|
|
3456
|
+
`,cw=g.div`
|
|
3457
|
+
display: flex;
|
|
3458
|
+
align-items: center;
|
|
3459
|
+
justify-content: space-between;
|
|
3460
|
+
gap: 8px;
|
|
3461
|
+
padding: 8px;
|
|
3462
|
+
margin: 16px 0;
|
|
3463
|
+
border-radius: ${Ln.btn};
|
|
3464
|
+
background: rgba(22, 21, 24, 0.55);
|
|
3465
|
+
`,lw=g.span`
|
|
3466
|
+
display: flex;
|
|
3467
|
+
align-items: center;
|
|
3468
|
+
gap: 8px;
|
|
3469
|
+
font-size: 14px;
|
|
3470
|
+
line-height: 14px;
|
|
3471
|
+
color: ${O.softWhite};
|
|
3472
|
+
`,dw=g(V)`
|
|
3473
|
+
width: 20px;
|
|
3474
|
+
height: 20px;
|
|
3475
|
+
color: ${O.softWhite};
|
|
3476
|
+
`,uw=g(V)`
|
|
3477
|
+
width: 24px;
|
|
3478
|
+
height: 24px;
|
|
3479
|
+
color: ${O.white};
|
|
3480
|
+
`,pw=g.div`
|
|
3481
|
+
display: flex;
|
|
3482
|
+
align-items: center;
|
|
3483
|
+
justify-content: space-between;
|
|
3484
|
+
gap: 8px;
|
|
3485
|
+
width: 100%;
|
|
3486
|
+
margin-top: 16px;
|
|
3487
|
+
|
|
3488
|
+
&[data-centered] {
|
|
3489
|
+
justify-content: center;
|
|
3490
|
+
}
|
|
3491
|
+
`,fw=g.span`
|
|
3492
|
+
display: flex;
|
|
3493
|
+
align-items: center;
|
|
3494
|
+
gap: 2px;
|
|
3495
|
+
font-size: 14px;
|
|
3496
|
+
font-weight: 600;
|
|
3497
|
+
color: ${O.gray4};
|
|
3498
|
+
|
|
3499
|
+
& .ico {
|
|
3500
|
+
width: 20px;
|
|
3501
|
+
height: 20px;
|
|
3502
|
+
color: ${O.gray4};
|
|
3503
|
+
}
|
|
3504
|
+
`,hw=g.span`
|
|
3505
|
+
font-size: 16px;
|
|
3506
|
+
font-weight: 700;
|
|
3507
|
+
padding-left: 2px;
|
|
3508
|
+
`,Xs=g.button`
|
|
3509
|
+
border: 0;
|
|
3510
|
+
background: none;
|
|
3511
|
+
padding: 0;
|
|
3512
|
+
cursor: pointer;
|
|
3513
|
+
font-family: ${x0.sans};
|
|
3514
|
+
font-size: 13px;
|
|
3515
|
+
font-weight: 600;
|
|
3516
|
+
letter-spacing: 0.46px;
|
|
3517
|
+
text-transform: uppercase;
|
|
3518
|
+
text-decoration: underline;
|
|
3519
|
+
color: ${O.softWhite};
|
|
3520
|
+
|
|
3521
|
+
&:hover {
|
|
3522
|
+
color: ${O.gray4};
|
|
3523
|
+
}
|
|
3524
|
+
&:focus-visible {
|
|
3525
|
+
outline: 2px solid ${O.white};
|
|
3526
|
+
outline-offset: 2px;
|
|
3527
|
+
border-radius: ${Ln.chip};
|
|
3528
|
+
}
|
|
3529
|
+
`,mw=g.div`
|
|
3530
|
+
display: flex;
|
|
3531
|
+
flex-direction: column;
|
|
3532
|
+
gap: 16px;
|
|
3533
|
+
width: 100%;
|
|
3534
|
+
padding: 16px 0;
|
|
3535
|
+
`,Js=g.div`
|
|
3536
|
+
display: flex;
|
|
3537
|
+
align-items: center;
|
|
3538
|
+
justify-content: space-between;
|
|
3539
|
+
gap: 8px;
|
|
3540
|
+
width: 100%;
|
|
3541
|
+
|
|
3542
|
+
&[data-variant='original'] {
|
|
3543
|
+
color: ${O.muted2};
|
|
3544
|
+
}
|
|
3545
|
+
`,Zs=g.span`
|
|
3546
|
+
display: flex;
|
|
3547
|
+
align-items: center;
|
|
3548
|
+
gap: 4px;
|
|
3549
|
+
font-size: 14px;
|
|
3550
|
+
font-weight: 600;
|
|
3551
|
+
|
|
3552
|
+
[data-variant='original'] & {
|
|
3553
|
+
color: ${O.muted2};
|
|
3554
|
+
}
|
|
3555
|
+
[data-variant='resale'] & {
|
|
3556
|
+
color: ${O.text};
|
|
3557
|
+
}
|
|
3558
|
+
`,ec=g.span`
|
|
3559
|
+
display: flex;
|
|
3560
|
+
align-items: center;
|
|
3561
|
+
gap: 2px;
|
|
3562
|
+
padding: 0 2px;
|
|
3563
|
+
|
|
3564
|
+
[data-variant='original'] & .ico {
|
|
3565
|
+
width: 20px;
|
|
3566
|
+
height: 20px;
|
|
3567
|
+
color: ${O.muted2};
|
|
3568
|
+
}
|
|
3569
|
+
[data-variant='resale'] & .ico {
|
|
3570
|
+
width: 24px;
|
|
3571
|
+
height: 24px;
|
|
3572
|
+
color: ${O.rarity};
|
|
3573
|
+
}
|
|
3574
|
+
`,tc=g.span`
|
|
3575
|
+
[data-variant='original'] & {
|
|
3576
|
+
font-size: 16px;
|
|
3577
|
+
font-weight: 700;
|
|
3578
|
+
text-decoration: line-through;
|
|
3579
|
+
}
|
|
3580
|
+
[data-variant='resale'] & {
|
|
3581
|
+
font-size: 25px;
|
|
3582
|
+
font-weight: 700;
|
|
3583
|
+
color: ${O.text};
|
|
3584
|
+
}
|
|
3585
|
+
`,gw=g.span`
|
|
3586
|
+
font-size: 14px;
|
|
3587
|
+
font-weight: 600;
|
|
3588
|
+
|
|
3589
|
+
[data-variant='original'] & {
|
|
3590
|
+
color: ${O.muted2};
|
|
3591
|
+
}
|
|
3592
|
+
`,xw=g.span`
|
|
3593
|
+
font-size: 14px;
|
|
3594
|
+
font-weight: 600;
|
|
3595
|
+
color: ${O.text2};
|
|
3596
|
+
`,nc=g.span`
|
|
3597
|
+
display: inline-flex;
|
|
3598
|
+
width: 12px;
|
|
3599
|
+
height: 12px;
|
|
3600
|
+
color: ${O.muted2};
|
|
3601
|
+
`,yw=g.div`
|
|
3602
|
+
display: flex;
|
|
3603
|
+
flex-direction: column;
|
|
3604
|
+
gap: 12px;
|
|
3605
|
+
width: 100%;
|
|
3606
|
+
`,bw=g.div`
|
|
3607
|
+
display: flex;
|
|
3608
|
+
justify-content: center;
|
|
3609
|
+
`,da=On`
|
|
3610
|
+
display: block;
|
|
3611
|
+
background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
|
|
3612
|
+
background-size: 200% 100%;
|
|
3613
|
+
animation: shimmer 1.4s infinite linear;
|
|
3614
|
+
|
|
3615
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3616
|
+
animation: none;
|
|
3617
|
+
}
|
|
3618
|
+
`,vw=g.div`
|
|
3619
|
+
display: flex;
|
|
3620
|
+
flex-direction: column;
|
|
3621
|
+
gap: 12px;
|
|
3622
|
+
width: 100%;
|
|
3623
|
+
/* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
|
|
3624
|
+
padding-top: 4px;
|
|
3625
|
+
`,ww=g.span`
|
|
3626
|
+
${da};
|
|
3627
|
+
width: 120px;
|
|
3628
|
+
height: 30px;
|
|
3629
|
+
border-radius: ${Ln.btn};
|
|
3630
|
+
margin-bottom: 4px;
|
|
3631
|
+
`,rc=g.span`
|
|
3632
|
+
${da};
|
|
3633
|
+
width: 100%;
|
|
3634
|
+
height: 48px;
|
|
3635
|
+
border-radius: 16px;
|
|
3636
|
+
`,ac=g.div`
|
|
3637
|
+
display: flex;
|
|
3638
|
+
align-items: center;
|
|
3639
|
+
gap: 12px;
|
|
3640
|
+
`,oc=g.span`
|
|
3641
|
+
${da};
|
|
3642
|
+
flex: none;
|
|
3643
|
+
width: 48px;
|
|
3644
|
+
height: 48px;
|
|
3645
|
+
border-radius: 50%;
|
|
3646
|
+
`,ic=g.span`
|
|
3647
|
+
${da};
|
|
3648
|
+
width: 96px;
|
|
3649
|
+
height: 16px;
|
|
3650
|
+
border-radius: 6px;
|
|
3651
|
+
`,qa=g.div`
|
|
3652
|
+
display: flex;
|
|
3653
|
+
flex-direction: column;
|
|
3654
|
+
gap: 8px;
|
|
3655
|
+
padding: 12px 14px;
|
|
3656
|
+
border: 1px solid ${O.line};
|
|
3657
|
+
border-radius: 12px;
|
|
3658
|
+
background: ${O.media};
|
|
3659
|
+
|
|
3660
|
+
p {
|
|
3661
|
+
margin: 0;
|
|
3662
|
+
font-size: 13px;
|
|
3663
|
+
line-height: 1.5;
|
|
3664
|
+
color: ${O.text2};
|
|
3665
|
+
}
|
|
3666
|
+
`,kw=g.div`
|
|
3667
|
+
display: flex;
|
|
3668
|
+
align-items: center;
|
|
3669
|
+
gap: 16px;
|
|
3670
|
+
`;function Dw(n){return Object.values(st.Rarity).includes(n)}function Cw(n){return n==="male"?m("itemDetail.genderMale"):n==="female"?m("itemDetail.genderFemale"):n==="unisex"?m("itemDetail.genderUnisex"):null}function jr(n){return n.wearableCategory?n.wearableCategory.replace(/_/g," "):n.category==="emote"?m("itemDetail.categoryEmote"):m("itemDetail.categoryWearable")}function Gw(){const{pathname:n}=lc();return s.jsx(Sw,{},n)}function Sw(){var Ho;const{contractAddress:n,itemId:a,tokenId:t}=Xl(),e=!!t,r=a??Af(t)??null,o=lc(),i=o.state,c=pn(),l=!!(i!=null&&i.market),p=(i==null?void 0:i.marketPriceCredits)??null,u=fn(),h=tr(I=>I.add),x=tr(I=>I.items),b=Ld(I=>I.toggle),{session:y,signIn:w}=on(),k=ca(y),[f,C]=v.useState(()=>{if(i!=null&&i.item){const I={...i.item,tradeId:i.tradeId??i.item.tradeId};return e?{...I,tokenId:t,itemId:I.itemId??r}:{...I,tokenId:void 0,itemId:a??I.itemId}}return{id:`${n}-${t??a}`,name:"",creator:"",contractAddress:n??"",itemId:r,category:"wearable",rarity:"common",network:"MATIC",chainId:Lt.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:t??void 0,tradeId:i==null?void 0:i.tradeId}}),[P,T]=v.useState(!1),[N,R]=v.useState(!!(i!=null&&i.resumeBuy));v.useEffect(()=>{i!=null&&i.resumeBuy&&T(!0)},[i==null?void 0:i.resumeBuy]);function S(){const I=f.priceCredits>0?f.priceCredits:null;fe("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:I,cart_value_usd:I===null?null:Ud(I)}),T(!0)}function D(){if(y){S();return}l||ep({type:"item-buy",path:o.pathname}),w()}const j=v.useRef(!1);v.useEffect(()=>{if(!y||j.current)return;const I=Ju("item-buy");!I||I.path!==o.pathname||(j.current=!0,R(!0),S())},[y]);const{items:A,isCollectionOnly:H,siblings:F,siblingsFetched:K}=Zb({id:f.id,contractAddress:f.contractAddress,itemId:f.itemId??r,tokenId:f.tokenId,creator:f.creator}),{data:G,isLoading:z}=ye({queryKey:["shop-item",f.contractAddress,r],enabled:!l&&!e&&!!f.contractAddress&&!!r,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Gd(f.contractAddress,r)}),E=e?void 0:G;v.useEffect(()=>{E&&C(I=>I.tradeId?{...I,tradeId:E.tradeId,priceCredits:E.priceCredits,manaWei:E.manaWei,available:E.available??I.available,acquisition:E.acquisition,wearableCategory:I.wearableCategory??E.wearableCategory}:{...I,...E})},[E]);const[B,M]=v.useState(!1),{data:X=""}=ye({queryKey:["item-desc",f.contractAddress,f.itemId],enabled:!!f.contractAddress&&!!f.itemId,staleTime:5*6e4,queryFn:()=>Xd(f.contractAddress,f.itemId)}),{data:q,isLoading:Z}=ye({queryKey:["collection-meta",f.contractAddress],enabled:!!f.contractAddress,staleTime:5*6e4,queryFn:()=>fc(f.contractAddress)});v.useEffect(()=>{const I=(E==null?void 0:E.creator)||(q==null?void 0:q.creator);I&&C(We=>We.creator?We:{...We,creator:I})},[E,q]);const ae=v.useMemo(()=>{if(!(e||f.name||E||F.length===0))return(r?F.find(I=>I.itemId===r):void 0)??F.find(I=>I.contractAddress===f.contractAddress)},[e,f.name,f.contractAddress,E,F,r]);v.useEffect(()=>{ae&&C(I=>({...ae,tradeId:I.tradeId??ae.tradeId}))},[ae]);const{data:Le,isLoading:je}=ye({queryKey:["detail-trade",f.id,f.tradeId,f.contractAddress,f.itemId],enabled:!!f.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(f.tradeId)return f.tradeId;if(!e&&f.itemId){const I=await Vo(f.contractAddress,f.itemId);return(I==null?void 0:I.id)??null}return null}}),{data:ue}=ye({queryKey:["item-traits",f.contractAddress,r],enabled:!!f.contractAddress&&!!r,staleTime:5*6e4,retry:1,queryFn:()=>Jd(f.contractAddress,r)}),xe=(ue==null?void 0:ue.isSmart)??f.isSmart,jt=(ue==null?void 0:ue.utility)??null,pe=v.useMemo(()=>({...f,wearableCategory:f.wearableCategory??(ue==null?void 0:ue.wearableCategory)??void 0,gender:f.gender??(ue==null?void 0:ue.gender)??null}),[f,ue==null?void 0:ue.wearableCategory,ue==null?void 0:ue.gender]),It=(ue==null?void 0:ue.urn)??null,{data:Fn}=ye({queryKey:["item-vrm",It],enabled:!!It&&f.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>Zd(It)}),[lr,ft]=v.useState(!1),{data:Bt}=ye({queryKey:["item-video",f.contractAddress,r],enabled:xe&&!!f.contractAddress&&!!r,staleTime:30*6e4,retry:!1,queryFn:()=>dp(f.contractAddress,r)}),Ve=v.useMemo(()=>f.emoteLoop!==void 0?f:(r?F.find(We=>We.itemId===r):void 0)??f,[f,F,r]),ht=ui(u,f.tradeId)??ui(u,Le),ua=f.acquisition==="store"&&(f.available??0)>0,Ie=!!ht||ua,mn=Fd(),{data:Pt=[]}=ye({queryKey:["item-resales",f.contractAddress,f.itemId],enabled:mn&&!l&&!!f.contractAddress&&!!f.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>xc(f.contractAddress,f.itemId)}),gn=Pt.length>0?Pt[0].priceCredits:null,ze=e&&f.tokenId?Pt.find(I=>I.tokenId===f.tokenId)??null:null,Fe=v.useMemo(()=>{const I=Pt[0];return I?{...I,name:I.name||f.name,thumbnail:I.thumbnail||f.thumbnail,rarity:I.rarity||f.rarity,category:I.category||f.category,wearableCategory:I.wearableCategory??f.wearableCategory,gender:I.gender??f.gender}:null},[Pt,f]),[dr,Ht]=v.useState(null),[pa,zt]=v.useState(!1),[Yn,ur]=v.useState(!1),Et=f.manaWei??null,{data:qt}=gc(l||!!Et),mt=Et&&qt?Yd(Et,qt):null;v.useEffect(()=>{mt!=null&&C(I=>I.priceCredits===mt?I:{...I,priceCredits:mt})},[mt,f.priceCredits]);const Kt=v.useMemo(()=>{if(!l||!(i!=null&&i.item))return null;const I=i.item;return I.manaWei?{tradeId:I.tradeId??I.id,listingType:"primary",contractAddress:I.contractAddress,itemId:I.itemId??"",name:I.name,thumbnail:I.thumbnail,rarity:I.rarity,category:I.category,wearableCategory:I.wearableCategory??null,creator:I.creator,manaWei:I.manaWei,available:1,network:I.network,chainId:I.chainId,createdAt:0}:null},[l,i==null?void 0:i.item]),Wn=l&&p!=null&&!!qt&&!!Kt,fa=Wd({priceCredits:f.priceCredits,compareAtCredits:f.compareAtCredits,saleEndsAt:f.saleEndsAt}),Tt=v.useMemo(()=>({...f,tradeId:ht,id:ht??f.id}),[f,ht]),xn=x.some(I=>I.id===Tt.id),$=!Tt.tokenId,Q=((Ho=x.find(I=>I.id===Tt.id))==null?void 0:Ho.quantity)??0,U=$&&typeof f.available=="number"&&Q>=f.available,{key:J,faved:re}=Bd(f),we=v.useRef(null);v.useEffect(()=>{!f.name||je||we.current===f.id||(we.current=f.id,fe("Shop Viewed Item",{...Hd(f),for_sale:Ie}),h0(f))},[f.id,f.name,je,Ie]);const ee=`${n}/${t??a}`,Ce=v.useRef(ee);v.useEffect(()=>{if(Ce.current!==ee){if(Ce.current=ee,i!=null&&i.item){const I={...i.item,tradeId:i.tradeId??i.item.tradeId};C(e?{...I,tokenId:t,itemId:I.itemId??r}:{...I,tokenId:void 0,itemId:a??I.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[ee]);function Qt(){!Ie||ha||je||!$&&xn||U||h(Tt,"item_detail")}const Ue=Dw(f.rarity)?f.rarity:st.Rarity.COMMON,pr=Cw(pe.gender),gt=zd(pe),wo=qd(pe.gender),ko=d0(f.rarity),Do=u0(pe),El=Ie&&fa,Tl=H?m("itemDetail.moreFromCollection"):m("itemDetail.youMightAlsoLike"),ha=Kd(f,y==null?void 0:y.address),[$l,Co]=v.useState(!1),[Nl,So]=v.useState(!1),[Rl,Mo]=v.useState(!1),[Ol,_o]=v.useState(!1),[Bn,Hn]=v.useState(null),[Ye,fr]=v.useState(null),[Al,jo]=v.useState(null),[ma,ga]=v.useState(null),xa=Ur(y==null?void 0:y.providerType),[Ll,ya]=v.useState(!1),{data:te,isLoading:hr}=ye({queryKey:["owned-token",f.contractAddress,f.tokenId,y==null?void 0:y.address],enabled:!l&&!!(y!=null&&y.address)&&!!f.contractAddress&&!!f.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>y?eu(y.address,f.contractAddress,f.tokenId):null});v.useEffect(()=>{te&&C(I=>I.name?{...I,issuedId:I.issuedId??te.issuedId,priceCredits:te.listingPrice??0,tradeId:te.tradeId}:{id:te.id,name:te.name,creator:"",contractAddress:te.contractAddress,itemId:te.itemId,category:te.category,rarity:te.rarity??"common",network:te.network,chainId:te.chainId,thumbnail:te.image,priceCredits:te.listingPrice??0,gender:null,isSmart:!1,tokenId:te.tokenId,issuedId:te.issuedId,tradeId:te.tradeId})},[te]),v.useEffect(()=>{ze&&C(I=>I.priceCredits===ze.priceCredits&&I.tradeId?I:{...I,priceCredits:ze.priceCredits,tradeId:I.tradeId??ze.tradeId})},[ze]),v.useEffect(()=>{Bn!=null&&te!=null&&te.isOnSale&&te.listingPrice===Bn&&Hn(null)},[te,Bn]);const Io=!l&&!!f.contractAddress&&!!f.tokenId&&!f.name&&!E&&!hr&&!te,{data:Se,isFetched:Fl}=ye({queryKey:["public-token",f.contractAddress,f.tokenId],enabled:Io,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>tu(f.contractAddress,f.tokenId)});v.useEffect(()=>{Se&&C(I=>I.name?I.issuedId?I:{...I,issuedId:Se.issuedId}:{id:Se.id,name:Se.name,creator:"",contractAddress:Se.contractAddress,itemId:Se.itemId,category:Se.category,rarity:Se.rarity??"common",network:Se.network,chainId:Se.chainId,thumbnail:Se.image,priceCredits:Se.listingPrice??0,gender:null,isSmart:!1,tokenId:Se.tokenId,issuedId:Se.issuedId,tradeId:Se.tradeId})},[Se]);const{data:tt}=ye({queryKey:["publishable-item",f.contractAddress,f.itemId,y==null?void 0:y.address],enabled:ha&&!!y&&!!f.itemId,queryFn:async()=>y?(await up(y.address,y.identity)).find(We=>We.contractAddress.toLowerCase()===f.contractAddress.toLowerCase()&&We.blockchainItemId===f.itemId)??null:null}),xt=e&&!!te,ba=!e&&ha,nt=!l&&(ba||xt),Po=Bn!=null?!0:xt?!!(te!=null&&te.isOnSale):Ie,yn=xt?te==null?void 0:te.tradeId:ht,Eo=xt?!!te:!!tt,To=ba||xt&&mn,$o=Bn??(xt?(te==null?void 0:te.listingPrice)??0:0),{data:No=0}=ye({queryKey:["owned-item-count",f.contractAddress,a,y==null?void 0:y.address],enabled:!e&&!l&&!!(y!=null&&y.address)&&!!f.contractAddress&&!!a,staleTime:3e4,queryFn:()=>y?nu(y.address,f.contractAddress,a):0});async function Vt(){await Promise.all([u.invalidateQueries({queryKey:["owned-token",f.contractAddress,f.tokenId]}),u.invalidateQueries({queryKey:["detail-trade"]}),u.invalidateQueries({queryKey:["shop-item"]}),u.invalidateQueries({queryKey:["collection-sale-state"]}),u.invalidateQueries({queryKey:["shop-items"]}),u.invalidateQueries({queryKey:["catalog-items"]}),u.invalidateQueries({queryKey:["publishable-items"]}),u.invalidateQueries({queryKey:["publishable-item",f.contractAddress,f.itemId]}),u.invalidateQueries({queryKey:["item-resales",f.contractAddress,f.itemId]})])}async function va(I={}){const We=I.own!==!1;if(!y||!yn)return!1;jo(null),ga(null),ya(!1),We&&fr("remove");try{const Ut=await mc(yn);return await cp({trade:Ut,signer:y.signer,mode:I.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{if(!f.itemId)return!1;const Be=await Vo(f.contractAddress,f.itemId).catch(()=>{});return Be!==void 0&&(Be==null?void 0:Be.id)!==yn},onWaiting:Be=>ya(Be>2e4)}}),I.silent||or.success(m("myAssets.removedFromSale",{name:f.name})),Hn(null),Lf(u,yn),C(Be=>Be.tradeId===yn?{...Be,tradeId:void 0}:Be),Vt(),Ma(u,{address:y.address,contractAddress:f.contractAddress,tokenId:f.tokenId},{kind:"removed"}),!0}catch(Ut){const Be=In(Ut);return Be||Me(Ut,{flow:"remove-listing",tradeId:yn}),Ut instanceof lp?(ga(Ut.definitive?"reverted":"pending"),!1):(jo(Be?m("getCredits.errorCanceled"):sn(Ut,m("myAssets.removeListingError"))),!1)}finally{We&&fr(null),ya(!1)}}function Ro({relist:I=!1}={}){I||fe("Shop Started Listing",{listing_type:xt?"secondary":"primary",item_id:f.itemId??f.tokenId??null}),xt?Co(!0):So(!0)}async function Yl(){fr("update");try{await va({silent:!0,own:!1})&&Ro({relist:!0})}finally{fr(null)}}function Oo(){Co(!1),So(!1),Vt()}const Ao=Ie?je?m("itemDetail.checking"):U?m("itemDetail.maxInCart"):!$&&xn?m("assetCard.inCart"):m("assetCard.addToCart"):m("itemDetail.notForSale"),Wl=typeof f.available=="number"&&f.available>0&&!f.tokenId&&!l,Lo=!l&&!f.tokenId&&f.available===0,bn=Lo&&!nt&&!!Fe,mr=!!Fe&&x.some(I=>I.id===Fe.id),Bl=!nt&&Ie&&!l,Hl=l||!nt&&(Ie||bn&&!!Fe||wl()),zl=!f.name&&(!!E||!!te||!!Se||!!ae),Fo=z||!!f.contractAddress&&!K||!f.name&&hr||zl||Io&&!Fl,Yo=!f.name&&!Fo,ql=!!f.name&&Ff({isMarket:l,forSale:Ie,priceKnown:f.priceCredits>0&&(!Et||mt!=null)||nt,stillResolving:Fo||!!Et&&mt==null,manage:nt,soldOutWithResale:bn,resolvingTrade:je,isTokenRoute:e,ownedAssetLoading:hr,deepLinkLoading:z}),Wo=!f.creator&&(z||Z||hr),Bo=!(q!=null&&q.name)&&Z,Kl=/^https?:\/\//i.test(f.thumbnail);return Qd(Yo?{title:m("seo.item.notFoundTitle"),noindex:!0}:f.name?{title:f.name,description:X||m("seo.item.fallbackDescription",{name:f.name,rarity:f.rarity,category:jr(pe),creator:ro(f.creator)}),image:Kl?f.thumbnail:void 0,type:"product"}:{}),Yo?s.jsxs(G0,{"data-notfound":!0,children:[s.jsx(Z0,{name:"cart"}),s.jsx(ew,{children:m("itemDetail.notAvailableTitle")}),s.jsx(X0,{children:m("itemDetail.notAvailableBody")}),s.jsx(J0,{variant:"white",onClick:()=>c("/items"),children:m("notFound.cta")})]}):s.jsxs(b0,{children:[s.jsxs(v0,{"aria-label":m("itemDetail.breadcrumbAria"),children:[s.jsx(w0,{onClick:()=>c("/items"),children:m("nav.collectibles")}),s.jsx(k0,{children:"/"}),s.jsx(D0,{children:f.name||m("itemDetail.itemFallback")})]}),s.jsxs(C0,{children:[s.jsxs(S0,{"data-testid":"item-preview",children:[f.name?s.jsx(ov,{item:f}):s.jsx(M0,{"aria-busy":"true","aria-label":m("itemPreview.loading"),children:s.jsx("span",{className:"skeleton","aria-hidden":!0})}),J?s.jsx(Bs,{"data-fav-preview":!0,"data-on":re||void 0,onClick:()=>b(f),"aria-pressed":re,"aria-label":re?m("assetCard.removeFromFavorites"):m("assetCard.addToFavorites"),children:s.jsx(V,{name:re?"heart-solid":"heart",size:18})}):null,Bt?s.jsxs(P0,{"data-play-showcase":!0,onClick:()=>ft(!0),"data-testid":"play-showcase",children:[s.jsx(V,{name:"play",size:18}),m("itemDetail.playShowcase")]}):null]}),s.jsx(_0,{"data-testid":"item-info",children:f.name?s.jsxs(s.Fragment,{children:[s.jsxs(j0,{children:[s.jsxs(I0,{children:[f.name,e&&f.issuedId?` #${f.issuedId}`:""]}),J?s.jsx(Bs,{"data-fav-title":!0,"data-on":re||void 0,onClick:()=>b(f),"aria-pressed":re,"aria-label":re?m("assetCard.removeFromFavorites"):m("assetCard.addToFavorites"),children:s.jsx(V,{name:re?"heart-solid":"heart",size:18})}):null]}),s.jsxs(E0,{children:[ko?s.jsx(Fa,{to:ko,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Ko(Ue)},title:m("itemDetail.browseByRarity",{rarity:f.rarity}),children:f.rarity}):s.jsx(rt,{"data-variant":"rarity",style:{background:Ko(Ue)},title:Vd(f.rarity),children:f.rarity}),Do?s.jsxs(Fa,{to:Do,"data-testid":"detail-category-link",title:m("itemDetail.browseByCategory",{category:jr(pe)}),children:[gt?s.jsx(V,{name:gt,size:18}):null,jr(pe)]}):s.jsxs(rt,{children:[gt?s.jsx(V,{name:gt,size:18}):null,jr(pe)]}),pr?s.jsxs(rt,{children:[wo?s.jsx(V,{name:wo,size:18}):null,pr]}):null,!e&&f.issuedId?s.jsxs(rt,{"data-testid":"detail-issued",children:["#",f.issuedId]}):null,xe?s.jsxs(Fa,{to:p0(),"data-testid":"detail-smart",title:m("itemDetail.browseBySmart"),children:[s.jsx(V,{name:"smart",size:18}),m("itemDetail.smart")]}):null,Ve.emoteLoop!==void 0?s.jsxs(rt,{"data-testid":"detail-play-mode",children:[s.jsx(V,{name:Ve.emoteLoop?"play-loop":"play-once",size:18}),Ve.emoteLoop?m("itemDetail.playLoop"):m("itemDetail.playOnce")]}):null,Ve.emoteHasSound?s.jsxs(rt,{"data-testid":"detail-sound",children:[s.jsx(V,{name:"sound",size:18}),m("itemDetail.emoteSound")]}):null,Ve.emoteHasProps?s.jsxs(rt,{"data-testid":"detail-props",children:[s.jsx(V,{name:"props",size:18}),m("itemDetail.emoteProps")]}):null,Fn?s.jsx(ni,{content:m("itemDetail.exportBlockedTooltip"),children:s.jsxs(rt,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":m("itemDetail.exportBlockedTooltip"),children:[s.jsx(V,{name:"ban",size:16}),m("itemDetail.exportBlocked")]})}):null,jt?s.jsxs(rt,{"data-testid":"detail-utility-chip",children:[s.jsx(V,{name:"utility",size:18}),m("itemDetail.utility")]}):null]}),X||jt?s.jsxs(_l,{children:[X?s.jsx(no,{children:s.jsxs(to,{children:[s.jsx(Dn,{children:m("itemDetail.description")}),s.jsx(Hs,{"data-expanded":B||void 0,children:X}),X.length>140?s.jsx($0,{className:"link",onClick:()=>M(I=>!I),children:B?m("itemDetail.showLess"):m("itemDetail.readMore")}):null]})}):null,jt?s.jsx(no,{children:s.jsxs(to,{"data-testid":"detail-utility",children:[s.jsx(Dn,{children:m("itemDetail.utility")}),s.jsx(Hs,{"data-expanded":!0,children:jt})]})}):null]}):null,f.creator||q!=null&&q.name||Wo||Bo?s.jsxs(jl,{children:[f.creator?s.jsxs(Jn,{children:[s.jsx(Dn,{children:m("itemDetail.creator")}),s.jsx(N0,{address:f.creator,linkToProfile:!0,hidePrefix:!0})]}):Wo?s.jsxs(Jn,{children:[s.jsx(Dn,{children:m("itemDetail.creator")}),s.jsxs(ac,{"aria-hidden":!0,"data-testid":"creator-loading",children:[s.jsx(oc,{}),s.jsx(ic,{})]})]}):null,q!=null&&q.name?s.jsxs(Jn,{"data-collection":!0,children:[s.jsx(Dn,{children:m("itemDetail.collection")}),s.jsx(R0,{contractAddress:f.contractAddress,name:q.name,items:F})]}):Bo?s.jsxs(Jn,{"data-collection":!0,children:[s.jsx(Dn,{children:m("itemDetail.collection")}),s.jsxs(ac,{"aria-hidden":!0,"data-testid":"collection-loading",children:[s.jsx(oc,{}),s.jsx(ic,{})]})]}):null]}):null,s.jsx(Pl,{}),ql?s.jsxs(vw,{"aria-hidden":!0,"data-testid":"sale-loading",children:[s.jsx(ww,{}),s.jsx(rc,{}),s.jsx(rc,{})]}):s.jsxs(s.Fragment,{children:[mn&&!nt&&!l&&Ie&&!f.tokenId?s.jsxs(cw,{"data-testid":"buy-from-creator",children:[s.jsxs(lw,{children:[s.jsx(dw,{name:"buy-from-creator"}),m("itemDetail.buyFromCreator")]}),s.jsx(uw,{name:"check-rounded"})]}):null,bn?s.jsxs(mw,{"data-testid":"sold-out",children:[s.jsxs(Js,{"data-variant":"original",children:[s.jsxs(Zs,{children:[m("itemDetail.originalPrice"),s.jsxs(ec,{children:[s.jsx(Oe,{className:"ico"}),s.jsx(tc,{children:s.jsx($e,{credits:f.priceCredits})})]}),s.jsx(nc,{"aria-hidden":!0,children:s.jsx(V,{name:"info",size:12})})]}),s.jsx(gw,{"data-testid":"out-of-stock",children:m("itemDetail.soldOut")})]}),s.jsxs(Js,{"data-variant":"resale",children:[s.jsxs(Zs,{children:[m("itemDetail.resalePrice"),s.jsxs(ec,{children:[s.jsx(Oe,{className:"ico"}),s.jsx(tc,{children:s.jsx($e,{credits:gn})})]}),s.jsx(nc,{"aria-hidden":!0,children:s.jsx(V,{name:"info",size:12})})]}),s.jsxs(xw,{children:[m("itemDetail.stock")," ",Pt.length,"/",st.Rarity.getMaxSupply(Ue).toLocaleString()]})]})]}):s.jsx(O0,{children:s.jsxs(A0,{children:[s.jsxs(L0,{children:[l||Ie?s.jsx(Ks,{children:m("itemDetail.price")}):null,l?s.jsxs(s.Fragment,{children:[s.jsx(Cn,{"data-variant":"market","data-testid":"item-price",children:p==null?s.jsx(Vn,{children:"—"}):s.jsxs(s.Fragment,{children:[s.jsx(Y0,{"aria-hidden":!0,children:"≈"}),s.jsx(Un,{}),s.jsx(Vn,{children:s.jsx($e,{credits:p})})]})}),s.jsx(W0,{children:m("assetCard.marketPrice")})]}):Ie?El?s.jsxs(Cn,{"data-variant":"sale","data-testid":"item-price",children:[s.jsxs(Cn,{children:[s.jsx(Un,{}),s.jsx(Vn,{children:s.jsx($e,{credits:f.priceCredits})})]}),s.jsxs(B0,{children:[s.jsx(Un,{"data-was":!0}),s.jsx($e,{credits:f.compareAtCredits})]}),Qo(f.compareAtCredits,f.priceCredits)>0?s.jsx(H0,{children:m("assetCard.saleWithDiscount",{pct:Qo(f.compareAtCredits,f.priceCredits)})}):null,s.jsx(z0,{endsAt:f.saleEndsAt})]}):s.jsxs(Cn,{"data-testid":"item-price",children:[s.jsx(Un,{}),s.jsx(Vn,{children:s.jsx($e,{credits:f.priceCredits})})]}):Po&&$o?s.jsxs(Cn,{"data-testid":"item-price",children:[s.jsx(Un,{}),s.jsx(Vn,{children:s.jsx($e,{credits:$o})})]}):nt?null:s.jsxs(Cn,{"data-variant":"none","data-testid":"item-price",children:[s.jsx("span",{children:m("itemDetail.notForSale")}),s.jsx(ni,{content:m("itemDetail.notForSaleHint"),children:s.jsx(F0,{tabIndex:0,role:"img","aria-label":m("itemDetail.notForSaleHint"),children:s.jsx(V,{name:"info",size:14})})})]})]}),Wl?s.jsxs(zs,{children:[s.jsx(Ks,{children:m("itemDetail.stock")}),s.jsxs(qs,{children:[(f.available??0).toLocaleString(),"/",st.Rarity.getMaxSupply(Ue).toLocaleString()]})]}):Lo?s.jsx(zs,{children:s.jsx(qs,{"data-out":!0,"data-testid":"out-of-stock",children:m("itemDetail.outOfStock")})}):null]})}),s.jsx(q0,{"data-buttons":Hl||void 0,"data-dual":Bl||void 0,children:l?s.jsxs(Ya,{variant:"purple",onClick:D,disabled:!Wn,children:[s.jsx("span",{children:m("assetCard.buyNow")}),p!=null?s.jsxs(Wa,{"aria-hidden":!0,children:[s.jsx(za,{}),s.jsx($e,{credits:p})]}):null]}):nt?s.jsxs(yw,{"data-testid":"manage-actions",children:[s.jsx(Ft,{message:Al}),ma&&!xa?s.jsx(qa,{"data-testid":"cancel-gasless-failed",children:s.jsx("p",{children:m("itemDetail.cancelRelayRetry")})}):null,ma&&xa?s.jsxs(qa,{"data-testid":"cancel-gasless-failed",children:[s.jsx("p",{children:ma==="reverted"?m("itemDetail.cancelRelayReverted"):m("itemDetail.cancelRelayFailed")}),s.jsxs(kw,{children:[s.jsx(_r,{type:"button","data-testid":"cancel-pay-gas",onClick:()=>void va({payGas:!0}),disabled:Ye!==null,children:m("itemDetail.cancelPayGas")}),s.jsx(_r,{type:"button","data-testid":"cancel-later",onClick:()=>ga(null),disabled:Ye!==null,children:m("itemDetail.cancelLater")})]})]}):null,Ye==="remove"&&Ll?s.jsx(qa,{"data-testid":"cancel-slow",children:s.jsx("p",{children:m(xa?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")})}):null,Po?s.jsxs(s.Fragment,{children:[To?s.jsxs(Q0,{onClick:()=>void Yl(),disabled:Ye!==null||!Eo,children:[Ye!=="update"?s.jsx(V,{name:"pen",className:"ico"}):null,s.jsx("span",{children:Ye==="update"?k?m("itemDetail.updateCanceling"):m("itemDetail.updateConfirmCancel"):m("itemDetail.manageUpdatePrice")})]}):null,s.jsx(Qs,{onClick:()=>void va(),disabled:Ye!==null,children:s.jsx("span",{children:Ye==="remove"?m("myAssets.removing"):m("itemDetail.manageRemove")})})]}):s.jsxs(s.Fragment,{children:[To?s.jsx(K0,{onClick:()=>Ro(),disabled:Ye!==null||!Eo,children:s.jsx("span",{children:m("itemDetail.manageList")})}):null,xt?s.jsxs(s.Fragment,{children:[s.jsx(Qs,{onClick:()=>Mo(!0),disabled:Ye!==null,children:s.jsx("span",{children:m("itemDetail.manageTransfer")})}),s.jsx(_r,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>ur(!0),disabled:Ye!==null,children:m("itemDetail.manageResell")})]}):null]}),ba&&tt?s.jsx(_r,{type:"button","data-on-purple":!0,onClick:()=>_o(!0),disabled:Ye!==null,children:m("itemDetail.manageIssue")}):null,Ye==="update"?s.jsx(U0,{children:m("itemDetail.updateHelper")}):null,gn!=null?s.jsx(bw,{children:s.jsx(Xs,{onClick:()=>zt(!0),"data-testid":"view-resellers",children:m("itemDetail.viewAllResellers")})}):null]}):Ie?s.jsxs(s.Fragment,{children:[s.jsxs(Ya,{variant:"purple",onClick:D,disabled:je,children:[s.jsx("span",{children:m("assetCard.buyNow")}),s.jsxs(Wa,{"aria-hidden":!0,children:[s.jsx(za,{}),s.jsx($e,{credits:f.priceCredits})]})]}),s.jsxs(Vs,{onClick:Qt,disabled:je||($?U:xn),"aria-label":Ao,children:[s.jsx(V,{name:"cart"}),s.jsx(Us,{children:Ao})]})]}):bn&&Fe?s.jsxs(s.Fragment,{children:[s.jsxs(Ya,{variant:"purple",onClick:()=>y?Ht(Fe):w(),children:[s.jsx("span",{children:m("assetCard.buyNow")}),s.jsxs(Wa,{"aria-hidden":!0,children:[s.jsx(za,{}),s.jsx($e,{credits:Fe.priceCredits})]})]}),s.jsxs(Vs,{onClick:()=>{mr||h(Fe,"item_detail")},disabled:mr,"aria-label":mr?m("assetCard.inCart"):m("assetCard.addToCart"),children:[s.jsx(V,{name:"cart"}),s.jsx(Us,{children:mr?m("assetCard.inCart"):m("assetCard.addToCart")})]})]}):s.jsx(s.Fragment,{children:s.jsx(c0,{item:f})})}),!nt&&!l&&gn!=null?s.jsxs(pw,{"data-testid":"lowest-price","data-centered":bn||void 0,children:[bn?null:s.jsxs(fw,{children:[m("itemDetail.lowestPrice"),s.jsx(Oe,{className:"ico"}),s.jsx(hw,{children:s.jsx($e,{credits:gn})})]}),s.jsx(Xs,{onClick:()=>zt(!0),"data-testid":"view-resellers",children:m("itemDetail.viewAllResellers")})]}):null,!nt&&!l&&No>0?s.jsxs(V0,{"data-testid":"you-own-note",children:[m("itemDetail.youOwnN",{count:No})," ",s.jsx(cc,{to:"/my-items",children:m("nav.myAssets")})]}):null]})]}):s.jsx(Mw,{})})]}),s.jsx(Zu,{title:Tl,items:A,onViewAll:H&&f.contractAddress?()=>c(`/collection/${f.contractAddress}`):void 0}),P&&l&&Kt&&qt?s.jsx(ml,{listing:Kt,rate:qt,onClose:()=>T(!1),onSold:()=>T(!1)}):P&&!l?s.jsx(Ua,{item:Tt,resume:N,onClose:()=>{T(!1),R(!1)}}):null,dr?s.jsx(Ua,{item:dr,onClose:()=>{Ht(null),Vt()}}):null,mn&&pa&&f.itemId?s.jsx(Nv,{item:f,onClose:()=>zt(!1)}):null,Yn&&t?s.jsx(Xv,{contractAddress:n??"",tokenId:t,onClose:()=>ur(!1)}):null,$l&&te&&y?s.jsx(py,{asset:te,session:y,creator:f.creator,onListed:(I,We)=>{Hn(I),Vt(),Ma(u,{address:y.address,contractAddress:f.contractAddress,tokenId:f.tokenId},{kind:"listed",priceCredits:I,tradeId:We})},onClose:Oo}):null,Rl&&y&&f.tokenId?s.jsx(Ey,{item:{contractAddress:f.contractAddress,chainId:f.chainId,tokenId:f.tokenId,name:f.name,thumbnail:f.thumbnail},session:y,onClose:()=>{Mo(!1),Vt()},onTransferred:()=>{Hn(null),Vt(),Ma(u,{address:y.address,contractAddress:f.contractAddress,tokenId:f.tokenId},{kind:"gone"})}}):null,Nl&&tt&&y?s.jsx(Zy,{item:tt,session:y,onListed:I=>Hn(I),onClose:Oo}):null,Ol&&tt&&y?s.jsx(_b,{item:{contractAddress:tt.contractAddress,chainId:Lt.chainId,itemId:tt.blockchainItemId,name:tt.name,thumbnail:tt.thumbnail,available:tt.remainingSupply},session:y,onClose:()=>{_o(!1),Vt()}}):null,lr&&Bt?s.jsx(Nb,{src:Bt,itemName:f.name,onClose:()=>ft(!1)}):null]})}function Mw(){return s.jsxs(tw,{"aria-hidden":!0,children:[s.jsx(aw,{className:"skeleton"}),s.jsxs(ow,{children:[s.jsx(Ba,{className:"skeleton"}),s.jsx(Ba,{className:"skeleton"}),s.jsx(Ba,{className:"skeleton"})]}),s.jsx(_l,{children:[0,1].map(n=>s.jsx(no,{children:s.jsxs(to,{children:[s.jsx(Gs,{className:"skeleton"}),s.jsxs(nw,{children:[s.jsx(Ha,{className:"skeleton"}),s.jsx(Ha,{className:"skeleton"}),s.jsx(Ha,{className:"skeleton","data-short":!0})]})]})},n))}),s.jsx(jl,{children:[0,1].map(n=>s.jsxs(Jn,{...n===1?{"data-collection":!0}:{},children:[s.jsx(Gs,{className:"skeleton"}),s.jsx(rw,{})]},n))}),s.jsx(Pl,{}),s.jsx(iw,{className:"skeleton"}),s.jsx(sw,{className:"skeleton"})]})}export{Sw as ItemDetail,Gw as ItemDetailRoute,Sw as default};
|
|
3671
|
+
//# sourceMappingURL=ItemDetail-D4i816QV.js.map
|