const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AboutCompany-BIlK04LY.js","assets/vendor-react-Br0ZiotI.js","assets/Footer-CwhROp5x.js","assets/SiteFooter-DgGiilEt.js","assets/vendor-dayjs-8pzXSYYG.js","assets/vendor-i18n-C54Hc0CQ.js","assets/mail-DSzwnJoE.js","assets/globe-CUbRGoiW.js","assets/vendor-query-9i1Av1pr.js","assets/vendor-antd-core-CbYNMZQB.js","assets/vendor-sentry-Cx26FE6p.js","assets/AboutCompany-aQ2m6ATR.css","assets/ContactsPage-BE8ImZcn.js","assets/ContactsPage-B4ouK7NB.css","assets/Blog-C8NysNC5.js","assets/Blog.module-BNvRm1p-.js","assets/Blog-_I2C7WkB.css","assets/formApi-DT_FT4-H.js","assets/Blog-DC2YOgNy.css","assets/FAQPage-DFGu62nP.js","assets/FAQPage-DZLCl4ZW.css","assets/MainPage-DHIOGqhC.js","assets/MainPage-D6XRQa-C.css","assets/MultiModal-CkLLtd0V.js","assets/MultiModal-CjC5AClj.css","assets/routePairApi-CWVJCHvv.js","assets/MarketingCalculatorPage-SVzzoR2X.js","assets/CalculatorForm-dkeXx0gA.js","assets/city-autocomplete-Bl9fcCqw.js","assets/calculator-Bs1_ZYME.js","assets/transliteration-kemtKToW.js","assets/calculator-onboarding-Cn7E4DmE.js","assets/package-search-C_wbJtp_.js","assets/MarketingShell-DRhiQc5Z.js","assets/zap-Ci_2NnzB.js","assets/shield-check-DdgDJQI3.js","assets/users-zdM8JIUR.js","assets/file-text-DlfYEdpc.js","assets/building-2-CRzOPVjz.js","assets/boxes-DrJOxOLs.js","assets/train-front-BRpU9zvm.js","assets/DeferUntilVisible-DF7Q_4qC.js","assets/skeleton-CPxIUBBV.js","assets/funnel-DmpN4KfD.js","assets/circle-check-ohF7X8mt.js","assets/sparkles-B67G1pe8.js","assets/earth-cL3Wtvcl.js","assets/MarketingCustomsCalculatorPage-CqGfEfs8.js","assets/customsApi-DNRmaNdx.js","assets/wallet-DmWpI1J6.js","assets/triangle-alert-Dp4UpIbU.js","assets/sliders-horizontal-Bw4EdS6S.js","assets/minus-XVye6qWx.js","assets/arrow-up-right-BaKhwvSc.js","assets/file-search-Cu1Hl6Dy.js","assets/shield-alert-CiVP7Gy6.js","assets/arrow-left-CM9eooNf.js","assets/MarketingSearchResultsPage-Nqml8cnR.js","assets/deliveryOptionPricing-4G3UmnQx.js","assets/internationalAuto-DAyrf5CQ.js","assets/transitTime-B0kzQqzi.js","assets/rotate-ccw-SvaX27Ce.js","assets/incoterms-DvFAAZNy.js","assets/MarketingOrderModal-B1ZMFsP1.js","assets/gauge-Cr8YczJI.js","assets/external-link-BJAJefNM.js","assets/schemas-B6RbrDMZ.js","assets/contractGateApi-DF_3s_K2.js","assets/types-CXNBX4df.js","assets/applicationsApi-CSFyUeds.js","assets/circle-alert-BLVIQDD2.js","assets/upload-2TBoC5mv.js","assets/star-BhmP-dmV.js","assets/calendar-clock-C9criibP.js","assets/layout-grid-D8uDdeTG.js","assets/calendar-DO1L48iv.js","assets/copy-D3xgNMZm.js","assets/search-x-DsWYNA8X.js","assets/MarketingOrderDetailsPage-BII0l80H.js","assets/savedCalculationsApi-BEisrgeH.js","assets/snapshotsApi-CeYhTwy4.js","assets/OrderConditionsSection-B2rzVEa9.js","assets/timer-8ihPo-hI.js","assets/anchor-BX4HBrZx.js","assets/package-open-DvDKBcqa.js","assets/scheduleLookupApi-ybIyQbyz.js","assets/companyProfileApi-DLlLWDJV.js","assets/crossSellApi-D6Rn_0el.js","assets/plus-Xz3UVpg2.js","assets/pencil-B6stMA0G.js","assets/shopping-bag-o0U77YGA.js","assets/user-mhfCpbWR.js","assets/clock-3-qQtq0AXa.js","assets/share-2--FcCzalI.js","assets/message-circle-TtflvK3E.js","assets/message-square-MQ_FRKlx.js","assets/download-CrMEAWCV.js","assets/MarketingSnapshotViewPage-DwPt4zpu.js","assets/applicationOfferApi-D4OAaGFP.js","assets/MarketingMailingViewPage-onRef2VL.js","assets/inbox-DIHJ5dPu.js","assets/MarketingForgotPasswordPage-DFmBFq5P.js","assets/MarketingSettingsPage-BdDDFlIN.js","assets/save-Dx4KnAL7.js","assets/sessionsApi-BL4Lguvm.js","assets/key-round-qz30pBPP.js","assets/monitor-D-GBfCiL.js","assets/contactBookApi-BBg3be3-.js","assets/badge-check-CLKmKRR4.js","assets/trash-2-4O0cVZ43.js","assets/key-0oVuh7UP.js","assets/shield-l2dUDQ_6.js","assets/MarketingOrdersPage-CAS81SqW.js","assets/data-table-Ce8ilmMa.js","assets/feature-gate-iW4IppiF.js","assets/csvExport-DM0kDtQb.js","assets/lock-CGKd8WfB.js","assets/arrow-up-down-JXWXKZ-v.js","assets/chevron-left-DAVmj346.js","assets/eye-WsAUye5I.js","assets/repeat-t_O7JUuY.js","assets/MarketingMailingsArchivePage-CsntZOMJ.js","assets/mailingsArchiveApi-wtqznbUu.js","assets/MarketingRouteSubscriptionsPage-DFyecEgA.js","assets/date-picker-SXSfMqem.js","assets/routeSubscriptionsApi-BV-y0hIo.js","assets/MarketingNotificationsInboxPage-CRaHTIV-.js","assets/NotificationInboxCard-fxhX2DeN.js","assets/bell-off-BtNIHzOG.js","assets/MarketingExchangeAboutPage-CrFiUtvX.js","assets/megaphone-BPI7O3GO.js","assets/route-D_mmZGiY.js","assets/hammer--uivwqa-.js","assets/MarketingExchangeListPage-Bt7qCy1U.js","assets/homeCityI18n-D4DZCNWK.js","assets/MarketingExchangeCreatePage-CoIc1dDz.js","assets/MarketingExchangeDetailPage-DH1dvpTy.js","assets/MarketingExchangeManagePage-BF953xY8.js","assets/circle-x-B-8Njx6F.js","assets/trophy-DKbStWeL.js","assets/MarketingBidEditPage-2r_tcnfm.js","assets/MarketingExchangeChatPage-CdPiayeq.js","assets/MarketingCounterOffersPage-DD-dplBv.js","assets/trending-down-BGdUVvEo.js","assets/MarketingBidAttachmentsPage-Dtu1D_Iy.js","assets/paperclip-By70ngTC.js","assets/MarketingExchangeWatchListPage-C67wU_jt.js","assets/MarketingExchangeClonePage-CHr7tLCf.js","assets/MarketingSupplierPortalPage-C9xbLf8V.js","assets/dollar-sign-DSlTDFni.js","assets/MarketingSupplierAuctionsPage-Cgf2TJj-.js","assets/MarketingSupplierMyBidsPage-BqT0V4Ji.js","assets/MarketingSupplierReputationPage-97QSUjcI.js","assets/MarketingAdminExchangeStatsPage-dFOJmrcU.js","assets/MarketingAdminChatModerationPage-CUPzQRqO.js","assets/MarketingAdminRequestAuditPage-Dwo2g8v5.js","assets/MarketingAdminOverviewPage-VmH5d_Kd.js","assets/adminApi-DElvHLAx.js","assets/adminDashboardApi-BD_cjp_K.js","assets/trending-up-M589cQ1A.js","assets/MarketingExchangePublicStatsPage-jtaHgnr4.js","assets/MarketingPreviewTourPage-T1T_iEFS.js","assets/CookieConsentBanner-h2slS6_z.js","assets/chart-no-axes-column-DbeLApJg.js","assets/AuthForm-BS32coPN.js","assets/SearchResultsPage-CePw-qnX.js","assets/errorMessage-fXNY8jvq.js","assets/DownloadOutlined-Dxy1U8yW.js","assets/PlusOutlined-BhQCgrhy.js","assets/index-D7ET9a57.js","assets/SearchResultsPage-Bq4pFq6i.css","assets/SendOutlined-CpLRlsLb.js","assets/index-BkBV9oYh.js","assets/index-BPpzlQ6d.js","assets/index-BX0xpEHH.js","assets/index-C57jOlLu.js","assets/ReloadOutlined-X4W3UhI6.js","assets/index-BWBn4NZd.js","assets/AuthForm-CKca-QHP.css","assets/DesignSystemShowcase-uiN1_zS2.js","assets/toaster-DjvhUWnr.js","assets/container-BmQ45kRK.js","assets/ServicesIndexPage-DG56Jq6X.js","assets/shuffle-DgW3TRCQ.js","assets/file-check-P8WRjZsz.js","assets/PricingPage-B2n6l44G.js","assets/crown-BfLUqtiY.js","assets/WebhookDocsPage-DnWr6SfT.js","assets/PortalWebhooksPage-DIXx1aTA.js","assets/AcceptInvitePage-CNB9EZIZ.js","assets/PortalShipmentDetailPage-q8y_kCOK.js","assets/clientDocumentHubApi-BqZBLVfF.js","assets/shipmentMilestonesApi-DhYh6MOM.js","assets/PortalShipmentsPage-BjOZiLKJ.js","assets/portalSummaryApi-D3nFpYoF.js","assets/PortalHomePage-Dij07WtM.js","assets/section-onboarding-wk7BeMMu.js","assets/LkOverviewPage-BW0rdlW2.js","assets/LkCalcPage-BXrMLX-9.js","assets/LkApplicationsListPage-DUL1HY_4.js","assets/useCompanyRole-CN_SIeTx.js","assets/LkApplicationPage-BDRwQx9w.js","assets/ban-BEod_X2r.js","assets/DocumentUploadModal-B9l6uA7X.js","assets/documentsApi-Cz7-hH_7.js","assets/usePollOnVisible-Bi2NUvdm.js","assets/refresh-cw-eq7VWfby.js","assets/navigation-CLQo5i75.js","assets/LkDocumentsPage-CdJka0R4.js","assets/funnel-L3LO_hWP.js","assets/LkNotificationsPage-DXwGuV3t.js","assets/NotificationPreferencesGrid-Yuaji1zA.js","assets/LkTeamPage-BGROL8KR.js","assets/LkSavedCalcsPage-DeM8t6Cw.js","assets/LkShipmentsPage-DDbcCvWy.js","assets/shipmentsApi-D1Dz-uhE.js","assets/workflow-BS2hP9CK.js","assets/LkCalendarPage-CQ35oi3p.js","assets/package-check-C8KMSbGk.js","assets/LkShipmentDetailPage-DgE6wjhB.js","assets/LkCustomsPage-5_kBMF4H.js","assets/LkShipmentTrackerPage-DGdWr1Jp.js","assets/file-up-DDOhGGVx.js","assets/LkHelpPage-BTlEl7yT.js","assets/kbArticlesApi-BgZHE3Wr.js","assets/LkSalesFastQuotePage-nKAxGXU4.js","assets/formAnalytics-DTZEFGV5.js","assets/circle-check-big-Dgm7PCGi.js","assets/LkSalesLeadsPage-DzAhiFHK.js","assets/LkReferralPage-DOja2TwX.js","assets/referralsApi-BAHuUiaW.js","assets/LkPartnerPage-CQuvNn2N.js","assets/ReferralProgramPage-CqQTQDOI.js","assets/LkAdminCustomersPage-CM2PAl0D.js","assets/AdminHelpPanel-Bwi02G_d.js","assets/PublicHelpPage-DBsQjYOu.js","assets/bot-ChoMOoKQ.js","assets/HelpArticlePage-CAiLKLqR.js","assets/tag-BszEm3UZ.js","assets/LkInsuranceClaimPage-DRgAo0Sn.js","assets/LkContractWizardPage-cghXlPnO.js","assets/PublicResearchIndexPage-DtLckH_B.js","assets/flask-conical-bRhs9rLt.js","assets/PublicResearchSmbCostIndexPage-DSzRbBR5.js","assets/PublicEnFaqPage-DGZAzkZr.js","assets/en-faq-data-CPLnGyhw.js","assets/PublicEnFaqArticlePage-FsPBF5by.js","assets/PublicEnGlossaryIndexPage-DDRVUgUR.js","assets/en-glossary-data-BoSnL6Ql.js","assets/arrow-up-CVC9j3Ov.js","assets/PublicEnGlossaryTermPage-o9x7f_WN.js","assets/PublicEnBlogIndexPage-DYB1B2Ay.js","assets/en-blog-data-DxNXQeKP.js","assets/PublicEnBlogArticlePage-DRxSb5ad.js","assets/PublicEnAboutPage-CGA56e5U.js","assets/PublicEnServicesPage-DN_HJuiu.js","assets/YdFreightChinaPage-erBrIG6K.js","assets/YdLandingTemplate-qg4dyT2C.js","assets/YdCustomsBrokerPage-CtUw4DaK.js","assets/clipboard-check--roXYzG2.js","assets/YdSmbImportPage--r1HGRAe.js","assets/MultiOriginCalculatorPage-vQHtTqBR.js","assets/PlansPage-B9IbRLVR.js","assets/LoginPage-khZg59it.js","assets/SignupLegalEntityPage-DgVF1Ll7.js","assets/credit-card-CndLT3ab.js","assets/PublicTrackPage-D0j6CiHu.js","assets/SupplierPortalPage-v2asoDPm.js","assets/ToolsHubPage-CBthteU2.js","assets/ruler-DZJ6tzKE.js","assets/leaf-JWmVRnoW.js","assets/box-CPgp6U66.js","assets/chart-no-axes-column-increasing-6t2omzDm.js","assets/arrow-left-right-CSPWW9Hp.js","assets/briefcase-CigVMc3g.js","assets/file-output-Cy5jFuhq.js","assets/award-B7AzR-Dr.js","assets/scale-BbYbq9A6.js","assets/map-nvUtidZI.js","assets/user-check-B_22cuqx.js","assets/shield-plus-GYkc7sP-.js","assets/thermometer-Dz43Gbfj.js","assets/shopping-cart-ldSB37Mw.js","assets/ToolsIncotermsPage-6uuED2Vf.js","assets/ToolPageSEO-DrBpCt4L.js","assets/toolsMeta-CeuNOhcH.js","assets/ToolsCo2Page-CzDUCrt8.js","assets/ToolsPortsPage-Spihcziw.js","assets/ToolsDistancePage-BSAzNA-B.js","assets/ToolsCbmPage-Ce0geGBQ.js","assets/ToolsAirFreightPage-Ckffoqef.js","assets/ToolsPackingListPage-BwQOHz5f.js","assets/ToolsContainerPage-CtjcBmBc.js","assets/weight-BoM6_qeU.js","assets/ToolsHsCodePage-DAucWJkF.js","assets/ToolsCustomsCalcPage-DUU21Shj.js","assets/ToolsCurrencyPage-Dqz1lvPl.js","assets/ToolsDocsCheckPage-BIx4FcXw.js","assets/ToolsSchedulePage-DH8zidj0.js","assets/ToolsFreightRatesPage-DnEQRPDE.js","assets/ToolsFreightIndexPage-zr1CMYZO.js","assets/ToolsLandedCostPage-CVZSBxWP.js","assets/ToolsComparisonPage-8s-_RH0g.js","assets/ToolsChinaCalendarPage-C--de6df.js","assets/ToolsPreShipmentPage-XjtSESNn.js","assets/ToolsDemurragePage-CDjdr2iB.js","assets/lightbulb-TF858PZk.js","assets/ToolsPaymentTermsPage-zQLl7JxD.js","assets/ToolsInsurancePage-D7yqudlf.js","assets/ToolsLeadTimePage-DhDt-Bwu.js","assets/ToolsContainerTrackingPage-Bkb2l1X4.js","assets/PublicTrackingSearchForm-BVLLy10D.js","assets/carrierLinks-JuJm3WWf.js","assets/ToolsConverterPage-DlNRYCKw.js","assets/ToolsFreightForwarderPage--63O-BHr.js","assets/ToolsPackagingPage-DU69ZbP9.js","assets/square-check-big-CuDH8gsr.js","assets/ToolsDangerousGoodsPage-DAd_egBV.js","assets/ToolsGlossaryPage-D13kjAOi.js","assets/ToolsWarehousePage-DQk3fH6d.js","assets/ToolsTimelinePage-CV6owJRz.js","assets/ToolsTradeFinancePage-dziRArV6.js","assets/ToolsCargoStandardsPage-BKWEJk6I.js","assets/ToolsExportDocsPage-BxmgtqZH.js","assets/ToolsSurchargesPage-BQATEso7.js","assets/ToolsRussiaPortsPage-D_SAMb8l.js","assets/ToolsSupplierCheckPage-0BaJfOjl.js","assets/ToolsAntiDumpingPage-CwEYC4sx.js","assets/ToolsVatRefundPage-DRfSCjgX.js","assets/ToolsTradeLanesPage-UECaN2Cr.js","assets/ToolsKpiPage-Bb0BhnHx.js","assets/ToolsFreightBrokerPage-CgCAY2kV.js","assets/ToolsExchangeRiskPage-cd01e77w.js","assets/ToolsPortCongestionPage-CfgHuPai.js","assets/ToolsCargoClaimsPage-B9Iyq_b3.js","assets/ToolsChemicalRegPage-CZIrMG_P.js","assets/ToolsSeasonalityPage-Dz0ImU0b.js","assets/ToolsTransitTimePage-Czbm35Ff.js","assets/ToolsFreightCostPage-DJKg_oOJ.js","assets/ToolsExportControlPage-CO_iXAPw.js","assets/ToolsCargoInsuranceCalcPage-pIBcB7SC.js","assets/ToolsRussiaRegionsPage-rJZMRhuT.js","assets/ToolsContainerTypesPage-B4m-yCFK.js","assets/wind--y-puHMj.js","assets/ToolsBillOfLadingPage-N_3DCML9.js","assets/square-BlRvFxdb.js","assets/ToolsWeightDimensionsPage-CtibEOy5.js","assets/ToolsMultimodalPage-CMFuRuDw.js","assets/ToolsLetterOfCreditPage-Cf0UVgFc.js","assets/ToolsFreeZonesPage-VKJ0uRqA.js","assets/ToolsColdChainPage-DaFcnupo.js","assets/ToolsCargoReadinessPage-Cbyw1UY_.js","assets/ToolsTariffSchedulePage-BQ_UVWnl.js","assets/ToolsSupplyChainRiskPage-CF6Hn64V.js","assets/ToolsFreightNegotiationPage-B59Vxg_U.js","assets/ToolsWarehouseCalcPage-B55tNMiS.js","assets/ToolsOriginCertPage-Cr8dpX4m.js","assets/ToolsImportLicensePage-keGVzzup.js","assets/ToolsShipmentTrackerPage-C1W5Btjr.js","assets/ToolsChinaSupplierPage-DjMf6Hjp.js","assets/factory-5nkflUJ2.js","assets/ToolsTradeCompliancePage-CaPZ9yrm.js","assets/ToolsCustomsBrokerCalcPage-BQRYEXYc.js","assets/ToolsEcommerceImportPage-HuNg7tjW.js","assets/ToolsFreightForwarderGuidePage-C7JZdfJ-.js","assets/ToolsIncotermsCalcPage-CcSF150T.js","assets/ToolsPackagingRequirementsPage-D9SCWtT6.js","assets/ToolsRailwayFreightPage-ClA8xolC.js","assets/ToolsLetterOfCreditCalcPage-CdnivRZO.js","assets/ToolsCarbonFootprintPage-BTNScZ3R.js","assets/ToolsAirCargoGuidePage-S_g_hDe3.js","assets/ToolsChinaHolidaysPage-DkyWPJxr.js","assets/ToolsPortStoragePage-DA8Y1nAf.js","assets/ToolsContainerSizesPage-DHMjPiEm.js","assets/ToolsImportDocumentsPage-DKQb-db1.js","assets/ToolsLogisticsCostPage-6gMRMIXX.js","assets/ToolsShippingTermsPage-V3OIb8pe.js","assets/ToolsSupplyChainFinancePage-DRpkqsyR.js","assets/ToolsChineseSuppliersPage-cMZRLXYt.js","assets/ToolsRailwayCalcPage-DYiXLJNs.js","assets/ToolsMultimodalComparePage-DxVw8Cd-.js","assets/ToolsWarrantyClaimsPage-DOZwrY6g.js","assets/ToolsExportDocumentsPage-CnQtwVvE.js","assets/ToolsChinaPaymentsPage-e2VoI2Q4.js","assets/ToolsLoadingNormsPage-BV4Tskx5.js","assets/ToolsHazmatGuidePage-CuhOsReF.js","assets/ToolsFreeTradeZonesPage-iEBjMAoW.js","assets/ToolsShipmentVisibilityPage-CpT0nDrj.js","assets/ToolsImporterInsurancePage-DIwurtwl.js","assets/ToolsCurrencyHedgingPage-DMMUGRBC.js","assets/ToolsHonestSignPage-DWAdn0TA.js","assets/ToolsLclCalculatorPage-BiAjTQMO.js","assets/ToolsCarrierComparePage-CEHtfIg1.js","assets/ToolsEaeuRulesPage-CBMbEsUm.js","assets/ToolsHsCodeWizardPage-Dy972kNx.js","assets/ToolsInventoryPlanningPage-6_nDT6Xe.js","assets/ToolsRouteOptimizationPage-BySAyLnZ.js","assets/ToolsFreightAuditPage-N2OzofRm.js","assets/ToolsBolGuidePage-Dt2vwA36.js","assets/ToolsCustomsBondPage-DRuf5bWr.js","assets/ToolsCertOriginPage-DuZsTQ8c.js","assets/ToolsImportVatPage-DMgF6ssD.js","assets/ToolsLithiumBatteryPage-BnQ6lOLI.js","assets/ToolsIspm15Page-BnlijYsh.js","assets/ToolsPhytoCertPage-DqKXnusu.js","assets/ToolsTemperatureCargoPage-D36oBgFq.js","assets/ToolsOversizeCargoPage-Bt2gInG9.js","assets/ToolsTradeFinanceCalcPage-Dd0m9XRZ.js","assets/ToolsBreakBulkPage-CZfCm1qz.js","assets/wrench-CeIrYx1s.js","assets/ToolsSanctionsCheckPage-JZJHhD4h.js","assets/ToolsExportLicensePage-kyGZb9YJ.js","assets/ToolsFumigationPage-VLbCqXE6.js","assets/ToolsContainerInspectionPage-DE89EEKX.js","assets/ToolsRoRoGuidePage-B7rdiBh5.js","assets/hard-hat-DPypU1U-.js","assets/ToolsVgmCalcPage-D1oXzJsL.js","assets/ToolsBondedWarehousePage-BxVdLoC9.js","assets/ToolsAirWaybillPage-CvhL2zPV.js","assets/ToolsInvoiceTemplatePage-CsJqYDxo.js","assets/ToolsShippingInstructionsPage-CSOQUW-e.js","assets/ToolsTruckingCalcPage-D65RIpxF.js","assets/ToolsSupplyChainKpiPage-BOkJ9nyy.js","assets/ToolsSeaFreightChecklistPage-lpQDCxGf.js","assets/ToolsSpotRateCalcPage-CBYZJFGu.js","assets/ToolsPoManagementPage-PoaLHeBs.js","assets/ToolsCharterPartyPage-5OKZ65Kx.js","assets/ToolsSingleWindowPage-DBVFU4XX.js","assets/ToolsDdpDduCalcPage-C1r0vspV.js","assets/ToolsCbamGuidePage-Bamdo-8x.js","assets/ToolsImportQuotasPage-iv2c6uuH.js","assets/ToolsLetterOfIndemnityPage-DZGVHHqi.js","assets/ToolsParallelImportPage-B6tWj9C0.js","assets/ToolsFreightRateIndexPage-ofvobc4L.js","assets/ToolsCargoReleaseOrderPage-qUAbAydj.js","assets/ToolsTransshipmentGuidePage-CfmAxhsc.js","assets/ToolsCustomsValueCalcPage-CvBOoGfI.js","assets/ToolsContainerLeasingPage-CwH1CLVK.js","assets/ToolsExciseDutyPage-D9uuO9KS.js","assets/ToolsChinaExportTaxPage-DwCl4fCF.js","assets/ToolsAirVsSeaCalcPage-B-aDa5g4.js","assets/ToolsEuCustomsClearancePage-Dn_vefj2.js","assets/ToolsPortDwellTimePage-D8OhO3nW.js","assets/ToolsRailwayLogisticsPage-B7FXe-c2.js","assets/ToolsCourierVsFreightPage-BOqwUOnj.js","assets/ToolsIncotermsQuizPage-BSdOH1Sg.js","assets/ToolsFreightPaymentTermsPage-DPWwPb7v.js","assets/ToolsTradeDocPackPage-CElNJchz.js","assets/ToolsEaeuTariffPage-4i60Fh40.js","assets/ToolsColdChainMonitorPage-DOYBJR8p.js","assets/ToolsSupplierAuditPage-NIkLnM2x.js","assets/ToolsLoadPlanPage-C8FYbxoU.js","assets/ToolsContainerFillCalculatorPage-DE-7NnyY.js","assets/ToolsEcommerceLogisticsPage-BeC5qhvN.js","assets/ToolsCertificationPage-D2mltXat.js","assets/ToolsFclVsLclPage-DXmOqvJt.js","assets/ToolsChinaRegionsPage-6Ym6c7rr.js","assets/ToolsTruckFreightCalcPage-BSzYqyJl.js","assets/ToolsPhytosanitaryPage-Dc8AamE-.js","assets/ToolsReExportPage-CJ68Tmpf.js","assets/ToolsQualityControlPage-CvwnWJOe.js","assets/ToolsGoodsDeclarationPage-ORafJiPf.js","assets/ToolsConsolidationCalcPage-DdmjATEh.js","assets/ToolsBankGuaranteePage-tJMBE-Vt.js","assets/ToolsPortFeesCalcPage-aWv91nvY.js","assets/ToolsImportQuotaPage-ByynJrBl.js","assets/ToolsCarnetAtaPage-CwtBocI0.js","assets/ToolsDutyDrawbackPage-DPU-seFj.js","assets/ToolsColdStorageCalcPage-BQtC3KeP.js","assets/ToolsMarineInsuranceTypesPage-76cchrJ1.js","assets/ToolsPalletCalcPage-DHQvdSAw.js","assets/ToolsImportProcedurePage-CP0AVvTU.js","assets/ToolsLinerTermsPage-CSFBNI3h.js","assets/ToolsFreightTenderPage-DDExRABZ.js","assets/ToolsCustomsRulingPage-C7z2FWW5.js","assets/ToolsBufferStockPage-BfipmAXq.js","assets/ToolsGreenLogisticsPage-_YjGawHG.js","assets/ToolsFreightMarkupPage-CmMEDAKe.js","assets/ToolsPortProcedurePage-TvNq1Ajy.js","assets/ToolsContainerStuffingPage-Bc2ttnTC.js","assets/ToolsCargoRejectionPage-DR-4strA.js","assets/ToolsReverseLogisticsPage-pULxnAF4.js","assets/ToolsBookingChecklistPage-BLt2mDaD.js","assets/ToolsMultimodalDocsPage-CSAol7ec.js","assets/ToolsExportFinancePage-CPmNaBRp.js","assets/ToolsComplianceCertPage-CH_deOcO.js","assets/ToolsShipperLetterPage-Dde5iz9q.js","assets/ToolsPreAdvicePage-ChVe5zQo.js","assets/ToolsCargoSurveyPage-DY5WWzRU.js","assets/ToolsDemurrageClaimPage-DYM-DkUh.js","assets/ToolsPortAgencyPage-BHsEj6p6.js","assets/ToolsFreightClaimPage-Cw9t6UCI.js","assets/ToolsStorageInTransitPage-lXsTLrKN.js","assets/ToolsLclBookingPage-ChRdZA92.js","assets/ToolsSpecialCargoPage-BMOUzydy.js","assets/ToolsHazardousClassPage-ljZRk_uN.js","assets/ToolsCargoTempPage-Csw1h2zQ.js","assets/ToolsInsuranceClaimPage-Cq0uADF3.js","assets/ToolsContainerDamagePage-BlaNX7cf.js","assets/ToolsReeferBookingPage-9WlF3i8Q.js","assets/ToolsTrackTracePage-CS99eHOP.js","assets/MarketingHomePage-BuEU1eBD.js","assets/utensils-crossed-osmqG_HS.js","assets/publicReviewsApi-wQr5oOC9.js","assets/quote-YrE7EGfi.js","assets/server-CXknnMm9.js","assets/PublicFaqPage-DKrVXw9O.js","assets/MarketingCasesPage-BfbO3Mq0.js","assets/casesData-BJry-av9.js","assets/piggy-bank-BpjIjFCq.js","assets/MarketingCaseDetailPage-B5x2wqyk.js","assets/MarketingReviewsPage-BtAykRne.js","assets/MarketingPartnersPage-fGMFxp2Y.js","assets/hand-coins-CohdHChJ.js","assets/network-CymMAOzg.js","assets/MarketingTrustPage-Cd2NpCzk.js","assets/file-badge-BBFmQg46.js","assets/MarketingDocumentsPage-qb5yB33c.js","assets/MarketingCooperationPage-DD-RmoA-.js","assets/code-xml-BrO_sSwE.js","assets/palette-ByDArWlG.js","assets/MarketingJoinPage-BoIplJTD.js","assets/rocket-C9wX9btQ.js","assets/heart-handshake-DaTYj5hU.js","assets/MarketingHowItWorksPage-Be2-Xkgx.js","assets/MarketingAdvantagesPage-CGwfAC81.js","assets/MarketingSupportPage-CPnSu75N.js","assets/MarketingCashbackPage-CMxNIzq8.js","assets/MarketingNewsPage-VS2XSyAv.js","assets/MarketingAdditionalServicesPage-CjD-Mmfp.js","assets/SolutionsIndexPage-CCVrK368.js","assets/SolutionsImporterPage-bjnU0808.js","assets/PersonaLandingTemplate-CGhTmhNX.js","assets/SolutionsExporterPage-BBd2t8W1.js","assets/SolutionsForwarderPage-DWknNgBF.js","assets/SolutionsCarrierPage-CD6aay1-.js","assets/compass-CjbONRik.js","assets/chart-line-DeqOBEGF.js","assets/MarineServicePage-BtQeTRmj.js","assets/ServicePageTemplate-CgdAegnb.js","assets/clock-4-D6mjq5Mz.js","assets/RailwayServicePage-CgtO0yuH.js","assets/map-pinned-5B6_lOz1.js","assets/AutoServicePage-DW_RCNTH.js","assets/AirServicePage-CY9v6RPR.js","assets/snowflake-BcpiBwCA.js","assets/GroupageServicePage-DTerBt9t.js","assets/MultimodalServicePage-4tWJIttv.js","assets/CustomsServicePage-BCPLj0PN.js","assets/ContainerRentalServicePage-C1Ez1KY0.js","assets/AboutCompanyPage-ll5hic7G.js","assets/ContactsPageDS-B-toHPrB.js","assets/VacanciesPage-PyKjUpyn.js","assets/PrivacyPolicyPage-BoEZTnwd.js","assets/RoutePairLandingPage-BcAs16YN.js","assets/IndustryLandingPage-Db5zhIYI.js","assets/CompetitorLandingPage-C_nFS0gT.js","assets/DostavkaIndexPage-CdS-xoxn.js","assets/dostavka-C8FDUgjJ.js","assets/DostavkaCountryPage-BnDiv6KU.js","assets/DostavkaCityPage-zBsXxv2t.js","assets/MarketingNotFoundPage-LmhLR5B6.js","assets/ResourcesHubPage-BkeVJzwd.js","assets/guidesMeta-BBUNJcrY.js","assets/library-CpsWSV2o.js","assets/GlossaryPage-BqAjC8PJ.js","assets/GuidesIndexPage-BTps7ZwS.js","assets/CustomsChina2026-DJH4P9hN.js","assets/GuideArticleTemplate-D_RTPXbt.js","assets/IncotermsPlain-DzPTbVRs.js","assets/HowToReadBL-iNLI1-V8.js","assets/ReduceLogisticsCosts-C4FYJpd-.js","assets/VttGuide-YrMF78Gw.js","assets/ChinaContractGuide-B1psFMCL.js","assets/DemurrageDetentionGuide-CRlbm8ez.js","assets/FclVsLclGuide-BVE4ULw9.js","assets/AirCargoGuide-Bg_jQZG8.js","assets/CustomsDutiesGuide-BxSU08pg.js","assets/RailFreightGuide-LS1ubEsp.js","assets/CargoInsuranceGuide-CfSE27rr.js","assets/MarketingResetPasswordPage-VU4sm2i1.js","assets/VerifyEmailPage-DnvvJiq7.js","assets/ResetPasswordPage.module-D3bvwYpW.js","assets/ResetPasswordPage-C64OEGkd.css","assets/ConfirmEmailChangePage-CyAEdGQr.js","assets/AdminGuard-Baxtx83_.js","assets/AdminLayout-BZUaAgic.js","assets/adminManagersApi-wGn9KT6I.js","assets/adminBookmarksApi-DnxfMKuD.js","assets/adminRemindersApi-D5McoAkj.js","assets/adminStuckApi-BBTneMbB.js","assets/adminExceptionsApi-dGBu6-fe.js","assets/user-plus-CmrXnzof.js","assets/AdminLayout-zLDHXNxD.css","assets/PublicTrackingPage-CQGRB1Cm.js","assets/publicTrackingApi-DPJz8CkG.js","assets/leaflet-CB1MP_tj.js","assets/leaflet-CIGW-MKW.css","assets/index-D1tpBc46.js","assets/CompassOutlined-BheKDILR.js","assets/index-B2IWatGl.js","assets/PublicContainerTrackingPage-Bz6PJD3_.js","assets/AdminOverviewPage-DWye0cie.js","assets/applicationTagsApi-BgspLqX0.js","assets/adminAnalyticsApi-COvcIJQD.js","assets/AdminMultiTenantPage-DDLTXHp6.js","assets/AdminWbrPage-D2mIL-Hc.js","assets/AdminTrackingPage-C1KZLsZ8.js","assets/AdminOkrQuartersPage-sPJ9yjFo.js","assets/adminOkrApi-CwTqR7OD.js","assets/AdminOkrQuarterDetailPage-YY8hbTAE.js","assets/AdminPostmortemsListPage-BMyWtqpE.js","assets/adminPostmortemApi-CEhVkQQ1.js","assets/AdminPostmortemDetailPage-WleXS7vQ.js","assets/AdminCompany360Page-DkYNT0_M.js","assets/AdminUnknownCitiesPage-BCfEWAqU.js","assets/adminCitiesApi-IlMq6Pm-.js","assets/AdminCitiesPage-CaHx1iaD.js","assets/AdminSupplierActionsPage-De4k5T_C.js","assets/supplierActionsApi-BvrHIPEJ.js","assets/AdminPricingProfilesPage-B19I6-8z.js","assets/adminPricingProfileApi-Cx2lOkTT.js","assets/AdminInternationalAutoPage-COZkcmd1.js","assets/AdminInvoicesPage-DlEkU1uc.js","assets/useUrlSyncedFilter-CcNauTyk.js","assets/safeExternalUrl-B6YoezCt.js","assets/SavedViewsBar-Z_1NT1Lw.js","assets/EntityAuditDrawer-BhRLoOS3.js","assets/AdminContractsPage-CqS0noW9.js","assets/AdminUsersPage-gWN2Jsjj.js","assets/AdminCompanyInvitationsPage-BdyRJeNy.js","assets/AdminOrdersPage-DXCQltaN.js","assets/supplierOrdersApi-DS9qUCmq.js","assets/supplierRoutesApi-8YWgpi7_.js","assets/AdminBookmarksPage-4SRKQszx.js","assets/AdminRemindersPage-DcpFhYAh.js","assets/AdminTagsPage-BvKhJVef.js","assets/AdminOrderDetailPage-CqPzbp2b.js","assets/index-BPQYKrJt.js","assets/supplierInvoicesApi-DaMc3_CY.js","assets/AdminOrderDetailPage-AfCFz5h6.css","assets/AdminNotificationsPage-CoYhIFwN.js","assets/AdminAmoCrmPage-CvEzNY0c.js","assets/AdminMarketingPage-m9Abo0KJ.js","assets/AdminAnalyticsPage-Bu-ns3RT.js","assets/AdminActivationFunnelPage-C7XukuZ0.js","assets/AdminDcsaPage-B81qvNZ_.js","assets/AdminRevenueAnalyticsPage-BpbaEHNL.js","assets/AdminStuckApplicationsPage-Bpwy6YZo.js","assets/AdminExceptionsInboxPage-BC3d7Q_a.js","assets/AdminTelegramPage-jumgQT2j.js","assets/AdminApiKeysPage-DkqIDqII.js","assets/AdminSupplierScorecardPage-DQMLlFq4.js","assets/AdminTariffsChangesPage-DUC7AksF.js","assets/AdminExternalSchedulesPage-DVP_TeT1.js","assets/AdminReconciliationPage-DihSecNX.js","assets/SupplierGuard-LV-Tj7yZ.js","assets/SupplierLayout-DmMBigES.js","assets/SupplierLayout-CKkG6HQA.css","assets/SupplierProfilePage-DBGAlAiX.js","assets/supplierApi-6derHmJZ.js","assets/SupplierDashboardPage-BX9S3leh.js","assets/SupplierRoutesPage-DJqhxdel.js","assets/SupplierImportModal-hfyh7mCC.js","assets/SupplierResourcePage-FUUZrh2b.js","assets/SupplierAnalyticsPage-XJ_2Cbpp.js","assets/SupplierAuditPage-3sff1zGH.js","assets/SupplierTeamPage-BsRy5fn4.js","assets/supplierInvitationsApi-BeaTlMk7.js","assets/SupplierInvoicesPage-C5safEEg.js","assets/SupplierContractsPage-DrWVarU8.js","assets/SupplierNotificationsPage-D33EzlbL.js","assets/SupplierBlackoutsPage-C-eetEv7.js","assets/AcceptInvitationPage--75VYLsJ.js","assets/About-BnnAt3nZ.js","assets/About-DMi08t_n.css","assets/BlogPost-DKMz1wMy.js","assets/index-Bh7wc1El.js","assets/index-BD1jfbp5.css","assets/SearchResultsPage-BXFPz_Rr.js","assets/SearchResultsPage-BRHVbNL0.css","assets/AdminExchangeStatsPage-DzRsizBE.js","assets/AdminChatModerationPage-BCvSgLBU.js","assets/AdminCalendarPage-8-dJ6voR.js","assets/UpdatePrompt-CAAqP7Ub.js","assets/PwaInstallPromptDS-M91TGFt6.js"])))=>i.map(i=>d[i]);
var T$=Object.defineProperty;var I$=(e,t,r)=>t in e?T$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ct=(e,t,r)=>I$(e,typeof t!="symbol"?t+"":t,r);import{_ as C,e as av,Q as $$,a as A$}from"./vendor-query-9i1Av1pr.js";import{l as Bc,q as a,R as N,n as c,r as Oo,w as qm,L as Nt,v as Fr,O as j$,b as Gm,c as gx,u as O$,p as N$,s as D$,k as k$,t as M$,g as L$,m as z$,h as F$,o as V$,a as Ut,e as E,x as Km,B as B$,f as H$,d as U$}from"./vendor-react-Br0ZiotI.js";import{b as wn,B as W$,a as q$,i as G$,u as oo,s as K$,I as X$}from"./vendor-i18n-C54Hc0CQ.js";import{d as Xm}from"./vendor-dayjs-8pzXSYYG.js";import{bN as Hc,b3 as Y$,at as rr,b8 as tr,bC as we,am as _r,bK as zr,y as Uc,ab as ae,c3 as Ym,bJ as Rr,bO as er,ac as _a,Q as gn,x as oi,c5 as Wt,bg as oa,K as Xe,aC as Hl,be as vr,bR as vx,bA as Ho,f as $r,z as J$,G as Z$,bz as Bs,bu as bx,bw as _x,bt as yx,bv as xx,bm as Vr,aQ as Hs,aP as Ul,bn as wx,al as Jm,I as Cn,t as Q$,u as eA,v as Ex,i as Zm,bH as Jr,c0 as Wc,bG as qc,m as Sx,D as Cx,b_ as ya,j as Px,bS as un,aI as Qm,c2 as Gc,aK as Rx,bE as si,aD as Tx,ar as Ix,bL as tA,bY as rA,aR as eh,aq as th,M as nA,aO as oA,az as $x,aA as Ax,ay as jx,aY as rh,av as sA,aF as Ox,aU as iA,aa as Pn,Z as Nx,ai as Dx,U as aA,p as so,aX as zn,b as kx,aV as Nn,aW as sa,aE as nh,by as Mx,aT as Lx,bI as zx,bx as lA,an as Wl,ak as cA,a9 as Tp,F as lv,aN as uA,ao as Ip,a$ as dA,w as $p,bq as pA,bp as $o,b0 as cv,bV as fA,aZ as uv,e as mA,b2 as dv,B as ql,ax as hA,au as gA,bQ as Fx,b4 as vA,bb as bA,a2 as Gl,bf as Vx,aM as _A,ah as yA,bB as Bx,b1 as pv,E as fv,a4 as Hx,g as xA}from"./vendor-antd-core-CbYNMZQB.js";import{c as wA,g as EA}from"./vendor-sentry-Cx26FE6p.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();var Kc={},Ux={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ux);var oh=Ux.exports,Xc={};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.default=void 0;const SA={items_per_page:"/ стр.",jump_to:"Перейти",jump_to_confirm:"подтвердить",page:"Страница",prev_page:"Назад",next_page:"Вперед",prev_5:"Предыдущие 5",next_5:"Следующие 5",prev_3:"Предыдущие 3",next_3:"Следующие 3",page_size:"размер страницы"};Xc.default=SA;var Yc={},xa={},Jc={},Zc={};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.commonLocale=void 0;Zc.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};Object.defineProperty(Jc,"__esModule",{value:!0});Jc.default=void 0;var CA=Zc;function ia(e){"@babel/helpers - typeof";return ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ia(e)}function mv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mv(Object(r),!0).forEach(function(n){PA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PA(e,t,r){return t=RA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RA(e){var t=TA(e,"string");return ia(t)=="symbol"?t:String(t)}function TA(e,t){if(ia(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ia(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var IA=hv(hv({},CA.commonLocale),{},{locale:"ru_RU",today:"Сегодня",now:"Сейчас",backToToday:"Текущая дата",ok:"ОК",clear:"Очистить",week:"Неделя",month:"Месяц",year:"Год",timeSelect:"Выбрать время",dateSelect:"Выбрать дату",monthSelect:"Выбрать месяц",yearSelect:"Выбрать год",decadeSelect:"Выбрать десятилетие",previousMonth:"Предыдущий месяц (PageUp)",nextMonth:"Следующий месяц (PageDown)",previousYear:"Предыдущий год (Control + left)",nextYear:"Следующий год (Control + right)",previousDecade:"Предыдущее десятилетие",nextDecade:"Следущее десятилетие",previousCentury:"Предыдущий век",nextCentury:"Следующий век"});Jc.default=IA;var wa={};Object.defineProperty(wa,"__esModule",{value:!0});wa.default=void 0;const $A={placeholder:"Выберите время",rangePlaceholder:["Время начала","Время окончания"]};wa.default=$A;var Wx=oh.default;Object.defineProperty(xa,"__esModule",{value:!0});xa.default=void 0;var AA=Wx(Jc),jA=Wx(wa);const OA={lang:{placeholder:"Выберите дату",yearPlaceholder:"Выберите год",quarterPlaceholder:"Выберите квартал",monthPlaceholder:"Выберите месяц",weekPlaceholder:"Выберите неделю",rangePlaceholder:["Начальная дата","Конечная дата"],rangeYearPlaceholder:["Начальный год","Год окончания"],rangeMonthPlaceholder:["Начальный месяц","Конечный месяц"],rangeWeekPlaceholder:["Начальная неделя","Конечная неделя"],shortWeekDays:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],shortMonths:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],...AA.default},timePickerLocale:{...jA.default}};xa.default=OA;var NA=oh.default;Object.defineProperty(Yc,"__esModule",{value:!0});Yc.default=void 0;var DA=NA(xa);Yc.default=DA.default;var Qc=oh.default;Object.defineProperty(Kc,"__esModule",{value:!0});Kc.default=void 0;var kA=Qc(Xc),MA=Qc(Yc),LA=Qc(xa),zA=Qc(wa);const jr="${label} не является типом ${type}",FA={locale:"ru",Pagination:kA.default,DatePicker:LA.default,TimePicker:zA.default,Calendar:MA.default,global:{placeholder:"Пожалуйста выберите",close:"Закрыть"},Table:{filterTitle:"Фильтр",filterConfirm:"OK",filterReset:"Сбросить",filterEmptyText:"Без фильтров",filterCheckAll:"Выбрать все элементы",filterSearchPlaceholder:"Поиск в фильтрах",emptyText:"Нет данных",selectAll:"Выбрать всё",selectInvert:"Инвертировать выбор",selectNone:"Очистить все данные",selectionAll:"Выбрать все данные",sortTitle:"Сортировка",expand:"Развернуть строку",collapse:"Свернуть строку",triggerDesc:"Нажмите для сортировки по убыванию",triggerAsc:"Нажмите для сортировки по возрастанию",cancelSort:"Нажмите, чтобы отменить сортировку"},Tour:{Next:"Далее",Previous:"Назад",Finish:"Завершить"},Modal:{okText:"OK",cancelText:"Отмена",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Отмена"},Transfer:{titles:["",""],searchPlaceholder:"Поиск",itemUnit:"элем.",itemsUnit:"элем.",remove:"Удалить",selectAll:"Выбрать все данные",deselectAll:"Очистить все данные",selectCurrent:"Выбрать текущую страницу",selectInvert:"Инвертировать выбор",removeAll:"Удалить все данные",removeCurrent:"Удалить текущую страницу"},Upload:{uploading:"Загрузка...",removeFile:"Удалить файл",uploadError:"При загрузке произошла ошибка",previewFile:"Предпросмотр файла",downloadFile:"Загрузить файл"},Empty:{description:"Нет данных"},Icon:{icon:"иконка"},Text:{edit:"Редактировать",copy:"Копировать",copied:"Скопировано",expand:"Раскрыть",collapse:"Свернуть"},Form:{optional:"(необязательно)",defaultValidateMessages:{default:"Ошибка проверки поля ${label}",required:"Пожалуйста, введите ${label}",enum:"${label} должен быть одним из [${enum}]",whitespace:"${label} не может быть пустым",date:{format:"${label} не правильный формат даты",parse:"${label} не может быть преобразовано в дату",invalid:"${label} не является корректной датой"},types:{string:jr,method:jr,array:jr,object:jr,number:jr,date:jr,boolean:jr,integer:jr,float:jr,regexp:jr,email:jr,url:jr,hex:jr},string:{len:"${label} должна быть ${len} символов",min:"${label} должна быть больше или равна ${min} символов",max:"${label} должна быть меньше или равна ${max} символов",range:"Длина ${label} должна быть между ${min}-${max} символами"},number:{len:"${label} должна быть равна ${len}",min:"${label} должна быть больше или равна ${min}",max:"${label} должна быть меньше или равна ${max}",range:"${label} должна быть между ${min}-${max}"},array:{len:"Количество элементов ${label} должно быть равно ${len}",min:"Количество элементов ${label} должно быть больше или равно ${min}",max:"Количество элементов ${label} должно быть меньше или равно ${max}",range:"Количество элементов ${label} должно быть между ${min} и ${max}"},pattern:{mismatch:"${label} не соответствует шаблону ${pattern}"}}},QRCode:{expired:"QR-код устарел",refresh:"Обновить"},ColorPicker:{presetEmpty:"Пустой",transparent:"Прозрачный",singleColor:"Один цвет",gradientColor:"Градиент"}};Kc.default=FA;var VA=Kc;const BA=Bc(VA);var HA=typeof Element<"u",UA=typeof Map=="function",WA=typeof Set=="function",qA=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Sl(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Sl(e[n],t[n]))return!1;return!0}var s;if(UA&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(s=e.entries();!(n=s.next()).done;)if(!t.has(n.value[0]))return!1;for(s=e.entries();!(n=s.next()).done;)if(!Sl(n.value[1],t.get(n.value[0])))return!1;return!0}if(WA&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(s=e.entries();!(n=s.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(qA&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;if(HA&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((o[n]==="_owner"||o[n]==="__v"||o[n]==="__o")&&e.$$typeof)&&!Sl(e[o[n]],t[o[n]]))return!1;return!0}return e!==e&&t!==t}var GA=function(t,r){try{return Sl(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const KA=Bc(GA);var XA=function(e,t,r,n,o,s,i,l){if(!e){var u;if(t===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,n,o,s,i,l],p=0;u=new Error(t.replace(/%s/g,function(){return d[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},YA=XA;const gv=Bc(YA);var JA=function(t,r,n,o){var s=n?n.call(o,t,r):void 0;if(s!==void 0)return!!s;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(r),d=0;d<i.length;d++){var p=i[d];if(!u(p))return!1;var f=t[p],m=r[p];if(s=n?n.call(o,f,m,p):void 0,s===!1||s===void 0&&f!==m)return!1}return!0};const ZA=Bc(JA);var qx=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(qx||{}),ld={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},vv=Object.values(qx),eu={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Gx=Object.entries(eu).reduce((e,[t,r])=>(e[r]=t,e),{}),sn="data-rh",Ns={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Ds=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},QA=e=>{let t=Ds(e,"title");const r=Ds(e,Ns.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=Ds(e,Ns.DEFAULT_TITLE);return t||n||void 0},e1=e=>Ds(e,Ns.ON_CHANGE_CLIENT_STATE)||(()=>{}),cd=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),t1=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const o=Object.keys(n);for(let s=0;s<o.length;s+=1){const l=o[s].toLowerCase();if(e.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),r1=e=>console&&typeof console.warn=="function"&&console.warn(e),vi=(e,t,r)=>{const n={};return r.filter(o=>Array.isArray(o[e])?!0:(typeof o[e]<"u"&&r1(`Helmet: ${e} should be of type "Array". Instead found type "${typeof o[e]}"`),!1)).map(o=>o[e]).reverse().reduce((o,s)=>{const i={};s.filter(u=>{let d;const p=Object.keys(u);for(let m=0;m<p.length;m+=1){const h=p[m],v=h.toLowerCase();t.indexOf(v)!==-1&&!(d==="rel"&&u[d].toLowerCase()==="canonical")&&!(v==="rel"&&u[v].toLowerCase()==="stylesheet")&&(d=v),t.indexOf(h)!==-1&&(h==="innerHTML"||h==="cssText"||h==="itemprop")&&(d=h)}if(!d||!u[d])return!1;const f=u[d].toLowerCase();return n[d]||(n[d]={}),i[d]||(i[d]={}),n[d][f]?!1:(i[d][f]=!0,!0)}).reverse().forEach(u=>o.push(u));const l=Object.keys(i);for(let u=0;u<l.length;u+=1){const d=l[u],p={...n[d],...i[d]};n[d]=p}return o},[]).reverse()},n1=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},o1=e=>({baseTag:t1(["href"],e),bodyAttributes:cd("bodyAttributes",e),defer:Ds(e,Ns.DEFER),encode:Ds(e,Ns.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:cd("htmlAttributes",e),linkTags:vi("link",["rel","href"],e),metaTags:vi("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:vi("noscript",["innerHTML"],e),onChangeClientState:e1(e),scriptTags:vi("script",["src","innerHTML"],e),styleTags:vi("style",["cssText"],e),title:QA(e),titleAttributes:cd("titleAttributes",e),prioritizeSeoTags:n1(e,Ns.PRIORITIZE_SEO_TAGS)}),Kx=e=>Array.isArray(e)?e.join(""):e,s1=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},ud=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(s1(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},bv=(e,t)=>({...e,[t]:void 0}),i1=["noscript","script","style"],Ap=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),Xx=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),a1=(e,t,r,n)=>{const o=Xx(r),s=Kx(t);return o?`<${e} ${sn}="true" ${o}>${Ap(s,n)}</${e}>`:`<${e} ${sn}="true">${Ap(s,n)}</${e}>`},l1=(e,t,r=!0)=>t.reduce((n,o)=>{const s=o,i=Object.keys(s).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,p)=>{const f=typeof s[p]>"u"?p:`${p}="${Ap(s[p],r)}"`;return d?`${d} ${f}`:f},""),l=s.innerHTML||s.cssText||"",u=i1.indexOf(e)===-1;return`${n}<${e} ${sn}="true" ${i}${u?"/>":`>${l}</${e}>`}`},""),Yx=(e,t={})=>Object.keys(e).reduce((r,n)=>{const o=eu[n];return r[o||n]=e[n],r},t),c1=(e,t,r)=>{const n={key:t,[sn]:!0},o=Yx(r,n);return[N.createElement("title",o,t)]},Cl=(e,t)=>t.map((r,n)=>{const o={key:n,[sn]:!0};return Object.keys(r).forEach(s=>{const l=eu[s]||s;if(l==="innerHTML"||l==="cssText"){const u=r.innerHTML||r.cssText;o.dangerouslySetInnerHTML={__html:u}}else o[l]=r[s]}),N.createElement(e,o)}),qr=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>c1(e,t.title,t.titleAttributes),toString:()=>a1(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Yx(t),toString:()=>Xx(t)};default:return{toComponent:()=>Cl(e,t),toString:()=>l1(e,t,r)}}},u1=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const o=ud(e,ld.meta),s=ud(t,ld.link),i=ud(r,ld.script);return{priorityMethods:{toComponent:()=>[...Cl("meta",o.priority),...Cl("link",s.priority),...Cl("script",i.priority)],toString:()=>`${qr("meta",o.priority,n)} ${qr("link",s.priority,n)} ${qr("script",i.priority,n)}`},metaTags:o.default,linkTags:s.default,scriptTags:i.default}},d1=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:o,noscriptTags:s,styleTags:i,title:l="",titleAttributes:u,prioritizeSeoTags:d}=e;let{linkTags:p,metaTags:f,scriptTags:m}=e,h={toComponent:()=>[],toString:()=>""};return d&&({priorityMethods:h,linkTags:p,metaTags:f,scriptTags:m}=u1(e)),{priority:h,base:qr("base",t,n),bodyAttributes:qr("bodyAttributes",r,n),htmlAttributes:qr("htmlAttributes",o,n),link:qr("link",p,n),meta:qr("meta",f,n),noscript:qr("noscript",s,n),script:qr("script",m,n),style:qr("style",i,n),title:qr("title",{title:l,titleAttributes:u},n)}},jp=d1,Ya=[],sh=!!(typeof window<"u"&&window.document&&window.document.createElement),Op=class{constructor(e,t){Ct(this,"instances",[]);Ct(this,"canUseDOM",sh);Ct(this,"context");Ct(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ya:this.instances,add:e=>{(this.canUseDOM?Ya:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Ya:this.instances).indexOf(e);(this.canUseDOM?Ya:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=jp({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},p1=parseInt(N.version.split(".")[0],10),Np=p1>=19,f1={},Jx=N.createContext(f1),Io,Zx=(Io=class extends a.Component{constructor(r){super(r);Ct(this,"helmetData");Np?this.helmetData=null:this.helmetData=new Op(this.props.context||{},Io.canUseDOM)}render(){return Np?N.createElement(N.Fragment,null,this.props.children):N.createElement(Jx.Provider,{value:this.helmetData.value},this.props.children)}},Ct(Io,"canUseDOM",sh),Io),Qo=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${sn}]`),o=[].slice.call(n),s=[];let i;return t&&t.length&&t.forEach(l=>{const u=document.createElement(e);for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d))if(d==="innerHTML")u.innerHTML=l.innerHTML;else if(d==="cssText"){const p=l.cssText;u.appendChild(document.createTextNode(p))}else{const p=d,f=typeof l[p]>"u"?"":l[p];u.setAttribute(d,f)}u.setAttribute(sn,"true"),o.some((d,p)=>(i=p,u.isEqualNode(d)))?o.splice(i,1):s.push(u)}),o.forEach(l=>{var u;return(u=l.parentNode)==null?void 0:u.removeChild(l)}),s.forEach(l=>r.appendChild(l)),{oldTags:o,newTags:s}},Dp=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(sn),o=n?n.split(","):[],s=[...o],i=Object.keys(t);for(const l of i){const u=t[l]||"";r.getAttribute(l)!==u&&r.setAttribute(l,u),o.indexOf(l)===-1&&o.push(l);const d=s.indexOf(l);d!==-1&&s.splice(d,1)}for(let l=s.length-1;l>=0;l-=1)r.removeAttribute(s[l]);o.length===s.length?r.removeAttribute(sn):r.getAttribute(sn)!==i.join(",")&&r.setAttribute(sn,i.join(","))},m1=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=Kx(e)),Dp("title",t)},_v=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:o,linkTags:s,metaTags:i,noscriptTags:l,onChangeClientState:u,scriptTags:d,styleTags:p,title:f,titleAttributes:m}=e;Dp("body",n),Dp("html",o),m1(f,m);const h={baseTag:Qo("base",r),linkTags:Qo("link",s),metaTags:Qo("meta",i),noscriptTags:Qo("noscript",l),scriptTags:Qo("script",d),styleTags:Qo("style",p)},v={},g={};Object.keys(h).forEach(b=>{const{newTags:_,oldTags:y}=h[b];_.length&&(v[b]=_),y.length&&(g[b]=h[b].oldTags)}),t&&t(),u(e,v,g)},bi=null,h1=e=>{bi&&cancelAnimationFrame(bi),e.defer?bi=requestAnimationFrame(()=>{_v(e,()=>{bi=null})}):(_v(e),bi=null)},g1=h1,yv=class extends a.Component{constructor(){super(...arguments);Ct(this,"rendered",!1)}shouldComponentUpdate(t){return!ZA(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const o=o1(t.get().map(s=>{const{context:i,...l}=s.props;return l}));Zx.canUseDOM?g1(o):jp&&(n=jp(o)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Pl=[],xv=e=>{const t={};for(const r of Object.keys(e))t[Gx[r]||r]=e[r];return t},go=e=>{const t={};for(const r of Object.keys(e)){const n=eu[r];t[n||r]=e[r]}return t},wv=(e,t)=>{if(!sh)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",o=r.getAttribute(n),s=o?o.split(","):[],i=Object.keys(t);for(const l of s)i.includes(l)||r.removeAttribute(l);for(const l of i){const u=t[l];u==null||u===!1?r.removeAttribute(l):u===!0?r.setAttribute(l,""):r.setAttribute(l,String(u))}i.length>0?r.setAttribute(n,i.join(",")):r.removeAttribute(n)},dd=()=>{const e={},t={};for(const r of Pl){const{htmlAttributes:n,bodyAttributes:o}=r.props;n&&Object.assign(e,xv(n)),o&&Object.assign(t,xv(o))}wv("html",e),wv("body",t)},v1=class extends a.Component{componentDidMount(){Pl.push(this),dd()}componentDidUpdate(){dd()}componentWillUnmount(){const e=Pl.indexOf(this);e!==-1&&Pl.splice(e,1),dd()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:r}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return N.createElement("title",go(t),e)}renderBase(){const{base:e}=this.props;return e?N.createElement("base",go(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>N.createElement("meta",{key:r,...go(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>N.createElement("link",{key:r,...go(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...o}=t,s=go(o);return n&&(s.dangerouslySetInnerHTML={__html:n}),N.createElement("script",{key:r,...s})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{cssText:n,...o}=t,s=go(o);return n&&(s.dangerouslySetInnerHTML={__html:n}),N.createElement("style",{key:r,...s})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...o}=t,s=go(o);return n&&(s.dangerouslySetInnerHTML={__html:n}),N.createElement("noscript",{key:r,...s})})}render(){return N.createElement(N.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Rp,b1=(Rp=class extends a.Component{shouldComponentUpdate(e){return!KA(bv(this.props,"helmetData"),bv(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return gv(vv.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${vv.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),gv(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return N.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:o,...s}=n.props,i=Object.keys(s).reduce((u,d)=>(u[Gx[d]||d]=s[d],u),{});let{type:l}=n;switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,o),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(o,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,i,o);break;default:t=this.mapObjectTypeChildren(n,t,i,o);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof Op)){const o=n;n=new Op(o.context,!0),delete r.helmetData}return Np?N.createElement(v1,{...r}):n?N.createElement(yv,{...r,context:n.value}):N.createElement(Jx.Consumer,null,o=>N.createElement(yv,{...r,context:o}))}},Ct(Rp,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Rp);const Qx=a.createContext(null),Jte=({roles:e,children:t})=>{const r=e.includes("ROLE_SUPER_ADMIN"),n=e.includes("ROLE_ADMIN"),o=e.includes("ROLE_MANAGER");return c.jsx(Qx.Provider,{value:{roles:e,isSuperAdmin:r,isAdmin:n,isManager:o},children:t})},_1=()=>{const e=a.useContext(Qx);return e||{roles:[],isSuperAdmin:!1,isAdmin:!1,isManager:!1}};function Ev(e,t=!1){if(Y$(e)){const r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),s=Number(o);let i=null;return o&&!Number.isNaN(s)?i=s:n&&i===null&&(i=0),n&&e.disabled&&(i=null),i!==null&&(i>=0||t&&i<0)}return!1}function ih(e,t=!1){const r=[...e.querySelectorAll("*")].filter(n=>Ev(n,t));return Ev(e,t)&&r.unshift(e),r}function y1(e,t){if(!e)return;e.focus(t);const{cursor:r}=t||{};if(r&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const n=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}let ks=null,Xn=[];const kp=new Map,ah=new Map;function lh(){return Xn[Xn.length-1]}function x1(e){const t=lh();if(e&&t){let r;for(const[o,s]of kp.entries())if(s===t){r=o;break}const n=ah.get(r);return!!n&&(n===e||n.contains(e))}return!1}function w1(e){const{activeElement:t}=document;return e===t||e.contains(t)}function pd(){const e=lh(),{activeElement:t}=document;if(!x1(t))if(e&&!w1(e)){const r=ih(e),n=r.includes(ks)?ks:r[0];n==null||n.focus({preventScroll:!0})}else ks=t}function Sv(e){if(e.key==="Tab"){const{activeElement:t}=document,r=lh(),n=ih(r),o=n[n.length-1];e.shiftKey&&t===n[0]?ks=o:!e.shiftKey&&t===o&&(ks=n[0])}}function E1(e,t){return e&&(kp.set(t,e),Xn=Xn.filter(r=>r!==e),Xn.push(e),window.addEventListener("focusin",pd),window.addEventListener("keydown",Sv,!0),pd()),()=>{ks=null,Xn=Xn.filter(r=>r!==e),kp.delete(t),ah.delete(t),Xn.length===0&&(window.removeEventListener("focusin",pd),window.removeEventListener("keydown",Sv,!0))}}function S1(e,t){const r=a.useRef(0),[n,o]=a.useState(0);a.useEffect(()=>{r.current=0},t),a.useEffect(()=>{const[s,i]=e(r.current);return i||(r.current+=1,o(l=>l+1)),s},[...t,n])}function Zte(e,t){const r=Hc(),n=a.useRef(t);return n.current=t,S1(i=>{if(!e)return[void 0,!0];const l=n.current();return l?[E1(l,r),!0]:[void 0,i>=1]},[r,e]),[i=>{i&&ah.set(r,i)}]}const C1=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},P1=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},R1=(e,t)=>{const{componentCls:r,gridColumns:n,antCls:o}=e,[s,i]=_r(o,"grid"),[,l]=_r(o,"col"),u={};for(let d=n;d>=0;d--)d===0?(u[`${r}${t}-${d}`]={display:"none"},u[`${r}-push-${d}`]={insetInlineStart:"auto"},u[`${r}-pull-${d}`]={insetInlineEnd:"auto"},u[`${r}${t}-push-${d}`]={insetInlineStart:"auto"},u[`${r}${t}-pull-${d}`]={insetInlineEnd:"auto"},u[`${r}${t}-offset-${d}`]={marginInlineStart:0},u[`${r}${t}-order-${d}`]={order:0}):(u[`${r}${t}-${d}`]=[{[s("display")]:"block",display:"block"},{display:i("display"),flex:`0 0 ${d/n*100}%`,maxWidth:`${d/n*100}%`}],u[`${r}${t}-push-${d}`]={insetInlineStart:`${d/n*100}%`},u[`${r}${t}-pull-${d}`]={insetInlineEnd:`${d/n*100}%`},u[`${r}${t}-offset-${d}`]={marginInlineStart:`${d/n*100}%`},u[`${r}${t}-order-${d}`]={order:d});return u[`${r}${t}-flex`]={flex:l(`${t.replace(/-/,"")}-flex`)},u},Mp=(e,t)=>R1(e,t),T1=(e,t,r)=>({[`@media (min-width: ${we(t)})`]:{...Mp(e,r)}}),I1=()=>({}),$1=()=>({}),A1=rr("Grid",C1,I1),j1=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),O1=rr("Grid",e=>{const t=tr(e,{gridColumns:24}),r=j1(t);return delete r.xs,[P1(t),Mp(t,""),Mp(t,"-xs"),Object.keys(r).map(n=>T1(t,r[n],`-${n}`)).reduce((n,o)=>({...n,...o}),{})]},$1),N1=(e,t,r,n,o=!1,s,i)=>{const l=a.useMemo(()=>typeof r=="boolean"?{allowClear:r}:r&&typeof r=="object"?r:{allowClear:!1},[r]);return a.useMemo(()=>{const u=!o&&l.allowClear!==!1&&(t.length||s)&&!(i==="combobox"&&s==="");return{allowClear:u,clearIcon:u?l.clearIcon||n||"×":null}},[l,n,o,t.length,s,i])},e0=a.createContext(null);function Uo(){return a.useContext(e0)}function D1(e=250){const t=a.useRef(null),r=a.useRef(null);a.useEffect(()=>()=>{window.clearTimeout(r.current)},[]);function n(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,n]}function t0(e,t){return e.filter(r=>r).some(r=>r.contains(t)||r===t)}function k1(e,t,r,n){const o=zr(s=>{if(n)return;let i=s.target;i.shadowRoot&&s.composed&&(i=s.composedPath()[0]||i),s._ori_target&&(i=s._ori_target),t&&!t0(e(),i)&&r(!1)});a.useEffect(()=>(window.addEventListener("mousedown",o),()=>window.removeEventListener("mousedown",o)),[o])}function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lp.apply(this,arguments)}const M1=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},L1=(e,t)=>{const{prefixCls:r,disabled:n,visible:o,children:s,popupElement:i,animation:l,transitionName:u,popupStyle:d,popupClassName:p,direction:f="ltr",placement:m,builtinPlacements:h,popupMatchSelectWidth:v,popupRender:g,popupAlign:b,getPopupContainer:_,empty:y,onPopupVisibleChange:x,onPopupMouseEnter:S,onPopupMouseDown:w,onPopupBlur:I,...T}=e,R=`${r}-dropdown`;let P=i;g&&(P=g(i));const $=a.useMemo(()=>h||M1(v),[h,v]),A=l?`${R}-${l}`:u,k=typeof v=="number",D=a.useMemo(()=>k?null:v===!1?"minWidth":"width",[v,k]);let z=d;k&&(z={...d,width:v});const X=a.useRef(null);return a.useImperativeHandle(t,()=>({getPopupElement:()=>{var V;return(V=X.current)==null?void 0:V.popupElement}})),a.createElement(Uc,Lp({},T,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:m||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:$,prefixCls:R,popupMotion:{motionName:A},popup:a.createElement("div",{onMouseEnter:S,onMouseDown:w,onBlur:I},P),ref:X,stretch:D,popupAlign:b,popupVisible:o,getPopupContainer:_,popupClassName:ae(p,{[`${R}-empty`]:y}),popupStyle:z,onPopupVisibleChange:x}),s)},z1=a.forwardRef(L1);function Cv(e,t){const{key:r}=e;let n;return"value"in e&&({value:n}=e),r??(n!==void 0?n:`rc-index-key-${t}`)}function zp(e){return typeof e<"u"&&!Number.isNaN(e)}function r0(e,t){const{label:r,value:n,options:o,groupLabel:s}=e||{},i=r||(t?"children":"label");return{label:i,value:n||"value",options:o||"options",groupLabel:s||i}}function F1(e,{fieldNames:t,childrenAsData:r}={}){const n=[],{label:o,value:s,options:i,groupLabel:l}=r0(t,!1);function u(d,p){Array.isArray(d)&&d.forEach(f=>{if(p||!(i in f)){const m=f[s];n.push({key:Cv(f,n.length),groupOption:p,data:f,label:f[o],value:m})}else{let m=f[l];m===void 0&&r&&(m=f.label),n.push({key:Cv(f,n.length),group:!0,data:f,label:m}),u(f[i],!0)}})}return u(e,!1),n}function Fp(e){const t={...e};return"props"in t||Object.defineProperty(t,"props",{get(){return Ym(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const V1=(e,t,r)=>{if(!t||!t.length)return null;let n=!1;const o=(i,[l,...u])=>{if(!l)return[i];const d=i.split(l);return n=n||d.length>1,d.reduce((p,f)=>[...p,...o(f,u)],[]).filter(Boolean)},s=o(e,t);return n?typeof r<"u"?s.slice(0,r):s:null};function B1(e){const{visible:t,values:r}=e;if(!t)return null;const n=50;return a.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${r.slice(0,n).map(({label:o,value:s})=>["number","string"].includes(typeof o)?o:s).join(", ")}`,r.length>n?", ...":null)}const H1=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},ch=(e,t=1)=>{if(t<=0){e();return}H1(()=>{ch(e,t-1)})};function U1(e,t,r,n){const[o,s]=a.useState(!1);a.useEffect(()=>{s(!0)},[]);const[i,l]=Rr(e,t),[u,d]=a.useState(!1),p=o?i:!1,f=n(p),m=a.useRef(0),h=zr(g=>{r&&f!==g&&r(g),l(g)}),v=zr((g,b={})=>{const{cancelFun:_}=b;m.current+=1;const y=m.current,x=typeof g=="boolean"?g:!f;d(!x);function S(){y===m.current&&!(_!=null&&_())&&(h(x),d(!1))}x?S():ch(()=>{S()})});return[p,f,v,u]}function fd(e){const{children:t,...r}=e;return t?a.createElement("div",r,t):null}const n0=a.createContext(null);function Ea(){return a.useContext(n0)}const o0=a.forwardRef((e,t)=>{const{onChange:r,onKeyDown:n,onBlur:o,style:s,syncWidth:i,value:l,className:u,autoComplete:d,...p}=e,{prefixCls:f,mode:m,onSearch:h,onSearchSubmit:v,onInputBlur:g,autoFocus:b,tokenWithEnter:_,placeholder:y,components:{input:x="input"}}=Ea(),{id:S,classNames:w,styles:I,open:T,activeDescendantId:R,role:P,disabled:$}=Uo()||{},A=ae(`${f}-input`,w==null?void 0:w.input,u),k=a.useRef(!1),D=a.useRef(null),z=a.useRef(null);a.useImperativeHandle(t,()=>z.current);const X=L=>{let{value:W}=L.target;if(_&&D.current&&/[\r\n]/.test(D.current)){const B=D.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");W=W.replace(B,D.current)}D.current=null,h&&h(W,!0,k.current),r==null||r(L)},V=L=>{const{key:W}=L,{value:B}=L.currentTarget;W==="Enter"&&m==="tags"&&!T&&!k.current&&v&&v(B),n==null||n(L)},Y=L=>{g==null||g(),o==null||o(L)},U=()=>{k.current=!0},F=L=>{if(k.current=!1,m!=="combobox"){const{value:W}=L.currentTarget;h==null||h(W,!0,!1)}},H=L=>{const{clipboardData:W}=L,B=W==null?void 0:W.getData("text");D.current=B||""},[ee,O]=a.useState(void 0);er(()=>{const L=z.current;if(i&&L){L.style.width="0px";const W=L.scrollWidth;O(W),L.style.width=""}},[i,l]);const M={id:S,type:m==="combobox"?"text":"search",...p,ref:z,style:{...I==null?void 0:I.input,...s,"--select-input-width":ee},autoFocus:b,autoComplete:d||"off",className:A,disabled:$,value:l||"",onChange:X,onKeyDown:V,onBlur:Y,onPaste:H,onCompositionStart:U,onCompositionEnd:F,role:P||"combobox","aria-expanded":T||!1,"aria-haspopup":"listbox","aria-owns":T?`${S}_list`:void 0,"aria-autocomplete":"list","aria-controls":T?`${S}_list`:void 0,"aria-activedescendant":T?R:void 0};if(a.isValidElement(x)){const L=x.props||{},W={placeholder:e.placeholder||y,...M,...L};return Object.keys(L).forEach(B=>{const J=L[B];typeof J=="function"&&(W[B]=(...K)=>{var re;J(...K),(re=M[B])==null||re.call(M,...K)})}),W.ref=_a(x.ref,M.ref),a.cloneElement(x,W)}const G=x;return a.createElement(G,M)});function s0(e){const{prefixCls:t,placeholder:r,displayValues:n}=Ea(),{classNames:o,styles:s}=Uo(),{show:i=!0}=e;return n.length?null:a.createElement("div",{className:ae(`${t}-placeholder`,o==null?void 0:o.placeholder),style:{visibility:i?"visible":"hidden",...s==null?void 0:s.placeholder}},r)}const uh=a.createContext(null);function i0(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function W1(e){return e!=null}function q1(e){return!e&&e!==0}function Pv(e){return["string","number"].includes(typeof e)}function Vp(e){let t;return e&&(Pv(e.title)?t=e.title.toString():Pv(e.label)&&(t=e.label.toString())),t}function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bp.apply(this,arguments)}const G1=a.forwardRef(({inputProps:e},t)=>{const{prefixCls:r,searchValue:n,activeValue:o,displayValues:s,maxLength:i,mode:l,components:u}=Ea(),{triggerOpen:d,title:p,showSearch:f,classNames:m,styles:h}=Uo(),v=a.useContext(uh),[g,b]=a.useState(!1),_=l==="combobox",y=s[0],x=a.useMemo(()=>_&&o&&!g&&d?o:f?n:"",[_,o,g,d,n,f]),[S,w,I,T]=a.useMemo(()=>{let A,k,D;if(y&&(v!=null&&v.flattenOptions)){const X=v.flattenOptions.find(V=>V.value===y.value);X!=null&&X.data&&(A=X.data.className,k=X.data.style,D=Vp(X.data))}return y&&!D&&(D=Vp(y)),p!==void 0&&(D=p),[A,k,D,!!A||!!k]},[y,v==null?void 0:v.flattenOptions,p]);a.useEffect(()=>{_&&b(!1)},[_,o]);const R=y&&y.label!==null&&y.label!==void 0&&String(y.label).trim()!=="",$=!(_&&(u!=null&&u.input))?y?T?a.createElement("div",{className:ae(`${r}-content-value`,S),style:{...x?{visibility:"hidden"}:{},...w},title:I},y.label):y.label:a.createElement(s0,{show:!x}):null;return a.createElement("div",{className:ae(`${r}-content`,R&&`${r}-content-has-value`,x&&`${r}-content-has-search-value`,T&&`${r}-content-has-option-style`,m==null?void 0:m.content),style:h==null?void 0:h.content,title:T?void 0:I},$,a.createElement(o0,Bp({ref:t},e,{value:x,maxLength:l==="combobox"?i:void 0,onChange:A=>{var k;b(!0),(k=e.onChange)==null||k.call(e,A)}})))}),es=void 0;function K1(e,t){const{prefixCls:r,invalidate:n,item:o,renderItem:s,responsive:i,responsiveDisabled:l,registerSize:u,itemKey:d,className:p,style:f,children:m,display:h,order:v,component:g="div",...b}=e,_=i&&!h;function y(T){u(d,T)}a.useEffect(()=>()=>{y(null)},[]);const x=s&&o!==es?s(o,{index:v}):m;let S;n||(S={opacity:_?0:1,height:_?0:es,overflowY:_?"hidden":es,order:i?v:es,pointerEvents:_?"none":es,position:_?"absolute":es});const w={};_&&(w["aria-hidden"]=!0);let I=a.createElement(g,gn({className:ae(!n&&r,p),style:{...S,...f}},w,b,{ref:t}),x);return i&&(I=a.createElement(oi,{onResize:({offsetWidth:T})=>{y(T)},disabled:l},I)),I}const ki=a.forwardRef(K1);function X1(e){if(typeof MessageChannel>"u")Wt(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function Y1(){const e=a.useRef(null);return r=>{e.current||(e.current=[],X1(()=>{Oo.unstable_batchedUpdates(()=>{e.current.forEach(n=>{n()}),e.current=null})})),e.current.push(r)}}function ts(e,t){const[r,n]=a.useState(t),o=zr(s=>{e(()=>{n(s)})});return[r,o]}const Kl=N.createContext(null),J1=(e,t)=>{const r=a.useContext(Kl);if(!r){const{component:l="div",...u}=e;return a.createElement(l,gn({},u,{ref:t}))}const{className:n,...o}=r,{className:s,...i}=e;return a.createElement(Kl.Provider,{value:null},a.createElement(ki,gn({ref:t,className:ae(n,s)},o,i)))},Z1=a.forwardRef(J1),a0="responsive",l0="invalidate";function Q1(e){return`+ ${e.length} ...`}function ej(e,t){const{prefixCls:r="rc-overflow",data:n=[],renderItem:o,renderRawItem:s,itemKey:i,itemWidth:l=10,ssr:u,style:d,className:p,maxCount:f,renderRest:m,renderRawRest:h,prefix:v,suffix:g,component:b="div",itemComponent:_,onVisibleChange:y,...x}=e,S=u==="full",w=Y1(),[I,T]=ts(w,null),R=I||0,[P,$]=ts(w,new Map),[A,k]=ts(w,0),[D,z]=ts(w,0),[X,V]=ts(w,0),[Y,U]=ts(w,0),[F,H]=a.useState(null),[ee,O]=a.useState(null),M=a.useMemo(()=>ee===null&&S?Number.MAX_SAFE_INTEGER:ee||0,[ee,I]),[G,L]=a.useState(!1),W=`${r}-item`,B=Math.max(A,D),J=f===a0,K=n.length&&J,re=f===l0,se=K||typeof f=="number"&&n.length>f,Z=a.useMemo(()=>{let ue=n;return K?I===null&&S?ue=n:ue=n.slice(0,Math.min(n.length,R/l)):typeof f=="number"&&(ue=n.slice(0,f)),ue},[n,l,I,f,K]),ne=a.useMemo(()=>K?n.slice(M+1):n.slice(Z.length),[n,Z,K,M]),ie=a.useCallback((ue,ye)=>typeof i=="function"?i(ue):(i&&(ue==null?void 0:ue[i]))??ye,[i]),he=a.useCallback(o||(ue=>ue),[o]);function me(ue,ye,Be){ee===ue&&(ye===void 0||ye===F)||(O(ue),Be||(L(ue<n.length-1),y==null||y(ue)),ye!==void 0&&H(ye))}function Pe(ue,ye){T(ye.clientWidth)}function Se(ue,ye){$(Be=>{const Ae=new Map(Be);return ye===null?Ae.delete(ue):Ae.set(ue,ye),Ae})}function Ce(ue,ye){z(ye),k(D)}function Ze(ue,ye){V(ye)}function Ye(ue,ye){U(ye)}function pe(ue){return P.get(ie(Z[ue],ue))}er(()=>{if(R&&typeof B=="number"&&Z){let ue=X+Y;const ye=Z.length,Be=ye-1;if(!ye){me(0,null);return}for(let Ae=0;Ae<ye;Ae+=1){let Ee=pe(Ae);if(S&&(Ee=Ee||0),Ee===void 0){me(Ae-1,void 0,!0);break}if(ue+=Ee,Be===0&&ue<=R||Ae===Be-1&&ue+pe(Be)<=R){me(Be,null);break}else if(ue+B>R){me(Ae-1,ue-Ee-Y+D);break}}g&&pe(0)+Y>R&&H(null)}},[R,P,D,X,Y,ie,Z]);const be=G&&!!ne.length;let j={};F!==null&&K&&(j={position:"absolute",top:0,insetInlineStart:F});const q={prefixCls:W,responsive:K,component:_,invalidate:re},Q=s?(ue,ye)=>{const Be=ie(ue,ye);return a.createElement(Kl.Provider,{key:Be,value:{...q,order:ye,item:ue,itemKey:Be,registerSize:Se,display:ye<=M}},s(ue,ye))}:(ue,ye)=>{const Be=ie(ue,ye);return a.createElement(ki,gn({},q,{order:ye,key:Be,item:ue,renderItem:he,itemKey:Be,registerSize:Se,display:ye<=M}))},le={order:be?M:Number.MAX_SAFE_INTEGER,className:`${W}-rest`,registerSize:Ce,display:be},de=m||Q1,ce=h?a.createElement(Kl.Provider,{value:{...q,...le}},h(ne)):a.createElement(ki,gn({},q,le),typeof de=="function"?de(ne):de),fe=a.createElement(b,gn({className:ae(!re&&r,p),style:d,ref:t},x),v&&a.createElement(ki,gn({},q,{responsive:J,responsiveDisabled:!K,order:-1,className:`${W}-prefix`,registerSize:Ze,display:!0}),v),Z.map(Q),se?ce:null,g&&a.createElement(ki,gn({},q,{responsive:J,responsiveDisabled:!K,order:M,className:`${W}-suffix`,registerSize:Ye,display:!0,style:j}),g));return J?a.createElement(oi,{onResize:Pe,disabled:!K},fe):fe}const Ln=a.forwardRef(ej);Ln.Item=Z1;Ln.RESPONSIVE=a0;Ln.INVALIDATE=l0;const c0=e=>{const{className:t,style:r,customizeIcon:n,customizeIconProps:o,children:s,onMouseDown:i,onClick:l}=e,u=typeof n=="function"?n(o):n;return a.createElement("span",{className:t,onMouseDown:d=>{d.preventDefault(),i==null||i(d)},style:{userSelect:"none",WebkitUserSelect:"none",...r},unselectable:"on",onClick:l,"aria-hidden":!0},u!==void 0?u:a.createElement("span",{className:ae(t.split(/\s+/).map(d=>`${d}-icon`))},s))};function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hp.apply(this,arguments)}function tj(e){return e.key??e.value}const Rv=e=>{e.preventDefault(),e.stopPropagation()},rj=a.forwardRef(function({inputProps:t},r){const{prefixCls:n,displayValues:o,searchValue:s,mode:i,onSelectorRemove:l,removeIcon:u}=Ea(),{disabled:d,showSearch:p,triggerOpen:f,rawOpen:m,toggleOpen:h,autoClearSearchValue:v,tagRender:g,maxTagPlaceholder:b,maxTagTextLength:_,maxTagCount:y,classNames:x,styles:S}=Uo(),w=`${n}-selection-item`;let I=s;!m&&i==="multiple"&&v!==!1&&(I="");const T=p&&I||"",R=p&&!d,P=u??"×",$=b??(U=>`+ ${U.length} ...`),A=g,k=U=>{h(U)},D=U=>{l==null||l(U)},z=(U,F,H,ee,O)=>a.createElement("span",{title:Vp(U),className:ae(w,{[`${w}-disabled`]:H},x==null?void 0:x.item),style:S==null?void 0:S.item},a.createElement("span",{className:ae(`${w}-content`,x==null?void 0:x.itemContent),style:S==null?void 0:S.itemContent},F),ee&&a.createElement(c0,{className:ae(`${w}-remove`,x==null?void 0:x.itemRemove),style:S==null?void 0:S.itemRemove,onMouseDown:Rv,onClick:O,customizeIcon:P},"×")),X=(U,F,H,ee,O,M,G)=>{const L=W=>{Rv(W),k(!f)};return a.createElement("span",{onMouseDown:L},A({label:F,value:U,index:G==null?void 0:G.index,disabled:H,closable:ee,onClose:O,isMaxTag:!!M}))},V=(U,F)=>{const{disabled:H,label:ee,value:O}=U,M=!d&&!H;let G=ee;if(typeof _=="number"&&(typeof ee=="string"||typeof ee=="number")){const W=String(G);W.length>_&&(G=`${W.slice(0,_)}...`)}const L=W=>{W&&W.stopPropagation(),D(U)};return typeof A=="function"?X(O,G,H,M,L,void 0,F):z(U,G,H,M,L)},Y=U=>{if(!o.length)return null;const F=typeof $=="function"?$(U):$;return typeof A=="function"?X(void 0,F,!1,!1,void 0,!0):z({title:F},F,!1)};return a.createElement(Ln,{prefixCls:`${n}-content`,className:x==null?void 0:x.content,style:S==null?void 0:S.content,prefix:!o.length&&!T&&a.createElement(s0,null),data:o,renderItem:V,renderRest:Y,suffix:a.createElement(o0,Hp({ref:r,disabled:d,readOnly:!R},t,{value:T||"",syncWidth:!0})),itemKey:tj,maxCount:y})}),nj=a.forwardRef(function(t,r){const{multiple:n,onInputKeyDown:o,tabIndex:s}=Ea(),i=Uo(),{showSearch:l}=i,d={...oa(i,{aria:!0}),onKeyDown:o,readOnly:!l,tabIndex:s};return n?a.createElement(rj,{ref:r,inputProps:d}):a.createElement(G1,{ref:r,inputProps:d})});function oj(e){return e&&![Xe.ESC,Xe.SHIFT,Xe.BACKSPACE,Xe.TAB,Xe.WIN_KEY,Xe.ALT,Xe.META,Xe.WIN_KEY_RIGHT,Xe.CTRL,Xe.SEMICOLON,Xe.EQUALS,Xe.CAPS_LOCK,Xe.CONTEXT_MENU,Xe.UP,Xe.LEFT,Xe.RIGHT,Xe.F1,Xe.F2,Xe.F3,Xe.F4,Xe.F5,Xe.F6,Xe.F7,Xe.F8,Xe.F9,Xe.F10,Xe.F11,Xe.F12].includes(e)}function Xl(){return Xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xl.apply(this,arguments)}const sj=["value","onChange","removeIcon","placeholder","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex","activeValue","onSelectorRemove","focused"],ij=a.forwardRef(function(t,r){const{prefixCls:n,className:o,style:s,prefix:i,suffix:l,clearIcon:u,children:d,multiple:p,displayValues:f,placeholder:m,mode:h,searchValue:v,onSearch:g,onSearchSubmit:b,onInputBlur:_,maxLength:y,autoFocus:x,onMouseDown:S,onClearMouseDown:w,onInputKeyDown:I,onSelectorRemove:T,tokenWithEnter:R,components:P,...$}=t,{triggerOpen:A,toggleOpen:k,showSearch:D,disabled:z,loading:X,classNames:V,styles:Y}=Uo(),U=a.useRef(null),F=a.useRef(null),H=zr(B=>{const{which:J}=B,K=F.current instanceof HTMLTextAreaElement;if(!K&&A&&(J===Xe.UP||J===Xe.DOWN)&&B.preventDefault(),I&&I(B),K&&!A&&~[Xe.UP,Xe.DOWN,Xe.LEFT,Xe.RIGHT].indexOf(J))return;!(B.ctrlKey||B.altKey||B.metaKey)&&oj(J)&&k(!0)});a.useImperativeHandle(r,()=>({focus:B=>{var J,K;(K=(J=F.current||U.current).focus)==null||K.call(J,B)},blur:()=>{var B,J;(J=(B=F.current||U.current).blur)==null||J.call(B)},nativeElement:Hl(U.current)}));const ee=zr(B=>{var J;if(!z){const K=Hl(F.current);B.nativeEvent._ori_target=K;const re=K===B.target||(K==null?void 0:K.contains(B.target));K&&!re&&B.preventDefault();const ne=A&&!p&&(h==="combobox"||D)||A&&p&&re;B.nativeEvent._select_lazy?A&&k(!1):((J=F.current)==null||J.focus(),ne||k())}S==null||S(B)}),{root:O}=P,M=vr($,sj),G=oa(M,{aria:!0}),L=Object.keys(G),W={...t,onInputKeyDown:H};if(O){const B=O.props||{},J={...B,...M};return Object.keys(B).forEach(K=>{const re=B[K],se=M[K];typeof re=="function"&&typeof se=="function"&&(J[K]=(...Z)=>{se(...Z),re(...Z)})}),a.isValidElement(O)?a.cloneElement(O,{...J,ref:_a(O.ref,U)}):a.createElement(O,Xl({},J,{ref:U}))}return a.createElement(n0.Provider,{value:W},a.createElement("div",Xl({},vr(M,L),{ref:U,className:o,style:s,onMouseDown:ee}),a.createElement(fd,{className:ae(`${n}-prefix`,V==null?void 0:V.prefix),style:Y==null?void 0:Y.prefix},i),a.createElement(nj,{ref:F}),a.createElement(fd,{className:ae(`${n}-suffix`,{[`${n}-suffix-loading`]:X},V==null?void 0:V.suffix),style:Y==null?void 0:Y.suffix},l),u&&a.createElement(fd,{className:ae(`${n}-clear`,V==null?void 0:V.clear),style:Y==null?void 0:Y.clear,onMouseDown:B=>{B.nativeEvent._select_lazy=!0,w==null||w(B)}},u),d))});function aj(e,t,r){return a.useMemo(()=>{let{root:n,input:o}=e||{};return r&&(n=r()),t&&(o=t()),{root:n,input:o}},[e,t,r])}function Up(){return Up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Up.apply(this,arguments)}const Wp=e=>e==="tags"||e==="multiple",lj=a.forwardRef((e,t)=>{const{id:r,prefixCls:n,className:o,styles:s,classNames:i,showSearch:l,tagRender:u,showScrollBar:d="optional",direction:p,omitDomProps:f,displayValues:m,onDisplayValuesChange:h,emptyOptions:v,notFoundContent:g="Not Found",onClear:b,maxCount:_,placeholder:y,mode:x,disabled:S,loading:w,getInputElement:I,getRawInputElement:T,open:R,defaultOpen:P,onPopupVisibleChange:$,activeValue:A,onActiveValueChange:k,activeDescendantId:D,searchValue:z,autoClearSearchValue:X,onSearch:V,onSearchSplit:Y,tokenSeparators:U,allowClear:F,prefix:H,suffix:ee,suffixIcon:O,clearIcon:M,OptionList:G,animation:L,transitionName:W,popupStyle:B,popupClassName:J,popupMatchSelectWidth:K,popupRender:re,popupAlign:se,placement:Z,builtinPlacements:ne,getPopupContainer:ie,showAction:he=[],onFocus:me,onBlur:Pe,onKeyUp:Se,onKeyDown:Ce,onMouseDown:Ze,components:Ye,...pe}=e,be=Wp(x),j=a.useRef(null),q=a.useRef(null),Q=a.useRef(null),[le,de]=a.useState(!1);a.useImperativeHandle(t,()=>{var Me,st;return{focus:(Me=j.current)==null?void 0:Me.focus,blur:(st=j.current)==null?void 0:st.blur,scrollTo:bt=>{var $t;return($t=Q.current)==null?void 0:$t.scrollTo(bt)},nativeElement:Hl(j.current)}});const ce=aj(Ye,I,T),fe=a.useMemo(()=>{var st;if(x!=="combobox")return z;const Me=(st=m[0])==null?void 0:st.value;return typeof Me=="string"||typeof Me=="number"?String(Me):""},[z,x,m]),ue=x==="combobox"&&typeof I=="function"&&I()||null,ye=!g&&v,[Be,Ae,Ee,lt]=U1(P||!1,R,$,Me=>S||ye?!1:Me),ht=a.useMemo(()=>(U||[]).some(Me=>[`
`,`\r
`].includes(Me)),[U]),dt=(Me,st,bt)=>{if(be&&zp(_)&&m.length>=_)return;let $t=!0,pr=Me;k==null||k(null);const Tn=V1(Me,U,zp(_)?_-m.length:void 0),Jt=bt?null:Tn;return x!=="combobox"&&Jt&&(pr="",Y==null||Y(Jt),Ee(!1),$t=!1),V&&fe!==pr&&V(pr,{source:st?"typing":"effect"}),Me&&st&&$t&&Ee(!0),$t},mt=Me=>{!Me||!Me.trim()||V(Me,{source:"submit"})};a.useEffect(()=>{!Be&&!be&&x!=="combobox"&&dt("",!1,!1)},[Be]),a.useEffect(()=>{S&&(Ee(!1),de(!1))},[S,Ae]);const[ft,vt]=D1(),ze=a.useRef(!1),We=Me=>{var Tn;const st=ft(),{key:bt}=Me,$t=bt==="Enter",pr=bt===" ";if($t||pr){const Jt=x==="combobox";(pr&&!(Jt||l)||$t&&!Jt)&&Me.preventDefault(),Ae||Ee(!0)}if(vt(!!fe),bt==="Backspace"&&!st&&be&&!fe&&m.length){const Jt=[...m];let mo=null;for(let ho=Jt.length-1;ho>=0;ho-=1){const Xa=Jt[ho];if(!Xa.disabled){Jt.splice(ho,1),mo=Xa;break}}mo&&h(Jt,{type:"remove",values:[mo]})}Ae&&(!$t||!ze.current)&&!pr&&($t&&(ze.current=!0),(Tn=Q.current)==null||Tn.onKeyDown(Me)),Ce==null||Ce(Me)},ke=(Me,...st)=>{var bt;Ae&&((bt=Q.current)==null||bt.onKeyUp(Me,...st)),Me.key==="Enter"&&(ze.current=!1),Se==null||Se(Me,...st)},nt=zr(Me=>{const st=m.filter(bt=>bt!==Me);h(st,{type:"remove",values:[Me]})}),ut=()=>{ze.current=!1},_e=()=>{var Me;return[Hl(j.current),(Me=q.current)==null?void 0:Me.getPopupElement()]};k1(_e,Ae,Ee,!!ce.root);const Qe=a.useRef(!1),ge=Me=>{de(!0),S||(he.includes("focus")&&Ee(!0),me==null||me(Me))},Te=()=>{Ae&&!Qe.current&&Ee(!1,{cancelFun:()=>t0(_e(),document.activeElement)})},et=Me=>{de(!1),fe&&(x==="tags"?V(fe,{source:"submit"}):x==="multiple"&&V("",{source:"blur"})),Te(),S||Pe==null||Pe(Me)},xe=(Me,...st)=>{var pr;const{target:bt}=Me,$t=(pr=q.current)==null?void 0:pr.getPopupElement();$t!=null&&$t.contains(bt)&&Ee&&Ee(!0),Ze==null||Ze(Me,...st),Qe.current=!0,ch(()=>{Qe.current=!1})},[,$e]=a.useState({});function Fe(){$e({})}let Ge;ce.root&&(Ge=Me=>{Ee(Me)});const rt=a.useMemo(()=>({...e,notFoundContent:g,open:Ae,triggerOpen:Ae,rawOpen:Be,id:r,showSearch:l,multiple:be,toggleOpen:Ee,showScrollBar:d,styles:s,classNames:i,lockOptions:lt}),[e,g,Ee,r,l,be,Ae,Be,d,s,i,lt]),Gt=a.useMemo(()=>{const Me=ee??O;return typeof Me=="function"?Me({searchValue:fe,open:Ae,focused:le,showSearch:l,loading:w}):Me},[ee,O,fe,Ae,le,l,w]),dr=()=>{var Me;b==null||b(),(Me=j.current)==null||Me.focus(),h([],{type:"clear",values:m}),dt("",!1,!1)},{allowClear:Kt,clearIcon:id}=N1(n,m,F,M,S,fe,x),ad=a.createElement(G,{ref:Q}),Ka=ae(n,o,{[`${n}-focused`]:le,[`${n}-multiple`]:be,[`${n}-single`]:!be,[`${n}-allow-clear`]:Kt,[`${n}-show-arrow`]:Gt!=null,[`${n}-disabled`]:S,[`${n}-loading`]:w,[`${n}-open`]:Ae,[`${n}-customize-input`]:ue,[`${n}-show-search`]:l});let ct=a.createElement(ij,Up({},pe,{ref:j,prefixCls:n,className:Ka,focused:le,prefix:H,suffix:Gt,clearIcon:id,multiple:be,mode:x,displayValues:m,placeholder:y,searchValue:fe,activeValue:A,onSearch:dt,onSearchSubmit:mt,onInputBlur:ut,onFocus:ge,onBlur:et,onClearMouseDown:dr,onKeyDown:We,onKeyUp:ke,onSelectorRemove:nt,tokenWithEnter:ht,onMouseDown:xe,components:ce}));return ct=a.createElement(z1,{ref:q,disabled:S,prefixCls:n,visible:Ae,popupElement:ad,animation:L,transitionName:W,popupStyle:B,popupClassName:J,direction:p,popupMatchSelectWidth:K,popupRender:re,popupAlign:se,placement:Z,builtinPlacements:ne,getPopupContainer:ie,empty:v,onPopupVisibleChange:Ge,onPopupMouseEnter:Fe,onPopupMouseDown:xe,onPopupBlur:Te},ct),a.createElement(e0.Provider,{value:rt},a.createElement(B1,{visible:le&&!Ae,values:m}),ct)}),dh=()=>null;dh.isSelectOptGroup=!0;const ph=()=>null;ph.isSelectOption=!0;const u0=a.forwardRef(({height:e,offsetY:t,offsetX:r,children:n,prefixCls:o,onInnerResize:s,innerProps:i,rtl:l,extra:u},d)=>{let p={},f={display:"flex",flexDirection:"column"};return t!==void 0&&(p={height:e,position:"relative",overflow:"hidden"},f={...f,transform:`translateY(${t}px)`,[l?"marginRight":"marginLeft"]:-r,position:"absolute",left:0,right:0,top:0}),a.createElement("div",{style:p},a.createElement(oi,{onResize:({offsetHeight:m})=>{m&&s&&s()}},a.createElement("div",gn({style:f,className:ae({[`${o}-holder-inner`]:o}),ref:d},i),n,u)))});u0.displayName="Filler";function cj({children:e,setRef:t}){const r=a.useCallback(n=>{t(n)},[]);return a.cloneElement(e,{ref:r})}function uj(e,t,r,n,o,s,i,{getKey:l}){return e.slice(t,r+1).map((u,d)=>{const p=t+d,f=i(u,p,{style:{width:n},offsetX:o}),m=l(u);return a.createElement(cj,{key:m,setRef:h=>s(u,h)},f)})}function dj(e,t,r){const n=e.length,o=t.length;let s,i;if(n===0&&o===0)return null;n<o?(s=e,i=t):(s=t,i=e);const l={__EMPTY_ITEM__:!0};function u(f){return f!==void 0?r(f):l}let d=null,p=Math.abs(n-o)!==1;for(let f=0;f<i.length;f+=1){const m=u(s[f]),h=u(i[f]);if(m!==h){d=f,p=p||m!==u(i[f+1]);break}}return d===null?null:{index:d,multiple:p}}function pj(e,t,r){const[n,o]=a.useState(e),[s,i]=a.useState(null);return a.useEffect(()=>{const l=dj(n||[],e||[],t);(l==null?void 0:l.index)!==void 0&&i(e[l.index]),o(e)},[e]),[s]}const Tv=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),d0=(e,t,r,n)=>{const o=a.useRef(!1),s=a.useRef(null);function i(){clearTimeout(s.current),o.current=!0,s.current=setTimeout(()=>{o.current=!1},50)}const l=a.useRef({top:e,bottom:t,left:r,right:n});return l.current.top=e,l.current.bottom=t,l.current.left=r,l.current.right=n,(u,d,p=!1)=>{const f=u?d<0&&l.current.left||d>0&&l.current.right:d<0&&l.current.top||d>0&&l.current.bottom;return p&&f?(clearTimeout(s.current),o.current=!1):(!f||o.current)&&i(),!o.current&&f}};function fj(e,t,r,n,o,s,i){const l=a.useRef(0),u=a.useRef(null),d=a.useRef(null),p=a.useRef(!1),f=d0(t,r,n,o);function m(y,x){if(Wt.cancel(u.current),f(!1,x))return;const S=y;if(!S._virtualHandled)S._virtualHandled=!0;else return;l.current+=x,d.current=x,Tv||S.preventDefault(),u.current=Wt(()=>{const w=p.current?10:1;i(l.current*w,!1),l.current=0})}function h(y,x){i(x,!0),Tv||y.preventDefault()}const v=a.useRef(null),g=a.useRef(null);function b(y){if(!e)return;Wt.cancel(g.current),g.current=Wt(()=>{v.current=null},2);const{deltaX:x,deltaY:S,shiftKey:w}=y;let I=x,T=S;(v.current==="sx"||!v.current&&w&&S&&!x)&&(I=S,T=0,v.current="sx");const R=Math.abs(I),P=Math.abs(T);v.current===null&&(v.current=s&&R>P?"x":"y"),v.current==="y"?m(y,T):h(y,I)}function _(y){e&&(p.current=y.detail===d.current)}return[b,_]}function mj(e,t,r,n){const[o,s]=a.useMemo(()=>[new Map,[]],[e,r.id,n]);return(l,u=l)=>{let d=o.get(l),p=o.get(u);if(d===void 0||p===void 0){const f=e.length;for(let m=s.length;m<f;m+=1){const h=e[m],v=t(h);o.set(v,m);const g=r.get(v)??n;if(s[m]=(s[m-1]||0)+g,v===l&&(d=m),v===u&&(p=m),d!==void 0&&p!==void 0)break}}return{top:s[d-1]||0,bottom:s[p]}}}class hj{constructor(){Ct(this,"maps");Ct(this,"id",0);Ct(this,"diffRecords",new Map);this.maps=Object.create(null)}set(t,r){this.diffRecords.set(t,this.maps[t]),this.maps[t]=r,this.id+=1}get(t){return this.maps[t]}resetRecord(){this.diffRecords.clear()}getRecord(){return this.diffRecords}}function Iv(e){const t=parseFloat(e);return isNaN(t)?0:t}function gj(e,t,r){const[n,o]=a.useState(0),s=a.useRef(new Map),i=a.useRef(new hj),l=a.useRef(0);function u(){l.current+=1}function d(f=!1){u();const m=()=>{let h=!1;s.current.forEach((v,g)=>{if(v&&v.offsetParent){const{offsetHeight:b}=v,{marginTop:_,marginBottom:y}=getComputedStyle(v),x=Iv(_),S=Iv(y),w=b+x+S;i.current.get(g)!==w&&(i.current.set(g,w),h=!0)}}),h&&o(v=>v+1)};if(f)m();else{l.current+=1;const h=l.current;Promise.resolve().then(()=>{h===l.current&&m()})}}function p(f,m){const h=e(f);s.current.get(h),m?(s.current.set(h,m),d()):s.current.delete(h)}return a.useEffect(()=>u,[]),[p,d,i.current,n]}const $v=14/15;function vj(e,t,r){const n=a.useRef(!1),o=a.useRef(0),s=a.useRef(0),i=a.useRef(null),l=a.useRef(null);let u;const d=m=>{if(n.current){const h=Math.ceil(m.touches[0].pageX),v=Math.ceil(m.touches[0].pageY);let g=o.current-h,b=s.current-v;const _=Math.abs(g)>Math.abs(b);_?o.current=h:s.current=v;const y=r(_,_?g:b,!1,m);y&&m.preventDefault(),clearInterval(l.current),y&&(l.current=setInterval(()=>{_?g*=$v:b*=$v;const x=Math.floor(_?g:b);(!r(_,x,!0)||Math.abs(x)<=.1)&&clearInterval(l.current)},16))}},p=()=>{n.current=!1,u()},f=m=>{u(),m.touches.length===1&&!n.current&&(n.current=!0,o.current=Math.ceil(m.touches[0].pageX),s.current=Math.ceil(m.touches[0].pageY),i.current=m.target,i.current.addEventListener("touchmove",d,{passive:!1}),i.current.addEventListener("touchend",p,{passive:!0}))};u=()=>{i.current&&(i.current.removeEventListener("touchmove",d),i.current.removeEventListener("touchend",p))},er(()=>(e&&t.current.addEventListener("touchstart",f,{passive:!0}),()=>{var m;(m=t.current)==null||m.removeEventListener("touchstart",f),u(),clearInterval(l.current)}),[e])}function Av(e){return Math.floor(e**.5)}function qp(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function bj(e,t,r){a.useEffect(()=>{const n=t.current;if(e&&n){let o=!1,s,i;const l=()=>{Wt.cancel(s)},u=()=>{l(),s=Wt(()=>{r(i),u()})},d=()=>{o=!1,l()},p=m=>{if(m.target.draggable||m.button!==0)return;const h=m;h._virtualHandled||(h._virtualHandled=!0,o=!0)},f=m=>{if(o){const h=qp(m,!1),{top:v,bottom:g}=n.getBoundingClientRect();if(h<=v){const b=v-h;i=-Av(b),u()}else if(h>=g){const b=h-g;i=Av(b),u()}else l()}};return n.addEventListener("mousedown",p),n.ownerDocument.addEventListener("mouseup",d),n.ownerDocument.addEventListener("mousemove",f),n.ownerDocument.addEventListener("dragend",d),()=>{n.removeEventListener("mousedown",p),n.ownerDocument.removeEventListener("mouseup",d),n.ownerDocument.removeEventListener("mousemove",f),n.ownerDocument.removeEventListener("dragend",d),l()}}},[e])}const _j=10;function yj(e,t,r,n,o,s,i,l){const u=a.useRef(),[d,p]=a.useState(null);return er(()=>{if(d&&d.times<_j){if(!e.current){p(x=>({...x}));return}s();const{targetAlign:f,originAlign:m,index:h,offset:v}=d,g=e.current.clientHeight;let b=!1,_=f,y=null;if(g){const x=f||m;let S=0,w=0,I=0;const T=Math.min(t.length-1,h);for(let P=0;P<=T;P+=1){const $=o(t[P]);w=S;const A=r.get($);I=w+(A===void 0?n:A),S=I}let R=x==="top"?v:g-v;for(let P=T;P>=0;P-=1){const $=o(t[P]),A=r.get($);if(A===void 0){b=!0;break}if(R-=A,R<=0)break}switch(x){case"top":y=w-v;break;case"bottom":y=I-g+v;break;default:{const{scrollTop:P}=e.current,$=P+g;w<P?_="top":I>$&&(_="bottom")}}y!==null&&i(y),y!==d.lastTop&&(b=!0)}b&&p({...d,times:d.times+1,targetAlign:_,lastTop:y})}},[d,e.current]),f=>{if(f==null){l();return}if(Wt.cancel(u.current),typeof f=="number")i(f);else if(f&&typeof f=="object"){let m;const{align:h}=f;"index"in f?{index:m}=f:m=t.findIndex(g=>o(g)===f.key);const{offset:v=0}=f;p({times:0,index:m,offset:v,originAlign:h})}}}const jv=a.forwardRef((e,t)=>{const{prefixCls:r,rtl:n,scrollOffset:o,scrollRange:s,onStartMove:i,onStopMove:l,onScroll:u,horizontal:d,spinSize:p,containerSize:f,style:m,thumbStyle:h,showScrollBar:v}=e,[g,b]=a.useState(!1),[_,y]=a.useState(null),[x,S]=a.useState(null),w=!n,I=a.useRef(),T=a.useRef(),[R,P]=a.useState(v),$=a.useRef(),A=()=>{v===!0||v===!1||(clearTimeout($.current),P(!0),$.current=setTimeout(()=>{P(!1)},3e3))},k=s-f||0,D=f-p||0,z=a.useMemo(()=>o===0||k===0?0:o/k*D,[o,k,D]),X=M=>{M.stopPropagation(),M.preventDefault()},V=a.useRef({top:z,dragging:g,pageY:_,startTop:x});V.current={top:z,dragging:g,pageY:_,startTop:x};const Y=M=>{b(!0),y(qp(M,d)),S(V.current.top),i(),M.stopPropagation(),M.preventDefault()};a.useEffect(()=>{const M=W=>{W.preventDefault()},G=I.current,L=T.current;return G.addEventListener("touchstart",M,{passive:!1}),L.addEventListener("touchstart",Y,{passive:!1}),()=>{G.removeEventListener("touchstart",M),L.removeEventListener("touchstart",Y)}},[]);const U=a.useRef();U.current=k;const F=a.useRef();F.current=D,a.useEffect(()=>{if(g){let M;const G=W=>{const{dragging:B,pageY:J,startTop:K}=V.current;Wt.cancel(M);const re=I.current.getBoundingClientRect(),se=f/(d?re.width:re.height);if(B){const Z=(qp(W,d)-J)*se;let ne=K;!w&&d?ne-=Z:ne+=Z;const ie=U.current,he=F.current,me=he?ne/he:0;let Pe=Math.ceil(me*ie);Pe=Math.max(Pe,0),Pe=Math.min(Pe,ie),M=Wt(()=>{u(Pe,d)})}},L=()=>{b(!1),l()};return window.addEventListener("mousemove",G,{passive:!0}),window.addEventListener("touchmove",G,{passive:!0}),window.addEventListener("mouseup",L,{passive:!0}),window.addEventListener("touchend",L,{passive:!0}),()=>{window.removeEventListener("mousemove",G),window.removeEventListener("touchmove",G),window.removeEventListener("mouseup",L),window.removeEventListener("touchend",L),Wt.cancel(M)}}},[g]),a.useEffect(()=>(A(),()=>{clearTimeout($.current)}),[o]),a.useImperativeHandle(t,()=>({delayHidden:A}));const H=`${r}-scrollbar`,ee={position:"absolute",visibility:R?null:"hidden"},O={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return d?(Object.assign(ee,{height:8,left:0,right:0,bottom:0}),Object.assign(O,{height:"100%",width:p,[w?"left":"right"]:z})):(Object.assign(ee,{width:8,top:0,bottom:0,[w?"right":"left"]:0}),Object.assign(O,{width:"100%",height:p,top:z})),a.createElement("div",{ref:I,className:ae(H,{[`${H}-horizontal`]:d,[`${H}-vertical`]:!d,[`${H}-visible`]:R}),style:{...ee,...m},onMouseDown:X,onMouseMove:A},a.createElement("div",{ref:T,className:ae(`${H}-thumb`,{[`${H}-thumb-moving`]:g}),style:{...O,...h},onMouseDown:Y}))}),xj=20;function Ov(e=0,t=0){let r=e/t*e;return isNaN(r)&&(r=0),r=Math.max(r,xj),Math.floor(r)}const wj=[],Ej={overflowY:"auto",overflowAnchor:"none"};function Sj(e,t){const{prefixCls:r="rc-virtual-list",className:n,height:o,itemHeight:s,fullHeight:i=!0,style:l,data:u,children:d,itemKey:p,virtual:f,direction:m,scrollWidth:h,component:v="div",onScroll:g,onVirtualScroll:b,onVisibleChange:_,innerProps:y,extraRender:x,styles:S,showScrollBar:w="optional",...I}=e,T=a.useCallback(ge=>typeof p=="function"?p(ge):ge==null?void 0:ge[p],[p]),[R,P,$,A]=gj(T),k=!!(f!==!1&&o&&s),D=a.useMemo(()=>Object.values($.maps).reduce((ge,Te)=>ge+Te,0),[$.id,$.maps]),z=k&&u&&(Math.max(s*u.length,D)>o||!!h),X=m==="rtl",V=ae(r,{[`${r}-rtl`]:X},n),Y=u||wj,U=a.useRef(),F=a.useRef(),H=a.useRef(),[ee,O]=a.useState(0),[M,G]=a.useState(0),[L,W]=a.useState(!1),B=()=>{W(!0)},J=()=>{W(!1)},K={getKey:T};function re(ge){O(Te=>{let et;typeof ge=="function"?et=ge(Te):et=ge;const xe=le(et);return U.current.scrollTop=xe,xe})}const se=a.useRef({start:0,end:Y.length}),Z=a.useRef(),[ne]=pj(Y,T);Z.current=ne;const{scrollHeight:ie,start:he,end:me,offset:Pe}=a.useMemo(()=>{var Fe;if(!k)return{scrollHeight:void 0,start:0,end:Y.length-1,offset:void 0};if(!z)return{scrollHeight:((Fe=F.current)==null?void 0:Fe.offsetHeight)||0,start:0,end:Y.length-1,offset:void 0};let ge=0,Te,et,xe;const $e=Y.length;for(let Ge=0;Ge<$e;Ge+=1){const rt=Y[Ge],Gt=T(rt),dr=$.get(Gt),Kt=ge+(dr===void 0?s:dr);Kt>=ee&&Te===void 0&&(Te=Ge,et=ge),Kt>ee+o&&xe===void 0&&(xe=Ge),ge=Kt}return Te===void 0&&(Te=0,et=0,xe=Math.ceil(o/s)),xe===void 0&&(xe=Y.length-1),xe=Math.min(xe+1,Y.length-1),{scrollHeight:ge,start:Te,end:xe,offset:et}},[z,k,ee,Y,A,o]);se.current.start=he,se.current.end=me,a.useLayoutEffect(()=>{const ge=$.getRecord();if(ge.size===1){const Te=Array.from(ge.keys())[0],et=ge.get(Te),xe=Y[he];if(xe&&et===void 0&&T(xe)===Te){const Ge=$.get(Te)-s;re(rt=>rt+Ge)}}$.resetRecord()},[ie]);const[Se,Ce]=a.useState({width:0,height:o}),Ze=ge=>{Ce({width:ge.offsetWidth,height:ge.offsetHeight})},Ye=a.useRef(),pe=a.useRef(),be=a.useMemo(()=>Ov(Se.width,h),[Se.width,h]),j=a.useMemo(()=>Ov(Se.height,ie),[Se.height,ie]),q=ie-o,Q=a.useRef(q);Q.current=q;function le(ge){let Te=ge;return Number.isNaN(Q.current)||(Te=Math.min(Te,Q.current)),Te=Math.max(Te,0),Te}const de=ee<=0,ce=ee>=q,fe=M<=0,ue=M>=h,ye=d0(de,ce,fe,ue),Be=()=>({x:X?-M:M,y:ee}),Ae=a.useRef(Be()),Ee=zr(ge=>{if(b){const Te={...Be(),...ge};(Ae.current.x!==Te.x||Ae.current.y!==Te.y)&&(b(Te),Ae.current=Te)}});function lt(ge,Te){const et=ge;Te?(Oo.flushSync(()=>{G(et)}),Ee()):re(et)}function ht(ge){const{scrollTop:Te}=ge.currentTarget;Te!==ee&&re(Te),g==null||g(ge),Ee()}const dt=ge=>{let Te=ge;const et=h?h-Se.width:0;return Te=Math.max(Te,0),Te=Math.min(Te,et),Te},mt=zr((ge,Te)=>{Te?(Oo.flushSync(()=>{G(et=>{const xe=et+(X?-ge:ge);return dt(xe)})}),Ee()):re(et=>et+ge)}),[ft,vt]=fj(k,de,ce,fe,ue,!!h,mt);vj(k,U,(ge,Te,et,xe)=>{const $e=xe;return ye(ge,Te,et)?!1:!$e||!$e._virtualHandled?($e&&($e._virtualHandled=!0),ft({preventDefault(){},deltaX:ge?Te:0,deltaY:ge?0:Te}),!0):!1}),bj(z,U,ge=>{re(Te=>Te+ge)}),er(()=>{function ge(et){const xe=de&&et.detail<0,$e=ce&&et.detail>0;k&&!xe&&!$e&&et.preventDefault()}const Te=U.current;return Te.addEventListener("wheel",ft,{passive:!1}),Te.addEventListener("DOMMouseScroll",vt,{passive:!0}),Te.addEventListener("MozMousePixelScroll",ge,{passive:!1}),()=>{Te.removeEventListener("wheel",ft),Te.removeEventListener("DOMMouseScroll",vt),Te.removeEventListener("MozMousePixelScroll",ge)}},[k,de,ce]),er(()=>{if(h){const ge=dt(M);G(ge),Ee({x:ge})}},[Se.width,h]);const ze=()=>{var ge,Te;(ge=Ye.current)==null||ge.delayHidden(),(Te=pe.current)==null||Te.delayHidden()},We=yj(U,Y,$,s,T,()=>P(!0),re,ze);a.useImperativeHandle(t,()=>({nativeElement:H.current,getScrollInfo:Be,scrollTo:ge=>{function Te(et){return et&&typeof et=="object"&&("left"in et||"top"in et)}Te(ge)?(ge.left!==void 0&&G(dt(ge.left)),We(ge.top)):We(ge)}})),er(()=>{if(_){const ge=Y.slice(he,me+1);_(ge,Y)}},[he,me,Y]);const ke=mj(Y,T,$,s),nt=x==null?void 0:x({start:he,end:me,virtual:z,offsetX:M,offsetY:Pe,rtl:X,getSize:ke}),ut=uj(Y,he,me,h,M,R,d,K);let _e=null;o&&(_e={[i?"height":"maxHeight"]:o,...Ej},k&&(_e.overflowY="hidden",h&&(_e.overflowX="hidden"),L&&(_e.pointerEvents="none")));const Qe={};return X&&(Qe.dir="rtl"),a.createElement("div",gn({ref:H,style:{...l,position:"relative"},className:V},Qe,I),a.createElement(oi,{onResize:Ze},a.createElement(v,{className:`${r}-holder`,style:_e,ref:U,onScroll:ht,onMouseEnter:ze},a.createElement(u0,{prefixCls:r,height:ie,offsetX:M,offsetY:Pe,scrollWidth:h,onInnerResize:P,ref:F,innerProps:y,rtl:X,extra:nt},ut))),z&&ie>o&&a.createElement(jv,{ref:Ye,prefixCls:r,scrollOffset:ee,scrollRange:ie,rtl:X,onScroll:lt,onStartMove:B,onStopMove:J,spinSize:j,containerSize:Se.height,style:S==null?void 0:S.verticalScrollBar,thumbStyle:S==null?void 0:S.verticalScrollBarThumb,showScrollBar:w}),z&&h>Se.width&&a.createElement(jv,{ref:pe,prefixCls:r,scrollOffset:M,scrollRange:h,rtl:X,onScroll:lt,onStartMove:B,onStopMove:J,spinSize:be,containerSize:Se.width,horizontal:!0,style:S==null?void 0:S.horizontalScrollBar,thumbStyle:S==null?void 0:S.horizontalScrollBarThumb,showScrollBar:w}))}const p0=a.forwardRef(Sj);p0.displayName="List";function Cj(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function Gi(){return Gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gi.apply(this,arguments)}function Nv(e){return typeof e=="string"||typeof e=="number"}const Pj=(e,t)=>{var re,se;const{prefixCls:r,id:n,open:o,multiple:s,mode:i,searchValue:l,toggleOpen:u,notFoundContent:d,onPopupScroll:p,showScrollBar:f,lockOptions:m}=Uo(),{maxCount:h,flattenOptions:v,onActiveValue:g,defaultActiveFirstOption:b,onSelect:_,menuItemSelectedIcon:y,rawValues:x,fieldNames:S,virtual:w,direction:I,listHeight:T,listItemHeight:R,optionRender:P,classNames:$,styles:A}=a.useContext(uh),k=`${r}-item`,D=vx(()=>v,[o,m],(Z,ne)=>ne[0]&&!ne[1]),z=a.useRef(null),X=a.useMemo(()=>s&&zp(h)&&(x==null?void 0:x.size)>=h,[s,h,x==null?void 0:x.size]),V=Z=>{Z.preventDefault()},Y=Z=>{var ne;(ne=z.current)==null||ne.scrollTo(typeof Z=="number"?{index:Z}:Z)},U=a.useCallback(Z=>i==="combobox"?!1:x.has(Z),[i,[...x].toString(),x.size]),F=(Z,ne=1)=>{const ie=D.length;for(let he=0;he<ie;he+=1){const me=(Z+he*ne+ie)%ie,{group:Pe,data:Se}=D[me]||{};if(!Pe&&!(Se!=null&&Se.disabled)&&(U(Se.value)||!X))return me}return-1},[H,ee]=a.useState(()=>F(0)),O=(Z,ne=!1)=>{ee(Z);const ie={source:ne?"keyboard":"mouse"},he=D[Z];if(!he){g(null,-1,ie);return}g(he.value,Z,ie)};a.useEffect(()=>{O(b!==!1?F(0):-1)},[D.length,l]);const M=a.useCallback(Z=>i==="combobox"?String(Z).toLowerCase()===l.toLowerCase():x.has(Z),[i,l,[...x].toString(),x.size]);a.useEffect(()=>{var ne;let Z;if(!s&&o&&x.size===1){const ie=Array.from(x)[0],he=D.findIndex(({data:me})=>l?String(me.value).startsWith(l):me.value===ie);he!==-1&&(O(he),Z=setTimeout(()=>{Y(he)}))}return o&&((ne=z.current)==null||ne.scrollTo(void 0)),()=>clearTimeout(Z)},[o,l]);const G=Z=>{Z!==void 0&&_(Z,{selected:!x.has(Z)}),s||u(!1)};if(a.useImperativeHandle(t,()=>({onKeyDown:Z=>{const{which:ne,ctrlKey:ie}=Z;switch(ne){case Xe.N:case Xe.P:case Xe.UP:case Xe.DOWN:{let he=0;if(ne===Xe.UP?he=-1:ne===Xe.DOWN?he=1:Cj()&&ie&&(ne===Xe.N?he=1:ne===Xe.P&&(he=-1)),he!==0){const me=F(H+he,he);Y(me),O(me,!0)}break}case Xe.TAB:case Xe.ENTER:{const he=D[H];if(!he||he.data.disabled)return G(void 0);!X||x.has(he.value)?G(he.value):G(void 0),o&&Z.preventDefault();break}case Xe.ESC:u(!1),o&&Z.stopPropagation()}},onKeyUp:()=>{},scrollTo:Z=>{Y(Z)}})),D.length===0)return a.createElement("div",{role:"listbox",id:`${n}_list`,className:`${k}-empty`,onMouseDown:V},d);const L=Object.keys(S).map(Z=>S[Z]),W=Z=>Z.label;function B(Z,ne){const{group:ie}=Z;return{role:ie?"presentation":"option",id:`${n}_list_${ne}`}}const J=Z=>{const ne=D[Z];if(!ne)return null;const ie=ne.data||{},{value:he,disabled:me}=ie,{group:Pe}=ne,Se=oa(ie,!0),Ce=W(ne);return ne?a.createElement("div",Gi({"aria-label":typeof Ce=="string"&&!Pe?Ce:null},Se,{key:Z},B(ne,Z),{"aria-selected":M(he),"aria-disabled":me}),he):null},K={role:"listbox",id:`${n}_list`};return a.createElement(a.Fragment,null,w&&a.createElement("div",Gi({},K,{style:{height:0,width:0,overflow:"hidden"}}),J(H-1),J(H),J(H+1)),a.createElement(p0,{itemKey:"key",ref:z,data:D,height:T,itemHeight:R,fullHeight:!1,onMouseDown:V,onScroll:p,virtual:w,direction:I,innerProps:w?null:K,showScrollBar:f,className:(re=$==null?void 0:$.popup)==null?void 0:re.list,style:(se=A==null?void 0:A.popup)==null?void 0:se.list},(Z,ne)=>{var Ee,lt;const{group:ie,groupOption:he,data:me,label:Pe,value:Se}=Z,{key:Ce}=me;if(ie){const ht=me.title??(Nv(Pe)?Pe.toString():void 0);return a.createElement("div",{className:ae(k,`${k}-group`,me.className),title:ht},Pe!==void 0?Pe:Ce)}const{disabled:Ze,title:Ye,children:pe,style:be,className:j,...q}=me,Q=vr(q,L),le=U(Se),de=Ze||!le&&X,ce=`${k}-option`,fe=ae(k,ce,j,(Ee=$==null?void 0:$.popup)==null?void 0:Ee.listItem,{[`${ce}-grouped`]:he,[`${ce}-active`]:H===ne&&!de,[`${ce}-disabled`]:de,[`${ce}-selected`]:le}),ue=W(Z),ye=!y||typeof y=="function"||le,Be=typeof ue=="number"?ue:ue||Se;let Ae=Nv(Be)?Be.toString():void 0;return Ye!==void 0&&(Ae=Ye),a.createElement("div",Gi({},oa(Q),w?{}:B(Z,ne),{"aria-selected":w?void 0:M(Se),"aria-disabled":de,className:fe,title:Ae,onMouseMove:()=>{H===ne||de||O(ne)},onClick:()=>{de||G(Se)},style:{...(lt=A==null?void 0:A.popup)==null?void 0:lt.listItem,...be}}),a.createElement("div",{className:`${ce}-content`},typeof P=="function"?P(Z,{index:ne}):Be),a.isValidElement(y)||le,ye&&a.createElement(c0,{className:`${k}-option-state`,customizeIcon:y,customizeIconProps:{value:Se,disabled:de,isSelected:le}},le?"вњ“":null))}))},Rj=a.forwardRef(Pj),Tj=(e,t)=>{const r=a.useRef({values:new Map,options:new Map}),n=a.useMemo(()=>{const{values:s,options:i}=r.current,l=e.map(p=>{var f;return p.label===void 0?{...p,label:(f=s.get(p.value))==null?void 0:f.label}:p}),u=new Map,d=new Map;return l.forEach(p=>{u.set(p.value,p),d.set(p.value,t.get(p.value)||i.get(p.value))}),r.current.values=u,r.current.options=d,l},[e,t]),o=a.useCallback(s=>t.get(s)||r.current.options.get(s),[t]);return[n,o]};function md(e,t){return i0(e).join("").toUpperCase().includes(t)}const Ij=(e,t,r,n,o)=>a.useMemo(()=>{if(!r||n===!1)return e;const{options:s,label:i,value:l}=t,u=[],d=typeof n=="function",p=r.toUpperCase(),f=d?n:(h,v)=>o&&o.length?o.some(g=>md(v[g],p)):v[s]?md(v[i!=="children"?i:"label"],p):md(v[l],p),m=d?h=>Fp(h):h=>h;return e.forEach(h=>{if(h[s]){if(f(r,m(h)))u.push(h);else{const g=h[s].filter(b=>f(r,m(b)));g.length&&u.push({...h,[s]:g})}return}f(r,m(h))&&u.push(h)}),u},[e,n,o,r,t]);function $j(e){const{key:t,props:{children:r,value:n,...o}}=e;return{key:t,value:n!==void 0?n:t,children:r,...o}}function f0(e,t=!1){return Ho(e).map((r,n)=>{if(!a.isValidElement(r)||!r.type)return null;const{type:{isSelectOptGroup:o},key:s,props:{children:i,...l}}=r;return t||!o?$j(r):{key:`__RC_SELECT_GRP__${s===null?n:s}__`,label:s,...l,options:f0(i)}}).filter(r=>r)}const Aj=(e,t,r,n,o)=>a.useMemo(()=>{let s=e;!e&&(s=f0(t));const l=new Map,u=new Map,d=(f,m,h)=>{h&&typeof h=="string"&&f.set(m[h],m)},p=(f,m=!1)=>{for(let h=0;h<f.length;h+=1){const v=f[h];!v[r.options]||m?(l.set(v[r.value],v),d(u,v,r.label),n.forEach(g=>{d(u,v,g)}),d(u,v,o)):p(v[r.options],!0)}};return p(s),{options:s,valueOptions:l,labelOptions:u}},[e,t,r,n,o]);function Dv(e){const t=a.useRef();return t.current=e,a.useCallback((...n)=>t.current(...n),[])}function jj(e,t,r){const{filterOption:n,searchValue:o,optionFilterProp:s,filterSort:i,onSearch:l,autoClearSearchValue:u}=t;return a.useMemo(()=>{const d=typeof e=="object",p={filterOption:n,searchValue:o,optionFilterProp:s,filterSort:i,onSearch:l,autoClearSearchValue:u,...d?e:{}};return[d||r==="combobox"||r==="tags"||r==="multiple"&&e===void 0?!0:e,p]},[r,e,n,o,s,i,l,u])}function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gp.apply(this,arguments)}const Oj=["inputValue"];function Nj(e){return!e||typeof e!="object"}const Dj=a.forwardRef((e,t)=>{const{id:r,mode:n,prefixCls:o="rc-select",backfill:s,fieldNames:i,showSearch:l,searchValue:u,onSearch:d,autoClearSearchValue:p,filterOption:f,optionFilterProp:m,filterSort:h,onSelect:v,onDeselect:g,onActive:b,popupMatchSelectWidth:_=!0,optionLabelProp:y,options:x,optionRender:S,children:w,defaultActiveFirstOption:I,menuItemSelectedIcon:T,virtual:R,direction:P,listHeight:$=200,listItemHeight:A=20,labelRender:k,value:D,defaultValue:z,labelInValue:X,onChange:V,maxCount:Y,classNames:U,styles:F,...H}=e,ee={searchValue:u,onSearch:d,autoClearSearchValue:p,filterOption:f,optionFilterProp:m,filterSort:h},[O,M]=jj(l,ee,n),{filterOption:G,searchValue:L,optionFilterProp:W,filterSort:B,onSearch:J,autoClearSearchValue:K=!0}=M,re=a.useMemo(()=>W?Array.isArray(W)?W:[W]:[],[W]),se=Hc(r),Z=Wp(n),ne=!!(!x&&w),ie=a.useMemo(()=>G===void 0&&n==="combobox"?!1:G,[G,n]),he=a.useMemo(()=>r0(i,ne),[JSON.stringify(i),ne]),[me,Pe]=Rr("",L),Se=me||"",Ce=Aj(x,w,he,re,y),{valueOptions:Ze,labelOptions:Ye,options:pe}=Ce,be=a.useCallback(xe=>i0(xe).map(Fe=>{let Ge,rt,Gt,dr;Nj(Fe)?Ge=Fe:(rt=Fe.label,Ge=Fe.value);const Kt=Ze.get(Ge);return Kt&&(rt===void 0&&(rt=Kt==null?void 0:Kt[y||he.label]),Gt=Kt==null?void 0:Kt.disabled,dr=Kt==null?void 0:Kt.title),{label:rt,value:Ge,key:Ge,disabled:Gt,title:dr}}),[he,y,Ze]),[j,q]=Rr(z,D),Q=a.useMemo(()=>{var Fe;const $e=be(Z&&j===null?[]:j);return n==="combobox"&&q1((Fe=$e[0])==null?void 0:Fe.value)?[]:$e},[j,be,n,Z]),[le,de]=Tj(Q,Ze),ce=a.useMemo(()=>{if(!n&&le.length===1){const xe=le[0];if(xe.value===null&&(xe.label===null||xe.label===void 0))return[]}return le.map(xe=>({...xe,label:(typeof k=="function"?k(xe):xe.label)??xe.value}))},[n,le,k]),fe=a.useMemo(()=>new Set(le.map(xe=>xe.value)),[le]);a.useEffect(()=>{var xe;if(n==="combobox"){const $e=(xe=le[0])==null?void 0:xe.value;Pe(W1($e)?String($e):"")}},[le]);const ue=Dv((xe,$e)=>{const Fe=$e??xe;return{[he.value]:xe,[he.label]:Fe}}),ye=a.useMemo(()=>{if(n!=="tags")return pe;const xe=[...pe],$e=Fe=>Ze.has(Fe);return[...le].sort((Fe,Ge)=>Fe.value<Ge.value?-1:1).forEach(Fe=>{const Ge=Fe.value;$e(Ge)||xe.push(ue(Ge,Fe.label))}),xe},[ue,pe,Ze,le,n]),Be=Ij(ye,he,Se,ie,re),Ae=a.useMemo(()=>{const xe=$e=>re.length?re.some(Fe=>($e==null?void 0:$e[Fe])===Se):($e==null?void 0:$e.value)===Se;return n!=="tags"||!Se||Be.some($e=>xe($e))||Be.some($e=>$e[he.value]===Se)?Be:[ue(Se),...Be]},[ue,re,n,Be,Se,he]),Ee=xe=>[...xe].sort((Fe,Ge)=>B(Fe,Ge,{searchValue:Se})).map(Fe=>Array.isArray(Fe.options)?{...Fe,options:Fe.options.length>0?Ee(Fe.options):Fe.options}:Fe),lt=a.useMemo(()=>B?Ee(Ae):Ae,[Ae,B,Se]),ht=a.useMemo(()=>F1(lt,{fieldNames:he,childrenAsData:ne}),[lt,he,ne]),dt=xe=>{const $e=be(xe);if(q($e),V&&($e.length!==le.length||$e.some((Fe,Ge)=>{var rt;return((rt=le[Ge])==null?void 0:rt.value)!==(Fe==null?void 0:Fe.value)}))){const Fe=X?$e.map(({label:rt,value:Gt})=>({label:rt,value:Gt})):$e.map(rt=>rt.value),Ge=$e.map(rt=>Fp(de(rt.value)));V(Z?Fe:Fe[0],Z?Ge:Ge[0])}},[mt,ft]=a.useState(null),[vt,ze]=a.useState(0),We=I!==void 0?I:n!=="combobox",ke=a.useRef(),nt=a.useCallback((xe,$e,{source:Fe="keyboard"}={})=>{ze($e),s&&n==="combobox"&&xe!==null&&Fe==="keyboard"&&ft(String(xe));const Ge=Promise.resolve().then(()=>{ke.current===Ge&&(b==null||b(xe))});ke.current=Ge},[s,n,b]),ut=(xe,$e,Fe)=>{const Ge=()=>{const rt=de(xe);return[X?{label:rt==null?void 0:rt[he.label],value:xe}:xe,Fp(rt)]};if($e&&v){const[rt,Gt]=Ge();v(rt,Gt)}else if(!$e&&g&&Fe!=="clear"){const[rt,Gt]=Ge();g(rt,Gt)}},_e=Dv((xe,$e)=>{let Fe;const Ge=Z?$e.selected:!0;Ge?Fe=Z?[...le,xe]:[xe]:Fe=le.filter(rt=>rt.value!==xe),dt(Fe),ut(xe,Ge),n==="combobox"?ft(""):(!Wp||K)&&(Pe(""),ft(""))}),Qe=(xe,$e)=>{dt(xe);const{type:Fe,values:Ge}=$e;(Fe==="remove"||Fe==="clear")&&Ge.forEach(rt=>{ut(rt.value,!1,Fe)})},ge=(xe,$e)=>{if(Pe(xe),ft(null),$e.source==="submit"){const Fe=(xe||"").trim();if(Fe){const Ge=Array.from(new Set([...fe,Fe]));dt(Ge),ut(Fe,!0),Pe("")}return}$e.source!=="blur"&&(n==="combobox"&&dt(xe),J==null||J(xe))},Te=xe=>{let $e=xe;n!=="tags"&&($e=xe.map(Ge=>{const rt=Ye.get(Ge);return rt==null?void 0:rt.value}).filter(Ge=>Ge!==void 0));const Fe=Array.from(new Set([...fe,...$e]));dt(Fe),Fe.forEach(Ge=>{ut(Ge,!0)})},et=a.useMemo(()=>({...Ce,flattenOptions:ht,onActiveValue:nt,defaultActiveFirstOption:We,onSelect:_e,menuItemSelectedIcon:T,rawValues:fe,fieldNames:he,virtual:R!==!1&&_!==!1,direction:P,listHeight:$,listItemHeight:A,childrenAsData:ne,maxCount:Y,optionRender:S,classNames:U,styles:F}),[Y,Ce,ht,nt,We,_e,T,fe,he,R,_,P,$,A,ne,S,U,F]);return a.createElement(uh.Provider,{value:et},a.createElement(lj,Gp({},H,{id:se,prefixCls:o,ref:t,omitDomProps:Oj,mode:n,classNames:U,styles:F,displayValues:ce,onDisplayValuesChange:Qe,maxCount:Y,direction:P,showSearch:O,searchValue:Se,onSearch:ge,autoClearSearchValue:K,onSearchSplit:Te,popupMatchSelectWidth:_,OptionList:Rj,emptyOptions:!ht.length,activeValue:mt,activeDescendantId:`${se}_list_${vt}`})))}),fh=Dj;fh.Option=ph;fh.OptGroup=dh;const m0=(e,t,r)=>{const{variant:n,[e]:o}=a.useContext($r),s=a.useContext(J$),i=o==null?void 0:o.variant;let l;typeof t<"u"?l=t:r===!1?l="borderless":l=s??i??n??"outlined";const u=Z$.includes(l);return[l,u]},kj=e=>{const r={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:{...r,points:["tl","bl"],offset:[0,4]},bottomRight:{...r,points:["tr","br"],offset:[0,4]},topLeft:{...r,points:["bl","tl"],offset:[0,-4]},topRight:{...r,points:["br","tr"],offset:[0,-4]}}};function Mj(e,t){return e||kj(t)}const kv=e=>{const{optionHeight:t,optionFontSize:r,optionLineHeight:n,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:r,lineHeight:n,boxSizing:"border-box"}},Lj=e=>{const{antCls:t,componentCls:r}=e,n=`${r}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,s=`&${t}-slide-up-appear${t}-slide-up-appear-active`,i=`&${t}-slide-up-leave${t}-slide-up-leave-active`,l=`${r}-dropdown-placement-`,u=`${n}-option-selected`;return[{[`${r}-dropdown`]:{...Vr(e),position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
          ${o}${l}bottomLeft,
          ${s}${l}bottomLeft
        `]:{animationName:xx},[`
          ${o}${l}topLeft,
          ${s}${l}topLeft,
          ${o}${l}topRight,
          ${s}${l}topRight
        `]:{animationName:yx},[`${i}${l}bottomLeft`]:{animationName:_x},[`
          ${i}${l}topLeft,
          ${i}${l}topRight
        `]:{animationName:bx},"&-hidden":{display:"none"},[n]:{...kv(e),cursor:"pointer",transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...Bs},"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...kv(e),color:e.colorTextDisabled}},[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},Hs(e,"slide-up"),Hs(e,"slide-down"),Ul(e,"move-up"),Ul(e,"move-down")]},zj=e=>{const{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${t}-placeholder`]:{display:"none"},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:"none"}}}}},Mv=4,Fj=e=>{const{componentCls:t,calc:r,iconCls:n,paddingXS:o,paddingXXS:s,INTERNAL_FIXED_ITEM_MARGIN:i,lineWidth:l,colorIcon:u,colorIconHover:d,inputPaddingHorizontalBase:p,antCls:f}=e,[m,h]=_r(f,"select");return{"&-multiple":{[m("multi-item-background")]:e.multipleItemBg,[m("multi-item-border-color")]:"transparent",[m("multi-item-border-radius")]:e.borderRadiusSM,[m("multi-item-height")]:e.multipleItemHeight,[m("multi-padding-base")]:`calc((${h("height")} - ${h("multi-item-height")}) / 2)`,[m("multi-padding-vertical")]:`calc(${h("multi-padding-base")} - ${i} - ${l})`,[m("multi-item-padding-horizontal")]:`calc(${p} - ${h("multi-padding-vertical")} - ${l} * 2)`,paddingBlock:h("multi-padding-vertical"),paddingInlineStart:`calc(${h("multi-padding-base")} - ${l})`,[`${t}-prefix`]:{marginInlineStart:h("multi-item-padding-horizontal")},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:"absolute",lineHeight:h("line-height"),insetInlineStart:h("multi-item-padding-horizontal"),width:`calc(100% - ${h("multi-item-padding-horizontal")})`,top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:h("font-size")},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${Mv}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix,
          ${t}-content-item-suffix:first-child`]:{marginInlineStart:h("multi-item-padding-horizontal")},[`${t}-selection-item`]:{lineHeight:`calc(${h("multi-item-height")} - ${l} * 2)`,border:`${l} solid ${h("multi-item-border-color")}`,display:"flex",marginBlock:i,marginInlineEnd:r(i).mul(2).equal(),background:h("multi-item-background"),borderRadius:h("multi-item-border-radius"),paddingInlineStart:o,paddingInlineEnd:s,transition:["height","line-height","padding"].map(v=>`${v} ${e.motionDurationSlow}`).join(","),"&-content":{...Bs,marginInlineEnd:s},"&-remove":{...wx(),display:"inline-flex",alignItems:"center",color:u,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}}},[`${t}-input`]:{lineHeight:r(i).mul(2).add(h("multi-item-height")).equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:Mv,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[m("multi-item-height")]:e.multipleItemHeightSM,[m("multi-item-border-radius")]:e.borderRadiusXS},[`&${t}-lg`]:{[m("multi-item-height")]:e.multipleItemHeightLG,[m("multi-item-border-radius")]:e.borderRadius},[`&${t}-filled`]:{[m("multi-item-border-color")]:e.colorSplit,[m("multi-item-background")]:e.colorBgContainer,[`&${t}-disabled`]:{[m("multi-item-border-color")]:"transparent"}}}}},hd=(e,t)=>{const{componentCls:r,antCls:n}=e,[o]=_r(n,"select"),{border:s,borderHover:i,borderActive:l,borderOutline:u}=t,d=t.background||e.selectorBg||e.colorBgContainer;return{[o("border-color")]:s,[o("background-color")]:d,[o("color")]:t.color||e.colorText,[`&:not(${r}-disabled)`]:{"&:hover":{[o("border-color")]:i,[o("background-color")]:t.backgroundHover||d},[`&${r}-focused`]:{[o("border-color")]:l,[o("background-color")]:t.backgroundActive||d,boxShadow:`0 0 0 ${we(e.controlOutlineWidth)} ${u}`}},[`&${r}-disabled`]:{[o("border-color")]:t.borderDisabled||t.border,[o("background-color")]:t.backgroundDisabled||t.background}}},Ja=(e,t,r,n={},o={},s)=>{const{componentCls:i}=e;return{[`&${i}-${t}`]:[hd(e,r),{[`&${i}-status-error`]:hd(e,{...r,color:n.color||e.colorError,...n}),[`&${i}-status-warning`]:hd(e,{...r,color:o.color||e.colorWarning,...o})},s]}},Vj=e=>{const{componentCls:t,fontHeight:r,controlHeight:n,iconCls:o,antCls:s,calc:i}=e,[l,u]=_r(s,"select");return{[t]:[{[l("border-radius")]:e.borderRadius,[l("border-color")]:"#000",[l("border-size")]:e.lineWidth,[l("background-color")]:e.colorBgContainer,[l("font-size")]:e.fontSize,[l("line-height")]:e.lineHeight,[l("font-height")]:r,[l("color")]:e.colorText,[l("height")]:n,[l("padding-horizontal")]:i(e.paddingSM).sub(e.lineWidth).equal(),[l("padding-vertical")]:`calc((${u("height")} - ${u("font-height")}) / 2 - ${u("border-size")})`,...Vr(e,!0),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:u("border-radius"),borderWidth:u("border-size"),borderStyle:e.lineType,borderColor:u("border-color"),background:u("background-color"),fontSize:u("font-size"),lineHeight:u("line-height"),color:u("color"),paddingInline:u("padding-horizontal"),paddingBlock:u("padding-vertical"),[`${t}-prefix`]:{flex:"none",lineHeight:1},[`${t}-placeholder`]:{...Bs,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:i(e.paddingXXS).mul(1.5).equal(),"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"&-value":{visibility:"inherit"},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`${t}-suffix`]:{flex:"none",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:"center",[o]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:"not-allowed",input:{cursor:"not-allowed"}},"&-sm":{[l("height")]:e.controlHeightSM,[l("padding-horizontal")]:i(e.paddingXS).sub(e.lineWidth).equal(),[l("border-radius")]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:u("padding-horizontal")}},"&-lg":{[l("height")]:e.controlHeightLG,[l("font-size")]:e.fontSizeLG,[l("line-height")]:e.lineHeightLG,[l("font-height")]:e.fontHeightLG,[l("border-radius")]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:u("color"),"&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:"absolute",inset:0,lineHeight:`calc(${u("font-height")} + ${u("padding-vertical")} * 2)`},[`${t}-content`]:{...Bs,alignSelf:"center","&-has-value":{display:"block","&:before":{display:"none"}},"&-has-search-value":{color:"transparent"},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder,"&-has-search-value":{color:"transparent"}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:"text"}},Fj(e),Ja(e,"outlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),Ja(e,"filled",{border:"transparent",borderHover:"transparent",borderActive:e.activeBorderColor,borderOutline:"transparent",borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),Ja(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),Ja(e,"underlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:"transparent"},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderInlineColor:"transparent"}),zj(e)]}},Bj=e=>{const{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:o,controlHeightSM:s,controlHeightLG:i,paddingXXS:l,controlPaddingHorizontal:u,zIndexPopupBase:d,colorText:p,fontWeightStrong:f,controlItemBgActive:m,controlItemBgHover:h,colorBgContainer:v,colorFillSecondary:g,colorBgContainerDisabled:b,colorTextDisabled:_,colorPrimaryHover:y,colorPrimary:x,controlOutline:S}=e,w=l*2,I=n*2,T=Math.min(o-w,o-I),R=Math.min(s-w,s-I),P=Math.min(i-w,i-I);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:d+50,optionSelectedColor:p,optionSelectedFontWeight:f,optionSelectedBg:m,optionActiveBg:h,optionPadding:`${(o-t*r)/2}px ${u}px`,optionFontSize:t,optionLineHeight:r,optionHeight:o,selectorBg:v,clearBg:v,singleItemHeightLG:i,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:T,multipleItemHeightSM:R,multipleItemHeightLG:P,multipleSelectorBgDisabled:b,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:y,activeBorderColor:x,activeOutlineColor:S,selectAffixPadding:l}},Hj=e=>{const{antCls:t,componentCls:r,motionDurationMid:n,inputPaddingHorizontalBase:o}=e,s={[`${r}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[r]:{...Vr(e),[`${r}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...Bs,[`> ${t}-typography`]:{display:"inline"}},[`${r}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:o,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:["color","opacity"].map(i=>`${i} ${n} ease`).join(", "),textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":s,"&:hover":s},[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:e.calc(o).add(e.fontSize).add(e.paddingXS).equal()}}}}}},Uj=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Hj(e),Lj(e),{[`${t}-rtl`]:{direction:"rtl"}},Jm(e,{focusElCls:`${t}-focused`})]},Wj=rr("Select",(e,{rootPrefixCls:t})=>{const r=tr(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Uj(r),Vj(r)]},Bj,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var qj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kp.apply(this,arguments)}const Gj=(e,t)=>a.createElement(Cn,Kp({},e,{ref:t,icon:qj})),h0=a.forwardRef(Gj);var Kj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};function Xp(){return Xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xp.apply(this,arguments)}const Xj=(e,t)=>a.createElement(Cn,Xp({},e,{ref:t,icon:Kj})),Yj=a.forwardRef(Xj);var Jj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yp.apply(this,arguments)}const Zj=(e,t)=>a.createElement(Cn,Yp({},e,{ref:t,icon:Jj})),Qj=a.forwardRef(Zj);function eO({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:r,removeIcon:n,loading:o,loadingIcon:s,multiple:i,hasFeedback:l,showSuffixIcon:u,feedbackIcon:d,showArrow:p,componentName:f}){const m=t??a.createElement(Q$,null),h=_=>e===null&&!l&&!p?null:a.createElement(a.Fragment,null,u!==!1&&_,l&&d);let v=null;e!==void 0?v=h(e):o?v=h(s??a.createElement(Ex,{spin:!0})):v=({open:_,showSearch:y})=>h(_&&y?a.createElement(Qj,null):a.createElement(Yj,null));let g=null;r!==void 0?g=r:i?g=a.createElement(h0,null):g=null;let b=null;return n!==void 0?b=n:b=a.createElement(eA,null),{clearIcon:m,suffixIcon:v,itemIcon:g,removeIcon:b}}function tO(e){return N.useMemo(()=>{if(e)return(...t)=>N.createElement(Zm,{space:!0},e.apply(void 0,t))},[e])}function rO(e,t){return t!==void 0?t:e!==null}const g0="SECRET_COMBOBOX_MODE_DO_NOT_USE",nO=(e,t)=>{var $e,Fe,Ge,rt,Gt;const{prefixCls:r,bordered:n,className:o,rootClassName:s,getPopupContainer:i,popupClassName:l,dropdownClassName:u,listHeight:d=256,placement:p,listItemHeight:f,size:m,disabled:h,notFoundContent:v,status:g,builtinPlacements:b,dropdownMatchSelectWidth:_,popupMatchSelectWidth:y,direction:x,style:S,allowClear:w,variant:I,popupStyle:T,dropdownStyle:R,transitionName:P,tagRender:$,maxCount:A,prefix:k,dropdownRender:D,popupRender:z,onDropdownVisibleChange:X,onOpenChange:V,styles:Y,classNames:U,...F}=e,{getPopupContainer:H,getPrefixCls:ee,renderEmpty:O,direction:M,virtual:G,popupMatchSelectWidth:L,popupOverflow:W}=a.useContext($r),{showSearch:B,style:J,styles:K,className:re,classNames:se}=Jr("select"),[,Z]=Wc(),ne=f??(Z==null?void 0:Z.controlHeight),ie=ee("select",r),he=ee(),me=x??M,{compactSize:Pe,compactItemClassnames:Se}=qc(ie,me),[Ce,Ze]=m0("select",I,n),Ye=si(ie),[pe,be]=Wj(ie,Ye),j=a.useMemo(()=>{const{mode:dr}=e;if(dr!=="combobox")return dr===g0?"combobox":dr},[e.mode]),q=j==="multiple"||j==="tags",Q=rO(e.suffixIcon,e.showArrow),le=y??_??L,de=tO(z||D),ce=V||X,{status:fe,hasFeedback:ue,isFormItemInput:ye,feedbackIcon:Be}=a.useContext(Sx),Ae=Tx(fe,g);let Ee;v!==void 0?Ee=v:j==="combobox"?Ee=null:Ee=(O==null?void 0:O("Select"))||a.createElement(Cx,{componentName:"Select"});const{suffixIcon:lt,itemIcon:ht,removeIcon:dt,clearIcon:mt}=eO({...F,multiple:q,hasFeedback:ue,feedbackIcon:Be,showSuffixIcon:Q,componentName:"Select"}),ft=w===!0?{clearIcon:mt}:w,vt=vr(F,["suffixIcon","itemIcon"]),ze=ya(dr=>m??Pe??dr),We=a.useContext(Px),ke=h??We,nt={...e,variant:Ce,status:Ae,disabled:ke,size:ze},[ut,_e]=un([se,U],[K,Y],{props:nt},{popup:{_default:"root"}}),Qe=ae(($e=ut.popup)==null?void 0:$e.root,l,u,{[`${ie}-dropdown-${me}`]:me==="rtl"},s,be,Ye,pe),ge={...(Fe=_e.popup)==null?void 0:Fe.root,...T??R},Te=ae({[`${ie}-lg`]:ze==="large",[`${ie}-sm`]:ze==="small",[`${ie}-rtl`]:me==="rtl",[`${ie}-${Ce}`]:Ze,[`${ie}-in-form-item`]:ye},Qm(ie,Ae,ue),Se,re,o,ut.root,s,be,Ye,pe),et=a.useMemo(()=>p!==void 0?p:me==="rtl"?"bottomRight":"bottomLeft",[p,me]),[xe]=Gc("SelectLike",((rt=(Ge=_e.popup)==null?void 0:Ge.root)==null?void 0:rt.zIndex)??(ge==null?void 0:ge.zIndex));return a.createElement(fh,{ref:t,virtual:G,classNames:ut,styles:_e,showSearch:B,...vt,style:{..._e.root,...J,...S},popupMatchSelectWidth:le,transitionName:Rx(he,"slide-up",P),builtinPlacements:Mj(b,W),listHeight:d,listItemHeight:ne,mode:j,prefixCls:ie,placement:et,direction:me,prefix:k,suffixIcon:lt,menuItemSelectedIcon:ht,removeIcon:dt,allowClear:ft,notFoundContent:Ee,className:Te,getPopupContainer:i||H,popupClassName:Qe,disabled:ke,popupStyle:{...(Gt=_e.popup)==null?void 0:Gt.root,...ge,zIndex:xe},maxCount:q?A:void 0,tagRender:q?$:void 0,popupRender:de,onPopupVisibleChange:ce})},ii=a.forwardRef(nO),oO=Ix(ii,"popupAlign");ii.SECRET_COMBOBOX_MODE_DO_NOT_USE=g0;ii.Option=ph;ii.OptGroup=dh;ii._InternalPanelDoNotUseOrYouWillBeFired=oO;function mh(e=!0,t={}){const r=a.useRef(t),[,n]=tA(),o=rA();return er(()=>{const s=o.subscribe(i=>{r.current=i,e&&n()});return()=>o.unsubscribe(s)},[]),r.current}const v0=e=>{const{children:t,prefixCls:r,id:n,classNames:o,styles:s,className:i,style:l}=e;return a.createElement("div",{id:n,className:ae(`${r}-container`,o==null?void 0:o.container,i),style:{...s==null?void 0:s.container,...l},role:"tooltip"},typeof t=="function"?t():t)},rs={shiftX:64,adjustY:1},ns={adjustX:1,shiftY:!0},Br=[0,0],sO={left:{points:["cr","cl"],overflow:ns,offset:[-4,0],targetOffset:Br},right:{points:["cl","cr"],overflow:ns,offset:[4,0],targetOffset:Br},top:{points:["bc","tc"],overflow:rs,offset:[0,-4],targetOffset:Br},bottom:{points:["tc","bc"],overflow:rs,offset:[0,4],targetOffset:Br},topLeft:{points:["bl","tl"],overflow:rs,offset:[0,-4],targetOffset:Br},leftTop:{points:["tr","tl"],overflow:ns,offset:[-4,0],targetOffset:Br},topRight:{points:["br","tr"],overflow:rs,offset:[0,-4],targetOffset:Br},rightTop:{points:["tl","tr"],overflow:ns,offset:[4,0],targetOffset:Br},bottomRight:{points:["tr","br"],overflow:rs,offset:[0,4],targetOffset:Br},rightBottom:{points:["bl","br"],overflow:ns,offset:[4,0],targetOffset:Br},bottomLeft:{points:["tl","bl"],overflow:rs,offset:[0,4],targetOffset:Br},leftBottom:{points:["br","bl"],overflow:ns,offset:[-4,0],targetOffset:Br}};function Jp(){return Jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jp.apply(this,arguments)}const iO=a.forwardRef((e,t)=>{const{trigger:r=["hover"],mouseEnterDelay:n=0,mouseLeaveDelay:o=.1,prefixCls:s="rc-tooltip",children:i,onVisibleChange:l,afterVisibleChange:u,motion:d,placement:p="right",align:f={},destroyOnHidden:m=!1,defaultVisible:h,getTooltipContainer:v,arrowContent:g,overlay:b,id:_,showArrow:y=!0,classNames:x,styles:S,...w}=e,I=Hc(_),T=a.useRef(null);a.useImperativeHandle(t,()=>T.current);const R={...w};"visible"in e&&(R.popupVisible=e.visible);const P=a.useMemo(()=>{if(!y)return!1;const A=y===!0?{}:y;return{...A,className:ae(A.className,x==null?void 0:x.arrow),style:{...A.style,...S==null?void 0:S.arrow},content:A.content??g}},[y,x==null?void 0:x.arrow,S==null?void 0:S.arrow,g]),$=({open:A})=>{const k=a.Children.only(i),D={"aria-describedby":b&&A?I:void 0};return a.cloneElement(k,D)};return a.createElement(Uc,Jp({popupClassName:x==null?void 0:x.root,prefixCls:s,popup:a.createElement(v0,{key:"content",prefixCls:s,id:I,classNames:x,styles:S},b),action:r,builtinPlacements:sO,popupPlacement:p,ref:T,popupAlign:f,getPopupContainer:v,onOpenChange:l,afterOpenChange:u,popupMotion:d,defaultPopupVisible:h,autoDestroy:m,mouseLeaveDelay:o,popupStyle:S==null?void 0:S.root,mouseEnterDelay:n,arrow:P,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:S==null?void 0:S.uniqueContainer},R),$)}),aO=N.createContext(!1),lO=(e,t)=>{const r=n=>typeof n=="boolean"?{show:n}:n||{};return N.useMemo(()=>{const n=r(e),o=r(t);return{...o,...n,show:n.show??o.show??!0}},[e,t])},Lv="50%",cO=e=>{const{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:s,tooltipBorderRadius:i,zIndexPopup:l,controlHeight:u,boxShadowSecondary:d,paddingSM:p,paddingXS:f,arrowOffsetHorizontal:m,sizePopupArrow:h,antCls:v}=e,[g,b]=_r(v,"tooltip"),_=t(i).add(h).add(m).equal(),x={minWidth:t(i).mul(2).add(h).equal(),minHeight:u,padding:`${we(e.calc(p).div(2).equal())} ${we(f)}`,color:b("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:s,borderRadius:i,boxShadow:d,boxSizing:"border-box"},S={[g("valid-offset-x")]:b("arrow-offset-x","var(--arrow-x)"),transformOrigin:[b("valid-offset-x",Lv),`var(--arrow-y, ${Lv})`].join(" ")};return[{[r]:{...Vr(e),position:"absolute",zIndex:l,display:"block",width:"max-content",maxWidth:n,visibility:"visible",...S,"&-hidden":{display:"none"},[g("arrow-background-color")]:s,[`${r}-container`]:[x,oA(e,!0)],[`&:has(~ ${r}-unique-container)`]:{[`${r}-container`]:{border:"none",background:"transparent",boxShadow:"none"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:_},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(i,nA)}},[`${r}-content`]:{position:"relative"},...th(e,(w,{darkColor:I})=>({[`&${r}-${w}`]:{[`${r}-container`]:{backgroundColor:I},[`${r}-arrow`]:{[g("arrow-background-color")]:I}}})),"&-rtl":{direction:"rtl"}}},$x(e,b("arrow-background-color")),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${r}-unique-container`]:{...x,...S,position:"absolute",zIndex:t(l).sub(1).equal(),"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},uO=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...jx({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...Ax(tr(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),b0=(e,t,r=!0)=>rr("Tooltip",o=>{const{borderRadius:s,colorTextLightSolid:i,colorBgSpotlight:l,maxWidth:u}=o,d=tr(o,{tooltipMaxWidth:u,tooltipColor:i,tooltipBorderRadius:s,tooltipBg:l});return[cO(d),eh(o,"zoom-big-fast")]},uO,{resetStyle:!1,injectStyle:r})(e,t),_0=(e,t,r)=>{const n=rh(r),[o]=_r(e,"tooltip"),s=ae({[`${t}-${r}`]:r&&n}),i={},l={},u=sA(r).toRgb(),p=(.299*u.r+.587*u.g+.114*u.b)/255<.5?"#FFF":"#000";return r&&!n&&(i.background=r,i[o("overlay-color")]=p,l[o("arrow-background-color")]=r),{className:s,overlayStyle:i,arrowStyle:l}},dO=e=>{const{prefixCls:t,className:r,placement:n="top",title:o,color:s,overlayInnerStyle:i,classNames:l,styles:u}=e,{getPrefixCls:d}=a.useContext($r),p=d("tooltip",t),f=d(),m=si(p),[h,v]=b0(p,m),g=_0(f,p,s),b=g.arrowStyle,_=a.useMemo(()=>({container:{...i,...g.overlayStyle}}),[i,g.overlayStyle]),y={...e,placement:n},[x,S]=un([l],[_,u],{props:y}),w=ae(m,h,v,p,`${p}-pure`,`${p}-placement-${n}`,r,g.className);return a.createElement("div",{className:w,style:b},a.createElement("div",{className:`${p}-arrow`}),a.createElement(v0,{...e,className:h,prefixCls:p,classNames:x,styles:S},o))},pO=a.forwardRef((e,t)=>{const{prefixCls:r,openClassName:n,getTooltipContainer:o,color:s,children:i,afterOpenChange:l,arrow:u,destroyTooltipOnHide:d,destroyOnHidden:p,title:f,overlay:m,trigger:h,builtinPlacements:v,autoAdjustOverflow:g=!0,motion:b,getPopupContainer:_,placement:y="top",mouseEnterDelay:x=.1,mouseLeaveDelay:S=.1,rootClassName:w,styles:I,classNames:T,onOpenChange:R,overlayInnerStyle:P,overlayStyle:$,overlayClassName:A,...k}=e,[,D]=Wc(),z=e["data-popover-inject"],{getPopupContainer:X,getPrefixCls:V,direction:Y,...U}=Jr("tooltip"),{className:F,style:H,classNames:ee,styles:O,arrow:M,trigger:G}=z?{}:U,L=lO(u,M),W=L.show,B=h||G||"hover",J=_||X,K=p??!!d,re=a.useContext(aO);Dx();const se=a.useRef(null),Z=()=>{var ft;(ft=se.current)==null||ft.forceAlign()};a.useImperativeHandle(t,()=>{var ft,vt;return{forceAlign:Z,nativeElement:(ft=se.current)==null?void 0:ft.nativeElement,popupElement:(vt=se.current)==null?void 0:vt.popupElement}});const[ne,ie]=Rr(e.defaultOpen??!1,e.open),he=!f&&!m&&f!==0,me=ft=>{ie(he?!1:ft),!he&&R&&R(ft)},Pe=a.useMemo(()=>v||Ox({arrowPointAtCenter:(L==null?void 0:L.pointAtCenter)??!1,autoAdjustOverflow:g,arrowWidth:W?D.sizePopupArrow:0,borderRadius:D.borderRadius,offset:D.marginXXS,visibleFirst:!0}),[L,v,D,W,g]),Se=a.useMemo(()=>f===0?f:m||f||"",[m,f]),Ce=a.createElement(Zm,{space:!0,form:!0},typeof Se=="function"?Se():Se),Ze={...e,trigger:B,builtinPlacements:Pe,getPopupContainer:J,destroyOnHidden:K},[Ye,pe]=un([ee,T],[O,I],{props:Ze}),be=V("tooltip",r),j=V();let q=ne;(!("open"in e)&&he||re)&&(q=!1);const Q=a.isValidElement(i)&&!iA(i)?i:a.createElement("span",null,i),le=Q.props,de=!le.className||typeof le.className=="string"?ae(le.className,n||`${be}-open`):le.className,ce=si(be),[fe,ue]=b0(be,ce,!z),ye=_0(j,be,s),Be=ye.arrowStyle,Ae=ae(ce,fe,ue),Ee=ae(A,{[`${be}-rtl`]:Y==="rtl"},ye.className,w,Ae,F,Ye.root),[lt,ht]=Gc("Tooltip",k.zIndex),dt={...pe.container,...P,...ye.overlayStyle},mt=a.createElement(iO,{unique:!0,...k,zIndex:lt,showArrow:W,placement:y,mouseEnterDelay:x,mouseLeaveDelay:S,prefixCls:be,classNames:{root:Ee,container:Ye.container,arrow:Ye.arrow,uniqueContainer:ae(Ae,Ye.container)},styles:{root:{...Be,...pe.root,...H,...$},container:dt,uniqueContainer:dt,arrow:pe.arrow},ref:se,overlay:Ce,visible:q,onVisibleChange:me,afterVisibleChange:l,arrowContent:a.createElement("span",{className:`${be}-arrow-content`}),motion:{motionName:Rx(j,"zoom-big-fast",typeof(b==null?void 0:b.motionName)=="string"?b==null?void 0:b.motionName:void 0),motionDeadline:1e3},trigger:B,builtinPlacements:Pe,getTooltipContainer:J,destroyOnHidden:K},q?Pn(Q,{className:de}):Q);return a.createElement(Nx.Provider,{value:ht},mt)}),Wo=pO;Wo._InternalPanelDoNotUseOrYouWillBeFired=dO;Wo.UniqueProvider=aA;const zv=e=>{const{prefixCls:t,value:r,current:n,offset:o=0}=e;let s;return o&&(s={position:"absolute",top:`${o}00%`,left:0}),a.createElement("span",{style:s,className:ae(`${t}-only-unit`,{current:n})},r)};function fO(e,t,r){let n=e,o=0;for(;(n+10)%10!==t;)n+=r,o+=r;return o}const mO=e=>{const{prefixCls:t,count:r,value:n}=e,o=Number(n),s=Math.abs(r),[i,l]=a.useState(o),[u,d]=a.useState(s),p=()=>{l(o),d(s)};a.useEffect(()=>{const h=setTimeout(p,1e3);return()=>clearTimeout(h)},[o]);let f,m;if(i===o||Number.isNaN(o)||Number.isNaN(i))f=[a.createElement(zv,{...e,key:o,current:!0})],m={transition:"none"};else{f=[];const h=o+10,v=[];for(let y=o;y<=h;y+=1)v.push(y);const g=u<s?1:-1,b=v.findIndex(y=>y%10===i);f=(g<0?v.slice(0,b+1):v.slice(b)).map((y,x)=>{const S=y%10;return a.createElement(zv,{...e,key:y,value:S,offset:g<0?x-b:x,current:x===b})}),m={transform:`translateY(${-fO(i,o,g)}00%)`}}return a.createElement("span",{className:`${t}-only`,style:m,onTransitionEnd:p},f)},hO=a.forwardRef((e,t)=>{const{prefixCls:r,count:n,className:o,motionClassName:s,style:i,title:l,show:u,component:d="sup",children:p,...f}=e,{getPrefixCls:m}=a.useContext($r),h=m("scroll-number",r),v={...f,"data-show":u,style:i,className:ae(h,o,s),title:l};let g=n;if(n&&Number(n)%1===0){const b=String(n).split("");g=a.createElement("bdi",null,b.map((_,y)=>a.createElement(mO,{prefixCls:h,count:Number(n),value:_,key:b.length-y})))}return i!=null&&i.borderColor&&(v.style={...i,boxShadow:`0 0 0 1px ${i.borderColor} inset`}),p?Pn(p,b=>({className:ae(`${h}-custom-component`,b==null?void 0:b.className,s)})):a.createElement(d,{...v,ref:t},g)}),gO=new so("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),vO=new so("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),bO=new so("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),_O=new so("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),yO=new so("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),xO=new so("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),wO=e=>{const{componentCls:t,iconCls:r,antCls:n,badgeShadowSize:o,textFontSize:s,textFontSizeSM:i,statusSize:l,dotSize:u,textFontWeight:d,indicatorHeight:p,indicatorHeightSM:f,marginXS:m,calc:h}=e,v=`${n}-scroll-number`,g=th(e,(b,{darkColor:_})=>({[`&${t} ${t}-color-${b}`]:{background:_,[`&:not(${t}-count)`]:{color:_},"a:hover &":{background:_}}}));return{[t]:{...Vr(e),position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:p,height:p,color:e.badgeTextColor,fontWeight:d,fontSize:s,lineHeight:we(p),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:h(p).div(2).equal(),boxShadow:`0 0 0 ${we(o)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:f,height:f,fontSize:i,lineHeight:we(f),borderRadius:h(f).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${we(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:u,minWidth:u,height:u,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${we(o)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${v}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${r}-spin`]:{animationName:xO,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:gO,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:m,color:e.colorText,fontSize:e.fontSize}},...g,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:vO,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:bO,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:_O,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:yO,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${v}-custom-component, ${t}-count`]:{transform:"none"},[`${v}-custom-component, ${v}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[v]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${v}-only`]:{position:"relative",display:"inline-block",height:p,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${v}-only-unit`]:{height:p,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${v}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${v}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},y0=e=>{const{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:o}=e,s=t,i=r,l=e.colorTextLightSolid,u=e.colorError,d=e.colorErrorHover;return tr(e,{badgeFontHeight:s,badgeShadowSize:i,badgeTextColor:l,badgeColor:u,badgeColorHover:d,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},x0=e=>{const{fontSize:t,lineHeight:r,fontSizeSM:n,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*o,indicatorHeightSM:t,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2}},EO=rr("Badge",e=>{const t=y0(e);return wO(t)},x0),SO=a.forwardRef((e,t)=>{const{prefixCls:r,scrollNumberPrefixCls:n,children:o,status:s,text:i,color:l,count:u=null,overflowCount:d=99,dot:p=!1,size:f="medium",title:m,offset:h,style:v,className:g,rootClassName:b,classNames:_,styles:y,showZero:x=!1,...S}=e,{getPrefixCls:w,direction:I,className:T,style:R,classNames:P,styles:$}=Jr("badge"),A=w("badge",r),[k,D]=EO(A),z={...e,overflowCount:d,size:f,dot:p,showZero:x},[X,V]=un([P,_],[$,y],{props:z}),Y=u>d?`${d}+`:u,U=Y==="0"||Y===0||i==="0"||i===0,F=u===null||U&&!x,H=(Nn(s)||Nn(l))&&F,ee=Nn(s)||!U,O=p&&!U,M=O?"":Y,G=a.useMemo(()=>((!Nn(M)||M==="")&&(!Nn(i)||i==="")||U&&!x)&&!O,[M,U,x,O,i]),L=a.useRef(u);G||(L.current=u);const W=L.current,B=a.useRef(M);G||(B.current=M);const J=B.current,K=a.useRef(O);G||(K.current=O);const re=a.useMemo(()=>{if(!h)return{...R,...v};const Ce=Number.parseInt(h[0],10);return{...{marginTop:h[1],insetInlineEnd:-Ce},...R,...v}},[h,v,R]),se=m??(typeof W=="string"||sa(W)?W:void 0),Z=!G&&(i===0?x:!!i&&i!==!0),ne=Z?a.createElement("span",{className:`${A}-status-text`},i):null,ie=zn(W)?Pn(W,Ce=>({style:{...re,...Ce.style}})):void 0,he=rh(l,!1),me=ae(X.indicator,{[`${A}-status-dot`]:H,[`${A}-status-${s}`]:!!s,[`${A}-color-${l}`]:he}),Pe={};l&&!he&&(Pe.color=l,Pe.background=l);const Se=ae(A,{[`${A}-status`]:H,[`${A}-not-a-wrapper`]:!o,[`${A}-rtl`]:I==="rtl"},g,b,T,X.root,k,D);if(!o&&H&&(i||ee||!F)){const Ce=re.color;return a.createElement("span",{ref:t,...S,className:Se,style:{...V.root,...re}},a.createElement("span",{className:me,style:{...V.indicator,...Pe}}),Z&&a.createElement("span",{style:{color:Ce},className:`${A}-status-text`},i))}return a.createElement("span",{ref:t,...S,className:Se,style:V.root},o,a.createElement(kx,{visible:!G,motionName:`${A}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:Ce})=>{const Ze=w("scroll-number",n),Ye=K.current,pe=ae(X.indicator,{[`${A}-dot`]:Ye,[`${A}-count`]:!Ye,[`${A}-count-sm`]:f==="small",[`${A}-multiple-words`]:!Ye&&J&&J.toString().length>1,[`${A}-status-${s}`]:!!s,[`${A}-color-${l}`]:he});let be={...V.indicator,...re};return l&&!he&&(be=be||{},be.background=l),a.createElement(hO,{prefixCls:Ze,show:!G,motionClassName:Ce,className:pe,count:J,title:se,style:be,key:"scrollNumber"},ie)}),ne)}),CO=e=>{const{antCls:t,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:o,calc:s}=e,i=`${t}-ribbon`,l=`${t}-ribbon-wrapper`,u=th(e,(d,{darkColor:p})=>({[`&${i}-color-${d}`]:{background:p,color:p}}));return{[l]:{position:"relative"},[i]:{...Vr(e),position:"absolute",top:n,padding:`0 ${we(e.paddingXS)}`,color:e.colorPrimary,lineHeight:we(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${i}-content`]:{color:e.badgeTextColor},[`${i}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${we(s(o).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter},...u,[`&${i}-placement-end`]:{insetInlineEnd:s(o).mul(-1).equal(),borderEndEndRadius:0,[`${i}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${i}-placement-start`]:{insetInlineStart:s(o).mul(-1).equal(),borderEndStartRadius:0,[`${i}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}}}},PO=rr(["Badge","Ribbon"],e=>{const t=y0(e);return CO(t)},x0),RO=e=>{const{className:t,prefixCls:r,style:n,color:o,children:s,text:i,placement:l="end",rootClassName:u,styles:d,classNames:p}=e,{getPrefixCls:f,direction:m,className:h,style:v,classNames:g,styles:b}=Jr("ribbon"),_=f("ribbon",r),y=`${_}-wrapper`,[x,S]=PO(_,y),w={...e,placement:l},[I,T]=un([g,p],[b,d],{props:w}),R=rh(o,!1),P=ae(_,`${_}-placement-${l}`,{[`${_}-rtl`]:m==="rtl",[`${_}-color-${o}`]:R},t,h,I.indicator),$={},A={};return o&&!R&&($.background=o,A.color=o),a.createElement("div",{className:ae(y,u,x,S,I.root),style:T.root},s,a.createElement("div",{className:ae(P,x),style:{...$,...T.indicator,...v,...n}},a.createElement("span",{className:ae(`${_}-content`,I.content),style:T.content},i),a.createElement("div",{className:`${_}-corner`,style:A})))},Yl=SO;Yl.Ribbon=RO;var TO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zp.apply(this,arguments)}const IO=(e,t)=>a.createElement(Cn,Zp({},e,{ref:t,icon:TO})),Qp=a.forwardRef(IO),{ESC:$O,TAB:AO}=Xe;function jO({visible:e,triggerRef:t,onVisibleChange:r,autoFocus:n,overlayRef:o}){const s=a.useRef(!1),i=()=>{var d,p;e&&((p=(d=t.current)==null?void 0:d.focus)==null||p.call(d),r==null||r(!1))},l=()=>{var d;return(d=o.current)!=null&&d.focus?(o.current.focus(),s.current=!0,!0):!1},u=d=>{switch(d.keyCode){case $O:i();break;case AO:{let p=!1;s.current||(p=l()),p?d.preventDefault():i();break}}};a.useEffect(()=>e?(window.addEventListener("keydown",u),n&&Wt(l,3),()=>{window.removeEventListener("keydown",u),s.current=!1}):()=>{s.current=!1},[e])}const OO=a.forwardRef((e,t)=>{const{overlay:r,arrow:n,prefixCls:o}=e,s=a.useMemo(()=>{let l;return typeof r=="function"?l=r():l=r,l},[r]),i=_a(t,nh(s));return N.createElement(N.Fragment,null,n&&N.createElement("div",{className:`${o}-arrow`}),N.cloneElement(s,{ref:Mx(s)?i:void 0}))}),os={adjustX:1,adjustY:1},ss=[0,0],NO={topLeft:{points:["bl","tl"],overflow:os,offset:[0,-4],targetOffset:ss},top:{points:["bc","tc"],overflow:os,offset:[0,-4],targetOffset:ss},topRight:{points:["br","tr"],overflow:os,offset:[0,-4],targetOffset:ss},bottomLeft:{points:["tl","bl"],overflow:os,offset:[0,4],targetOffset:ss},bottom:{points:["tc","bc"],overflow:os,offset:[0,4],targetOffset:ss},bottomRight:{points:["tr","br"],overflow:os,offset:[0,4],targetOffset:ss}};function ef(){return ef=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ef.apply(this,arguments)}const DO=N.forwardRef((e,t)=>{var H;const{arrow:r=!1,prefixCls:n="rc-dropdown",transitionName:o,animation:s,align:i,placement:l="bottomLeft",placements:u=NO,getPopupContainer:d,showAction:p,hideAction:f,overlayClassName:m,overlayStyle:h,visible:v,trigger:g=["hover"],autoFocus:b,overlay:_,children:y,onVisibleChange:x,...S}=e,[w,I]=N.useState(),T="visible"in e?v:w,R=s?`${n}-${s}`:o,P=N.useRef(null),$=N.useRef(null),A=N.useRef(null);N.useImperativeHandle(t,()=>P.current);const k=ee=>{I(ee),x==null||x(ee)};jO({visible:T,triggerRef:A,onVisibleChange:k,autoFocus:b,overlayRef:$});const D=ee=>{const{onOverlayClick:O}=e;I(!1),O&&O(ee)},z=()=>N.createElement(OO,{ref:$,overlay:_,prefixCls:n,arrow:r}),X=()=>typeof _=="function"?z:z(),V=()=>{const{minOverlayWidthMatchTrigger:ee,alignPoint:O}=e;return"minOverlayWidthMatchTrigger"in e?ee:!O},Y=()=>{const{openClassName:ee}=e;return ee!==void 0?ee:`${n}-open`},U=N.cloneElement(y,{className:ae((H=y.props)==null?void 0:H.className,T&&Y()),ref:Mx(y)?_a(A,nh(y)):void 0});let F=f;return!F&&g.indexOf("contextMenu")!==-1&&(F=["click"]),N.createElement(Uc,ef({builtinPlacements:u},S,{prefixCls:n,ref:P,popupClassName:ae(m,{[`${n}-show-arrow`]:r}),popupStyle:h,action:g,showAction:p,hideAction:F,popupPlacement:l,popupAlign:i,popupMotion:{motionName:R},popupVisible:T,stretch:V()?"minWidth":"",popup:X(),onOpenChange:k,onPopupClick:D,getPopupContainer:d}),U)}),w0=a.createContext(null);function E0(e,t){return`${e}-${t}`}function S0(e){const t=a.useContext(w0);return E0(t,e)}const ln=a.createContext(null);function kO(e,t){const r={...e};return Object.keys(t).forEach(n=>{const o=t[n];o!==void 0&&(r[n]=o)}),r}function aa({children:e,locked:t,...r}){const n=a.useContext(ln),o=vx(()=>kO(n,r),[n,r],(s,i)=>!t&&(s[0]!==i[0]||!Lx(s[1],i[1],!0)));return a.createElement(ln.Provider,{value:o},e)}const MO=[],C0=a.createContext(null);function tu(){return a.useContext(C0)}const P0=a.createContext(MO);function ai(e){const t=a.useContext(P0);return a.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const R0=a.createContext(null),hh=a.createContext({}),{LEFT:tf,RIGHT:rf,UP:nf,DOWN:Rl,ENTER:Tl,ESC:T0,HOME:_i,END:yi}=Xe,Fv=[nf,Rl,tf,rf];function LO(e,t,r,n){var h;const o="prev",s="next",i="children",l="parent";if(e==="inline"&&n===Tl)return{inlineTrigger:!0};const u={[nf]:o,[Rl]:s},d={[tf]:r?s:o,[rf]:r?o:s,[Rl]:i,[Tl]:i},p={[nf]:o,[Rl]:s,[Tl]:i,[T0]:l,[tf]:r?i:l,[rf]:r?l:i};switch((h={inline:u,horizontal:d,vertical:p,inlineSub:u,horizontalSub:p,verticalSub:p}[`${e}${t?"":"Sub"}`])==null?void 0:h[n]){case o:return{offset:-1,sibling:!0};case s:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case i:return{offset:1,sibling:!1};default:return null}}function zO(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function FO(e,t){let r=e||document.activeElement;for(;r;){if(t.has(r))return r;r=r.parentElement}return null}function gh(e,t){return ih(e,!0).filter(n=>t.has(n))}function Vv(e,t,r,n=1){if(!e)return null;const o=gh(e,t),s=o.length;let i=o.findIndex(l=>r===l);return n<0?i===-1?i=s-1:i-=1:n>0&&(i+=1),i=(i+s)%s,o[i]}const Jl=(e,t)=>{const r=new Set,n=new Map,o=new Map;return e.forEach(s=>{const i=document.querySelector(`[data-menu-id='${E0(t,s)}']`);i&&(r.add(i),o.set(i,s),n.set(s,i))}),{elements:r,key2element:n,element2key:o}};function VO(e,t,r,n,o,s,i,l,u,d){const p=a.useRef(),f=a.useRef();f.current=t;const m=()=>{Wt.cancel(p.current)};return a.useEffect(()=>()=>{m()},[]),h=>{const{which:v}=h;if([...Fv,Tl,T0,_i,yi].includes(v)){const g=s();let b=Jl(g,n);const{elements:_,key2element:y,element2key:x}=b,S=y.get(t),w=FO(S,_),I=x.get(w),T=LO(e,i(I,!0).length===1,r,v);if(!T&&v!==_i&&v!==yi)return;(Fv.includes(v)||[_i,yi].includes(v))&&h.preventDefault();const R=P=>{if(P){let $=P;const A=P.querySelector("a");A!=null&&A.getAttribute("href")&&($=A);const k=x.get(P);l(k),m(),p.current=Wt(()=>{f.current===k&&$.focus()})}};if([_i,yi].includes(v)||T.sibling||!w){let P;!w||e==="inline"?P=o.current:P=zO(w);let $;const A=gh(P,_);v===_i?$=A[0]:v===yi?$=A[A.length-1]:$=Vv(P,_,w,T.offset),R($)}else if(T.inlineTrigger)u(I);else if(T.offset>0)u(I,!0),m(),p.current=Wt(()=>{b=Jl(g,n);const P=w.getAttribute("aria-controls"),$=document.getElementById(P),A=Vv($,b.elements);R(A)},5);else if(T.offset<0){const P=i(I,!0),$=P[P.length-2],A=y.get($);u($,!1),R(A)}}d==null||d(h)}}function BO(e){Promise.resolve().then(e)}const vh="__RC_UTIL_PATH_SPLIT__",Bv=e=>e.join(vh),HO=e=>e.split(vh),of="rc-menu-more";function UO(){const[,e]=a.useState({}),t=a.useRef(new Map),r=a.useRef(new Map),[n,o]=a.useState([]),s=a.useRef(0),i=a.useRef(!1),l=()=>{i.current||e({})},u=a.useCallback((g,b)=>{const _=Bv(b);r.current.set(_,g),t.current.set(g,_),s.current+=1;const y=s.current;BO(()=>{y===s.current&&l()})},[]),d=a.useCallback((g,b)=>{const _=Bv(b);r.current.delete(_),t.current.delete(g)},[]),p=a.useCallback(g=>{o(g)},[]),f=a.useCallback((g,b)=>{const _=t.current.get(g)||"",y=HO(_);return b&&n.includes(y[0])&&y.unshift(of),y},[n]),m=a.useCallback((g,b)=>g.filter(_=>_!==void 0).some(_=>f(_,!0).includes(b)),[f]),h=()=>{const g=[...t.current.keys()];return n.length&&g.push(of),g},v=a.useCallback(g=>{const b=`${t.current.get(g)}${vh}`,_=new Set;return[...r.current.keys()].forEach(y=>{y.startsWith(b)&&_.add(r.current.get(y))}),_},[]);return a.useEffect(()=>()=>{i.current=!0},[]),{registerPath:u,unregisterPath:d,refreshOverflowKeys:p,isSubPathKey:m,getKeyPath:f,getKeys:h,getSubPathKeys:v}}function Mi(e){const t=a.useRef(e);t.current=e;const r=a.useCallback((...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[]);return e?r:void 0}function I0(e,t,r,n){const{activeKey:o,onActive:s,onInactive:i}=a.useContext(ln),l={active:o===e};return t||(l.onMouseEnter=u=>{r==null||r({key:e,domEvent:u}),s(e)},l.onMouseLeave=u=>{n==null||n({key:e,domEvent:u}),i(e)}),l}function $0(e){const{mode:t,rtl:r,inlineIndent:n}=a.useContext(ln);if(t!=="inline")return null;const o=e;return r?{paddingRight:o*n}:{paddingLeft:o*n}}function A0({icon:e,props:t,children:r}){let n;return e===null||e===!1?null:(typeof e=="function"?n=a.createElement(e,{...t}):typeof e!="boolean"&&(n=e),n||r||null)}function Zl({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(Ym(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function la(){return la=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},la.apply(this,arguments)}class WO extends a.Component{render(){const{title:t,attribute:r,elementRef:n,...o}=this.props,s=vr(o,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Ym(!r,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),a.createElement(Ln.Item,la({},r,{title:typeof t=="string"?t:void 0},s,{ref:n}))}}const qO=a.forwardRef((e,t)=>{const{style:r,className:n,eventKey:o,warnKey:s,disabled:i,itemIcon:l,children:u,role:d,onMouseEnter:p,onMouseLeave:f,onClick:m,onKeyDown:h,onFocus:v,...g}=e,b=S0(o),{prefixCls:_,onItemClick:y,disabled:x,overflowDisabled:S,itemIcon:w,selectedKeys:I,onActive:T}=a.useContext(ln),{_internalRenderMenuItem:R}=a.useContext(hh),P=`${_}-item`,$=a.useRef(),A=a.useRef(),k=x||i,D=zx(t,A),z=ai(o),X=W=>({key:o,keyPath:[...z].reverse(),item:$.current,domEvent:W}),V=l||w,{active:Y,...U}=I0(o,k,p,f),F=I.includes(o),H=$0(z.length),ee=W=>{if(k)return;const B=X(W);m==null||m(Zl(B)),y(B)},O=W=>{if(h==null||h(W),W.which===Xe.ENTER){const B=X(W);m==null||m(Zl(B)),y(B)}},M=W=>{T(o),v==null||v(W)},G={};e.role==="option"&&(G["aria-selected"]=F);let L=a.createElement(WO,la({ref:$,elementRef:D,role:d===null?"none":d||"menuitem",tabIndex:i?null:-1,"data-menu-id":S&&b?null:b},vr(g,["extra"]),U,G,{component:"li","aria-disabled":i,style:{...H,...r},className:ae(P,{[`${P}-active`]:Y,[`${P}-selected`]:F,[`${P}-disabled`]:k},n),onClick:ee,onKeyDown:O,onFocus:M}),u,a.createElement(A0,{props:{...e,isSelected:F},icon:V}));return R&&(L=R(L,e,{selected:F})),L});function GO(e,t){const{eventKey:r}=e,n=tu(),o=ai(r);return a.useEffect(()=>{if(n)return n.registerPath(r,o),()=>{n.unregisterPath(r,o)}},[o]),n?null:a.createElement(qO,la({},e,{ref:t}))}const ru=a.forwardRef(GO);function sf(){return sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sf.apply(this,arguments)}const KO=({className:e,children:t,...r},n)=>{const{prefixCls:o,mode:s,rtl:i}=a.useContext(ln);return a.createElement("ul",sf({className:ae(o,i&&`${o}-rtl`,`${o}-sub`,`${o}-${s==="inline"?"inline":"vertical"}`,e),role:"menu"},r,{"data-menu-list":!0,ref:n}),t)},j0=a.forwardRef(KO);function bh(e,t){return Ho(e).map((r,n)=>{var o;if(a.isValidElement(r)){const{key:s}=r;let i=((o=r.props)==null?void 0:o.eventKey)??s;i==null&&(i=`tmp_key-${[...t,n].join("-")}`);const u={key:i,eventKey:i};return a.cloneElement(r,u)}return r})}const ir={adjustX:1,adjustY:1},XO={topLeft:{points:["bl","tl"],overflow:ir},topRight:{points:["br","tr"],overflow:ir},bottomLeft:{points:["tl","bl"],overflow:ir},bottomRight:{points:["tr","br"],overflow:ir},leftTop:{points:["tr","tl"],overflow:ir},leftBottom:{points:["br","bl"],overflow:ir},rightTop:{points:["tl","tr"],overflow:ir},rightBottom:{points:["bl","br"],overflow:ir}},YO={topLeft:{points:["bl","tl"],overflow:ir},topRight:{points:["br","tr"],overflow:ir},bottomLeft:{points:["tl","bl"],overflow:ir},bottomRight:{points:["tr","br"],overflow:ir},rightTop:{points:["tr","tl"],overflow:ir},rightBottom:{points:["br","bl"],overflow:ir},leftTop:{points:["tl","tr"],overflow:ir},leftBottom:{points:["bl","br"],overflow:ir}};function O0(e,t,r){if(t)return t;if(r)return r[e]||r.other}const JO={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function ZO({prefixCls:e,visible:t,children:r,popup:n,popupStyle:o,popupClassName:s,popupOffset:i,disabled:l,mode:u,onVisibleChange:d}){const{getPopupContainer:p,rtl:f,subMenuOpenDelay:m,subMenuCloseDelay:h,builtinPlacements:v,triggerSubMenuAction:g,forceSubMenuRender:b,rootClassName:_,motion:y,defaultMotions:x}=a.useContext(ln),[S,w]=a.useState(!1),I=f?{...YO,...v}:{...XO,...v},T=JO[u],R=O0(u,y,x),P=a.useRef(R);u!=="inline"&&(P.current=R);const $={...P.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},A=a.useRef();return a.useEffect(()=>(A.current=Wt(()=>{w(t)}),()=>{Wt.cancel(A.current)}),[t]),a.createElement(Uc,{prefixCls:e,popupClassName:ae(`${e}-popup`,{[`${e}-rtl`]:f},s,_),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:p,builtinPlacements:I,popupPlacement:T,popupVisible:S,popup:n,popupStyle:o,popupAlign:i&&{offset:i},action:l?[]:[g],mouseEnterDelay:m,mouseLeaveDelay:h,onPopupVisibleChange:d,forceRender:b,popupMotion:$,fresh:!0},r)}function af(){return af=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},af.apply(this,arguments)}function QO({id:e,open:t,keyPath:r,children:n}){const o="inline",{prefixCls:s,forceSubMenuRender:i,motion:l,defaultMotions:u,mode:d}=a.useContext(ln),p=a.useRef(!1);p.current=d===o;const[f,m]=a.useState(!p.current),h=p.current?t:!1;a.useEffect(()=>{p.current&&m(!1)},[d]);const v={...O0(o,l,u)};r.length>1&&(v.motionAppear=!1);const g=v.onVisibleChanged;return v.onVisibleChanged=b=>(!p.current&&!b&&m(!0),g==null?void 0:g(b)),f?null:a.createElement(aa,{mode:o,locked:!p.current},a.createElement(kx,af({visible:h},v,{forceRender:i,removeOnLeave:!1,leavedClassName:`${s}-hidden`}),({className:b,style:_})=>a.createElement(j0,{id:e,className:b,style:_},n)))}function ca(){return ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ca.apply(this,arguments)}const eN=a.forwardRef((e,t)=>{const{style:r,className:n,styles:o,classNames:s,title:i,eventKey:l,warnKey:u,disabled:d,internalPopupClose:p,children:f,itemIcon:m,expandIcon:h,popupClassName:v,popupOffset:g,popupStyle:b,onClick:_,onMouseEnter:y,onMouseLeave:x,onTitleClick:S,onTitleMouseEnter:w,onTitleMouseLeave:I,popupRender:T,...R}=e,P=S0(l),{prefixCls:$,mode:A,openKeys:k,disabled:D,overflowDisabled:z,activeKey:X,selectedKeys:V,itemIcon:Y,expandIcon:U,onItemClick:F,onOpenChange:H,onActive:ee,popupRender:O}=a.useContext(ln),{_internalRenderSubMenuItem:M}=a.useContext(hh),{isSubPathKey:G}=a.useContext(R0),L=ai(),W=`${$}-submenu`,B=D||d,J=a.useRef(),K=a.useRef(),re=m??Y,se=h??U,Z=k.includes(l),ne=!z&&Z,ie=G(V,l),{active:he,...me}=I0(l,B,w,I),[Pe,Se]=a.useState(!1),Ce=Ee=>{B||Se(Ee)},Ze=Ee=>{Ce(!0),y==null||y({key:l,domEvent:Ee})},Ye=Ee=>{Ce(!1),x==null||x({key:l,domEvent:Ee})},pe=a.useMemo(()=>he||(A!=="inline"?Pe||G([X],l):!1),[A,he,X,Pe,l,G]),be=$0(L.length),j=Ee=>{B||(S==null||S({key:l,domEvent:Ee}),A==="inline"&&H(l,!Z))},q=Mi(Ee=>{_==null||_(Zl(Ee)),F(Ee)}),Q=Ee=>{A!=="inline"&&H(l,Ee)},le=()=>{ee(l)},de=P&&`${P}-popup`,ce=a.useMemo(()=>a.createElement(A0,{icon:A!=="horizontal"?se:void 0,props:{...e,isOpen:ne,isSubMenu:!0}},a.createElement("i",{className:`${W}-arrow`})),[A,se,e,ne,W]);let fe=a.createElement("div",ca({role:"menuitem",style:be,className:`${W}-title`,tabIndex:B?null:-1,ref:J,title:typeof i=="string"?i:null,"data-menu-id":z&&P?null:P,"aria-expanded":ne,"aria-haspopup":!0,"aria-controls":de,"aria-disabled":B,onClick:j,onFocus:le},me),i,ce);const ue=a.useRef(A);A!=="inline"&&L.length>1?ue.current="vertical":ue.current=A;const ye=ue.current,Be=a.useMemo(()=>{const Ee=a.createElement(aa,{classNames:s,styles:o,mode:ye==="horizontal"?"vertical":ye},a.createElement(j0,{id:de,ref:K},f)),lt=T||O;return lt?lt(Ee,{item:e,keys:L}):Ee},[T,O,L,de,f,e,ye]);if(!z){const Ee=ue.current;fe=a.createElement(ZO,{mode:Ee,prefixCls:W,visible:!p&&ne&&A!=="inline",popupClassName:v,popupOffset:g,popupStyle:b,popup:Be,disabled:B,onVisibleChange:Q},fe)}let Ae=a.createElement(Ln.Item,ca({ref:t,role:"none"},R,{component:"li",style:r,className:ae(W,`${W}-${A}`,n,{[`${W}-open`]:ne,[`${W}-active`]:pe,[`${W}-selected`]:ie,[`${W}-disabled`]:B}),onMouseEnter:Ze,onMouseLeave:Ye}),fe,!z&&a.createElement(QO,{id:de,open:ne,keyPath:L},f));return M&&(Ae=M(Ae,e,{selected:ie,active:pe,open:ne,disabled:B})),a.createElement(aa,{classNames:s,styles:o,onItemClick:q,mode:A==="horizontal"?"vertical":A,itemIcon:re,expandIcon:se},Ae)}),nu=a.forwardRef((e,t)=>{const{eventKey:r,children:n}=e,o=ai(r),s=bh(n,o),i=tu();a.useEffect(()=>{if(i)return i.registerPath(r,o),()=>{i.unregisterPath(r,o)}},[o]);let l;return i?l=s:l=a.createElement(eN,ca({ref:t},e),s),a.createElement(P0.Provider,{value:o},l)});function _h({className:e,style:t}){const{prefixCls:r}=a.useContext(ln);return tu()?null:a.createElement("li",{role:"separator",className:ae(`${r}-item-divider`,e),style:t})}function Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ql.apply(this,arguments)}const tN=a.forwardRef((e,t)=>{const{className:r,title:n,eventKey:o,children:s,...i}=e,{prefixCls:l,classNames:u,styles:d}=a.useContext(ln),p=`${l}-item-group`;return a.createElement("li",Ql({ref:t,role:"presentation"},i,{onClick:f=>f.stopPropagation(),className:ae(p,r)}),a.createElement("div",{role:"presentation",className:ae(`${p}-title`,u==null?void 0:u.listTitle),style:d==null?void 0:d.listTitle,title:typeof n=="string"?n:void 0},n),a.createElement("ul",{role:"group",className:ae(`${p}-list`,u==null?void 0:u.list),style:d==null?void 0:d.list},s))}),yh=a.forwardRef((e,t)=>{const{eventKey:r,children:n}=e,o=ai(r),s=bh(n,o);return tu()?s:a.createElement(tN,Ql({ref:t},vr(e,["warnKey"])),s)});function Ps(){return Ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ps.apply(this,arguments)}function lf(e,t,r){const{item:n,group:o,submenu:s,divider:i}=t;return(e||[]).map((l,u)=>{if(l&&typeof l=="object"){const{label:d,children:p,key:f,type:m,extra:h,...v}=l,g=f??`tmp-${u}`;return p||m==="group"?m==="group"?a.createElement(o,Ps({key:g},v,{title:d}),lf(p,t,r)):a.createElement(s,Ps({key:g},v,{title:d}),lf(p,t,r)):m==="divider"?a.createElement(i,Ps({key:g},v)):a.createElement(n,Ps({key:g},v,{extra:h}),d,(!!h||h===0)&&a.createElement("span",{className:`${r}-item-extra`},h))}return null}).filter(l=>l)}function Hv(e,t,r,n,o){let s=e;const i={divider:_h,item:ru,group:yh,submenu:nu,...n};return t&&(s=lf(t,i,o)),bh(s,r)}function cf(){return cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cf.apply(this,arguments)}const vo=[],rN=a.forwardRef((e,t)=>{var Ka;const{prefixCls:r="rc-menu",rootClassName:n,style:o,className:s,styles:i,classNames:l,tabIndex:u=0,items:d,children:p,direction:f,id:m,mode:h="vertical",inlineCollapsed:v,disabled:g,disabledOverflow:b,subMenuOpenDelay:_=.1,subMenuCloseDelay:y=.1,forceSubMenuRender:x,defaultOpenKeys:S,openKeys:w,activeKey:I,defaultActiveFirst:T,selectable:R=!0,multiple:P=!1,defaultSelectedKeys:$,selectedKeys:A,onSelect:k,onDeselect:D,inlineIndent:z=24,motion:X,defaultMotions:V,triggerSubMenuAction:Y="hover",builtinPlacements:U,itemIcon:F,expandIcon:H,overflowedIndicator:ee="...",overflowedIndicatorPopupClassName:O,getPopupContainer:M,onClick:G,onOpenChange:L,onKeyDown:W,openAnimation:B,openTransitionName:J,_internalRenderMenuItem:K,_internalRenderSubMenuItem:re,_internalComponents:se,popupRender:Z,...ne}=e,[ie,he]=a.useMemo(()=>[Hv(p,d,vo,se,r),Hv(p,d,vo,{},r)],[p,d,se]),[me,Pe]=a.useState(!1),Se=a.useRef(),Ce=Hc(m?`rc-menu-uuid-${m}`:"rc-menu-uuid"),Ze=f==="rtl",[Ye,pe]=Rr(S,w),be=Ye||vo,j=(ct,Me=!1)=>{function st(){pe(ct),L==null||L(ct)}Me?Oo.flushSync(st):st()},[q,Q]=a.useState(be),le=a.useRef(!1),[de,ce]=a.useMemo(()=>(h==="inline"||h==="vertical")&&v?["vertical",v]:[h,!1],[h,v]),fe=de==="inline",[ue,ye]=a.useState(de),[Be,Ae]=a.useState(ce);a.useEffect(()=>{ye(de),Ae(ce),le.current&&(fe?pe(q):j(vo))},[de,ce]);const[Ee,lt]=a.useState(0),ht=Ee>=ie.length-1||ue!=="horizontal"||b;a.useEffect(()=>{fe&&Q(be)},[be]),a.useEffect(()=>(le.current=!0,()=>{le.current=!1}),[]);const{registerPath:dt,unregisterPath:mt,refreshOverflowKeys:ft,isSubPathKey:vt,getKeyPath:ze,getKeys:We,getSubPathKeys:ke}=UO(),nt=a.useMemo(()=>({registerPath:dt,unregisterPath:mt}),[dt,mt]),ut=a.useMemo(()=>({isSubPathKey:vt}),[vt]);a.useEffect(()=>{ft(ht?vo:ie.slice(Ee+1).map(ct=>ct.key))},[Ee,ht]);const[_e,Qe]=Rr(I||T&&((Ka=ie[0])==null?void 0:Ka.key),I),ge=Mi(ct=>{Qe(ct)}),Te=Mi(()=>{Qe(void 0)});a.useImperativeHandle(t,()=>({list:Se.current,focus:ct=>{var mo,ho;const Me=We(),{elements:st,key2element:bt,element2key:$t}=Jl(Me,Ce),pr=gh(Se.current,st);let Tn;_e&&Me.includes(_e)?Tn=_e:Tn=pr[0]?$t.get(pr[0]):(mo=ie.find(Xa=>!Xa.props.disabled))==null?void 0:mo.key;const Jt=bt.get(Tn);Tn&&Jt&&((ho=Jt==null?void 0:Jt.focus)==null||ho.call(Jt,ct))},findItem:({key:ct})=>{const Me=We(),{key2element:st}=Jl(Me,Ce);return st.get(ct)||null}}));const[et,xe]=Rr($||[],A),$e=a.useMemo(()=>Array.isArray(et)?et:et==null?vo:[et],[et]),Fe=ct=>{if(R){const{key:Me}=ct,st=$e.includes(Me);let bt;P?st?bt=$e.filter(pr=>pr!==Me):bt=[...$e,Me]:bt=[Me],xe(bt);const $t={...ct,selectedKeys:bt};st?D==null||D($t):k==null||k($t)}!P&&be.length&&ue!=="inline"&&j(vo)},Ge=Mi(ct=>{G==null||G(Zl(ct)),Fe(ct)}),rt=Mi((ct,Me)=>{let st=be.filter(bt=>bt!==ct);if(Me)st.push(ct);else if(ue!=="inline"){const bt=ke(ct);st=st.filter($t=>!bt.has($t))}Lx(be,st,!0)||j(st,!0)}),dr=VO(ue,_e,Ze,Ce,Se,We,ze,Qe,(ct,Me)=>{const st=Me??!be.includes(ct);rt(ct,st)},W);a.useEffect(()=>{Pe(!0)},[]);const Kt=a.useMemo(()=>({_internalRenderMenuItem:K,_internalRenderSubMenuItem:re}),[K,re]),id=ue!=="horizontal"||b?ie:ie.map((ct,Me)=>a.createElement(aa,{key:ct.key,overflowDisabled:Me>Ee,classNames:l,styles:i},ct)),ad=a.createElement(Ln,cf({id:m,ref:Se,prefixCls:`${r}-overflow`,component:"ul",itemComponent:ru,className:ae(r,`${r}-root`,`${r}-${ue}`,s,{[`${r}-inline-collapsed`]:Be,[`${r}-rtl`]:Ze},n),dir:f,style:o,role:"menu",tabIndex:u,data:id,renderRawItem:ct=>ct,renderRawRest:ct=>{const Me=ct.length,st=Me?ie.slice(-Me):null;return a.createElement(nu,{eventKey:of,title:ee,disabled:ht,internalPopupClose:Me===0,popupClassName:O},st)},maxCount:ue!=="horizontal"||b?Ln.INVALIDATE:Ln.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:ct=>{lt(ct)},onKeyDown:dr},ne));return a.createElement(hh.Provider,{value:Kt},a.createElement(w0.Provider,{value:Ce},a.createElement(aa,{prefixCls:r,rootClassName:n,classNames:l,styles:i,mode:ue,openKeys:be,rtl:Ze,disabled:g,motion:me?X:null,defaultMotions:me?V:null,activeKey:_e,onActive:ge,onInactive:Te,selectedKeys:$e,inlineIndent:z,subMenuOpenDelay:_,subMenuCloseDelay:y,forceSubMenuRender:x,builtinPlacements:U,triggerSubMenuAction:Y,getPopupContainer:M,itemIcon:F,expandIcon:H,onItemClick:Ge,onOpenChange:rt,popupRender:Z},a.createElement(R0.Provider,{value:ut},ad),a.createElement("div",{style:{display:"none"},"aria-hidden":!0},a.createElement(C0.Provider,{value:nt},he)))))}),Sa=rN;Sa.Item=ru;Sa.SubMenu=nu;Sa.ItemGroup=yh;Sa.Divider=_h;const N0=a.createContext({});var nN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function uf(){return uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uf.apply(this,arguments)}const oN=(e,t)=>a.createElement(Cn,uf({},e,{ref:t,icon:nN})),D0=a.forwardRef(oN),ec=a.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),k0=e=>{const{prefixCls:t,className:r,dashed:n,...o}=e,{getPrefixCls:s}=a.useContext($r),i=s("menu",t),l=ae({[`${i}-item-divider-dashed`]:!!n},r);return a.createElement(_h,{className:l,...o})},M0=e=>{var T,R;const{className:t,children:r,icon:n,title:o,danger:s,extra:i}=e,{prefixCls:l,firstLevel:u,direction:d,disableMenuItemTitleTooltip:p,tooltip:f,inlineCollapsed:m,styles:h,classNames:v}=a.useContext(ec),g=P=>{var k,D;const $=r==null?void 0:r[0],A=a.createElement("span",{className:ae(`${l}-title-content`,u?v==null?void 0:v.itemContent:(k=v==null?void 0:v.subMenu)==null?void 0:k.itemContent,{[`${l}-title-content-with-extra`]:!!i||i===0}),style:u?h==null?void 0:h.itemContent:(D=h==null?void 0:h.subMenu)==null?void 0:D.itemContent},r);return(!n||a.isValidElement(r)&&r.type==="span")&&r&&P&&u&&typeof $=="string"?a.createElement("div",{className:`${l}-inline-collapsed-noicon`},$.charAt(0)):A},{siderCollapsed:b}=a.useContext(N0);let _=o;typeof o>"u"?_=u?r:"":o===!1&&(_="");const y=f===!1?void 0:f,x=y&&y.title!==void 0?y.title:_,S={...y??null,title:x};!b&&!m&&(S.title=null,S.open=!1);const w=Ho(r).length;let I=a.createElement(ru,{...vr(e,["title","icon","danger"]),className:ae(u?v==null?void 0:v.item:(T=v==null?void 0:v.subMenu)==null?void 0:T.item,{[`${l}-item-danger`]:s,[`${l}-item-only-child`]:(n?w+1:w)===1},t),style:{...u?h==null?void 0:h.item:(R=h==null?void 0:h.subMenu)==null?void 0:R.item,...e.style},title:typeof o=="string"?o:void 0},Pn(n,P=>{var $,A;return{className:ae(`${l}-item-icon`,u?v==null?void 0:v.itemIcon:($=v==null?void 0:v.subMenu)==null?void 0:$.itemIcon,P.className),style:{...u?h==null?void 0:h.itemIcon:(A=h==null?void 0:h.subMenu)==null?void 0:A.itemIcon,...P.style}}}),g(m));if(!p&&f!==!1){const P=y&&y.placement?y.placement:d==="rtl"?"left":"right",$=`${l}-inline-collapsed-tooltip`,A=D=>({...D,root:ae($,D==null?void 0:D.root)}),k=y&&typeof y.classNames=="function"?D=>{const z=y.classNames(D);return A(z)}:A(y==null?void 0:y.classNames);I=a.createElement(Wo,{...S,placement:P,classNames:k},I)}return I},tc=a.createContext(null),sN=a.forwardRef((e,t)=>{const{children:r,...n}=e,o=a.useContext(tc),s=a.useMemo(()=>({...o,...n}),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),i=lA(r),l=zx(t,i?nh(r):null);return a.createElement(tc.Provider,{value:s},a.createElement(Zm,{space:!0},i?a.cloneElement(r,{ref:l}):r))}),iN=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:s,lineType:i,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${we(s)} ${i} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover,
        > ${t}-item-active,
        > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(u=>`${u} ${r}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},aN=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
    ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${we(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${we(t)})`}}}}),Uv=e=>Wl(e),Wv=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:s,groupTitleColor:i,itemBg:l,subMenuItemBg:u,itemSelectedBg:d,activeBarHeight:p,activeBarWidth:f,activeBarBorderWidth:m,motionDurationSlow:h,motionEaseInOut:v,motionEaseOut:g,itemPaddingInline:b,motionDurationMid:_,itemHoverColor:y,lineType:x,colorSplit:S,itemDisabledColor:w,dangerItemColor:I,dangerItemHoverColor:T,dangerItemSelectedColor:R,dangerItemActiveBg:P,dangerItemSelectedBg:$,popupBg:A,itemHoverBg:k,itemActiveBg:D,menuSubMenuBg:z,horizontalItemSelectedColor:X,horizontalItemSelectedBg:V,horizontalItemBorderRadius:Y,horizontalItemHoverBg:U}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:l,[`&${r}-root:focus-visible`]:{...Uv(e)},[`${r}-item`]:{"&-group-title, &-extra":{color:i}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:s},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:{...Uv(e)}},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${w} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:y}},[`${r}-submenu:not(${r}-submenu-selected)`]:{[`> ${r}-submenu-title:hover`]:{color:y}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:D}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:D}}},[`${r}-item-danger`]:{color:I,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:T}},[`&${r}-item:active`]:{background:P}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:R},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:d,[`&${r}-item-danger`]:{backgroundColor:$}},[`&${r}-submenu > ${r}`]:{backgroundColor:z},[`&${r}-popup > ${r}`]:{backgroundColor:A},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:A},[`&${r}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${r}-item, > ${r}-submenu`]:{top:m,marginTop:e.calc(m).mul(-1).equal(),marginBottom:0,borderRadius:Y,"&::after":{position:"absolute",insetInline:b,bottom:0,borderBottom:`${we(p)} solid transparent`,transition:`border-color ${h} ${v}`,content:'""'},"&:hover, &-active, &-open":{background:U,"&::after":{borderBottomWidth:p,borderBottomColor:X}},"&-selected":{color:X,backgroundColor:V,"&:hover":{backgroundColor:V},"&::after":{borderBottomWidth:p,borderBottomColor:X}}}},[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${we(m)} ${x} ${S}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:u},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${we(f)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(F=>`${F} ${_} ${g}`).join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:R}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(F=>`${F} ${_} ${v}`).join(",")}}}}}},qv=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:s,marginXS:i,itemMarginBlock:l,itemWidth:u,itemPaddingInline:d}=e,p=e.calc(s).add(o).add(i).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:we(r),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:l,width:u},[`> ${t}-item,
            > ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:we(r)},[`${t}-item-group-list ${t}-submenu-title,
            ${t}-submenu-title`]:{paddingInlineEnd:p}}},lN=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:s,controlHeightLG:i,motionEaseOut:l,paddingXL:u,itemMarginInline:d,fontSizeLG:p,motionDurationFast:f,motionDurationSlow:m,paddingXS:h,boxShadowSecondary:v,collapsedWidth:g,collapsedIconSize:b}=e,_={height:n,lineHeight:we(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...qv(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...qv(e),boxShadow:v}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:s,maxHeight:`calc(100vh - ${we(e.calc(i).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${m}`,`background-color ${m}`,`padding ${f} ${l}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:_,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:_}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:p,textAlign:"center"}}},[`> ${t}-item,
          > ${t}-item-group > ${t}-item-group-list > ${t}-item,
          > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
          > ${t}-submenu > ${t}-submenu-title`]:{display:"flex",alignItems:"center",justifyContent:"center",insetInlineStart:0,paddingInline:`calc(50% - ${we(e.calc(b).div(2).equal())} - ${we(d)})`,textOverflow:"clip",[`
            ${t}-submenu-arrow,
            ${t}-submenu-expand-icon
          `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:"hidden"},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:b,lineHeight:we(n),"+ span":{display:"inline-block",width:0,opacity:0,overflow:"hidden",marginInlineStart:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:{...Bs,paddingInline:h}}}]},Gv=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:s,iconCls:i,iconSize:l,iconMarginInlineEnd:u}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background-color ${r}`,`padding calc(${r} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${i}`]:{minWidth:l,fontSize:l,transition:[`font-size ${n} ${s}`,`margin ${r} ${o}`,`color ${r}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:{...wx()},[`&${t}-item-only-child`]:{[`> ${i}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Kv=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:s,menuArrowOffset:i}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:s,color:"currentcolor",transform:"translateY(-50%)",transition:["transform","opacity"].map(l=>`${l} ${r}`).join(",")},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(s).mul(.6).equal(),height:e.calc(s).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:["background-color","transform","top","color"].map(l=>`${l} ${r} ${n}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${we(e.calc(i).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${we(i)})`}}}}},cN=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:s,motionEaseInOut:i,paddingXS:l,padding:u,colorSplit:d,lineWidth:p,zIndexPopup:f,borderRadiusLG:m,subMenuItemBorderRadius:h,menuArrowSize:v,menuArrowOffset:g,lineType:b,groupTitleLineHeight:_,groupTitleFontSize:y}=e;return[{"":{[r]:{...Tp(),"&-hidden":{display:"none"}}},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:{...Vr(e),...Tp(),marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${we(l)} ${we(u)}`,fontSize:y,lineHeight:_,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:["border-color","background-color"].map(x=>`${x} ${o} ${i}`).join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o}`,`background-color ${o}`,`padding ${s}`].map(x=>`${x} ${i}`).join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(x=>`${x} ${o} ${i}`).join(",")},[`${r}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:b,borderWidth:0,borderTopWidth:p,marginBlock:p,padding:0,"&-dashed":{borderStyle:"dashed"}},...Gv(e),[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${we(e.calc(n).mul(2).equal())} ${we(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:{borderRadius:m,...Gv(e),...Kv(e),[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:h},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${i}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:"100% 0"},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:"100% 100%"},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:"0 100%"},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:"0 0"},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...Kv(e),[`&-inline-collapsed ${r}-submenu-arrow,
        &-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${we(g)})`},"&::after":{transform:`rotate(45deg) translateX(${we(e.calc(g).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${we(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${we(e.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${we(g)})`}}}},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},uN=e=>{const{colorPrimary:t,colorError:r,colorTextDisabled:n,colorErrorBg:o,colorText:s,colorTextDescription:i,colorBgContainer:l,colorFillAlter:u,colorFillContent:d,lineWidth:p,lineWidthBold:f,controlItemBgActive:m,colorBgTextHover:h,controlHeightLG:v,lineHeight:g,colorBgElevated:b,marginXXS:_,padding:y,fontSize:x,controlHeightSM:S,fontSizeLG:w,colorTextLightSolid:I,colorErrorHover:T}=e,R=e.activeBarWidth??0,P=e.activeBarBorderWidth??p,$=e.itemMarginInline??e.marginXXS,A=new lv(I).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:s,itemColor:s,colorItemTextHover:s,itemHoverColor:s,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:i,groupTitleColor:i,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:l,itemBg:l,colorItemBgHover:h,itemHoverBg:h,colorItemBgActive:d,itemActiveBg:m,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:R,colorActiveBarHeight:f,activeBarHeight:f,colorActiveBarBorderSize:p,activeBarBorderWidth:P,colorItemTextDisabled:n,itemDisabledColor:n,colorDangerItemText:r,dangerItemColor:r,colorDangerItemTextHover:r,dangerItemHoverColor:r,colorDangerItemTextSelected:r,dangerItemSelectedColor:r,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:$,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:g,collapsedWidth:v*2,popupBg:b,itemMarginBlock:_,itemPaddingInline:y,horizontalLineHeight:`${v*1.15}px`,iconSize:x,iconMarginInlineEnd:S-x,collapsedIconSize:w,groupTitleFontSize:x,darkItemDisabledColor:new lv(I).setA(.25).toRgbString(),darkItemColor:A,darkDangerItemColor:r,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:I,darkItemSelectedBg:t,darkDangerItemSelectedBg:r,darkItemHoverBg:"transparent",darkGroupTitleColor:A,darkItemHoverColor:I,darkDangerItemHoverColor:T,darkDangerItemSelectedColor:I,darkDangerItemActiveBg:r,itemWidth:R?`calc(100% + ${P}px)`:`calc(100% - ${$*2}px)`}},dN=(e,t=e,r=!0)=>rr("Menu",o=>{const{colorBgElevated:s,controlHeightLG:i,fontSize:l,darkItemColor:u,darkDangerItemColor:d,darkItemBg:p,darkSubMenuItemBg:f,darkItemSelectedColor:m,darkItemSelectedBg:h,darkDangerItemSelectedBg:v,darkItemHoverBg:g,darkGroupTitleColor:b,darkItemHoverColor:_,darkItemDisabledColor:y,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:w,popupBg:I,darkPopupBg:T}=o,R=o.calc(l).div(7).mul(5).equal(),P=tr(o,{menuArrowSize:R,menuHorizontalHeight:o.calc(i).mul(1.15).equal(),menuArrowOffset:o.calc(R).mul(.25).equal(),menuSubMenuBg:s,calc:o.calc,popupBg:I}),$=tr(P,{itemColor:u,itemHoverColor:_,groupTitleColor:b,itemSelectedColor:m,subMenuItemSelectedColor:m,itemBg:p,popupBg:T,subMenuItemBg:f,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:g,itemDisabledColor:y,dangerItemColor:d,dangerItemHoverColor:x,dangerItemSelectedColor:S,dangerItemActiveBg:w,dangerItemSelectedBg:v,menuSubMenuBg:f,horizontalItemSelectedColor:m,horizontalItemSelectedBg:h});return[cN(P),iN(P),lN(P),Wv(P,"light"),Wv($,"dark"),aN(P),cA(P),Hs(P,"slide-up"),Hs(P,"slide-down"),eh(P,"zoom-big")]},uN,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(e,t),L0=e=>{var g,b,_,y,x,S;const{popupClassName:t,icon:r,title:n,theme:o}=e,s=a.useContext(ec),{prefixCls:i,inlineCollapsed:l,theme:u,classNames:d,styles:p}=s,f=ai();let m;if(!r)m=l&&!f.length&&n&&typeof n=="string"?a.createElement("div",{className:`${i}-inline-collapsed-noicon`},n.charAt(0)):a.createElement("span",{className:`${i}-title-content`},n);else{const w=a.isValidElement(n)&&n.type==="span";m=a.createElement(a.Fragment,null,Pn(r,I=>({className:ae(I.className,`${i}-item-icon`,d==null?void 0:d.itemIcon),style:{...I.style,...p==null?void 0:p.itemIcon}})),w?n:a.createElement("span",{className:`${i}-title-content`},n))}const h=a.useMemo(()=>({...s,firstLevel:!1}),[s]),[v]=Gc("Menu");return a.createElement(ec.Provider,{value:h},a.createElement(nu,{...vr(e,["icon"]),title:m,classNames:{list:(g=d==null?void 0:d.subMenu)==null?void 0:g.list,listTitle:(b=d==null?void 0:d.subMenu)==null?void 0:b.itemTitle},styles:{list:(_=p==null?void 0:p.subMenu)==null?void 0:_.list,listTitle:(y=p==null?void 0:p.subMenu)==null?void 0:y.itemTitle},popupClassName:ae(i,t,(x=d==null?void 0:d.popup)==null?void 0:x.root,`${i}-${o||u}`),popupStyle:{zIndex:v,...e.popupStyle,...(S=p==null?void 0:p.popup)==null?void 0:S.root}}))};function gd(e){return e===null||e===!1}const pN={item:M0,submenu:L0,divider:k0},fN=a.forwardRef((e,t)=>{var re;const r=a.useContext(tc),n=r||{},{prefixCls:o,className:s,style:i,theme:l="light",expandIcon:u,_internalDisableMenuItemTitleTooltip:d,tooltip:p,inlineCollapsed:f,siderCollapsed:m,rootClassName:h,mode:v,selectable:g,onClick:b,overflowedIndicatorPopupClassName:_,classNames:y,styles:x,...S}=e,{menu:w}=a.useContext($r),{getPrefixCls:I,getPopupContainer:T,direction:R,className:P,style:$,classNames:A,styles:k}=Jr("menu"),D=I(),z=vr(S,["collapsedWidth"]);(re=n.validator)==null||re.call(n,{mode:v});const X=zr((...se)=>{var Z;b==null||b(...se),(Z=n.onClick)==null||Z.call(n)}),V=n.mode||v,Y=g??n.selectable,U=f??m,F={...e,mode:V,inlineCollapsed:U,selectable:Y,theme:l},[H,ee]=un([A,y],[k,x],{props:F},{popup:{_default:"root"},subMenu:{_default:"item"}}),O={horizontal:{motionName:`${D}-slide-up`},inline:uA(D),other:{motionName:`${D}-zoom-big`}},M=I("menu",o||n.prefixCls),G=si(M),[L,W]=dN(M,G,!r),B=ae(`${M}-${l}`,P,s),J=a.useMemo(()=>{var Z;if(typeof u=="function"||gd(u))return u||null;if(typeof n.expandIcon=="function"||gd(n.expandIcon))return n.expandIcon||null;if(typeof(w==null?void 0:w.expandIcon)=="function"||gd(w==null?void 0:w.expandIcon))return(w==null?void 0:w.expandIcon)||null;const se=u??(n==null?void 0:n.expandIcon)??(w==null?void 0:w.expandIcon);return Pn(se,{className:ae(`${M}-submenu-expand-icon`,a.isValidElement(se)?(Z=se.props)==null?void 0:Z.className:void 0)})},[u,n==null?void 0:n.expandIcon,w==null?void 0:w.expandIcon,M]),K=a.useMemo(()=>({prefixCls:M,inlineCollapsed:U||!1,direction:R,firstLevel:!0,theme:l,mode:V,disableMenuItemTitleTooltip:d,tooltip:p,classNames:H,styles:ee}),[M,U,R,d,l,V,H,ee,p]);return a.createElement(tc.Provider,{value:null},a.createElement(ec.Provider,{value:K},a.createElement(Sa,{getPopupContainer:T,overflowedIndicator:a.createElement(D0,null),overflowedIndicatorPopupClassName:ae(M,`${M}-${l}`,_),classNames:{list:H.list,listTitle:H.itemTitle},styles:{list:ee.list,listTitle:ee.itemTitle},mode:V,selectable:Y,onClick:X,...z,inlineCollapsed:U,style:{...ee.root,...$,...i},className:B,prefixCls:M,direction:R,defaultMotions:O,expandIcon:J,ref:t,rootClassName:ae(h,L,n.rootClassName,W,G,H.root),_internalComponents:pN})))}),Ca=a.forwardRef((e,t)=>{const r=a.useRef(null),n=a.useContext(N0);return a.useImperativeHandle(t,()=>({menu:r.current,focus:o=>{var s;(s=r.current)==null||s.focus(o)}})),a.createElement(fN,{ref:r,...e,...n})});Ca.Item=M0;Ca.SubMenu=L0;Ca.Divider=k0;Ca.ItemGroup=yh;const mN=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:o}=e,s=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${s}`]:{[`&${s}-danger:not(${s}-disabled)`]:{color:n,"&:hover":{color:o,backgroundColor:n}}}}}},hN=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:s,antCls:i,iconCls:l,motionDurationMid:u,paddingBlock:d,fontSize:p,dropdownEdgeChildPadding:f,colorTextDisabled:m,fontSizeIcon:h,controlPaddingHorizontal:v,colorBgElevated:g}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(s).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${i}-btn`]:{[`& > ${l}-down, & > ${i}-btn-icon > ${l}-down`]:{fontSize:h}},[`${t}-wrap`]:{position:"relative",[`${i}-btn > ${l}-down`]:{fontSize:h},[`${l}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:"none"},[`&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomLeft,
          &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomLeft,
          &${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottom,
          &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottom,
          &${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomRight,
          &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:xx},[`&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topLeft,
          &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topLeft,
          &${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-top,
          &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-top,
          &${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topRight,
          &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topRight`]:{animationName:yx},[`&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomLeft,
          &${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottom,
          &${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:_x},[`&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topLeft,
          &${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-top,
          &${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topRight`]:{animationName:bx}}},$x(e,g,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...Vr(e),[r]:{padding:f,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Ip(e),"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${we(d)} ${we(v)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:p,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:{display:"flex",margin:0,padding:`${we(d)} ${we(v)}`,color:e.colorText,fontWeight:"normal",fontSize:p,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Ip(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${we(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:h,fontStyle:"normal"}}},[`${r}-item-group-list`]:{margin:`0 ${we(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(v).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:m,backgroundColor:g,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[Hs(e,"slide-up"),Hs(e,"slide-down"),Ul(e,"move-up"),Ul(e,"move-down"),eh(e,"zoom-big")]]},gN=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...jx({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...Ax(e)}),vN=rr("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,s=tr(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[hN(s),mN(s)]},gN,{resetStyle:!1}),ou=e=>{const{menu:t,arrow:r,prefixCls:n,children:o,trigger:s,disabled:i,dropdownRender:l,popupRender:u,getPopupContainer:d,overlayClassName:p,rootClassName:f,overlayStyle:m,open:h,onOpenChange:v,mouseEnterDelay:g=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:_=!0,placement:y="",transitionName:x,classNames:S,styles:w,destroyPopupOnHide:I,destroyOnHidden:T}=e,{getPrefixCls:R,direction:P,getPopupContainer:$,className:A,style:k,classNames:D,styles:z}=Jr("dropdown"),X={...e,mouseEnterDelay:g,mouseLeaveDelay:b,autoAdjustOverflow:_},[V,Y]=un([D,S],[z,w],{props:X}),U={...k,...m,...Y.root},F=u||l;Dx();const H=a.useMemo(()=>{const Ye=R();return x!==void 0?x:y.includes("top")?`${Ye}-slide-down`:`${Ye}-slide-up`},[R,y,x]),ee=a.useMemo(()=>y?y.includes("Center")?y.slice(0,y.indexOf("Center")):y:P==="rtl"?"bottomRight":"bottomLeft",[y,P]),O=R("dropdown",n),M=si(O),[G,L]=vN(O,M),[,W]=Wc(),B=a.Children.only(dA(o)?a.createElement("span",null,o):o),J=Pn(B,{className:ae(`${O}-trigger`,{[`${O}-rtl`]:P==="rtl"},B.props.className),disabled:B.props.disabled??i}),K=i?[]:s,re=!!(K!=null&&K.includes("contextMenu")),[se,Z]=Rr(!1,h),ne=zr(Ye=>{v==null||v(Ye,{source:"trigger"}),Z(Ye)}),ie=ae(p,f,G,L,M,A,V.root,{[`${O}-rtl`]:P==="rtl"}),he=Ox({arrowPointAtCenter:zn(r)&&r.pointAtCenter,autoAdjustOverflow:_,offset:W.marginXXS,arrowWidth:r?W.sizePopupArrow:0,borderRadius:W.borderRadius}),me=zr(()=>{t!=null&&t.selectable&&(t!=null&&t.multiple)||(v==null||v(!1,{source:"menu"}),Z(!1))}),Pe=()=>{const Ye=vr(V,["root"]),pe=vr(Y,["root"]);let be;return t!=null&&t.items&&(be=a.createElement(Ca,{...t,classNames:{...Ye,subMenu:{...Ye}},styles:{...pe,subMenu:{...pe}}})),F&&(be=F(be)),be=a.Children.only(typeof be=="string"?a.createElement("span",null,be):be),a.createElement(sN,{prefixCls:`${O}-menu`,rootClassName:ae(L,M),expandIcon:a.createElement("span",{className:`${O}-menu-submenu-arrow`},P==="rtl"?a.createElement(Qp,{className:`${O}-menu-submenu-arrow-icon`}):a.createElement($p,{className:`${O}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:me,validator:({mode:j})=>{}},be)},[Se,Ce]=Gc("Dropdown",U.zIndex);let Ze=a.createElement(DO,{alignPoint:re,...vr(e,["rootClassName","onOpenChange"]),mouseEnterDelay:g,mouseLeaveDelay:b,visible:se,builtinPlacements:he,arrow:!!r,overlayClassName:ie,prefixCls:O,getPopupContainer:d||$,transitionName:H,trigger:K,overlay:Pe,placement:ee,onVisibleChange:ne,overlayStyle:{...U,zIndex:Se},autoDestroy:T??I},J);return Se&&(Ze=a.createElement(Nx.Provider,{value:Ce},Ze)),Ze},bN=Ix(ou,"align",void 0,"dropdown",e=>e),_N=e=>a.createElement(bN,{...e},a.createElement("span",null));ou._InternalPanelDoNotUseOrYouWillBeFired=_N;function su(e){return tr(e,{inputAffixPadding:e.paddingXXS})}const iu=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:o,controlHeightSM:s,controlHeightLG:i,fontSizeLG:l,lineHeightLG:u,paddingSM:d,controlPaddingHorizontalSM:p,controlPaddingHorizontal:f,colorFillAlter:m,colorPrimaryHover:h,colorPrimary:v,controlOutlineWidth:g,controlOutline:b,colorErrorOutline:_,colorWarningOutline:y,colorBgContainer:x,inputFontSize:S,inputFontSizeLG:w,inputFontSizeSM:I}=e,T=S||r,R=I||T,P=w||l,$=Math.round((t-T*n)/2*10)/10-o,A=Math.round((s-R*n)/2*10)/10-o,k=Math.ceil((i-P*u)/2*10)/10-o;return{paddingBlock:Math.max($,0),paddingBlockSM:Math.max(A,0),paddingBlockLG:Math.max(k,0),paddingInline:d-o,paddingInlineSM:p-o,paddingInlineLG:f-o,addonBg:m,activeBorderColor:v,hoverBorderColor:h,activeShadow:`0 0 0 ${g}px ${b}`,errorActiveShadow:`0 0 0 ${g}px ${_}`,warningActiveShadow:`0 0 0 ${g}px ${y}`,hoverBg:x,activeBg:x,inputFontSize:T,inputFontSizeLG:P,inputFontSizeSM:R}},yN=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),au=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...yN(tr(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),xh=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),Xv=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...xh(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),xN=(e,t)=>({"&-outlined":{...xh(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...au(e)},...Xv(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...Xv(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),Yv=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),wN=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...Yv(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...Yv(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...au(e)}}}}),EN=(e,t)=>{const{componentCls:r}=e;return{"&-borderless":{background:"transparent",border:"none",paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${r}-sm, &${r}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${r}-lg, &${r}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}},...t}}},z0=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(t==null?void 0:t.inputColor)??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),Jv=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...z0(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),SN=(e,t)=>({"&-filled":{...z0(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...au(e)},...Jv(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...Jv(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),Zv=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),CN=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...Zv(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...Zv(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),F0=(e,t)=>({background:e.colorBgContainer,borderWidth:`${we(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),Qv=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...F0(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),PN=(e,t)=>({"&-underlined":{...F0(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...Qv(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...Qv(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),RN=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),wh=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:o}=e;return{padding:`${we(t)} ${we(o)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},Eh=e=>({padding:`${we(e.paddingBlockSM)} ${we(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Sh=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${we(e.paddingBlock)} ${we(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...RN(e.colorTextPlaceholder),"&-lg":{...wh(e),...t.largeStyle},"&-sm":{...Eh(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),TN=e=>{const{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...wh(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...Eh(e)},[`&-lg ${r}-select-single`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${we(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${we(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${we(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${we(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${r}-cascader-picker`]:{margin:`-9px ${we(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...Tp(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
        & > ${t}-affix-wrapper,
        & > ${t}-number-affix-wrapper,
        & > ${r}-picker-range
      `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select,
      & > ${r}-select-auto-complete ${t},
      & > ${r}-cascader-picker ${t},
      & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
      & > ${r}-select:first-child,
      & > ${r}-select-auto-complete:first-child ${t},
      & > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
      & > ${r}-select:last-child,
      & > ${r}-cascader-picker:last-child ${t},
      & > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},IN=e=>{const{componentCls:t,controlHeightSM:r,lineWidth:n,calc:o}=e,i=o(r).sub(o(n).mul(2)).sub(16).div(2).equal();return{[t]:{...Vr(e),...Sh(e),...xN(e),...SN(e),...EN(e),...PN(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:i,paddingBottom:i}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},$N=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...Wl(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${we(e.inputAffixPadding)}`}}}},AN=e=>{const{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:o,colorIcon:s,colorIconHover:i,iconCls:l}=e,u=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[u]:{...Sh(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}},...$N(e),[`${l}${t}-password-icon`]:{color:s,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:i}}},[`${t}-underlined`]:{borderRadius:0},[d]:{[`${l}${t}-password-icon`]:{color:s,cursor:"not-allowed","&:hover":{color:s}}}}},jN=e=>{const{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:{...Vr(e),...TN(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}},...wN(e),...CN(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},ON=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},NN=rr(["Input","Shared"],e=>{const t=tr(e,su(e));return[IN(t),AN(t)]},iu,{resetFont:!1}),Qte=rr(["Input","Component"],e=>{const t=tr(e,su(e));return[jN(t),ON(t),Jm(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},iu,{resetFont:!1});function DN(e,t,r){var n=r||{},o=n.noTrailing,s=o===void 0?!1:o,i=n.noLeading,l=i===void 0?!1:i,u=n.debounceMode,d=u===void 0?void 0:u,p,f=!1,m=0;function h(){p&&clearTimeout(p)}function v(b){var _=b||{},y=_.upcomingOnly,x=y===void 0?!1:y;h(),f=!x}function g(){for(var b=arguments.length,_=new Array(b),y=0;y<b;y++)_[y]=arguments[y];var x=this,S=Date.now()-m;if(f)return;function w(){m=Date.now(),t.apply(x,_)}function I(){p=void 0}!l&&d&&!p&&w(),h(),d===void 0&&S>e?l?(m=Date.now(),s||(p=setTimeout(d?I:w,e))):w():s!==!0&&(p=setTimeout(d?I:w,d===void 0?e-S:e))}return g.cancel=v,g}function kN(e,t,r){var n={},o=n.atBegin,s=o===void 0?!1:o;return DN(e,t,{debounceMode:s!==!1})}const V0=a.createContext({});function eb(e){return e==="auto"?"1 1 auto":sa(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const MN=a.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n}=a.useContext($r),{gutter:o,wrap:s}=a.useContext(V0),{prefixCls:i,span:l,order:u,offset:d,push:p,pull:f,className:m,children:h,flex:v,style:g,...b}=e,_=r("col",i),y=r(),[x,S]=O1(_),[w]=_r(y,"col"),I={};let T={};pA.forEach($=>{let A={};const k=e[$];sa(k)?A.span=k:zn(k)&&(A=k||{}),delete b[$],T={...T,[`${_}-${$}-${A.span}`]:Nn(A.span),[`${_}-${$}-order-${A.order}`]:A.order||A.order===0,[`${_}-${$}-offset-${A.offset}`]:A.offset||A.offset===0,[`${_}-${$}-push-${A.push}`]:A.push||A.push===0,[`${_}-${$}-pull-${A.pull}`]:A.pull||A.pull===0,[`${_}-rtl`]:n==="rtl"},A.flex&&(T[`${_}-${$}-flex`]=!0,I[w(`${$}-flex`)]=eb(A.flex))});const R=ae(_,{[`${_}-${l}`]:l!==void 0,[`${_}-order-${u}`]:u,[`${_}-offset-${d}`]:d,[`${_}-push-${p}`]:p,[`${_}-pull-${f}`]:f},m,T,x,S),P={};if(o!=null&&o[0]){const $=sa(o[0])?`${o[0]/2}px`:`calc(${o[0]} / 2)`;P.paddingInline=$}return v&&(P.flex=eb(v),s===!1&&!P.minWidth&&(P.minWidth=0)),a.createElement("div",{...b,style:{...P,...g,...I},className:R,ref:t},h)});function LN(e,t){const r=[void 0,void 0],n=Array.isArray(e)?e:[e,void 0],o=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return n.forEach((s,i)=>{if(zn(s))for(let l=0;l<$o.length;l++){const u=$o[l];if(o[u]&&s[u]!==void 0){r[i]=s[u];break}}else r[i]=s}),r}const tb=(e,t)=>{const[r,n]=a.useState(()=>cv(e)?e:""),o=()=>{if(cv(e)&&n(e),!!zn(e))for(let s=0;s<$o.length;s++){const i=$o[s];if(!t||!t[i])continue;const l=e[i];if(l!==void 0){n(l);return}}};return a.useEffect(()=>{o()},[JSON.stringify(e),t]),r},zN=a.forwardRef((e,t)=>{const{prefixCls:r,justify:n,align:o,className:s,style:i,children:l,gutter:u=0,wrap:d,...p}=e,{getPrefixCls:f,direction:m}=a.useContext($r),h=mh(!0,null),v=tb(o,h),g=tb(n,h),b=f("row",r),[_,y]=A1(b),x=LN(u,h),S=ae(b,{[`${b}-no-wrap`]:d===!1,[`${b}-${g}`]:g,[`${b}-${v}`]:v,[`${b}-rtl`]:m==="rtl"},s,_,y),w={};if(x!=null&&x[0]){const P=sa(x[0])?`${x[0]/-2}px`:`calc(${x[0]} / -2)`;w.marginInline=P}const[I,T]=x;w.rowGap=T;const R=a.useMemo(()=>({gutter:[I,T],wrap:d}),[I,T,d]);return a.createElement(V0.Provider,{value:R},a.createElement("div",{...p,className:S,style:{...w,...i},ref:t},l))}),FN=e=>{const{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:o,paddingXS:s,fontSizeLG:i,fontSizeSM:l,borderRadiusLG:u,borderRadiusSM:d,colorBgContainerDisabled:p,lineWidth:f,antCls:m}=e,[h,v]=_r(m,"space");return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:n,margin:0,borderWidth:f,borderStyle:"solid",borderRadius:r,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:i,borderRadius:u},"&-small":{paddingInline:s,borderRadius:d,fontSize:l},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[h("addon-border-color")]:o,[h("addon-background")]:p,[h("addon-border-color-outlined")]:o,[h("addon-background-filled")]:p,borderColor:v("addon-border-color"),background:v("addon-background"),"&-variant-outlined":{[h("addon-border-color")]:v("addon-border-color-outlined")},"&-variant-filled":{[h("addon-border-color")]:"transparent",[h("addon-background")]:v("addon-background-filled"),[`&${t}-disabled`]:{[h("addon-border-color")]:o,[h("addon-background")]:p}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[h("addon-border-color-outlined")]:e.colorError,[h("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[h("addon-border-color-outlined")]:e.colorWarning,[h("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},VN=rr(["Space","Addon"],e=>[FN(e),Jm(e,{focus:!1})]),BN=N.forwardRef((e,t)=>{const{className:r,children:n,style:o,prefixCls:s,variant:i="outlined",disabled:l,status:u,...d}=e,{getPrefixCls:p,direction:f}=N.useContext($r),m=p("space-addon",s),[h,v]=VN(m),{compactItemClassnames:g,compactSize:b}=qc(m,f),_=Qm(m,u),y=ae(m,h,g,v,`${m}-variant-${i}`,_,{[`${m}-${b}`]:b,[`${m}-disabled`]:l},r);return N.createElement("div",{ref:t,className:y,style:o,...d},n)});function HN(e){return!!(e.addonBefore||e.addonAfter)}function UN(e){return!!(e.prefix||e.suffix||e.allowClear)}function rb(e,t,r){const n=t.cloneNode(!0),o=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=(...s)=>{t.setSelectionRange(...s)},o}function nb(e,t,r,n){if(!r)return;let o=t;if(t.type==="click"){o=rb(t,e,""),r(o);return}if(e.type!=="file"&&n!==void 0){o=rb(t,e,n),r(o);return}r(o)}function df(){return df=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},df.apply(this,arguments)}const WN=N.forwardRef((e,t)=>{var F,H,ee;const{inputElement:r,children:n,prefixCls:o,prefix:s,suffix:i,addonBefore:l,addonAfter:u,className:d,style:p,disabled:f,readOnly:m,focused:h,triggerFocus:v,allowClear:g,value:b,handleReset:_,hidden:y,classes:x,classNames:S,dataAttrs:w,styles:I,components:T,onClear:R}=e,P=n??r,$=(T==null?void 0:T.affixWrapper)||"span",A=(T==null?void 0:T.groupWrapper)||"span",k=(T==null?void 0:T.wrapper)||"span",D=(T==null?void 0:T.groupAddon)||"span",z=a.useRef(null),X=O=>{var M;(M=z.current)!=null&&M.contains(O.target)&&(v==null||v())},V=UN(e);let Y=a.cloneElement(P,{value:b,className:ae((F=P.props)==null?void 0:F.className,!V&&(S==null?void 0:S.variant))||null});const U=a.useRef(null);if(N.useImperativeHandle(t,()=>({nativeElement:U.current||z.current})),V){let O=null;if(g){const W=!f&&!m&&b,B=`${o}-clear-icon`,J=typeof g=="object"&&(g!=null&&g.clearIcon)?g.clearIcon:"вњ–";O=N.createElement("button",{type:"button",tabIndex:-1,onClick:K=>{_==null||_(K),R==null||R()},onMouseDown:K=>K.preventDefault(),className:ae(B,{[`${B}-hidden`]:!W,[`${B}-has-suffix`]:!!i})},J)}const M=`${o}-affix-wrapper`,G=ae(M,{[`${o}-disabled`]:f,[`${M}-disabled`]:f,[`${M}-focused`]:h,[`${M}-readonly`]:m,[`${M}-input-with-clear-btn`]:i&&g&&b},x==null?void 0:x.affixWrapper,S==null?void 0:S.affixWrapper,S==null?void 0:S.variant),L=(i||g)&&N.createElement("span",{className:ae(`${o}-suffix`,S==null?void 0:S.suffix),style:I==null?void 0:I.suffix},O,i);Y=N.createElement($,df({className:G,style:I==null?void 0:I.affixWrapper,onClick:X},w==null?void 0:w.affixWrapper,{ref:z}),s&&N.createElement("span",{className:ae(`${o}-prefix`,S==null?void 0:S.prefix),style:I==null?void 0:I.prefix},s),Y,L)}if(HN(e)){const O=`${o}-group`,M=`${O}-addon`,G=`${O}-wrapper`,L=ae(`${o}-wrapper`,O,x==null?void 0:x.wrapper,S==null?void 0:S.wrapper),W=ae(G,{[`${G}-disabled`]:f},x==null?void 0:x.group,S==null?void 0:S.groupWrapper);Y=N.createElement(A,{className:W,ref:U},N.createElement(k,{className:L},l&&N.createElement(D,{className:M},l),Y,u&&N.createElement(D,{className:M},u)))}return N.cloneElement(Y,{className:ae((H=Y.props)==null?void 0:H.className,d)||null,style:{...(ee=Y.props)==null?void 0:ee.style,...p},hidden:y})});function qN(e,t){return a.useMemo(()=>{let r={};t&&(r.show=typeof t=="object"&&t.formatter?t.formatter:!!t),r={...r,...e};const{show:n,...o}=r;return{...o,show:!!n,showFormatter:typeof n=="function"?n:void 0,strategy:o.strategy||(s=>s.length)}},[e,t])}const B0=N.createContext({latestIndex:0}),GN=B0.Provider,KN=e=>{const{className:t,prefix:r,index:n,children:o,separator:s,style:i,classNames:l,styles:u}=e,{latestIndex:d}=a.useContext(B0);return Nn(o)?a.createElement(a.Fragment,null,a.createElement("div",{className:t,style:i},o),n<d&&s&&a.createElement("span",{className:ae(`${r}-item-separator`,l==null?void 0:l.separator),style:u==null?void 0:u.separator},s)):null},XN=e=>{const{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},YN=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},JN=rr("Space",e=>{const t=tr(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[XN(t),YN(t)]},()=>({}),{resetStyle:!1}),ZN=a.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n,size:o,className:s,style:i,classNames:l,styles:u}=Jr("space"),{size:d=o??"small",align:p,className:f,rootClassName:m,children:h,direction:v,orientation:g,prefixCls:b,split:_,separator:y,style:x,vertical:S,wrap:w=!1,classNames:I,styles:T,...R}=e,[P,$]=Array.isArray(d)?d:[d,d],A=uv($),k=uv(P),D=dv($),z=dv(P),X=Ho(h,{keepEmpty:!0}),[V,Y]=fA(g,S,v),U=p===void 0&&!Y?"center":p,F=y??_,H=r("space",b),[ee,O]=JN(H),M={...e,size:d,orientation:V,align:U},[G,L]=un([l,I],[u,T],{props:M}),W=ae(H,s,ee,`${H}-${V}`,{[`${H}-rtl`]:n==="rtl",[`${H}-align-${U}`]:U,[`${H}-gap-row-${$}`]:A,[`${H}-gap-col-${P}`]:k},f,m,O,G.root),B=ae(`${H}-item`,G.item),J=X.map((se,Z)=>{const ne=(se==null?void 0:se.key)||`${B}-${Z}`;return a.createElement(KN,{prefix:H,classNames:G,styles:L,className:B,key:ne,index:Z,separator:F,style:L.item},se)}),K=a.useMemo(()=>({latestIndex:X.reduce((Z,ne,ie)=>Nn(ne)?ie:Z,0)}),[X]);if(X.length===0)return null;const re={};return w&&(re.flexWrap="wrap"),!k&&z&&(re.columnGap=P),!A&&D&&(re.rowGap=$),a.createElement("div",{ref:t,className:W,style:{...re,...L.root,...i,...x},...R},a.createElement(GN,{value:K},J))}),lu=ZN;lu.Compact=mA;lu.Addon=BN;const H0=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=a.useContext($r),{prefixCls:o,type:s="default",danger:i,disabled:l,loading:u,onClick:d,htmlType:p,children:f,className:m,menu:h,arrow:v,autoFocus:g,trigger:b,align:_,open:y,onOpenChange:x,placement:S,getPopupContainer:w,href:I,icon:T=a.createElement(D0,null),title:R,buttonsRender:P=re=>re,mouseEnterDelay:$,mouseLeaveDelay:A,overlayClassName:k,overlayStyle:D,destroyOnHidden:z,destroyPopupOnHide:X,dropdownRender:V,popupRender:Y,...U}=e,F=r("dropdown",o),H=`${F}-button`,O={menu:h,arrow:v,autoFocus:g,align:_,disabled:l,trigger:l?[]:b,onOpenChange:x,getPopupContainer:w||t,mouseEnterDelay:$,mouseLeaveDelay:A,classNames:{root:k},styles:{root:D},destroyOnHidden:z,popupRender:Y||V},{compactSize:M,compactItemClassnames:G}=qc(F,n),L=ae(H,G,m);"destroyPopupOnHide"in e&&(O.destroyPopupOnHide=X),"open"in e&&(O.open=y),"placement"in e?O.placement=S:O.placement=n==="rtl"?"bottomLeft":"bottomRight";const W=a.createElement(ql,{type:s,danger:i,disabled:l,loading:u,onClick:d,htmlType:p,href:I,title:R},f),B=a.createElement(ql,{type:s,danger:i,icon:T}),[J,K]=P([W,B]);return a.createElement(lu.Compact,{className:L,size:M,block:!0,...U},J,a.createElement(ou,{...O},K))};H0.__ANT_BUTTON=!0;const U0=ou;U0.Button=H0;const QN=`
  min-height:0 !important;
  max-height:none !important;
  height:0 !important;
  visibility:hidden !important;
  overflow:hidden !important;
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
  pointer-events: none !important;
`,eD=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],vd={};let Or;function tD(e,t=!1){const r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&vd[r])return vd[r];const n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),s=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),i=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),u={sizingStyle:eD.map(d=>`${d}:${n.getPropertyValue(d)}`).join(";"),paddingSize:s,borderSize:i,boxSizing:o};return t&&r&&(vd[r]=u),u}function rD(e,t=!1,r=null,n=null){Or||(Or=document.createElement("textarea"),Or.setAttribute("tab-index","-1"),Or.setAttribute("aria-hidden","true"),Or.setAttribute("name","hiddenTextarea"),document.body.appendChild(Or)),e.getAttribute("wrap")?Or.setAttribute("wrap",e.getAttribute("wrap")):Or.removeAttribute("wrap");const{paddingSize:o,borderSize:s,boxSizing:i,sizingStyle:l}=tD(e,t);Or.setAttribute("style",`${l};${QN}`),Or.value=e.value||e.placeholder||"";let u,d,p,f=Or.scrollHeight;if(i==="border-box"?f+=s:i==="content-box"&&(f-=o),r!==null||n!==null){Or.value=" ";const h=Or.scrollHeight-o;r!==null&&(u=h*r,i==="border-box"&&(u=u+o+s),f=Math.max(u,f)),n!==null&&(d=h*n,i==="border-box"&&(d=d+o+s),p=f>d?"":"hidden",f=Math.min(d,f))}const m={height:f,overflowY:p,resize:"none"};return u&&(m.minHeight=u),d&&(m.maxHeight=d),m}function pf(){return pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pf.apply(this,arguments)}const bd=0,_d=1,yd=2,nD=a.forwardRef((e,t)=>{const{prefixCls:r,defaultValue:n,value:o,autoSize:s,onResize:i,className:l,style:u,disabled:d,onChange:p,onInternalAutoSize:f,...m}=e,[h,v]=Rr(n,o),g=h??"",b=X=>{v(X.target.value),p==null||p(X)},_=a.useRef();a.useImperativeHandle(t,()=>({textArea:_.current}));const[y,x]=a.useMemo(()=>s&&typeof s=="object"?[s.minRows,s.maxRows]:[],[s]),S=!!s,[w,I]=a.useState(yd),[T,R]=a.useState(),P=()=>{I(bd)};er(()=>{S&&P()},[o,y,x,S]),er(()=>{if(w===bd)I(_d);else if(w===_d){const X=rD(_.current,!1,y,x);I(yd),R(X)}},[w]);const $=a.useRef(),A=()=>{Wt.cancel($.current)},k=X=>{w===yd&&(i==null||i(X),s&&(A(),$.current=Wt(()=>{P()})))};a.useEffect(()=>A,[]);const z={...u,...S?T:null};return(w===bd||w===_d)&&(z.overflowY="hidden",z.overflowX="hidden"),a.createElement(oi,{onResize:k,disabled:!(s||i)},a.createElement("textarea",pf({},m,{ref:_,style:z,className:ae(r,l,{[`${r}-disabled`]:d}),disabled:d,value:g,onChange:b})))});function ff(){return ff=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ff.apply(this,arguments)}const oD=N.forwardRef(({defaultValue:e,value:t,onFocus:r,onBlur:n,onChange:o,allowClear:s,maxLength:i,onCompositionStart:l,onCompositionEnd:u,suffix:d,prefixCls:p="rc-textarea",showCount:f,count:m,className:h,style:v,disabled:g,hidden:b,classNames:_,styles:y,onResize:x,onClear:S,onPressEnter:w,readOnly:I,autoSize:T,onKeyDown:R,...P},$)=>{const[A,k]=Rr(e,t),D=A==null?"":String(A),[z,X]=N.useState(!1),V=N.useRef(!1),[Y,U]=N.useState(null),F=a.useRef(null),H=a.useRef(null),ee=()=>{var pe;return(pe=H.current)==null?void 0:pe.textArea},O=()=>{ee().focus()};a.useImperativeHandle($,()=>{var pe;return{resizableTextArea:H.current,focus:O,blur:()=>{ee().blur()},nativeElement:((pe=F.current)==null?void 0:pe.nativeElement)||ee()}}),a.useEffect(()=>{X(pe=>!g&&pe)},[g]);const[M,G]=N.useState(null);N.useEffect(()=>{M&&ee().setSelectionRange(...M)},[M]);const L=qN(m,f),W=L.max??i,B=Number(W)>0,J=L.strategy(D),K=!!W&&J>W,re=(pe,be)=>{let j=be;!V.current&&L.exceedFormatter&&L.max&&L.strategy(be)>L.max&&(j=L.exceedFormatter(be,{max:L.max}),be!==j&&G([ee().selectionStart||0,ee().selectionEnd||0])),k(j),nb(pe.currentTarget,pe,o,j)},se=pe=>{V.current=!0,l==null||l(pe)},Z=pe=>{V.current=!1,re(pe,pe.currentTarget.value),u==null||u(pe)},ne=pe=>{re(pe,pe.target.value)},ie=pe=>{pe.key==="Enter"&&w&&!pe.nativeEvent.isComposing&&w(pe),R==null||R(pe)},he=pe=>{X(!0),r==null||r(pe)},me=pe=>{X(!1),n==null||n(pe)},Pe=pe=>{k(""),O(),nb(ee(),pe,o)};let Se=d,Ce;L.show&&(L.showFormatter?Ce=L.showFormatter({value:D,count:J,maxLength:W}):Ce=`${J}${B?` / ${W}`:""}`,Se=N.createElement(N.Fragment,null,Se,N.createElement("span",{className:ae(`${p}-data-count`,_==null?void 0:_.count),style:y==null?void 0:y.count},Ce)));const Ze=pe=>{var be;x==null||x(pe),(be=ee())!=null&&be.style.height&&U(!0)},Ye=!T&&!f&&!s;return N.createElement(WN,{ref:F,value:D,allowClear:s,handleReset:Pe,suffix:Se,prefixCls:p,classNames:{..._,affixWrapper:ae(_==null?void 0:_.affixWrapper,{[`${p}-show-count`]:f,[`${p}-textarea-allow-clear`]:s})},disabled:g,focused:z,className:ae(h,K&&`${p}-out-of-range`),style:{...v,...Y&&!Ye?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":typeof Ce=="string"?Ce:void 0}},hidden:b,readOnly:I,onClear:S},N.createElement(nD,ff({},P,{autoSize:T,maxLength:i,onKeyDown:ie,onChange:ne,onFocus:he,onBlur:me,onCompositionStart:se,onCompositionEnd:Z,className:ae(_==null?void 0:_.textarea),style:{resize:v==null?void 0:v.resize,...y==null?void 0:y.textarea},disabled:g,prefixCls:p,onResize:Ze,ref:H,readOnly:I})))}),sD=e=>{const{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
        &-allow-clear > ${t},
        &-affix-wrapper${n}-has-feedback ${t}
      `]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},iD=rr(["Input","TextArea"],e=>{const t=tr(e,su(e));return sD(t)},iu,{resetFont:!1}),aD=a.forwardRef((e,t)=>{var he;const{prefixCls:r,bordered:n=!0,size:o,disabled:s,status:i,allowClear:l,classNames:u,rootClassName:d,className:p,style:f,styles:m,variant:h,showCount:v,onMouseDown:g,onResize:b,..._}=e,{getPrefixCls:y,direction:x,allowClear:S,autoComplete:w,className:I,style:T,classNames:R,styles:P}=Jr("textArea"),$=a.useContext(Px),A=s??$,{status:k,hasFeedback:D,feedbackIcon:z}=a.useContext(Sx),X=Tx(k,i),[V,Y]=un([R,u],[P,m],{props:e}),U=a.useRef(null);a.useImperativeHandle(t,()=>{var me,Pe;return{resizableTextArea:(me=U.current)==null?void 0:me.resizableTextArea,focus:Se=>{var Ce,Ze;y1((Ze=(Ce=U.current)==null?void 0:Ce.resizableTextArea)==null?void 0:Ze.textArea,Se)},blur:()=>{var Se;return(Se=U.current)==null?void 0:Se.blur()},nativeElement:((Pe=U.current)==null?void 0:Pe.nativeElement)||null}});const F=y("input",r),H=si(F),[ee,O]=NN(F,d);iD(F,H);const{compactSize:M,compactItemClassnames:G}=qc(F,x),L=ya(me=>o??M??me),[W,B]=m0("textArea",h,n),J=hA(l??S),[K,re]=a.useState(!1),[se,Z]=a.useState(!1),ne=me=>{re(!0),g==null||g(me);const Pe=()=>{re(!1),document.removeEventListener("mouseup",Pe)};document.addEventListener("mouseup",Pe)},ie=me=>{var Pe,Se;if(b==null||b(me),K&&typeof getComputedStyle=="function"){const Ce=(Se=(Pe=U.current)==null?void 0:Pe.nativeElement)==null?void 0:Se.querySelector("textarea");Ce&&getComputedStyle(Ce).resize==="both"&&Z(!0)}};return a.createElement(oD,{autoComplete:w,..._,style:{...Y.root,...T,...f},styles:Y,disabled:A,allowClear:J,className:ae(O,H,p,d,G,I,V.root,{[`${F}-textarea-affix-wrapper-resize-dirty`]:se}),classNames:{...V,textarea:ae({[`${F}-sm`]:L==="small",[`${F}-lg`]:L==="large"},ee,V.textarea,K&&`${F}-mouse-active`),variant:ae({[`${F}-${W}`]:B},Qm(F,X)),affixWrapper:ae(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:x==="rtl",[`${F}-affix-wrapper-sm`]:L==="small",[`${F}-affix-wrapper-lg`]:L==="large",[`${F}-textarea-show-count`]:v||((he=e.count)==null?void 0:he.show)},ee)},prefixCls:F,suffix:D&&a.createElement("span",{className:`${F}-textarea-suffix`},z),showCount:v,ref:U,onResize:ie,onMouseDown:ne})});var lD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mf.apply(this,arguments)}const cD=(e,t)=>a.createElement(Cn,mf({},e,{ref:t,icon:lD})),ob=a.forwardRef(cD);var uD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};function hf(){return hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hf.apply(this,arguments)}const dD=(e,t)=>a.createElement(Cn,hf({},e,{ref:t,icon:uD})),sb=a.forwardRef(dD),pD={items_per_page:"жќЎ/йЎµ",jump_to:"и·іи‡і",jump_to_confirm:"зЎ®е®љ",page:"йЎµ",prev_page:"дёЉдёЂйЎµ",next_page:"дё‹дёЂйЎµ",prev_5:"еђ‘е‰Ќ 5 йЎµ",next_5:"еђ‘еђЋ 5 йЎµ",prev_3:"еђ‘е‰Ќ 3 йЎµ",next_3:"еђ‘еђЋ 3 йЎµ",page_size:"йЎµз Ѓ"},fD=[10,20,50,100],mD=e=>{const{pageSizeOptions:t=fD,locale:r,changeSize:n,pageSize:o,goButton:s,quickGo:i,rootPrefixCls:l,disabled:u,buildOptionText:d,showSizeChanger:p,sizeChangerRender:f}=e,[m,h]=N.useState(""),v=N.useMemo(()=>!m||Number.isNaN(m)?void 0:Number(m),[m]),g=typeof d=="function"?d:R=>`${R} ${r.items_per_page}`,b=R=>{const P=R.target.value;/^\d*$/.test(P)&&h(P)},_=R=>{s||m===""||(h(""),!(R.relatedTarget&&(R.relatedTarget.className.includes(`${l}-item-link`)||R.relatedTarget.className.includes(`${l}-item`)))&&(i==null||i(v)))},y=R=>{m!==""&&(R.keyCode===Xe.ENTER||R.type==="click")&&(h(""),i==null||i(v))},x=()=>t.some(R=>R.toString()===o.toString())?t:t.concat([o]).sort((R,P)=>{const $=Number.isNaN(Number(R))?0:Number(R),A=Number.isNaN(Number(P))?0:Number(P);return $-A}),S=`${l}-options`;if(!p&&!i)return null;let w=null,I=null,T=null;return p&&f&&(w=f({disabled:u,size:o,onSizeChange:R=>{n==null||n(Number(R))},"aria-label":r.page_size,className:`${S}-size-changer`,options:x().map(R=>({label:g(R),value:R}))})),i&&(s&&(T=typeof s=="boolean"?N.createElement("button",{type:"button",onClick:y,onKeyUp:y,disabled:u,className:`${S}-quick-jumper-button`},r.jump_to_confirm):N.createElement("span",{onClick:y,onKeyUp:y},s)),I=N.createElement("div",{className:`${S}-quick-jumper`},r.jump_to,N.createElement("input",{disabled:u,type:"text",value:m,onChange:b,onKeyUp:y,onBlur:_,"aria-label":r.page}),r.page,T)),N.createElement("li",{className:S},w,I)},xi=e=>{const{rootPrefixCls:t,page:r,active:n,className:o,style:s,showTitle:i,onClick:l,onKeyPress:u,itemRender:d}=e,p=`${t}-item`,f=ae(p,`${p}-${r}`,{[`${p}-active`]:n,[`${p}-disabled`]:!r},o),m=()=>{l(r)},h=g=>{u(g,l,r)},v=d(r,"page",N.createElement("a",{rel:"nofollow"},r));return v?N.createElement("li",{title:i?String(r):null,className:f,style:s,onClick:m,onKeyDown:h,tabIndex:0},v):null};function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yn.apply(this,arguments)}const hD=(e,t,r)=>r;function ib(){}function ab(e){const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function bo(e,t,r){const n=typeof e>"u"?t:e;return Math.floor((r-1)/n)+1}const gD=e=>{const{prefixCls:t="rc-pagination",selectPrefixCls:r="rc-select",className:n,classNames:o,styles:s,current:i,defaultCurrent:l=1,total:u=0,pageSize:d,defaultPageSize:p=10,onChange:f=ib,hideOnSinglePage:m,align:h,showPrevNextJumpers:v=!0,showQuickJumper:g,showLessItems:b,showTitle:_=!0,onShowSizeChange:y=ib,locale:x=pD,style:S,totalBoundaryShowSizeChanger:w=50,disabled:I,simple:T,showTotal:R,showSizeChanger:P=u>w,sizeChangerRender:$,pageSizeOptions:A,itemRender:k=hD,jumpPrevIcon:D,jumpNextIcon:z,prevIcon:X,nextIcon:V}=e,Y=N.useRef(null),[U,F]=Rr(p,d),[H,ee]=Rr(l,i),O=Math.max(1,Math.min(H,bo(void 0,U,u))),[M,G]=N.useState(O);a.useEffect(()=>{G(O)},[O]);const L=Math.max(1,O-(b?3:5)),W=Math.min(bo(void 0,U,u),O+(b?3:5));function B(_e,Qe){let ge=_e||N.createElement("button",{type:"button","aria-label":Qe,className:`${t}-item-link`});return typeof _e=="function"&&(ge=N.createElement(_e,e)),ge}function J(_e){const Qe=_e.target.value,ge=bo(void 0,U,u);let Te;return Qe===""?Te=Qe:Number.isNaN(Number(Qe))?Te=M:Qe>=ge?Te=ge:Te=Number(Qe),Te}function K(_e){return ab(_e)&&_e!==O&&ab(u)&&u>0}const re=u>U?g:!1;function se(_e){(_e.keyCode===Xe.UP||_e.keyCode===Xe.DOWN)&&_e.preventDefault()}function Z(_e){const Qe=J(_e);switch(Qe!==M&&G(Qe),_e.keyCode){case Xe.ENTER:he(Qe);break;case Xe.UP:he(Qe-1);break;case Xe.DOWN:he(Qe+1);break}}function ne(_e){he(J(_e))}function ie(_e){const Qe=bo(_e,U,u),ge=O>Qe&&Qe!==0?Qe:O;F(_e),G(ge),y==null||y(O,_e),ee(ge),f==null||f(ge,_e)}function he(_e){if(K(_e)&&!I){const Qe=bo(void 0,U,u);let ge=_e;return _e>Qe?ge=Qe:_e<1&&(ge=1),ge!==M&&G(ge),ee(ge),f==null||f(ge,U),ge}return O}const me=O>1,Pe=O<bo(void 0,U,u);function Se(){me&&he(O-1)}function Ce(){Pe&&he(O+1)}function Ze(){he(L)}function Ye(){he(W)}function pe(_e,Qe,...ge){(_e.key==="Enter"||_e.charCode===Xe.ENTER||_e.keyCode===Xe.ENTER)&&Qe(...ge)}function be(_e){pe(_e,Se)}function j(_e){pe(_e,Ce)}function q(_e){pe(_e,Ze)}function Q(_e){pe(_e,Ye)}function le(_e){const Qe=k(_e,"prev",B(X,"prev page"));return N.isValidElement(Qe)?N.cloneElement(Qe,{disabled:!me}):Qe}function de(_e){const Qe=k(_e,"next",B(V,"next page"));return N.isValidElement(Qe)?N.cloneElement(Qe,{disabled:!Pe}):Qe}function ce(_e){(_e.type==="click"||_e.keyCode===Xe.ENTER)&&he(M)}let fe=null;const ue=oa(e,{aria:!0,data:!0}),ye=R&&N.createElement("li",{className:`${t}-total-text`},R(u,[u===0?0:(O-1)*U+1,O*U>u?u:O*U]));let Be=null;const Ae=bo(void 0,U,u);if(m&&u<=U)return null;const Ee=[],lt={rootPrefixCls:t,onClick:he,onKeyPress:pe,showTitle:_,itemRender:k,page:-1,className:o==null?void 0:o.item,style:s==null?void 0:s.item},ht=O-1>0?O-1:0,dt=O+1<Ae?O+1:Ae,mt=g&&g.goButton,ft=typeof T=="object"?T.readOnly:!T;let vt=mt,ze=null;T&&(mt&&(typeof mt=="boolean"?vt=N.createElement("button",{type:"button",onClick:ce,onKeyUp:ce},x.jump_to_confirm):vt=N.createElement("span",{onClick:ce,onKeyUp:ce},mt),vt=N.createElement("li",{title:_?`${x.jump_to}${O}/${Ae}`:null,className:`${t}-simple-pager`},vt)),ze=N.createElement("li",{title:_?`${O}/${Ae}`:null,className:ae(`${t}-simple-pager`,o==null?void 0:o.item),style:s==null?void 0:s.item},ft?M:N.createElement("input",{type:"text","aria-label":x.jump_to,value:M,disabled:I,onKeyDown:se,onKeyUp:Z,onChange:Z,onBlur:ne,size:3}),N.createElement("span",{className:`${t}-slash`},"/"),Ae));const We=b?1:2;if(Ae<=3+We*2){Ae||Ee.push(N.createElement(xi,Yn({},lt,{key:"noPager",page:1,className:`${t}-item-disabled`})));for(let _e=1;_e<=Ae;_e+=1)Ee.push(N.createElement(xi,Yn({},lt,{key:_e,page:_e,active:O===_e})))}else{const _e=b?x.prev_3:x.prev_5,Qe=b?x.next_3:x.next_5,ge=k(L,"jump-prev",B(D,"prev page")),Te=k(W,"jump-next",B(z,"next page"));v&&(fe=ge?N.createElement("li",{title:_?_e:null,key:"prev",onClick:Ze,tabIndex:0,onKeyDown:q,className:ae(`${t}-jump-prev`,{[`${t}-jump-prev-custom-icon`]:!!D})},ge):null,Be=Te?N.createElement("li",{title:_?Qe:null,key:"next",onClick:Ye,tabIndex:0,onKeyDown:Q,className:ae(`${t}-jump-next`,{[`${t}-jump-next-custom-icon`]:!!z})},Te):null);let et=Math.max(1,O-We),xe=Math.min(O+We,Ae);O-1<=We&&(xe=1+We*2),Ae-O<=We&&(et=Ae-We*2);for(let $e=et;$e<=xe;$e+=1)Ee.push(N.createElement(xi,Yn({},lt,{key:$e,page:$e,active:O===$e})));if(O-1>=We*2&&O!==3&&(Ee[0]=N.cloneElement(Ee[0],{className:ae(`${t}-item-after-jump-prev`,Ee[0].props.className)}),Ee.unshift(fe)),Ae-O>=We*2&&O!==Ae-2){const $e=Ee[Ee.length-1];Ee[Ee.length-1]=N.cloneElement($e,{className:ae(`${t}-item-before-jump-next`,$e.props.className)}),Ee.push(Be)}et!==1&&Ee.unshift(N.createElement(xi,Yn({},lt,{key:1,page:1}))),xe!==Ae&&Ee.push(N.createElement(xi,Yn({},lt,{key:Ae,page:Ae})))}let ke=le(ht);if(ke){const _e=!me||!Ae;ke=N.createElement("li",{title:_?x.prev_page:null,onClick:Se,tabIndex:_e?null:0,onKeyDown:be,className:ae(`${t}-prev`,o==null?void 0:o.item,{[`${t}-disabled`]:_e}),style:s==null?void 0:s.item,"aria-disabled":_e},ke)}let nt=de(dt);if(nt){let _e,Qe;T?(_e=!Pe,Qe=me?0:null):(_e=!Pe||!Ae,Qe=_e?null:0),nt=N.createElement("li",{title:_?x.next_page:null,onClick:Ce,tabIndex:Qe,onKeyDown:j,className:ae(`${t}-next`,o==null?void 0:o.item,{[`${t}-disabled`]:_e}),style:s==null?void 0:s.item,"aria-disabled":_e},nt)}const ut=ae(t,n,{[`${t}-start`]:h==="start",[`${t}-center`]:h==="center",[`${t}-end`]:h==="end",[`${t}-simple`]:T,[`${t}-disabled`]:I});return N.createElement("ul",Yn({className:ut,style:S,ref:Y},ue),ye,ke,T?ze:Ee,nt,N.createElement(mD,{locale:x,rootPrefixCls:t,disabled:I,selectPrefixCls:r,changeSize:ie,pageSize:U,pageSizeOptions:A,quickGo:re?he:null,goButton:vt,showSizeChanger:P,sizeChangerRender:$}))},vD=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},bD=e=>{const{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...Eh(e),width:e.paginationMiniQuickJumperInputWidth}}}}},_D=e=>{const{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...wh(e)}}}}},yD=e=>{const{componentCls:t,antCls:r}=e,[,n]=_r(r,"pagination");return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:n("item-size-actual"),lineHeight:n("item-size-actual"),verticalAlign:"top",[`${t}-item-link`]:{height:n("item-size-actual"),backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:n("item-size-actual"),lineHeight:n("item-size-actual")}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:n("item-size-actual"),marginInlineEnd:n("item-spacing-actual"),input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${we(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${we(e.inputOutlineOffset)} 0 ${we(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},xD=e=>{const{componentCls:t,antCls:r}=e,[,n]=_r(r,"pagination");return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
    ${t}-prev,
    ${t}-jump-prev,
    ${t}-jump-next
    `]:{marginInlineEnd:n("item-spacing-actual")},[`
    ${t}-prev,
    ${t}-next,
    ${t}-jump-prev,
    ${t}-jump-next
    `]:{display:"inline-block",minWidth:n("item-size-actual"),height:n("item-size-actual"),color:e.colorText,fontFamily:e.fontFamily,lineHeight:n("item-size-actual"),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${we(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{width:"auto"},"&-quick-jumper":{display:"inline-block",height:n("item-size-actual"),marginInlineStart:e.marginXS,lineHeight:n("item-size-actual"),verticalAlign:"baseline",input:{...Sh(e),...xh(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...au(e)},width:e.quickJumperInputWidth,height:n("item-size-actual"),boxSizing:"border-box",margin:0,marginInlineStart:n("item-spacing-actual"),marginInlineEnd:n("item-spacing-actual")}}}}},wD=e=>{const{componentCls:t,antCls:r}=e,[,n]=_r(r,"pagination");return{[`${t}-item`]:{display:"inline-block",minWidth:n("item-size-actual"),height:n("item-size-actual"),marginInlineEnd:n("item-spacing-actual"),fontFamily:e.fontFamily,lineHeight:we(e.calc(n("item-size-actual")).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${we(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${we(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},ED=e=>{const{componentCls:t,antCls:r}=e,[n,o]=_r(r,"pagination");return{[t]:{[n("item-size-actual")]:we(e.itemSize),[n("item-spacing-actual")]:we(e.marginXS),"&-small":{[n("item-size-actual")]:we(e.itemSizeSM),[n("item-spacing-actual")]:we(e.marginXXS)},"&-large":{[n("item-size-actual")]:we(e.itemSizeLG),[n("item-spacing-actual")]:we(e.marginSM)},...Vr(e),display:"flex",alignItems:"center","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:o("item-size-actual"),marginInlineEnd:o("item-spacing-actual"),lineHeight:we(e.calc(o("item-size-actual")).sub(2).equal()),verticalAlign:"middle"},...wD(e),...xD(e),...yD(e),...bD(e),..._D(e),...vD(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},SD=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...Ip(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...Wl(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Wl(e)}}}},W0=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...iu(e)}),q0=e=>tr(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},su(e)),CD=rr("Pagination",e=>{const t=q0(e);return[ED(t),SD(t)]},W0),PD=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},RD=gA(["Pagination","bordered"],e=>{const t=q0(e);return PD(t)},W0);function lb(e){return a.useMemo(()=>typeof e=="boolean"?[e,{}]:zn(e)?[!0,e]:[void 0,void 0],[e])}const TD=e=>{const{align:t,prefixCls:r,selectPrefixCls:n,className:o,rootClassName:s,style:i,size:l,locale:u,responsive:d,showSizeChanger:p,selectComponentClass:f,pageSizeOptions:m,styles:h,classNames:v,...g}=e,{xs:b}=mh(d),[,_]=Wc(),{getPrefixCls:y,direction:x,showSizeChanger:S,className:w,style:I,classNames:T,styles:R,totalBoundaryShowSizeChanger:P}=Jr("pagination"),$=y("pagination",r),[A,k]=CD($),D=ya(l),z=D==="small"||!!(b&&!D&&d),X={...e,size:D},[V,Y]=un([T,v],[R,h],{props:X}),[U]=Fx("Pagination",vA),F={...U,...u},[H,ee]=lb(p),[O,M]=lb(S),G=H??O,L=ee??M,W=f||ii,B=a.useMemo(()=>m?m.map(Number):void 0,[m]),J=ne=>{var be;const{disabled:ie,size:he,onSizeChange:me,"aria-label":Pe,className:Se,options:Ce}=ne,{className:Ze,onChange:Ye}=L||{},pe=(be=Ce.find(j=>String(j.value)===String(he)))==null?void 0:be.value;return a.createElement(W,{disabled:ie,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:j=>j.parentNode,"aria-label":Pe,options:Ce,...L,value:pe,onChange:(j,q)=>{me==null||me(j),Ye==null||Ye(j,q)},size:D,className:ae(Se,Ze)})},K=a.useMemo(()=>{const ne=a.createElement("span",{className:`${$}-item-ellipsis`},"•••"),ie=a.createElement("button",{className:`${$}-item-link`,type:"button",tabIndex:-1},x==="rtl"?a.createElement($p,null):a.createElement(Qp,null)),he=a.createElement("button",{className:`${$}-item-link`,type:"button",tabIndex:-1},x==="rtl"?a.createElement(Qp,null):a.createElement($p,null)),me=a.createElement("a",{className:`${$}-item-link`},a.createElement("div",{className:`${$}-item-container`},x==="rtl"?a.createElement(sb,{className:`${$}-item-link-icon`}):a.createElement(ob,{className:`${$}-item-link-icon`}),ne)),Pe=a.createElement("a",{className:`${$}-item-link`},a.createElement("div",{className:`${$}-item-container`},x==="rtl"?a.createElement(ob,{className:`${$}-item-link-icon`}):a.createElement(sb,{className:`${$}-item-link-icon`}),ne));return{prevIcon:ie,nextIcon:he,jumpPrevIcon:me,jumpNextIcon:Pe}},[x,$]),re=y("select",n),se=ae({[`${$}-${t}`]:!!t,[`${$}-${D}`]:D,[`${$}-mini`]:z,[`${$}-rtl`]:x==="rtl",[`${$}-bordered`]:_.wireframe},w,o,s,V.root,A,k),Z={...Y.root,...I,...i};return a.createElement(a.Fragment,null,_.wireframe&&a.createElement(RD,{prefixCls:$}),a.createElement(gD,{...K,...g,styles:Y,classNames:V,style:Z,prefixCls:$,selectPrefixCls:re,className:se,locale:F,pageSizeOptions:B,showSizeChanger:G,totalBoundaryShowSizeChanger:g.totalBoundaryShowSizeChanger??P,sizeChangerRender:J}))},rc=100,G0=rc/5,K0=rc/2-G0/2,xd=K0*2*Math.PI,cb=50,ub=e=>{const{dotClassName:t,style:r,hasCircleCls:n}=e;return a.createElement("circle",{className:ae(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:K0,cx:cb,cy:cb,strokeWidth:G0,style:r})},ID=({percent:e,prefixCls:t})=>{const r=`${t}-dot`,n=`${r}-holder`,o=`${n}-hidden`,[s,i]=a.useState(!1);er(()=>{e!==0&&i(!0)},[e!==0]);const l=Math.max(Math.min(e,100),0);if(!s)return null;const u={strokeDashoffset:`${xd/4}`,strokeDasharray:`${xd*l/100} ${xd*(100-l)/100}`};return a.createElement("span",{className:ae(n,`${r}-progress`,{[o]:l<=0})},a.createElement("svg",{viewBox:`0 0 ${rc} ${rc}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},a.createElement(ub,{dotClassName:r,hasCircleCls:!0}),a.createElement(ub,{dotClassName:r,style:u})))};function $D(e){const{prefixCls:t,percent:r=0,className:n,style:o}=e,s=`${t}-dot`,i=`${s}-holder`,l=`${i}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:ae(i,n,r>0&&l),style:o},a.createElement("span",{className:ae(s,`${t}-dot-spin`)},[1,2,3,4].map(u=>a.createElement("i",{className:`${t}-dot-item`,key:u})))),a.createElement(ID,{prefixCls:t,percent:r}))}function AD(e){const{prefixCls:t,indicator:r,percent:n,className:o,style:s}=e,i=`${t}-dot`;return r&&a.isValidElement(r)?Pn(r,l=>({className:ae(l.className,i,o),style:{...l.style,...s},percent:n})):a.createElement($D,{prefixCls:t,percent:n,className:o,style:s})}const jD=new so("antSpinMove",{to:{opacity:1}}),OD=new so("antRotate",{to:{transform:"rotate(405deg)"}}),ND=e=>{const{componentCls:t}=e,r=`${t}-section`;return{[t]:{...Vr(e),position:"relative","&-rtl":{direction:"rtl"},[`&${r}, ${r}`]:{display:"flex",alignItems:"center",flexDirection:"column",gap:e.paddingSM,color:e.colorPrimary},[`&${r}`]:{display:"inline-flex"},[r]:{position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)",zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-fullscreen":{position:"fixed",inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:"none",transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:"auto"},[r]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},DD=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n}=e,[o,s]=_r(r,"spin");return{[t]:{[o("dot-holder-size")]:e.dotSize,[o("dot-item-size")]:`calc((${s("dot-holder-size")} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:"1em",height:"1em",fontSize:s("dot-holder-size"),display:"inline-block",transition:["transform","opacity"].map(i=>`${i} ${n} ease`).join(", "),transformOrigin:"50% 50%",lineHeight:1,"&-hidden":{transform:"scale(0.3)",opacity:0}},position:"relative",display:"inline-block",fontSize:s("dot-holder-size"),width:"1em",height:"1em","&-spin":{transform:"rotate(45deg)",animationName:OD,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-item":{position:"absolute",display:"block",width:s("dot-item-size"),height:s("dot-item-size"),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:jD,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-progress":{position:"absolute",left:"50%",top:0,transform:"translateX(-50%)"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(i=>`${i} ${n} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},kD=e=>{const{componentCls:t}=e,[r]=_r(e.antCls,"spin");return{[t]:{"&-sm":{[r("dot-holder-size")]:e.dotSizeSM},"&-lg":{[r("dot-holder-size")]:e.dotSizeLG}}}},MD=e=>{const{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},LD=rr("Spin",e=>{const t=tr(e,{spinDotDefault:e.colorTextDescription});return[ND(t),DD(t),kD(t)]},MD),zD=200,db=[[30,.05],[70,.03],[96,.01]];function FD(e,t){const[r,n]=a.useState(0),o=a.useRef(null),s=t==="auto";return a.useEffect(()=>(s&&e&&(n(0),o.current=setInterval(()=>{n(i=>{const l=100-i;for(let u=0;u<db.length;u+=1){const[d,p]=db[u];if(i<=d)return i+l*p}return i})},zD)),()=>{o.current&&(clearInterval(o.current),o.current=null)}),[s,e]),s?r:t}let X0;function VD(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const Ch=e=>{const{prefixCls:t,spinning:r=!0,delay:n=0,className:o,rootClassName:s,size:i,tip:l,description:u,wrapperClassName:d,style:p,children:f,fullscreen:m=!1,indicator:h,percent:v,classNames:g,styles:b,..._}=e,{getPrefixCls:y,direction:x,indicator:S,className:w,style:I,classNames:T,styles:R}=Jr("spin"),P=y("spin",t),[$,A]=LD(P),[k,D]=a.useState(()=>r&&!VD(r,n)),z=FD(k,v);a.useEffect(()=>{if(r){const G=kN(n,()=>{D(!0)});return G(),()=>{var L;(L=G==null?void 0:G.cancel)==null||L.call(G)}}D(!1)},[n,r]);const X=ya(G=>i??G),V=u??l,Y={...e,size:X,spinning:k,tip:V,description:V,fullscreen:m,children:f,percent:z},[U,F]=un([T,g],[R,b],{props:Y}),H=h??S??X0,ee=typeof f<"u",O=ee||m,M=a.createElement(a.Fragment,null,a.createElement(AD,{className:ae(U.indicator),style:F.indicator,prefixCls:P,indicator:H,percent:z}),V&&a.createElement("div",{className:ae(`${P}-description`,U.tip,U.description),style:{...F.tip,...F.description}},V));return a.createElement("div",{className:ae(P,{[`${P}-sm`]:X==="small",[`${P}-lg`]:X==="large",[`${P}-spinning`]:k,[`${P}-rtl`]:x==="rtl",[`${P}-fullscreen`]:m},s,U.root,m&&U.mask,O?d:[`${P}-section`,U.section],w,o,$,A),style:{...F.root,...O?{}:F.section,...m?F.mask:{},...I,...p},"aria-live":"polite","aria-busy":k,..._},k&&(O?a.createElement("div",{className:ae(`${P}-section`,U.section),style:F.section},M):M),ee&&a.createElement("div",{className:ae(`${P}-container`,U.container),style:F.container},f))};Ch.setDefaultIndicator=e=>{X0=e};const Ph=N.createContext({});Ph.Consumer;const BD=({prefixCls:e,className:t,avatar:r,title:n,description:o,...s})=>{const{getPrefixCls:i}=a.useContext($r),l=i("list",e),u=ae(`${l}-item-meta`,t),d=N.createElement("div",{className:`${l}-item-meta-content`},n&&N.createElement("h4",{className:`${l}-item-meta-title`},n),o&&N.createElement("div",{className:`${l}-item-meta-description`},o));return N.createElement("div",{...s,className:u},r&&N.createElement("div",{className:`${l}-item-meta-avatar`},r),(n||o)&&d)},HD=N.forwardRef((e,t)=>{const{prefixCls:r,children:n,actions:o,extra:s,styles:i,className:l,classNames:u,colStyle:d,...p}=e,{grid:f,itemLayout:m}=a.useContext(Ph),{getPrefixCls:h,list:v}=a.useContext($r),g=T=>{var R,P;return ae((P=(R=v==null?void 0:v.item)==null?void 0:R.classNames)==null?void 0:P[T],u==null?void 0:u[T])},b=T=>{var R,P;return{...(P=(R=v==null?void 0:v.item)==null?void 0:R.styles)==null?void 0:P[T],...i==null?void 0:i[T]}},_=()=>{const T=Ho(n);return T.some(P=>typeof P=="string")&&T.length>1},y=()=>m==="vertical"?!!s:!_(),x=h("list",r),S=o&&o.length>0&&N.createElement("ul",{className:ae(`${x}-item-action`,g("actions")),key:"actions",style:b("actions")},o.map((T,R)=>N.createElement("li",{key:`${x}-item-action-${R}`},T,R!==o.length-1&&N.createElement("em",{className:`${x}-item-action-split`})))),w=f?"div":"li",I=N.createElement(w,{...p,...f?{}:{ref:t},className:ae(`${x}-item`,{[`${x}-item-no-flex`]:!y()},l)},m==="vertical"&&s?[N.createElement("div",{className:`${x}-item-main`,key:"content"},n,S),N.createElement("div",{className:ae(`${x}-item-extra`,g("extra")),key:"extra",style:b("extra")},s)]:[n,S,Pn(s,{key:"extra"})]);return f?N.createElement(MN,{ref:t,flex:1,style:d},I):I}),Y0=HD;Y0.Meta=BD;const UD=e=>{const{listBorderedCls:t,componentCls:r,paddingLG:n,margin:o,itemPaddingSM:s,itemPaddingLG:i,marginLG:l,borderRadiusLG:u}=e,d=we(e.calc(u).sub(e.lineWidth).equal());return{[t]:{border:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:u,[`${r}-header`]:{borderRadius:`${d} ${d} 0 0`},[`${r}-footer`]:{borderRadius:`0 0 ${d} ${d}`},[`${r}-header,${r}-footer,${r}-item`]:{paddingInline:n},[`${r}-pagination`]:{margin:`${we(o)} ${we(l)}`}},[`${t}${r}-sm`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:s}},[`${t}${r}-lg`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:i}}}},WD=e=>{const{componentCls:t,screenSM:r,screenMD:n,marginLG:o,marginSM:s,margin:i}=e;return{[`@media screen and (max-width:${n}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:o}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:o}}}},[`@media screen and (max-width: ${r}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:s}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${we(i)}`}}}}}},qD=e=>{const{componentCls:t,antCls:r,controlHeight:n,minHeight:o,paddingSM:s,marginLG:i,padding:l,itemPadding:u,colorPrimary:d,itemPaddingSM:p,itemPaddingLG:f,paddingXS:m,margin:h,colorText:v,colorTextDescription:g,motionDurationSlow:b,lineWidth:_,headerBg:y,footerBg:x,emptyTextPadding:S,metaMarginBottom:w,avatarMarginRight:I,titleMarginBottom:T,descriptionFontSize:R}=e;return{[t]:{...Vr(e),position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:y},[`${t}-footer`]:{background:x},[`${t}-header, ${t}-footer`]:{paddingBlock:s},[`${t}-pagination`]:{marginBlockStart:i,[`${r}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:o,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:u,color:v,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:I},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:v},[`${t}-item-meta-title`]:{margin:`0 0 ${we(e.marginXXS)} 0`,color:v,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:v,transition:`all ${b}`,"&:hover":{color:d}}},[`${t}-item-meta-description`]:{color:g,fontSize:R,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${we(m)}`,color:g,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:_,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${we(l)} 0`,color:g,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:S,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}},[`${t}-grid ${r}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:h,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:i},[`${t}-item-meta`]:{marginBlockEnd:w,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:T,color:v,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:`0 ${we(l)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${we(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${we(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${we(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:n},[`${t}-split${t}-something-after-last-item ${r}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${we(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:f},[`${t}-sm ${t}-item`]:{padding:p},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},GD=e=>({contentWidth:220,itemPadding:`${we(e.paddingContentVertical)} 0`,itemPaddingSM:`${we(e.paddingContentVerticalSM)} ${we(e.paddingContentHorizontal)}`,itemPaddingLG:`${we(e.paddingContentVerticalLG)} ${we(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),KD=rr("List",e=>{const t=tr(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[qD(t),UD(t),WD(t)]},GD,{extraCssVarPrefixCls:({prefixCls:e})=>[`${e}-container`]}),XD=(e,t)=>{const{pagination:r=!1,prefixCls:n,bordered:o=!1,split:s=!0,className:i,rootClassName:l,style:u,children:d,itemLayout:p,loadMore:f,grid:m,dataSource:h=[],size:v,header:g,footer:b,loading:_=!1,rowKey:y,renderItem:x,locale:S,...w}=e,I=zn(r)?r:{},[T,R]=a.useState(I.defaultCurrent||1),[P,$]=a.useState(I.defaultPageSize||10),{getPrefixCls:A,direction:k,className:D,style:z}=Jr("list"),{renderEmpty:X}=a.useContext($r),V={current:1,total:0,position:"bottom"},Y=pe=>(be,j)=>{var q;R(be),$(j),r&&((q=r==null?void 0:r[pe])==null||q.call(r,be,j))},U=Y("onChange"),F=Y("onShowSizeChange"),H=(pe,be)=>{if(!x)return null;let j;return typeof y=="function"?j=y(pe):y?j=pe[y]:j=pe.key,j||(j=`list-item-${be}`),a.createElement(a.Fragment,{key:j},x(pe,be))},ee=!!(f||r||b),O=A("list",n),[M,G]=KD(O);let L=_;typeof L=="boolean"&&(L={spinning:L});const W=!!(L!=null&&L.spinning),B=ya(v);let J="";switch(B){case"large":J="lg";break;case"small":J="sm";break}const K=ae(O,{[`${O}-vertical`]:p==="vertical",[`${O}-${J}`]:J,[`${O}-split`]:s,[`${O}-bordered`]:o,[`${O}-loading`]:W,[`${O}-grid`]:!!m,[`${O}-something-after-last-item`]:ee,[`${O}-rtl`]:k==="rtl"},D,i,l,M,G),re=`${O}-container`,se=bA(V,{total:h.length,current:T,pageSize:P},r||{}),Z=Math.ceil(se.total/se.pageSize);se.current=Math.min(se.current,Z);const ne=r&&a.createElement("div",{className:ae(`${O}-pagination`)},a.createElement(TD,{align:"end",...se,onChange:U,onShowSizeChange:F}));let ie=Gl(h);r&&h.length>(se.current-1)*se.pageSize&&(ie=Gl(h).splice((se.current-1)*se.pageSize,se.pageSize));const he=Object.keys(m||{}).some(pe=>$o.includes(pe)),me=mh(he),Pe=a.useMemo(()=>{for(let pe=0;pe<$o.length;pe+=1){const be=$o[pe];if(me[be])return be}},[me]),Se=a.useMemo(()=>{if(!m)return;const pe=Pe&&m[Pe]?m[Pe]:m.column;if(pe)return{width:`${100/pe}%`,maxWidth:`${100/pe}%`}},[JSON.stringify(m),Pe]);let Ce=W&&a.createElement("div",{style:{minHeight:53}});if(ie.length>0){const pe=ie.map(H);Ce=m?a.createElement(zN,{className:ae(re,G),gutter:m.gutter},a.Children.map(pe,be=>a.createElement("div",{key:be==null?void 0:be.key,style:Se},be))):a.createElement("ul",{className:ae(`${O}-items`,re,G)},pe)}else!d&&!W&&(Ce=a.createElement("div",{className:`${O}-empty-text`},(S==null?void 0:S.emptyText)||(X==null?void 0:X("List"))||a.createElement(Cx,{componentName:"List"})));const Ze=se.position,Ye=a.useMemo(()=>({grid:m,itemLayout:p}),[JSON.stringify(m),p]);return a.createElement(Ph.Provider,{value:Ye},a.createElement("div",{ref:t,style:{...z,...u},className:K,...w},(Ze==="top"||Ze==="both")&&ne,g&&a.createElement("div",{className:`${O}-header`},g),a.createElement(Ch,{...L},Ce,d),b&&a.createElement("div",{className:`${O}-footer`},b),f||(Ze==="bottom"||Ze==="both")&&ne))},YD=a.forwardRef(XD),gf=YD;gf.Item=Y0;var JD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function vf(){return vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vf.apply(this,arguments)}const ZD=(e,t)=>a.createElement(Cn,vf({},e,{ref:t,icon:JD})),QD=a.forwardRef(ZD);var ek={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};function bf(){return bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bf.apply(this,arguments)}const tk=(e,t)=>a.createElement(Cn,bf({},e,{ref:t,icon:ek})),rk=a.forwardRef(tk),nk=(e,t,r,n)=>{const{titleMarginBottom:o,fontWeightStrong:s}=n;return{marginBottom:o,color:r,fontWeight:s,fontSize:e,lineHeight:t}},ok=e=>{const t=[1,2,3,4,5],r={};return t.forEach(n=>{r[`
      h${n}&,
      div&-h${n},
      div&-h${n} > textarea,
      h${n}
    `]=nk(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),r},sk=e=>{const{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...Vx(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none",[`${t}-actions`]:{pointerEvents:"auto"}}}}}},ik=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:_A[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),ak=e=>{const{componentCls:t,paddingSM:r}=e,n=r;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(n).div(-2).add(1).equal(),marginBottom:e.calc(n).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},lk=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),ck=()=>({"a&-ellipsis, span&-ellipsis":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),uk=e=>{const{componentCls:t,titleMarginTop:r}=e;return{[t]:{color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"div&, p":{marginBottom:"1em"},...ok(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:r},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:r}},...ik(e),...sk(e),[`${t}-actions`]:{display:"inline"},[`
        ${t}-expand,
        ${t}-collapse,
        ${t}-edit,
        ${t}-copy
      `]:{...Vx(e),marginInlineStart:e.marginXXS},...ak(e),...lk(e),...ck(),"&-rtl":{direction:"rtl"}}}},dk=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),J0=rr("Typography",uk,dk),pk=e=>{const{prefixCls:t,"aria-label":r,className:n,style:o,direction:s,maxLength:i,autoSize:l=!0,value:u,onSave:d,onCancel:p,onEnd:f,component:m,enterIcon:h=a.createElement(rk,null)}=e,v=a.useRef(null),g=a.useRef(!1),b=a.useRef(null),[_,y]=a.useState(u);a.useEffect(()=>{y(u)},[u]),a.useEffect(()=>{var D;if((D=v.current)!=null&&D.resizableTextArea){const{textArea:z}=v.current.resizableTextArea;z.focus();const{length:X}=z.value;z.setSelectionRange(X,X)}},[]);const x=({target:D})=>{y(D.value.replace(/[\n\r]/g,""))},S=()=>{g.current=!0},w=()=>{g.current=!1},I=({keyCode:D})=>{g.current||(b.current=D)},T=()=>{d(_.trim())},R=({keyCode:D,ctrlKey:z,altKey:X,metaKey:V,shiftKey:Y})=>{b.current!==D||g.current||z||X||V||Y||(D===Xe.ENTER?(T(),f==null||f()):D===Xe.ESC&&p())},P=()=>{T()},[$,A]=J0(t),k=ae(t,`${t}-edit-content`,{[`${t}-rtl`]:s==="rtl",[`${t}-${m}`]:!!m},n,$,A);return a.createElement("div",{className:k,style:o},a.createElement(aD,{ref:v,maxLength:i,value:_,onChange:x,onKeyDown:I,onKeyUp:R,onCompositionStart:S,onCompositionEnd:w,onBlur:P,"aria-label":r,rows:1,autoSize:l}),h!==null?Pn(h,{className:`${t}-edit-content-confirm`}):null)},fk=({copyConfig:e,children:t})=>{const[r,n]=a.useState(!1),[o,s]=a.useState(!1),i=a.useRef(null),l=()=>{i.current&&clearTimeout(i.current)},u={};e.format&&(u.format=e.format),a.useEffect(()=>l,[]);const d=zr(async p=>{var f;p==null||p.preventDefault(),p==null||p.stopPropagation(),s(!0);try{const m=typeof e.text=="function"?await e.text():e.text;await yA(m||Bx(t,{skipEmpty:!0}).join("")||"",u),s(!1),n(!0),l(),i.current=setTimeout(()=>{n(!1)},3e3),(f=e.onCopy)==null||f.call(e,p)}catch(m){throw s(!1),m}});return{copied:r,copyLoading:o,onClick:d}};function wd(e,t){return a.useMemo(()=>{const r=!!e;return[r,{...t,...r&&typeof e=="object"?e:null}]},[e])}const mk=e=>{const t=a.useRef(void 0);return a.useEffect(()=>{t.current=e}),t.current},hk=(e,t,r)=>a.useMemo(()=>e===!0?{title:t??r}:a.isValidElement(e)?{title:e}:zn(e)?{title:t??r,...e}:{title:e},[e,t,r]),Z0=a.forwardRef((e,t)=>{const{prefixCls:r,component:n="article",className:o,rootClassName:s,children:i,direction:l,style:u,...d}=e,{getPrefixCls:p,direction:f,className:m,style:h}=Jr("typography"),v=l??f,g=p("typography",r),[b,_]=J0(g),y=ae(g,m,{[`${g}-rtl`]:v==="rtl"},o,s,b,_),x={...h,...u};return a.createElement(n,{className:y,style:x,ref:t,...d},i)});var gk={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function _f(){return _f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_f.apply(this,arguments)}const vk=(e,t)=>a.createElement(Cn,_f({},e,{ref:t,icon:gk})),bk=a.forwardRef(vk),pb=e=>e===!1?[!1,!1]:Bx(e);function Ed(e,t,r){return e===!0||e===void 0?t:e||r&&t}function _k(e){const t=document.createElement("em");e.appendChild(t);const r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return e.removeChild(t),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}const Rh=e=>["string","number"].includes(typeof e),yk=e=>{const{prefixCls:t,copied:r,locale:n,iconOnly:o,tooltips:s,icon:i,tabIndex:l,onCopy:u,loading:d}=e,p=pb(s),f=pb(i),{copied:m,copy:h}=n??{},v=r?m:h,g=Ed(p[r?1:0],v),b=typeof g=="string"?g:v;return a.createElement(Wo,{title:g},a.createElement("button",{type:"button",className:ae(`${t}-copy`,{[`${t}-copy-success`]:r,[`${t}-copy-icon-only`]:o}),onClick:u,"aria-label":b,tabIndex:l},r?Ed(f[1],a.createElement(h0,null),!0):Ed(f[0],d?a.createElement(Ex,null):a.createElement(bk,null),!0)))},Za=a.forwardRef(({style:e,children:t},r)=>{const n=a.useRef(null);return a.useImperativeHandle(r,()=>({isExceed:()=>{const o=n.current;return o.scrollHeight>o.clientHeight},getHeight:()=>n.current.clientHeight})),a.createElement("span",{"aria-hidden":!0,ref:n,style:{position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)",...e}},t)}),xk=e=>e.reduce((t,r)=>t+(Rh(r)?String(r).length:1),0);function fb(e,t){let r=0;const n=[];for(let o=0;o<e.length;o+=1){if(r===t)return n;const s=e[o],l=Rh(s)?String(s).length:1,u=r+l;if(u>t){const d=t-r;return n.push(String(s).slice(0,d)),n}n.push(s),r=u}return e}const Sd=0,Cd=1,Pd=2,Rd=3,mb=4,Qa={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function wk(e){const{enableMeasure:t,width:r,text:n,children:o,rows:s,expanded:i,miscDeps:l,onEllipsis:u}=e,d=a.useMemo(()=>Ho(n),[n]),p=a.useMemo(()=>xk(d),[n]),f=a.useMemo(()=>o(d,!1),[n]),[m,h]=a.useState(null),v=a.useRef(null),g=a.useRef(null),b=a.useRef(null),_=a.useRef(null),y=a.useRef(null),[x,S]=a.useState(!1),[w,I]=a.useState(Sd),[T,R]=a.useState(0),[P,$]=a.useState(null);er(()=>{I(t&&r&&p?Cd:Sd)},[r,n,s,t,d]),er(()=>{var z,X,V,Y;if(w===Cd){I(Pd);const U=g.current&&getComputedStyle(g.current).whiteSpace;$(U)}else if(w===Pd){const U=!!((z=b.current)!=null&&z.isExceed());I(U?Rd:mb),h(U?[0,p]:null),S(U);const F=((X=b.current)==null?void 0:X.getHeight())||0,H=s===1?0:((V=_.current)==null?void 0:V.getHeight())||0,ee=((Y=y.current)==null?void 0:Y.getHeight())||0,O=Math.max(F,H+ee);R(O+1),u(U)}},[w]);const A=m?Math.ceil((m[0]+m[1])/2):0;er(()=>{var V;const[z,X]=m||[0,0];if(z!==X){const U=(((V=v.current)==null?void 0:V.getHeight())||0)>T;let F=A;X-z===1&&(F=U?z:X),h(U?[z,F]:[F,X])}},[m,A]);const k=a.useMemo(()=>{if(!t)return o(d,!1);if(w!==Rd||!m||m[0]!==m[1]){const z=o(d,!1);return[mb,Sd].includes(w)?z:a.createElement("span",{style:{...Qa,WebkitLineClamp:s}},z)}return o(i?d:fb(d,m[0]),x)},[i,w,m,d].concat(Gl(l))),D={width:r,margin:0,padding:0,whiteSpace:P==="nowrap"?"normal":"inherit"};return a.createElement(a.Fragment,null,k,w===Pd&&a.createElement(a.Fragment,null,a.createElement(Za,{style:{...D,...Qa,WebkitLineClamp:s},ref:b},f),a.createElement(Za,{style:{...D,...Qa,WebkitLineClamp:s-1},ref:_},f),a.createElement(Za,{style:{...D,...Qa,WebkitLineClamp:1},ref:y},o([],!0))),w===Rd&&m&&m[0]!==m[1]&&a.createElement(Za,{style:{...D,top:400},ref:v},o(fb(d,A),!0)),w===Cd&&a.createElement("span",{style:{whiteSpace:"inherit"},ref:g}))}const Ek=({enableEllipsis:e,isEllipsis:t,open:r,children:n,tooltipProps:o})=>{if(!(o!=null&&o.title)||!e)return n;const s=r&&t;return a.createElement(Wo,{open:s,...o},n)};function Sk({mark:e,code:t,underline:r,delete:n,strong:o,keyboard:s,italic:i},l){let u=l;function d(p,f){f&&(u=a.createElement(p,{},u))}return d("strong",o),d("u",r),d("del",n),d("code",t),d("mark",e),d("kbd",s),d("i",i),u}const Ck="...",hb=["delete","mark","code","underline","strong","keyboard","italic"],cu=a.forwardRef((e,t)=>{const{prefixCls:r,className:n,style:o,type:s,disabled:i,children:l,ellipsis:u,editable:d,copyable:p,component:f,title:m,onMouseEnter:h,onMouseLeave:v,...g}=e,{getPrefixCls:b,direction:_}=a.useContext($r),[y]=Fx("Text"),x=a.useRef(null),S=a.useRef(null),w=b("typography",r),I=vr(g,hb),[T,R]=wd(d),[P,$]=Rr(!1,R.editing),{triggerType:A=["icon"]}=R,k=ze=>{var We;ze&&((We=R.onStart)==null||We.call(R)),$(ze)},D=mk(P);er(()=>{var ze;!P&&D&&((ze=S.current)==null||ze.focus())},[P]);const z=ze=>{ze==null||ze.preventDefault(),k(!0)},X=ze=>{var We;(We=R.onChange)==null||We.call(R,ze),k(!1)},V=()=>{var ze;(ze=R.onCancel)==null||ze.call(R),k(!1)},[Y,U]=wd(p),{copied:F,copyLoading:H,onClick:ee}=fk({copyConfig:U,children:l}),[O,M]=a.useState(!1),[G,L]=a.useState(!1),[W,B]=a.useState(!1),[J,K]=a.useState(!1),[re,se]=a.useState(!0),[Z,ne]=wd(u,{expandable:!1,symbol:ze=>ze?y==null?void 0:y.collapse:y==null?void 0:y.expand}),[ie,he]=Rr(ne.defaultExpanded||!1,ne.expanded),me=Z&&(!ie||ne.expandable==="collapsible"),{rows:Pe=1}=ne,Se=a.useMemo(()=>me&&(ne.suffix!==void 0||ne.onEllipsis||ne.expandable||T||Y),[me,ne,T,Y]);er(()=>{Z&&!Se&&(M(pv("webkitLineClamp")),L(pv("textOverflow")))},[Se,Z]);const[Ce,Ze]=a.useState(me),Ye=a.useMemo(()=>Se?!1:Pe===1?G:O,[Se,G,O]);er(()=>{Ze(Ye&&me)},[Ye,me]);const pe=hk(ne.tooltip,R.text,l),be=Ce&&!!pe.title,j=me&&(Ce?be&&J:W),q=me&&Pe===1&&Ce,Q=me&&Pe>1&&Ce,le=(ze,We)=>{var ke;he(We.expanded),(ke=ne.onExpand)==null||ke.call(ne,ze,We)},[de,ce]=a.useState(0),[fe,ue]=a.useState(!1),[ye,Be]=a.useState(!1),Ae=({offsetWidth:ze})=>{ce(ze)},Ee=ze=>{var We;B(ze),W!==ze&&((We=ne.onEllipsis)==null||We.call(ne,ze))};a.useEffect(()=>{const ze=x.current;if(Z&&be&&ze){const We=_k(ze);J!==We&&K(We)}},[Z,be,l,Q,re,de]),a.useEffect(()=>{const ze=x.current;if(typeof IntersectionObserver>"u"||!ze||!be||!me)return;const We=new IntersectionObserver(()=>{se(!!ze.offsetParent)});return We.observe(ze),()=>{We.disconnect()}},[be,me]);const lt=a.useMemo(()=>{if(!(!Z||Ce))return[R.text,l,m,pe.title].find(Rh)},[Z,Ce,m,pe.title,j]);if(P)return a.createElement(pk,{value:R.text??(typeof l=="string"?l:""),onSave:X,onCancel:V,onEnd:R.onEnd,prefixCls:w,className:n,style:o,direction:_,component:f,maxLength:R.maxLength,autoSize:R.autoSize,enterIcon:R.enterIcon});const ht=()=>{const{expandable:ze,symbol:We}=ne;return ze?a.createElement("button",{type:"button",key:"expand",className:`${w}-${ie?"collapse":"expand"}`,onClick:ke=>le(ke,{expanded:!ie}),"aria-label":ie?y.collapse:y==null?void 0:y.expand},typeof We=="function"?We(ie):We):null},dt=()=>{if(!T)return;const{icon:ze,tooltip:We,tabIndex:ke}=R,nt=Ho(We)[0]||(y==null?void 0:y.edit),ut=typeof nt=="string"?nt:"";return A.includes("icon")?a.createElement(Wo,{key:"edit",title:We===!1?"":nt},a.createElement("button",{type:"button",ref:S,className:`${w}-edit`,onClick:z,"aria-label":ut,tabIndex:ke},ze||a.createElement(QD,{role:"button"}))):null},mt=()=>Y?a.createElement(yk,{key:"copy",...U,prefixCls:w,copied:F,locale:y,onCopy:ee,loading:H,iconOnly:!Nn(l)}):null,ft=ze=>{const We=ze&&ht(),ke=dt(),nt=mt();return!We&&!ke&&!nt?null:a.createElement("span",{key:"operations",className:`${w}-actions`,onMouseEnter:()=>ue(!0),onMouseLeave:()=>ue(!1)},We,ke,nt)},vt=ze=>[ze&&!ie&&a.createElement("span",{"aria-hidden":!0,key:"ellipsis"},Ck),ne.suffix,ft(ze)];return a.createElement(oi,{onResize:Ae,disabled:!me},ze=>a.createElement(Ek,{tooltipProps:pe,enableEllipsis:me,isEllipsis:j,open:ye&&!fe},a.createElement(Z0,{onMouseEnter:We=>{Be(!0),h==null||h(We)},onMouseLeave:We=>{Be(!1),v==null||v(We)},className:ae({[`${w}-${s}`]:s,[`${w}-disabled`]:i,[`${w}-ellipsis`]:Z,[`${w}-ellipsis-single-line`]:q,[`${w}-ellipsis-multiple-line`]:Q,[`${w}-link`]:f==="a"},n),prefixCls:r,style:{...o,WebkitLineClamp:Q?Pe:void 0},component:f,ref:_a(ze,x,t),direction:_,onClick:A.includes("text")?z:void 0,"aria-label":lt==null?void 0:lt.toString(),title:m,...I},a.createElement(wk,{enableMeasure:me&&!Ce,text:l,rows:Pe,width:de,onEllipsis:Ee,expanded:ie,miscDeps:[F,ie,H,T,Y,y].concat(Gl(hb.map(We=>e[We])))},(We,ke)=>Sk(e,a.createElement(a.Fragment,null,We.length>0&&ke&&!ie&&lt?a.createElement("span",{key:"show-content","aria-hidden":!0},We):We,vt(ke)))))))}),Pk=a.forwardRef((e,t)=>{const{ellipsis:r,rel:n,children:o,navigate:s,...i}=e,l={...i,rel:n===void 0&&i.target==="_blank"?"noopener noreferrer":n};return a.createElement(cu,{...l,ref:t,ellipsis:!!r,component:"a"},o)}),Rk=a.forwardRef((e,t)=>{const{children:r,...n}=e;return a.createElement(cu,{ref:t,...n,component:"div"},r)}),Tk=a.forwardRef((e,t)=>{const{ellipsis:r,children:n,...o}=e,s=a.useMemo(()=>zn(r)?vr(r,["expandable","rows"]):r,[r]);return a.createElement(cu,{ref:t,...o,ellipsis:s,component:"span"},n)}),Ik=[1,2,3,4,5],$k=a.forwardRef((e,t)=>{const{level:r=1,children:n,...o}=e,s=Ik.includes(r)?`h${r}`:"h1";return a.createElement(cu,{ref:t,...o,component:s},n)}),Qn=Z0;Qn.Text=Tk;Qn.Link=Pk;Qn.Title=$k;Qn.Paragraph=Rk;function Q0(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ak}=Object.prototype,{getPrototypeOf:uu}=Object,{iterator:du,toStringTag:ew}=Symbol,pu=(e=>t=>{const r=Ak.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),dn=e=>(e=e.toLowerCase(),t=>pu(t)===e),fu=e=>t=>typeof t===e,{isArray:li}=Array,Us=fu("undefined");function Pa(e){return e!==null&&!Us(e)&&e.constructor!==null&&!Us(e.constructor)&&Tr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tw=dn("ArrayBuffer");function jk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tw(e.buffer),t}const Ok=fu("string"),Tr=fu("function"),rw=fu("number"),Ra=e=>e!==null&&typeof e=="object",Nk=e=>e===!0||e===!1,Il=e=>{if(pu(e)!=="object")return!1;const t=uu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ew in e)&&!(du in e)},Dk=e=>{if(!Ra(e)||Pa(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},kk=dn("Date"),Mk=dn("File"),Lk=e=>!!(e&&typeof e.uri<"u"),zk=e=>e&&typeof e.getParts<"u",Fk=dn("Blob"),Vk=dn("FileList"),Bk=e=>Ra(e)&&Tr(e.pipe);function Hk(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const gb=Hk(),vb=typeof gb.FormData<"u"?gb.FormData:void 0,Uk=e=>{if(!e)return!1;if(vb&&e instanceof vb)return!0;const t=uu(e);if(!t||t===Object.prototype||!Tr(e.append))return!1;const r=pu(e);return r==="formdata"||r==="object"&&Tr(e.toString)&&e.toString()==="[object FormData]"},Wk=dn("URLSearchParams"),[qk,Gk,Kk,Xk]=["ReadableStream","Request","Response","Headers"].map(dn),Yk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ta(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),li(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Pa(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let l;for(n=0;n<i;n++)l=s[n],t.call(null,e[l],l,e)}}function nw(e,t){if(Pa(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const Ro=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ow=e=>!Us(e)&&e!==Ro;function yf(...e){const{caseless:t,skipUndefined:r}=ow(this)&&this||{},n={},o=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const l=t&&nw(n,i)||i,u=xf(n,l)?n[l]:void 0;Il(u)&&Il(s)?n[l]=yf(u,s):Il(s)?n[l]=yf({},s):li(s)?n[l]=s.slice():(!r||!Us(s))&&(n[l]=s)};for(let s=0,i=e.length;s<i;s++)e[s]&&Ta(e[s],o);return n}const Jk=(e,t,r,{allOwnKeys:n}={})=>(Ta(t,(o,s)=>{r&&Tr(o)?Object.defineProperty(e,s,{__proto__:null,value:Q0(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),Zk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qk=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},eM=(e,t,r,n)=>{let o,s,i;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!n||n(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=r!==!1&&uu(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},tM=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},rM=e=>{if(!e)return null;if(li(e))return e;let t=e.length;if(!rw(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},nM=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&uu(Uint8Array)),oM=(e,t)=>{const n=(e&&e[du]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},sM=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},iM=dn("HTMLFormElement"),aM=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),xf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),lM=dn("RegExp"),sw=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ta(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},cM=e=>{sw(e,(t,r)=>{if(Tr(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(Tr(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},uM=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return li(e)?n(e):n(String(e).split(t)),r},dM=()=>{},pM=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function fM(e){return!!(e&&Tr(e.append)&&e[ew]==="FormData"&&e[du])}const mM=e=>{const t=new Array(10),r=(n,o)=>{if(Ra(n)){if(t.indexOf(n)>=0)return;if(Pa(n))return n;if(!("toJSON"in n)){t[o]=n;const s=li(n)?[]:{};return Ta(n,(i,l)=>{const u=r(i,o+1);!Us(u)&&(s[l]=u)}),t[o]=void 0,s}}return n};return r(e,0)},hM=dn("AsyncFunction"),gM=e=>e&&(Ra(e)||Tr(e))&&Tr(e.then)&&Tr(e.catch),iw=((e,t)=>e?setImmediate:t?((r,n)=>(Ro.addEventListener("message",({source:o,data:s})=>{o===Ro&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),Ro.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Tr(Ro.postMessage)),vM=typeof queueMicrotask<"u"?queueMicrotask.bind(Ro):typeof process<"u"&&process.nextTick||iw,bM=e=>e!=null&&Tr(e[du]),te={isArray:li,isArrayBuffer:tw,isBuffer:Pa,isFormData:Uk,isArrayBufferView:jk,isString:Ok,isNumber:rw,isBoolean:Nk,isObject:Ra,isPlainObject:Il,isEmptyObject:Dk,isReadableStream:qk,isRequest:Gk,isResponse:Kk,isHeaders:Xk,isUndefined:Us,isDate:kk,isFile:Mk,isReactNativeBlob:Lk,isReactNative:zk,isBlob:Fk,isRegExp:lM,isFunction:Tr,isStream:Bk,isURLSearchParams:Wk,isTypedArray:nM,isFileList:Vk,forEach:Ta,merge:yf,extend:Jk,trim:Yk,stripBOM:Zk,inherits:Qk,toFlatObject:eM,kindOf:pu,kindOfTest:dn,endsWith:tM,toArray:rM,forEachEntry:oM,matchAll:sM,isHTMLForm:iM,hasOwnProperty:xf,hasOwnProp:xf,reduceDescriptors:sw,freezeMethods:cM,toObjectSet:uM,toCamelCase:aM,noop:dM,toFiniteNumber:pM,findKey:nw,global:Ro,isContextDefined:ow,isSpecCompliantForm:fM,toJSONObject:mM,isAsyncFn:hM,isThenable:gM,setImmediate:iw,asap:vM,isIterable:bM},_M=te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yM=e=>{const t={};let r,n,o;return e&&e.split(`
`).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&_M[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},bb=Symbol("internals"),xM=/[^\x09\x20-\x7E\x80-\xFF]/g;function wM(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function wi(e){return e&&String(e).trim().toLowerCase()}function EM(e){return wM(e.replace(xM,""))}function $l(e){return e===!1||e==null?e:te.isArray(e)?e.map($l):EM(String(e))}function SM(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const CM=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Td(e,t,r,n,o){if(te.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!te.isString(t)){if(te.isString(n))return t.indexOf(n)!==-1;if(te.isRegExp(n))return n.test(t)}}function PM(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function RM(e,t){const r=te.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(o,s,i){return this[n].call(this,t,o,s,i)},configurable:!0})})}let br=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(l,u,d){const p=wi(u);if(!p)throw new Error("header name must be a non-empty string");const f=te.findKey(o,p);(!f||o[f]===void 0||d===!0||d===void 0&&o[f]!==!1)&&(o[f||u]=$l(l))}const i=(l,u)=>te.forEach(l,(d,p)=>s(d,p,u));if(te.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(te.isString(t)&&(t=t.trim())&&!CM(t))i(yM(t),r);else if(te.isObject(t)&&te.isIterable(t)){let l={},u,d;for(const p of t){if(!te.isArray(p))throw TypeError("Object iterator must return a key-value pair");l[d=p[0]]=(u=l[d])?te.isArray(u)?[...u,p[1]]:[u,p[1]]:p[1]}i(l,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=wi(t),t){const n=te.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return SM(o);if(te.isFunction(r))return r.call(this,o,n);if(te.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=wi(t),t){const n=te.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Td(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(i){if(i=wi(i),i){const l=te.findKey(n,i);l&&(!r||Td(n,n[l],l,r))&&(delete n[l],o=!0)}}return te.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||Td(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return te.forEach(this,(o,s)=>{const i=te.findKey(n,s);if(i){r[i]=$l(o),delete r[s];return}const l=t?PM(s):String(s).trim();l!==s&&delete r[s],r[l]=$l(o),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return te.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&te.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[bb]=this[bb]={accessors:{}}).accessors,o=this.prototype;function s(i){const l=wi(i);n[l]||(RM(o,i),n[l]=!0)}return te.isArray(t)?t.forEach(s):s(t),this}};br.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);te.reduceDescriptors(br.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});te.freezeMethods(br);const TM="[REDACTED ****]";function IM(e){if(te.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(te.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function $M(e,t){const r=new Set(t.map(s=>String(s).toLowerCase())),n=[],o=s=>{if(s===null||typeof s!="object"||te.isBuffer(s))return s;if(n.indexOf(s)!==-1)return;s instanceof br&&(s=s.toJSON()),n.push(s);let i;if(te.isArray(s))i=[],s.forEach((l,u)=>{const d=o(l);te.isUndefined(d)||(i[u]=d)});else{if(!te.isPlainObject(s)&&IM(s))return n.pop(),s;i=Object.create(null);for(const[l,u]of Object.entries(s)){const d=r.has(l.toLowerCase())?TM:o(u);te.isUndefined(d)||(i[l]=d)}}return n.pop(),i};return o(e)}let qe=class aw extends Error{static from(t,r,n,o,s,i){const l=new aw(t.message,r||t.code,n,o,s);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,r,n,o,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,r=t&&te.hasOwnProp(t,"redact")?t.redact:void 0,n=te.isArray(r)&&r.length>0?$M(t,r):te.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};qe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";qe.ERR_BAD_OPTION="ERR_BAD_OPTION";qe.ECONNABORTED="ECONNABORTED";qe.ETIMEDOUT="ETIMEDOUT";qe.ECONNREFUSED="ECONNREFUSED";qe.ERR_NETWORK="ERR_NETWORK";qe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";qe.ERR_DEPRECATED="ERR_DEPRECATED";qe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";qe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";qe.ERR_CANCELED="ERR_CANCELED";qe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";qe.ERR_INVALID_URL="ERR_INVALID_URL";qe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const AM=null;function wf(e){return te.isPlainObject(e)||te.isArray(e)}function lw(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function Id(e,t,r){return e?e.concat(t).map(function(o,s){return o=lw(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function jM(e){return te.isArray(e)&&!e.some(wf)}const OM=te.toFlatObject(te,{},null,function(t){return/^is[A-Z]/.test(t)});function mu(e,t,r){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=te.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,_){return!te.isUndefined(_[b])});const n=r.metaTokens,o=r.visitor||f,s=r.dots,i=r.indexes,l=r.Blob||typeof Blob<"u"&&Blob,u=r.maxDepth===void 0?100:r.maxDepth,d=l&&te.isSpecCompliantForm(t);if(!te.isFunction(o))throw new TypeError("visitor must be a function");function p(g){if(g===null)return"";if(te.isDate(g))return g.toISOString();if(te.isBoolean(g))return g.toString();if(!d&&te.isBlob(g))throw new qe("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(g)||te.isTypedArray(g)?d&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,b,_){let y=g;if(te.isReactNative(t)&&te.isReactNativeBlob(g))return t.append(Id(_,b,s),p(g)),!1;if(g&&!_&&typeof g=="object"){if(te.endsWith(b,"{}"))b=n?b:b.slice(0,-2),g=JSON.stringify(g);else if(te.isArray(g)&&jM(g)||(te.isFileList(g)||te.endsWith(b,"[]"))&&(y=te.toArray(g)))return b=lw(b),y.forEach(function(S,w){!(te.isUndefined(S)||S===null)&&t.append(i===!0?Id([b],w,s):i===null?b:b+"[]",p(S))}),!1}return wf(g)?!0:(t.append(Id(_,b,s),p(g)),!1)}const m=[],h=Object.assign(OM,{defaultVisitor:f,convertValue:p,isVisitable:wf});function v(g,b,_=0){if(!te.isUndefined(g)){if(_>u)throw new qe("Object is too deeply nested ("+_+" levels). Max depth: "+u,qe.ERR_FORM_DATA_DEPTH_EXCEEDED);if(m.indexOf(g)!==-1)throw Error("Circular reference detected in "+b.join("."));m.push(g),te.forEach(g,function(x,S){(!(te.isUndefined(x)||x===null)&&o.call(t,x,te.isString(S)?S.trim():S,b,h))===!0&&v(x,b?b.concat(S):[S],_+1)}),m.pop()}}if(!te.isObject(e))throw new TypeError("data must be an object");return v(e),t}function _b(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Th(e,t){this._pairs=[],e&&mu(e,this,t)}const cw=Th.prototype;cw.append=function(t,r){this._pairs.push([t,r])};cw.toString=function(t){const r=t?function(n){return t.call(this,n,_b)}:_b;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function NM(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function uw(e,t,r){if(!t)return e;const n=r&&r.encode||NM,o=te.isFunction(r)?{serialize:r}:r,s=o&&o.serialize;let i;if(s?i=s(t,o):i=te.isURLSearchParams(t)?t.toString():new Th(t,o).toString(n),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class yb{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){te.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Ih={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},DM=typeof URLSearchParams<"u"?URLSearchParams:Th,kM=typeof FormData<"u"?FormData:null,MM=typeof Blob<"u"?Blob:null,LM={isBrowser:!0,classes:{URLSearchParams:DM,FormData:kM,Blob:MM},protocols:["http","https","file","blob","url","data"]},$h=typeof window<"u"&&typeof document<"u",Ef=typeof navigator=="object"&&navigator||void 0,zM=$h&&(!Ef||["ReactNative","NativeScript","NS"].indexOf(Ef.product)<0),FM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",VM=$h&&window.location.href||"http://localhost",BM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$h,hasStandardBrowserEnv:zM,hasStandardBrowserWebWorkerEnv:FM,navigator:Ef,origin:VM},Symbol.toStringTag,{value:"Module"})),lr={...BM,...LM};function HM(e,t){return mu(e,new lr.classes.URLSearchParams,{visitor:function(r,n,o,s){return lr.isNode&&te.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function UM(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function WM(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function dw(e){function t(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),u=s>=r.length;return i=!i&&te.isArray(o)?o.length:i,u?(te.hasOwnProp(o,i)?o[i]=te.isArray(o[i])?o[i].concat(n):[o[i],n]:o[i]=n,!l):((!o[i]||!te.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],s)&&te.isArray(o[i])&&(o[i]=WM(o[i])),!l)}if(te.isFormData(e)&&te.isFunction(e.entries)){const r={};return te.forEachEntry(e,(n,o)=>{t(UM(n),o,r,0)}),r}return null}const is=(e,t)=>e!=null&&te.hasOwnProp(e,t)?e[t]:void 0;function qM(e,t,r){if(te.isString(e))try{return(t||JSON.parse)(e),te.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ia={transitional:Ih,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=te.isObject(t);if(s&&te.isHTMLForm(t)&&(t=new FormData(t)),te.isFormData(t))return o?JSON.stringify(dw(t)):t;if(te.isArrayBuffer(t)||te.isBuffer(t)||te.isStream(t)||te.isFile(t)||te.isBlob(t)||te.isReadableStream(t))return t;if(te.isArrayBufferView(t))return t.buffer;if(te.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){const u=is(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return HM(t,u).toString();if((l=te.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=is(this,"env"),p=d&&d.FormData;return mu(l?{"files[]":t}:t,p&&new p,u)}}return s||o?(r.setContentType("application/json",!1),qM(t)):t}],transformResponse:[function(t){const r=is(this,"transitional")||Ia.transitional,n=r&&r.forcedJSONParsing,o=is(this,"responseType"),s=o==="json";if(te.isResponse(t)||te.isReadableStream(t))return t;if(t&&te.isString(t)&&(n&&!o||s)){const l=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,is(this,"parseReviver"))}catch(u){if(l)throw u.name==="SyntaxError"?qe.from(u,qe.ERR_BAD_RESPONSE,this,null,is(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:lr.classes.FormData,Blob:lr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch","query"],e=>{Ia.headers[e]={}});function $d(e,t){const r=this||Ia,n=t||r,o=br.from(n.headers);let s=n.data;return te.forEach(e,function(l){s=l.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function pw(e){return!!(e&&e.__CANCEL__)}let $a=class extends qe{constructor(t,r,n){super(t??"canceled",qe.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function fw(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new qe("Request failed with status code "+r.status,r.status>=400&&r.status<500?qe.ERR_BAD_REQUEST:qe.ERR_BAD_RESPONSE,r.config,r.request,r))}function GM(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function KM(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),p=n[s];i||(i=d),r[o]=u,n[o]=d;let f=s,m=0;for(;f!==o;)m+=r[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),d-i<t)return;const h=p&&d-p;return h?Math.round(m*1e3/h):void 0}}function XM(e,t){let r=0,n=1e3/t,o,s;const i=(d,p=Date.now())=>{r=p,o=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const p=Date.now(),f=p-r;f>=n?i(d,p):(o=d,s||(s=setTimeout(()=>{s=null,i(o)},n-f)))},()=>o&&i(o)]}const nc=(e,t,r=3)=>{let n=0;const o=KM(50,250);return XM(s=>{const i=s.loaded,l=s.lengthComputable?s.total:void 0,u=l!=null?Math.min(i,l):i,d=Math.max(0,u-n),p=o(d);n=Math.max(n,u);const f={loaded:u,total:l,progress:l?u/l:void 0,bytes:d,rate:p||void 0,estimated:p&&l?(l-u)/p:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},r)},xb=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},wb=e=>(...t)=>te.asap(()=>e(...t)),YM=lr.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,lr.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(lr.origin),lr.navigator&&/(msie|trident)/i.test(lr.navigator.userAgent)):()=>!0,JM=lr.hasStandardBrowserEnv?{write(e,t,r,n,o,s,i){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];te.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),te.isString(n)&&l.push(`path=${n}`),te.isString(o)&&l.push(`domain=${o}`),s===!0&&l.push("secure"),te.isString(i)&&l.push(`SameSite=${i}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),o=n.indexOf("=");if(o!==-1&&n.slice(0,o)===e)return decodeURIComponent(n.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ZM(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function QM(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function mw(e,t,r){let n=!ZM(t);return e&&(n||r===!1)?QM(e,t):t}const Eb=e=>e instanceof br?{...e}:e;function No(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(d,p,f,m){return te.isPlainObject(d)&&te.isPlainObject(p)?te.merge.call({caseless:m},d,p):te.isPlainObject(p)?te.merge({},p):te.isArray(p)?p.slice():p}function o(d,p,f,m){if(te.isUndefined(p)){if(!te.isUndefined(d))return n(void 0,d,f,m)}else return n(d,p,f,m)}function s(d,p){if(!te.isUndefined(p))return n(void 0,p)}function i(d,p){if(te.isUndefined(p)){if(!te.isUndefined(d))return n(void 0,d)}else return n(void 0,p)}function l(d,p,f){if(te.hasOwnProp(t,f))return n(d,p);if(te.hasOwnProp(e,f))return n(void 0,d)}const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(d,p,f)=>o(Eb(d),Eb(p),f,!0)};return te.forEach(Object.keys({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const f=te.hasOwnProp(u,p)?u[p]:o,m=te.hasOwnProp(e,p)?e[p]:void 0,h=te.hasOwnProp(t,p)?t[p]:void 0,v=f(m,h,p);te.isUndefined(v)&&f!==l||(r[p]=v)}),r}const eL=["content-type","content-length"];function tL(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,o])=>{eL.includes(n.toLowerCase())&&e.set(n,o)})}const rL=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),hw=e=>{const t=No({},e),r=m=>te.hasOwnProp(t,m)?t[m]:void 0,n=r("data");let o=r("withXSRFToken");const s=r("xsrfHeaderName"),i=r("xsrfCookieName");let l=r("headers");const u=r("auth"),d=r("baseURL"),p=r("allowAbsoluteUrls"),f=r("url");if(t.headers=l=br.from(l),t.url=uw(mw(d,f,p),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?rL(u.password):""))),te.isFormData(n)&&(lr.hasStandardBrowserEnv||lr.hasStandardBrowserWebWorkerEnv?l.setContentType(void 0):te.isFunction(n.getHeaders)&&tL(l,n.getHeaders(),r("formDataHeaderPolicy"))),lr.hasStandardBrowserEnv&&(te.isFunction(o)&&(o=o(t)),o===!0||o==null&&YM(t.url))){const h=s&&i&&JM.read(i);h&&l.set(s,h)}return t},nL=typeof XMLHttpRequest<"u",oL=nL&&function(e){return new Promise(function(r,n){const o=hw(e);let s=o.data;const i=br.from(o.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:d}=o,p,f,m,h,v;function g(){h&&h(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function _(){if(!b)return;const x=br.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),w={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};fw(function(T){r(T),g()},function(T){n(T),g()},w),b=null}"onloadend"in b?b.onloadend=_:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(_)},b.onabort=function(){b&&(n(new qe("Request aborted",qe.ECONNABORTED,e,b)),g(),b=null)},b.onerror=function(S){const w=S&&S.message?S.message:"Network Error",I=new qe(w,qe.ERR_NETWORK,e,b);I.event=S||null,n(I),g(),b=null},b.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const w=o.transitional||Ih;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),n(new qe(S,w.clarifyTimeoutError?qe.ETIMEDOUT:qe.ECONNABORTED,e,b)),g(),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&te.forEach(i.toJSON(),function(S,w){b.setRequestHeader(w,S)}),te.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),l&&l!=="json"&&(b.responseType=o.responseType),d&&([m,v]=nc(d,!0),b.addEventListener("progress",m)),u&&b.upload&&([f,h]=nc(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(p=x=>{b&&(n(!x||x.type?new $a(null,e,b):x),b.abort(),g(),b=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const y=GM(o.url);if(y&&!lr.protocols.includes(y)){n(new qe("Unsupported protocol "+y+":",qe.ERR_BAD_REQUEST,e));return}b.send(s||null)})},sL=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(d){if(!o){o=!0,l();const p=d instanceof Error?d:this.reason;n.abort(p instanceof qe?p:new $a(p instanceof Error?p.message:p))}};let i=t&&setTimeout(()=>{i=null,s(new qe(`timeout of ${t}ms exceeded`,qe.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:u}=n;return u.unsubscribe=()=>te.asap(l),u}},iL=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},aL=async function*(e,t){for await(const r of lL(e))yield*iL(r,t)},lL=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Sb=(e,t,r,n)=>{const o=aL(e,t);let s=0,i,l=u=>{i||(i=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:d,value:p}=await o.next();if(d){l(),u.close();return}let f=p.byteLength;if(r){let m=s+=f;r(m)}u.enqueue(new Uint8Array(p))}catch(d){throw l(d),d}},cancel(u){return l(u),o.return()}},{highWaterMark:2})};function cL(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let i=n.length;const l=n.length;for(let h=0;h<l;h++)if(n.charCodeAt(h)===37&&h+2<l){const v=n.charCodeAt(h+1),g=n.charCodeAt(h+2);(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(i-=2,h+=2)}let u=0,d=l-1;const p=h=>h>=2&&n.charCodeAt(h-2)===37&&n.charCodeAt(h-1)===51&&(n.charCodeAt(h)===68||n.charCodeAt(h)===100);d>=0&&(n.charCodeAt(d)===61?(u++,d--):p(d)&&(u++,d-=3)),u===1&&d>=0&&(n.charCodeAt(d)===61||p(d))&&u++;const m=Math.floor(i/4)*3-(u||0);return m>0?m:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let s=0;for(let i=0,l=n.length;i<l;i++){const u=n.charCodeAt(i);if(u<128)s+=1;else if(u<2048)s+=2;else if(u>=55296&&u<=56319&&i+1<l){const d=n.charCodeAt(i+1);d>=56320&&d<=57343?(s+=4,i++):s+=3}else s+=3}return s}const Ah="1.16.0",Cb=64*1024,{isFunction:el}=te,Pb=(e,...t)=>{try{return!!e(...t)}catch{return!1}},uL=e=>{const t=te.global??globalThis,{ReadableStream:r,TextEncoder:n}=t;e=te.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:i}=e,l=o?el(o):typeof fetch=="function",u=el(s),d=el(i);if(!l)return!1;const p=l&&el(r),f=l&&(typeof n=="function"?(_=>y=>_.encode(y))(new n):async _=>new Uint8Array(await new s(_).arrayBuffer())),m=u&&p&&Pb(()=>{let _=!1;const y=new s(lr.origin,{body:new r,method:"POST",get duplex(){return _=!0,"half"}}),x=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),_&&!x}),h=d&&p&&Pb(()=>te.isReadableStream(new i("").body)),v={stream:h&&(_=>_.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!v[_]&&(v[_]=(y,x)=>{let S=y&&y[_];if(S)return S.call(y);throw new qe(`Response type '${_}' is not supported`,qe.ERR_NOT_SUPPORT,x)})});const g=async _=>{if(_==null)return 0;if(te.isBlob(_))return _.size;if(te.isSpecCompliantForm(_))return(await new s(lr.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(te.isArrayBufferView(_)||te.isArrayBuffer(_))return _.byteLength;if(te.isURLSearchParams(_)&&(_=_+""),te.isString(_))return(await f(_)).byteLength},b=async(_,y)=>{const x=te.toFiniteNumber(_.getContentLength());return x??g(y)};return async _=>{let{url:y,method:x,data:S,signal:w,cancelToken:I,timeout:T,onDownloadProgress:R,onUploadProgress:P,responseType:$,headers:A,withCredentials:k="same-origin",fetchOptions:D,maxContentLength:z,maxBodyLength:X}=hw(_);const V=te.isNumber(z)&&z>-1,Y=te.isNumber(X)&&X>-1;let U=o||fetch;$=$?($+"").toLowerCase():"text";let F=sL([w,I&&I.toAbortSignal()],T),H=null;const ee=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let O;try{if(V&&typeof y=="string"&&y.startsWith("data:")&&cL(y)>z)throw new qe("maxContentLength size of "+z+" exceeded",qe.ERR_BAD_RESPONSE,_,H);if(Y&&x!=="get"&&x!=="head"){const J=await b(A,S);if(typeof J=="number"&&isFinite(J)&&J>X)throw new qe("Request body larger than maxBodyLength limit",qe.ERR_BAD_REQUEST,_,H)}if(P&&m&&x!=="get"&&x!=="head"&&(O=await b(A,S))!==0){let J=new s(y,{method:"POST",body:S,duplex:"half"}),K;if(te.isFormData(S)&&(K=J.headers.get("content-type"))&&A.setContentType(K),J.body){const[re,se]=xb(O,nc(wb(P)));S=Sb(J.body,Cb,re,se)}}te.isString(k)||(k=k?"include":"omit");const M=u&&"credentials"in s.prototype;if(te.isFormData(S)){const J=A.getContentType();J&&/^multipart\/form-data/i.test(J)&&!/boundary=/i.test(J)&&A.delete("content-type")}A.set("User-Agent","axios/"+Ah,!1);const G={...D,signal:F,method:x.toUpperCase(),headers:A.normalize().toJSON(),body:S,duplex:"half",credentials:M?k:void 0};H=u&&new s(y,G);let L=await(u?U(H,D):U(y,G));if(V){const J=te.toFiniteNumber(L.headers.get("content-length"));if(J!=null&&J>z)throw new qe("maxContentLength size of "+z+" exceeded",qe.ERR_BAD_RESPONSE,_,H)}const W=h&&($==="stream"||$==="response");if(h&&L.body&&(R||V||W&&ee)){const J={};["status","statusText","headers"].forEach(ie=>{J[ie]=L[ie]});const K=te.toFiniteNumber(L.headers.get("content-length")),[re,se]=R&&xb(K,nc(wb(R),!0))||[];let Z=0;const ne=ie=>{if(V&&(Z=ie,Z>z))throw new qe("maxContentLength size of "+z+" exceeded",qe.ERR_BAD_RESPONSE,_,H);re&&re(ie)};L=new i(Sb(L.body,Cb,ne,()=>{se&&se(),ee&&ee()}),J)}$=$||"text";let B=await v[te.findKey(v,$)||"text"](L,_);if(V&&!h&&!W){let J;if(B!=null&&(typeof B.byteLength=="number"?J=B.byteLength:typeof B.size=="number"?J=B.size:typeof B=="string"&&(J=typeof n=="function"?new n().encode(B).byteLength:B.length)),typeof J=="number"&&J>z)throw new qe("maxContentLength size of "+z+" exceeded",qe.ERR_BAD_RESPONSE,_,H)}return!W&&ee&&ee(),await new Promise((J,K)=>{fw(J,K,{data:B,headers:br.from(L.headers),status:L.status,statusText:L.statusText,config:_,request:H})})}catch(M){if(ee&&ee(),F&&F.aborted&&F.reason instanceof qe){const G=F.reason;throw G.config=_,H&&(G.request=H),M!==G&&(G.cause=M),G}throw M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new qe("Network Error",qe.ERR_NETWORK,_,H,M&&M.response),{cause:M.cause||M}):qe.from(M,M&&M.code,_,H,M&&M.response)}}},dL=new Map,gw=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let i=s.length,l=i,u,d,p=dL;for(;l--;)u=s[l],d=p.get(u),d===void 0&&p.set(u,d=l?new Map:uL(t)),p=d;return d};gw();const jh={http:AM,xhr:oL,fetch:{get:gw}};te.forEach(jh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Rb=e=>`- ${e}`,pL=e=>te.isFunction(e)||e===null||e===!1;function fL(e,t){e=te.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let i=0;i<r;i++){n=e[i];let l;if(o=n,!pL(n)&&(o=jh[(l=String(n)).toLowerCase()],o===void 0))throw new qe(`Unknown adapter '${l}'`);if(o&&(te.isFunction(o)||(o=o.get(t))))break;s[l||"#"+i]=o}if(!o){const i=Object.entries(s).map(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?i.length>1?`since :
`+i.map(Rb).join(`
`):" "+Rb(i[0]):"as no adapter specified";throw new qe("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o}const vw={getAdapter:fL,adapters:jh};function Ad(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $a(null,e)}function Tb(e){return Ad(e),e.headers=br.from(e.headers),e.data=$d.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),vw.getAdapter(e.adapter||Ia.adapter,e)(e).then(function(n){Ad(e),e.response=n;try{n.data=$d.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=br.from(n.headers),n},function(n){if(!pw(n)&&(Ad(e),n&&n.response)){e.response=n.response;try{n.response.data=$d.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=br.from(n.response.headers)}return Promise.reject(n)})}const hu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hu[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Ib={};hu.transitional=function(t,r,n){function o(s,i){return"[Axios v"+Ah+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,l)=>{if(t===!1)throw new qe(o(i," has been removed"+(r?" in "+r:"")),qe.ERR_DEPRECATED);return r&&!Ib[i]&&(Ib[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,l):!0}};hu.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function mL(e,t,r){if(typeof e!="object")throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const l=e[s],u=l===void 0||i(l,s,e);if(u!==!0)throw new qe("option "+s+" must be "+u,qe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new qe("Unknown option "+s,qe.ERR_BAD_OPTION)}}const Al={assertOptions:mL,validators:hu},Hr=Al.validators;let Ao=class{constructor(t){this.defaults=t||{},this.interceptors={request:new yb,response:new yb}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=(()=>{if(!o.stack)return"";const i=o.stack.indexOf(`
`);return i===-1?"":o.stack.slice(i+1)})();try{if(!n.stack)n.stack=s;else if(s){const i=s.indexOf(`
`),l=i===-1?-1:s.indexOf(`
`,i+1),u=l===-1?"":s.slice(l+1);String(n.stack).endsWith(u)||(n.stack+=`
`+s)}}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=No(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Al.assertOptions(n,{silentJSONParsing:Hr.transitional(Hr.boolean),forcedJSONParsing:Hr.transitional(Hr.boolean),clarifyTimeoutError:Hr.transitional(Hr.boolean),legacyInterceptorReqResOrdering:Hr.transitional(Hr.boolean)},!1),o!=null&&(te.isFunction(o)?r.paramsSerializer={serialize:o}:Al.assertOptions(o,{encode:Hr.function,serialize:Hr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Al.assertOptions(r,{baseUrl:Hr.spelling("baseURL"),withXsrfToken:Hr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&te.merge(s.common,s[r.method]);s&&te.forEach(["delete","get","head","post","put","patch","query","common"],v=>{delete s[v]}),r.headers=br.concat(i,s);const l=[];let u=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(r)===!1)return;u=u&&g.synchronous;const b=r.transitional||Ih;b&&b.legacyInterceptorReqResOrdering?l.unshift(g.fulfilled,g.rejected):l.push(g.fulfilled,g.rejected)});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let p,f=0,m;if(!u){const v=[Tb.bind(this),void 0];for(v.unshift(...l),v.push(...d),m=v.length,p=Promise.resolve(r);f<m;)p=p.then(v[f++],v[f++]);return p}m=l.length;let h=r;for(;f<m;){const v=l[f++],g=l[f++];try{h=v(h)}catch(b){g.call(this,b);break}}try{p=Tb.call(this,h)}catch(v){return Promise.reject(v)}for(f=0,m=d.length;f<m;)p=p.then(d[f++],d[f++]);return p}getUri(t){t=No(this.defaults,t);const r=mw(t.baseURL,t.url,t.allowAbsoluteUrls);return uw(r,t.params,t.paramsSerializer)}};te.forEach(["delete","get","head","options"],function(t){Ao.prototype[t]=function(r,n){return this.request(No(n||{},{method:t,url:r,data:(n||{}).data}))}});te.forEach(["post","put","patch","query"],function(t){function r(n){return function(s,i,l){return this.request(No(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Ao.prototype[t]=r(),t!=="query"&&(Ao.prototype[t+"Form"]=r(!0))});let hL=class bw{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(l=>{n.subscribe(l),s=l}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(s,i,l){n.reason||(n.reason=new $a(s,i,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new bw(function(o){t=o}),cancel:t}}};function gL(e){return function(r){return e.apply(null,r)}}function vL(e){return te.isObject(e)&&e.isAxiosError===!0}const Sf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Sf).forEach(([e,t])=>{Sf[t]=e});function _w(e){const t=new Ao(e),r=Q0(Ao.prototype.request,t);return te.extend(r,Ao.prototype,t,{allOwnKeys:!0}),te.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return _w(No(e,o))},r}const kt=_w(Ia);kt.Axios=Ao;kt.CanceledError=$a;kt.CancelToken=hL;kt.isCancel=pw;kt.VERSION=Ah;kt.toFormData=mu;kt.AxiosError=qe;kt.Cancel=kt.CanceledError;kt.all=function(t){return Promise.all(t)};kt.spread=gL;kt.isAxiosError=vL;kt.mergeConfig=No;kt.AxiosHeaders=br;kt.formToJSON=e=>dw(te.isHTMLForm(e)?new FormData(e):e);kt.getAdapter=vw.getAdapter;kt.HttpStatusCode=Sf;kt.default=kt;const{Axios:nre,AxiosError:Cf,CanceledError:ore,isCancel:sre,CancelToken:ire,VERSION:are,all:lre,Cancel:cre,isAxiosError:ure,spread:dre,toFormData:pre,AxiosHeaders:oc,HttpStatusCode:fre,formToJSON:mre,getAdapter:hre,mergeConfig:gre,create:vre}=kt,$b="avalog_visitor_id",Ab=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)});let _o=null;const jb=()=>{if(_o)return _o;try{const e=localStorage.getItem($b);if(e)return _o=e,e;const t=Ab();return localStorage.setItem($b,t),_o=t,t}catch{return _o||(_o=Ab()),_o}},bL=e=>"/api",_L=bL(),yL=["/license","/city","/mailing-view","/port-services","/additional-service-at-the-port","/carrier","/container-type","/form","/chat/widget","/rent-calculator","/international-auto"],xL=e=>{if(!e)return"";try{return new URL(e,window.location.origin).pathname.replace(/^\/api/,"")}catch{return e.replace(/^https?:\/\/[^/]+/i,"").replace(/^\/api/,"")}},yw=e=>{const t=xL(e);return yL.some(r=>t===r||t.startsWith(`${r}/`))},wL=e=>{if(e){if(e instanceof oc){e.delete("Authorization"),e.delete("authorization");return}delete e.Authorization,delete e.authorization}},xw=(e,t)=>{if(e){if(e instanceof oc){e.set("Authorization",t);return}e.Authorization=t}},je=kt.create({baseURL:_L,headers:{"Content-Type":"application/json"}});je.interceptors.request.use(async e=>{const t=e,r=yw(t.url),n=t.skipAuth===!0||r,o=Cr.getAccessToken();return r&&wL(t.headers),!n&&o&&o.trim()!==""&&xw(t.headers,`Bearer ${o}`),t.headers instanceof oc?t.headers.set("X-Visitor-Id",jb()):t.headers&&(t.headers["X-Visitor-Id"]=jb()),t.data instanceof FormData&&(t.headers instanceof oc?t.headers.delete("Content-Type"):t.headers&&delete t.headers["Content-Type"]),t},e=>Promise.reject(e));let tl=null;const EL=()=>(tl||(tl=Ki.refreshToken().finally(()=>{tl=null})),tl);je.interceptors.response.use(e=>e,async e=>{var l,u,d,p,f,m;const t=e.config,r=yw(t==null?void 0:t.url),n=(t==null?void 0:t.skipAuth)===!0||r,o=(l=e.response)==null?void 0:l.status,s=o===401&&!n,i=!!Cr.getRefreshToken()||!!localStorage.getItem("user");if(s&&!(t!=null&&t._retry)&&t&&i&&(t._retry=!0,await EL())){const v=Cr.getAccessToken();return v&&xw(t.headers,`Bearer ${v}`),je(t)}return s&&Cr.getAccessToken()&&(Cr.clearTokens(),typeof window<"u"&&window.dispatchEvent(new CustomEvent("auth:session-expired"))),console.error("❌ API Error:",(d=(u=e.config)==null?void 0:u.method)==null?void 0:d.toUpperCase(),(p=e.config)==null?void 0:p.url,"→",o??"network"),o===404&&((m=(f=e.config)==null?void 0:f.url)!=null&&m.includes("/port-services/")),Promise.reject(e)});const bre=Object.freeze(Object.defineProperty({__proto__:null,default:je},Symbol.toStringTag,{value:"Module"})),SL=new Set(["fa","ar","he","ur"]);function ww(e){return(e||"").toLowerCase().split("-")[0]}function CL(e){return SL.has(ww(e))}function Ew(e){if(typeof document>"u")return;const t=document.documentElement;t.setAttribute("dir",CL(e)?"rtl":"ltr"),e&&t.setAttribute("lang",ww(e))}function Sw(e){switch((e??"").toLowerCase().split("-")[0]){case"en":return"en";case"zho":case"zh":return"zh-cn";case"tr":return"tr";case"hi":return"hi";default:return"ru"}}wn.use(W$).use(q$).use(G$).init({supportedLngs:["ru","en","zho","tr","hi"],ns:["translation","common"],defaultNS:"translation",fallbackLng:{default:["en","ru"]},load:"languageOnly",nonExplicitSupportedLngs:!0,debug:!1,detection:{order:["localStorage","queryString","cookie","navigator"],caches:["localStorage"],lookupLocalStorage:"avalog.i18n.language",lookupQuerystring:"lang"},interpolation:{escapeValue:!1}});Ew(wn.resolvedLanguage??wn.language);wn.on("languageChanged",Ew);Xm.locale(Sw(wn.resolvedLanguage??wn.language));wn.on("languageChanged",e=>Xm.locale(Sw(e)));const Rt=(e,t)=>wn.isInitialized?wn.t(e,t):t,Cr={setTokens(e,t){localStorage.setItem("access_token",e),t&&localStorage.setItem("refresh_token",t)},getAccessToken(){return localStorage.getItem("access_token")},getRefreshToken(){return localStorage.getItem("refresh_token")},clearTokens(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token"),localStorage.removeItem("verification_token"),localStorage.removeItem("isAuthenticated"),localStorage.removeItem("user_email")}},Cw=e=>{var t;if(e instanceof Cf){const r=(t=e.response)==null?void 0:t.data;return r&&(r.message||r.error||r.detail||(Array.isArray(r.errors)?r.errors.join(", "):""))||""}return e instanceof Error&&e.message||""},PL=(e,t)=>{const r=e.trim();return r?/already\s*exist|email.*tak|уже\s*(зарегистрирован|существует|занят)/i.test(r)?Rt("authForm.api.emailTaken","Этот email уже зарегистрирован. Войдите в существующий аккаунт или восстановите пароль через «Забыли пароль?»."):/unauthorized|bad\s*credentials|invalid\s*credentials|authentication\s*failed|user\s*not\s*found/i.test(r)?Rt("authForm.api.badCredentials","Неверный email или пароль."):/access\s*denied|forbidden/i.test(r)?Rt("authForm.api.forbidden","Недостаточно прав для этого действия."):/captcha|turnstile/i.test(r)?Rt("authForm.api.captchaFailed","Не удалось пройти проверку «я не робот». Обновите страницу и попробуйте снова."):/token.*(expired|invalid)|invalid.*token|просроч/i.test(r)?Rt("authForm.api.linkExpired","Ссылка недействительна или просрочена."):/[а-яё]/i.test(r)?r:t:t},Bn=(e,t)=>PL(Cw(e),t),Ki={async login(e,t,r=!1){var o;const n=btoa(`${e}:${t}`);try{const s=await je.post("/sign-in",null,{headers:{Authorization:`Basic ${n}`},params:{rememberMe:r},skipAuth:!0});return Cr.setTokens(s.data.access_token,s.data.refresh_token),localStorage.setItem("user_email",s.data.user_name||e),localStorage.setItem("isAuthenticated","true"),{success:!0,data:s.data}}catch(s){const i=s instanceof Cf?(o=s.response)==null?void 0:o.status:void 0;if(i===423)return{success:!1,message:Bn(s,Rt("authForm.api.accountLocked","Аккаунт временно заблокирован после нескольких неудачных попыток входа. Попробуйте через 15 минут или восстановите пароль."))};const l=i===401?Rt("authForm.api.wrongCredentials","Неверный email или пароль"):Rt("authForm.api.loginError","Ошибка при авторизации");return{success:!1,message:Bn(s,l)}}},async register(e,t,r,n){var o;try{const s=await je.post("/sign-up",{username:e,userPassword:t,phoneNumber:r,fullName:n},{skipAuth:!0});return s.data.access_token&&Cr.setTokens(s.data.access_token,s.data.refresh_token),localStorage.setItem("user_email",s.data.user_name||e),localStorage.setItem("isAuthenticated","true"),{success:!0,data:s.data}}catch(s){const i=s instanceof Cf,l=i?(o=s.response)==null?void 0:o.status:void 0;if(i&&!s.response)return{success:!1,message:Rt("authForm.api.networkError","Не удалось связаться с сервером. Проверьте интернет-соединение и попробуйте ещё раз.")};const u=Cw(s);if(l===409||/already\s*exist/i.test(u))return{success:!1,field:"email",message:Rt("authForm.api.emailTaken","Этот email уже зарегистрирован. Войдите в существующий аккаунт или восстановите пароль через «Забыли пароль?».")};switch(l){case 400:case 422:return{success:!1,message:Bn(s,Rt("authForm.api.registerValidation","Проверьте правильность полей: email в формате name@domain.ru, пароль не короче 8 символов, телефон с кодом страны (+7…), ФИО полностью."))};case 429:return{success:!1,message:Rt("authForm.api.tooManyAttempts","Слишком много попыток регистрации подряд. Подождите минуту и попробуйте снова.")};case 500:case 502:case 503:case 504:return{success:!1,message:Rt("authForm.api.serviceUnavailable","Сервис временно недоступен. Повторите попытку через несколько минут — если ошибка не исчезнет, напишите нам на hello@avalog.ru.")};default:return{success:!1,message:Bn(s,Rt("authForm.api.registerFailed","Не удалось завершить регистрацию. Проверьте введённые данные и попробуйте снова."))}}}},async refreshToken(){const e=Cr.getRefreshToken();try{const t=await je.post("/refresh-token",null,{headers:e?{Authorization:`Bearer ${e}`}:void 0,withCredentials:!0,skipAuth:!0});return Cr.setTokens(t.data.access_token,t.data.refresh_token),!0}catch{return!1}},async passwordResetRequest(e){return{message:(await je.post("/auth/password-reset/request",{username:e},{skipAuth:!0})).data.message||Rt("authForm.api.resetRequested","Если пользователь существует, письмо отправлено")}},async passwordResetConfirm(e,t){try{return{success:!0,message:(await je.post("/auth/password-reset/confirm",{token:e,newPassword:t},{skipAuth:!0})).data.message||Rt("authForm.api.passwordUpdated","Пароль успешно обновлён")}}catch(r){return{success:!1,message:Bn(r,Rt("authForm.api.tokenInvalid","Токен неверен или просрочен"))}}},async verifyEmailConfirm(e){try{return await je.post("/auth/verify-email/confirm",{token:e},{skipAuth:!0}),{success:!0}}catch(t){return{success:!1,message:Bn(t,Rt("authForm.api.linkExpired","Ссылка недействительна или просрочена."))}}},async verifyEmailResend(){return(await je.post("/auth/verify-email/resend")).data},async requestEmailChange(e,t){var r;try{return await je.post("/user/email/change-request",{newEmail:e,currentPassword:t}),{success:!0}}catch(n){const o=n==null?void 0:n.response,s=(r=o==null?void 0:o.data)==null?void 0:r.detail;return s==="NEW_EMAIL_TAKEN"?{success:!1,message:Rt("authForm.api.newEmailTaken","Этот email уже занят другим аккаунтом.")}:s==="NEW_EMAIL_SAME_AS_CURRENT"?{success:!1,message:Rt("authForm.api.newEmailSame","Новый email совпадает с текущим.")}:(o==null?void 0:o.status)===401?{success:!1,message:Rt("authForm.api.wrongCurrentPassword","Текущий пароль введён неверно.")}:{success:!1,message:Bn(n,Rt("authForm.api.emailChangeFailed","Не удалось запросить смену email."))}}},async confirmEmailChange(e){try{return await je.post("/user/email/change-confirm",{token:e},{skipAuth:!0}),{success:!0}}catch(t){return{success:!1,message:Bn(t,Rt("authForm.api.linkExpired","Ссылка недействительна или просрочена."))}}},async revokeAllSessions(){return(await je.post("/auth/sessions/revoke-all")).data},async logout(){const e=Cr.getRefreshToken();if(!e){Cr.clearTokens();return}try{await je.post("/logout",null,{headers:{Authorization:`Bearer ${e}`},skipAuth:!0})}catch{}finally{Cr.clearTokens()}}},RL={merge(){return je.post("/statistics/merge-anonymous").then(e=>e.data)}};let cn=null,ro=!1;async function Pw(){if(ro)return;const e="phc_ALJZbeach8myJ85TGKZ8xReLnvb6KCWGcVzJTLTMY8Av",{default:t}=await C(async()=>{const{default:r}=await Promise.resolve().then(()=>$7);return{default:r}},void 0);cn=t,t.init(e,{api_host:"https://eu.i.posthog.com",capture_pageview:!1,capture_pageleave:!0,session_recording:{maskAllInputs:!0,maskTextSelector:"[data-ph-mask]",blockSelector:"[data-ph-block]",sampleRate:.01},loaded:r=>{},ip:!1,autocapture:!1}),ro=!0,IL()}function Rw(){return ro}function Do(e,t){ro&&cn&&cn.capture(e,t)}function Tw(e,t){!ro||!cn||cn.identify(e,t)}function Iw(){!ro||!cn||cn.reset()}const TL={"perplexity.ai":"Perplexity","chat.openai.com":"ChatGPT","chatgpt.com":"ChatGPT","claude.ai":"Claude","gemini.google.com":"Gemini","bard.google.com":"Gemini","ya.ru":"Yandex AI","yandex.ru/ai":"Yandex AI","gigachat.sber.ru":"GigaChat","gigachat.ru":"GigaChat","you.com":"You.com","phind.com":"Phind","bing.com":"Bing Copilot","copilot.microsoft.com":"Bing Copilot","poe.com":"Poe"};function IL(){if(!ro)return;const e=typeof document<"u"?document.referrer:"";if(!e)return;let t=null;for(const[r,n]of Object.entries(TL))if(e.includes(r)){t=n;break}!t||!cn||cn.capture("ai_referrer_visit",{ai_engine:t,landing_page:typeof window<"u"?window.location.pathname:"",referrer:e})}function $w(e){ro&&cn&&cn.capture("$pageview",{$current_url:window.location.origin+e})}const $L=Object.freeze(Object.defineProperty({__proto__:null,capturePageview:$w,capturePostHog:Do,identifyPostHog:Tw,initPostHog:Pw,isPostHogActive:Rw,resetPostHog:Iw},Symbol.toStringTag,{value:"Module"})),Aw=a.createContext(void 0),AL=()=>{const e=localStorage.getItem("user");if(!e)return null;try{return JSON.parse(e)}catch{return localStorage.removeItem("user"),null}},jL=({children:e})=>{const[t,r]=a.useState(AL),[n,o]=a.useState(()=>localStorage.getItem("isAuthenticated")==="true"),s=(u,d)=>{const p={email:d.email,fullName:d.fullName||d.user_name||d.email,phone:d.phoneNumber||""};r(p),o(!0),localStorage.setItem("user",JSON.stringify(p)),localStorage.setItem("access_token",u),localStorage.setItem("isAuthenticated","true"),typeof window<"u"&&window.dispatchEvent(new CustomEvent("auth:logged-in")),RL.merge().catch(()=>{}),Tw(p.email,{fullName:p.fullName}),Do("auth_login")},i=()=>{Do("auth_logout"),Iw(),r(null),o(!1),Ki.logout().catch(()=>{}),Cr.clearTokens(),localStorage.removeItem("user")},l=async()=>{try{const u=await je.get("/user"),d=u.data.roles??[],p=u.data.tier??null;r(f=>f&&{...f,roles:d,tier:p});try{const f=localStorage.getItem("user");if(f){const m=JSON.parse(f);localStorage.setItem("user",JSON.stringify({...m,roles:d,tier:p}))}}catch{}return d}catch{return[]}};return a.useEffect(()=>{n&&(!(t!=null&&t.roles)||(t==null?void 0:t.tier)===void 0)&&l()},[n]),c.jsx(Aw.Provider,{value:{user:t,login:s,logout:i,isAuthenticated:n,refreshProfile:l},children:e})},OL={user:null,isAuthenticated:!1,login:()=>{},logout:()=>{},refreshProfile:()=>Promise.resolve([])},Aa=()=>a.useContext(Aw)??OL,NL="_authPopup_19voi_1",DL="_authPopup__content_19voi_13",kL="_authPopup__closeButton_19voi_25",ML="_authPopup__title_19voi_43",LL="_authPopup__tabs_19voi_50",zL="_authPopup__tab_19voi_50",FL="_authPopup__tabActive_19voi_70",VL="_authPopup__error_19voi_82",BL="_authPopup__success_19voi_91",HL="_authPopup__link_19voi_100",UL="_authPopup__hint_19voi_114",WL="_authPopup__fieldError_19voi_120",qL="_authPopup__inputError_19voi_128",GL="_authPopup__form_19voi_154",KL="_authPopup__formGroup_19voi_158",XL="_authPopup__input_19voi_128",YL="_authPopup__buttonsContainer_19voi_180",JL="_authPopup__rememberRow_19voi_188",ZL="_authPopup__rememberLabel_19voi_192",QL="_authPopup__rememberCheckbox_19voi_204",ez="_authPopup__submitButton_19voi_224",tz="_authPopup__registerButton_19voi_224",rz="_passwordInput_19voi_254",nz="_togglePassword_19voi_257",Ue={authPopup:NL,authPopup__content:DL,authPopup__closeButton:kL,authPopup__title:ML,authPopup__tabs:LL,authPopup__tab:zL,authPopup__tabActive:FL,authPopup__error:VL,authPopup__success:BL,authPopup__link:HL,authPopup__hint:UL,authPopup__fieldError:WL,authPopup__inputError:qL,authPopup__form:GL,authPopup__formGroup:KL,authPopup__input:XL,authPopup__buttonsContainer:YL,authPopup__rememberRow:JL,authPopup__rememberLabel:ZL,authPopup__rememberCheckbox:QL,authPopup__submitButton:ez,authPopup__registerButton:tz,passwordInput:rz,togglePassword:nz},Ob={0:{label:"",color:"transparent"},1:{label:"Слабый",color:"#ff4d4f"},2:{label:"Средний",color:"#faad14"},3:{label:"Хороший",color:"#52c41a"},4:{label:"Сильный",color:"#13a10e"}},oz=e=>{let t=0;return/[a-z]/.test(e)&&t++,/[A-Z]/.test(e)&&t++,/[0-9]/.test(e)&&t++,/[^a-zA-Z0-9]/.test(e)&&t++,t},sz=e=>{if(!e)return{score:0,...Ob[0]};const t=e.length,r=oz(e);let n=1;return t>=16||t>=12&&r>=3?n=4:t>=12||t>=10&&r>=3?n=3:t>=8&&r>=2?n=2:(t>=8,n=1),{score:n,...Ob[n]}},iz="_strength_1iugs_1",az="_bar_1iugs_9",lz="_segment_1iugs_15",cz="_label_1iugs_22",rl={strength:iz,bar:az,segment:lz,label:cz},uz=({password:e,theme:t="light"})=>{const{score:r,label:n,color:o}=a.useMemo(()=>sz(e),[e]),s=t==="dark"?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.08)";return c.jsxs("div",{className:rl.strength,"aria-live":"polite",children:[c.jsx("div",{className:rl.bar,children:[1,2,3,4].map(i=>c.jsx("div",{className:rl.segment,style:{background:r>=i?o:s}},i))}),c.jsx("span",{className:rl.label,style:{color:r===0?"transparent":o},children:n||"—"})]})},jd=8,Od=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,jw=({isOpen:e,onClose:t,onSuccess:r})=>{const[n,o]=a.useState("login"),[s,i]=a.useState("login"),[l,u]=a.useState(""),[d,p]=a.useState(""),[f,m]=a.useState(""),[h,v]=a.useState(""),[g,b]=a.useState({}),[_,y]=a.useState(!1),{login:x,refreshProfile:S}=Aa(),{t:w}=oo(),I=qm(),[T,R]=a.useState(!1),[P,$]=a.useState(!1),[A,k]=a.useState(""),[D,z]=a.useState(null),[X,V]=a.useState(!1),[Y,U]=a.useState(!1),[F,H]=a.useState(!1);a.useEffect(()=>{e&&i(n)},[e,n]);const ee=K=>{g[K]&&b(re=>({...re,[K]:void 0,_form:void 0}))},O=async K=>{K.preventDefault();const re={};if(l.trim()?Od.test(l.trim())||(re.email=w("authPopup.err.emailInvalid","Некорректный формат email")):re.email=w("authPopup.err.emailRequired","Введите email"),d||(re.password=w("authPopup.err.passwordRequired","Введите пароль")),b(re),!(Object.keys(re).length>0)){y(!0);try{const se=await Ki.login(l.trim(),d,F);if(se.success&&se.data){x(se.data.access_token,{email:l.trim(),user_name:se.data.user_name||l.trim()}),r(),t();try{const Z=await S();Z.includes("ROLE_SUPPLIER")||Z.includes("ROLE_SUPPLIER_VIEWER")?I("/supplier"):Z.includes("ROLE_ADMIN")&&I("/admin")}catch{}}else b({_form:se.message||w("authPopup.err.loginFailed","Неверный email или пароль")})}catch(se){console.error("Ошибка авторизации:",se),b({_form:(se==null?void 0:se.message)||w("authPopup.err.loginGeneric","Произошла ошибка при авторизации")})}finally{y(!1)}}},M=async K=>{K.preventDefault();const re={};f.trim()||(re.fullName=w("authPopup.err.fullNameRequired","Укажите ФИО")),l.trim()?Od.test(l.trim())||(re.email=w("authPopup.err.emailInvalid","Некорректный формат email")):re.email=w("authPopup.err.emailRequired","Введите email");const se=h.replace(/\D/g,"");if(h.trim()?se.length<10&&(re.phoneNumber=w("authPopup.err.phoneMin","Минимум 10 цифр")):re.phoneNumber=w("authPopup.err.phoneRequired","Укажите телефон"),d?d.length<jd&&(re.password=w("authPopup.err.passwordMin",`Минимум ${jd} символов`)):re.password=w("authPopup.err.passwordRequired","Введите пароль"),A?d&&d!==A&&(re.confirmPassword=w("authPopup.err.passwordMismatch","Пароли не совпадают")):re.confirmPassword=w("authPopup.err.confirmRequired","Подтвердите пароль"),b(re),Object.keys(re).length>0)return;const Z=h.replace(/^8/,"7").replace(/^7/,"+7");y(!0);try{const ne=await Ki.register(l.trim(),d,Z,f.trim());if(ne.success&&ne.data)x(ne.data.access_token,{email:l.trim(),user_name:ne.data.user_name||l.trim(),fullName:f.trim(),phoneNumber:Z}),r(),t();else{const ie=ne.message||w("authPopup.err.registerFailed","Ошибка при регистрации");ne.field?b({[ne.field]:ie,_form:ie}):b({_form:ie})}}catch(ne){console.error("Ошибка регистрации:",ne),b({_form:(ne==null?void 0:ne.message)||w("authPopup.err.registerGeneric","Произошла ошибка при регистрации")})}finally{y(!1)}},G=()=>{u(""),p(""),m(""),v(""),k(""),b({}),R(!1),$(!1),V(!1),z(null),y(!1)},L=K=>{o(K),i(K),G()},W=async K=>{K.preventDefault();const re={};if(l.trim()?Od.test(l.trim())||(re.email=w("authPopup.err.emailInvalid","Некорректный формат email")):re.email=w("authPopup.err.emailRequired","Введите email"),b(re),!(Object.keys(re).length>0)){U(!0);try{const{message:se}=await Ki.passwordResetRequest(l.trim());V(!0),z({message:se||w("authPopup.forgot.sent","Если пользователь существует, на указанный email отправлена ссылка для сброса пароля."),type:"success"})}catch(se){b({_form:(se==null?void 0:se.message)||w("authPopup.err.forgotFailed","Не удалось отправить письмо. Попробуйте позже.")})}finally{U(!1)}}},B=()=>c.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:c.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),J=()=>c.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:c.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})});return e?c.jsx("div",{className:Ue.authPopup,children:c.jsxs("div",{className:Ue.authPopup__content,children:[c.jsx("button",{className:Ue.authPopup__closeButton,onClick:t,children:"×"}),s!=="forgot"&&c.jsxs("div",{className:Ue.authPopup__tabs,children:[c.jsx("button",{type:"button",className:`${Ue.authPopup__tab} ${n==="login"?Ue.authPopup__tabActive:""}`,onClick:()=>L("login"),children:w("authPopup.tab.login","Авторизация")}),c.jsx("button",{type:"button",className:`${Ue.authPopup__tab} ${n==="register"?Ue.authPopup__tabActive:""}`,onClick:()=>L("register"),children:w("authPopup.tab.register","Регистрация")})]}),s==="forgot"&&c.jsx("h2",{className:Ue.authPopup__title,children:w("authPopup.forgot.title","Восстановление пароля")}),g._form&&c.jsx("div",{className:Ue.authPopup__error,children:g._form}),D&&s==="forgot"&&c.jsx("div",{className:D.type==="success"?Ue.authPopup__success:Ue.authPopup__error,children:D.message}),s==="forgot"&&c.jsxs("form",{onSubmit:W,className:Ue.authPopup__form,children:[c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"email",name:"email",id:"auth-forgot-email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:l,onChange:K=>{u(K.target.value),ee("email")},className:`${Ue.authPopup__input} ${g.email?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.email","Email"),disabled:Y,"aria-invalid":!!g.email}),g.email&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.email})]}),c.jsx("p",{className:Ue.authPopup__hint,children:X?w("authPopup.forgot.hintSent","Письмо с ссылкой на сброс пароля отправлено. Проверьте папку «Входящие» и «Спам» — обычно приходит в течение 1–2 минут. Ссылка действительна 30 минут."):w("authPopup.forgot.hint","Введите email, указанный при регистрации. Мы отправим ссылку для сброса пароля.")}),c.jsxs("div",{className:Ue.authPopup__buttonsContainer,children:[c.jsx("button",{type:"button",className:Ue.authPopup__registerButton,onClick:()=>{i("login"),b({}),V(!1),z(null)},disabled:Y,children:w("authPopup.back","Назад")}),c.jsx("button",{type:"submit",className:Ue.authPopup__submitButton,disabled:Y,children:Y?w("authPopup.forgot.sending","Отправка..."):X?w("authPopup.forgot.resend","Отправить ещё раз"):w("authPopup.forgot.submit","Отправить ссылку")})]})]}),s==="login"&&n==="login"&&c.jsxs("form",{onSubmit:O,className:Ue.authPopup__form,noValidate:!0,children:[c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"email",name:"username",id:"auth-login-email",autoComplete:"username",inputMode:"email",spellCheck:!1,value:l,onChange:K=>{u(K.target.value),ee("email")},className:`${Ue.authPopup__input} ${g.email?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.email","Email"),"aria-invalid":!!g.email,disabled:_}),g.email&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.email})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsxs("div",{className:Ue.passwordInput,children:[c.jsx("input",{type:T?"text":"password",name:"password",id:"auth-login-password",autoComplete:"current-password",spellCheck:!1,value:d,onChange:K=>{p(K.target.value),ee("password")},className:`${Ue.authPopup__input} ${g.password?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.password","Пароль"),"aria-invalid":!!g.password,disabled:_}),c.jsx("button",{type:"button",className:Ue.togglePassword,onClick:()=>R(!T),tabIndex:-1,children:T?c.jsx(B,{}):c.jsx(J,{})})]}),g.password&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.password}),c.jsx("button",{type:"button",className:Ue.authPopup__link,onClick:()=>{i("forgot"),b({}),z(null)},children:w("authPopup.forgotLink","Забыли пароль?")})]}),c.jsx("div",{className:Ue.authPopup__rememberRow,children:c.jsxs("label",{className:Ue.authPopup__rememberLabel,children:[c.jsx("input",{type:"checkbox",checked:F,onChange:K=>H(K.target.checked),className:Ue.authPopup__rememberCheckbox}),c.jsx("span",{children:w("authPopup.rememberMe","Запомнить меня на 90 дней")})]})}),c.jsx("div",{className:Ue.authPopup__buttonsContainer,children:c.jsx("button",{type:"submit",className:Ue.authPopup__submitButton,disabled:_,children:_?w("authPopup.signingIn","Вход..."):w("authPopup.signIn","Войти")})})]}),s==="register"&&c.jsxs("form",{onSubmit:M,className:Ue.authPopup__form,noValidate:!0,children:[c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"text",name:"fullName",id:"auth-register-fullname",autoComplete:"name",value:f,onChange:K=>{m(K.target.value),ee("fullName")},className:`${Ue.authPopup__input} ${g.fullName?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.fullName","ФИО"),"aria-invalid":!!g.fullName,disabled:_}),g.fullName&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.fullName})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"email",name:"email",id:"auth-register-email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:l,onChange:K=>{u(K.target.value),ee("email")},className:`${Ue.authPopup__input} ${g.email?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.email","Email"),"aria-invalid":!!g.email,disabled:_}),g.email&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.email})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"tel",name:"phone",id:"auth-register-phone",autoComplete:"tel",inputMode:"tel",value:h,onChange:K=>{v(K.target.value),ee("phoneNumber")},className:`${Ue.authPopup__input} ${g.phoneNumber?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.phone","Телефон (+7 900 123 45 67)"),"aria-invalid":!!g.phoneNumber,disabled:_}),g.phoneNumber&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.phoneNumber})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsxs("div",{className:Ue.passwordInput,children:[c.jsx("input",{type:T?"text":"password",name:"new-password",id:"auth-register-password",autoComplete:"new-password",spellCheck:!1,value:d,onChange:K=>{p(K.target.value),ee("password")},className:`${Ue.authPopup__input} ${g.password?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.newPassword",`Пароль (мин. ${jd} символов)`),"aria-invalid":!!g.password,disabled:_}),c.jsx("button",{type:"button",className:Ue.togglePassword,onClick:()=>R(!T),tabIndex:-1,children:T?c.jsx(B,{}):c.jsx(J,{})})]}),g.password&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.password}),d&&c.jsx(uz,{password:d,theme:"dark"})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsxs("div",{className:Ue.passwordInput,children:[c.jsx("input",{type:P?"text":"password",name:"confirm-password",id:"auth-register-confirm-password",autoComplete:"new-password",spellCheck:!1,value:A,onChange:K=>{k(K.target.value),ee("confirmPassword")},className:`${Ue.authPopup__input} ${g.confirmPassword?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.confirmPassword","Подтвердите пароль"),"aria-invalid":!!g.confirmPassword,disabled:_}),c.jsx("button",{type:"button",className:Ue.togglePassword,onClick:()=>$(!P),tabIndex:-1,children:P?c.jsx(B,{}):c.jsx(J,{})})]}),g.confirmPassword&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.confirmPassword})]}),c.jsx("div",{className:Ue.authPopup__buttonsContainer,children:c.jsx("button",{type:"submit",className:Ue.authPopup__submitButton,disabled:_,children:_?w("authPopup.registering","Регистрация..."):w("authPopup.register","Зарегистрироваться")})})]})]})}):null},_re=Object.freeze(Object.defineProperty({__proto__:null,default:jw},Symbol.toStringTag,{value:"Module"})),yre={list(e={}){var r,n,o;const t={page:e.page??0,size:e.size??20,sort:"publishedAt,desc"};return(r=e.cityFrom)!=null&&r.trim()&&(t.cityFrom=e.cityFrom.trim()),(n=e.cityTo)!=null&&n.trim()&&(t.cityTo=e.cityTo.trim()),(o=e.cargoType)!=null&&o.trim()&&(t.cargoType=e.cargoType.trim()),je.get("/exchange/requests",{params:t}).then(s=>s.data)},get(e){return je.get(`/exchange/requests/${e}`).then(t=>t.data)},create(e){return je.post("/exchange/requests",e).then(t=>t.data)},update(e,t){return je.put(`/exchange/requests/${e}`,t).then(r=>r.data)},delete(e){return je.delete(`/exchange/requests/${e}`).then(()=>{})},publish(e){return je.post(`/exchange/requests/${e}/publish`,{}).then(t=>t.data)},cancel(e){return je.post(`/exchange/requests/${e}/cancel`,{}).then(t=>t.data)},award(e,t){return je.post(`/exchange/requests/${e}/award/${t}`,{}).then(r=>r.data)},listMine(e=0,t=20){return je.get("/exchange/my-requests",{params:{page:e,size:t,sort:"createdAt,desc"}}).then(r=>r.data)},placeBid(e,t){return je.post(`/exchange/requests/${e}/bids`,t).then(r=>r.data)},updateBid(e,t){return je.put(`/exchange/bids/${e}`,t).then(r=>r.data)},withdrawBid(e){return je.post(`/exchange/bids/${e}/withdraw`,{}).then(t=>t.data)},extendBid(e,t){return je.post(`/exchange/bids/${e}/extend`,{validUntil:t}).then(r=>r.data)},listBids(e){return je.get(`/exchange/requests/${e}/bids`).then(t=>t.data)},listMyBids(e=0,t=20){return je.get("/exchange/my-bids",{params:{page:e,size:t,sort:"createdAt,desc"}}).then(r=>r.data)},listQuestions(e){return je.get(`/exchange/requests/${e}/questions`).then(t=>t.data)},askQuestion(e,t){return je.post(`/exchange/requests/${e}/questions`,{text:t}).then(r=>r.data)},answerQuestion(e,t){return je.post(`/exchange/questions/${e}/answer`,{text:t}).then(r=>r.data)},deleteQuestion(e){return je.delete(`/exchange/questions/${e}`).then(()=>{})},getReputation(e){return je.get(`/exchange/suppliers/${e}/reputation`).then(t=>t.data)},watch(e){return je.post(`/exchange/requests/${e}/watch`,{}).then(t=>t.data)},unwatch(e){return je.delete(`/exchange/requests/${e}/watch`).then(t=>t.data)},isWatching(e){return je.get(`/exchange/requests/${e}/watch`).then(t=>t.data)},listWatching(e=0,t=20){return je.get("/exchange/watching",{params:{page:e,size:t,sort:"createdAt,desc"}}).then(r=>r.data)},clone(e){return je.post(`/exchange/requests/${e}/clone`,{}).then(t=>t.data)},proposeCounterOffer(e,t,r){return je.post(`/exchange/bids/${e}/counter`,{requestedPriceUsd:t,message:r}).then(n=>n.data)},acceptCounterOffer(e){return je.post(`/exchange/counter-offers/${e}/accept`,{}).then(t=>t.data)},rejectCounterOffer(e){return je.post(`/exchange/counter-offers/${e}/reject`,{}).then(t=>t.data)},listCounterOffers(e){return je.get(`/exchange/bids/${e}/counter-offers`).then(t=>t.data)}},xre={stats(e,t){const r={};return e&&(r.since=e),t&&(r.until=t),je.get("/admin/exchange/stats",{params:r}).then(n=>n.data)}},wre={stats(e,t=10){const r={topLimit:t};return e&&(r.since=e),je.get("/admin/exchange/chat/moderation/stats",{params:r}).then(n=>n.data)},messages(e,t=!0,r=0,n=20){const o={onlySanitized:t,page:r,size:n};return e&&(o.since=e),je.get("/admin/exchange/chat/moderation/messages",{params:o}).then(s=>s.data)}},dz={send(e,t){return je.post(`/exchange/requests/${e}/messages`,{text:t}).then(r=>r.data)},list(e){return je.get(`/exchange/requests/${e}/messages`).then(t=>t.data)},markRead(e){return je.post(`/exchange/requests/${e}/messages/mark-read`).then(()=>{})},unreadCounts(){return je.get("/exchange/chat/unread-counts").then(e=>e.data)}},Ere={upload(e,t){const r=new FormData;return r.append("file",t),je.post(`/exchange/bids/${e}/attachments`,r,{headers:{"Content-Type":"multipart/form-data"}}).then(n=>n.data)},list(e){return je.get(`/exchange/bids/${e}/attachments`).then(t=>t.data)},async download(e){const t=await je.get(`/exchange/attachments/${e}/download`,{responseType:"blob"}),r=t.headers["content-disposition"]??"",n=/filename="?([^";]+)"?/i.exec(r);return{blob:t.data,filename:(n==null?void 0:n[1])??`attachment-${e}`}},delete(e){return je.delete(`/exchange/attachments/${e}`).then(()=>{})}},Sre={stats(){return je.get("/exchange/public-stats").then(e=>e.data)}},Rs={list(e={}){const t={page:e.page??0,size:e.size??30,unreadOnly:e.unreadOnly??!1};return je.get("/me/notifications",{params:t}).then(r=>r.data)},unreadCount(){return je.get("/me/notifications/unread-count").then(e=>e.data)},markRead(e){return je.post(`/me/notifications/${e}/read`).then(()=>{})},markAllRead(){return je.post("/me/notifications/read-all").then(e=>e.data)}};function pz(e){return!!e&&/eta[_.]?shift/i.test(e)}function fz(e){if(pz(e.eventCode)&&e.relatedEntityId!=null)return`/lk/shipments/${e.relatedEntityId}/tracker`;if(e.relatedEntityType&&e.relatedEntityId!=null)switch(e.relatedEntityType){case"Application":return`/personal-account?applicationId=${e.relatedEntityId}`;case"InvoiceDocument":case"Invoice":return`/personal-account?invoiceId=${e.relatedEntityId}`;case"Contract":return`/personal-account?contractId=${e.relatedEntityId}`;case"CustomsShipment":return`/lk/customs?shipmentId=${e.relatedEntityId}`;default:return null}return null}const mz=6e4,hz=()=>{const e=qm(),[t,r]=a.useState(0),[n,o]=a.useState([]),[s,i]=a.useState(!1),[l,u]=a.useState(!1),d=a.useCallback(()=>{Rs.unreadCount().then(g=>r(g.unread)).catch(()=>{})},[]),p=a.useCallback(()=>{i(!0),Rs.list({page:0,size:5}).then(o).catch(()=>{}).finally(()=>i(!1))},[]);a.useEffect(()=>{d();const g=setInterval(()=>{typeof document<"u"&&document.visibilityState!=="visible"||d()},mz),b=()=>{document.visibilityState==="visible"&&d()};return document.addEventListener("visibilitychange",b),()=>{clearInterval(g),document.removeEventListener("visibilitychange",b)}},[d]),a.useEffect(()=>{if(typeof document>"u")return;const g=_=>_.replace(/^\(\d+\)\s*/,""),b=g(document.title||"Avalog");return document.title=t>0?`(${t}) ${b}`:b,()=>{typeof document<"u"&&(document.title=g(document.title))}},[t]);const f=g=>{u(g),g&&p()},m=async g=>{if(!g.readAt)try{await Rs.markRead(g.id),r(_=>Math.max(0,_-1)),o(_=>_.map(y=>y.id===g.id?{...y,readAt:new Date().toISOString()}:y))}catch{}const b=fz(g);b&&(u(!1),e(b))},h=async()=>{try{await Rs.markAllRead(),r(0),o(g=>g.map(b=>({...b,readAt:new Date().toISOString()})))}catch{}},v=c.jsxs("div",{style:{width:360,maxHeight:480,overflow:"hidden",display:"flex",flexDirection:"column",background:"#fff",borderRadius:8,boxShadow:"0 6px 20px rgba(0,0,0,0.16)"},children:[c.jsxs("div",{style:{padding:"10px 14px",borderBottom:"1px solid #f0f0f0",display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[c.jsx(Qn.Text,{strong:!0,children:"Уведомления"}),t>0&&c.jsx(ql,{size:"small",type:"link",onClick:h,style:{padding:0},children:"Прочитать все"})]}),c.jsx("div",{style:{flex:1,overflowY:"auto",padding:4},children:s?c.jsx("div",{style:{textAlign:"center",padding:24},children:c.jsx(Ch,{})}):n.length===0?c.jsx(fv,{image:fv.PRESENTED_IMAGE_SIMPLE,description:"Нет уведомлений",style:{padding:16}}):c.jsx(gf,{size:"small",dataSource:n,renderItem:g=>c.jsx(gf.Item,{onClick:()=>m(g),style:{cursor:"pointer",background:g.readAt?"transparent":"rgba(24,144,255,0.06)",padding:"10px 14px",borderBottom:"1px solid #fafafa"},children:c.jsxs(lu,{direction:"vertical",size:2,style:{width:"100%"},children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:8},children:[c.jsx(Qn.Text,{strong:!0,style:{fontSize:13},children:g.subject||g.eventCode}),c.jsx(Qn.Text,{type:"secondary",style:{fontSize:11},children:Xm(g.sentAt).format("DD.MM HH:mm")})]}),g.body&&c.jsx(Qn.Text,{type:"secondary",style:{fontSize:12,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:g.body})]})},g.id)})}),c.jsx("div",{style:{padding:"8px 14px",borderTop:"1px solid #f0f0f0",textAlign:"center"},children:c.jsx(ql,{type:"link",size:"small",onClick:()=>{u(!1),e("/notifications")},children:"Все уведомления →"})})]});return c.jsx(U0,{open:l,onOpenChange:f,trigger:["click"],placement:"bottomRight",popupRender:()=>v,children:c.jsx(Wo,{title:"Уведомления",children:c.jsx("span",{style:{display:"inline-flex",cursor:"pointer",padding:"0 6px"},children:c.jsx(Yl,{count:t,size:"small",offset:[-2,4],children:c.jsx("span",{style:{fontSize:20,lineHeight:1},children:"🔔"})})})})})},Ow='"Inter Variable", "Manrope Variable", system-ui, sans-serif',gz={algorithm:[Hx.defaultAlgorithm],token:{colorPrimary:"#047857",colorLink:"#047857",colorLinkHover:"#065F46",colorTextBase:"#0F172A",colorBgBase:"#FFFFFF",borderRadius:10,controlHeight:44,fontFamily:Ow}},vz={algorithm:[Hx.darkAlgorithm],token:{colorPrimary:"#10B981",colorLink:"#34D399",colorLinkHover:"#6EE7B7",colorTextBase:"#E8EDEA",colorBgBase:"#07120D",colorBgContainer:"#0D1F17",colorTextPlaceholder:"#5F756B",borderRadius:10,controlHeight:44,fontFamily:Ow},components:{Input:{colorText:"#E8EDEA"},Select:{colorText:"#E8EDEA"}}},bz=e=>e==="dark"?vz:gz,Nw="avalog-theme",Dw=a.createContext(null);function _z(){if(typeof window>"u")return"light";try{const e=window.localStorage.getItem(Nw);if(e==="light"||e==="dark")return e}catch{}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function yz({children:e,locale:t}){const[r,n]=a.useState(_z);a.useEffect(()=>{const l=document.documentElement;l.classList.toggle("dark",r==="dark"),l.setAttribute("data-theme",r);try{window.localStorage.setItem(Nw,r)}catch{}},[r]);const o=a.useCallback(l=>n(l),[]),s=a.useCallback(()=>n(l=>l==="dark"?"light":"dark"),[]),i=a.useMemo(()=>({mode:r,setMode:o,toggle:s}),[r,o,s]);return c.jsx(Dw.Provider,{value:i,children:c.jsx(xA,{theme:bz(r),locale:t,children:e})})}function xz(){const e=a.useContext(Dw);if(!e)throw new Error("useTheme must be used within <ThemeProvider>");return e}function Nb({className:e}){const{t}=oo(),{mode:r,toggle:n}=xz(),o=r==="dark",s=o?t("ui.themeToggle.light","Светлая тема"):t("ui.themeToggle.dark","Тёмная тема");return c.jsx("button",{type:"button",onClick:n,"aria-label":s,title:s,className:e,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:36,height:36,borderRadius:"var(--radius-md, 10px)",border:"1px solid var(--color-border, #e2e8f0)",background:"var(--color-bg-elevated, #fff)",color:"var(--color-text-muted, #475569)",cursor:"pointer"},children:o?c.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("circle",{cx:"12",cy:"12",r:"4"}),c.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"})]}):c.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:c.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})}const wz=[{code:"ru",label:"RU"},{code:"en",label:"EN"},{code:"zho",label:"ZH"},{code:"tr",label:"TR"},{code:"hi",label:"HI"}],Db=(e,t)=>{const r=((e==null?void 0:e.trim())||(t==null?void 0:t.trim())||"Профиль").trim();return r.length>20?r.slice(0,19)+"…":r};function Ez(){var I,T,R;const{i18n:e}=oo(),[t,r]=a.useState(!1),[n,o]=a.useState(()=>e.resolvedLanguage??e.language??"ru"),[s,i]=a.useState(!1),[l,u]=a.useState(!1),{isAuthenticated:d,user:p}=Aa(),f=((I=p==null?void 0:p.roles)==null?void 0:I.some(P=>P==="ROLE_SUPPLIER"||P==="ROLE_SUPPLIER_VIEWER"))??!1,m=((T=p==null?void 0:p.roles)==null?void 0:T.includes("ROLE_ADMIN"))??!1,h=((R=p==null?void 0:p.roles)==null?void 0:R.includes("ROLE_SALES_STAFF"))??!1,v=qm(),[g,b]=a.useState(0);a.useEffect(()=>{if(!d){b(0);return}let P=!1;const $=()=>{dz.unreadCounts().then(k=>{P||b(Object.values(k).reduce((D,z)=>D+z,0))}).catch(()=>{P||b(0)})};$();const A=window.setInterval($,6e4);return()=>{P=!0,window.clearInterval(A)}},[d]);const _=a.useRef(null),y=P=>{e.changeLanguage(P),o(P),r(!1),typeof document<"u"&&(document.documentElement.lang=P)},x=()=>{r(!t)};a.useEffect(()=>{if(!t)return;const P=A=>{_.current&&!_.current.contains(A.target)&&r(!1)},$=A=>{A.key==="Escape"&&r(!1)};return document.addEventListener("mousedown",P),document.addEventListener("keydown",$),()=>{document.removeEventListener("mousedown",P),document.removeEventListener("keydown",$)}},[t]),a.useEffect(()=>{const P=()=>i(!0);return window.addEventListener("auth:session-expired",P),()=>window.removeEventListener("auth:session-expired",P)},[]);const S=P=>{P.preventDefault(),d?v("/Profile",{state:{section:"profile"}}):i(!0)},w=()=>{i(!1),v("/Profile")};return c.jsxs(a.Fragment,{children:[c.jsx("div",{className:"header",children:c.jsxs("div",{className:"header_wrapper",children:[c.jsxs("div",{className:"main_container",children:[c.jsxs("div",{className:"header_left",children:[c.jsx(Nt,{to:"/",className:"logo_link",children:c.jsx("div",{className:"logo"})}),c.jsxs("div",{className:"header_nav-left",children:[c.jsx(Nt,{to:"/",className:"nav-link calculator-link header-nav-link",children:"Калькулятор"}),c.jsx(Nt,{to:d?"/exchange":"/exchange/about",className:"nav-link header-nav-link",children:c.jsx(Yl,{count:g,size:"small",offset:[6,-2],style:{backgroundColor:"#f5222d"},children:c.jsx("span",{children:"Биржа"})})}),d&&c.jsx(Nt,{to:"/exchange/watching",className:"nav-link header-nav-link",children:"★ Избранное"})]})]}),c.jsxs("div",{className:"header_right",children:[c.jsxs("div",{className:"header_nav-right",children:[d&&c.jsx(hz,{}),c.jsx(Nt,{to:"/plans",className:"nav-link header-nav-link",children:"Тарифы"}),c.jsx(Nt,{to:"/contacts",className:"nav-link header-nav-link",children:"Контакты"}),f&&c.jsx(Nt,{to:"/supplier",className:"nav-link header-nav-link",children:"Кабинет поставщика"}),m&&c.jsx(Nt,{to:"/admin",className:"nav-link header-nav-link",children:"Админ-панель"}),h&&c.jsx(Nt,{to:"/lk/sales/leads",className:"nav-link header-nav-link",children:"Лиды"}),d?c.jsxs("button",{className:"login-button header-nav-login header-nav-login--authed",onClick:P=>{P.preventDefault(),v("/Profile",{state:{section:"profile"}})},title:(p==null?void 0:p.email)??void 0,children:[c.jsx("span",{className:"user-icon user-icon--authed","aria-hidden":!0}),c.jsx("span",{className:"header-user-name",children:Db(p==null?void 0:p.fullName,p==null?void 0:p.email)})]}):c.jsxs("button",{className:"login-button header-nav-login",onClick:S,children:[c.jsx("span",{className:"user-icon"}),"Войти"]})]}),c.jsxs("div",{className:"contact_item",children:[c.jsx("div",{className:"contact_icon phone_icon"}),c.jsx("a",{href:"tel:+74999488801",className:"contact_text",children:"+7 499 948-88-01"})]}),c.jsxs("div",{className:"contact_item",children:[c.jsx("div",{className:"contact_icon email_icon"}),c.jsx("a",{href:"mailto:info@avalog.ru",className:"contact_text",children:"info@avalog.ru"})]}),c.jsx(Nb,{className:"header-theme-toggle"}),c.jsxs("div",{className:"language_selector",ref:_,children:[c.jsxs("button",{type:"button",className:"language_selector__trigger",onClick:x,"aria-haspopup":"listbox","aria-expanded":t,"aria-controls":"header-language-listbox","aria-label":`Текущий язык: ${n.toUpperCase()}. Открыть выбор языка`,style:{background:"transparent",border:0,padding:0,color:"inherit",font:"inherit",cursor:"pointer",display:"flex",alignItems:"center",gap:8},children:[c.jsx("span",{className:"language_icon","aria-hidden":"true"}),c.jsx("span",{className:"language_text",children:n.toUpperCase()})]}),t&&c.jsx("ul",{id:"header-language-listbox",className:"language_dropdown",role:"listbox","aria-label":"Выберите язык",style:{listStyle:"none",margin:0,padding:0},children:wz.map(P=>c.jsx("li",{role:"option","aria-selected":n===P.code,className:"language_option",onClick:()=>y(P.code),onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),y(P.code))},tabIndex:0,children:P.label},P.code))})]}),c.jsxs("button",{className:"mobile-menu-toggle",onClick:()=>u(!l),"aria-label":"Меню",children:[c.jsx("span",{className:`burger-line ${l?"active":""}`}),c.jsx("span",{className:`burger-line ${l?"active":""}`}),c.jsx("span",{className:`burger-line ${l?"active":""}`})]})]})]}),c.jsxs("div",{className:`navigation-container ${l?"mobile-open":""}`,children:[c.jsx("div",{className:"nav-item nav-item--theme",children:c.jsx(Nb,{className:"header-theme-toggle"})}),c.jsx(Nt,{to:"/contacts",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"Контакты"})}),c.jsx(Nt,{to:"/plans",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"Тарифы"})}),c.jsx(Nt,{to:"/",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link calculator-link",children:"Калькулятор"})}),c.jsx(Nt,{to:d?"/exchange":"/exchange/about",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:c.jsx(Yl,{count:g,size:"small",offset:[6,-2],style:{backgroundColor:"#f5222d"},children:c.jsx("span",{children:"Биржа"})})})}),f&&c.jsx(Nt,{to:"/supplier",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"Кабинет поставщика"})}),m&&c.jsx(Nt,{to:"/admin",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"Админ-панель"})}),h&&c.jsx(Nt,{to:"/lk/sales/leads",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"Лиды"})}),d?c.jsx("div",{className:"nav-item",children:c.jsxs("button",{className:"login-button login-button--authed",onClick:P=>{P.preventDefault(),u(!1),v("/Profile",{state:{section:"profile"}})},title:(p==null?void 0:p.email)??void 0,children:[c.jsx("span",{className:"user-icon user-icon--authed","aria-hidden":!0}),c.jsx("span",{className:"header-user-name",children:Db(p==null?void 0:p.fullName,p==null?void 0:p.email)})]})}):c.jsx("div",{className:"nav-item",children:c.jsxs("button",{className:"login-button",onClick:P=>{P.preventDefault(),u(!1),S(P)},children:[c.jsx("span",{className:"user-icon"}),"Войти"]})})]})]})}),c.jsx(jw,{isOpen:s,onClose:()=>i(!1),onSuccess:w})]})}const kb={async getWelcomeMessage(){const e=await je.get("/welcome-message",{responseType:"text"});return typeof e.data=="string"?e.data:""},async getManagerMessage(){const e=await je.get("/manager-message",{responseType:"text"});return typeof e.data=="string"?e.data:""}},kw="avalog_attribution",Sz=30,Cz=Sz*24*60*60*1e3,Pz=e=>{const t=new URLSearchParams(e);return{utmSource:t.get("utm_source"),utmMedium:t.get("utm_medium"),utmCampaign:t.get("utm_campaign"),utmTerm:t.get("utm_term"),utmContent:t.get("utm_content")}},Mw=()=>{try{const e=localStorage.getItem(kw)??sessionStorage.getItem(Lw);if(!e)return null;const t=JSON.parse(e);return typeof(t==null?void 0:t._capturedAtEpoch)!="number"||Date.now()-t._capturedAtEpoch>Cz?null:t}catch{return null}},Lw="avalog_attribution_session",Rz=e=>{const t=JSON.stringify(e);try{localStorage.setItem(kw,t)}catch{}try{sessionStorage.setItem(Lw,t)}catch{}},Tz=()=>{if(typeof window>"u"||typeof localStorage>"u"||Mw())return;const r={...Pz(window.location.search),referrer:document.referrer||null,landingUrl:window.location.href,capturedAt:new Date().toISOString(),_capturedAtEpoch:Date.now()};Rz(r)},zw=()=>{const e=Mw();return e?{utmSource:e.utmSource,utmMedium:e.utmMedium,utmCampaign:e.utmCampaign,utmTerm:e.utmTerm,utmContent:e.utmContent,referrer:e.referrer,landingUrl:e.landingUrl,capturedAt:e.capturedAt}:null},Cre=e=>{const t=zw();if(!t)return;const r=(t.utmSource??"").toLowerCase(),n=(t.utmMedium??"").toLowerCase();(r==="yandex"||r==="ya")&&n==="cpc"&&C(async()=>{const{capturePostHog:s}=await Promise.resolve().then(()=>$L);return{capturePostHog:s}},void 0).then(({capturePostHog:s})=>{s("yd_conversion",{campaign_id:t.utmCampaign??null,ad_group:t.utmContent??null,keyword:t.utmTerm??null,form_name:e})}).catch(()=>{})},Iz={async createSession(){const t=(await je.post("/chat/session",{},{skipAuth:!0})).data,r=String((t==null?void 0:t.id)??(t==null?void 0:t.sessionId)??""),n=String((t==null?void 0:t.sessionKey)??"");return{id:r,sessionKey:n}},async sendMessage(e,t,r){const o=(await je.post(`/chat/${e}/message`,{text:r,sender:"client"},{params:{key:t},skipAuth:!0})).data;return(o==null?void 0:o.text)??(o==null?void 0:o.message)??(o==null?void 0:o.response)??""},async widgetReply(e){const t={...e,attribution:e.attribution??zw()};return(await je.post("/chat/widget/reply",t,{skipAuth:!0})).data},getLkThreads(e=50){return je.get("/chat/lk/threads",{params:{limit:e}}).then(t=>t.data??[])},getLkMessages(e,t=100){return je.get(`/chat/lk/${e}/messages`,{params:{limit:t}}).then(r=>r.data??[])},postLkMessage(e,t){return je.post(`/chat/lk/${e}/message`,{text:t.text,sender:t.sender}).then(r=>r.data)}},$z="_fab_15u6a_1",Az="_panel_15u6a_29",jz="_panelHeader_15u6a_57",Oz="_closeBtn_15u6a_67",Nz="_messages_15u6a_81",Dz="_loading_15u6a_88",kz="_error_15u6a_89",Mz="_empty_15u6a_90",Lz="_messageUser_15u6a_107",zz="_messageBot_15u6a_108",Fz="_messageText_15u6a_132",Vz="_inputRow_15u6a_138",Bz="_input_15u6a_138",Hz="_sendBtn_15u6a_171",wr={fab:$z,panel:Az,panelHeader:jz,closeBtn:Oz,messages:Nz,loading:Dz,error:kz,empty:Mz,messageUser:Lz,messageBot:zz,messageText:Fz,inputRow:Vz,input:Bz,sendBtn:Hz},Nd="Добро пожаловать! Задайте вопрос — мы ответим в чате.",Uz=()=>{const[e,t]=a.useState(!1),[r,n]=a.useState([]),[o,s]=a.useState(null),[i,l]=a.useState(""),[u,d]=a.useState(!1),[p,f]=a.useState(!1),[m,h]=a.useState(null),v=a.useRef(null),g=()=>{var y;return(y=v.current)==null?void 0:y.scrollIntoView({behavior:"smooth"})};a.useEffect(()=>{g()},[r]),a.useEffect(()=>{if(!e)return;d(!0),h(null),n([]),s(null),(async()=>{var S;if(!!!((S=Cr.getAccessToken())!=null&&S.trim())){n([{role:"system",text:Nd}]),d(!1);return}try{const[w,I]=await Promise.allSettled([kb.getWelcomeMessage(),kb.getManagerMessage()]),T=w.status==="fulfilled"?w.value:"",R=I.status==="fulfilled"?I.value:"",P=[];T&&P.push({role:"system",text:T}),R&&P.push({role:"system",text:R}),P.length===0&&P.push({role:"system",text:Nd}),n(P)}catch{n([{role:"system",text:Nd}])}finally{d(!1)}})()},[e]);const b=async()=>{const y=i.trim();if(!(!y||p)){l(""),n(x=>[...x,{role:"user",text:y}]),f(!0);try{const x=r.filter(w=>w.role==="user"||w.role==="bot").map(w=>({role:w.role==="user"?"user":"assistant",content:w.text})),S=await Iz.widgetReply({message:y,sessionId:o??void 0,history:x.length?x:void 0});S.sessionId&&s(S.sessionId),n(w=>[...w,{role:"bot",text:S.reply||"(нет ответа)"}])}catch{n(x=>[...x,{role:"bot",text:"Ошибка отправки. Попробуйте позже."}])}finally{f(!1)}}},_=y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),b())};return c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",className:wr.fab,onClick:()=>t(y=>!y),"aria-label":"Открыть чат",children:c.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),e&&c.jsxs("div",{className:wr.panel,children:[c.jsxs("div",{className:wr.panelHeader,children:[c.jsx("span",{children:"Чат"}),c.jsx("button",{type:"button",className:wr.closeBtn,onClick:()=>t(!1),"aria-label":"Закрыть",children:"×"})]}),c.jsxs("div",{className:wr.messages,children:[u&&c.jsx("div",{className:wr.loading,children:"Загрузка..."}),m&&c.jsx("div",{className:wr.error,children:m}),!u&&!m&&c.jsxs(c.Fragment,{children:[r.map((y,x)=>c.jsx("div",{className:y.role==="user"?wr.messageUser:wr.messageBot,children:c.jsx("div",{className:wr.messageText,children:y.text})},x)),r.length===0&&c.jsx("div",{className:wr.empty,children:"Нет сообщений"}),c.jsx("div",{ref:v})]})]}),!u&&!m&&c.jsxs("div",{className:wr.inputRow,children:[c.jsx("input",{type:"text",className:wr.input,placeholder:"Введите сообщение...",value:i,onChange:y=>l(y.target.value),onKeyDown:_,disabled:p}),c.jsx("button",{type:"button",className:wr.sendBtn,onClick:b,disabled:p||!i.trim(),"aria-label":"Отправить",children:"Отправить"})]})]})]})},Pf="Avalog",jl="Avalog — онлайн-расчёт стоимости международной доставки грузов: морские, ж/д, авто, авиа и мультимодальные перевозки.",eo="https://avalog.ru",Wz=`${eo}/og-image.jpg`,Qr=(e,t,r,n)=>({"@context":"https://schema.org","@type":"Service",name:t,serviceType:e,description:r,provider:{"@type":"Organization",name:"Avalog",url:eo},areaServed:[{"@type":"Country",name:"Россия"},{"@type":"Country",name:"Китай"},{"@type":"Country",name:"Корея"},{"@type":"Country",name:"Вьетнам"}],availableLanguage:["ru","en","zh"],url:`${eo}${n}`}),Mb={"/":{title:"Калькулятор стоимости доставки грузов | Avalog",description:"Рассчитайте стоимость международной доставки за минуту: морские, ж/д, авто, авиа, мультимодальные маршруты. Прозрачные тарифы перевозчиков.",jsonLd:{"@context":"https://schema.org","@type":"WebApplication",name:"Avalog — калькулятор тарифов",description:"Онлайн-калькулятор стоимости международной перевозки грузов: морем, по ж/д, авто и авиа. Расчёт занимает менее минуты.",url:eo,applicationCategory:"BusinessApplication",operatingSystem:"All",offers:{"@type":"Offer",price:"0",priceCurrency:"RUB"},provider:{"@type":"Organization",name:"Avalog",url:eo}}},"/about":{title:"Транспортные услуги Avalog — обзор направлений",description:"Полный спектр транспортных услуг: морские контейнерные перевозки, ж/д, авто, авиа, мультимодальная логистика, аренда контейнеров, таможенное оформление."},"/o-kompanii":{title:"О компании Avalog — международная логистика",description:"Avalog — международный логистический оператор с собственным IT-калькулятором тарифов перевозчиков. История, команда, география работы."},"/Main":{title:"Avalog — главная страница",description:jl},"/railway":{title:"Железнодорожные перевозки грузов | Avalog",description:"Контейнерные ж/д перевозки из Китая, Кореи, Юго-Восточной Азии в Россию и СНГ. Прямые поезда и комбинированные маршруты.",jsonLd:Qr("Железнодорожные перевозки","Железнодорожные перевозки грузов — Avalog","Контейнерные ж/д перевозки из Китая, Кореи, Юго-Восточной Азии в Россию и СНГ. Прямые поезда и комбинированные маршруты.","/railway")},"/marineservice":{title:"Морские контейнерные перевозки грузов | Avalog",description:"Морские перевозки FCL и LCL из портов Китая, Кореи, Вьетнама, Индии. Расчёт фрахта, букинг, экспедирование в порту.",jsonLd:Qr("Морские контейнерные перевозки","Морские перевозки FCL/LCL — Avalog","Морские перевозки FCL и LCL из портов Китая, Кореи, Вьетнама, Индии. Расчёт фрахта, букинг, экспедирование в порту.","/marineservice")},"/reviews":{title:"Отзывы клиентов Avalog — реальные оценки доставок",description:"Реальные отзывы клиентов о доставке грузов через Avalog. Только подтверждённые заявки, оценки 4★ и выше, открытые комментарии и ответы перевозчиков.",jsonLd:Qr("Отзывы клиентов","Отзывы клиентов Avalog","Реальные отзывы клиентов о доставке грузов через Avalog: морские, ж/д, авто, авиа маршруты с открытыми комментариями.","/reviews")},"/exchange/about":{title:"Биржа грузоперевозок Avalog — открытые маршруты и аукционы",description:"Открытая биржа логистических заявок и предложений. Клиенты публикуют маршруты, поставщики делают ставки. Прозрачные цены, без скрытых наценок.",jsonLd:Qr("Биржа грузоперевозок","Биржа грузоперевозок — Avalog","Открытая площадка тендеров на грузоперевозки. Sealed-bid между клиентами и проверенными поставщиками.","/exchange/about")},"/exchange":{title:"Биржа заявок — открытые тендеры на грузоперевозки | Avalog",description:"Живая лента тендеров на грузоперевозки. Sealed-bid и open аукционы между клиентами и проверенными поставщиками. Прозрачные цены, без скрытых наценок.",jsonLd:Qr("Биржа тендеров","Биржа тендеров на грузоперевозки — Avalog","Живая лента тендеров: фильтр по городу отправления и назначения, типу груза. Подача ставок поставщиками, выбор победителя клиентом.","/exchange")},"/autotransport":{title:"Автоперевозки грузов | Avalog",description:"Международные и внутренние автоперевозки: тенты, рефрижераторы, контейнеровозы. Прямая и сборная доставка по России и СНГ.",jsonLd:Qr("Автоперевозки","Автоперевозки грузов — Avalog","Международные и внутренние автоперевозки: тенты, рефрижераторы, контейнеровозы. Прямая и сборная доставка по России и СНГ.","/autotransport")},"/airtransportations":{title:"Авиаперевозки грузов | Avalog",description:"Грузовые авиаперевозки: срочная доставка, ценные и хрупкие грузы, негабарит. Расчёт стоимости и таможенное оформление.",jsonLd:Qr("Авиаперевозки","Грузовые авиаперевозки — Avalog","Грузовые авиаперевозки: срочная доставка, ценные и хрупкие грузы, негабарит. Расчёт стоимости и таможенное оформление.","/airtransportations")},"/groupagecargo":{title:"Сборные грузы (LCL) — международная доставка | Avalog",description:"Сборные грузы из Китая и Юго-Восточной Азии: морем, поездом, автомобилем. Расчёт стоимости по весу и объёму, консолидация на складе отправителя.",jsonLd:Qr("Сборные грузы LCL","Сборные грузы (LCL) — Avalog","Сборные грузы из Китая и Юго-Восточной Азии: морем, поездом, автомобилем. Расчёт стоимости по весу и объёму, консолидация на складе отправителя.","/groupagecargo")},"/successstories":{title:"Кейсы Avalog — реальные истории доставки",description:"Реальные кейсы доставки наших клиентов: сложные маршруты, негабарит, рефрижераторные и опасные грузы, taможенные нестандарт-кейсы."},"/contacts":{title:"Контакты Avalog — офис в Москве, телефон, email",description:"Свяжитесь с Avalog: +7 499 948-88-01, info@avalog.ru. Офис: 117105, г. Москва, ш. Варшавское, д. 1А, пом. ЗК/IП.",jsonLd:{"@context":"https://schema.org","@type":"LocalBusiness",name:"Avalog",image:`${eo}/og-image.jpg`,url:`${eo}/contacts`,telephone:"+7-499-948-88-01",email:"info@avalog.ru",priceRange:"$$",address:{"@type":"PostalAddress",streetAddress:"Варшавское шоссе, 1А, пом. ЗК/IП",addressLocality:"Москва",postalCode:"117105",addressCountry:"RU"},geo:{"@type":"GeoCoordinates",latitude:55.6371,longitude:37.6178},openingHours:"Mo-Fr 09:00-18:00",areaServed:[{"@type":"Country",name:"Россия"},{"@type":"Country",name:"Китай"},{"@type":"Country",name:"Корея"},{"@type":"Country",name:"Вьетнам"},{"@type":"Country",name:"Беларусь"},{"@type":"Country",name:"Казахстан"}]}},"/vacancies":{title:"Вакансии Avalog — работа в международной логистике",description:"Открытые вакансии Avalog: логисты, менеджеры по продажам, операторы, разработчики. Работа в международной логистической компании."},"/privacy-policy":{title:"Политика конфиденциальности | Avalog",description:"Политика обработки персональных данных пользователей сайта Avalog."},"/multimodal":{title:"Мультимодальные перевозки — море + ж/д + авто | Avalog",description:"Мультимодальные маршруты: комбинация морских, ж/д и автомобильных плеч в одной поставке. Оптимальная стоимость и срок.",jsonLd:Qr("Мультимодальные перевозки","Мультимодальные перевозки — Avalog","Мультимодальные маршруты: комбинация морских, ж/д и автомобильных плеч в одной поставке.","/multimodal")},"/faq":{title:"Часто задаваемые вопросы | Avalog",description:"Ответы на частые вопросы о международной доставке грузов: документы, таможня, сроки, расчёт стоимости, страхование.",jsonLd:{"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Сколько идёт контейнер 40HQ из Шанхая в Москву?",acceptedAnswer:{"@type":"Answer",text:"Обычно 30–45 дней (морем до Дальневосточного порта + ж/д до Москвы). Точный срок зависит от линии перевозки и расписания."}},{"@type":"Question",name:"Какие документы нужны для импорта груза из Китая?",acceptedAnswer:{"@type":"Answer",text:"Внешнеторговый контракт, инвойс, упаковочный лист, коносамент/CMR/ж/д накладная, сертификаты соответствия и декларация на товары."}},{"@type":"Question",name:"Можно ли застраховать груз?",acceptedAnswer:{"@type":"Answer",text:"Да — страховка оформляется дополнительно к перевозке. Стоимость зависит от заявленной стоимости груза и маршрута."}},{"@type":"Question",name:"Avalog работает с физическими лицами?",acceptedAnswer:{"@type":"Answer",text:"Преимущественно B2B: импортёры, оптовики, продавцы маркетплейсов. Запросы от физических лиц рассматриваем индивидуально."}}]}},"/customsservices":{title:"Таможенное оформление и брокерские услуги | Avalog",description:"Таможенное оформление импорта и экспорта, классификация ТН ВЭД, подбор кодов, сертификация, брокерское сопровождение.",jsonLd:Qr("Таможенное оформление","Таможенное оформление и брокерские услуги — Avalog","Таможенное оформление импорта и экспорта, классификация ТН ВЭД, сертификация, брокерское сопровождение.","/customsservices")},"/containerrental":{title:"Аренда контейнеров — 20DV, 40HC, рефрижераторы | Avalog",description:"Аренда морских контейнеров для перевозки и хранения: стандартные, high-cube, рефрижераторы, open-top, flat-rack.",jsonLd:Qr("Аренда контейнеров","Аренда морских контейнеров — Avalog","Аренда контейнеров для перевозки и хранения: стандартные, high-cube, рефрижераторы, open-top, flat-rack.","/containerrental")},"/blog":{title:"Блог Avalog — статьи о международной логистике",description:"Статьи о логистике: тарифы, маршруты, таможенные правила, новости рынка контейнерных перевозок и международной торговли."}},qz=new Set(["/Profile","/Dashboard","/reset-password","/order-details/:id","/search-results","/mailing-view/:token","/ktk"]),Gz=e=>{if(e in Mb)return{...Mb[e],pathForCanonical:e};if(e.startsWith("/blog/"))return{title:"Статья блога | Avalog",description:jl,pathForCanonical:e};const t=qz.has(e),r=e.startsWith("/order-details/")||e.startsWith("/mailing-view/");return t||r?{title:`${Pf}`,description:jl,pathForCanonical:e,noindex:!0}:{title:`${Pf}`,description:jl,pathForCanonical:e,noindex:!0}},Dd={SITE_NAME:Pf,SITE_URL:eo,OG_IMAGE_DEFAULT:Wz},Kz=()=>{const{pathname:e}=Fr(),t=Gz(e),r=`${Dd.SITE_URL}${t.pathForCanonical}`,n=t.ogImage??Dd.OG_IMAGE_DEFAULT,o=!t.noindex;return c.jsxs(b1,{children:[c.jsx("title",{children:t.title}),c.jsx("meta",{name:"description",content:t.description}),c.jsx("link",{rel:"canonical",href:r}),t.noindex&&c.jsx("meta",{name:"robots",content:"noindex,nofollow"}),o&&c.jsx("link",{rel:"alternate",hrefLang:"ru",href:r}),o&&c.jsx("link",{rel:"alternate",hrefLang:"en",href:`${r}?lng=en`}),o&&c.jsx("link",{rel:"alternate",hrefLang:"zh",href:`${r}?lng=zho`}),o&&c.jsx("link",{rel:"alternate",hrefLang:"x-default",href:r}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{property:"og:site_name",content:Dd.SITE_NAME}),c.jsx("meta",{property:"og:title",content:t.title}),c.jsx("meta",{property:"og:description",content:t.description}),c.jsx("meta",{property:"og:url",content:r}),c.jsx("meta",{property:"og:image",content:n}),c.jsx("meta",{property:"og:locale",content:"ru_RU"}),c.jsx("meta",{property:"og:locale:alternate",content:"en_US"}),c.jsx("meta",{property:"og:locale:alternate",content:"zh_CN"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:t.title}),c.jsx("meta",{name:"twitter:description",content:t.description}),c.jsx("meta",{name:"twitter:image",content:n}),o&&t.jsonLd&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify(t.jsonLd)})]})},Xz=["shanghai-moskva","guangzhou-moskva","shenzhen-moskva","beijing-moskva","tianjin-moskva","istanbul-moskva","shanghai-sankt-peterburg","guangzhou-sankt-peterburg","mumbai-moskva","busan-vladivostok"];function Fw(){if(typeof window>"u"||!("requestIdleCallback"in window))return!1;const t=navigator.connection;return!(t!=null&&t.saveData||(t==null?void 0:t.effectiveType)==="2g"||(t==null?void 0:t.effectiveType)==="slow-2g")}function Yz(){if(!Fw())return;const e=[()=>C(()=>import("./AboutCompany-BIlK04LY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),()=>C(()=>import("./ContactsPage-BE8ImZcn.js"),__vite__mapDeps([12,1,2,3,4,5,6,7,8,9,10,13])),()=>C(()=>import("./Blog-C8NysNC5.js"),__vite__mapDeps([14,1,15,16,17,5,2,3,4,6,7,8,9,10,18])),()=>C(()=>import("./FAQPage-DFGu62nP.js"),__vite__mapDeps([19,1,2,3,4,5,6,7,8,9,10,20])),()=>C(()=>import("./MainPage-DHIOGqhC.js"),__vite__mapDeps([21,1,17,5,8,4,9,10,22])),()=>C(()=>import("./MultiModal-CkLLtd0V.js"),__vite__mapDeps([23,1,5,17,8,4,9,10,24]))];let t=0;const r=n=>{if(t>=e.length)return;const o=e[t++];if(o().catch(()=>{}),n&&n.timeRemaining()>50&&t<e.length){r(n);return}t<e.length&&window.requestIdleCallback(r,{timeout:5e3})};window.requestIdleCallback(r,{timeout:5e3})}function Jz(){Fw()&&window.requestIdleCallback(()=>{Promise.all([C(()=>Promise.resolve().then(()=>Cte),void 0),C(()=>import("./routePairApi-CWVJCHvv.js"),__vite__mapDeps([25,8,1,5,4,9,10]))]).then(([{queryClient:e},{routePairApi:t}])=>{for(const r of Xz)e.prefetchQuery({queryKey:["routePairDetail",r],queryFn:()=>t.detail(r),staleTime:5*6e4})}).catch(()=>{})},{timeout:8e3})}const Zz=()=>{const{pathname:e}=Fr();return a.useEffect(()=>{window.scrollTo(0,0)},[e]),a.useEffect(()=>{Yz(),Jz()},[]),a.useLayoutEffect(()=>{const t=()=>{const r=document.querySelector(".header"),n=r?Math.ceil(r.getBoundingClientRect().height):80;document.documentElement.style.setProperty("--header-offset",`${n}px`)};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),c.jsxs(c.Fragment,{children:[c.jsx(Kz,{}),c.jsx("div",{className:"background-image"}),c.jsxs("div",{className:"w-full",children:[c.jsx(Ez,{}),c.jsx("div",{className:"content-wrapper",children:c.jsx("div",{className:"content",children:c.jsx(j$,{})})})]}),c.jsx(Uz,{})]})};/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vw=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lb=e=>{const t=eF(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var kd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},rF=a.createContext({}),nF=()=>a.useContext(rF),oF=a.forwardRef(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...l},u)=>{const{size:d=24,strokeWidth:p=2,absoluteStrokeWidth:f=!1,color:m="currentColor",className:h=""}=nF()??{},v=n??f?Number(r??p)*24/Number(t??d):r??p;return a.createElement("svg",{ref:u,...kd,width:t??d??kd.width,height:t??d??kd.height,stroke:e??m,strokeWidth:v,className:Vw("lucide",h,o),...!s&&!tF(l)&&{"aria-hidden":"true"},...l},[...i.map(([g,b])=>a.createElement(g,b)),...Array.isArray(s)?s:[s]])});/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vt=(e,t)=>{const r=a.forwardRef(({className:n,...o},s)=>a.createElement(oF,{ref:s,iconNode:t,className:Vw(`lucide-${Qz(Lb(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Lb(e),r};/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sF=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Bw=Vt("arrow-right",sF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iF=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],aF=Vt("bell-ring",iF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lF=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],zb=Vt("bell",lF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Oh=Vt("check",cF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uF=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Nh=Vt("chevron-down",uF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],pF=Vt("chevron-right",dF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fF=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],mF=Vt("chevron-up",fF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],gF=Vt("circle-question-mark",hF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Hw=Vt("circle",vF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Fb=Vt("clock",bF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _F=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],yF=Vt("info",_F);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xF=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],wF=Vt("layers",xF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const EF=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Vb=Vt("loader-circle",EF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const SF=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],CF=Vt("log-in",SF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PF=[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]],RF=Vt("plane",PF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],IF=Vt("search",TF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $F=[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]],AF=Vt("ship",$F);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jF=[["rect",{width:"16",height:"16",x:"4",y:"3",rx:"2",key:"1wxw4b"}],["path",{d:"M4 11h16",key:"mpoxn0"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"m8 19-2 3",key:"13i0xs"}],["path",{d:"m18 22-2-3",key:"1p0ohu"}],["path",{d:"M8 15h.01",key:"a7atzg"}],["path",{d:"M16 15h.01",key:"rnfrdf"}]],OF=Vt("tram-front",jF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const NF=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],DF=Vt("truck",NF);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Dh=Vt("x",kF),MF=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},LF=(e,t)=>({classGroupId:e,validator:t}),Uw=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),sc="-",Bb=[],zF="arbitrary..",FF=e=>{const t=BF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return VF(i);const l=i.split(sc),u=l[0]===""&&l.length>1?1:0;return Ww(l,u,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const u=n[i],d=r[i];return u?d?MF(d,u):u:d||Bb}return r[i]||Bb}}},Ww=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const d=Ww(e,t+1,s);if(d)return d}const i=r.validators;if(i===null)return;const l=t===0?e.join(sc):e.slice(t).join(sc),u=i.length;for(let d=0;d<u;d++){const p=i[d];if(p.validator(l))return p.classGroupId}},VF=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?zF+n:void 0})(),BF=e=>{const{theme:t,classGroups:r}=e;return HF(r,t)},HF=(e,t)=>{const r=Uw();for(const n in e){const o=e[n];kh(o,r,n,t)}return r},kh=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];UF(i,t,r,n)}},UF=(e,t,r,n)=>{if(typeof e=="string"){WF(e,t,r);return}if(typeof e=="function"){qF(e,t,r,n);return}GF(e,t,r,n)},WF=(e,t,r)=>{const n=e===""?t:qw(t,e);n.classGroupId=r},qF=(e,t,r,n)=>{if(KF(e)){kh(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(LF(r,e))},GF=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[l,u]=o[i];kh(u,qw(t,l),r,n)}},qw=(e,t)=>{let r=e;const n=t.split(sc),o=n.length;for(let s=0;s<o;s++){const i=n[s];let l=r.nextPart.get(i);l||(l=Uw(),r.nextPart.set(i,l)),r=l}return r},KF=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,XF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},Rf="!",Hb=":",YF=[],Ub=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),JF=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,l=0,u=0,d;const p=o.length;for(let g=0;g<p;g++){const b=o[g];if(i===0&&l===0){if(b===Hb){s.push(o.slice(u,g)),u=g+1;continue}if(b==="/"){d=g;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const f=s.length===0?o:o.slice(u);let m=f,h=!1;f.endsWith(Rf)?(m=f.slice(0,-1),h=!0):f.startsWith(Rf)&&(m=f.slice(1),h=!0);const v=d&&d>u?d-u:void 0;return Ub(s,h,m,v)};if(t){const o=t+Hb,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Ub(YF,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},ZF=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],l=i[0]==="[",u=t.has(i);l||u?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},QF=e=>({cache:XF(e.cacheSize),parseClassName:JF(e),sortModifiers:ZF(e),postfixLookupClassGroupIds:e2(e),...FF(e)}),e2=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)t[r[n]]=!0;return t},t2=/\s+/,r2=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=t,l=[],u=e.trim().split(t2);let d="";for(let p=u.length-1;p>=0;p-=1){const f=u[p],{isExternal:m,modifiers:h,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:b}=r(f);if(m){d=f+(d.length>0?" "+d:d);continue}let _=!!b,y;if(_){const T=g.substring(0,b);y=n(T);const R=y&&i[y]?n(g):void 0;R&&R!==y&&(y=R,_=!1)}else y=n(g);if(!y){if(!_){d=f+(d.length>0?" "+d:d);continue}if(y=n(g),!y){d=f+(d.length>0?" "+d:d);continue}_=!1}const x=h.length===0?"":h.length===1?h[0]:s(h).join(":"),S=v?x+Rf:x,w=S+y;if(l.indexOf(w)>-1)continue;l.push(w);const I=o(y,_);for(let T=0;T<I.length;++T){const R=I[T];l.push(S+R)}d=f+(d.length>0?" "+d:d)}return d},n2=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Gw(r))&&(o&&(o+=" "),o+=n);return o},Gw=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Gw(e[n]))&&(r&&(r+=" "),r+=t);return r},o2=(e,...t)=>{let r,n,o,s;const i=u=>{const d=t.reduce((p,f)=>f(p),e());return r=QF(d),n=r.cache.get,o=r.cache.set,s=l,l(u)},l=u=>{const d=n(u);if(d)return d;const p=r2(u,r);return o(u,p),p};return s=i,(...u)=>s(n2(...u))},s2=[],Ht=e=>{const t=r=>r[e]||s2;return t.isThemeGetter=!0,t},Kw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,i2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,a2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,l2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,c2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,d2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hn=e=>i2.test(e),ot=e=>!!e&&!Number.isNaN(Number(e)),mn=e=>!!e&&Number.isInteger(Number(e)),Md=e=>e.endsWith("%")&&ot(e.slice(0,-1)),In=e=>a2.test(e),Yw=()=>!0,p2=e=>l2.test(e)&&!c2.test(e),Mh=()=>!1,f2=e=>u2.test(e),m2=e=>d2.test(e),h2=e=>!Ve(e)&&!He(e),g2=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),v2=e=>io(e,Qw,Mh),Ve=e=>Kw.test(e),yo=e=>io(e,eE,p2),Wb=e=>io(e,C2,ot),b2=e=>io(e,rE,Yw),_2=e=>io(e,tE,Mh),qb=e=>io(e,Jw,Mh),y2=e=>io(e,Zw,m2),nl=e=>io(e,nE,f2),He=e=>Xw.test(e),Ei=e=>qo(e,eE),x2=e=>qo(e,tE),Gb=e=>qo(e,Jw),w2=e=>qo(e,Qw),E2=e=>qo(e,Zw),ol=e=>qo(e,nE,!0),S2=e=>qo(e,rE,!0),io=(e,t,r)=>{const n=Kw.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},qo=(e,t,r=!1)=>{const n=Xw.exec(e);return n?n[1]?t(n[1]):r:!1},Jw=e=>e==="position"||e==="percentage",Zw=e=>e==="image"||e==="url",Qw=e=>e==="length"||e==="size"||e==="bg-size",eE=e=>e==="length",C2=e=>e==="number",tE=e=>e==="family-name",rE=e=>e==="number"||e==="weight",nE=e=>e==="shadow",P2=()=>{const e=Ht("color"),t=Ht("font"),r=Ht("text"),n=Ht("font-weight"),o=Ht("tracking"),s=Ht("leading"),i=Ht("breakpoint"),l=Ht("container"),u=Ht("spacing"),d=Ht("radius"),p=Ht("shadow"),f=Ht("inset-shadow"),m=Ht("text-shadow"),h=Ht("drop-shadow"),v=Ht("blur"),g=Ht("perspective"),b=Ht("aspect"),_=Ht("ease"),y=Ht("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),He,Ve],I=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],R=()=>[He,Ve,u],P=()=>[Hn,"full","auto",...R()],$=()=>[mn,"none","subgrid",He,Ve],A=()=>["auto",{span:["full",mn,He,Ve]},mn,He,Ve],k=()=>[mn,"auto",He,Ve],D=()=>["auto","min","max","fr",He,Ve],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...R()],Y=()=>[Hn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],U=()=>[Hn,"screen","full","dvw","lvw","svw","min","max","fit",...R()],F=()=>[Hn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],H=()=>[e,He,Ve],ee=()=>[...S(),Gb,qb,{position:[He,Ve]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",w2,v2,{size:[He,Ve]}],G=()=>[Md,Ei,yo],L=()=>["","none","full",d,He,Ve],W=()=>["",ot,Ei,yo],B=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[ot,Md,Gb,qb],re=()=>["","none",v,He,Ve],se=()=>["none",ot,He,Ve],Z=()=>["none",ot,He,Ve],ne=()=>[ot,He,Ve],ie=()=>[Hn,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[In],breakpoint:[In],color:[Yw],container:[In],"drop-shadow":[In],ease:["in","out","in-out"],font:[h2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[In],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[In],shadow:[In],spacing:["px",ot],text:[In],"text-shadow":[In],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Hn,Ve,He,b]}],container:["container"],"container-type":[{"@container":["","normal","size",He,Ve]}],"container-named":[g2],columns:[{columns:[ot,Ve,He,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[mn,"auto",He,Ve]}],basis:[{basis:[Hn,"full","auto",l,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ot,Hn,"auto","initial","none",Ve]}],grow:[{grow:["",ot,He,Ve]}],shrink:[{shrink:["",ot,He,Ve]}],order:[{order:[mn,"first","last","none",He,Ve]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...F()]}],"min-block-size":[{"min-block":["auto",...F()]}],"max-block-size":[{"max-block":["none",...F()]}],w:[{w:[l,"screen",...Y()]}],"min-w":[{"min-w":[l,"screen","none",...Y()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,Ei,yo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,S2,b2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Md,Ve]}],"font-family":[{font:[x2,_2,t]}],"font-features":[{"font-features":[Ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,He,Ve]}],"line-clamp":[{"line-clamp":[ot,"none",He,Wb]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",He,Ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",He,Ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[ot,"from-font","auto",He,yo]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[ot,"auto",He,Ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"tab-size":[{tab:[mn,He,Ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He,Ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He,Ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mn,He,Ve],radial:["",He,Ve],conic:[mn,He,Ve]},E2,y2]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ot,He,Ve]}],"outline-w":[{outline:["",ot,Ei,yo]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",p,ol,nl]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",f,ol,nl]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[ot,yo]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",m,ol,nl]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[ot,He,Ve]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ot]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[He,Ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[ot]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",He,Ve]}],filter:[{filter:["","none",He,Ve]}],blur:[{blur:re()}],brightness:[{brightness:[ot,He,Ve]}],contrast:[{contrast:[ot,He,Ve]}],"drop-shadow":[{"drop-shadow":["","none",h,ol,nl]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",ot,He,Ve]}],"hue-rotate":[{"hue-rotate":[ot,He,Ve]}],invert:[{invert:["",ot,He,Ve]}],saturate:[{saturate:[ot,He,Ve]}],sepia:[{sepia:["",ot,He,Ve]}],"backdrop-filter":[{"backdrop-filter":["","none",He,Ve]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[ot,He,Ve]}],"backdrop-contrast":[{"backdrop-contrast":[ot,He,Ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ot,He,Ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ot,He,Ve]}],"backdrop-invert":[{"backdrop-invert":["",ot,He,Ve]}],"backdrop-opacity":[{"backdrop-opacity":[ot,He,Ve]}],"backdrop-saturate":[{"backdrop-saturate":[ot,He,Ve]}],"backdrop-sepia":[{"backdrop-sepia":["",ot,He,Ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",He,Ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ot,"initial",He,Ve]}],ease:[{ease:["linear","initial",_,He,Ve]}],delay:[{delay:[ot,He,Ve]}],animate:[{animate:["none",y,He,Ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,He,Ve]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[He,Ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],zoom:[{zoom:[mn,He,Ve]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",He,Ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",He,Ve]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[ot,Ei,yo,Wb]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},R2=o2(P2);function ve(...e){return R2(ae(e))}function T2(e,t){const r=a.createContext(t),n=s=>{const{children:i,...l}=s,u=a.useMemo(()=>l,Object.values(l));return c.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function o(s){const i=a.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function Yt(e,t=[]){let r=[];function n(s,i){const l=a.createContext(i),u=r.length;r=[...r,i];const d=f=>{var _;const{scope:m,children:h,...v}=f,g=((_=m==null?void 0:m[e])==null?void 0:_[u])||l,b=a.useMemo(()=>v,Object.values(v));return c.jsx(g.Provider,{value:b,children:h})};d.displayName=s+"Provider";function p(f,m){var g;const h=((g=m==null?void 0:m[e])==null?void 0:g[u])||l,v=a.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{const s=r.map(i=>a.createContext(i));return function(l){const u=(l==null?void 0:l[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,I2(o,...t)]}function I2(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((l,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...l,...f}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Kb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yr(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Kb(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Kb(e[o],null)}}}}function tt(...e){return a.useCallback(yr(...e),e)}function Xb(e){const t=$2(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(j2);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function $2(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=N2(o),l=O2(s,o.props);return o.type!==a.Fragment&&(l.ref=n?yr(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var A2=Symbol("radix.slottable");function j2(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===A2}function O2(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function N2(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function gu(e){const t=e+"CollectionProvider",[r,n]=Yt(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:b,children:_}=g,y=N.useRef(null),x=N.useRef(new Map).current;return c.jsx(o,{scope:b,itemMap:x,collectionRef:y,children:_})};i.displayName=t;const l=e+"CollectionSlot",u=Xb(l),d=N.forwardRef((g,b)=>{const{scope:_,children:y}=g,x=s(l,_),S=tt(b,x.collectionRef);return c.jsx(u,{ref:S,children:y})});d.displayName=l;const p=e+"CollectionItemSlot",f="data-radix-collection-item",m=Xb(p),h=N.forwardRef((g,b)=>{const{scope:_,children:y,...x}=g,S=N.useRef(null),w=tt(b,S),I=s(p,_);return N.useEffect(()=>(I.itemMap.set(S,{ref:S,...x}),()=>void I.itemMap.delete(S))),c.jsx(m,{[f]:"",ref:w,children:y})});h.displayName=p;function v(g){const b=s(e+"CollectionConsumer",g);return N.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((I,T)=>x.indexOf(I.ref.current)-x.indexOf(T.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:d,ItemSlot:h},v,n]}function Ie(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var Mt=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},D2=Gm[" useInsertionEffect ".trim().toString()]||Mt;function Ir({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,i]=k2({defaultProp:t,onChange:r}),l=e!==void 0,u=l?e:o;{const p=a.useRef(e!==void 0);a.useEffect(()=>{const f=p.current;f!==l&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=l},[l,n])}const d=a.useCallback(p=>{var f;if(l){const m=M2(p)?p(e):p;m!==e&&((f=i.current)==null||f.call(i,m))}else s(p)},[l,e,s,i]);return[u,d]}function k2({defaultProp:e,onChange:t}){const[r,n]=a.useState(e),o=a.useRef(r),s=a.useRef(t);return D2(()=>{s.current=t},[t]),a.useEffect(()=>{var i;o.current!==r&&((i=s.current)==null||i.call(s,r),o.current=r)},[r,o]),[r,n,s]}function M2(e){return typeof e=="function"}function L2(e){const t=z2(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(V2);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function z2(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=H2(o),l=B2(s,o.props);return o.type!==a.Fragment&&(l.ref=n?yr(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var F2=Symbol("radix.slottable");function V2(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===F2}function B2(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function H2(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var U2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ke=U2.reduce((e,t)=>{const r=L2(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oE(e,t){e&&Oo.flushSync(()=>e.dispatchEvent(t))}function W2(e,t){return a.useReducer((r,n)=>t[r][n]??r,e)}var Bt=e=>{const{present:t,children:r}=e,n=q2(t),o=typeof r=="function"?r({present:n.isPresent}):a.Children.only(r),s=tt(n.ref,G2(o));return typeof r=="function"||n.isPresent?a.cloneElement(o,{ref:s}):null};Bt.displayName="Presence";function q2(e){const[t,r]=a.useState(),n=a.useRef(null),o=a.useRef(e),s=a.useRef("none"),i=e?"mounted":"unmounted",[l,u]=W2(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const d=sl(n.current);s.current=l==="mounted"?d:"none"},[l]),Mt(()=>{const d=n.current,p=o.current;if(p!==e){const m=s.current,h=sl(d);e?u("MOUNT"):h==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(p&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Mt(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,f=h=>{const g=sl(n.current).includes(CSS.escape(h.animationName));if(h.target===t&&g&&(u("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=h=>{h.target===t&&(s.current=sl(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:a.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function sl(e){return(e==null?void 0:e.animationName)||"none"}function G2(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var K2=Gm[" useId ".trim().toString()]||(()=>{}),X2=0;function Ft(e){const[t,r]=a.useState(K2());return Mt(()=>{r(n=>n??String(X2++))},[e]),t?`radix-${t}`:""}var vu="Collapsible",[Y2,sE]=Yt(vu),[J2,Lh]=Y2(vu),iE=a.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:s,onOpenChange:i,...l}=e,[u,d]=Ir({prop:n,defaultProp:o??!1,onChange:i,caller:vu});return c.jsx(J2,{scope:r,disabled:s,contentId:Ft(),open:u,onOpenToggle:a.useCallback(()=>d(p=>!p),[d]),children:c.jsx(Ke.div,{"data-state":Fh(u),"data-disabled":s?"":void 0,...l,ref:t})})});iE.displayName=vu;var aE="CollapsibleTrigger",lE=a.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Lh(aE,r);return c.jsx(Ke.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Fh(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Ie(e.onClick,o.onOpenToggle)})});lE.displayName=aE;var zh="CollapsibleContent",cE=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Lh(zh,e.__scopeCollapsible);return c.jsx(Bt,{present:r||o.open,children:({present:s})=>c.jsx(Z2,{...n,ref:t,present:s})})});cE.displayName=zh;var Z2=a.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...s}=e,i=Lh(zh,r),[l,u]=a.useState(n),d=a.useRef(null),p=tt(t,d),f=a.useRef(0),m=f.current,h=a.useRef(0),v=h.current,g=i.open||l,b=a.useRef(g),_=a.useRef(void 0);return a.useEffect(()=>{const y=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(y)},[]),Mt(()=>{const y=d.current;if(y){_.current=_.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();f.current=x.height,h.current=x.width,b.current||(y.style.transitionDuration=_.current.transitionDuration,y.style.animationName=_.current.animationName),u(n)}},[i.open,n]),c.jsx(Ke.div,{"data-state":Fh(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...s,ref:p,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&o})});function Fh(e){return e?"open":"closed"}var Q2=iE,eV=lE,tV=cE,rV=a.createContext(void 0);function Go(e){const t=a.useContext(rV);return e||t||"ltr"}var pn="Accordion",nV=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Vh,oV,sV]=gu(pn),[bu]=Yt(pn,[sV,sE]),Bh=sE(),uE=N.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,s=n;return c.jsx(Vh.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?c.jsx(cV,{...s,ref:t}):c.jsx(lV,{...o,ref:t})})});uE.displayName=pn;var[dE,iV]=bu(pn),[pE,aV]=bu(pn,{collapsible:!1}),lV=N.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:s=!1,...i}=e,[l,u]=Ir({prop:r,defaultProp:n??"",onChange:o,caller:pn});return c.jsx(dE,{scope:e.__scopeAccordion,value:N.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:N.useCallback(()=>s&&u(""),[s,u]),children:c.jsx(pE,{scope:e.__scopeAccordion,collapsible:s,children:c.jsx(fE,{...i,ref:t})})})}),cV=N.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[i,l]=Ir({prop:r,defaultProp:n??[],onChange:o,caller:pn}),u=N.useCallback(p=>l((f=[])=>[...f,p]),[l]),d=N.useCallback(p=>l((f=[])=>f.filter(m=>m!==p)),[l]);return c.jsx(dE,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:d,children:c.jsx(pE,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(fE,{...s,ref:t})})})}),[uV,_u]=bu(pn),fE=N.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:s="vertical",...i}=e,l=N.useRef(null),u=tt(l,t),d=oV(r),f=Go(o)==="ltr",m=Ie(e.onKeyDown,h=>{var R;if(!nV.includes(h.key))return;const v=h.target,g=d().filter(P=>{var $;return!(($=P.ref.current)!=null&&$.disabled)}),b=g.findIndex(P=>P.ref.current===v),_=g.length;if(b===-1)return;h.preventDefault();let y=b;const x=0,S=_-1,w=()=>{y=b+1,y>S&&(y=x)},I=()=>{y=b-1,y<x&&(y=S)};switch(h.key){case"Home":y=x;break;case"End":y=S;break;case"ArrowRight":s==="horizontal"&&(f?w():I());break;case"ArrowDown":s==="vertical"&&w();break;case"ArrowLeft":s==="horizontal"&&(f?I():w());break;case"ArrowUp":s==="vertical"&&I();break}const T=y%_;(R=g[T].ref.current)==null||R.focus()});return c.jsx(uV,{scope:r,disabled:n,direction:o,orientation:s,children:c.jsx(Vh.Slot,{scope:r,children:c.jsx(Ke.div,{...i,"data-orientation":s,ref:u,onKeyDown:n?void 0:m})})})}),ic="AccordionItem",[dV,Hh]=bu(ic),mE=N.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,s=_u(ic,r),i=iV(ic,r),l=Bh(r),u=Ft(),d=n&&i.value.includes(n)||!1,p=s.disabled||e.disabled;return c.jsx(dV,{scope:r,open:d,disabled:p,triggerId:u,children:c.jsx(Q2,{"data-orientation":s.orientation,"data-state":yE(d),...l,...o,ref:t,disabled:p,open:d,onOpenChange:f=>{f?i.onItemOpen(n):i.onItemClose(n)}})})});mE.displayName=ic;var hE="AccordionHeader",gE=N.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_u(pn,r),s=Hh(hE,r);return c.jsx(Ke.h3,{"data-orientation":o.orientation,"data-state":yE(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});gE.displayName=hE;var Tf="AccordionTrigger",vE=N.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_u(pn,r),s=Hh(Tf,r),i=aV(Tf,r),l=Bh(r);return c.jsx(Vh.ItemSlot,{scope:r,children:c.jsx(eV,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...l,...n,ref:t})})});vE.displayName=Tf;var bE="AccordionContent",_E=N.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_u(pn,r),s=Hh(bE,r),i=Bh(r);return c.jsx(tV,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});_E.displayName=bE;function yE(e){return e?"open":"closed"}var pV=uE,fV=mE,mV=gE,xE=vE,wE=_E;const Pre=pV,hV=a.forwardRef(({className:e,...t},r)=>c.jsx(fV,{ref:r,className:ve("border-b border-border",e),...t}));hV.displayName="AccordionItem";const gV=a.forwardRef(({className:e,children:t,...r},n)=>c.jsx(mV,{className:"flex",children:c.jsxs(xE,{ref:n,className:ve("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all","hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,c.jsx(Nh,{className:"h-4 w-4 shrink-0 text-text-muted transition-transform duration-normal"})]})}));gV.displayName=xE.displayName;const vV=a.forwardRef(({className:e,children:t,...r},n)=>c.jsx(wE,{ref:n,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:c.jsx("div",{className:ve("pb-4 pt-0",e),children:t})}));vV.displayName=wE.displayName;const Yb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Jb=ae,nr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Jb(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(d=>{const p=r==null?void 0:r[d],f=s==null?void 0:s[d];if(p===null)return null;const m=Yb(p)||Yb(f);return o[d][m]}),l=r&&Object.entries(r).reduce((d,p)=>{let[f,m]=p;return m===void 0||(d[f]=m),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:f,className:m,...h}=p;return Object.entries(h).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...s,...l}[g]):{...s,...l}[g]===b})?[...d,f,m]:d},[]);return Jb(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},bV=nr("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-bg-base border-border text-text [&>svg]:text-text-muted",info:"bg-info-light/40 border-info/30 text-text [&>svg]:text-info",success:"bg-success-light/40 border-primary/30 text-text [&>svg]:text-primary",warning:"bg-warning-light/50 border-warning/30 text-text [&>svg]:text-warning",destructive:"bg-error-light/40 border-error/30 text-text [&>svg]:text-error"}},defaultVariants:{variant:"default"}}),_V=a.forwardRef(({className:e,variant:t,...r},n)=>c.jsx("div",{ref:n,role:"alert",className:ve(bV({variant:t}),e),...r}));_V.displayName="Alert";const yV=a.forwardRef(({className:e,...t},r)=>c.jsx("h5",{ref:r,className:ve("mb-1 font-semibold leading-none tracking-tight",e),...t}));yV.displayName="AlertTitle";const xV=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("text-sm text-text-muted [&_p]:leading-relaxed",e),...t}));xV.displayName="AlertDescription";function Xt(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function wV(e,t=globalThis==null?void 0:globalThis.document){const r=Xt(e);a.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var EV="DismissableLayer",If="dismissableLayer.update",SV="dismissableLayer.pointerDownOutside",CV="dismissableLayer.focusOutside",Zb,EE=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ci=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...u}=e,d=a.useContext(EE),[p,f]=a.useState(null),m=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=a.useState({}),v=tt(t,T=>f(T)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=g.indexOf(b),y=p?g.indexOf(p):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=y>=_,w=TV(T=>{const R=T.target,P=[...d.branches].some($=>$.contains(R));!S||P||(o==null||o(T),i==null||i(T),T.defaultPrevented||l==null||l())},m),I=IV(T=>{const R=T.target;[...d.branches].some($=>$.contains(R))||(s==null||s(T),i==null||i(T),T.defaultPrevented||l==null||l())},m);return wV(T=>{y===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},m),a.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Zb=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),Qb(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Zb)}},[p,m,r,d]),a.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),Qb())},[p,d]),a.useEffect(()=>{const T=()=>h({});return document.addEventListener(If,T),()=>document.removeEventListener(If,T)},[]),c.jsx(Ke.div,{...u,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,w.onPointerDownCapture)})});ci.displayName=EV;var PV="DismissableLayerBranch",RV=a.forwardRef((e,t)=>{const r=a.useContext(EE),n=a.useRef(null),o=tt(t,n);return a.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),c.jsx(Ke.div,{...e,ref:o})});RV.displayName=PV;function TV(e,t=globalThis==null?void 0:globalThis.document){const r=Xt(e),n=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const s=l=>{if(l.target&&!n.current){let u=function(){SE(SV,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function IV(e,t=globalThis==null?void 0:globalThis.document){const r=Xt(e),n=a.useRef(!1);return a.useEffect(()=>{const o=s=>{s.target&&!n.current&&SE(CV,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Qb(){const e=new CustomEvent(If);document.dispatchEvent(e)}function SE(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?oE(o,s):o.dispatchEvent(s)}var Ld="focusScope.autoFocusOnMount",zd="focusScope.autoFocusOnUnmount",e_={bubbles:!1,cancelable:!0},$V="FocusScope",ja=a.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[l,u]=a.useState(null),d=Xt(o),p=Xt(s),f=a.useRef(null),m=tt(t,g=>u(g)),h=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(n){let g=function(x){if(h.paused||!l)return;const S=x.target;l.contains(S)?f.current=S:Kn(f.current,{select:!0})},b=function(x){if(h.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||Kn(f.current,{select:!0}))},_=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&Kn(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const y=new MutationObserver(_);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),y.disconnect()}}},[n,l,h.paused]),a.useEffect(()=>{if(l){r_.add(h);const g=document.activeElement;if(!l.contains(g)){const _=new CustomEvent(Ld,e_);l.addEventListener(Ld,d),l.dispatchEvent(_),_.defaultPrevented||(AV(kV(CE(l)),{select:!0}),document.activeElement===g&&Kn(l))}return()=>{l.removeEventListener(Ld,d),setTimeout(()=>{const _=new CustomEvent(zd,e_);l.addEventListener(zd,p),l.dispatchEvent(_),_.defaultPrevented||Kn(g??document.body,{select:!0}),l.removeEventListener(zd,p),r_.remove(h)},0)}}},[l,d,p,h]);const v=a.useCallback(g=>{if(!r&&!n||h.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,_=document.activeElement;if(b&&_){const y=g.currentTarget,[x,S]=jV(y);x&&S?!g.shiftKey&&_===S?(g.preventDefault(),r&&Kn(x,{select:!0})):g.shiftKey&&_===x&&(g.preventDefault(),r&&Kn(S,{select:!0})):_===y&&g.preventDefault()}},[r,n,h.paused]);return c.jsx(Ke.div,{tabIndex:-1,...i,ref:m,onKeyDown:v})});ja.displayName=$V;function AV(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Kn(n,{select:t}),document.activeElement!==r)return}function jV(e){const t=CE(e),r=t_(t,e),n=t_(t.reverse(),e);return[r,n]}function CE(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function t_(e,t){for(const r of e)if(!OV(r,{upTo:t}))return r}function OV(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function NV(e){return e instanceof HTMLInputElement&&"select"in e}function Kn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&NV(e)&&t&&e.select()}}var r_=DV();function DV(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=n_(e,t),e.unshift(t)},remove(t){var r;e=n_(e,t),(r=e[0])==null||r.resume()}}}function n_(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function kV(e){return e.filter(t=>t.tagName!=="A")}var MV="Portal",ui=a.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,s]=a.useState(!1);Mt(()=>s(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?gx.createPortal(c.jsx(Ke.div,{...n,ref:t}),i):null});ui.displayName=MV;var Fd=0;function yu(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??o_()),document.body.insertAdjacentElement("beforeend",e[1]??o_()),Fd++,()=>{Fd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Fd--}},[])}function o_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var vn=function(){return vn=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},vn.apply(this,arguments)};function PE(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function LV(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var Ol="right-scroll-bar-position",Nl="width-before-scroll-bar",zV="with-scroll-bars-hidden",FV="--removed-body-scroll-bar-size";function Vd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function VV(e,t){var r=a.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var BV=typeof window<"u"?a.useLayoutEffect:a.useEffect,s_=new WeakMap;function HV(e,t){var r=VV(null,function(n){return e.forEach(function(o){return Vd(o,n)})});return BV(function(){var n=s_.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(l){s.has(l)||Vd(l,null)}),s.forEach(function(l){o.has(l)||Vd(l,i)})}s_.set(r,e)},[e]),r}function UV(e){return e}function WV(e,t){t===void 0&&(t=UV);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(s),i=r}var u=function(){var p=i;i=[],p.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(p){i.push(p),d()},filter:function(p){return i=i.filter(p),r}}}};return o}function qV(e){e===void 0&&(e={});var t=WV(null);return t.options=vn({async:!0,ssr:!1},e),t}var RE=function(e){var t=e.sideCar,r=PE(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return a.createElement(n,vn({},r))};RE.isSideCarExport=!0;function GV(e,t){return e.useMedium(t),RE}var TE=qV(),Bd=function(){},xu=a.forwardRef(function(e,t){var r=a.useRef(null),n=a.useState({onScrollCapture:Bd,onWheelCapture:Bd,onTouchMoveCapture:Bd}),o=n[0],s=n[1],i=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,f=e.shards,m=e.sideCar,h=e.noRelative,v=e.noIsolation,g=e.inert,b=e.allowPinchZoom,_=e.as,y=_===void 0?"div":_,x=e.gapMode,S=PE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=m,I=HV([r,t]),T=vn(vn({},S),o);return a.createElement(a.Fragment,null,p&&a.createElement(w,{sideCar:TE,removeScrollBar:d,shards:f,noRelative:h,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!b,lockRef:r,gapMode:x}),i?a.cloneElement(a.Children.only(l),vn(vn({},T),{ref:I})):a.createElement(y,vn({},T,{className:u,ref:I}),l))});xu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xu.classNames={fullWidth:Nl,zeroRight:Ol};var KV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function XV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=KV();return t&&e.setAttribute("nonce",t),e}function YV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function JV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ZV=function(){var e=0,t=null;return{add:function(r){e==0&&(t=XV())&&(YV(t,r),JV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},QV=function(){var e=ZV();return function(t,r){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},IE=function(){var e=QV(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},eB={left:0,top:0,right:0,gap:0},Hd=function(e){return parseInt(e||"",10)||0},tB=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Hd(r),Hd(n),Hd(o)]},rB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return eB;var t=tB(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},nB=IE(),Ms="data-scroll-locked",oB=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
  .`.concat(zV,` {
   overflow: hidden `).concat(n,`;
   padding-right: `).concat(l,"px ").concat(n,`;
  }
  body[`).concat(Ms,`] {
    overflow: hidden `).concat(n,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
    padding-left: `.concat(o,`px;
    padding-top: `).concat(s,`px;
    padding-right: `).concat(i,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(l,"px ").concat(n,`;
    `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Ol,` {
    right: `).concat(l,"px ").concat(n,`;
  }
  
  .`).concat(Nl,` {
    margin-right: `).concat(l,"px ").concat(n,`;
  }
  
  .`).concat(Ol," .").concat(Ol,` {
    right: 0 `).concat(n,`;
  }
  
  .`).concat(Nl," .").concat(Nl,` {
    margin-right: 0 `).concat(n,`;
  }
  
  body[`).concat(Ms,`] {
    `).concat(FV,": ").concat(l,`px;
  }
`)},i_=function(){var e=parseInt(document.body.getAttribute(Ms)||"0",10);return isFinite(e)?e:0},sB=function(){a.useEffect(function(){return document.body.setAttribute(Ms,(i_()+1).toString()),function(){var e=i_()-1;e<=0?document.body.removeAttribute(Ms):document.body.setAttribute(Ms,e.toString())}},[])},iB=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;sB();var s=a.useMemo(function(){return rB(o)},[o]);return a.createElement(nB,{styles:oB(s,!t,o,r?"":"!important")})},$f=!1;if(typeof window<"u")try{var il=Object.defineProperty({},"passive",{get:function(){return $f=!0,!0}});window.addEventListener("test",il,il),window.removeEventListener("test",il,il)}catch{$f=!1}var as=$f?{passive:!1}:!1,aB=function(e){return e.tagName==="TEXTAREA"},$E=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!aB(e)&&r[t]==="visible")},lB=function(e){return $E(e,"overflowY")},cB=function(e){return $E(e,"overflowX")},a_=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=AE(e,n);if(o){var s=jE(e,n),i=s[1],l=s[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},uB=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},dB=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},AE=function(e,t){return e==="v"?lB(t):cB(t)},jE=function(e,t){return e==="v"?uB(t):dB(t)},pB=function(e,t){return e==="h"&&t==="rtl"?-1:1},fB=function(e,t,r,n,o){var s=pB(e,window.getComputedStyle(t).direction),i=s*n,l=r.target,u=t.contains(l),d=!1,p=i>0,f=0,m=0;do{if(!l)break;var h=jE(e,l),v=h[0],g=h[1],b=h[2],_=g-b-s*v;(v||_)&&AE(e,l)&&(f+=_,m+=v);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(p&&Math.abs(f)<1||!p&&Math.abs(m)<1)&&(d=!0),d},al=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},l_=function(e){return[e.deltaX,e.deltaY]},c_=function(e){return e&&"current"in e?e.current:e},mB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hB=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},gB=0,ls=[];function vB(e){var t=a.useRef([]),r=a.useRef([0,0]),n=a.useRef(),o=a.useState(gB++)[0],s=a.useState(IE)[0],i=a.useRef(e);a.useEffect(function(){i.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=LV([e.lockRef.current],(e.shards||[]).map(c_),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=a.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var _=al(g),y=r.current,x="deltaX"in g?g.deltaX:y[0]-_[0],S="deltaY"in g?g.deltaY:y[1]-_[1],w,I=g.target,T=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&T==="h"&&I.type==="range")return!1;var R=window.getSelection(),P=R&&R.anchorNode,$=P?P===I||P.contains(I):!1;if($)return!1;var A=a_(T,I);if(!A)return!0;if(A?w=T:(w=T==="v"?"h":"v",A=a_(T,I)),!A)return!1;if(!n.current&&"changedTouches"in g&&(x||S)&&(n.current=w),!w)return!0;var k=n.current||w;return fB(k,b,g,k==="h"?x:S)},[]),u=a.useCallback(function(g){var b=g;if(!(!ls.length||ls[ls.length-1]!==s)){var _="deltaY"in b?l_(b):al(b),y=t.current.filter(function(w){return w.name===b.type&&(w.target===b.target||b.target===w.shadowParent)&&mB(w.delta,_)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var x=(i.current.shards||[]).map(c_).filter(Boolean).filter(function(w){return w.contains(b.target)}),S=x.length>0?l(b,x[0]):!i.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),d=a.useCallback(function(g,b,_,y){var x={name:g,delta:b,target:_,should:y,shadowParent:bB(_)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),p=a.useCallback(function(g){r.current=al(g),n.current=void 0},[]),f=a.useCallback(function(g){d(g.type,l_(g),g.target,l(g,e.lockRef.current))},[]),m=a.useCallback(function(g){d(g.type,al(g),g.target,l(g,e.lockRef.current))},[]);a.useEffect(function(){return ls.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",u,as),document.addEventListener("touchmove",u,as),document.addEventListener("touchstart",p,as),function(){ls=ls.filter(function(g){return g!==s}),document.removeEventListener("wheel",u,as),document.removeEventListener("touchmove",u,as),document.removeEventListener("touchstart",p,as)}},[]);var h=e.removeScrollBar,v=e.inert;return a.createElement(a.Fragment,null,v?a.createElement(s,{styles:hB(o)}):null,h?a.createElement(iB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _B=GV(TE,vB);var Oa=a.forwardRef(function(e,t){return a.createElement(xu,vn({},e,{ref:t,sideCar:_B}))});Oa.classNames=xu.classNames;var yB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cs=new WeakMap,ll=new WeakMap,cl={},Ud=0,OE=function(e){return e&&(e.host||OE(e.parentNode))},xB=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=OE(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},wB=function(e,t,r,n){var o=xB(t,Array.isArray(e)?e:[e]);cl[r]||(cl[r]=new WeakMap);var s=cl[r],i=[],l=new Set,u=new Set(o),d=function(f){!f||l.has(f)||(l.add(f),d(f.parentNode))};o.forEach(d);var p=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(m){if(l.has(m))p(m);else try{var h=m.getAttribute(n),v=h!==null&&h!=="false",g=(cs.get(m)||0)+1,b=(s.get(m)||0)+1;cs.set(m,g),s.set(m,b),i.push(m),g===1&&v&&ll.set(m,!0),b===1&&m.setAttribute(r,"true"),v||m.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",m,_)}})};return p(t),l.clear(),Ud++,function(){i.forEach(function(f){var m=cs.get(f)-1,h=s.get(f)-1;cs.set(f,m),s.set(f,h),m||(ll.has(f)||f.removeAttribute(n),ll.delete(f)),h||f.removeAttribute(r)}),Ud--,Ud||(cs=new WeakMap,cs=new WeakMap,ll=new WeakMap,cl={})}},wu=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=yB(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),wB(n,o,r,"aria-hidden")):function(){return null}};function EB(e){const t=SB(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(PB);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function SB(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=TB(o),l=RB(s,o.props);return o.type!==a.Fragment&&(l.ref=n?yr(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var CB=Symbol("radix.slottable");function PB(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===CB}function RB(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function TB(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Eu="Dialog",[NE,DE]=Yt(Eu),[IB,fn]=NE(Eu),kE=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,l=a.useRef(null),u=a.useRef(null),[d,p]=Ir({prop:n,defaultProp:o??!1,onChange:s,caller:Eu});return c.jsx(IB,{scope:t,triggerRef:l,contentRef:u,contentId:Ft(),titleId:Ft(),descriptionId:Ft(),open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(f=>!f),[p]),modal:i,children:r})};kE.displayName=Eu;var ME="DialogTrigger",LE=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fn(ME,r),s=tt(t,o.triggerRef);return c.jsx(Ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":qh(o.open),...n,ref:s,onClick:Ie(e.onClick,o.onOpenToggle)})});LE.displayName=ME;var Uh="DialogPortal",[$B,zE]=NE(Uh,{forceMount:void 0}),FE=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=fn(Uh,t);return c.jsx($B,{scope:t,forceMount:r,children:a.Children.map(n,i=>c.jsx(Bt,{present:r||s.open,children:c.jsx(ui,{asChild:!0,container:o,children:i})}))})};FE.displayName=Uh;var ac="DialogOverlay",VE=a.forwardRef((e,t)=>{const r=zE(ac,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=fn(ac,e.__scopeDialog);return s.modal?c.jsx(Bt,{present:n||s.open,children:c.jsx(jB,{...o,ref:t})}):null});VE.displayName=ac;var AB=EB("DialogOverlay.RemoveScroll"),jB=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fn(ac,r);return c.jsx(Oa,{as:AB,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(Ke.div,{"data-state":qh(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ko="DialogContent",BE=a.forwardRef((e,t)=>{const r=zE(ko,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=fn(ko,e.__scopeDialog);return c.jsx(Bt,{present:n||s.open,children:s.modal?c.jsx(OB,{...o,ref:t}):c.jsx(NB,{...o,ref:t})})});BE.displayName=ko;var OB=a.forwardRef((e,t)=>{const r=fn(ko,e.__scopeDialog),n=a.useRef(null),o=tt(t,r.contentRef,n);return a.useEffect(()=>{const s=n.current;if(s)return wu(s)},[]),c.jsx(HE,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&s.preventDefault()}),onFocusOutside:Ie(e.onFocusOutside,s=>s.preventDefault())})}),NB=a.forwardRef((e,t)=>{const r=fn(ko,e.__scopeDialog),n=a.useRef(!1),o=a.useRef(!1);return c.jsx(HE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),HE=a.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,l=fn(ko,r),u=a.useRef(null),d=tt(t,u);return yu(),c.jsxs(c.Fragment,{children:[c.jsx(ja,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(ci,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":qh(l.open),...i,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(kB,{titleId:l.titleId}),c.jsx(LB,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Wh="DialogTitle",UE=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fn(Wh,r);return c.jsx(Ke.h2,{id:o.titleId,...n,ref:t})});UE.displayName=Wh;var WE="DialogDescription",qE=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fn(WE,r);return c.jsx(Ke.p,{id:o.descriptionId,...n,ref:t})});qE.displayName=WE;var GE="DialogClose",KE=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fn(GE,r);return c.jsx(Ke.button,{type:"button",...n,ref:t,onClick:Ie(e.onClick,()=>o.onOpenChange(!1))})});KE.displayName=GE;function qh(e){return e?"open":"closed"}var XE="DialogTitleWarning",[DB,YE]=T2(XE,{contentName:ko,titleName:Wh,docsSlug:"dialog"}),kB=({titleId:e})=>{const t=YE(XE),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},MB="DialogDescriptionWarning",LB=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${YE(MB).contentName}}.`;return a.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Su=kE,Gh=LE,Na=FE,Ko=VE,Xo=BE,di=UE,pi=qE,Da=KE,zB=Symbol("radix.slottable");function FB(e){const t=({children:r})=>c.jsx(c.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=zB,t}var JE="AlertDialog",[VB]=Yt(JE,[DE]),Fn=DE(),ZE=e=>{const{__scopeAlertDialog:t,...r}=e,n=Fn(t);return c.jsx(Su,{...n,...r,modal:!0})};ZE.displayName=JE;var BB="AlertDialogTrigger",QE=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Fn(r);return c.jsx(Gh,{...o,...n,ref:t})});QE.displayName=BB;var HB="AlertDialogPortal",eS=e=>{const{__scopeAlertDialog:t,...r}=e,n=Fn(t);return c.jsx(Na,{...n,...r})};eS.displayName=HB;var UB="AlertDialogOverlay",tS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Fn(r);return c.jsx(Ko,{...o,...n,ref:t})});tS.displayName=UB;var Ls="AlertDialogContent",[WB,qB]=VB(Ls),GB=FB("AlertDialogContent"),rS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,s=Fn(r),i=a.useRef(null),l=tt(t,i),u=a.useRef(null);return c.jsx(DB,{contentName:Ls,titleName:nS,docsSlug:"alert-dialog",children:c.jsx(WB,{scope:r,cancelRef:u,children:c.jsxs(Xo,{role:"alertdialog",...s,...o,ref:l,onOpenAutoFocus:Ie(o.onOpenAutoFocus,d=>{var p;d.preventDefault(),(p=u.current)==null||p.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[c.jsx(GB,{children:n}),c.jsx(XB,{contentRef:i})]})})})});rS.displayName=Ls;var nS="AlertDialogTitle",oS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Fn(r);return c.jsx(di,{...o,...n,ref:t})});oS.displayName=nS;var sS="AlertDialogDescription",iS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Fn(r);return c.jsx(pi,{...o,...n,ref:t})});iS.displayName=sS;var KB="AlertDialogAction",aS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Fn(r);return c.jsx(Da,{...o,...n,ref:t})});aS.displayName=KB;var lS="AlertDialogCancel",cS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=qB(lS,r),s=Fn(r),i=tt(t,o);return c.jsx(Da,{...s,...n,ref:i})});cS.displayName=lS;var XB=({contentRef:e})=>{const t=`\`${Ls}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${Ls}\` by passing a \`${sS}\` component as a child, which also benefits sighted users by adding visible context to the dialog.

Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ls}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.

For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},YB=ZE,JB=QE,ZB=eS,uS=tS,dS=rS,pS=aS,fS=cS,mS=oS,hS=iS,QB=Symbol.for("react.lazy"),lc=Gm[" use ".trim().toString()];function eH(e){return typeof e=="object"&&e!==null&&"then"in e}function gS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===QB&&"_payload"in e&&eH(e._payload)}function fi(e){const t=tH(e),r=a.forwardRef((n,o)=>{let{children:s,...i}=n;gS(s)&&typeof lc=="function"&&(s=lc(s._payload));const l=a.Children.toArray(s),u=l.find(nH);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var vS=fi("Slot");function tH(e){const t=a.forwardRef((r,n)=>{let{children:o,...s}=r;if(gS(o)&&typeof lc=="function"&&(o=lc(o._payload)),a.isValidElement(o)){const i=sH(o),l=oH(s,o.props);return o.type!==a.Fragment&&(l.ref=n?yr(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rH=Symbol("radix.slottable");function nH(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rH}function oH(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function sH(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Kh=nr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary-dark active:bg-primary-dark",secondary:"bg-bg-surface text-text shadow-sm hover:bg-border",outline:"border border-border-strong bg-bg-base text-text shadow-xs hover:bg-bg-surface",ghost:"text-text hover:bg-bg-surface hover:text-text",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",link:"text-primary underline-offset-4 hover:underline"},size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 py-2",lg:"h-12 px-6 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),Ws=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,loading:o=!1,children:s,disabled:i,...l},u)=>{const d=n?vS:"button",p=n?a.isValidElement(s)?a.cloneElement(s,void 0,c.jsxs(c.Fragment,{children:[o?c.jsx(Vb,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):null,s.props.children]})):s:c.jsxs(c.Fragment,{children:[o?c.jsx(Vb,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):null,s]});return c.jsx(d,{className:ve(Kh({variant:t,size:r}),e),ref:u,disabled:i||o,...l,children:p})});Ws.displayName="Button";const Rre=YB,Tre=JB,iH=ZB,bS=a.forwardRef(({className:e,...t},r)=>c.jsx(uS,{ref:r,className:ve("fixed inset-0 z-[1200] bg-slate-900/60 backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));bS.displayName=uS.displayName;const aH=a.forwardRef(({className:e,...t},r)=>c.jsxs(iH,{children:[c.jsx(bS,{}),c.jsx(dS,{ref:r,className:ve("fixed left-[50%] top-[50%] z-[1300] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-bg-elevated p-6 shadow-lg sm:rounded-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...t})]}));aH.displayName=dS.displayName;const lH=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col space-y-2 text-center sm:text-left",e),...t});lH.displayName="AlertDialogHeader";const cH=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});cH.displayName="AlertDialogFooter";const uH=a.forwardRef(({className:e,...t},r)=>c.jsx(mS,{ref:r,className:ve("text-lg font-semibold",e),...t}));uH.displayName=mS.displayName;const dH=a.forwardRef(({className:e,...t},r)=>c.jsx(hS,{ref:r,className:ve("text-sm text-text-muted",e),...t}));dH.displayName=hS.displayName;const pH=a.forwardRef(({className:e,...t},r)=>c.jsx(pS,{ref:r,className:ve(Kh(),e),...t}));pH.displayName=pS.displayName;const fH=a.forwardRef(({className:e,...t},r)=>c.jsx(fS,{ref:r,className:ve(Kh({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));fH.displayName=fS.displayName;function mH(e,t=[]){let r=[];function n(s,i){const l=a.createContext(i);l.displayName=s+"Context";const u=r.length;r=[...r,i];const d=f=>{var _;const{scope:m,children:h,...v}=f,g=((_=m==null?void 0:m[e])==null?void 0:_[u])||l,b=a.useMemo(()=>v,Object.values(v));return c.jsx(g.Provider,{value:b,children:h})};d.displayName=s+"Provider";function p(f,m){var g;const h=((g=m==null?void 0:m[e])==null?void 0:g[u])||l,v=a.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{const s=r.map(i=>a.createContext(i));return function(l){const u=(l==null?void 0:l[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,hH(o,...t)]}function hH(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((l,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...l,...f}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var gH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xh=gH.reduce((e,t)=>{const r=fi(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vH(){return K$.useSyncExternalStore(bH,()=>!0,()=>!1)}function bH(){return()=>{}}var Yh="Avatar",[_H]=mH(Yh),[yH,_S]=_H(Yh),yS=a.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,s]=a.useState("idle");return c.jsx(yH,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:c.jsx(Xh.span,{...n,ref:t})})});yS.displayName=Yh;var xS="AvatarImage",wS=a.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...s}=e,i=_S(xS,r),l=xH(n,s),u=Xt(d=>{o(d),i.onImageLoadingStatusChange(d)});return Mt(()=>{l!=="idle"&&u(l)},[l,u]),l==="loaded"?c.jsx(Xh.img,{...s,ref:t,src:n}):null});wS.displayName=xS;var ES="AvatarFallback",SS=a.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,s=_S(ES,r),[i,l]=a.useState(n===void 0);return a.useEffect(()=>{if(n!==void 0){const u=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(u)}},[n]),i&&s.imageLoadingStatus!=="loaded"?c.jsx(Xh.span,{...o,ref:t}):null});SS.displayName=ES;function u_(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function xH(e,{referrerPolicy:t,crossOrigin:r}){const n=vH(),o=a.useRef(null),s=n?(o.current||(o.current=new window.Image),o.current):null,[i,l]=a.useState(()=>u_(s,e));return Mt(()=>{l(u_(s,e))},[s,e]),Mt(()=>{const u=f=>()=>{l(f)};if(!s)return;const d=u("loaded"),p=u("error");return s.addEventListener("load",d),s.addEventListener("error",p),t&&(s.referrerPolicy=t),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",d),s.removeEventListener("error",p)}},[s,r,t]),i}var CS=yS,PS=wS,RS=SS;const wH=a.forwardRef(({className:e,...t},r)=>c.jsx(CS,{ref:r,className:ve("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));wH.displayName=CS.displayName;const EH=a.forwardRef(({className:e,...t},r)=>c.jsx(PS,{ref:r,className:ve("aspect-square h-full w-full",e),...t}));EH.displayName=PS.displayName;const SH=a.forwardRef(({className:e,...t},r)=>c.jsx(RS,{ref:r,className:ve("flex h-full w-full items-center justify-center rounded-full bg-bg-surface text-sm font-medium text-text-muted",e),...t}));SH.displayName=RS.displayName;const CH=nr("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"bg-primary-light text-primary-dark",neutral:"bg-bg-surface text-text",success:"bg-success-light text-primary-dark",warning:"bg-warning-light text-warning",error:"bg-error-light text-error",info:"bg-info-light text-info",outline:"border border-border text-text"}},defaultVariants:{variant:"default"}});function TS({className:e,variant:t,...r}){return c.jsx("span",{className:ve(CH({variant:t}),e),...r})}const IS=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("rounded-lg border border-border bg-bg-elevated text-text shadow-sm",e),...t}));IS.displayName="Card";const PH=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("flex flex-col space-y-1.5 p-6",e),...t}));PH.displayName="CardHeader";const RH=a.forwardRef(({className:e,...t},r)=>c.jsx("h3",{ref:r,className:ve("text-lg font-semibold leading-snug tracking-tight",e),...t}));RH.displayName="CardTitle";const TH=a.forwardRef(({className:e,...t},r)=>c.jsx("p",{ref:r,className:ve("text-sm text-text-muted",e),...t}));TH.displayName="CardDescription";const $S=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("p-6 pt-0",e),...t}));$S.displayName="CardContent";const IH=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("flex items-center p-6 pt-0",e),...t}));IH.displayName="CardFooter";function Cu(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Pu(e){const[t,r]=a.useState(void 0);return Mt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,l=d.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Ru="Checkbox",[$H]=Yt(Ru),[AH,Jh]=$H(Ru);function jH(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:s,form:i,name:l,onCheckedChange:u,required:d,value:p="on",internal_do_not_use_render:f}=e,[m,h]=Ir({prop:r,defaultProp:o??!1,onChange:u,caller:Ru}),[v,g]=a.useState(null),[b,_]=a.useState(null),y=a.useRef(!1),x=v?!!i||!!v.closest("form"):!0,S={checked:m,disabled:s,setChecked:h,control:v,setControl:g,name:l,form:i,value:p,hasConsumerStoppedPropagationRef:y,required:d,defaultChecked:to(o)?!1:o,isFormControl:x,bubbleInput:b,setBubbleInput:_};return c.jsx(AH,{scope:t,...S,children:OH(f)?f(S):n})}var AS="CheckboxTrigger",jS=a.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:s,value:i,disabled:l,checked:u,required:d,setControl:p,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:h,bubbleInput:v}=Jh(AS,e),g=tt(o,p),b=a.useRef(u);return a.useEffect(()=>{const _=s==null?void 0:s.form;if(_){const y=()=>f(b.current);return _.addEventListener("reset",y),()=>_.removeEventListener("reset",y)}},[s,f]),c.jsx(Ke.button,{type:"button",role:"checkbox","aria-checked":to(u)?"mixed":u,"aria-required":d,"data-state":MS(u),"data-disabled":l?"":void 0,disabled:l,value:i,...n,ref:g,onKeyDown:Ie(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:Ie(r,_=>{f(y=>to(y)?!0:!y),v&&h&&(m.current=_.isPropagationStopped(),m.current||_.stopPropagation())})})});jS.displayName=AS;var Zh=a.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:s,required:i,disabled:l,value:u,onCheckedChange:d,form:p,...f}=e;return c.jsx(jH,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:l,required:i,onCheckedChange:d,name:n,form:p,value:u,internal_do_not_use_render:({isFormControl:m})=>c.jsxs(c.Fragment,{children:[c.jsx(jS,{...f,ref:t,__scopeCheckbox:r}),m&&c.jsx(kS,{__scopeCheckbox:r})]})})});Zh.displayName=Ru;var OS="CheckboxIndicator",NS=a.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,s=Jh(OS,r);return c.jsx(Bt,{present:n||to(s.checked)||s.checked===!0,children:c.jsx(Ke.span,{"data-state":MS(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});NS.displayName=OS;var DS="CheckboxBubbleInput",kS=a.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:l,disabled:u,name:d,value:p,form:f,bubbleInput:m,setBubbleInput:h}=Jh(DS,e),v=tt(r,h),g=Cu(s),b=Pu(n);a.useEffect(()=>{const y=m;if(!y)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set,I=!o.current;if(g!==s&&w){const T=new Event("click",{bubbles:I});y.indeterminate=to(s),w.call(y,to(s)?!1:s),y.dispatchEvent(T)}},[m,g,s,o]);const _=a.useRef(to(s)?!1:s);return c.jsx(Ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??_.current,required:l,disabled:u,name:d,value:p,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});kS.displayName=DS;function OH(e){return typeof e=="function"}function to(e){return e==="indeterminate"}function MS(e){return to(e)?"indeterminate":e?"checked":"unchecked"}const NH=a.forwardRef(({className:e,...t},r)=>c.jsx(Zh,{ref:r,className:ve("peer h-4 w-4 shrink-0 rounded-sm border border-border-strong","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground",e),...t,children:c.jsx(NS,{className:ve("flex items-center justify-center text-current"),children:c.jsx(Oh,{className:"h-4 w-4"})})}));NH.displayName=Zh.displayName;var d_=1,DH=.9,kH=.8,MH=.17,Wd=.1,qd=.999,LH=.9999,zH=.99,FH=/[\\\/_+.#"@\[\(\{&]/,VH=/[\\\/_+.#"@\[\(\{&]/g,BH=/[\s-]/,LS=/[\s-]/g;function Af(e,t,r,n,o,s,i){if(s===t.length)return o===e.length?d_:zH;var l=`${o},${s}`;if(i[l]!==void 0)return i[l];for(var u=n.charAt(s),d=r.indexOf(u,o),p=0,f,m,h,v;d>=0;)f=Af(e,t,r,n,d+1,s+1,i),f>p&&(d===o?f*=d_:FH.test(e.charAt(d-1))?(f*=kH,h=e.slice(o,d-1).match(VH),h&&o>0&&(f*=Math.pow(qd,h.length))):BH.test(e.charAt(d-1))?(f*=DH,v=e.slice(o,d-1).match(LS),v&&o>0&&(f*=Math.pow(qd,v.length))):(f*=MH,o>0&&(f*=Math.pow(qd,d-o))),e.charAt(d)!==t.charAt(s)&&(f*=LH)),(f<Wd&&r.charAt(d-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(d-1)!==n.charAt(s))&&(m=Af(e,t,r,n,d+1,s+2,i),m*Wd>f&&(f=m*Wd)),f>p&&(p=f),d=r.indexOf(u,d+1);return i[l]=p,p}function p_(e){return e.toLowerCase().replace(LS," ")}function HH(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Af(e,t,p_(e),p_(t),0,0,{})}var UH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ao=UH.reduce((e,t)=>{const r=fi(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Si='[cmdk-group=""]',Gd='[cmdk-group-items=""]',WH='[cmdk-group-heading=""]',zS='[cmdk-item=""]',f_=`${zS}:not([aria-disabled="true"])`,jf="cmdk-item-select",_s="data-value",qH=(e,t,r)=>HH(e,t,r),FS=a.createContext(void 0),ka=()=>a.useContext(FS),VS=a.createContext(void 0),Qh=()=>a.useContext(VS),BS=a.createContext(void 0),HS=a.forwardRef((e,t)=>{let r=ys(()=>{var O,M;return{search:"",value:(M=(O=e.value)!=null?O:e.defaultValue)!=null?M:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=ys(()=>new Set),o=ys(()=>new Map),s=ys(()=>new Map),i=ys(()=>new Set),l=US(e),{label:u,children:d,value:p,onValueChange:f,filter:m,shouldFilter:h,loop:v,disablePointerSelection:g=!1,vimBindings:b=!0,..._}=e,y=Ft(),x=Ft(),S=Ft(),w=a.useRef(null),I=n5();Mo(()=>{if(p!==void 0){let O=p.trim();r.current.value=O,T.emit()}},[p]),Mo(()=>{I(6,D)},[]);let T=a.useMemo(()=>({subscribe:O=>(i.current.add(O),()=>i.current.delete(O)),snapshot:()=>r.current,setState:(O,M,G)=>{var L,W,B,J;if(!Object.is(r.current[O],M)){if(r.current[O]=M,O==="search")k(),$(),I(1,A);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(L=document.getElementById(y))==null||L.focus()}if(I(7,()=>{var K;r.current.selectedItemId=(K=z())==null?void 0:K.id,T.emit()}),G||I(5,D),((W=l.current)==null?void 0:W.value)!==void 0){let K=M??"";(J=(B=l.current).onValueChange)==null||J.call(B,K);return}}T.emit()}},emit:()=>{i.current.forEach(O=>O())}}),[]),R=a.useMemo(()=>({value:(O,M,G)=>{var L;M!==((L=s.current.get(O))==null?void 0:L.value)&&(s.current.set(O,{value:M,keywords:G}),r.current.filtered.items.set(O,P(M,G)),I(2,()=>{$(),T.emit()}))},item:(O,M)=>(n.current.add(O),M&&(o.current.has(M)?o.current.get(M).add(O):o.current.set(M,new Set([O]))),I(3,()=>{k(),$(),r.current.value||A(),T.emit()}),()=>{s.current.delete(O),n.current.delete(O),r.current.filtered.items.delete(O);let G=z();I(4,()=>{k(),(G==null?void 0:G.getAttribute("id"))===O&&A(),T.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{s.current.delete(O),o.current.delete(O)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:y,inputId:S,labelId:x,listInnerRef:w}),[]);function P(O,M){var G,L;let W=(L=(G=l.current)==null?void 0:G.filter)!=null?L:qH;return O?W(O,r.current.search,M):0}function $(){if(!r.current.search||l.current.shouldFilter===!1)return;let O=r.current.filtered.items,M=[];r.current.filtered.groups.forEach(L=>{let W=o.current.get(L),B=0;W.forEach(J=>{let K=O.get(J);B=Math.max(K,B)}),M.push([L,B])});let G=w.current;X().sort((L,W)=>{var B,J;let K=L.getAttribute("id"),re=W.getAttribute("id");return((B=O.get(re))!=null?B:0)-((J=O.get(K))!=null?J:0)}).forEach(L=>{let W=L.closest(Gd);W?W.appendChild(L.parentElement===W?L:L.closest(`${Gd} > *`)):G.appendChild(L.parentElement===G?L:L.closest(`${Gd} > *`))}),M.sort((L,W)=>W[1]-L[1]).forEach(L=>{var W;let B=(W=w.current)==null?void 0:W.querySelector(`${Si}[${_s}="${encodeURIComponent(L[0])}"]`);B==null||B.parentElement.appendChild(B)})}function A(){let O=X().find(G=>G.getAttribute("aria-disabled")!=="true"),M=O==null?void 0:O.getAttribute(_s);T.setState("value",M||void 0)}function k(){var O,M,G,L;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let W=0;for(let B of n.current){let J=(M=(O=s.current.get(B))==null?void 0:O.value)!=null?M:"",K=(L=(G=s.current.get(B))==null?void 0:G.keywords)!=null?L:[],re=P(J,K);r.current.filtered.items.set(B,re),re>0&&W++}for(let[B,J]of o.current)for(let K of J)if(r.current.filtered.items.get(K)>0){r.current.filtered.groups.add(B);break}r.current.filtered.count=W}function D(){var O,M,G;let L=z();L&&(((O=L.parentElement)==null?void 0:O.firstChild)===L&&((G=(M=L.closest(Si))==null?void 0:M.querySelector(WH))==null||G.scrollIntoView({block:"nearest"})),L.scrollIntoView({block:"nearest"}))}function z(){var O;return(O=w.current)==null?void 0:O.querySelector(`${zS}[aria-selected="true"]`)}function X(){var O;return Array.from(((O=w.current)==null?void 0:O.querySelectorAll(f_))||[])}function V(O){let M=X()[O];M&&T.setState("value",M.getAttribute(_s))}function Y(O){var M;let G=z(),L=X(),W=L.findIndex(J=>J===G),B=L[W+O];(M=l.current)!=null&&M.loop&&(B=W+O<0?L[L.length-1]:W+O===L.length?L[0]:L[W+O]),B&&T.setState("value",B.getAttribute(_s))}function U(O){let M=z(),G=M==null?void 0:M.closest(Si),L;for(;G&&!L;)G=O>0?t5(G,Si):r5(G,Si),L=G==null?void 0:G.querySelector(f_);L?T.setState("value",L.getAttribute(_s)):Y(O)}let F=()=>V(X().length-1),H=O=>{O.preventDefault(),O.metaKey?F():O.altKey?U(1):Y(1)},ee=O=>{O.preventDefault(),O.metaKey?V(0):O.altKey?U(-1):Y(-1)};return a.createElement(ao.div,{ref:t,tabIndex:-1,..._,"cmdk-root":"",onKeyDown:O=>{var M;(M=_.onKeyDown)==null||M.call(_,O);let G=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||G))switch(O.key){case"n":case"j":{b&&O.ctrlKey&&H(O);break}case"ArrowDown":{H(O);break}case"p":case"k":{b&&O.ctrlKey&&ee(O);break}case"ArrowUp":{ee(O);break}case"Home":{O.preventDefault(),V(0);break}case"End":{O.preventDefault(),F();break}case"Enter":{O.preventDefault();let L=z();if(L){let W=new Event(jf);L.dispatchEvent(W)}}}}},a.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:s5},u),Tu(e,O=>a.createElement(VS.Provider,{value:T},a.createElement(FS.Provider,{value:R},O))))}),GH=a.forwardRef((e,t)=>{var r,n;let o=Ft(),s=a.useRef(null),i=a.useContext(BS),l=ka(),u=US(e),d=(n=(r=u.current)==null?void 0:r.forceMount)!=null?n:i==null?void 0:i.forceMount;Mo(()=>{if(!d)return l.item(o,i==null?void 0:i.id)},[d]);let p=WS(o,s,[e.value,e.children,s],e.keywords),f=Qh(),m=no(I=>I.value&&I.value===p.current),h=no(I=>d||l.filter()===!1?!0:I.search?I.filtered.items.get(o)>0:!0);a.useEffect(()=>{let I=s.current;if(!(!I||e.disabled))return I.addEventListener(jf,v),()=>I.removeEventListener(jf,v)},[h,e.onSelect,e.disabled]);function v(){var I,T;g(),(T=(I=u.current).onSelect)==null||T.call(I,p.current)}function g(){f.setState("value",p.current,!0)}if(!h)return null;let{disabled:b,value:_,onSelect:y,forceMount:x,keywords:S,...w}=e;return a.createElement(ao.div,{ref:yr(s,t),...w,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!m,"data-disabled":!!b,"data-selected":!!m,onPointerMove:b||l.getDisablePointerSelection()?void 0:g,onClick:b?void 0:v},e.children)}),KH=a.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...s}=e,i=Ft(),l=a.useRef(null),u=a.useRef(null),d=Ft(),p=ka(),f=no(h=>o||p.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);Mo(()=>p.group(i),[]),WS(i,l,[e.value,e.heading,u]);let m=a.useMemo(()=>({id:i,forceMount:o}),[o]);return a.createElement(ao.div,{ref:yr(l,t),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},r&&a.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),Tu(e,h=>a.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},a.createElement(BS.Provider,{value:m},h))))}),XH=a.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=a.useRef(null),s=no(i=>!i.search);return!r&&!s?null:a.createElement(ao.div,{ref:yr(o,t),...n,"cmdk-separator":"",role:"separator"})}),YH=a.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,s=Qh(),i=no(d=>d.search),l=no(d=>d.selectedItemId),u=ka();return a.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),a.createElement(ao.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:o?e.value:i,onChange:d=>{o||s.setState("search",d.target.value),r==null||r(d.target.value)}})}),JH=a.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,s=a.useRef(null),i=a.useRef(null),l=no(d=>d.selectedItemId),u=ka();return a.useEffect(()=>{if(i.current&&s.current){let d=i.current,p=s.current,f,m=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let h=d.offsetHeight;p.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return m.observe(d),()=>{cancelAnimationFrame(f),m.unobserve(d)}}},[]),a.createElement(ao.div,{ref:yr(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:u.listId},Tu(e,d=>a.createElement("div",{ref:yr(i,u.listInnerRef),"cmdk-list-sizer":""},d)))}),ZH=a.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:s,container:i,...l}=e;return a.createElement(Su,{open:r,onOpenChange:n},a.createElement(Na,{container:i},a.createElement(Ko,{"cmdk-overlay":"",className:o}),a.createElement(Xo,{"aria-label":e.label,"cmdk-dialog":"",className:s},a.createElement(HS,{ref:t,...l}))))}),QH=a.forwardRef((e,t)=>no(r=>r.filtered.count===0)?a.createElement(ao.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),e5=a.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...s}=e;return a.createElement(ao.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Tu(e,i=>a.createElement("div",{"aria-hidden":!0},i)))}),Ar=Object.assign(HS,{List:JH,Item:GH,Input:YH,Group:KH,Separator:XH,Dialog:ZH,Empty:QH,Loading:e5});function t5(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function r5(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function US(e){let t=a.useRef(e);return Mo(()=>{t.current=e}),t}var Mo=typeof window>"u"?a.useEffect:a.useLayoutEffect;function ys(e){let t=a.useRef();return t.current===void 0&&(t.current=e()),t}function no(e){let t=Qh(),r=()=>e(t.snapshot());return a.useSyncExternalStore(t.subscribe,r,r)}function WS(e,t,r,n=[]){let o=a.useRef(),s=ka();return Mo(()=>{var i;let l=(()=>{var d;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(d=p.current.textContent)==null?void 0:d.trim():o.current}})(),u=n.map(d=>d.trim());s.value(e,l,u),(i=t.current)==null||i.setAttribute(_s,l),o.current=l}),o}var n5=()=>{let[e,t]=a.useState(),r=ys(()=>new Map);return Mo(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function o5(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Tu({asChild:e,children:t},r){return e&&a.isValidElement(t)?a.cloneElement(o5(t),{ref:t.ref},r(t.props.children)):r(t)}var s5={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const i5=Su,Ire=Gh,a5=Na,qS=a.forwardRef(({className:e,...t},r)=>c.jsx(Ko,{ref:r,className:ve("fixed inset-0 z-[1200] bg-slate-900/60 backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));qS.displayName=Ko.displayName;const GS=a.forwardRef(({className:e,children:t,...r},n)=>{const{t:o}=oo();return c.jsxs(a5,{children:[c.jsx(qS,{}),c.jsxs(Xo,{ref:n,className:ve("fixed left-[50%] top-[50%] z-[1300] grid max-h-[85vh] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto border border-border bg-bg-elevated p-6 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","sm:rounded-lg",e),...r,children:[t,c.jsxs(Da,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-bg-base transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Dh,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:o("ui.dialog.close","Закрыть")})]})]})]})});GS.displayName=Xo.displayName;const l5=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});l5.displayName="DialogHeader";const c5=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});c5.displayName="DialogFooter";const u5=a.forwardRef(({className:e,...t},r)=>c.jsx(di,{ref:r,className:ve("text-lg font-semibold leading-snug tracking-tight",e),...t}));u5.displayName=di.displayName;const d5=a.forwardRef(({className:e,...t},r)=>c.jsx(pi,{ref:r,className:ve("text-sm text-text-muted",e),...t}));d5.displayName=pi.displayName;const KS=a.forwardRef(({className:e,...t},r)=>c.jsx(Ar,{ref:r,className:ve("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));KS.displayName=Ar.displayName;function $re({children:e,...t}){return c.jsx(i5,{...t,children:c.jsx(GS,{className:"overflow-hidden p-0 shadow-lg",children:c.jsx(KS,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})})}const p5=a.forwardRef(({className:e,...t},r)=>c.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[c.jsx(IF,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),c.jsx(Ar.Input,{ref:r,className:ve("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));p5.displayName=Ar.Input.displayName;const f5=a.forwardRef(({className:e,...t},r)=>c.jsx(Ar.List,{ref:r,className:ve("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));f5.displayName=Ar.List.displayName;const m5=a.forwardRef((e,t)=>c.jsx(Ar.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));m5.displayName=Ar.Empty.displayName;const h5=a.forwardRef(({className:e,...t},r)=>c.jsx(Ar.Group,{ref:r,className:ve("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));h5.displayName=Ar.Group.displayName;const g5=a.forwardRef(({className:e,...t},r)=>c.jsx(Ar.Separator,{ref:r,className:ve("-mx-1 h-px bg-border",e),...t}));g5.displayName=Ar.Separator.displayName;const v5=a.forwardRef(({className:e,...t},r)=>c.jsx(Ar.Item,{ref:r,className:ve("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t}));v5.displayName=Ar.Item.displayName;var b5="Arrow",XS=a.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return c.jsx(Ke.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});XS.displayName=b5;var _5=XS,eg="Popper",[YS,lo]=Yt(eg),[y5,JS]=YS(eg),ZS=e=>{const{__scopePopper:t,children:r}=e,[n,o]=a.useState(null);return c.jsx(y5,{scope:t,anchor:n,onAnchorChange:o,children:r})};ZS.displayName=eg;var QS="PopperAnchor",eC=a.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=JS(QS,r),i=a.useRef(null),l=tt(t,i),u=a.useRef(null);return a.useEffect(()=>{const d=u.current;u.current=(n==null?void 0:n.current)||i.current,d!==u.current&&s.onAnchorChange(u.current)}),n?null:c.jsx(Ke.div,{...o,ref:l})});eC.displayName=QS;var tg="PopperContent",[x5,w5]=YS(tg),tC=a.forwardRef((e,t)=>{var B,J,K,re,se,Z;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=e,b=JS(tg,r),[_,y]=a.useState(null),x=tt(t,ne=>y(ne)),[S,w]=a.useState(null),I=Pu(S),T=(I==null?void 0:I.width)??0,R=(I==null?void 0:I.height)??0,P=n+(s!=="center"?"-"+s:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},A=Array.isArray(d)?d:[d],k=A.length>0,D={padding:$,boundary:A.filter(S5),altBoundary:k},{refs:z,floatingStyles:X,placement:V,isPositioned:Y,middlewareData:U}=O$({strategy:"fixed",placement:P,whileElementsMounted:(...ne)=>F$(...ne,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[N$({mainAxis:o+R,alignmentAxis:i}),u&&D$({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?V$():void 0,...D}),u&&k$({...D}),M$({...D,apply:({elements:ne,rects:ie,availableWidth:he,availableHeight:me})=>{const{width:Pe,height:Se}=ie.reference,Ce=ne.floating.style;Ce.setProperty("--radix-popper-available-width",`${he}px`),Ce.setProperty("--radix-popper-available-height",`${me}px`),Ce.setProperty("--radix-popper-anchor-width",`${Pe}px`),Ce.setProperty("--radix-popper-anchor-height",`${Se}px`)}}),S&&L$({element:S,padding:l}),C5({arrowWidth:T,arrowHeight:R}),m&&z$({strategy:"referenceHidden",...D})]}),[F,H]=oC(V),ee=Xt(v);Mt(()=>{Y&&(ee==null||ee())},[Y,ee]);const O=(B=U.arrow)==null?void 0:B.x,M=(J=U.arrow)==null?void 0:J.y,G=((K=U.arrow)==null?void 0:K.centerOffset)!==0,[L,W]=a.useState();return Mt(()=>{_&&W(window.getComputedStyle(_).zIndex)},[_]),c.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Y?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(re=U.transformOrigin)==null?void 0:re.x,(se=U.transformOrigin)==null?void 0:se.y].join(" "),...((Z=U.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(x5,{scope:r,placedSide:F,onArrowChange:w,arrowX:O,arrowY:M,shouldHideArrow:G,children:c.jsx(Ke.div,{"data-side":F,"data-align":H,...g,ref:x,style:{...g.style,animation:Y?void 0:"none"}})})})});tC.displayName=tg;var rC="PopperArrow",E5={top:"bottom",right:"left",bottom:"top",left:"right"},nC=a.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=w5(rC,n),i=E5[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(_5,{...o,ref:r,style:{...o.style,display:"block"}})})});nC.displayName=rC;function S5(e){return e!==null}var C5=e=>({name:"transformOrigin",options:e,fn(t){var b,_,y;const{placement:r,rects:n,middlewareData:o}=t,i=((b=o.arrow)==null?void 0:b.centerOffset)!==0,l=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,p]=oC(r),f={start:"0%",center:"50%",end:"100%"}[p],m=(((_=o.arrow)==null?void 0:_.x)??0)+l/2,h=(((y=o.arrow)==null?void 0:y.y)??0)+u/2;let v="",g="";return d==="bottom"?(v=i?f:`${m}px`,g=`${-u}px`):d==="top"?(v=i?f:`${m}px`,g=`${n.floating.height+u}px`):d==="right"?(v=`${-u}px`,g=i?f:`${h}px`):d==="left"&&(v=`${n.floating.width+u}px`,g=i?f:`${h}px`),{data:{x:v,y:g}}}});function oC(e){const[t,r="center"]=e.split("-");return[t,r]}var Iu=ZS,Ma=eC,$u=tC,Au=nC;function P5(e){const t=R5(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(I5);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function R5(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=A5(o),l=$5(s,o.props);return o.type!==a.Fragment&&(l.ref=n?yr(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var T5=Symbol("radix.slottable");function I5(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===T5}function $5(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function A5(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ju="Popover",[sC]=Yt(ju,[lo]),La=lo(),[j5,co]=sC(ju),iC=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,l=La(t),u=a.useRef(null),[d,p]=a.useState(!1),[f,m]=Ir({prop:n,defaultProp:o??!1,onChange:s,caller:ju});return c.jsx(Iu,{...l,children:c.jsx(j5,{scope:t,contentId:Ft(),triggerRef:u,open:f,onOpenChange:m,onOpenToggle:a.useCallback(()=>m(h=>!h),[m]),hasCustomAnchor:d,onCustomAnchorAdd:a.useCallback(()=>p(!0),[]),onCustomAnchorRemove:a.useCallback(()=>p(!1),[]),modal:i,children:r})})};iC.displayName=ju;var aC="PopoverAnchor",O5=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=co(aC,r),s=La(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return a.useEffect(()=>(i(),()=>l()),[i,l]),c.jsx(Ma,{...s,...n,ref:t})});O5.displayName=aC;var lC="PopoverTrigger",cC=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=co(lC,r),s=La(r),i=tt(t,o.triggerRef),l=c.jsx(Ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":mC(o.open),...n,ref:i,onClick:Ie(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:c.jsx(Ma,{asChild:!0,...s,children:l})});cC.displayName=lC;var rg="PopoverPortal",[N5,D5]=sC(rg,{forceMount:void 0}),uC=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,s=co(rg,t);return c.jsx(N5,{scope:t,forceMount:r,children:c.jsx(Bt,{present:r||s.open,children:c.jsx(ui,{asChild:!0,container:o,children:n})})})};uC.displayName=rg;var qs="PopoverContent",dC=a.forwardRef((e,t)=>{const r=D5(qs,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=co(qs,e.__scopePopover);return c.jsx(Bt,{present:n||s.open,children:s.modal?c.jsx(M5,{...o,ref:t}):c.jsx(L5,{...o,ref:t})})});dC.displayName=qs;var k5=P5("PopoverContent.RemoveScroll"),M5=a.forwardRef((e,t)=>{const r=co(qs,e.__scopePopover),n=a.useRef(null),o=tt(t,n),s=a.useRef(!1);return a.useEffect(()=>{const i=n.current;if(i)return wu(i)},[]),c.jsx(Oa,{as:k5,allowPinchZoom:!0,children:c.jsx(pC,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),s.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Ie(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),L5=a.forwardRef((e,t)=>{const r=co(qs,e.__scopePopover),n=a.useRef(!1),o=a.useRef(!1);return c.jsx(pC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),pC=a.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,...f}=e,m=co(qs,r),h=La(r);return yu(),c.jsx(ja,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(ci,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:p,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>m.onOpenChange(!1),children:c.jsx($u,{"data-state":mC(m.open),role:"dialog",id:m.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),fC="PopoverClose",z5=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=co(fC,r);return c.jsx(Ke.button,{type:"button",...n,ref:t,onClick:Ie(e.onClick,()=>o.onOpenChange(!1))})});z5.displayName=fC;var F5="PopoverArrow",V5=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=La(r);return c.jsx(Au,{...o,...n,ref:t})});V5.displayName=F5;function mC(e){return e?"open":"closed"}var B5=iC,H5=cC,U5=uC,hC=dC;const gC=B5,vC=H5,ng=a.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>c.jsx(U5,{children:c.jsx(hC,{ref:o,align:t,sideOffset:r,className:ve("z-[1400] w-72 rounded-md border border-border bg-bg-elevated p-4 text-text shadow-md outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...n})}));ng.displayName=hC.displayName;function W5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const q5=N.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),za=()=>{const e=N.useContext(q5);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};W5(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
[data-state=closed]
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function G5(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function K5(...e){return t=>e.forEach(r=>G5(r,t))}function bC(...e){return a.useCallback(K5(...e),e)}const m_=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Kd(e,t){if(!e)return()=>{};const r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}function X5(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}const Xd={DURATION:.5,EASE:[.32,.72,0,1]},Y5=8,J5=26,Z5=()=>()=>{};function Q5(){const{direction:e,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:n,noBodyStyles:o}=za(),s=N.useRef(null),i=a.useMemo(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-J5)/window.innerWidth}N.useEffect(()=>{if(t&&r){s.current&&clearTimeout(s.current);const u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;X5(n&&!o?Kd(document.body,{background:"black"}):Z5,Kd(u,{transformOrigin:m_(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Xd.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Xd.EASE.join(",")})`}));const d=Kd(u,{borderRadius:`${Y5}px`,overflow:"hidden",...m_(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{d(),s.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},Xd.DURATION*1e3)}}},[t,r,i])}const _C=N.forwardRef(function({...e},t){const{overlayRef:r,snapPoints:n,onRelease:o,shouldFade:s,isOpen:i,modal:l,shouldAnimate:u}=za(),d=bC(t,r),p=n&&n.length>0;if(!l)return null;const f=N.useCallback(m=>o(m),[o]);return N.createElement(Ko,{onMouseUp:f,ref:d,"data-vaul-overlay":"","data-vaul-snap-points":i&&p?"true":"false","data-vaul-snap-points-overlay":i&&s?"true":"false","data-vaul-animate":u!=null&&u.current?"true":"false",...e})});_C.displayName="Drawer.Overlay";const yC=N.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:r,...n},o){const{drawerRef:s,onPress:i,onRelease:l,onDrag:u,keyboardIsOpen:d,snapPointsOffset:p,activeSnapPointIndex:f,modal:m,isOpen:h,direction:v,snapPoints:g,container:b,handleOnly:_,shouldAnimate:y,autoFocus:x}=za(),[S,w]=N.useState(!1),I=bC(o,s),T=N.useRef(null),R=N.useRef(null),P=N.useRef(!1),$=g&&g.length>0;Q5();const A=(D,z,X=0)=>{if(P.current)return!0;const V=Math.abs(D.y),Y=Math.abs(D.x),U=Y>V,F=["bottom","right"].includes(z)?1:-1;if(z==="left"||z==="right"){if(!(D.x*F<0)&&Y>=0&&Y<=X)return U}else if(!(D.y*F<0)&&V>=0&&V<=X)return!U;return P.current=!0,!0};N.useEffect(()=>{$&&window.requestAnimationFrame(()=>{w(!0)})},[]);function k(D){T.current=null,P.current=!1,l(D)}return N.createElement(Xo,{"data-vaul-drawer-direction":v,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":h&&$?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":y!=null&&y.current?"true":"false",...n,ref:I,style:p&&p.length>0?{"--snap-point-height":`${p[f??0]}px`,...t}:t,onPointerDown:D=>{_||(n.onPointerDown==null||n.onPointerDown.call(n,D),T.current={x:D.pageX,y:D.pageY},i(D))},onOpenAutoFocus:D=>{r==null||r(D),x||D.preventDefault()},onPointerDownOutside:D=>{if(e==null||e(D),!m||D.defaultPrevented){D.preventDefault();return}d.current&&(d.current=!1)},onFocusOutside:D=>{if(!m){D.preventDefault();return}},onPointerMove:D=>{if(R.current=D,_||(n.onPointerMove==null||n.onPointerMove.call(n,D),!T.current))return;const z=D.pageY-T.current.y,X=D.pageX-T.current.x,V=D.pointerType==="touch"?10:2;A({x:X,y:z},v,V)?u(D):(Math.abs(X)>V||Math.abs(z)>V)&&(T.current=null)},onPointerUp:D=>{n.onPointerUp==null||n.onPointerUp.call(n,D),T.current=null,P.current=!1,l(D)},onPointerOut:D=>{n.onPointerOut==null||n.onPointerOut.call(n,D),k(R.current)},onContextMenu:D=>{n.onContextMenu==null||n.onContextMenu.call(n,D),R.current&&k(R.current)}})});yC.displayName="Drawer.Content";const e3=250,t3=120,r3=N.forwardRef(function({preventCycle:e=!1,children:t,...r},n){const{closeDrawer:o,isDragging:s,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:u,dismissible:d,handleOnly:p,isOpen:f,onPress:m,onDrag:h}=za(),v=N.useRef(null),g=N.useRef(!1);function b(){if(g.current){x();return}window.setTimeout(()=>{_()},t3)}function _(){if(s||e||g.current){x();return}if(x(),!i||i.length===0){d||o();return}if(l===i[i.length-1]&&d){o();return}const w=i.findIndex(T=>T===l);if(w===-1)return;const I=i[w+1];u(I)}function y(){v.current=window.setTimeout(()=>{g.current=!0},e3)}function x(){v.current&&window.clearTimeout(v.current),g.current=!1}return N.createElement("div",{onClick:b,onPointerCancel:x,onPointerDown:S=>{p&&m(S),y()},onPointerMove:S=>{p&&h(S)},ref:n,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},N.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});r3.displayName="Drawer.Handle";function n3(e){const t=za(),{container:r=t.container,...n}=e;return N.createElement(Na,{container:r,...n})}const uo={Content:yC,Overlay:_C,Portal:n3,Title:di,Description:pi},o3=uo.Portal,xC=a.forwardRef(({className:e,...t},r)=>c.jsx(uo.Overlay,{ref:r,className:ve("fixed inset-0 z-50 bg-black/80",e),...t}));xC.displayName=uo.Overlay.displayName;const s3=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(o3,{children:[c.jsx(xC,{}),c.jsxs(uo.Content,{ref:n,className:ve("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-border bg-background",e),...r,children:[c.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));s3.displayName="DrawerContent";const i3=a.forwardRef(({className:e,...t},r)=>c.jsx(uo.Title,{ref:r,className:ve("text-lg font-semibold leading-none tracking-tight",e),...t}));i3.displayName=uo.Title.displayName;const a3=a.forwardRef(({className:e,...t},r)=>c.jsx(uo.Description,{ref:r,className:ve("text-sm text-muted-foreground",e),...t}));a3.displayName=uo.Description.displayName;var Yd="rovingFocusGroup.onEntryFocus",l3={bubbles:!1,cancelable:!0},Fa="RovingFocusGroup",[Of,wC,c3]=gu(Fa),[u3,mi]=Yt(Fa,[c3]),[d3,p3]=u3(Fa),EC=a.forwardRef((e,t)=>c.jsx(Of.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Of.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(f3,{...e,ref:t})})}));EC.displayName=Fa;var f3=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...f}=e,m=a.useRef(null),h=tt(t,m),v=Go(s),[g,b]=Ir({prop:i,defaultProp:l??null,onChange:u,caller:Fa}),[_,y]=a.useState(!1),x=Xt(d),S=wC(r),w=a.useRef(!1),[I,T]=a.useState(0);return a.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(Yd,x),()=>R.removeEventListener(Yd,x)},[x]),c.jsx(d3,{scope:r,orientation:n,dir:v,loop:o,currentTabStopId:g,onItemFocus:a.useCallback(R=>b(R),[b]),onItemShiftTab:a.useCallback(()=>y(!0),[]),onFocusableItemAdd:a.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:a.useCallback(()=>T(R=>R-1),[]),children:c.jsx(Ke.div,{tabIndex:_||I===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:Ie(e.onMouseDown,()=>{w.current=!0}),onFocus:Ie(e.onFocus,R=>{const P=!w.current;if(R.target===R.currentTarget&&P&&!_){const $=new CustomEvent(Yd,l3);if(R.currentTarget.dispatchEvent($),!$.defaultPrevented){const A=S().filter(V=>V.focusable),k=A.find(V=>V.active),D=A.find(V=>V.id===g),X=[k,D,...A].filter(Boolean).map(V=>V.ref.current);PC(X,p)}}w.current=!1}),onBlur:Ie(e.onBlur,()=>y(!1))})})}),SC="RovingFocusGroupItem",CC=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:i,...l}=e,u=Ft(),d=s||u,p=p3(SC,r),f=p.currentTabStopId===d,m=wC(r),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:g}=p;return a.useEffect(()=>{if(n)return h(),()=>v()},[n,h,v]),c.jsx(Of.ItemSlot,{scope:r,id:d,focusable:n,active:o,children:c.jsx(Ke.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:Ie(e.onMouseDown,b=>{n?p.onItemFocus(d):b.preventDefault()}),onFocus:Ie(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:Ie(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){p.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const _=g3(b,p.orientation,p.dir);if(_!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=m().filter(S=>S.focusable).map(S=>S.ref.current);if(_==="last")x.reverse();else if(_==="prev"||_==="next"){_==="prev"&&x.reverse();const S=x.indexOf(b.currentTarget);x=p.loop?v3(x,S+1):x.slice(S+1)}setTimeout(()=>PC(x))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:g!=null}):i})})});CC.displayName=SC;var m3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function h3(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function g3(e,t,r){const n=h3(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return m3[n]}function PC(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function v3(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var og=EC,sg=CC;function b3(e){const t=_3(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(x3);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function _3(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=E3(o),l=w3(s,o.props);return o.type!==a.Fragment&&(l.ref=n?yr(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y3=Symbol("radix.slottable");function x3(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===y3}function w3(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function E3(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Nf=["Enter"," "],S3=["ArrowDown","PageUp","Home"],RC=["ArrowUp","PageDown","End"],C3=[...S3,...RC],P3={ltr:[...Nf,"ArrowRight"],rtl:[...Nf,"ArrowLeft"]},R3={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Va="Menu",[ua,T3,I3]=gu(Va),[Yo,TC]=Yt(Va,[I3,lo,mi]),Ou=lo(),IC=mi(),[$3,Jo]=Yo(Va),[A3,Ba]=Yo(Va),$C=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:s,modal:i=!0}=e,l=Ou(t),[u,d]=a.useState(null),p=a.useRef(!1),f=Xt(s),m=Go(o);return a.useEffect(()=>{const h=()=>{p.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>p.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),c.jsx(Iu,{...l,children:c.jsx($3,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:c.jsx(A3,{scope:t,onClose:a.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:m,modal:i,children:n})})})};$C.displayName=Va;var j3="MenuAnchor",ig=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ou(r);return c.jsx(Ma,{...o,...n,ref:t})});ig.displayName=j3;var ag="MenuPortal",[O3,AC]=Yo(ag,{forceMount:void 0}),jC=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,s=Jo(ag,t);return c.jsx(O3,{scope:t,forceMount:r,children:c.jsx(Bt,{present:r||s.open,children:c.jsx(ui,{asChild:!0,container:o,children:n})})})};jC.displayName=ag;var Kr="MenuContent",[N3,lg]=Yo(Kr),OC=a.forwardRef((e,t)=>{const r=AC(Kr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,s=Jo(Kr,e.__scopeMenu),i=Ba(Kr,e.__scopeMenu);return c.jsx(ua.Provider,{scope:e.__scopeMenu,children:c.jsx(Bt,{present:n||s.open,children:c.jsx(ua.Slot,{scope:e.__scopeMenu,children:i.modal?c.jsx(D3,{...o,ref:t}):c.jsx(k3,{...o,ref:t})})})})}),D3=a.forwardRef((e,t)=>{const r=Jo(Kr,e.__scopeMenu),n=a.useRef(null),o=tt(t,n);return a.useEffect(()=>{const s=n.current;if(s)return wu(s)},[]),c.jsx(cg,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Ie(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),k3=a.forwardRef((e,t)=>{const r=Jo(Kr,e.__scopeMenu);return c.jsx(cg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),M3=b3("MenuContent.ScrollLock"),cg=a.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:m,onDismiss:h,disableOutsideScroll:v,...g}=e,b=Jo(Kr,r),_=Ba(Kr,r),y=Ou(r),x=IC(r),S=T3(r),[w,I]=a.useState(null),T=a.useRef(null),R=tt(t,T,b.onContentChange),P=a.useRef(0),$=a.useRef(""),A=a.useRef(0),k=a.useRef(null),D=a.useRef("right"),z=a.useRef(0),X=v?Oa:a.Fragment,V=v?{as:M3,allowPinchZoom:!0}:void 0,Y=F=>{var B,J;const H=$.current+F,ee=S().filter(K=>!K.disabled),O=document.activeElement,M=(B=ee.find(K=>K.ref.current===O))==null?void 0:B.textValue,G=ee.map(K=>K.textValue),L=X3(G,H,M),W=(J=ee.find(K=>K.textValue===L))==null?void 0:J.ref.current;(function K(re){$.current=re,window.clearTimeout(P.current),re!==""&&(P.current=window.setTimeout(()=>K(""),1e3))})(H),W&&setTimeout(()=>W.focus())};a.useEffect(()=>()=>window.clearTimeout(P.current),[]),yu();const U=a.useCallback(F=>{var ee,O;return D.current===((ee=k.current)==null?void 0:ee.side)&&J3(F,(O=k.current)==null?void 0:O.area)},[]);return c.jsx(N3,{scope:r,searchRef:$,onItemEnter:a.useCallback(F=>{U(F)&&F.preventDefault()},[U]),onItemLeave:a.useCallback(F=>{var H;U(F)||((H=T.current)==null||H.focus(),I(null))},[U]),onTriggerLeave:a.useCallback(F=>{U(F)&&F.preventDefault()},[U]),pointerGraceTimerRef:A,onPointerGraceIntentChange:a.useCallback(F=>{k.current=F},[]),children:c.jsx(X,{...V,children:c.jsx(ja,{asChild:!0,trapped:o,onMountAutoFocus:Ie(s,F=>{var H;F.preventDefault(),(H=T.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:c.jsx(ci,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:m,onDismiss:h,children:c.jsx(og,{asChild:!0,...x,dir:_.dir,orientation:"vertical",loop:n,currentTabStopId:w,onCurrentTabStopIdChange:I,onEntryFocus:Ie(u,F=>{_.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx($u,{role:"menu","aria-orientation":"vertical","data-state":XC(b.open),"data-radix-menu-content":"",dir:_.dir,...y,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:Ie(g.onKeyDown,F=>{const ee=F.target.closest("[data-radix-menu-content]")===F.currentTarget,O=F.ctrlKey||F.altKey||F.metaKey,M=F.key.length===1;ee&&(F.key==="Tab"&&F.preventDefault(),!O&&M&&Y(F.key));const G=T.current;if(F.target!==G||!C3.includes(F.key))return;F.preventDefault();const W=S().filter(B=>!B.disabled).map(B=>B.ref.current);RC.includes(F.key)&&W.reverse(),G3(W)}),onBlur:Ie(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(P.current),$.current="")}),onPointerMove:Ie(e.onPointerMove,da(F=>{const H=F.target,ee=z.current!==F.clientX;if(F.currentTarget.contains(H)&&ee){const O=F.clientX>z.current?"right":"left";D.current=O,z.current=F.clientX}}))})})})})})})});OC.displayName=Kr;var L3="MenuGroup",ug=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ke.div,{role:"group",...n,ref:t})});ug.displayName=L3;var z3="MenuLabel",NC=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ke.div,{...n,ref:t})});NC.displayName=z3;var cc="MenuItem",h_="menu.itemSelect",Nu=a.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,s=a.useRef(null),i=Ba(cc,e.__scopeMenu),l=lg(cc,e.__scopeMenu),u=tt(t,s),d=a.useRef(!1),p=()=>{const f=s.current;if(!r&&f){const m=new CustomEvent(h_,{bubbles:!0,cancelable:!0});f.addEventListener(h_,h=>n==null?void 0:n(h),{once:!0}),oE(f,m),m.defaultPrevented?d.current=!1:i.onClose()}};return c.jsx(DC,{...o,ref:u,disabled:r,onClick:Ie(e.onClick,p),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),d.current=!0},onPointerUp:Ie(e.onPointerUp,f=>{var m;d.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:Ie(e.onKeyDown,f=>{const m=l.searchRef.current!=="";r||m&&f.key===" "||Nf.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Nu.displayName=cc;var DC=a.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...s}=e,i=lg(cc,r),l=IC(r),u=a.useRef(null),d=tt(t,u),[p,f]=a.useState(!1),[m,h]=a.useState("");return a.useEffect(()=>{const v=u.current;v&&h((v.textContent??"").trim())},[s.children]),c.jsx(ua.ItemSlot,{scope:r,disabled:n,textValue:o??m,children:c.jsx(sg,{asChild:!0,...l,focusable:!n,children:c.jsx(Ke.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:d,onPointerMove:Ie(e.onPointerMove,da(v=>{n?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ie(e.onPointerLeave,da(v=>i.onItemLeave(v))),onFocus:Ie(e.onFocus,()=>f(!0)),onBlur:Ie(e.onBlur,()=>f(!1))})})})}),F3="MenuCheckboxItem",kC=a.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return c.jsx(VC,{scope:e.__scopeMenu,checked:r,children:c.jsx(Nu,{role:"menuitemcheckbox","aria-checked":uc(r)?"mixed":r,...o,ref:t,"data-state":pg(r),onSelect:Ie(o.onSelect,()=>n==null?void 0:n(uc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});kC.displayName=F3;var MC="MenuRadioGroup",[V3,B3]=Yo(MC,{value:void 0,onValueChange:()=>{}}),LC=a.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,s=Xt(n);return c.jsx(V3,{scope:e.__scopeMenu,value:r,onValueChange:s,children:c.jsx(ug,{...o,ref:t})})});LC.displayName=MC;var zC="MenuRadioItem",FC=a.forwardRef((e,t)=>{const{value:r,...n}=e,o=B3(zC,e.__scopeMenu),s=r===o.value;return c.jsx(VC,{scope:e.__scopeMenu,checked:s,children:c.jsx(Nu,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":pg(s),onSelect:Ie(n.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,r)},{checkForDefaultPrevented:!1})})})});FC.displayName=zC;var dg="MenuItemIndicator",[VC,H3]=Yo(dg,{checked:!1}),BC=a.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,s=H3(dg,r);return c.jsx(Bt,{present:n||uc(s.checked)||s.checked===!0,children:c.jsx(Ke.span,{...o,ref:t,"data-state":pg(s.checked)})})});BC.displayName=dg;var U3="MenuSeparator",HC=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ke.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});HC.displayName=U3;var W3="MenuArrow",UC=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ou(r);return c.jsx(Au,{...o,...n,ref:t})});UC.displayName=W3;var q3="MenuSub",[Are,WC]=Yo(q3),Li="MenuSubTrigger",qC=a.forwardRef((e,t)=>{const r=Jo(Li,e.__scopeMenu),n=Ba(Li,e.__scopeMenu),o=WC(Li,e.__scopeMenu),s=lg(Li,e.__scopeMenu),i=a.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},p=a.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return a.useEffect(()=>p,[p]),a.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),u(null)}},[l,u]),c.jsx(ig,{asChild:!0,...d,children:c.jsx(DC,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":XC(r.open),...e,ref:yr(t,o.onTriggerChange),onClick:f=>{var m;(m=e.onClick)==null||m.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Ie(e.onPointerMove,da(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),p()},100))})),onPointerLeave:Ie(e.onPointerLeave,da(f=>{var h,v;p();const m=(h=r.content)==null?void 0:h.getBoundingClientRect();if(m){const g=(v=r.content)==null?void 0:v.dataset.side,b=g==="right",_=b?-5:5,y=m[b?"left":"right"],x=m[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+_,y:f.clientY},{x:y,y:m.top},{x,y:m.top},{x,y:m.bottom},{x:y,y:m.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Ie(e.onKeyDown,f=>{var h;const m=s.searchRef.current!=="";e.disabled||m&&f.key===" "||P3[n.dir].includes(f.key)&&(r.onOpenChange(!0),(h=r.content)==null||h.focus(),f.preventDefault())})})})});qC.displayName=Li;var GC="MenuSubContent",KC=a.forwardRef((e,t)=>{const r=AC(Kr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,s=Jo(Kr,e.__scopeMenu),i=Ba(Kr,e.__scopeMenu),l=WC(GC,e.__scopeMenu),u=a.useRef(null),d=tt(t,u);return c.jsx(ua.Provider,{scope:e.__scopeMenu,children:c.jsx(Bt,{present:n||s.open,children:c.jsx(ua.Slot,{scope:e.__scopeMenu,children:c.jsx(cg,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var f;i.isUsingKeyboardRef.current&&((f=u.current)==null||f.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Ie(e.onFocusOutside,p=>{p.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Ie(e.onEscapeKeyDown,p=>{i.onClose(),p.preventDefault()}),onKeyDown:Ie(e.onKeyDown,p=>{var h;const f=p.currentTarget.contains(p.target),m=R3[i.dir].includes(p.key);f&&m&&(s.onOpenChange(!1),(h=l.trigger)==null||h.focus(),p.preventDefault())})})})})})});KC.displayName=GC;function XC(e){return e?"open":"closed"}function uc(e){return e==="indeterminate"}function pg(e){return uc(e)?"indeterminate":e?"checked":"unchecked"}function G3(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function K3(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function X3(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=K3(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function Y3(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],u=t[i],d=l.x,p=l.y,f=u.x,m=u.y;p>n!=m>n&&r<(f-d)*(n-p)/(m-p)+d&&(o=!o)}return o}function J3(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return Y3(r,t)}function da(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Z3=$C,Q3=ig,e4=jC,t4=OC,r4=ug,n4=NC,o4=Nu,s4=kC,i4=LC,a4=FC,l4=BC,c4=HC,u4=UC,d4=qC,p4=KC,Du="DropdownMenu",[f4]=Yt(Du,[TC]),xr=TC(),[m4,YC]=f4(Du),JC=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:s,onOpenChange:i,modal:l=!0}=e,u=xr(t),d=a.useRef(null),[p,f]=Ir({prop:o,defaultProp:s??!1,onChange:i,caller:Du});return c.jsx(m4,{scope:t,triggerId:Ft(),triggerRef:d,contentId:Ft(),open:p,onOpenChange:f,onOpenToggle:a.useCallback(()=>f(m=>!m),[f]),modal:l,children:c.jsx(Z3,{...u,open:p,onOpenChange:f,dir:n,modal:l,children:r})})};JC.displayName=Du;var ZC="DropdownMenuTrigger",QC=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,s=YC(ZC,r),i=xr(r);return c.jsx(Q3,{asChild:!0,...i,children:c.jsx(Ke.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:yr(t,s.triggerRef),onPointerDown:Ie(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:Ie(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});QC.displayName=ZC;var h4="DropdownMenuPortal",eP=e=>{const{__scopeDropdownMenu:t,...r}=e,n=xr(t);return c.jsx(e4,{...n,...r})};eP.displayName=h4;var tP="DropdownMenuContent",rP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=YC(tP,r),s=xr(r),i=a.useRef(!1);return c.jsx(t4,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...n,ref:t,onCloseAutoFocus:Ie(e.onCloseAutoFocus,l=>{var u;i.current||(u=o.triggerRef.current)==null||u.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:Ie(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,p=u.button===2||d;(!o.modal||p)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rP.displayName=tP;var g4="DropdownMenuGroup",v4=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(r4,{...o,...n,ref:t})});v4.displayName=g4;var b4="DropdownMenuLabel",nP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(n4,{...o,...n,ref:t})});nP.displayName=b4;var _4="DropdownMenuItem",oP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(o4,{...o,...n,ref:t})});oP.displayName=_4;var y4="DropdownMenuCheckboxItem",sP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(s4,{...o,...n,ref:t})});sP.displayName=y4;var x4="DropdownMenuRadioGroup",w4=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(i4,{...o,...n,ref:t})});w4.displayName=x4;var E4="DropdownMenuRadioItem",iP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(a4,{...o,...n,ref:t})});iP.displayName=E4;var S4="DropdownMenuItemIndicator",aP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(l4,{...o,...n,ref:t})});aP.displayName=S4;var C4="DropdownMenuSeparator",lP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(c4,{...o,...n,ref:t})});lP.displayName=C4;var P4="DropdownMenuArrow",R4=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(u4,{...o,...n,ref:t})});R4.displayName=P4;var T4="DropdownMenuSubTrigger",cP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(d4,{...o,...n,ref:t})});cP.displayName=T4;var I4="DropdownMenuSubContent",uP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=xr(r);return c.jsx(p4,{...o,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});uP.displayName=I4;var $4=JC,A4=QC,j4=eP,dP=rP,pP=nP,fP=oP,mP=sP,hP=iP,gP=aP,vP=lP,bP=cP,_P=uP;const jre=$4,Ore=A4,O4=a.forwardRef(({className:e,inset:t,children:r,...n},o)=>c.jsxs(bP,{ref:o,className:ve("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","focus:bg-bg-surface data-[state=open]:bg-bg-surface",t&&"pl-8",e),...n,children:[r,c.jsx(pF,{className:"ml-auto h-4 w-4"})]}));O4.displayName=bP.displayName;const N4=a.forwardRef(({className:e,...t},r)=>c.jsx(_P,{ref:r,className:ve("z-[1400] min-w-[8rem] overflow-hidden rounded-md border border-border bg-bg-elevated p-1 text-text shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));N4.displayName=_P.displayName;const D4=a.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(j4,{children:c.jsx(dP,{ref:n,sideOffset:t,className:ve("z-[1400] min-w-[8rem] overflow-hidden rounded-md border border-border bg-bg-elevated p-1 text-text shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r})}));D4.displayName=dP.displayName;const k4=a.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(fP,{ref:n,className:ve("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-bg-surface focus:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));k4.displayName=fP.displayName;const M4=a.forwardRef(({className:e,children:t,checked:r,...n},o)=>c.jsxs(mP,{ref:o,className:ve("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-bg-surface focus:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(gP,{children:c.jsx(Oh,{className:"h-4 w-4"})})}),t]}));M4.displayName=mP.displayName;const L4=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(hP,{ref:n,className:ve("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-bg-surface focus:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(gP,{children:c.jsx(Hw,{className:"h-2 w-2 fill-current"})})}),t]}));L4.displayName=hP.displayName;const z4=a.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(pP,{ref:n,className:ve("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));z4.displayName=pP.displayName;const F4=a.forwardRef(({className:e,...t},r)=>c.jsx(vP,{ref:r,className:ve("-mx-1 my-1 h-px bg-border",e),...t}));F4.displayName=vP.displayName;var V4=Symbol("radix.slottable");function B4(e){const t=({children:r})=>c.jsx(c.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=V4,t}var yP=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),H4="VisuallyHidden",xP=a.forwardRef((e,t)=>c.jsx(Ke.span,{...e,ref:t,style:{...yP,...e.style}}));xP.displayName=H4;var U4=xP,[ku]=Yt("Tooltip",[lo]),Mu=lo(),wP="TooltipProvider",W4=700,Df="tooltip.open",[q4,fg]=ku(wP),EP=e=>{const{__scopeTooltip:t,delayDuration:r=W4,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,i=a.useRef(!0),l=a.useRef(!1),u=a.useRef(0);return a.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(q4,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:a.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:a.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:s})};EP.displayName=wP;var pa="Tooltip",[G4,Ha]=ku(pa),SP=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=e,u=fg(pa,e.__scopeTooltip),d=Mu(t),[p,f]=a.useState(null),m=Ft(),h=a.useRef(0),v=i??u.disableHoverableContent,g=l??u.delayDuration,b=a.useRef(!1),[_,y]=Ir({prop:n,defaultProp:o??!1,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(Df))):u.onClose(),s==null||s(T)},caller:pa}),x=a.useMemo(()=>_?b.current?"delayed-open":"instant-open":"closed",[_]),S=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,y(!0)},[y]),w=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y(!1)},[y]),I=a.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,y(!0),h.current=0},g)},[g,y]);return a.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),c.jsx(Iu,{...d,children:c.jsx(G4,{scope:t,contentId:m,open:_,stateAttribute:x,trigger:p,onTriggerChange:f,onTriggerEnter:a.useCallback(()=>{u.isOpenDelayedRef.current?I():S()},[u.isOpenDelayedRef,I,S]),onTriggerLeave:a.useCallback(()=>{v?w():(window.clearTimeout(h.current),h.current=0)},[w,v]),onOpen:S,onClose:w,disableHoverableContent:v,children:r})})};SP.displayName=pa;var kf="TooltipTrigger",CP=a.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ha(kf,r),s=fg(kf,r),i=Mu(r),l=a.useRef(null),u=tt(t,l,o.onTriggerChange),d=a.useRef(!1),p=a.useRef(!1),f=a.useCallback(()=>d.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(Ma,{asChild:!0,...i,children:c.jsx(Ke.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:Ie(e.onPointerMove,m=>{m.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ie(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Ie(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ie(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Ie(e.onBlur,o.onClose),onClick:Ie(e.onClick,o.onClose)})})});CP.displayName=kf;var mg="TooltipPortal",[K4,X4]=ku(mg,{forceMount:void 0}),PP=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=Ha(mg,t);return c.jsx(K4,{scope:t,forceMount:r,children:c.jsx(Bt,{present:r||s.open,children:c.jsx(ui,{asChild:!0,container:o,children:n})})})};PP.displayName=mg;var Gs="TooltipContent",RP=a.forwardRef((e,t)=>{const r=X4(Gs,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,i=Ha(Gs,e.__scopeTooltip);return c.jsx(Bt,{present:n||i.open,children:i.disableHoverableContent?c.jsx(TP,{side:o,...s,ref:t}):c.jsx(Y4,{side:o,...s,ref:t})})}),Y4=a.forwardRef((e,t)=>{const r=Ha(Gs,e.__scopeTooltip),n=fg(Gs,e.__scopeTooltip),o=a.useRef(null),s=tt(t,o),[i,l]=a.useState(null),{trigger:u,onClose:d}=r,p=o.current,{onPointerInTransitChange:f}=n,m=a.useCallback(()=>{l(null),f(!1)},[f]),h=a.useCallback((v,g)=>{const b=v.currentTarget,_={x:v.clientX,y:v.clientY},y=tU(_,b.getBoundingClientRect()),x=rU(_,y),S=nU(g.getBoundingClientRect()),w=sU([...x,...S]);l(w),f(!0)},[f]);return a.useEffect(()=>()=>m(),[m]),a.useEffect(()=>{if(u&&p){const v=b=>h(b,p),g=b=>h(b,u);return u.addEventListener("pointerleave",v),p.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",v),p.removeEventListener("pointerleave",g)}}},[u,p,h,m]),a.useEffect(()=>{if(i){const v=g=>{const b=g.target,_={x:g.clientX,y:g.clientY},y=(u==null?void 0:u.contains(b))||(p==null?void 0:p.contains(b)),x=!oU(_,i);y?m():x&&(m(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,p,i,d,m]),c.jsx(TP,{...e,ref:s})}),[J4,Z4]=ku(pa,{isInside:!1}),Q4=B4("TooltipContent"),TP=a.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,u=Ha(Gs,r),d=Mu(r),{onClose:p}=u;return a.useEffect(()=>(document.addEventListener(Df,p),()=>document.removeEventListener(Df,p)),[p]),a.useEffect(()=>{if(u.trigger){const f=m=>{const h=m.target;h!=null&&h.contains(u.trigger)&&p()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,p]),c.jsx(ci,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:p,children:c.jsxs($u,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Q4,{children:n}),c.jsx(J4,{scope:r,isInside:!0,children:c.jsx(U4,{id:u.contentId,role:"tooltip",children:o||n})})]})})});RP.displayName=Gs;var IP="TooltipArrow",eU=a.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Mu(r);return Z4(IP,r).isInside?null:c.jsx(Au,{...o,...n,ref:t})});eU.displayName=IP;function tU(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function rU(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function nU(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function oU(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],u=t[i],d=l.x,p=l.y,f=u.x,m=u.y;p>n!=m>n&&r<(f-d)*(n-p)/(m-p)+d&&(o=!o)}return o}function sU(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),iU(t)}function iU(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var aU=EP,lU=SP,cU=CP,uU=PP,$P=RP;const AP=aU,jP=lU,OP=cU,hg=a.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(uU,{children:c.jsx($P,{ref:n,sideOffset:t,className:ve("z-[1600] overflow-hidden rounded-md bg-accent-navy px-3 py-1.5 text-xs text-accent-navy-foreground shadow-md","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));hg.displayName=$P.displayName;const dU={VERY_LOW:{ru:"Очень низкая",en:"Very low",level:1,toneClass:"text-text-muted",barColorClass:"bg-text-subtle"},LOW:{ru:"Низкая",en:"Low",level:2,toneClass:"text-text-muted",barColorClass:"bg-warning"},MEDIUM:{ru:"Средняя",en:"Medium",level:3,toneClass:"text-text",barColorClass:"bg-info"},MEDIUM_HIGH:{ru:"Выше средней",en:"Above medium",level:4,toneClass:"text-text",barColorClass:"bg-success"},HIGH:{ru:"Высокая",en:"High",level:5,toneClass:"text-text",barColorClass:"bg-success"}},g_=nr("inline-flex items-center gap-1.5 tabular-nums whitespace-nowrap",{variants:{variant:{compact:"text-sm",full:"text-base"},emphasis:{default:"",muted:"text-text-muted italic"}},defaultVariants:{variant:"compact",emphasis:"default"}});function pU(e,t){try{return(typeof e=="string"?new Date(e):e).toLocaleDateString(t==="ru"?"ru-RU":"en-GB",{day:"2-digit",month:"short",year:"numeric"})}catch{return typeof e=="string"?e:"—"}}function fU({level:e,barColorClass:t}){return c.jsx("span",{className:"inline-flex items-end gap-px ml-0.5","aria-hidden":!0,children:[1,2,3,4,5].map(r=>c.jsx("span",{className:ve("w-1 rounded-sm transition-colors",r<=e?t:"bg-border",r===1?"h-1.5":r===2?"h-2":r===3?"h-2.5":r===4?"h-3":"h-3.5")},r))})}const mU=a.forwardRef(({className:e,date:t,confidence:r,rationale:n,locale:o="ru",variant:s="compact",testId:i,...l},u)=>{const d=r?dU[r]:void 0;if(t==null||r==null||d==null){const b=o==="ru"?"ETA скоро":"ETA pending";return c.jsxs("span",{ref:u,className:ve(g_({variant:s,emphasis:"muted"}),e),"aria-label":b,"data-testid":i,...l,children:[c.jsx(Fb,{className:"h-3.5 w-3.5"}),b]})}const p=pU(t,o),f=o==="ru"?d.ru:d.en,m=o==="ru"?"Уверенность":"Confidence",h=`${p} · ${m}: ${f}`,v=n??`${m}: ${f}`,g=c.jsxs("span",{className:ve(g_({variant:s,emphasis:"default"}),d.toneClass,e),"aria-label":h,"data-testid":i,...l,children:[c.jsx(Fb,{className:"h-3.5 w-3.5"}),p,c.jsx(fU,{level:d.level,barColorClass:d.barColorClass}),s==="full"?c.jsxs("span",{className:"text-sm text-text-muted ml-1",children:["· ",f]}):null]});return s==="full"?c.jsx(AP,{children:c.jsxs(jP,{children:[c.jsx(OP,{asChild:!0,children:c.jsx("span",{ref:u,children:g})}),c.jsx(hg,{children:v})]})}):a.cloneElement(g,{ref:u})});mU.displayName="EtaBadge";const v_={free:0,starter:1,pro:2,enterprise:3},hU={webhooks:"pro","ocr.document-verification":"pro","ai.operator-review":"pro","data-table.saved-views":"starter","data-table.excel-export":"starter","billing.api-keys":"pro","branding.custom-logo":"enterprise","sso.saml":"enterprise","audit-log.export":"enterprise"},NP=a.createContext({tier:"free",isAuthenticated:!1});function gU(){return a.useContext(NP)}function vU(e,t){return v_[e]>=v_[t]}function bU(e){return hU[e]??null}let Mf=null;function _U(e){Mf=e}function yU(e){if(typeof window>"u")return null;try{const t=window.localStorage.getItem(`ff:${e}`);if(t==="on")return!0;if(t==="off")return!1}catch{}return null}function Nre(e){const{tier:t}=gU();if(!e)return!0;const r=yU(e);if(r!==null)return r;if(Mf)try{return Mf.isOn(e)}catch{}const n=bU(e);return n?vU(t,n):!1}const xU={sea:{label:"Море",labelEn:"Sea",icon:AF,bg:"bg-transport-sea-light",text:"text-transport-sea"},rail:{label:"Ж/Д",labelEn:"Rail",icon:OF,bg:"bg-transport-rail-light",text:"text-transport-rail"},road:{label:"Авто",labelEn:"Road",icon:DF,bg:"bg-transport-road-light",text:"text-transport-road"},air:{label:"Авиа",labelEn:"Air",icon:RF,bg:"bg-transport-air-light",text:"text-transport-air"},multimodal:{label:"Мультимодаль",labelEn:"Multimodal",icon:wF,bg:"bg-transport-multimodal-light",text:"text-transport-multimodal"}},wU=nr("inline-flex items-center gap-1 rounded-full font-medium whitespace-nowrap",{variants:{size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm"}},defaultVariants:{size:"sm"}}),EU=a.forwardRef(({mode:e,size:t,iconOnly:r=!1,locale:n="ru",label:o,className:s,...i},l)=>{const u=xU[e],d=u.icon,p=o??(n==="en"?u.labelEn:u.label),f=t==="md"?"h-3.5 w-3.5":"h-3 w-3";return c.jsxs("span",{ref:l,className:ve(wU({size:t}),u.bg,u.text,s),...i,children:[c.jsx(d,{className:f,"aria-hidden":!0}),r?c.jsx("span",{className:"sr-only",children:p}):p]})});EU.displayName="TransportBadge";const SU=a.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,ref:n,className:ve("flex h-10 w-full rounded-md border border-input bg-bg-base px-3 py-2 text-sm","ring-offset-bg-base placeholder:text-text-subtle","file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-text","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error aria-invalid:focus-visible:ring-error",e),...r}));SU.displayName="Input";var CU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],PU=CU.reduce((e,t)=>{const r=fi(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),RU="Label",DP=a.forwardRef((e,t)=>c.jsx(PU.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));DP.displayName=RU;var Lf=DP;const TU=({text:e,label:t,className:r})=>{const{t:n}=oo(),o=t??n("ui.fieldHint.label","Подсказка");return c.jsxs(gC,{children:[c.jsx(vC,{asChild:!0,children:c.jsx("button",{type:"button","aria-label":o,className:ve("inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-text-muted outline-none transition-colors hover:text-text focus-visible:ring-2 focus-visible:ring-border",r),onClick:s=>s.stopPropagation(),children:c.jsx(gF,{className:"h-3.5 w-3.5"})})}),c.jsx(ng,{side:"top",align:"start",className:"w-64 p-3 text-xs font-normal leading-snug text-text-muted",children:e})]})},b_=nr("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),kP=a.forwardRef(({className:e,hint:t,children:r,...n},o)=>t?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(Lf,{ref:o,className:ve(b_(),e),...n,children:r}),c.jsx(TU,{text:t})]}):c.jsx(Lf,{ref:o,className:ve(b_(),e),...n,children:r}));kP.displayName=Lf.displayName;const __=nr("tabular-nums whitespace-nowrap",{variants:{size:{xs:"text-sm leading-tight",sm:"text-sm leading-snug",md:"text-lg leading-snug font-medium",lg:"text-3xl leading-tight font-semibold",xl:"font-mono text-6xl leading-none font-bold"},emphasis:{default:"text-text",positive:"text-success",negative:"text-destructive",muted:"text-text-muted",danger:"text-destructive font-semibold"},align:{left:"text-left",right:"text-right tabular-nums"}},defaultVariants:{size:"md",emphasis:"default",align:"left"}}),IU={month:{ru:"/мес",en:"/month",zh:"/月"},year:{ru:"/год",en:"/year",zh:"/年"},day:{ru:"/день",en:"/day",zh:"/日"}},y_=new Map,MP={ru:"ru-RU",en:"en-US",zh:"zh-CN"};function x_(e,t,r){const n=`${e}|${t}|${JSON.stringify(r)}`;let o=y_.get(n);return o||(o=new Intl.NumberFormat(MP[e],r),y_.set(n,o)),o}function $U(e,t){return e==="RUB"&&t>=100?0:2}function AU(e){return e==="RUB"?2:4}function jU(e,t,r){try{return new Intl.NumberFormat(MP[r],{style:"currency",currency:t,currencyDisplay:"name",maximumFractionDigits:2}).format(e)}catch{return`${e} ${t}`}}function OU(e,t,r){return t===0?e.replace(/^[+\-−]/,""):r==="never"?e.replace(/^[+\-−]/,""):r==="always"&&t>0&&!/^[+−-]/.test(e)?`+${e}`:e.replace(/^-/,"−")}const LP=a.forwardRef(({value:e,currency:t,locale:r="ru",size:n,emphasis:o,align:s,variant:i="default",sign:l="auto",period:u,prefix:d,unit:p,showCurrency:f=!0,conversionFrom:m,className:h,...v},g)=>{var T;const b=a.useMemo(()=>{const R=Math.abs(e),P={style:f?"currency":"decimal",currency:t,currencyDisplay:"symbol"};if(i==="compact")P.notation="compact",P.maximumFractionDigits=1;else if(i==="precise"){const A=AU(t);P.minimumFractionDigits=A,P.maximumFractionDigits=A}else{const A=$U(t,R);P.minimumFractionDigits=A,P.maximumFractionDigits=A}const $=x_(r,t,P).format(e);return OU($,e,l)},[e,t,r,i,l,f]),_=u&&(((T=IU[u])==null?void 0:T[r])??` /${u}`),y=a.useMemo(()=>{const R=jU(e,t,r);return _?`${R} ${_.replace(/^\//,"")}`.trim():R},[e,t,r,_]),x=c.jsxs(c.Fragment,{children:[d?c.jsx("span",{className:"mr-1 text-text-muted text-[0.7em] font-medium align-baseline",children:d}):null,m?c.jsx("span",{"aria-hidden":!0,children:"≈ "}):null,b,_?c.jsx("span",{className:"ml-0.5 text-text-muted text-[0.85em] font-normal",children:_}):null,p?c.jsx("span",{className:"ml-0.5 text-text-muted text-[0.7em] font-normal",children:p}):null]});if(!m)return c.jsx("span",{ref:g,className:ve(__({size:n,emphasis:o,align:s}),h),"aria-label":y,...v,children:x});const w=x_(r,m.currency,{style:"currency",currency:m.currency,currencyDisplay:"symbol",maximumFractionDigits:2}).format(e/m.rate),I=r==="ru"?`Курс ${m.source??"ЦБ"} ${m.rate.toFixed(2)} от ${m.rateDate}`:`Rate ${m.source??"CB"} ${m.rate.toFixed(2)} on ${m.rateDate}`;return c.jsx(AP,{delayDuration:200,children:c.jsxs(jP,{children:[c.jsx(OP,{asChild:!0,children:c.jsxs("span",{ref:g,className:ve(__({size:n,emphasis:o,align:s}),"inline-flex items-baseline gap-0.5 cursor-help",h),"aria-label":y,...v,children:[x,c.jsx(yF,{className:"ml-0.5 inline h-3 w-3 self-center text-text-muted","aria-hidden":!0})]})}),c.jsx(hg,{children:c.jsxs("div",{className:"space-y-0.5 text-left",children:[c.jsxs("div",{className:"font-medium",children:[w," → ",b.replace(/^[−]/,"−")]}),c.jsx("div",{className:"text-[0.75rem] opacity-80",children:I})]})})]})})});LP.displayName="MoneyDisplay";function NU(e,t=[]){let r=[];function n(s,i){const l=a.createContext(i);l.displayName=s+"Context";const u=r.length;r=[...r,i];const d=f=>{var _;const{scope:m,children:h,...v}=f,g=((_=m==null?void 0:m[e])==null?void 0:_[u])||l,b=a.useMemo(()=>v,Object.values(v));return c.jsx(g.Provider,{value:b,children:h})};d.displayName=s+"Provider";function p(f,m){var g;const h=((g=m==null?void 0:m[e])==null?void 0:g[u])||l,v=a.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{const s=r.map(i=>a.createContext(i));return function(l){const u=(l==null?void 0:l[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,DU(o,...t)]}function DU(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((l,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...l,...f}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var kU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zP=kU.reduce((e,t)=>{const r=fi(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),gg="Progress",vg=100,[MU]=NU(gg),[LU,zU]=MU(gg),FP=a.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:s=FU,...i}=e;(o||o===0)&&!w_(o)&&console.error(VU(`${o}`,"Progress"));const l=w_(o)?o:vg;n!==null&&!E_(n,l)&&console.error(BU(`${n}`,"Progress"));const u=E_(n,l)?n:null,d=dc(u)?s(u,l):void 0;return c.jsx(LU,{scope:r,value:u,max:l,children:c.jsx(zP.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":dc(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":HP(u,l),"data-value":u??void 0,"data-max":l,...i,ref:t})})});FP.displayName=gg;var VP="ProgressIndicator",BP=a.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=zU(VP,r);return c.jsx(zP.div,{"data-state":HP(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});BP.displayName=VP;function FU(e,t){return`${Math.round(e/t*100)}%`}function HP(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function dc(e){return typeof e=="number"}function w_(e){return dc(e)&&!isNaN(e)&&e>0}function E_(e,t){return dc(e)&&!isNaN(e)&&e<=t&&e>=0}function VU(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vg}\`.`}function BU(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${vg} if no \`max\` prop is set)
  - \`null\` or \`undefined\` if the progress is indeterminate.

Defaulting to \`null\`.`}var UP=FP,HU=BP;const UU=a.forwardRef(({className:e,value:t,...r},n)=>c.jsx(UP,{ref:n,className:ve("relative h-2 w-full overflow-hidden rounded-full bg-bg-surface",e),...r,children:c.jsx(HU,{className:"h-full w-full flex-1 bg-primary transition-transform duration-normal",style:{transform:`translateX(-${100-(t||0)}%)`}})}));UU.displayName=UP.displayName;var bg="Radio",[WU,WP]=Yt(bg),[qU,GU]=WU(bg),qP=a.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:s,disabled:i,value:l="on",onCheck:u,form:d,...p}=e,[f,m]=a.useState(null),h=tt(t,b=>m(b)),v=a.useRef(!1),g=f?d||!!f.closest("form"):!0;return c.jsxs(qU,{scope:r,checked:o,disabled:i,children:[c.jsx(Ke.button,{type:"button",role:"radio","aria-checked":o,"data-state":YP(o),"data-disabled":i?"":void 0,disabled:i,value:l,...p,ref:h,onClick:Ie(e.onClick,b=>{o||u==null||u(),g&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),g&&c.jsx(XP,{control:f,bubbles:!v.current,name:n,value:l,checked:o,required:s,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});qP.displayName=bg;var GP="RadioIndicator",KP=a.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,s=GU(GP,r);return c.jsx(Bt,{present:n||s.checked,children:c.jsx(Ke.span,{"data-state":YP(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});KP.displayName=GP;var KU="RadioBubbleInput",XP=a.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const i=a.useRef(null),l=tt(i,s),u=Cu(r),d=Pu(t);return a.useEffect(()=>{const p=i.current;if(!p)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==r&&h){const v=new Event("click",{bubbles:n});h.call(p,r),p.dispatchEvent(v)}},[u,r,n]),c.jsx(Ke.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});XP.displayName=KU;function YP(e){return e?"checked":"unchecked"}var XU=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Lu="RadioGroup",[YU]=Yt(Lu,[mi,WP]),JP=mi(),ZP=WP(),[JU,ZU]=YU(Lu),QP=a.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:s,required:i=!1,disabled:l=!1,orientation:u,dir:d,loop:p=!0,onValueChange:f,...m}=e,h=JP(r),v=Go(d),[g,b]=Ir({prop:s,defaultProp:o??null,onChange:f,caller:Lu});return c.jsx(JU,{scope:r,name:n,required:i,disabled:l,value:g,onValueChange:b,children:c.jsx(og,{asChild:!0,...h,orientation:u,dir:v,loop:p,children:c.jsx(Ke.div,{role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:v,...m,ref:t})})})});QP.displayName=Lu;var eR="RadioGroupItem",tR=a.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,s=ZU(eR,r),i=s.disabled||n,l=JP(r),u=ZP(r),d=a.useRef(null),p=tt(t,d),f=s.value===o.value,m=a.useRef(!1);return a.useEffect(()=>{const h=g=>{XU.includes(g.key)&&(m.current=!0)},v=()=>m.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),c.jsx(sg,{asChild:!0,...l,focusable:!i,active:f,children:c.jsx(qP,{disabled:i,required:s.required,checked:f,...u,...o,name:s.name,ref:p,onCheck:()=>s.onValueChange(o.value),onKeyDown:Ie(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ie(o.onFocus,()=>{var h;m.current&&((h=d.current)==null||h.click())})})})});tR.displayName=eR;var QU="RadioGroupIndicator",rR=a.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=ZP(r);return c.jsx(KP,{...o,...n,ref:t})});rR.displayName=QU;var nR=QP,oR=tR,eW=rR;const tW=a.forwardRef(({className:e,...t},r)=>c.jsx(nR,{className:ve("grid gap-2",e),...t,ref:r}));tW.displayName=nR.displayName;const rW=a.forwardRef(({className:e,...t},r)=>c.jsx(oR,{ref:r,className:ve("aspect-square h-4 w-4 rounded-full border border-border-strong text-primary","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-primary",e),...t,children:c.jsx(eW,{className:"flex items-center justify-center",children:c.jsx(Hw,{className:"h-2.5 w-2.5 fill-primary text-primary"})})}));rW.displayName=oR.displayName;function zf(e,[t,r]){return Math.min(r,Math.max(t,e))}function nW(e,t){return a.useReducer((r,n)=>t[r][n]??r,e)}var _g="ScrollArea",[sR]=Yt(_g),[oW,Zr]=sR(_g),iR=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:s=600,...i}=e,[l,u]=a.useState(null),[d,p]=a.useState(null),[f,m]=a.useState(null),[h,v]=a.useState(null),[g,b]=a.useState(null),[_,y]=a.useState(0),[x,S]=a.useState(0),[w,I]=a.useState(!1),[T,R]=a.useState(!1),P=tt(t,A=>u(A)),$=Go(o);return c.jsx(oW,{scope:r,type:n,dir:$,scrollHideDelay:s,scrollArea:l,viewport:d,onViewportChange:p,content:f,onContentChange:m,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:w,onScrollbarXEnabledChange:I,scrollbarY:g,onScrollbarYChange:b,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:y,onCornerHeightChange:S,children:c.jsx(Ke.div,{dir:$,...i,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});iR.displayName=_g;var aR="ScrollAreaViewport",lR=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...s}=e,i=Zr(aR,r),l=a.useRef(null),u=tt(t,l,i.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(Ke.div,{"data-radix-scroll-area-viewport":"",...s,ref:u,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});lR.displayName=aR;var Rn="ScrollAreaScrollbar",yg=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Zr(Rn,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,l=e.orientation==="horizontal";return a.useEffect(()=>(l?s(!0):i(!0),()=>{l?s(!1):i(!1)}),[l,s,i]),o.type==="hover"?c.jsx(sW,{...n,ref:t,forceMount:r}):o.type==="scroll"?c.jsx(iW,{...n,ref:t,forceMount:r}):o.type==="auto"?c.jsx(cR,{...n,ref:t,forceMount:r}):o.type==="always"?c.jsx(xg,{...n,ref:t}):null});yg.displayName=Rn;var sW=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Zr(Rn,e.__scopeScrollArea),[s,i]=a.useState(!1);return a.useEffect(()=>{const l=o.scrollArea;let u=0;if(l){const d=()=>{window.clearTimeout(u),i(!0)},p=()=>{u=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return l.addEventListener("pointerenter",d),l.addEventListener("pointerleave",p),()=>{window.clearTimeout(u),l.removeEventListener("pointerenter",d),l.removeEventListener("pointerleave",p)}}},[o.scrollArea,o.scrollHideDelay]),c.jsx(Bt,{present:r||s,children:c.jsx(cR,{"data-state":s?"visible":"hidden",...n,ref:t})})}),iW=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Zr(Rn,e.__scopeScrollArea),s=e.orientation==="horizontal",i=Fu(()=>u("SCROLL_END"),100),[l,u]=nW("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(l==="idle"){const d=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[l,o.scrollHideDelay,u]),a.useEffect(()=>{const d=o.viewport,p=s?"scrollLeft":"scrollTop";if(d){let f=d[p];const m=()=>{const h=d[p];f!==h&&(u("SCROLL"),i()),f=h};return d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[o.viewport,s,u,i]),c.jsx(Bt,{present:r||l!=="hidden",children:c.jsx(xg,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Ie(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Ie(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),cR=a.forwardRef((e,t)=>{const r=Zr(Rn,e.__scopeScrollArea),{forceMount:n,...o}=e,[s,i]=a.useState(!1),l=e.orientation==="horizontal",u=Fu(()=>{if(r.viewport){const d=r.viewport.offsetWidth<r.viewport.scrollWidth,p=r.viewport.offsetHeight<r.viewport.scrollHeight;i(l?d:p)}},10);return Ks(r.viewport,u),Ks(r.content,u),c.jsx(Bt,{present:n||s,children:c.jsx(xg,{"data-state":s?"visible":"hidden",...o,ref:t})})}),xg=a.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=Zr(Rn,e.__scopeScrollArea),s=a.useRef(null),i=a.useRef(0),[l,u]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=mR(l.viewport,l.content),p={...n,sizes:l,onSizesChange:u,hasThumb:d>0&&d<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:m=>i.current=m};function f(m,h){return pW(m,i.current,l,h)}return r==="horizontal"?c.jsx(aW,{...p,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollLeft,h=S_(m,l,o.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=f(m,o.dir))}}):r==="vertical"?c.jsx(lW,{...p,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollTop,h=S_(m,l);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=f(m))}}):null}),aW=a.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,s=Zr(Rn,e.__scopeScrollArea),[i,l]=a.useState(),u=a.useRef(null),d=tt(t,u,s.onScrollbarXChange);return a.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),c.jsx(dR,{"data-orientation":"horizontal",...o,ref:d,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":zu(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,f)=>{if(s.viewport){const m=s.viewport.scrollLeft+p.deltaX;e.onWheelScroll(m),gR(m,f)&&p.preventDefault()}},onResize:()=>{u.current&&s.viewport&&i&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:fc(i.paddingLeft),paddingEnd:fc(i.paddingRight)}})}})}),lW=a.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,s=Zr(Rn,e.__scopeScrollArea),[i,l]=a.useState(),u=a.useRef(null),d=tt(t,u,s.onScrollbarYChange);return a.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),c.jsx(dR,{"data-orientation":"vertical",...o,ref:d,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":zu(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,f)=>{if(s.viewport){const m=s.viewport.scrollTop+p.deltaY;e.onWheelScroll(m),gR(m,f)&&p.preventDefault()}},onResize:()=>{u.current&&s.viewport&&i&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:fc(i.paddingTop),paddingEnd:fc(i.paddingBottom)}})}})}),[cW,uR]=sR(Rn),dR=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:p,onResize:f,...m}=e,h=Zr(Rn,r),[v,g]=a.useState(null),b=tt(t,P=>g(P)),_=a.useRef(null),y=a.useRef(""),x=h.viewport,S=n.content-n.viewport,w=Xt(p),I=Xt(u),T=Fu(f,10);function R(P){if(_.current){const $=P.clientX-_.current.left,A=P.clientY-_.current.top;d({x:$,y:A})}}return a.useEffect(()=>{const P=$=>{const A=$.target;(v==null?void 0:v.contains(A))&&w($,S)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[x,v,S,w]),a.useEffect(I,[n,I]),Ks(v,T),Ks(h.content,T),c.jsx(cW,{scope:r,scrollbar:v,hasThumb:o,onThumbChange:Xt(s),onThumbPointerUp:Xt(i),onThumbPositionChange:I,onThumbPointerDown:Xt(l),children:c.jsx(Ke.div,{...m,ref:b,style:{position:"absolute",...m.style},onPointerDown:Ie(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),_.current=v.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),R(P))}),onPointerMove:Ie(e.onPointerMove,R),onPointerUp:Ie(e.onPointerUp,P=>{const $=P.target;$.hasPointerCapture(P.pointerId)&&$.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),_.current=null})})})}),pc="ScrollAreaThumb",pR=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=uR(pc,e.__scopeScrollArea);return c.jsx(Bt,{present:r||o.hasThumb,children:c.jsx(uW,{ref:t,...n})})}),uW=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,s=Zr(pc,r),i=uR(pc,r),{onThumbPositionChange:l}=i,u=tt(t,f=>i.onThumbChange(f)),d=a.useRef(void 0),p=Fu(()=>{d.current&&(d.current(),d.current=void 0)},100);return a.useEffect(()=>{const f=s.viewport;if(f){const m=()=>{if(p(),!d.current){const h=fW(f,l);d.current=h,l()}};return l(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[s.viewport,p,l]),c.jsx(Ke.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Ie(e.onPointerDownCapture,f=>{const h=f.target.getBoundingClientRect(),v=f.clientX-h.left,g=f.clientY-h.top;i.onThumbPointerDown({x:v,y:g})}),onPointerUp:Ie(e.onPointerUp,i.onThumbPointerUp)})});pR.displayName=pc;var wg="ScrollAreaCorner",fR=a.forwardRef((e,t)=>{const r=Zr(wg,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.jsx(dW,{...e,ref:t}):null});fR.displayName=wg;var dW=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=Zr(wg,r),[s,i]=a.useState(0),[l,u]=a.useState(0),d=!!(s&&l);return Ks(o.scrollbarX,()=>{var f;const p=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(p),u(p)}),Ks(o.scrollbarY,()=>{var f;const p=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(p),i(p)}),d?c.jsx(Ke.div,{...n,ref:t,style:{width:s,height:l,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function fc(e){return e?parseInt(e,10):0}function mR(e,t){const r=e/t;return isNaN(r)?0:r}function zu(e){const t=mR(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function pW(e,t,r,n="ltr"){const o=zu(r),s=o/2,i=t||s,l=o-i,u=r.scrollbar.paddingStart+i,d=r.scrollbar.size-r.scrollbar.paddingEnd-l,p=r.content-r.viewport,f=n==="ltr"?[0,p]:[p*-1,0];return hR([u,d],f)(e)}function S_(e,t,r="ltr"){const n=zu(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,l=s-n,u=r==="ltr"?[0,i]:[i*-1,0],d=zf(e,u);return hR([0,i],[0,l])(d)}function hR(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function gR(e,t){return e>0&&e<t}var fW=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=r.left!==s.left,l=r.top!==s.top;(i||l)&&t(),r=s,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Fu(e,t){const r=Xt(e),n=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(n.current),[]),a.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Ks(e,t){const r=Xt(t);Mt(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var vR=iR,mW=lR,hW=fR;const gW=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(vR,{ref:n,className:ve("relative overflow-hidden",e),...r,children:[c.jsx(mW,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(bR,{}),c.jsx(hW,{})]}));gW.displayName=vR.displayName;const bR=a.forwardRef(({className:e,orientation:t="vertical",...r},n)=>c.jsx(yg,{ref:n,orientation:t,className:ve("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:c.jsx(pR,{className:"relative flex-1 rounded-full bg-border-strong"})}));bR.displayName=yg.displayName;function vW(e){const t=bW(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(yW);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function bW(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=wW(o),l=xW(s,o.props);return o.type!==a.Fragment&&(l.ref=n?yr(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _W=Symbol("radix.slottable");function yW(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_W}function xW(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function wW(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var EW=[" ","Enter","ArrowUp","ArrowDown"],SW=[" ","Enter"],Lo="Select",[Vu,Bu,CW]=gu(Lo),[hi]=Yt(Lo,[CW,lo]),Hu=lo(),[PW,po]=hi(Lo),[RW,TW]=hi(Lo),_R=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:s,value:i,defaultValue:l,onValueChange:u,dir:d,name:p,autoComplete:f,disabled:m,required:h,form:v}=e,g=Hu(t),[b,_]=a.useState(null),[y,x]=a.useState(null),[S,w]=a.useState(!1),I=Go(d),[T,R]=Ir({prop:n,defaultProp:o??!1,onChange:s,caller:Lo}),[P,$]=Ir({prop:i,defaultProp:l,onChange:u,caller:Lo}),A=a.useRef(null),k=b?v||!!b.closest("form"):!0,[D,z]=a.useState(new Set),X=Array.from(D).map(V=>V.props.value).join(";");return c.jsx(Iu,{...g,children:c.jsxs(PW,{required:h,scope:t,trigger:b,onTriggerChange:_,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:w,contentId:Ft(),value:P,onValueChange:$,open:T,onOpenChange:R,dir:I,triggerPointerDownPosRef:A,disabled:m,children:[c.jsx(Vu.Provider,{scope:t,children:c.jsx(RW,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(V=>{z(Y=>new Set(Y).add(V))},[]),onNativeOptionRemove:a.useCallback(V=>{z(Y=>{const U=new Set(Y);return U.delete(V),U})},[]),children:r})}),k?c.jsxs(UR,{"aria-hidden":!0,required:h,tabIndex:-1,name:p,autoComplete:f,value:P,onChange:V=>$(V.target.value),disabled:m,form:v,children:[P===void 0?c.jsx("option",{value:""}):null,Array.from(D)]},X):null]})})};_R.displayName=Lo;var yR="SelectTrigger",xR=a.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,s=Hu(r),i=po(yR,r),l=i.disabled||n,u=tt(t,i.onTriggerChange),d=Bu(r),p=a.useRef("touch"),[f,m,h]=qR(g=>{const b=d().filter(x=>!x.disabled),_=b.find(x=>x.value===i.value),y=GR(b,g,_);y!==void 0&&i.onValueChange(y.value)}),v=g=>{l||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return c.jsx(Ma,{asChild:!0,...s,children:c.jsx(Ke.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":WR(i.value)?"":void 0,...o,ref:u,onClick:Ie(o.onClick,g=>{g.currentTarget.focus(),p.current!=="mouse"&&v(g)}),onPointerDown:Ie(o.onPointerDown,g=>{p.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:Ie(o.onKeyDown,g=>{const b=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(b&&g.key===" ")&&EW.includes(g.key)&&(v(),g.preventDefault())})})})});xR.displayName=yR;var wR="SelectValue",ER=a.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:i="",...l}=e,u=po(wR,r),{onValueNodeHasChildrenChange:d}=u,p=s!==void 0,f=tt(t,u.onValueNodeChange);return Mt(()=>{d(p)},[d,p]),c.jsx(Ke.span,{...l,ref:f,style:{pointerEvents:"none"},children:WR(u.value)?c.jsx(c.Fragment,{children:i}):s})});ER.displayName=wR;var IW="SelectIcon",SR=a.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return c.jsx(Ke.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});SR.displayName=IW;var $W="SelectPortal",CR=e=>c.jsx(ui,{asChild:!0,...e});CR.displayName=$W;var zo="SelectContent",PR=a.forwardRef((e,t)=>{const r=po(zo,e.__scopeSelect),[n,o]=a.useState();if(Mt(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?Oo.createPortal(c.jsx(RR,{scope:e.__scopeSelect,children:c.jsx(Vu.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),s):null}return c.jsx(TR,{...e,ref:t})});PR.displayName=zo;var en=10,[RR,fo]=hi(zo),AW="SelectContentImpl",jW=vW("SelectContent.RemoveScroll"),TR=a.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:b,..._}=e,y=po(zo,r),[x,S]=a.useState(null),[w,I]=a.useState(null),T=tt(t,B=>S(B)),[R,P]=a.useState(null),[$,A]=a.useState(null),k=Bu(r),[D,z]=a.useState(!1),X=a.useRef(!1);a.useEffect(()=>{if(x)return wu(x)},[x]),yu();const V=a.useCallback(B=>{const[J,...K]=k().map(Z=>Z.ref.current),[re]=K.slice(-1),se=document.activeElement;for(const Z of B)if(Z===se||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===J&&w&&(w.scrollTop=0),Z===re&&w&&(w.scrollTop=w.scrollHeight),Z==null||Z.focus(),document.activeElement!==se))return},[k,w]),Y=a.useCallback(()=>V([R,x]),[V,R,x]);a.useEffect(()=>{D&&Y()},[D,Y]);const{onOpenChange:U,triggerPointerDownPosRef:F}=y;a.useEffect(()=>{if(x){let B={x:0,y:0};const J=re=>{var se,Z;B={x:Math.abs(Math.round(re.pageX)-(((se=F.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(re.pageY)-(((Z=F.current)==null?void 0:Z.y)??0))}},K=re=>{B.x<=10&&B.y<=10?re.preventDefault():x.contains(re.target)||U(!1),document.removeEventListener("pointermove",J),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",K,{capture:!0})}}},[x,U,F]),a.useEffect(()=>{const B=()=>U(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[U]);const[H,ee]=qR(B=>{const J=k().filter(se=>!se.disabled),K=J.find(se=>se.ref.current===document.activeElement),re=GR(J,B,K);re&&setTimeout(()=>re.ref.current.focus())}),O=a.useCallback((B,J,K)=>{const re=!X.current&&!K;(y.value!==void 0&&y.value===J||re)&&(P(B),re&&(X.current=!0))},[y.value]),M=a.useCallback(()=>x==null?void 0:x.focus(),[x]),G=a.useCallback((B,J,K)=>{const re=!X.current&&!K;(y.value!==void 0&&y.value===J||re)&&A(B)},[y.value]),L=n==="popper"?Ff:IR,W=L===Ff?{side:l,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:b}:{};return c.jsx(RR,{scope:r,content:x,viewport:w,onViewportChange:I,itemRefCallback:O,selectedItem:R,onItemLeave:M,itemTextRefCallback:G,focusSelectedItem:Y,selectedItemText:$,position:n,isPositioned:D,searchRef:H,children:c.jsx(Oa,{as:jW,allowPinchZoom:!0,children:c.jsx(ja,{asChild:!0,trapped:y.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:Ie(o,B=>{var J;(J=y.trigger)==null||J.focus({preventScroll:!0}),B.preventDefault()}),children:c.jsx(ci,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:c.jsx(L,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:B=>B.preventDefault(),..._,...W,onPlaced:()=>z(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:Ie(_.onKeyDown,B=>{const J=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!J&&B.key.length===1&&ee(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let re=k().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(B.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const se=B.target,Z=re.indexOf(se);re=re.slice(Z+1)}setTimeout(()=>V(re)),B.preventDefault()}})})})})})})});TR.displayName=AW;var OW="SelectItemAlignedPosition",IR=a.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,s=po(zo,r),i=fo(zo,r),[l,u]=a.useState(null),[d,p]=a.useState(null),f=tt(t,T=>p(T)),m=Bu(r),h=a.useRef(!1),v=a.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:_,focusSelectedItem:y}=i,x=a.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&d&&g&&b&&_){const T=s.trigger.getBoundingClientRect(),R=d.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),$=_.getBoundingClientRect();if(s.dir!=="rtl"){const se=$.left-R.left,Z=P.left-se,ne=T.left-Z,ie=T.width+ne,he=Math.max(ie,R.width),me=window.innerWidth-en,Pe=zf(Z,[en,Math.max(en,me-he)]);l.style.minWidth=ie+"px",l.style.left=Pe+"px"}else{const se=R.right-$.right,Z=window.innerWidth-P.right-se,ne=window.innerWidth-T.right-Z,ie=T.width+ne,he=Math.max(ie,R.width),me=window.innerWidth-en,Pe=zf(Z,[en,Math.max(en,me-he)]);l.style.minWidth=ie+"px",l.style.right=Pe+"px"}const A=m(),k=window.innerHeight-en*2,D=g.scrollHeight,z=window.getComputedStyle(d),X=parseInt(z.borderTopWidth,10),V=parseInt(z.paddingTop,10),Y=parseInt(z.borderBottomWidth,10),U=parseInt(z.paddingBottom,10),F=X+V+D+U+Y,H=Math.min(b.offsetHeight*5,F),ee=window.getComputedStyle(g),O=parseInt(ee.paddingTop,10),M=parseInt(ee.paddingBottom,10),G=T.top+T.height/2-en,L=k-G,W=b.offsetHeight/2,B=b.offsetTop+W,J=X+V+B,K=F-J;if(J<=G){const se=A.length>0&&b===A[A.length-1].ref.current;l.style.bottom="0px";const Z=d.clientHeight-g.offsetTop-g.offsetHeight,ne=Math.max(L,W+(se?M:0)+Z+Y),ie=J+ne;l.style.height=ie+"px"}else{const se=A.length>0&&b===A[0].ref.current;l.style.top="0px";const ne=Math.max(G,X+g.offsetTop+(se?O:0)+W)+K;l.style.height=ne+"px",g.scrollTop=J-G+g.offsetTop}l.style.margin=`${en}px 0`,l.style.minHeight=H+"px",l.style.maxHeight=k+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[m,s.trigger,s.valueNode,l,d,g,b,_,s.dir,n]);Mt(()=>x(),[x]);const[S,w]=a.useState();Mt(()=>{d&&w(window.getComputedStyle(d).zIndex)},[d]);const I=a.useCallback(T=>{T&&v.current===!0&&(x(),y==null||y(),v.current=!1)},[x,y]);return c.jsx(DW,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:I,children:c.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(Ke.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});IR.displayName=OW;var NW="SelectPopperPosition",Ff=a.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=en,...s}=e,i=Hu(r);return c.jsx($u,{...i,...s,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ff.displayName=NW;var[DW,Eg]=hi(zo,{}),Vf="SelectViewport",$R=a.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,s=fo(Vf,r),i=Eg(Vf,r),l=tt(t,s.onViewportChange),u=a.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx(Vu.Slot,{scope:r,children:c.jsx(Ke.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Ie(o.onScroll,d=>{const p=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&f){const h=Math.abs(u.current-p.scrollTop);if(h>0){const v=window.innerHeight-en*2,g=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),_=Math.max(g,b);if(_<v){const y=_+h,x=Math.min(v,y),S=y-x;f.style.height=x+"px",f.style.bottom==="0px"&&(p.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});$R.displayName=Vf;var AR="SelectGroup",[kW,MW]=hi(AR),jR=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Ft();return c.jsx(kW,{scope:r,id:o,children:c.jsx(Ke.div,{role:"group","aria-labelledby":o,...n,ref:t})})});jR.displayName=AR;var OR="SelectLabel",NR=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=MW(OR,r);return c.jsx(Ke.div,{id:o.id,...n,ref:t})});NR.displayName=OR;var mc="SelectItem",[LW,DR]=hi(mc),kR=a.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...i}=e,l=po(mc,r),u=fo(mc,r),d=l.value===n,[p,f]=a.useState(s??""),[m,h]=a.useState(!1),v=tt(t,y=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,y,n,o)}),g=Ft(),b=a.useRef("touch"),_=()=>{o||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(LW,{scope:r,value:n,disabled:o,textId:g,isSelected:d,onItemTextChange:a.useCallback(y=>{f(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsx(Vu.ItemSlot,{scope:r,value:n,disabled:o,textValue:p,children:c.jsx(Ke.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:v,onFocus:Ie(i.onFocus,()=>h(!0)),onBlur:Ie(i.onBlur,()=>h(!1)),onClick:Ie(i.onClick,()=>{b.current!=="mouse"&&_()}),onPointerUp:Ie(i.onPointerUp,()=>{b.current==="mouse"&&_()}),onPointerDown:Ie(i.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Ie(i.onPointerMove,y=>{var x;b.current=y.pointerType,o?(x=u.onItemLeave)==null||x.call(u):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ie(i.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:Ie(i.onKeyDown,y=>{var S;((S=u.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(SW.includes(y.key)&&_(),y.key===" "&&y.preventDefault())})})})})});kR.displayName=mc;var zi="SelectItemText",MR=a.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...s}=e,i=po(zi,r),l=fo(zi,r),u=DR(zi,r),d=TW(zi,r),[p,f]=a.useState(null),m=tt(t,_=>f(_),u.onItemTextChange,_=>{var y;return(y=l.itemTextRefCallback)==null?void 0:y.call(l,_,u.value,u.disabled)}),h=p==null?void 0:p.textContent,v=a.useMemo(()=>c.jsx("option",{value:u.value,disabled:u.disabled,children:h},u.value),[u.disabled,u.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return Mt(()=>(g(v),()=>b(v)),[g,b,v]),c.jsxs(c.Fragment,{children:[c.jsx(Ke.span,{id:u.textId,...s,ref:m}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Oo.createPortal(s.children,i.valueNode):null]})});MR.displayName=zi;var LR="SelectItemIndicator",zR=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return DR(LR,r).isSelected?c.jsx(Ke.span,{"aria-hidden":!0,...n,ref:t}):null});zR.displayName=LR;var Bf="SelectScrollUpButton",FR=a.forwardRef((e,t)=>{const r=fo(Bf,e.__scopeSelect),n=Eg(Bf,e.__scopeSelect),[o,s]=a.useState(!1),i=tt(t,n.onScrollButtonChange);return Mt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollTop>0;s(d)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?c.jsx(BR,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});FR.displayName=Bf;var Hf="SelectScrollDownButton",VR=a.forwardRef((e,t)=>{const r=fo(Hf,e.__scopeSelect),n=Eg(Hf,e.__scopeSelect),[o,s]=a.useState(!1),i=tt(t,n.onScrollButtonChange);return Mt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<d;s(p)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?c.jsx(BR,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});VR.displayName=Hf;var BR=a.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,s=fo("SelectScrollButton",r),i=a.useRef(null),l=Bu(r),u=a.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return a.useEffect(()=>()=>u(),[u]),Mt(()=>{var p;const d=l().find(f=>f.ref.current===document.activeElement);(p=d==null?void 0:d.ref.current)==null||p.scrollIntoView({block:"nearest"})},[l]),c.jsx(Ke.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ie(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:Ie(o.onPointerMove,()=>{var d;(d=s.onItemLeave)==null||d.call(s),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:Ie(o.onPointerLeave,()=>{u()})})}),zW="SelectSeparator",HR=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(Ke.div,{"aria-hidden":!0,...n,ref:t})});HR.displayName=zW;var Uf="SelectArrow",FW=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Hu(r),s=po(Uf,r),i=fo(Uf,r);return s.open&&i.position==="popper"?c.jsx(Au,{...o,...n,ref:t}):null});FW.displayName=Uf;var VW="SelectBubbleInput",UR=a.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=a.useRef(null),s=tt(n,o),i=Cu(t);return a.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&p){const f=new Event("change",{bubbles:!0});p.call(l,t),l.dispatchEvent(f)}},[i,t]),c.jsx(Ke.select,{...r,style:{...yP,...r.style},ref:s,defaultValue:t})});UR.displayName=VW;function WR(e){return e===""||e===void 0}function qR(e){const t=Xt(e),r=a.useRef(""),n=a.useRef(0),o=a.useCallback(i=>{const l=r.current+i;t(l),function u(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>u(""),1e3))}(l)},[t]),s=a.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function GR(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=BW(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function BW(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var HW=_R,KR=xR,UW=ER,WW=SR,qW=CR,XR=PR,GW=$R,KW=jR,YR=NR,JR=kR,XW=MR,YW=zR,ZR=FR,QR=VR,eT=HR;const Dre=HW,kre=KW,Mre=UW,JW=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(KR,{ref:n,className:ve("flex h-10 w-full items-center justify-between rounded-md border border-input bg-bg-base px-3 py-2 text-sm","placeholder:text-text-subtle","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error","[&>span]:line-clamp-1",e),...r,children:[t,c.jsx(WW,{asChild:!0,children:c.jsx(Nh,{className:"h-4 w-4 opacity-50"})})]}));JW.displayName=KR.displayName;const tT=a.forwardRef(({className:e,...t},r)=>c.jsx(ZR,{ref:r,className:ve("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(mF,{className:"h-4 w-4"})}));tT.displayName=ZR.displayName;const rT=a.forwardRef(({className:e,...t},r)=>c.jsx(QR,{ref:r,className:ve("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Nh,{className:"h-4 w-4"})}));rT.displayName=QR.displayName;const ZW=a.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>c.jsx(qW,{children:c.jsxs(XR,{ref:o,className:ve("relative z-[1400] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-bg-elevated text-text shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[c.jsx(tT,{}),c.jsx(GW,{className:ve("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(rT,{})]})}));ZW.displayName=XR.displayName;const QW=a.forwardRef(({className:e,...t},r)=>c.jsx(YR,{ref:r,className:ve("px-2 py-1.5 text-sm font-semibold text-text-muted",e),...t}));QW.displayName=YR.displayName;const e6=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(JR,{ref:n,className:ve("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-bg-surface focus:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(YW,{children:c.jsx(Oh,{className:"h-4 w-4 text-primary"})})}),c.jsx(XW,{children:t})]}));e6.displayName=JR.displayName;const t6=a.forwardRef(({className:e,...t},r)=>c.jsx(eT,{ref:r,className:ve("-mx-1 my-1 h-px bg-border",e),...t}));t6.displayName=eT.displayName;var r6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],n6=r6.reduce((e,t)=>{const r=fi(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),o6="Separator",C_="horizontal",s6=["horizontal","vertical"],nT=a.forwardRef((e,t)=>{const{decorative:r,orientation:n=C_,...o}=e,s=i6(n)?n:C_,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return c.jsx(n6.div,{"data-orientation":s,...l,...o,ref:t})});nT.displayName=o6;function i6(e){return s6.includes(e)}var oT=nT;const sT=a.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>c.jsx(oT,{ref:o,decorative:r,orientation:t,className:ve("shrink-0 bg-border",t==="horizontal"?"h-px w-full":"h-full w-px",e),...n}));sT.displayName=oT.displayName;const Lre=Su,zre=Gh,Fre=Da,a6=Na,iT=a.forwardRef(({className:e,...t},r)=>c.jsx(Ko,{ref:r,className:ve("fixed inset-0 z-[1200] bg-slate-900/60 backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));iT.displayName=Ko.displayName;const l6=nr("fixed z-[1300] gap-4 bg-bg-elevated p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b border-border data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t border-border data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r border-border data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l border-border data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),c6=a.forwardRef(({side:e="right",className:t,children:r,...n},o)=>{const{t:s}=oo();return c.jsxs(a6,{children:[c.jsx(iT,{}),c.jsxs(Xo,{ref:o,className:ve(l6({side:e}),t),...n,children:[r,c.jsxs(Da,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-bg-base transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Dh,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:s("ui.sheet.close","Закрыть")})]})]})]})});c6.displayName=Xo.displayName;const u6=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col space-y-2 text-center sm:text-left",e),...t});u6.displayName="SheetHeader";const d6=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});d6.displayName="SheetFooter";const p6=a.forwardRef(({className:e,...t},r)=>c.jsx(di,{ref:r,className:ve("text-lg font-semibold text-text",e),...t}));p6.displayName=di.displayName;const f6=a.forwardRef(({className:e,...t},r)=>c.jsx(pi,{ref:r,className:ve("text-sm text-text-muted",e),...t}));f6.displayName=pi.displayName;var Uu="Switch",[m6]=Yt(Uu),[h6,g6]=m6(Uu),aT=a.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:s,required:i,disabled:l,value:u="on",onCheckedChange:d,form:p,...f}=e,[m,h]=a.useState(null),v=tt(t,x=>h(x)),g=a.useRef(!1),b=m?p||!!m.closest("form"):!0,[_,y]=Ir({prop:o,defaultProp:s??!1,onChange:d,caller:Uu});return c.jsxs(h6,{scope:r,checked:_,disabled:l,children:[c.jsx(Ke.button,{type:"button",role:"switch","aria-checked":_,"aria-required":i,"data-state":dT(_),"data-disabled":l?"":void 0,disabled:l,value:u,...f,ref:v,onClick:Ie(e.onClick,x=>{y(S=>!S),b&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),b&&c.jsx(uT,{control:m,bubbles:!g.current,name:n,value:u,checked:_,required:i,disabled:l,form:p,style:{transform:"translateX(-100%)"}})]})});aT.displayName=Uu;var lT="SwitchThumb",cT=a.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=g6(lT,r);return c.jsx(Ke.span,{"data-state":dT(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});cT.displayName=lT;var v6="SwitchBubbleInput",uT=a.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const i=a.useRef(null),l=tt(i,s),u=Cu(r),d=Pu(t);return a.useEffect(()=>{const p=i.current;if(!p)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==r&&h){const v=new Event("click",{bubbles:n});h.call(p,r),p.dispatchEvent(v)}},[u,r,n]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});uT.displayName=v6;function dT(e){return e?"checked":"unchecked"}var pT=aT,b6=cT;const _6=a.forwardRef(({className:e,...t},r)=>c.jsx(pT,{ref:r,className:ve("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary data-[state=unchecked]:bg-border-strong",e),...t,children:c.jsx(b6,{className:ve("pointer-events-none block h-5 w-5 rounded-full bg-bg-base shadow-sm ring-0 transition-transform","data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));_6.displayName=pT.displayName;var Wu="Tabs",[y6]=Yt(Wu,[mi]),fT=mi(),[x6,Sg]=y6(Wu),mT=a.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:l,activationMode:u="automatic",...d}=e,p=Go(l),[f,m]=Ir({prop:n,onChange:o,defaultProp:s??"",caller:Wu});return c.jsx(x6,{scope:r,baseId:Ft(),value:f,onValueChange:m,orientation:i,dir:p,activationMode:u,children:c.jsx(Ke.div,{dir:p,"data-orientation":i,...d,ref:t})})});mT.displayName=Wu;var hT="TabsList",gT=a.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,s=Sg(hT,r),i=fT(r);return c.jsx(og,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:n,children:c.jsx(Ke.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});gT.displayName=hT;var vT="TabsTrigger",bT=a.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...s}=e,i=Sg(vT,r),l=fT(r),u=xT(i.baseId,n),d=wT(i.baseId,n),p=n===i.value;return c.jsx(sg,{asChild:!0,...l,focusable:!o,active:p,children:c.jsx(Ke.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...s,ref:t,onMouseDown:Ie(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(n):f.preventDefault()}),onKeyDown:Ie(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(n)}),onFocus:Ie(e.onFocus,()=>{const f=i.activationMode!=="manual";!p&&!o&&f&&i.onValueChange(n)})})})});bT.displayName=vT;var _T="TabsContent",yT=a.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:s,...i}=e,l=Sg(_T,r),u=xT(l.baseId,n),d=wT(l.baseId,n),p=n===l.value,f=a.useRef(p);return a.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),c.jsx(Bt,{present:o||p,children:({present:m})=>c.jsx(Ke.div,{"data-state":p?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!m,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&s})})});yT.displayName=_T;function xT(e,t){return`${e}-trigger-${t}`}function wT(e,t){return`${e}-content-${t}`}var w6=mT,ET=gT,ST=bT,CT=yT;const Vre=w6,E6=a.forwardRef(({className:e,...t},r)=>c.jsx(ET,{ref:r,className:ve("inline-flex h-10 items-center justify-center rounded-md bg-bg-surface p-1 text-text-muted",e),...t}));E6.displayName=ET.displayName;const S6=a.forwardRef(({className:e,...t},r)=>c.jsx(ST,{ref:r,className:ve("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all","ring-offset-bg-base focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-bg-base data-[state=active]:text-text data-[state=active]:shadow-sm",e),...t}));S6.displayName=ST.displayName;const C6=a.forwardRef(({className:e,...t},r)=>c.jsx(CT,{ref:r,className:ve("mt-2 ring-offset-bg-base focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));C6.displayName=CT.displayName;const P6=a.forwardRef(({className:e,...t},r)=>c.jsx("textarea",{ref:r,className:ve("flex min-h-[80px] w-full rounded-md border border-input bg-bg-base px-3 py-2 text-sm","ring-offset-bg-base placeholder:text-text-subtle","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error aria-invalid:focus-visible:ring-error",e),...t}));P6.displayName="Textarea";function R6(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const T6=e=>{switch(e){case"success":return A6;case"info":return O6;case"warning":return j6;case"error":return N6;default:return null}},I6=Array(12).fill(0),$6=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},I6.map((r,n)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),A6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),j6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),O6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),N6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),D6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),k6=()=>{const[e,t]=N.useState(document.hidden);return N.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let Wf=1;class M6{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...o}=t,s=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Wf++,i=this.toasts.find(u=>u.id===s),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...t,id:s,title:n}),{...u,...t,id:s,dismissible:l,title:n}):u):this.addToast({title:n,...o,dismissible:l,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=n!==void 0,i;const l=o.then(async d=>{if(i=["resolve",d],N.isValidElement(d))s=!1,this.create({id:n,type:"default",message:d});else if(z6(d)&&!d.ok){s=!1;const f=typeof r.error=="function"?await r.error(`HTTP error! status: ${d.status}`):r.error,m=typeof r.description=="function"?await r.description(`HTTP error! status: ${d.status}`):r.description,v=typeof f=="object"&&!N.isValidElement(f)?f:{message:f};this.create({id:n,type:"error",description:m,...v})}else if(d instanceof Error){s=!1;const f=typeof r.error=="function"?await r.error(d):r.error,m=typeof r.description=="function"?await r.description(d):r.description,v=typeof f=="object"&&!N.isValidElement(f)?f:{message:f};this.create({id:n,type:"error",description:m,...v})}else if(r.success!==void 0){s=!1;const f=typeof r.success=="function"?await r.success(d):r.success,m=typeof r.description=="function"?await r.description(d):r.description,v=typeof f=="object"&&!N.isValidElement(f)?f:{message:f};this.create({id:n,type:"success",description:m,...v})}}).catch(async d=>{if(i=["reject",d],r.error!==void 0){s=!1;const p=typeof r.error=="function"?await r.error(d):r.error,f=typeof r.description=="function"?await r.description(d):r.description,h=typeof p=="object"&&!N.isValidElement(p)?p:{message:p};this.create({id:n,type:"error",description:f,...h})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),u=()=>new Promise((d,p)=>l.then(()=>i[0]==="reject"?p(i[1]):d(i[1])).catch(p));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(t,r)=>{const n=(r==null?void 0:r.id)||Wf++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Sr=new M6,L6=(e,t)=>{const r=(t==null?void 0:t.id)||Wf++;return Sr.addToast({title:e,...t,id:r}),r},z6=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",F6=L6,V6=()=>Sr.toasts,B6=()=>Sr.getActiveToasts(),H6=Object.assign(F6,{success:Sr.success,info:Sr.info,warning:Sr.warning,error:Sr.error,custom:Sr.custom,message:Sr.message,promise:Sr.promise,dismiss:Sr.dismiss,loading:Sr.loading},{getHistory:V6,getToasts:B6});R6("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ul(e){return e.label!==void 0}const U6=3,W6="24px",q6="16px",P_=4e3,G6=356,K6=14,X6=45,Y6=200;function hn(...e){return e.filter(Boolean).join(" ")}function J6(e){const[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}const Z6=e=>{var t,r,n,o,s,i,l,u,d;const{invert:p,toast:f,unstyled:m,interacting:h,setHeights:v,visibleToasts:g,heights:b,index:_,toasts:y,expanded:x,removeToast:S,defaultRichColors:w,closeButton:I,style:T,cancelButtonStyle:R,actionButtonStyle:P,className:$="",descriptionClassName:A="",duration:k,position:D,gap:z,expandByDefault:X,classNames:V,icons:Y,closeButtonAriaLabel:U="Close toast"}=e,[F,H]=N.useState(null),[ee,O]=N.useState(null),[M,G]=N.useState(!1),[L,W]=N.useState(!1),[B,J]=N.useState(!1),[K,re]=N.useState(!1),[se,Z]=N.useState(!1),[ne,ie]=N.useState(0),[he,me]=N.useState(0),Pe=N.useRef(f.duration||k||P_),Se=N.useRef(null),Ce=N.useRef(null),Ze=_===0,Ye=_+1<=g,pe=f.type,be=f.dismissible!==!1,j=f.className||"",q=f.descriptionClassName||"",Q=N.useMemo(()=>b.findIndex(ke=>ke.toastId===f.id)||0,[b,f.id]),le=N.useMemo(()=>{var ke;return(ke=f.closeButton)!=null?ke:I},[f.closeButton,I]),de=N.useMemo(()=>f.duration||k||P_,[f.duration,k]),ce=N.useRef(0),fe=N.useRef(0),ue=N.useRef(0),ye=N.useRef(null),[Be,Ae]=D.split("-"),Ee=N.useMemo(()=>b.reduce((ke,nt,ut)=>ut>=Q?ke:ke+nt.height,0),[b,Q]),lt=k6(),ht=f.invert||p,dt=pe==="loading";fe.current=N.useMemo(()=>Q*z+Ee,[Q,Ee]),N.useEffect(()=>{Pe.current=de},[de]),N.useEffect(()=>{G(!0)},[]),N.useEffect(()=>{const ke=Ce.current;if(ke){const nt=ke.getBoundingClientRect().height;return me(nt),v(ut=>[{toastId:f.id,height:nt,position:f.position},...ut]),()=>v(ut=>ut.filter(_e=>_e.toastId!==f.id))}},[v,f.id]),N.useLayoutEffect(()=>{if(!M)return;const ke=Ce.current,nt=ke.style.height;ke.style.height="auto";const ut=ke.getBoundingClientRect().height;ke.style.height=nt,me(ut),v(_e=>_e.find(ge=>ge.toastId===f.id)?_e.map(ge=>ge.toastId===f.id?{...ge,height:ut}:ge):[{toastId:f.id,height:ut,position:f.position},..._e])},[M,f.title,f.description,v,f.id,f.jsx,f.action,f.cancel]);const mt=N.useCallback(()=>{W(!0),ie(fe.current),v(ke=>ke.filter(nt=>nt.toastId!==f.id)),setTimeout(()=>{S(f)},Y6)},[f,S,v,fe]);N.useEffect(()=>{if(f.promise&&pe==="loading"||f.duration===1/0||f.type==="loading")return;let ke;return x||h||lt?(()=>{if(ue.current<ce.current){const _e=new Date().getTime()-ce.current;Pe.current=Pe.current-_e}ue.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(ce.current=new Date().getTime(),ke=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),mt()},Pe.current))})(),()=>clearTimeout(ke)},[x,h,f,pe,lt,mt]),N.useEffect(()=>{f.delete&&(mt(),f.onDismiss==null||f.onDismiss.call(f,f))},[mt,f.delete]);function ft(){var ke;if(Y!=null&&Y.loading){var nt;return N.createElement("div",{className:hn(V==null?void 0:V.loader,f==null||(nt=f.classNames)==null?void 0:nt.loader,"sonner-loader"),"data-visible":pe==="loading"},Y.loading)}return N.createElement($6,{className:hn(V==null?void 0:V.loader,f==null||(ke=f.classNames)==null?void 0:ke.loader),visible:pe==="loading"})}const vt=f.icon||(Y==null?void 0:Y[pe])||T6(pe);var ze,We;return N.createElement("li",{tabIndex:0,ref:Ce,className:hn($,j,V==null?void 0:V.toast,f==null||(t=f.classNames)==null?void 0:t.toast,V==null?void 0:V.default,V==null?void 0:V[pe],f==null||(r=f.classNames)==null?void 0:r[pe]),"data-sonner-toast":"","data-rich-colors":(ze=f.richColors)!=null?ze:w,"data-styled":!(f.jsx||f.unstyled||m),"data-mounted":M,"data-promise":!!f.promise,"data-swiped":se,"data-removed":L,"data-visible":Ye,"data-y-position":Be,"data-x-position":Ae,"data-index":_,"data-front":Ze,"data-swiping":B,"data-dismissible":be,"data-type":pe,"data-invert":ht,"data-swipe-out":K,"data-swipe-direction":ee,"data-expanded":!!(x||X&&M),"data-testid":f.testId,style:{"--index":_,"--toasts-before":_,"--z-index":y.length-_,"--offset":`${L?ne:fe.current}px`,"--initial-height":X?"auto":`${he}px`,...T,...f.style},onDragEnd:()=>{J(!1),H(null),ye.current=null},onPointerDown:ke=>{ke.button!==2&&(dt||!be||(Se.current=new Date,ie(fe.current),ke.target.setPointerCapture(ke.pointerId),ke.target.tagName!=="BUTTON"&&(J(!0),ye.current={x:ke.clientX,y:ke.clientY})))},onPointerUp:()=>{var ke,nt,ut;if(K||!be)return;ye.current=null;const _e=Number(((ke=Ce.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qe=Number(((nt=Ce.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ge=new Date().getTime()-((ut=Se.current)==null?void 0:ut.getTime()),Te=F==="x"?_e:Qe,et=Math.abs(Te)/ge;if(Math.abs(Te)>=X6||et>.11){ie(fe.current),f.onDismiss==null||f.onDismiss.call(f,f),O(F==="x"?_e>0?"right":"left":Qe>0?"down":"up"),mt(),re(!0);return}else{var xe,$e;(xe=Ce.current)==null||xe.style.setProperty("--swipe-amount-x","0px"),($e=Ce.current)==null||$e.style.setProperty("--swipe-amount-y","0px")}Z(!1),J(!1),H(null)},onPointerMove:ke=>{var nt,ut,_e;if(!ye.current||!be||((nt=window.getSelection())==null?void 0:nt.toString().length)>0)return;const ge=ke.clientY-ye.current.y,Te=ke.clientX-ye.current.x;var et;const xe=(et=e.swipeDirections)!=null?et:J6(D);!F&&(Math.abs(Te)>1||Math.abs(ge)>1)&&H(Math.abs(Te)>Math.abs(ge)?"x":"y");let $e={x:0,y:0};const Fe=Ge=>1/(1.5+Math.abs(Ge)/20);if(F==="y"){if(xe.includes("top")||xe.includes("bottom"))if(xe.includes("top")&&ge<0||xe.includes("bottom")&&ge>0)$e.y=ge;else{const Ge=ge*Fe(ge);$e.y=Math.abs(Ge)<Math.abs(ge)?Ge:ge}}else if(F==="x"&&(xe.includes("left")||xe.includes("right")))if(xe.includes("left")&&Te<0||xe.includes("right")&&Te>0)$e.x=Te;else{const Ge=Te*Fe(Te);$e.x=Math.abs(Ge)<Math.abs(Te)?Ge:Te}(Math.abs($e.x)>0||Math.abs($e.y)>0)&&Z(!0),(ut=Ce.current)==null||ut.style.setProperty("--swipe-amount-x",`${$e.x}px`),(_e=Ce.current)==null||_e.style.setProperty("--swipe-amount-y",`${$e.y}px`)}},le&&!f.jsx&&pe!=="loading"?N.createElement("button",{"aria-label":U,"data-disabled":dt,"data-close-button":!0,onClick:dt||!be?()=>{}:()=>{mt(),f.onDismiss==null||f.onDismiss.call(f,f)},className:hn(V==null?void 0:V.closeButton,f==null||(n=f.classNames)==null?void 0:n.closeButton)},(We=Y==null?void 0:Y.close)!=null?We:D6):null,(pe||f.icon||f.promise)&&f.icon!==null&&((Y==null?void 0:Y[pe])!==null||f.icon)?N.createElement("div",{"data-icon":"",className:hn(V==null?void 0:V.icon,f==null||(o=f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||ft():null,f.type!=="loading"?vt:null):null,N.createElement("div",{"data-content":"",className:hn(V==null?void 0:V.content,f==null||(s=f.classNames)==null?void 0:s.content)},N.createElement("div",{"data-title":"",className:hn(V==null?void 0:V.title,f==null||(i=f.classNames)==null?void 0:i.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?N.createElement("div",{"data-description":"",className:hn(A,q,V==null?void 0:V.description,f==null||(l=f.classNames)==null?void 0:l.description)},typeof f.description=="function"?f.description():f.description):null),N.isValidElement(f.cancel)?f.cancel:f.cancel&&ul(f.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||R,onClick:ke=>{ul(f.cancel)&&be&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,ke),mt())},className:hn(V==null?void 0:V.cancelButton,f==null||(u=f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,N.isValidElement(f.action)?f.action:f.action&&ul(f.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||P,onClick:ke=>{ul(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,ke),!ke.defaultPrevented&&mt())},className:hn(V==null?void 0:V.actionButton,f==null||(d=f.classNames)==null?void 0:d.actionButton)},f.action.label):null)};function R_(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Q6(e,t){const r={};return[e,t].forEach((n,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",l=s?q6:W6;function u(d){["top","right","bottom","left"].forEach(p=>{r[`${i}-${p}`]=typeof d=="number"?`${d}px`:d})}typeof n=="number"||typeof n=="string"?u(n):typeof n=="object"?["top","right","bottom","left"].forEach(d=>{n[d]===void 0?r[`${i}-${d}`]=l:r[`${i}-${d}`]=typeof n[d]=="number"?`${n[d]}px`:n[d]}):u(l)}),r}const Bre=N.forwardRef(function(t,r){const{id:n,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:u,className:d,offset:p,mobileOffset:f,theme:m="light",richColors:h,duration:v,style:g,visibleToasts:b=U6,toastOptions:_,dir:y=R_(),gap:x=K6,icons:S,containerAriaLabel:w="Notifications"}=t,[I,T]=N.useState([]),R=N.useMemo(()=>n?I.filter(M=>M.toasterId===n):I.filter(M=>!M.toasterId),[I,n]),P=N.useMemo(()=>Array.from(new Set([s].concat(R.filter(M=>M.position).map(M=>M.position)))),[R,s]),[$,A]=N.useState([]),[k,D]=N.useState(!1),[z,X]=N.useState(!1),[V,Y]=N.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=N.useRef(null),F=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=N.useRef(null),ee=N.useRef(!1),O=N.useCallback(M=>{T(G=>{var L;return(L=G.find(W=>W.id===M.id))!=null&&L.delete||Sr.dismiss(M.id),G.filter(({id:W})=>W!==M.id)})},[]);return N.useEffect(()=>Sr.subscribe(M=>{if(M.dismiss){requestAnimationFrame(()=>{T(G=>G.map(L=>L.id===M.id?{...L,delete:!0}:L))});return}setTimeout(()=>{gx.flushSync(()=>{T(G=>{const L=G.findIndex(W=>W.id===M.id);return L!==-1?[...G.slice(0,L),{...G[L],...M},...G.slice(L+1)]:[M,...G]})})})}),[I]),N.useEffect(()=>{if(m!=="system"){Y(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:G})=>{Y(G?"dark":"light")})}catch{M.addListener(({matches:L})=>{try{Y(L?"dark":"light")}catch(W){console.error(W)}})}},[m]),N.useEffect(()=>{I.length<=1&&D(!1)},[I]),N.useEffect(()=>{const M=G=>{var L;if(i.every(J=>G[J]||G.code===J)){var B;D(!0),(B=U.current)==null||B.focus()}G.code==="Escape"&&(document.activeElement===U.current||(L=U.current)!=null&&L.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[i]),N.useEffect(()=>{if(U.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,ee.current=!1)}},[U.current]),N.createElement("section",{ref:r,"aria-label":`${w} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((M,G)=>{var L;const[W,B]=M.split("-");return R.length?N.createElement("ol",{key:M,dir:y==="auto"?R_():y,tabIndex:-1,ref:U,className:d,"data-sonner-toaster":!0,"data-sonner-theme":V,"data-y-position":W,"data-x-position":B,style:{"--front-toast-height":`${((L=$[0])==null?void 0:L.height)||0}px`,"--width":`${G6}px`,"--gap":`${x}px`,...g,...Q6(p,f)},onBlur:J=>{ee.current&&!J.currentTarget.contains(J.relatedTarget)&&(ee.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||ee.current||(ee.current=!0,H.current=J.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{z||D(!1)},onDragEnd:()=>D(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},R.filter(J=>!J.position&&G===0||J.position===M).map((J,K)=>{var re,se;return N.createElement(Z6,{key:J.id,icons:S,index:K,toast:J,defaultRichColors:h,duration:(re=_==null?void 0:_.duration)!=null?re:v,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:o,visibleToasts:b,closeButton:(se=_==null?void 0:_.closeButton)!=null?se:u,interacting:z,position:M,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:O,toasts:R.filter(Z=>Z.position==J.position),heights:$.filter(Z=>Z.position==J.position),setHeights:A,expandByDefault:l,gap:x,expanded:k,swipeDirections:t.swipeDirections})})):null}))}),eq=nr("mx-auto w-full px-4 sm:px-6 lg:px-8",{variants:{size:{narrow:"max-w-[720px]",base:"max-w-[1200px]",wide:"max-w-[1440px]",sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-none"}},defaultVariants:{size:"base"}}),tq=a.forwardRef(({className:e,size:t,as:r="div",...n},o)=>{const s=r;return c.jsx(s,{ref:o,className:ve(eq({size:t}),e),...n})});tq.displayName="Container";const rq=nr("flex flex-col",{variants:{gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12",16:"gap-16"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:4,align:"stretch",justify:"start"}}),Ts=a.forwardRef(({className:e,gap:t,align:r,justify:n,as:o="div",...s},i)=>{const l=o;return c.jsx(l,{ref:i,className:ve(rq({gap:t,align:r,justify:n}),e),...s})});Ts.displayName="Stack";const nq=nr("flex flex-row",{variants:{gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:4,align:"center",justify:"start",wrap:!0}}),PT=a.forwardRef(({className:e,gap:t,align:r,justify:n,wrap:o,as:s="div",...i},l)=>{const u=s;return c.jsx(u,{ref:l,className:ve(nq({gap:t,align:r,justify:n,wrap:o}),e),...i})});PT.displayName="Cluster";const oq=nr("grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-12"},gap:{0:"gap-0",2:"gap-2",4:"gap-4",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"}},defaultVariants:{cols:3,gap:6}}),sq=a.forwardRef(({className:e,cols:t,gap:r,as:n="div",...o},s)=>{const i=n;return c.jsx(i,{ref:s,className:ve(oq({cols:t,gap:r}),e),...o})});sq.displayName="Grid";const iq=nr("w-full",{variants:{py:{none:"py-0",sm:"py-8 sm:py-12",md:"py-12 sm:py-16 lg:py-20",lg:"py-16 sm:py-24 lg:py-32",xl:"py-24 sm:py-32 lg:py-40"},bg:{base:"bg-bg-base",surface:"bg-bg-surface",primary:"bg-primary text-primary-foreground","primary-light":"bg-primary-light",navy:"bg-accent-navy text-accent-navy-foreground"}},defaultVariants:{py:"md",bg:"base"}}),aq=a.forwardRef(({className:e,py:t,bg:r,...n},o)=>c.jsx("section",{ref:o,className:ve(iq({py:t,bg:r}),e),...n}));aq.displayName="Section";const lq=nr("font-display font-bold tracking-tight text-text",{variants:{size:{sm:"text-4xl leading-tight",md:"text-5xl leading-tight",lg:"text-6xl leading-[1.05]",xl:"text-7xl leading-[1.02]"}},defaultVariants:{size:"lg"}}),cq=a.forwardRef(({className:e,size:t,as:r="h1",...n},o)=>{const s=r;return c.jsx(s,{ref:o,className:ve(lq({size:t}),e),...n})});cq.displayName="Display";const uq=nr("font-display font-semibold tracking-tight text-text",{variants:{size:{h1:"text-4xl leading-tight",h2:"text-3xl leading-snug",h3:"text-2xl leading-snug",h4:"text-xl leading-snug",h5:"text-lg leading-normal"}},defaultVariants:{size:"h2"}}),dq=a.forwardRef(({className:e,size:t,as:r,level:n,...o},s)=>{const i=r??(n?`h${n}`:"h2"),l=n?`h${n>5?5:n}`:void 0,u=i;return c.jsx(u,{ref:s,className:ve(uq({size:t??l}),e),...o})});dq.displayName="Heading";const pq=nr("font-body text-text",{variants:{variant:{body:"text-base leading-relaxed",lead:"text-lg leading-relaxed text-text-muted",muted:"text-sm text-text-muted",caption:"text-xs text-text-muted uppercase tracking-wider",small:"text-sm"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"body",weight:"regular"}}),Po=a.forwardRef(({className:e,variant:t,weight:r,as:n="p",...o},s)=>{const i=n;return c.jsx(i,{ref:s,className:ve(pq({variant:t,weight:r}),e),...o})});Po.displayName="Text";const fq=a.forwardRef(({className:e,block:t=!1,...r},n)=>t?c.jsx("pre",{ref:n,className:ve("rounded-md bg-bg-surface p-4 font-mono text-sm text-text overflow-x-auto",e),...r}):c.jsx("code",{ref:n,className:ve("rounded bg-bg-surface px-1.5 py-0.5 font-mono text-[0.875em] text-text",e),...r}));fq.displayName="Code";const mq=nr("font-display tabular-nums tracking-tight text-text",{variants:{size:{sm:"text-base font-semibold",md:"text-xl font-bold",lg:"text-3xl font-bold",xl:"text-4xl font-bold"}},defaultVariants:{size:"md"}}),hq=a.forwardRef(({className:e,size:t,prefix:r,currency:n="₽",children:o,...s},i)=>c.jsxs("span",{ref:i,className:ve(mq({size:t}),e),...s,children:[r?c.jsx("span",{className:"text-text-muted font-medium pr-1.5",children:r}):null,o,n?c.jsx("span",{className:"text-text-muted font-medium pl-1.5",children:n}):null]}));hq.displayName="Price";var Ua=e=>e.type==="checkbox",To=e=>e instanceof Date,gr=e=>e==null;const RT=e=>typeof e=="object";var jt=e=>!gr(e)&&!Array.isArray(e)&&RT(e)&&!To(e),TT=e=>jt(e)&&e.target?Ua(e.target)?e.target.checked:e.target.value:e,IT=(e,t)=>t.split(".").some((r,n,o)=>!isNaN(Number(r))&&e.has(o.slice(0,n).join("."))),gq=e=>{const t=e.constructor&&e.constructor.prototype;return jt(t)&&t.hasOwnProperty("isPrototypeOf")},Cg=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ot(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Cg&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(jt(e)&&gq(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=Ot(e[o]));return n}var qu=e=>/^\w*$/.test(e),xt=e=>e===void 0,Pg=e=>Array.isArray(e)?e.filter(Boolean):[],Rg=e=>Pg(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,r)=>{if(!t||!jt(e))return r;const o=(qu(t)?[t]:Rg(t)).reduce((s,i)=>gr(s)?void 0:s[i],e);return xt(o)||o===e?xt(e[t])?r:e[t]:o},Nr=e=>typeof e=="boolean",ar=e=>typeof e=="function",yt=(e,t,r)=>{let n=-1;const o=qu(t)?[t]:Rg(t),s=o.length,i=s-1;for(;++n<s;){const l=o[n];let u=r;if(n!==i){const d=e[l];u=jt(d)||Array.isArray(d)?d:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=u,e=e[l]}};const Jn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},on={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},tn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Jd="form",$T="root",Tg=N.createContext(null);Tg.displayName="HookFormControlContext";const Ig=()=>N.useContext(Tg);var AT=(e,t,r,n=!0)=>{const o={};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==on.all&&(t._proxyFormState[i]=!n||on.all),r&&(r[i]=!0),e[i]}});return o};const $g=typeof window<"u"?N.useLayoutEffect:N.useEffect;function vq(e){const t=Ig(),{control:r=t,disabled:n,name:o,exact:s}=e||{},[i,l]=N.useState(()=>({...r._formState,defaultValues:r._defaultValues})),u=N.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return $g(()=>r._subscribe({name:o,formState:u.current,exact:s,callback:d=>{!n&&l({...r._formState,...d,defaultValues:r._defaultValues})}}),[o,n,s]),N.useEffect(()=>{u.current.isValid&&r._setValid(!0)},[r]),N.useMemo(()=>AT(i,r,u.current,!1),[i,r])}var cr=e=>typeof e=="string",qf=(e,t,r,n,o)=>cr(e)?(n&&t.watch.add(e),Ne(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),Ne(r,s))):(n&&(t.watchAll=!0),r),Gf=e=>gr(e)||!RT(e);function Dr(e,t,r=new WeakSet){if(e===t)return!0;if(Gf(e)||Gf(t))return Object.is(e,t);if(To(e)&&To(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const i=e[s];if(!(s in t))return!1;if(s!=="ref"){const l=t[s];if(To(i)&&To(l)||(jt(i)||Array.isArray(i))&&(jt(l)||Array.isArray(l))?!Dr(i,l,r):!Object.is(i,l))return!1}}return!0}function bq(e){const t=Ig(),{control:r=t,name:n,defaultValue:o,disabled:s,exact:i,compute:l}=e||{},u=N.useRef(o),d=N.useRef(l),p=N.useRef(void 0),f=N.useRef(r),m=N.useRef(n);d.current=l;const[h,v]=N.useState(()=>{const S=r._getWatch(n,u.current);return d.current?d.current(S):S}),g=N.useCallback(S=>{const w=qf(n,r._names,S||r._formValues,!1,u.current);return d.current?d.current(w):w},[r._formValues,r._names,n]),b=N.useCallback(S=>{if(!s){const w=qf(n,r._names,S||r._formValues,!1,u.current);if(d.current){const I=d.current(w);Dr(I,p.current)||(v(I),p.current=I)}else v(w)}},[r._formValues,r._names,s,n]);$g(()=>((f.current!==r||!Dr(m.current,n))&&(f.current=r,m.current=n,b()),r._subscribe({name:n,formState:{values:!0},exact:i,callback:S=>{b(S.values)}})),[r,i,n,b]),N.useEffect(()=>r._removeUnmounted());const _=f.current!==r,y=m.current,x=N.useMemo(()=>{if(s)return null;const S=!_&&!Dr(y,n);return _||S?g():null},[s,_,n,y,g]);return x!==null?x:h}function _q(e){const t=Ig(),{name:r,disabled:n,control:o=t,shouldUnregister:s,defaultValue:i,exact:l=!0}=e,u=IT(o._names.array,r),d=N.useMemo(()=>Ne(o._formValues,r,Ne(o._defaultValues,r,i)),[o,r,i]),p=bq({control:o,name:r,defaultValue:d,exact:l}),f=vq({control:o,name:r,exact:l}),m=N.useRef(e),h=N.useRef(o.register(r,{...e.rules,value:p,...Nr(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const v=N.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!Ne(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Ne(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Ne(f.validatingFields,r)},error:{enumerable:!0,get:()=>Ne(f.errors,r)}}),[f,r]),g=N.useCallback(x=>h.current.onChange({target:{value:TT(x),name:r},type:Jn.CHANGE}),[r]),b=N.useCallback(()=>h.current.onBlur({target:{value:Ne(o._formValues,r),name:r},type:Jn.BLUR}),[r,o._formValues]),_=N.useCallback(x=>{const S=Ne(o._fields,r);S&&S._f&&x&&(S._f.ref={focus:()=>ar(x.focus)&&x.focus(),select:()=>ar(x.select)&&x.select(),setCustomValidity:w=>ar(x.setCustomValidity)&&x.setCustomValidity(w),reportValidity:()=>ar(x.reportValidity)&&x.reportValidity()})},[o._fields,r]),y=N.useMemo(()=>({name:r,value:p,...Nr(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:g,onBlur:b,ref:_}),[r,n,f.disabled,g,b,_,p]);return N.useEffect(()=>{const x=o._options.shouldUnregister||s;o.register(r,{...m.current.rules,...Nr(m.current.disabled)?{disabled:m.current.disabled}:{}});const S=(w,I)=>{const T=Ne(o._fields,w);T&&T._f&&(T._f.mount=I)};if(S(r,!0),x){const w=Ot(Ne(o._options.defaultValues,r,m.current.defaultValue));yt(o._defaultValues,r,w),xt(Ne(o._formValues,r))&&yt(o._formValues,r,w)}return!u&&o.register(r),()=>{(u?x&&!o._state.action:x)?o.unregister(r):S(r,!1)}},[r,o,u,s]),N.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),N.useMemo(()=>({field:y,formState:f,fieldState:v}),[y,f,v])}const yq=e=>e.render(_q(e)),Ag=N.createContext(null);Ag.displayName="HookFormContext";const xq=()=>N.useContext(Ag),wq=e=>{const{children:t,watch:r,getValues:n,getFieldState:o,setError:s,clearErrors:i,setValue:l,setValues:u,trigger:d,formState:p,resetField:f,reset:m,handleSubmit:h,unregister:v,control:g,register:b,setFocus:_,subscribe:y}=e,x=N.useMemo(()=>({watch:r,getValues:n,getFieldState:o,setError:s,clearErrors:i,setValue:l,setValues:u,trigger:d,formState:p,resetField:f,reset:m,handleSubmit:h,unregister:v,control:g,register:b,setFocus:_,subscribe:y}),[i,g,p,o,n,h,b,m,f,s,_,l,u,y,d,v,r]);return N.createElement(Ag.Provider,{value:x},N.createElement(Tg.Provider,{value:x.control},t))};var Eq=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Xi=e=>Array.isArray(e)?e:[e],T_=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function jT(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],s=t[n];if(o&&jt(o)&&s){const i=jT(o,s);jt(i)&&(r[n]=i)}else e[n]&&(r[n]=s)}return r}var sr=e=>jt(e)&&!Object.keys(e).length,jg=e=>e.type==="file",hc=e=>{if(!Cg)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},OT=e=>e.type==="select-multiple",Og=e=>e.type==="radio",Sq=e=>Og(e)||Ua(e),Zd=e=>hc(e)&&e.isConnected;function Cq(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;){if(gr(e)){e=void 0;break}e=e[t[n]],n++}return e}function Pq(e){for(const t in e)if(e.hasOwnProperty(t)&&!xt(e[t]))return!1;return!0}function Lt(e,t){if(cr(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:qu(t)?[t]:Rg(t),n=r.length===1?e:Cq(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(jt(n)&&sr(n)||Array.isArray(n)&&Pq(n))&&Lt(e,r.slice(0,-1)),e}var Rq=e=>{for(const t in e)if(ar(e[t]))return!0;return!1};function NT(e){return Array.isArray(e)||jt(e)&&!Rq(e)}function Kf(e,t={}){for(const r in e){const n=e[r];NT(n)?(t[r]=Array.isArray(n)?[]:{},Kf(n,t[r])):xt(n)||(t[r]=!0)}return t}function Xf(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(r=>Xf(r));return t.some(r=>r!==void 0)?t:void 0}if(jt(e)){const t={};for(const r in e){const n=Xf(e[r]);xt(n)||(t[r]=n)}return Object.keys(t).length?t:void 0}}}function Fi(e,t,r){r||(r=Kf(t));for(const n in e){const o=e[n];if(NT(o))xt(t)||Gf(r[n])?r[n]=Kf(o,Array.isArray(o)?[]:{}):Fi(o,gr(t)?{}:t[n],r[n]);else{const s=t[n];r[n]=!Dr(o,s)}}return Xf(r)||{}}const I_={value:!1,isValid:!1},$_={value:!0,isValid:!0};var DT=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!xt(e[0].attributes.value)?xt(e[0].value)||e[0].value===""?$_:{value:e[0].value,isValid:!0}:$_:I_}return I_},kT=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>xt(e)?e:t?e===""?NaN:e&&+e:r&&cr(e)?new Date(e):n?n(e):e;const A_={isValid:!1,value:null};var MT=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,A_):A_;function j_(e){const t=e.ref;return jg(t)?t.files:Og(t)?MT(e.refs).value:OT(t)?[...t.selectedOptions].map(({value:r})=>r):Ua(t)?DT(e.refs).value:kT(xt(t.value)?e.ref.value:t.value,e)}var Tq=(e,t,r,n)=>{const o={};for(const s of e){const i=Ne(t,s);i&&yt(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},gc=e=>e instanceof RegExp,Ci=e=>xt(e)?e:gc(e)?e.source:jt(e)?gc(e.value)?e.value.source:e.value:e,O_=e=>({isOnSubmit:!e||e===on.onSubmit,isOnBlur:e===on.onBlur,isOnChange:e===on.onChange,isOnAll:e===on.all,isOnTouch:e===on.onTouched});const N_="AsyncFunction";var Iq=e=>!!e&&!!e.validate&&!!(ar(e.validate)&&e.validate.constructor.name===N_||jt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===N_)),$q=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),D_=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Yi=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=Ne(e,o);if(s){const{_f:i,...l}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!n)return!0;if(i.ref&&t(i.ref,i.name)&&!n)return!0;if(Yi(l,t))break}else if(jt(l)&&Yi(l,t))break}}};function k_(e,t,r){const n=Ne(e,r);if(n||qu(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=Ne(t,s),l=Ne(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(l&&l.type)return{name:s,error:l};if(l&&l.root&&l.root.type)return{name:`${s}.root`,error:l.root};o.pop()}return{name:r}}var Aq=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return sr(s)||n&&Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||on.all))},jq=(e,t,r)=>!e||!t||e===t||Xi(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Oq=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Nq=(e,t)=>!Pg(Ne(e,t)).length&&Lt(e,t),Dq=(e,t,r)=>{const n=Xi(Ne(e,r));return yt(n,$T,t[r]),yt(e,r,n),e};function M_(e,t,r="validate"){if(cr(e)||Array.isArray(e)&&e.every(cr)||Nr(e)&&!e)return{type:r,message:cr(e)?e:"",ref:t}}var us=e=>jt(e)&&!gc(e)?e:{value:e,message:""},L_=async(e,t,r,n,o,s)=>{const{ref:i,refs:l,required:u,maxLength:d,minLength:p,min:f,max:m,pattern:h,validate:v,name:g,valueAsNumber:b,mount:_}=e._f,y=Ne(r,g);if(!_||t.has(g))return{};const x=l?l[0]:i,S=k=>{o&&x.reportValidity&&(x.setCustomValidity(Nr(k)?"":k||""),x.reportValidity())},w={},I=Og(i),T=Ua(i),R=I||T,P=(b||jg(i))&&xt(i.value)&&xt(y)||hc(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length||b&&typeof y=="number"&&isNaN(y),$=Eq.bind(null,g,n,w),A=(k,D,z,X=tn.maxLength,V=tn.minLength)=>{const Y=k?D:z;w[g]={type:k?X:V,message:Y,ref:i,...$(k?X:V,Y)}};if(s?!Array.isArray(y)||!y.length:u&&(!R&&(P||gr(y))||Nr(y)&&!y||T&&!DT(l).isValid||I&&!MT(l).isValid)){const{value:k,message:D}=cr(u)?{value:!!u,message:u}:us(u);if(k&&(w[g]={type:tn.required,message:D,ref:x,...$(tn.required,D)},!n))return S(D),w}if(!P&&(!gr(f)||!gr(m))){let k,D;const z=us(m),X=us(f);if(!gr(y)&&!isNaN(y)){const V=i.valueAsNumber||y&&+y;gr(z.value)||(k=V>z.value),gr(X.value)||(D=V<X.value)}else{const V=i.valueAsDate||new Date(y),Y=H=>new Date(new Date().toDateString()+" "+H),U=i.type=="time",F=i.type=="week";cr(z.value)&&y&&(k=U?Y(y)>Y(z.value):F?y>z.value:V>new Date(z.value)),cr(X.value)&&y&&(D=U?Y(y)<Y(X.value):F?y<X.value:V<new Date(X.value))}if((k||D)&&(A(!!k,z.message,X.message,tn.max,tn.min),!n))return S(w[g].message),w}if((d||p)&&!P&&(cr(y)||s&&Array.isArray(y))){const k=us(d),D=us(p),z=!gr(k.value)&&y.length>+k.value,X=!gr(D.value)&&y.length<+D.value;if((z||X)&&(A(z,k.message,D.message),!n))return S(w[g].message),w}if(h&&!P&&cr(y)){const{value:k,message:D}=us(h);if(gc(k)&&!y.match(k)&&(w[g]={type:tn.pattern,message:D,ref:i,...$(tn.pattern,D)},!n))return S(D),w}if(v){if(ar(v)){const k=await v(y,r),D=M_(k,x);if(D&&(w[g]={...D,...$(tn.validate,D.message)},!n))return S(D.message),w}else if(jt(v)){let k={};for(const D in v){if(!sr(k)&&!n)break;const z=M_(await v[D](y,r),x,D);z&&(k={...z,...$(D,z.message)},S(z.message),n&&(w[g]=k))}if(!sr(k)&&(w[g]={ref:x,...k},!n))return w}}return S(!0),w};const kq={mode:on.onSubmit,reValidateMode:on.onChange,shouldFocusError:!0},LT={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function Mq(e={}){let t={...kq,...e},r={...Ot(LT),isLoading:ar(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},n={},o=jt(t.defaultValues)||jt(t.values)?Ot(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Ot(o),i={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},u,d=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={...p};let m={...f};const h={array:T_(),state:T_()},v=t.criteriaMode===on.all,g=j=>q=>{clearTimeout(d),d=setTimeout(j,q)},b=async j=>{if(!i.keepIsValid&&!t.disabled&&(f.isValid||m.isValid||j)){let q;t.resolver?(q=sr((await P()).errors),_()):q=await k({fields:n,onlyCheckValid:!0,eventType:Jn.VALID}),q!==r.isValid&&h.state.next({isValid:q})}},_=(j,q)=>{!t.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((j||Array.from(l.mount)).forEach(Q=>{Q&&(q?yt(r.validatingFields,Q,q):Lt(r.validatingFields,Q))}),h.state.next({validatingFields:r.validatingFields,isValidating:!sr(r.validatingFields)}))},y=()=>{r.dirtyFields=Fi(o,s)},x=(j,q=[],Q,le,de=!0,ce=!0)=>{if(le&&Q&&!t.disabled){if(i.action=!0,ce&&Array.isArray(Ne(n,j))){const fe=Q(Ne(n,j),le.argA,le.argB);de&&yt(n,j,fe)}if(ce&&Array.isArray(Ne(r.errors,j))){const fe=Q(Ne(r.errors,j),le.argA,le.argB);de&&yt(r.errors,j,fe),Nq(r.errors,j)}if((f.touchedFields||m.touchedFields)&&ce&&Array.isArray(Ne(r.touchedFields,j))){const fe=Q(Ne(r.touchedFields,j),le.argA,le.argB);de&&yt(r.touchedFields,j,fe)}(f.dirtyFields||m.dirtyFields)&&y(),h.state.next({name:j,isDirty:z(j,q),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else yt(s,j,q)},S=(j,q)=>{yt(r.errors,j,q),h.state.next({errors:r.errors})},w=j=>{r.errors=j,h.state.next({errors:r.errors,isValid:!1})},I=(j,q,Q,le)=>{const de=Ne(n,j);if(de){const ce=xt(Ne(s,j)),fe=Ne(s,j,xt(Q)?Ne(o,j):Q);xt(fe)||le&&le.defaultChecked||q?yt(s,j,q?fe:j_(de._f)):Y(j,fe),i.mount&&!i.action&&(b(),ce&&r.isDirty&&(f.isDirty||m.isDirty)&&(z()||(r.isDirty=!1,h.state.next({...r}))))}},T=(j,q,Q,le,de)=>{let ce=!1,fe=!1;const ue={name:j};if(!t.disabled){if(!Q||le){(f.isDirty||m.isDirty)&&(fe=r.isDirty,r.isDirty=ue.isDirty=z(),ce=fe!==ue.isDirty);const ye=Dr(Ne(o,j),q);fe=!!Ne(r.dirtyFields,j),ye?Lt(r.dirtyFields,j):yt(r.dirtyFields,j,!0),ue.dirtyFields=r.dirtyFields,ce=ce||(f.dirtyFields||m.dirtyFields)&&fe!==!ye}if(Q){const ye=Ne(r.touchedFields,j);ye||(yt(r.touchedFields,j,Q),ue.touchedFields=r.touchedFields,ce=ce||(f.touchedFields||m.touchedFields)&&ye!==Q)}ce&&de&&h.state.next(ue)}return ce?ue:{}},R=(j,q,Q,le)=>{const de=Ne(r.errors,j),ce=(f.isValid||m.isValid)&&Nr(q)&&r.isValid!==q;if(t.delayError&&Q?(u=g(()=>S(j,Q)),u(t.delayError)):(clearTimeout(d),u=null,Q?yt(r.errors,j,Q):Lt(r.errors,j)),(Q?!Dr(de,Q):de)||!sr(le)||ce){const fe={...le,...ce&&Nr(q)?{isValid:q}:{},errors:r.errors,name:j};r={...r,...fe},h.state.next(fe)}},P=async j=>(_(j,!0),await t.resolver(s,t.context,Tq(j||l.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),$=async j=>{const{errors:q}=await P(j);if(_(j),j)for(const Q of j){const le=Ne(q,Q);le?yt(r.errors,Q,le):Lt(r.errors,Q)}else r.errors=q;return q},A=async({name:j,eventType:q})=>{if(e.validate){const Q=await e.validate({formValues:s,formState:r,name:j,eventType:q});if(jt(Q))for(const le in Q)Q[le]&&B(`${Jd}.${le}`,{message:cr(Q.message)?Q.message:"",type:tn.validate});else cr(Q)||!Q?B(Jd,{message:Q||"",type:tn.validate}):W(Jd);return Q}return!0},k=async({fields:j,onlyCheckValid:q,name:Q,eventType:le,context:de={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(de.runRootValidation=!0,!await A({name:Q,eventType:le})&&(de.valid=!1,q)))return de.valid;for(const ce in j){const fe=j[ce];if(fe){const{_f:ue,...ye}=fe;if(ue){const Be=l.array.has(ue.name),Ae=fe._f&&Iq(fe._f);Ae&&f.validatingFields&&_([ue.name],!0);const Ee=await L_(fe,l.disabled,s,v,t.shouldUseNativeValidation&&!q,Be);if(Ae&&f.validatingFields&&_([ue.name]),Ee[ue.name]&&(de.valid=!1,q)||(!q&&(Ne(Ee,ue.name)?Be?Dq(r.errors,Ee,ue.name):yt(r.errors,ue.name,Ee[ue.name]):Lt(r.errors,ue.name)),e.shouldUseNativeValidation&&Ee[ue.name]))break}!sr(ye)&&await k({context:de,onlyCheckValid:q,fields:ye,name:ce,eventType:le})}}return de.valid},D=()=>{for(const j of l.unMount){const q=Ne(n,j);q&&(q._f.refs?q._f.refs.every(Q=>!Zd(Q)):!Zd(q._f.ref))&&se(j)}l.unMount=new Set},z=(j,q)=>!t.disabled&&(j&&q&&yt(s,j,q),!Dr(G(),o)),X=(j,q,Q)=>qf(j,l,{...i.mount?s:xt(q)?o:cr(j)?{[j]:q}:q},Q,q),V=j=>Pg(Ne(i.mount?s:o,j,t.shouldUnregister?Ne(o,j,[]):[])),Y=(j,q,Q={})=>{const le=Ne(n,j);let de=q;if(le){const ce=le._f;ce&&(!ce.disabled&&yt(s,j,kT(q,ce)),de=hc(ce.ref)&&gr(q)?"":q,OT(ce.ref)?[...ce.ref.options].forEach(fe=>fe.selected=de.includes(fe.value)):ce.refs?Ua(ce.ref)?ce.refs.forEach(fe=>{(!fe.defaultChecked||!fe.disabled)&&(Array.isArray(de)?fe.checked=!!de.find(ue=>ue===fe.value):fe.checked=de===fe.value||!!de)}):ce.refs.forEach(fe=>fe.checked=fe.value===de):jg(ce.ref)?ce.ref.value="":(ce.ref.value=de,ce.ref.type||h.state.next({name:j,values:Ot(s)})))}(Q.shouldDirty||Q.shouldTouch)&&T(j,de,Q.shouldTouch,Q.shouldDirty,!0),Q.shouldValidate&&M(j)},U=(j,q,Q)=>{for(const le in q){if(!q.hasOwnProperty(le))return;const de=q[le],ce=j+"."+le,fe=Ne(n,ce);(l.array.has(j)||jt(de)||fe&&!fe._f)&&!To(de)?U(ce,de,Q):Y(ce,de,Q)}},F=(j,q,Q={})=>{const le=Ne(n,j),de=l.array.has(j),ce=Ot(q),fe=Ne(s,j),ue=Dr(fe,ce);if(yt(s,j,ce),de)h.array.next({name:j,values:Ot(s)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&Q.shouldDirty&&(y(),h.state.next({name:j,dirtyFields:r.dirtyFields,isDirty:z(j,ce)}));else{const ye=Array.isArray(ce)&&!ce.length||sr(ce);!le||le._f||gr(ce)||ye?Y(j,ce,Q):U(j,ce,Q)}if(!ue){const ye=D_(j,l);h.state.next({...ye&&r,name:i.mount||ye?j:void 0,values:Ot(s)})}},H=j=>{const q=ar(j)?j(s):j;Dr(s,q)||(s={...s,...q},h.state.next({...r,values:s}))},ee=async j=>{i.mount=!0;const q=j.target;let Q=q.name,le=!0;const de=Ne(n,Q),ce=ye=>{le=Number.isNaN(ye)||To(ye)&&isNaN(ye.getTime())||Dr(ye,Ne(s,Q,ye))},fe=O_(t.mode),ue=O_(t.reValidateMode);if(de){let ye,Be;const Ae=q.type?j_(de._f):TT(j),Ee=j.type===Jn.BLUR||j.type===Jn.FOCUS_OUT,lt=!$q(de._f)&&!e.validate&&!t.resolver&&!Ne(r.errors,Q)&&!de._f.deps||Oq(Ee,Ne(r.touchedFields,Q),r.isSubmitted,ue,fe),ht=D_(Q,l,Ee);yt(s,Q,Ae),Ee?(!q||!q.readOnly)&&(de._f.onBlur&&de._f.onBlur(j),u&&u(0)):de._f.onChange&&de._f.onChange(j);const dt=T(Q,Ae,Ee),mt=!sr(dt)||ht;if(!Ee&&h.state.next({name:Q,type:j.type,values:Ot(s)}),lt)return(f.isValid||m.isValid)&&(t.mode==="onBlur"?Ee&&b():Ee||b()),mt&&h.state.next({name:Q,...ht?{}:dt});if(!t.resolver&&e.validate&&await A({name:Q,eventType:j.type}),!Ee&&ht&&h.state.next({...r}),t.resolver){const{errors:ft}=await P([Q]);if(_([Q]),ce(Ae),le){const vt=k_(r.errors,n,Q),ze=k_(ft,n,vt.name||Q);ye=ze.error,Q=ze.name,Be=sr(ft)}}else _([Q],!0),ye=(await L_(de,l.disabled,s,v,t.shouldUseNativeValidation))[Q],_([Q]),ce(Ae),le&&(ye?Be=!1:(f.isValid||m.isValid)&&(Be=await k({fields:n,onlyCheckValid:!0,name:Q,eventType:j.type})));le&&(de._f.deps&&(!Array.isArray(de._f.deps)||de._f.deps.length>0)&&M(de._f.deps),R(Q,Be,ye,dt))}},O=(j,q)=>{if(Ne(r.errors,q)&&j.focus)return j.focus(),1},M=async(j,q={})=>{let Q,le;const de=Xi(j);if(t.resolver){const ce=await $(xt(j)?j:de);Q=sr(ce),le=j?!de.some(fe=>Ne(ce,fe)):Q}else j?(le=(await Promise.all(de.map(async ce=>{const fe=Ne(n,ce);return await k({fields:fe&&fe._f?{[ce]:fe}:fe,eventType:Jn.TRIGGER})}))).every(Boolean),!(!le&&!r.isValid)&&b()):le=Q=await k({fields:n,name:j,eventType:Jn.TRIGGER});return h.state.next({...!cr(j)||(f.isValid||m.isValid)&&Q!==r.isValid?{}:{name:j},...t.resolver||!j?{isValid:Q}:{},errors:r.errors}),q.shouldFocus&&!le&&Yi(n,O,j?de:l.mount),le},G=(j,q)=>{let Q={...i.mount?s:o};return q&&(Q=jT(q.dirtyFields?r.dirtyFields:r.touchedFields,Q)),xt(j)?Q:cr(j)?Ne(Q,j):j.map(le=>Ne(Q,le))},L=(j,q)=>({invalid:!!Ne((q||r).errors,j),isDirty:!!Ne((q||r).dirtyFields,j),error:Ne((q||r).errors,j),isValidating:!!Ne(r.validatingFields,j),isTouched:!!Ne((q||r).touchedFields,j)}),W=j=>{const q=j?Xi(j):void 0;q==null||q.forEach(Q=>Lt(r.errors,Q)),q?q.forEach(Q=>{h.state.next({name:Q,errors:r.errors})}):h.state.next({errors:{}})},B=(j,q,Q)=>{const le=(Ne(n,j,{_f:{}})._f||{}).ref,de=Ne(r.errors,j)||{},{ref:ce,message:fe,type:ue,...ye}=de;yt(r.errors,j,{...ye,...q,ref:le}),h.state.next({name:j,errors:r.errors,isValid:!1}),Q&&Q.shouldFocus&&le&&le.focus&&le.focus()},J=(j,q)=>ar(j)?h.state.subscribe({next:Q=>"values"in Q&&j(Q.values||X(void 0,q),Q)}):X(j,q,!0),K=j=>h.state.subscribe({next:q=>{if(jq(j.name,q.name,j.exact)&&Aq(q,j.formState||f,Ye,j.reRenderRoot)){const Q={...s};j.callback({values:Q,...r,...q,defaultValues:o})}}}).unsubscribe,re=j=>(i.mount=!0,m={...m,...j.formState},K({...j,formState:{...p,...j.formState}})),se=(j,q={})=>{for(const Q of j?Xi(j):l.mount)l.mount.delete(Q),l.array.delete(Q),q.keepValue||(Lt(n,Q),Lt(s,Q)),!q.keepError&&Lt(r.errors,Q),!q.keepDirty&&Lt(r.dirtyFields,Q),!q.keepTouched&&Lt(r.touchedFields,Q),!q.keepIsValidating&&Lt(r.validatingFields,Q),!t.shouldUnregister&&!q.keepDefaultValue&&Lt(o,Q);h.state.next({values:Ot(s)}),h.state.next({...r,...q.keepDirty?{isDirty:z()}:{}}),!q.keepIsValid&&b()},Z=({disabled:j,name:q})=>{if(Nr(j)&&i.mount||j||l.disabled.has(q)){const de=l.disabled.has(q)!==!!j;j?l.disabled.add(q):l.disabled.delete(q),de&&i.mount&&!i.action&&b()}},ne=(j,q={})=>{let Q=Ne(n,j);const le=Nr(q.disabled)||Nr(t.disabled),de=!l.registerName.has(j)&&Q&&Q._f&&!Q._f.mount;return yt(n,j,{...Q||{},_f:{...Q&&Q._f?Q._f:{ref:{name:j}},name:j,mount:!0,...q}}),l.mount.add(j),Q&&!de?Z({disabled:Nr(q.disabled)?q.disabled:t.disabled,name:j}):I(j,!0,q.value),{...le?{disabled:q.disabled||t.disabled}:{},...t.progressive?{required:!!q.required,min:Ci(q.min),max:Ci(q.max),minLength:Ci(q.minLength),maxLength:Ci(q.maxLength),pattern:Ci(q.pattern)}:{},name:j,onChange:ee,onBlur:ee,ref:ce=>{if(ce){l.registerName.add(j),ne(j,q),l.registerName.delete(j),Q=Ne(n,j);const fe=xt(ce.value)&&ce.querySelectorAll&&ce.querySelectorAll("input,select,textarea")[0]||ce,ue=Sq(fe),ye=Q._f.refs||[];if(ue?ye.find(Be=>Be===fe):fe===Q._f.ref)return;yt(n,j,{_f:{...Q._f,...ue?{refs:[...ye.filter(Zd),fe,...Array.isArray(Ne(o,j))?[{}]:[]],ref:{type:fe.type,name:j}}:{ref:fe}}}),I(j,!1,void 0,fe)}else Q=Ne(n,j,{}),Q._f&&(Q._f.mount=!1),(t.shouldUnregister||q.shouldUnregister)&&!(IT(l.array,j)&&i.action)&&l.unMount.add(j)}}},ie=()=>t.shouldFocusError&&Yi(n,O,l.mount),he=j=>{Nr(j)&&(h.state.next({disabled:j}),Yi(n,(q,Q)=>{const le=Ne(n,Q);le&&(q.disabled=le._f.disabled||j,Array.isArray(le._f.refs)&&le._f.refs.forEach(de=>{de.disabled=le._f.disabled||j}))},0,!1))},me=(j,q)=>async Q=>{let le;Q&&(Q.preventDefault&&Q.preventDefault(),Q.persist&&Q.persist());let de=Ot(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:ce,values:fe}=await P();_(),r.errors=ce,de=Ot(fe)}else await k({fields:n,eventType:Jn.SUBMIT});if(l.disabled.size)for(const ce of l.disabled)Lt(de,ce);if(Lt(r.errors,$T),sr(r.errors)){h.state.next({errors:{}});try{await j(de,Q)}catch(ce){le=ce}}else q&&await q({...r.errors},Q),ie(),setTimeout(ie);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:sr(r.errors)&&!le,submitCount:r.submitCount+1,errors:r.errors}),le)throw le},Pe=(j,q={})=>{Ne(n,j)&&(xt(q.defaultValue)?F(j,Ot(Ne(o,j))):(F(j,q.defaultValue),yt(o,j,Ot(q.defaultValue))),q.keepTouched||Lt(r.touchedFields,j),q.keepDirty||(Lt(r.dirtyFields,j),r.isDirty=q.defaultValue?z(j,Ot(Ne(o,j))):z()),q.keepError||(Lt(r.errors,j),f.isValid&&b()),h.state.next({...r}))},Se=(j,q={})=>{const Q=j?Ot(j):o,le=Ot(Q),de=sr(j),ce=de?o:le;if(q.keepDefaultValues||(o=Q),!q.keepValues){if(q.keepDirtyValues){const fe=new Set([...l.mount,...Object.keys(Fi(o,s))]);for(const ue of Array.from(fe)){const ye=Ne(r.dirtyFields,ue),Be=Ne(s,ue),Ae=Ne(ce,ue);ye&&!xt(Be)?yt(ce,ue,Be):!ye&&!xt(Ae)&&F(ue,Ae)}}else{if(Cg&&xt(j))for(const fe of l.mount){const ue=Ne(n,fe);if(ue&&ue._f){const ye=Array.isArray(ue._f.refs)?ue._f.refs[0]:ue._f.ref;if(hc(ye)){const Be=ye.closest("form");if(Be){Be.reset();break}}}}if(q.keepFieldsRef)for(const fe of l.mount)F(fe,Ne(ce,fe));else n={}}s=t.shouldUnregister?q.keepDefaultValues?Ot(o):{}:Ot(ce),h.array.next({values:{...ce}}),h.state.next({values:{...ce}})}l={mount:q.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!q.keepIsValid||!!q.keepDirtyValues||!t.shouldUnregister&&!sr(ce),i.watch=!!t.shouldUnregister,i.keepIsValid=!!q.keepIsValid,i.action=!1,q.keepErrors||(r.errors={}),h.state.next({submitCount:q.keepSubmitCount?r.submitCount:0,isDirty:de?!1:q.keepDirty?r.isDirty:!!(q.keepDefaultValues&&!Dr(j,o)),isSubmitted:q.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:de?{}:q.keepDirtyValues?q.keepDefaultValues&&s?Fi(o,s):r.dirtyFields:q.keepDefaultValues&&j?Fi(o,j):q.keepDirty?r.dirtyFields:{},touchedFields:q.keepTouched?r.touchedFields:{},errors:q.keepErrors?r.errors:{},isSubmitSuccessful:q.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ce=(j,q)=>Se(ar(j)?j(s):j,{...t.resetOptions,...q}),Ze=(j,q={})=>{const Q=Ne(n,j),le=Q&&Q._f;if(le){const de=le.refs?le.refs[0]:le.ref;de.focus&&setTimeout(()=>{de.focus(),q.shouldSelect&&ar(de.select)&&de.select()})}},Ye=j=>{r={...r,...j}},be={control:{register:ne,unregister:se,getFieldState:L,handleSubmit:me,setError:B,_subscribe:K,_runSchema:P,_updateIsValidating:_,_focusError:ie,_getWatch:X,_getDirty:z,_setValid:b,_setFieldArray:x,_setDisabledField:Z,_setErrors:w,_getFieldArray:V,_reset:Se,_resetDefaultValues:()=>ar(t.defaultValues)&&t.defaultValues().then(j=>{Ce(j,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:D,_disableForm:he,_subjects:h,_proxyFormState:f,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(j){i=j},get _defaultValues(){return o},get _names(){return l},set _names(j){l=j},get _formState(){return r},get _options(){return t},set _options(j){t={...t,...j}}},subscribe:re,trigger:M,register:ne,handleSubmit:me,watch:J,setValue:F,setValues:H,getValues:G,reset:Ce,resetField:Pe,clearErrors:W,unregister:se,setError:B,setFocus:Ze,getFieldState:L};return{...be,formControl:be}}function Hre(e={}){const t=N.useRef(void 0),r=N.useRef(void 0),[n,o]=N.useState(()=>({...Ot(LT),isLoading:ar(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ar(e.defaultValues)?void 0:e.defaultValues}));if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!ar(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...l}=Mq(e);t.current={...l,formState:n}}const s=t.current.control;return s._options=e,$g(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),s._formState.isReady=!0,i},[s]),N.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),N.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),N.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),N.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),N.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),N.useEffect(()=>{var i;e.values&&!Dr(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((i=s._options.resetOptions)===null||i===void 0)&&i.keepIsValid||s._setValid(),r.current=e.values,o(l=>({...l}))):s._resetDefaultValues()},[s,e.values]),N.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=N.useMemo(()=>AT(n,s),[s,n]),t.current}const Ure=wq,zT=a.createContext({});function Wre({...e}){return c.jsx(zT.Provider,{value:{name:e.name},children:c.jsx(yq,{...e})})}const FT=a.createContext({}),Gu=()=>{const e=a.useContext(zT),t=a.useContext(FT),{getFieldState:r,formState:n}=xq(),o=r(e.name,n);if(!e)throw new Error("useFormField must be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},Lq=a.forwardRef(({className:e,...t},r)=>{const n=a.useId();return c.jsx(FT.Provider,{value:{id:n},children:c.jsx("div",{ref:r,className:ve("space-y-2",e),...t})})});Lq.displayName="FormItem";const zq=a.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:o}=Gu();return c.jsx(kP,{ref:r,className:ve(n&&"text-error",e),htmlFor:o,...t})});zq.displayName="FormLabel";const Fq=a.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:o,formMessageId:s}=Gu();return c.jsx(vS,{ref:t,id:n,"aria-describedby":r?`${o} ${s}`:`${o}`,"aria-invalid":!!r,...e})});Fq.displayName="FormControl";const Vq=a.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Gu();return c.jsx("p",{ref:r,id:n,className:ve("text-sm text-text-muted",e),...t})});Vq.displayName="FormDescription";const Bq=a.forwardRef(({className:e,children:t,...r},n)=>{const{error:o,formMessageId:s}=Gu(),i=o?String((o==null?void 0:o.message)??""):t;return i?c.jsx("p",{ref:n,id:s,className:ve("text-sm font-medium text-error",e),...r,children:i}):null});Bq.displayName="FormMessage";const Hq=a.forwardRef(({option:e,onDetailsClick:t,onOrderClick:r,className:n},o)=>{var u,d;const{t:s}=oo(),i=((u=e.destination)==null?void 0:u.trim())||"—",l=(d=e.routeLabel)==null?void 0:d.trim();return c.jsx(IS,{ref:o,className:ve("h-full hover:shadow-md hover:border-primary/40 transition-all",n),children:c.jsx($S,{className:"pt-5",children:c.jsxs(Ts,{gap:3,children:[l?c.jsx(TS,{variant:"neutral",className:"self-start",children:l}):null,c.jsx(Po,{weight:"semibold",className:"text-lg leading-tight",children:i}),c.jsx(LP,{value:e.totalCost??0,currency:"RUB",size:"lg",emphasis:"default"}),c.jsxs(PT,{gap:2,wrap:!0,children:[c.jsxs(Ws,{type:"button",size:"sm",variant:"outline",onClick:()=>t(e),children:[s("bestOffers.details","Подробнее"),c.jsx(Bw,{className:"h-3.5 w-3.5"})]}),r?c.jsx(Ws,{type:"button",size:"sm",onClick:()=>r(e),children:s("bestOffers.order","Оформить")}):null]})]})})})});Hq.displayName="BestOffersCard";const qre=["APPLICATION_STATUS_CHANGED","SHIPMENT_MILESTONE_CREATED","APPLICATION_FILE_UPLOADED","INVOICE_ISSUED","INVOICE_PAID","INVOICE_OVERDUE","INVOICE_DOCUMENT_UPLOADED","CONTRACT_SENT"],Gre=["EMAIL","TELEGRAM","WEB_PUSH"],Uq={APPLICATION_STATUS_CHANGED:"Изменение статуса заявки",SHIPMENT_MILESTONE_CREATED:"Новое событие трекинга",APPLICATION_FILE_UPLOADED:"Новый файл по заявке",INVOICE_ISSUED:"Выставлен счёт",INVOICE_PAID:"Подтверждена оплата",INVOICE_OVERDUE:"Просроченный счёт",INVOICE_DOCUMENT_UPLOADED:"PDF документ счёта",CONTRACT_SENT:"Договор на подписание"},Wq={APPLICATION_STATUS_CHANGED:"Когда менеджер меняет статус заявки в работе (NEW → IN_PROGRESS → COMPLETED и т.д.)",SHIPMENT_MILESTONE_CREATED:"Когда менеджер добавляет новое событие на пути груза (забран, прибыл в порт, и т.д.)",APPLICATION_FILE_UPLOADED:"Когда к заявке прикрепляют документ (CMR, накладная, фото отгрузки)",INVOICE_ISSUED:"Когда выставлен счёт на оплату",INVOICE_PAID:"Подтверждение получения оплаты",INVOICE_OVERDUE:"Когда срок оплаты счёта прошёл",INVOICE_DOCUMENT_UPLOADED:"Когда к счёту прикреплён или заменён PDF",CONTRACT_SENT:"Когда договор готов и отправлен на подписание"},Kre=["CUSTOMS_STATUS_CHANGED","CUSTOMS_DOCUMENT_REQUESTED","CUSTOMS_DOCUMENT_RECEIVED"],qq={CUSTOMS_STATUS_CHANGED:"Смена статуса поставки",CUSTOMS_DOCUMENT_REQUESTED:"Запрос документа поставщику",CUSTOMS_DOCUMENT_RECEIVED:"Документ получен от поставщика"},Gq={CUSTOMS_STATUS_CHANGED:"Когда поставка меняет этап: в пути → порт → СВХ → оформление ДТ → выпуск",CUSTOMS_DOCUMENT_REQUESTED:"Когда система запрашивает у поставщика недостающий документ (инвойс, упаковочный и т.д.)",CUSTOMS_DOCUMENT_RECEIVED:"Когда поставщик загрузил запрошенный документ в источнике через свой портал"},Kq={...Uq,...qq},Xre={...Wq,...Gq},Yre={EMAIL:"Email",TELEGRAM:"Telegram",WEB_PUSH:"Браузер"},Jre={list(){return je.get("/me/notification-preferences").then(e=>e.data)},set(e,t,r){return je.put("/me/notification-preferences",{eventCode:e,channel:t,enabled:r}).then(n=>n.data)},getDigestMode(){return je.get("/me/notification-preferences/digest-mode").then(e=>e.data)},setDigestMode(e){return je.put("/me/notification-preferences/digest-mode",{mode:e}).then(t=>t.data)},testSend(e){return je.post(`/me/notification-preferences/test-send?channel=${e}`).then(t=>t.data)}};function z_(e){return Kq[e]??e}function Xq(e,t=Date.now()){const r=new Date(e).getTime();if(Number.isNaN(r))return"";const n=Math.floor((t-r)/6e4);if(n<1)return"только что";if(n<60)return`${n} мин назад`;const o=Math.floor(n/60);if(o<24)return`${o} ч назад`;const s=Math.floor(o/24);return s===1?"вчера":`${s} дн назад`}const F_=[{id:1,eventCode:"APPLICATION_STATUS_CHANGED",subject:"Заявка APP-12345 — статус «В работе»",body:null,relatedEntityType:"Application",relatedEntityId:12345,sentAt:new Date(Date.now()-30*6e4).toISOString(),readAt:null},{id:2,eventCode:"SHIPMENT_MILESTONE_CREATED",subject:"APP-12340 — поднят на борт",body:null,relatedEntityType:"Application",relatedEntityId:12340,sentAt:new Date(Date.now()-4*36e5).toISOString(),readAt:null}];function Zre({inboxHref:e="/notifications",prefsHref:t="/dashboard/notifications",className:r}){var d;const{isAuthenticated:n}=Aa(),o=av({queryKey:["m-bell-unread"],queryFn:()=>Rs.unreadCount(),enabled:n,staleTime:3e4}),s=av({queryKey:["m-bell-preview"],queryFn:()=>Rs.list({page:0,size:5}),enabled:n,staleTime:6e4}),i=n?((d=o.data)==null?void 0:d.unread)??0:F_.filter(p=>p.readAt==null).length,l=a.useMemo(()=>n?s.data??[]:F_,[n,s.data]),u=i>0;return c.jsxs(gC,{children:[c.jsx(vC,{asChild:!0,children:c.jsxs(Ws,{variant:"ghost",size:"sm",className:`relative ${r??""}`.trim(),"aria-label":u?`Уведомления: ${i} непрочитанных`:"Уведомления","data-testid":"m-bell-trigger","data-unread":u?"true":"false",children:[u?c.jsx(aF,{className:"h-4 w-4"}):c.jsx(zb,{className:"h-4 w-4"}),u?c.jsx("span",{className:"absolute -top-0.5 -right-0.5 min-w-[1rem] h-4 px-1 rounded-full bg-primary text-primary-foreground text-[10px] font-semibold leading-none flex items-center justify-center","data-testid":"m-bell-unread-count",children:i>9?"9+":i}):null]})}),c.jsx(ng,{align:"end",className:"w-80 p-0","data-testid":"m-bell-popover",children:c.jsxs(Ts,{gap:0,children:[c.jsx("div",{className:"px-4 py-3 border-b border-border",children:c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx(Po,{weight:"medium",className:"text-sm",children:"Уведомления"}),u?c.jsxs(TS,{variant:"info",className:"text-xs",children:[i," новых"]}):null]})}),n?l.length===0?c.jsxs(Ts,{gap:2,align:"center",className:"px-4 py-6","data-testid":"m-bell-empty",children:[c.jsx(zb,{className:"h-6 w-6 text-text-muted opacity-50"}),c.jsx(Po,{variant:"muted",className:"text-xs",children:"Уведомлений пока нет."})]}):c.jsx("div",{className:"max-h-80 overflow-y-auto","data-testid":"m-bell-list",children:l.map(p=>{const f=p.readAt==null;return c.jsx(Nt,{to:e,className:`block px-4 py-3 text-sm border-b border-border last:border-b-0 hover:bg-bg-surface transition-colors ${f?"bg-primary/5":""}`,"data-testid":"m-bell-item","data-notif-id":p.id,"data-unread":f?"true":"false",children:c.jsxs(Ts,{gap:1,children:[c.jsx(Po,{weight:f?"semibold":"medium",className:"text-xs",children:p.subject||z_(p.eventCode)}),c.jsxs(Po,{variant:"muted",className:"text-xs",children:[z_(p.eventCode)," · ",Xq(p.sentAt)]})]})},p.id)})}):c.jsxs(Ts,{gap:2,align:"center",className:"px-4 py-6","data-testid":"m-bell-anon-state",children:[c.jsx(CF,{className:"h-6 w-6 text-text-muted"}),c.jsx(Po,{variant:"muted",className:"text-xs text-center",children:"Войдите чтобы видеть свои уведомления."}),c.jsx(Ws,{asChild:!0,variant:"default",size:"sm",children:c.jsx(Nt,{to:"/login",children:"Войти"})})]}),c.jsx(sT,{}),c.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[c.jsx(Nt,{to:t,className:"text-xs text-text-muted hover:text-text underline","data-testid":"m-bell-prefs-link",children:"Настроить"}),c.jsxs(Nt,{to:e,className:"text-xs font-medium text-text inline-flex items-center gap-1","data-testid":"m-bell-inbox-link",children:["Все уведомления",c.jsx(Bw,{className:"h-3 w-3"})]})]})]})})]})}const V_="exit_intent_shown",Yq=["/","/search-results","/dostavka"],Jq=["/landing/","/marshrut/","/industry/","/vs/","/dostavka/"];function B_(e){return Yq.includes(e)?!0:Jq.some(t=>e.startsWith(t))}function Zq(){const{t:e}=oo(),{pathname:t}=Fr(),[r,n]=a.useState(!1);function o(){B_(t)&&(sessionStorage.getItem(V_)||(sessionStorage.setItem(V_,"1"),n(!0)))}return a.useEffect(()=>{if(!B_(t))return;function s(i){i.clientY<=20&&o()}return document.addEventListener("mouseleave",s),()=>document.removeEventListener("mouseleave",s)},[t]),r?c.jsx("div",{role:"dialog","aria-modal":"true","aria-label":e("exitIntent.aria","Не уходите"),className:ve("fixed inset-0 z-[9999] flex items-center justify-center p-4","bg-black/50 backdrop-blur-sm"),onClick:s=>{s.target===s.currentTarget&&n(!1)},children:c.jsxs("div",{className:"relative w-full max-w-md rounded-2xl bg-white dark:bg-gray-900 shadow-2xl p-8 text-center",children:[c.jsx("button",{onClick:()=>n(!1),className:"absolute top-3 right-3 p-1 rounded-full text-gray-400 hover:text-gray-700 hover:bg-gray-100 transition-colors","aria-label":e("exitIntent.closeAria","Закрыть"),children:c.jsx(Dh,{className:"w-5 h-5"})}),c.jsx("div",{className:"text-4xl mb-3",children:"🚢"}),c.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2",children:e("exitIntent.title","Не уходите!")}),c.jsxs("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:[e("exitIntent.bodyLine1","Бесплатный расчёт стоимости доставки за 30 секунд —"),c.jsx("br",{}),e("exitIntent.bodyLine2","без регистрации и звонков менеджера.")]}),c.jsx(Ws,{asChild:!0,size:"lg",className:"w-full",children:c.jsx(Nt,{to:"/calculator",onClick:()=>n(!1),children:e("exitIntent.cta","Рассчитать бесплатно →")})}),c.jsx("p",{className:"mt-3 text-xs text-gray-400",children:e("exitIntent.footnote","60+ перевозчиков · Китай, Индия, Турция · за 5 секунд")})]})}):null}function H_({children:e}){const{isAuthenticated:t}=Aa(),r=Fr();if(!t){const n=`${r.pathname}${r.search}`;return c.jsx(Ut,{to:`/login?redirect=${encodeURIComponent(n)}`,replace:!0})}return c.jsx(c.Fragment,{children:e})}const VT={fetch:globalThis.fetch?globalThis.fetch.bind(globalThis):void 0,SubtleCrypto:globalThis.crypto?globalThis.crypto.subtle:void 0,EventSource:globalThis.EventSource};function Qq(){return VT}function Qd(e){let t=2166136261;const r=e.length;for(let n=0;n<r;n++)t^=e.charCodeAt(n),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t>>>0}function Ku(e,t,r){return r===2?Qd(Qd(e+t)+"")%1e4/1e4:r===1?Qd(t+e)%1e3/1e3:null}function e8(e){return e<=0?[]:new Array(e).fill(1/e)}function Ng(e,t){return e>=t[0]&&e<t[1]}function t8(e,t){const r=Ku("__"+t[0],e,1);return r===null?!1:r>=t[1]&&r<t[2]}function r8(e,t){for(let r=0;r<t.length;r++)if(Ng(e,t[r]))return r;return-1}function BT(e){try{const t=e.replace(/([^\\])\//g,"$1\\/");return new RegExp(t)}catch(t){console.error(t);return}}function HT(e,t){if(!t.length)return!1;let r=!1,n=!1;for(let o=0;o<t.length;o++){const s=s8(e,t[o].type,t[o].pattern);if(t[o].include===!1){if(s)return!1}else r=!0,s&&(n=!0)}return n||!r}function n8(e,t,r){try{let n=t.replace(/[*.+?^${}()|[\]\\]/g,"\\$&").replace(/_____/g,".*");return r&&(n="\\/?"+n.replace(/(^\/|\/$)/g,"")+"\\/?"),new RegExp("^"+n+"$","i").test(e)}catch{return!1}}function o8(e,t){try{const r=new URL(t.replace(/^([^:/?]*)\./i,"https://$1.").replace(/\*/g,"_____"),"https://_____"),n=[[e.host,r.host,!1],[e.pathname,r.pathname,!0]];return r.hash&&n.push([e.hash,r.hash,!1]),r.searchParams.forEach((o,s)=>{n.push([e.searchParams.get(s)||"",o,!1])}),!n.some(o=>!n8(o[0],o[1],o[2]))}catch{return!1}}function s8(e,t,r){try{const n=new URL(e,"https://_");if(t==="regex"){const o=BT(r);return o?o.test(n.href)||o.test(n.href.substring(n.origin.length)):!1}else if(t==="simple")return o8(n,r);return!1}catch{return!1}}function i8(e,t,r){t=t===void 0?1:t,t<0?t=0:t>1&&(t=1);const n=e8(e);r=r||n,r.length!==e&&(r=n);const o=r.reduce((i,l)=>l+i,0);(o<.99||o>1.01)&&(r=n);let s=0;return r.map(i=>{const l=s;return s+=i,[l,l+t*i]})}function a8(e,t,r){if(!t)return null;const n=t.split("?")[1];if(!n)return null;const o=n.replace(/#.*/,"").split("&").map(s=>s.split("=",2)).filter(([s])=>s===e).map(([,s])=>parseInt(s));return o.length>0&&o[0]>=0&&o[0]<r?o[0]:null}function l8(e){try{return e()}catch(t){return console.error(t),!1}}const ep=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0));async function Ji(e,t,r){if(t=t||"",r=r||globalThis.crypto&&globalThis.crypto.subtle||VT.SubtleCrypto,!r)throw new Error("No SubtleCrypto implementation found");try{const n=await r.importKey("raw",ep(t),{name:"AES-CBC",length:128},!0,["encrypt","decrypt"]),[o,s]=e.split("."),i=await r.decrypt({name:"AES-CBC",iv:ep(o)},n,ep(s));return new TextDecoder().decode(i)}catch{throw new Error("Failed to decrypt")}}function vc(e){return typeof e=="string"?e:JSON.stringify(e)}function Ur(e){typeof e=="number"&&(e=e+""),(!e||typeof e!="string")&&(e="0");const t=e.replace(/(^v|\+.*$)/g,"").split(/[-.]/);return t.length===3&&t.push("~"),t.map(r=>r.match(/^[0-9]+$/)?r.padStart(5," "):r).join("-")}function c8(){let e;try{e="1.6.5"}catch{e=""}return e}function u8(e,t){let r,n;try{r=new URL(e),n=new URL(t)}catch(o){return console.error(`Unable to merge query strings: ${o}`),t}return r.searchParams.forEach((o,s)=>{n.searchParams.has(s)||n.searchParams.set(s,o)}),n.toString()}function U_(e){return typeof e=="object"&&e!==null}function tp(e){return e.urlPatterns&&e.variations.some(t=>U_(t)&&"urlRedirect"in t)?"redirect":e.variations.some(t=>U_(t)&&(t.domMutations||"js"in t||"css"in t))?"visual":"unknown"}async function UT(e,t){return new Promise(r=>{let n=!1,o;const s=i=>{n||(n=!0,o&&clearTimeout(o),r(i||null))};t&&(o=setTimeout(()=>s(),t)),e.then(i=>s(i)).catch(()=>s())})}const ur={staleTTL:1e3*60,maxAge:1e3*60*60*4,cacheKey:"gbFeaturesCache",backgroundSync:!0,maxEntries:10,disableIdleStreams:!1,idleStreamInterval:2e4,disableCache:!1},_n=Qq(),Xs={fetchFeaturesCall:({host:e,clientKey:t,headers:r})=>_n.fetch(`${e}/api/features/${t}`,{headers:r}),fetchRemoteEvalCall:({host:e,clientKey:t,payload:r,headers:n})=>{const o={method:"POST",headers:{"Content-Type":"application/json",...n},body:JSON.stringify(r)};return _n.fetch(`${e}/api/eval/${t}`,o)},eventSourceCall:({host:e,clientKey:t,headers:r})=>r?new _n.EventSource(`${e}/sub/${t}`,{headers:r}):new _n.EventSource(`${e}/sub/${t}`),startIdleListener:()=>{let e;if(!(typeof window<"u"&&typeof document<"u"))return;const r=()=>{document.visibilityState==="visible"?(window.clearTimeout(e),g8()):document.visibilityState==="hidden"&&(e=window.setTimeout(h8,ur.idleStreamInterval))};return document.addEventListener("visibilitychange",r),()=>document.removeEventListener("visibilitychange",r)},stopIdleListener:()=>{}};try{globalThis.localStorage&&(_n.localStorage=globalThis.localStorage)}catch{}const Ys=new Map;let W_=!1;const kn=new Map,dl=new Map,Js=new Map,Zs=new Set;function d8(e){Object.assign(ur,e),ur.backgroundSync||KT()}async function p8({instance:e,timeout:t,skipCache:r,allowStale:n,backgroundSync:o}){return o||(ur.backgroundSync=!1),v8({instance:e,allowStale:n,timeout:t,skipCache:r})}function f8(e){const t=Wa(e),r=Ys.get(t)||new Set;r.add(e),Ys.set(t,r)}function m8(e){Ys.forEach(t=>t.delete(e))}function h8(){Js.forEach(e=>{e&&(e.state="idle",Mg(e))})}function g8(){Js.forEach(e=>{e&&e.state==="idle"&&Lg(e)})}async function q_(){try{if(!_n.localStorage)return;await _n.localStorage.setItem(ur.cacheKey,JSON.stringify(Array.from(kn.entries())))}catch{}}async function v8({instance:e,allowStale:t,timeout:r,skipCache:n}){const o=Wa(e),s=Dg(e),i=new Date,l=new Date(i.getTime()-ur.maxAge+ur.staleTTL);await b8();const u=!ur.disableCache&&!n?kn.get(s):void 0;return u&&(t||u.staleAt>i)&&u.staleAt>l?(u.sse&&Zs.add(o),u.staleAt<i?Yf(e):kg(e),{data:u.data,success:!0,source:"cache"}):await UT(Yf(e),r)||{data:null,success:!1,source:"timeout",error:new Error("Timeout")}}function Wa(e){const[t,r]=e.getApiInfo();return`${t}||${r}`}function Dg(e){const t=Wa(e);if(!("isRemoteEval"in e)||!e.isRemoteEval())return t;const r=e.getAttributes(),n=e.getCacheKeyAttributes()||Object.keys(e.getAttributes()),o={};n.forEach(l=>{o[l]=r[l]});const s=e.getForcedVariations(),i=e.getUrl();return`${t}||${JSON.stringify({ca:o,fv:s,url:i})}`}async function b8(){if(!W_){W_=!0;try{if(_n.localStorage){const e=await _n.localStorage.getItem(ur.cacheKey);if(!ur.disableCache&&e){const t=JSON.parse(e);t&&Array.isArray(t)&&t.forEach(([r,n])=>{kn.set(r,{...n,staleAt:new Date(n.staleAt)})}),WT()}}}catch{}if(!ur.disableIdleStreams){const e=Xs.startIdleListener();e&&(Xs.stopIdleListener=e)}}}function WT(){const e=Array.from(kn.entries()).map(([r,n])=>({key:r,staleAt:n.staleAt.getTime()})).sort((r,n)=>r.staleAt-n.staleAt),t=Math.min(Math.max(0,kn.size-ur.maxEntries),kn.size);for(let r=0;r<t;r++)kn.delete(e[r].key)}function qT(e,t,r){const n=r.dateUpdated||"",o=new Date(Date.now()+ur.staleTTL),s=ur.disableCache?void 0:kn.get(t);if(s&&n&&s.version===n){s.staleAt=o,q_();return}ur.disableCache||(kn.set(t,{data:r,version:n,staleAt:o,sse:Zs.has(e)}),WT()),q_();const i=Ys.get(e);i&&i.forEach(l=>_8(l,r))}async function _8(e,t){await e.setPayload(t||e.getPayload())}async function Yf(e){const{apiHost:t,apiRequestHeaders:r}=e.getApiHosts(),n=e.getClientKey(),o="isRemoteEval"in e&&e.isRemoteEval(),s=Wa(e),i=Dg(e);let l=dl.get(i);return l||(l=(o?Xs.fetchRemoteEvalCall({host:t,clientKey:n,payload:{attributes:e.getAttributes(),forcedVariations:e.getForcedVariations(),forcedFeatures:Array.from(e.getForcedFeatures().entries()),url:e.getUrl()},headers:r}):Xs.fetchFeaturesCall({host:t,clientKey:n,headers:r})).then(d=>{if(!d.ok)throw new Error(`HTTP error: ${d.status}`);return d.headers.get("x-sse-support")==="enabled"&&Zs.add(s),d.json()}).then(d=>(qT(s,i,d),kg(e),dl.delete(i),{data:d,success:!0,source:"network"})).catch(d=>(dl.delete(i),{data:null,source:"error",success:!1,error:d})),dl.set(i,l)),l}function kg(e,t=!1){const r=Wa(e),n=Dg(e),{streamingHost:o,streamingHostRequestHeaders:s}=e.getApiHosts(),i=e.getClientKey();if(t&&Zs.add(r),ur.backgroundSync&&Zs.has(r)&&_n.EventSource){if(Js.has(r))return;const l={src:null,host:o,clientKey:i,headers:s,cb:u=>{try{if(u.type==="features-updated"){const d=Ys.get(r);d&&d.forEach(p=>{Yf(p)})}else if(u.type==="features"){const d=JSON.parse(u.data);qT(r,n,d)}l.errors=0}catch{GT(l)}},errors:0,state:"active"};Js.set(r,l),Lg(l)}}function GT(e){if(e.state!=="idle"&&(e.errors++,e.errors>3||e.src&&e.src.readyState===2)){const t=Math.pow(3,e.errors-3)*(1e3+Math.random()*1e3);Mg(e),setTimeout(()=>{["idle","active"].includes(e.state)||Lg(e)},Math.min(t,3e5))}}function Mg(e){e.src&&(e.src.onopen=null,e.src.onerror=null,e.src.close(),e.src=null,e.state==="active"&&(e.state="disabled"))}function Lg(e){e.src=Xs.eventSourceCall({host:e.host,clientKey:e.clientKey,headers:e.headers}),e.state="active",e.src.addEventListener("features",e.cb),e.src.addEventListener("features-updated",e.cb),e.src.onerror=()=>GT(e),e.src.onopen=()=>{e.errors=0}}function y8(e,t){Mg(e),Js.delete(t)}function KT(){Zs.clear(),Js.forEach(y8),Ys.clear(),Xs.stopIdleListener()}function rp(e,t){if(t.streaming){if(!e.getClientKey())throw new Error("Must specify clientKey to enable streaming");t.payload&&kg(e,!0),f8(e)}}var x8=/^[a-zA-Z:_][a-zA-Z0-9:_.-]*$/,zg={revert:function(){}},bc=new Map,Fg=new Set;function w8(e){return e==="html"?{childList:!0,subtree:!0,attributes:!0,characterData:!0}:{childList:!1,subtree:!1,attributes:!0,attributeFilter:[e]}}function Xu(e){var t=bc.get(e);return t||(t={element:e,attributes:{}},bc.set(e,t)),t}function Yu(e,t,r,n,o){var s=r(e),i={isDirty:!1,originalValue:s,virtualValue:s,mutations:[],el:e,_positionTimeout:null,observer:new MutationObserver(function(){if(!(t==="position"&&i._positionTimeout)){t==="position"&&(i._positionTimeout=setTimeout(function(){i._positionTimeout=null},1e3));var l=r(e);t==="position"&&l.parentNode===i.virtualValue.parentNode&&l.insertBeforeNode===i.virtualValue.insertBeforeNode||l!==i.virtualValue&&(i.originalValue=l,o(i))}}),mutationRunner:o,setValue:n,getCurrentValue:r};return t==="position"&&e.parentNode?i.observer.observe(e.parentNode,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):i.observer.observe(e,w8(t)),i}function Ju(e,t){var r=t.getCurrentValue(t.el);t.virtualValue=e,e&&typeof e!="string"?(!r||e.parentNode!==r.parentNode||e.insertBeforeNode!==r.insertBeforeNode)&&(t.isDirty=!0,G_()):e!==r&&(t.isDirty=!0,G_())}function E8(e){var t=e.originalValue;e.mutations.forEach(function(r){return t=r.mutate(t)}),Ju(M8(t),e)}function S8(e){var t=new Set(e.originalValue.split(/\s+/).filter(Boolean));e.mutations.forEach(function(r){return r.mutate(t)}),Ju(Array.from(t).filter(Boolean).join(" "),e)}function C8(e){var t=e.originalValue;e.mutations.forEach(function(r){return t=r.mutate(t)}),Ju(t,e)}function P8(e){var t=e.parentSelector,r=e.insertBeforeSelector,n=document.querySelector(t);if(!n)return null;var o=r?document.querySelector(r):null;return r&&!o?null:{parentNode:n,insertBeforeNode:o}}function R8(e){var t=e.originalValue;e.mutations.forEach(function(r){var n=r.mutate(),o=P8(n);t=o||t}),Ju(t,e)}var T8=function(t){return t.innerHTML},I8=function(t,r){return t.innerHTML=r};function XT(e){var t=Xu(e);return t.html||(t.html=Yu(e,"html",T8,I8,E8)),t.html}var $8=function(t){return{parentNode:t.parentElement,insertBeforeNode:t.nextElementSibling}},A8=function(t,r){r.insertBeforeNode&&!r.parentNode.contains(r.insertBeforeNode)||r.parentNode.insertBefore(t,r.insertBeforeNode)};function YT(e){var t=Xu(e);return t.position||(t.position=Yu(e,"position",$8,A8,R8)),t.position}var j8=function(t,r){return r?t.className=r:t.removeAttribute("class")},O8=function(t){return t.className};function JT(e){var t=Xu(e);return t.classes||(t.classes=Yu(e,"class",O8,j8,S8)),t.classes}var N8=function(t){return function(r){var n;return(n=r.getAttribute(t))!=null?n:null}},D8=function(t){return function(r,n){return n!==null?r.setAttribute(t,n):r.removeAttribute(t)}};function ZT(e,t){var r=Xu(e);return r.attributes[t]||(r.attributes[t]=Yu(e,t,N8(t),D8(t),C8)),r.attributes[t]}function k8(e,t){var r=bc.get(e);if(r)if(t==="html"){var n,o;(n=r.html)==null||(o=n.observer)==null||o.disconnect(),delete r.html}else if(t==="class"){var s,i;(s=r.classes)==null||(i=s.observer)==null||i.disconnect(),delete r.classes}else if(t==="position"){var l,u;(l=r.position)==null||(u=l.observer)==null||u.disconnect(),delete r.position}else{var d,p,f;(d=r.attributes)==null||(p=d[t])==null||(f=p.observer)==null||f.disconnect(),delete r.attributes[t]}}var pl;function M8(e){return pl||(pl=document.createElement("div")),pl.innerHTML=e,pl.innerHTML}function fl(e,t,r){if(r.isDirty){r.isDirty=!1;var n=r.virtualValue;r.mutations.length||k8(e,t),r.setValue(e,n)}}function L8(e,t){e.html&&fl(t,"html",e.html),e.classes&&fl(t,"class",e.classes),e.position&&fl(t,"position",e.position),Object.keys(e.attributes).forEach(function(r){fl(t,r,e.attributes[r])})}function G_(){bc.forEach(L8)}function z8(e,t){var r=null;e.kind==="html"?r=XT(t):e.kind==="class"?r=JT(t):e.kind==="attribute"?r=ZT(t,e.attribute):e.kind==="position"&&(r=YT(t)),r&&(r.mutations.push(e),r.mutationRunner(r))}function F8(e,t){var r=null;if(e.kind==="html"?r=XT(t):e.kind==="class"?r=JT(t):e.kind==="attribute"?r=ZT(t,e.attribute):e.kind==="position"&&(r=YT(t)),!!r){var n=r.mutations.indexOf(e);n!==-1&&r.mutations.splice(n,1),r.mutationRunner(r)}}function QT(e){if(!(e.kind==="position"&&e.elements.size===1)){var t=new Set(e.elements),r=document.querySelectorAll(e.selector);r.forEach(function(n){t.has(n)||(e.elements.add(n),z8(e,n))})}}function V8(e){e.elements.forEach(function(t){return F8(e,t)}),e.elements.clear(),Fg.delete(e)}function K_(){Fg.forEach(QT)}var np;function B8(){typeof document>"u"||(np||(np=new MutationObserver(function(){K_()})),K_(),np.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!1,characterData:!1}))}B8();function Zu(e){return typeof document>"u"?zg:(Fg.add(e),QT(e),{revert:function(){V8(e)}})}function Jf(e,t){return Zu({kind:"html",elements:new Set,mutate:t,selector:e})}function eI(e,t){return Zu({kind:"position",elements:new Set,mutate:t,selector:e})}function Zi(e,t){return Zu({kind:"class",elements:new Set,mutate:t,selector:e})}function Dl(e,t,r){return x8.test(t)?t==="class"||t==="className"?Zi(e,function(n){var o=r(Array.from(n).join(" "));n.clear(),o&&o.split(/\s+/g).filter(Boolean).forEach(function(s){return n.add(s)})}):Zu({kind:"attribute",attribute:t,elements:new Set,mutate:r,selector:e}):zg}function H8(e){var t=e.selector,r=e.action,n=e.value,o=e.attribute,s=e.parentSelector,i=e.insertBeforeSelector;if(o==="html"){if(r==="append")return Jf(t,function(l){return l+(n??"")});if(r==="set")return Jf(t,function(){return n??""})}else if(o==="class"){if(r==="append")return Zi(t,function(l){n&&l.add(n)});if(r==="remove")return Zi(t,function(l){n&&l.delete(n)});if(r==="set")return Zi(t,function(l){l.clear(),n&&l.add(n)})}else if(o==="position"){if(r==="set"&&s)return eI(t,function(){return{insertBeforeSelector:i,parentSelector:s}})}else{if(r==="append")return Dl(t,o,function(l){return l!==null?l+(n??""):n??""});if(r==="set")return Dl(t,o,function(){return n??""});if(r==="remove")return Dl(t,o,function(){return null})}return zg}var U8={html:Jf,classes:Zi,attribute:Dl,position:eI,declarative:H8};const op={};function Zo(e,t,r){r=r||{};for(const[n,o]of Object.entries(t))switch(n){case"$or":if(!J_(e,o,r))return!1;break;case"$nor":if(J_(e,o,r))return!1;break;case"$and":if(!X8(e,o,r))return!1;break;case"$not":if(Zo(e,o,r))return!1;break;default:if(!fa(o,W8(e,n),r))return!1}return!0}function W8(e,t){const r=t.split(".");let n=e;for(let o=0;o<r.length;o++)if(n&&typeof n=="object"&&r[o]in n)n=n[r[o]];else return null;return n}function X_(e,t=!1){const r=`${e}${t?"/i":""}`;return op[r]||(op[r]=new RegExp(e.replace(/([^\\])\//g,"$1\\/"),t?"i":void 0)),op[r]}function fa(e,t,r,n=!1){if(typeof e=="string")return n?String(t).toLowerCase()===e.toLowerCase():t+""===e;if(typeof e=="number")return t*1===e;if(typeof e=="boolean")return t!==null&&!!t===e;if(e===null)return t===null;if(Array.isArray(e)||!tI(e))return JSON.stringify(t)===JSON.stringify(e);for(const o in e)if(!K8(o,t,e[o],r))return!1;return!0}function tI(e){const t=Object.keys(e);return t.length>0&&t.filter(r=>r[0]==="$").length===t.length}function q8(e){if(e===null)return"null";if(Array.isArray(e))return"array";const t=typeof e;return["string","number","boolean","object","undefined"].includes(t)?t:"unknown"}function G8(e,t,r){if(!Array.isArray(e))return!1;const n=tI(t)?o=>fa(t,o,r):o=>Zo(o,t,r);for(let o=0;o<e.length;o++)if(e[o]&&n(e[o]))return!0;return!1}function ds(e,t,r=!1){if(r){const n=o=>typeof o=="string"?o.toLowerCase():o;return Array.isArray(e)?e.some(o=>t.some(s=>n(o)===n(s))):t.some(o=>n(e)===n(o))}return Array.isArray(e)?e.some(n=>t.includes(n)):t.includes(e)}function Y_(e,t,r,n=!1){if(!Array.isArray(e))return!1;for(let o=0;o<t.length;o++){let s=!1;for(let i=0;i<e.length;i++)if(fa(t[o],e[i],r,n)){s=!0;break}if(!s)return!1}return!0}function K8(e,t,r,n){switch(e){case"$veq":return Ur(t)===Ur(r);case"$vne":return Ur(t)!==Ur(r);case"$vgt":return Ur(t)>Ur(r);case"$vgte":return Ur(t)>=Ur(r);case"$vlt":return Ur(t)<Ur(r);case"$vlte":return Ur(t)<=Ur(r);case"$eq":return t===r;case"$ne":return t!==r;case"$lt":return t<r;case"$lte":return t<=r;case"$gt":return t>r;case"$gte":return t>=r;case"$exists":return r?t!=null:t==null;case"$in":return Array.isArray(r)?ds(t,r):!1;case"$ini":return Array.isArray(r)?ds(t,r,!0):!1;case"$inGroup":return ds(t,n[r]||[]);case"$notInGroup":return!ds(t,n[r]||[]);case"$nin":return Array.isArray(r)?!ds(t,r):!1;case"$nini":return Array.isArray(r)?!ds(t,r,!0):!1;case"$not":return!fa(r,t,n);case"$size":return Array.isArray(t)?fa(r,t.length,n):!1;case"$elemMatch":return G8(t,r,n);case"$all":return Array.isArray(r)?Y_(t,r,n):!1;case"$alli":return Array.isArray(r)?Y_(t,r,n,!0):!1;case"$regex":try{return X_(r).test(t)}catch{return!1}case"$regexi":try{return X_(r,!0).test(t)}catch{return!1}case"$type":return q8(t)===r;default:return console.error("Unknown operator: "+e),!1}}function J_(e,t,r){if(!t.length)return!0;for(let n=0;n<t.length;n++)if(Zo(e,t[n],r))return!0;return!1}function X8(e,t,r){for(let n=0;n<t.length;n++)if(!Zo(e,t[n],r))return!1;return!0}const Y8="Feature Evaluated",J8="Experiment Viewed";function Z8(e){const t=new Map;return e.global.forcedFeatureValues&&e.global.forcedFeatureValues.forEach((r,n)=>t.set(n,r)),e.user.forcedFeatureValues&&e.user.forcedFeatureValues.forEach((r,n)=>t.set(n,r)),t}function Q8(e){return e.global.forcedVariations&&e.user.forcedVariations?{...e.global.forcedVariations,...e.user.forcedVariations}:e.global.forcedVariations?e.global.forcedVariations:e.user.forcedVariations?e.user.forcedVariations:{}}async function zs(e){try{await e()}catch{}}function rI(e,t,r){if(e.user.trackedExperiments){const o=tm(t,r);if(e.user.trackedExperiments.has(o))return[];e.user.trackedExperiments.add(o)}e.user.enableDevMode&&e.user.devLogs&&e.user.devLogs.push({experiment:t,result:r,timestamp:Date.now().toString(),logType:"experiment"});const n=[];if(e.global.trackingCallback){const o=e.global.trackingCallback;n.push(zs(()=>o(t,r,e.user)))}if(e.user.trackingCallback){const o=e.user.trackingCallback;n.push(zs(()=>o(t,r)))}if(e.global.eventLogger){const o=e.global.eventLogger;n.push(zs(()=>o(J8,{experimentId:t.key,variationId:r.key,hashAttribute:r.hashAttribute,hashValue:r.hashValue},e.user)))}return n}function eG(e,t,r){if(e.user.trackedFeatureUsage){const n=JSON.stringify(r.value);if(e.user.trackedFeatureUsage[t]===n)return;e.user.trackedFeatureUsage[t]=n,e.user.enableDevMode&&e.user.devLogs&&e.user.devLogs.push({featureKey:t,result:r,timestamp:Date.now().toString(),logType:"feature"})}if(e.global.onFeatureUsage){const n=e.global.onFeatureUsage;zs(()=>n(t,r,e.user))}if(e.user.onFeatureUsage){const n=e.user.onFeatureUsage;zs(()=>n(t,r))}if(e.global.eventLogger){const n=e.global.eventLogger;zs(()=>n(Y8,{feature:t,source:r.source,value:r.value,ruleId:r.source==="defaultValue"?"$default":r.ruleId||"",variationId:r.experimentResult?r.experimentResult.key:""},e.user))}}function Vg(e,t){if(t.stack.evaluatedFeatures.has(e))return Un(t,e,null,"cyclicPrerequisite");t.stack.evaluatedFeatures.add(e),t.stack.id=e;const r=Z8(t);if(r.has(e))return Un(t,e,r.get(e),"override");if(!t.global.features||!t.global.features[e])return Un(t,e,null,"unknownFeature");const n=t.global.features[e];if(n.rules){const o=new Set(t.stack.evaluatedFeatures);e:for(const s of n.rules){if(s.parentConditions)for(const u of s.parentConditions){t.stack.evaluatedFeatures=new Set(o);const d=Vg(u.id,t);if(d.source==="cyclicPrerequisite")return Un(t,e,null,"cyclicPrerequisite");const p={value:d.value};if(!Zo(p,u.condition||{})){if(u.gate)return Un(t,e,null,"prerequisite");continue e}}if(s.filters&&sI(s.filters,t))continue;if("force"in s){if(s.condition&&!oI(s.condition,t)||!tG(t,s.seed||e,s.hashAttribute,t.user.saveStickyBucketAssignmentDoc&&!s.disableStickyBucketing?s.fallbackAttribute:void 0,s.range,s.coverage,s.hashVersion))continue;return s.tracks&&s.tracks.forEach(u=>{!rI(t,u.experiment,u.result).length&&t.global.saveDeferredTrack&&t.global.saveDeferredTrack({experiment:u.experiment,result:u.result})}),Un(t,e,s.force,"force",s.id)}if(!s.variations)continue;const i={variations:s.variations,key:s.key||e};"coverage"in s&&(i.coverage=s.coverage),s.weights&&(i.weights=s.weights),s.hashAttribute&&(i.hashAttribute=s.hashAttribute),s.fallbackAttribute&&(i.fallbackAttribute=s.fallbackAttribute),s.disableStickyBucketing&&(i.disableStickyBucketing=s.disableStickyBucketing),s.bucketVersion!==void 0&&(i.bucketVersion=s.bucketVersion),s.minBucketVersion!==void 0&&(i.minBucketVersion=s.minBucketVersion),s.namespace&&(i.namespace=s.namespace),s.meta&&(i.meta=s.meta),s.ranges&&(i.ranges=s.ranges),s.name&&(i.name=s.name),s.phase&&(i.phase=s.phase),s.seed&&(i.seed=s.seed),s.hashVersion&&(i.hashVersion=s.hashVersion),s.filters&&(i.filters=s.filters),s.condition&&(i.condition=s.condition);const{result:l}=Zf(i,e,t);if(t.global.onExperimentEval&&t.global.onExperimentEval(i,l),l.inExperiment&&!l.passthrough)return Un(t,e,l.value,"experiment",s.id,i,l)}}return Un(t,e,n.defaultValue===void 0?null:n.defaultValue,"defaultValue")}function Zf(e,t,r){const n=e.key,o=e.variations.length;if(o<2)return{result:Pt(r,e,-1,!1,t)};if(r.global.enabled===!1||r.user.enabled===!1)return{result:Pt(r,e,-1,!1,t)};if(e=rG(e,r),e.urlPatterns&&!HT(r.user.url||"",e.urlPatterns))return{result:Pt(r,e,-1,!1,t)};const s=a8(n,r.user.url||"",o);if(s!==null)return{result:Pt(r,e,s,!1,t)};const i=Q8(r);if(n in i){const b=i[n];return{result:Pt(r,e,b,!1,t)}}if(e.status==="draft"||e.active===!1)return{result:Pt(r,e,-1,!1,t)};const{hashAttribute:l,hashValue:u}=Fo(r,e.hashAttribute,r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing?e.fallbackAttribute:void 0);if(!u)return{result:Pt(r,e,-1,!1,t)};let d=-1,p=!1,f=!1;if(r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing){const{variation:b,versionIsBlocked:_}=sG({ctx:r,expKey:e.key,expBucketVersion:e.bucketVersion,expHashAttribute:e.hashAttribute,expFallbackAttribute:e.fallbackAttribute,expMinBucketVersion:e.minBucketVersion,expMeta:e.meta});p=b>=0,d=b,f=!!_}if(!p){if(e.filters){if(sI(e.filters,r))return{result:Pt(r,e,-1,!1,t)}}else if(e.namespace&&!t8(u,e.namespace))return{result:Pt(r,e,-1,!1,t)};if(e.include&&!l8(e.include))return{result:Pt(r,e,-1,!1,t)};if(e.condition&&!oI(e.condition,r))return{result:Pt(r,e,-1,!1,t)};if(e.parentConditions){const b=new Set(r.stack.evaluatedFeatures);for(const _ of e.parentConditions){r.stack.evaluatedFeatures=new Set(b);const y=Vg(_.id,r);if(y.source==="cyclicPrerequisite")return{result:Pt(r,e,-1,!1,t)};const x={value:y.value};if(!Zo(x,_.condition||{}))return{result:Pt(r,e,-1,!1,t)}}}if(e.groups&&!oG(e.groups,r))return{result:Pt(r,e,-1,!1,t)}}if(e.url&&!nG(e.url,r))return{result:Pt(r,e,-1,!1,t)};const m=Ku(e.seed||n,u,e.hashVersion||1);if(m===null)return{result:Pt(r,e,-1,!1,t)};if(!p){const b=e.ranges||i8(o,e.coverage===void 0?1:e.coverage,e.weights);d=r8(m,b)}if(f)return{result:Pt(r,e,-1,!1,t,void 0,!0)};if(d<0)return{result:Pt(r,e,-1,!1,t)};if("force"in e)return{result:Pt(r,e,e.force===void 0?-1:e.force,!1,t)};if(r.global.qaMode||r.user.qaMode)return{result:Pt(r,e,-1,!1,t)};if(e.status==="stopped")return{result:Pt(r,e,-1,!1,t)};const h=Pt(r,e,d,!0,t,m,p);if(r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing){const{changed:b,key:_,doc:y}=aG(r,l,vc(u),{[Qf(e.key,e.bucketVersion)]:h.key});b&&(r.user.stickyBucketAssignmentDocs=r.user.stickyBucketAssignmentDocs||{},r.user.stickyBucketAssignmentDocs[_]=y,r.user.saveStickyBucketAssignmentDoc(y))}const v=rI(r,e,h);v.length===0&&r.global.saveDeferredTrack&&r.global.saveDeferredTrack({experiment:e,result:h});const g=v.length?v.length===1?v[0]:Promise.all(v).then(()=>{}):void 0;return"changeId"in e&&e.changeId&&r.global.recordChangeId&&r.global.recordChangeId(e.changeId),{result:h,trackingCall:g}}function Un(e,t,r,n,o,s,i){const l={value:r,on:!!r,off:!r,source:n,ruleId:o||""};return s&&(l.experiment=s),i&&(l.experimentResult=i),n!=="override"&&eG(e,t,l),l}function nI(e){return{...e.user.attributes,...e.user.attributeOverrides}}function oI(e,t){return Zo(nI(t),e,t.global.savedGroups||{})}function sI(e,t){return e.some(r=>{const{hashValue:n}=Fo(t,r.attribute);if(!n)return!0;const o=Ku(r.seed,n,r.hashVersion||2);return o===null?!0:!r.ranges.some(s=>Ng(o,s))})}function tG(e,t,r,n,o,s,i){if(!o&&s===void 0)return!0;if(!o&&s===0)return!1;const{hashValue:l}=Fo(e,r,n);if(!l)return!1;const u=Ku(t,l,i||1);return u===null?!1:o?Ng(u,o):s!==void 0?u<=s:!0}function Pt(e,t,r,n,o,s,i){let l=!0;(r<0||r>=t.variations.length)&&(r=0,l=!1);const{hashAttribute:u,hashValue:d}=Fo(e,t.hashAttribute,e.user.saveStickyBucketAssignmentDoc&&!t.disableStickyBucketing?t.fallbackAttribute:void 0),p=t.meta?t.meta[r]:{},f={key:p.key||""+r,featureId:o,inExperiment:l,hashUsed:n,variationId:r,value:t.variations[r],hashAttribute:u,hashValue:d,stickyBucketUsed:!!i};return p.name&&(f.name=p.name),s!==void 0&&(f.bucket=s),p.passthrough&&(f.passthrough=p.passthrough),f}function rG(e,t){const r=e.key,n=t.global.overrides;return n&&n[r]&&(e=Object.assign({},e,n[r]),typeof e.url=="string"&&(e.url=BT(e.url))),e}function Fo(e,t,r){let n=t||"id",o="";const s=nI(e);return s[n]&&(o=s[n]),!o&&r&&(s[r]&&(o=s[r]),o&&(n=r)),{hashAttribute:n,hashValue:o}}function nG(e,t){const r=t.user.url;if(!r)return!1;const n=r.replace(/^https?:\/\//,"").replace(/^[^/]*\//,"/");return!!(e.test(r)||e.test(n))}function oG(e,t){const r=t.global.groups||{};for(let n=0;n<e.length;n++)if(r[e[n]])return!0;return!1}function sG({ctx:e,expKey:t,expBucketVersion:r,expHashAttribute:n,expFallbackAttribute:o,expMinBucketVersion:s,expMeta:i}){r=r||0,s=s||0,n=n||"id",i=i||[];const l=Qf(t,r),u=iG(e,n,o);if(s>0)for(let f=0;f<s;f++){const m=Qf(t,f);if(u[m]!==void 0)return{variation:-1,versionIsBlocked:!0}}const d=u[l];if(d===void 0)return{variation:-1};const p=i.findIndex(f=>f.key===d);return p<0?{variation:-1}:{variation:p}}function Qf(e,t){return t=t||0,`${e}__${t}`}function em(e,t){return`${e}||${t}`}function iG(e,t,r){if(!e.user.stickyBucketAssignmentDocs)return{};const{hashAttribute:n,hashValue:o}=Fo(e,t),s=em(n,vc(o)),{hashAttribute:i,hashValue:l}=Fo(e,r),u=l?em(i,vc(l)):null,d={};return u&&e.user.stickyBucketAssignmentDocs[u]&&Object.assign(d,e.user.stickyBucketAssignmentDocs[u].assignments||{}),e.user.stickyBucketAssignmentDocs[s]&&Object.assign(d,e.user.stickyBucketAssignmentDocs[s].assignments||{}),d}function aG(e,t,r,n){const o=em(t,r),s=e.user.stickyBucketAssignmentDocs&&e.user.stickyBucketAssignmentDocs[o]?e.user.stickyBucketAssignmentDocs[o].assignments||{}:{},i={...s,...n},l=JSON.stringify(s)!==JSON.stringify(i);return{key:o,doc:{attributeName:t,attributeValue:r,assignments:i},changed:l}}function lG(e,t){const r=new Set,n=t&&t.features?t.features:e.global.features||{},o=t&&t.experiments?t.experiments:e.global.experiments||[];return Object.keys(n).forEach(s=>{const i=n[s];if(i.rules)for(const l of i.rules)l.variations&&(r.add(l.hashAttribute||"id"),l.fallbackAttribute&&r.add(l.fallbackAttribute))}),o.map(s=>{r.add(s.hashAttribute||"id"),s.fallbackAttribute&&r.add(s.fallbackAttribute)}),Array.from(r)}async function cG(e,t,r){const n=iI(e,r);return t.getAllAssignments(n)}function iI(e,t){const r={};return lG(e,t).forEach(o=>{const{hashValue:s}=Fo(e,o);r[o]=vc(s)}),r}async function uG(e,t,r){if(e={...e},e.encryptedFeatures){try{e.features=JSON.parse(await Ji(e.encryptedFeatures,t,r))}catch(n){console.error(n)}delete e.encryptedFeatures}if(e.encryptedExperiments){try{e.experiments=JSON.parse(await Ji(e.encryptedExperiments,t,r))}catch(n){console.error(n)}delete e.encryptedExperiments}if(e.encryptedSavedGroups){try{e.savedGroups=JSON.parse(await Ji(e.encryptedSavedGroups,t,r))}catch(n){console.error(n)}delete e.encryptedSavedGroups}return e}function dG(e){const t=e.apiHost||"https://cdn.growthbook.io";return{apiHost:t.replace(/\/*$/,""),streamingHost:(e.streamingHost||t).replace(/\/*$/,""),apiRequestHeaders:e.apiHostRequestHeaders,streamingHostRequestHeaders:e.streamingHostRequestHeaders}}function tm(e,t){return t.hashAttribute+t.hashValue+e.key+t.variationId}const ps=typeof window<"u"&&typeof document<"u",pG=c8();class fG{constructor(t){if(t=t||{},this.version=pG,this._options=this.context=t,this._renderer=t.renderer||null,this._trackedExperiments=new Set,this._completedChangeIds=new Set,this._trackedFeatures={},this.debug=!!t.debug,this._subscriptions=new Set,this.ready=!1,this._assigned=new Map,this._activeAutoExperiments=new Map,this._triggeredExpKeys=new Set,this._initialized=!1,this._redirectedUrl="",this._deferredTrackingCalls=new Map,this._autoExperimentsAllowed=!t.disableExperimentsOnLoad,this._destroyCallbacks=[],this.logs=[],this.log=this.log.bind(this),this._saveDeferredTrack=this._saveDeferredTrack.bind(this),this._onExperimentEval=this._onExperimentEval.bind(this),this._fireSubscriptions=this._fireSubscriptions.bind(this),this._recordChangedId=this._recordChangedId.bind(this),t.remoteEval){if(t.decryptionKey)throw new Error("Encryption is not available for remoteEval");if(!t.clientKey)throw new Error("Missing clientKey");let r=!1;try{r=!!new URL(t.apiHost||"").hostname.match(/growthbook\.io$/i)}catch{}if(r)throw new Error("Cannot use remoteEval on GrowthBook Cloud")}else if(t.cacheKeyAttributes)throw new Error("cacheKeyAttributes are only used for remoteEval");if(t.stickyBucketService){const r=t.stickyBucketService;this._saveStickyBucketAssignmentDoc=n=>r.saveAssignments(n)}if(t.plugins)for(const r of t.plugins)r(this);if(t.features&&(this.ready=!0),ps&&t.enableDevMode&&(window._growthbook=this,document.dispatchEvent(new Event("gbloaded"))),t.experiments&&(this.ready=!0,this._updateAllAutoExperiments()),this._options.stickyBucketService&&this._options.stickyBucketAssignmentDocs)for(const r in this._options.stickyBucketAssignmentDocs){const n=this._options.stickyBucketAssignmentDocs[r];n&&this._options.stickyBucketService.saveAssignments(n).catch(()=>{})}this.ready&&this.refreshStickyBuckets(this.getPayload())}async setPayload(t){this._payload=t;const r=await uG(t,this._options.decryptionKey);this._decryptedPayload=r,await this.refreshStickyBuckets(r),r.features&&(this._options.features=r.features),r.savedGroups&&(this._options.savedGroups=r.savedGroups),r.experiments&&(this._options.experiments=r.experiments,this._updateAllAutoExperiments()),this.ready=!0,this._render()}initSync(t){this._initialized=!0;const r=t.payload;if(r.encryptedExperiments||r.encryptedFeatures)throw new Error("initSync does not support encrypted payloads");return this._options.stickyBucketService&&!this._options.stickyBucketAssignmentDocs&&(this._options.stickyBucketAssignmentDocs=this.generateStickyBucketAssignmentDocsSync(this._options.stickyBucketService,r)),this._payload=r,this._decryptedPayload=r,r.features&&(this._options.features=r.features),r.experiments&&(this._options.experiments=r.experiments,this._updateAllAutoExperiments()),this.ready=!0,rp(this,t),this}async init(t){if(this._initialized=!0,t=t||{},t.cacheSettings&&d8(t.cacheSettings),t.payload)return await this.setPayload(t.payload),rp(this,t),{success:!0,source:"init"};{const{data:r,...n}=await this._refresh({...t,allowStale:!0});return rp(this,t),await this.setPayload(r||{}),n}}async loadFeatures(t){t=t||{},await this.init({skipCache:t.skipCache,timeout:t.timeout,streaming:(this._options.backgroundSync??!0)&&(t.autoRefresh||this._options.subscribeToChanges)})}async refreshFeatures(t){const r=await this._refresh({...t||{},allowStale:!1});r.data&&await this.setPayload(r.data)}getApiInfo(){return[this.getApiHosts().apiHost,this.getClientKey()]}getApiHosts(){return dG(this._options)}getClientKey(){return this._options.clientKey||""}getPayload(){return this._payload||{features:this.getFeatures(),experiments:this.getExperiments()}}getDecryptedPayload(){return this._decryptedPayload||this.getPayload()}isRemoteEval(){return this._options.remoteEval||!1}getCacheKeyAttributes(){return this._options.cacheKeyAttributes}async _refresh({timeout:t,skipCache:r,allowStale:n,streaming:o}){if(!this._options.clientKey)throw new Error("Missing clientKey");return p8({instance:this,timeout:t,skipCache:r||this._options.disableCache,allowStale:n,backgroundSync:o??this._options.backgroundSync??!0})}_render(){if(this._renderer)try{this._renderer()}catch(t){console.error("Failed to render",t)}}setFeatures(t){this._options.features=t,this.ready=!0,this._render()}async setEncryptedFeatures(t,r,n){const o=await Ji(t,r||this._options.decryptionKey,n);this.setFeatures(JSON.parse(o))}setExperiments(t){this._options.experiments=t,this.ready=!0,this._updateAllAutoExperiments()}async setEncryptedExperiments(t,r,n){const o=await Ji(t,r||this._options.decryptionKey,n);this.setExperiments(JSON.parse(o))}async setAttributes(t){if(this._options.attributes=t,this._options.stickyBucketService&&await this.refreshStickyBuckets(),this._options.remoteEval){await this._refreshForRemoteEval();return}this._render(),this._updateAllAutoExperiments()}async updateAttributes(t){return this.setAttributes({...this._options.attributes,...t})}async setAttributeOverrides(t){if(this._options.attributeOverrides=t,this._options.stickyBucketService&&await this.refreshStickyBuckets(),this._options.remoteEval){await this._refreshForRemoteEval();return}this._render(),this._updateAllAutoExperiments()}async setForcedVariations(t){if(this._options.forcedVariations=t||{},this._options.remoteEval){await this._refreshForRemoteEval();return}this._render(),this._updateAllAutoExperiments()}setForcedFeatures(t){this._options.forcedFeatureValues=t,this._render()}async setURL(t){if(t!==this._options.url){if(this._options.url=t,this._redirectedUrl="",this._options.remoteEval){await this._refreshForRemoteEval(),this._updateAllAutoExperiments(!0);return}this._updateAllAutoExperiments(!0)}}getAttributes(){return{...this._options.attributes,...this._options.attributeOverrides}}getForcedVariations(){return this._options.forcedVariations||{}}getForcedFeatures(){return this._options.forcedFeatureValues||new Map}getStickyBucketAssignmentDocs(){return this._options.stickyBucketAssignmentDocs||{}}getUrl(){return this._options.url||""}getFeatures(){return this._options.features||{}}getExperiments(){return this._options.experiments||[]}getCompletedChangeIds(){return Array.from(this._completedChangeIds)}subscribe(t){return this._subscriptions.add(t),()=>{this._subscriptions.delete(t)}}async _refreshForRemoteEval(){if(!this._options.remoteEval||!this._initialized)return;const t=await this._refresh({allowStale:!1});t.data&&await this.setPayload(t.data)}getAllResults(){return new Map(this._assigned)}onDestroy(t){this._destroyCallbacks.push(t)}isDestroyed(){return!!this._destroyed}destroy(t){t=t||{},this._destroyed=!0,this._destroyCallbacks.forEach(r=>{try{r()}catch(n){console.error(n)}}),this._subscriptions.clear(),this._assigned.clear(),this._trackedExperiments.clear(),this._completedChangeIds.clear(),this._deferredTrackingCalls.clear(),this._trackedFeatures={},this._destroyCallbacks=[],this._payload=void 0,this._saveStickyBucketAssignmentDoc=void 0,m8(this),t.destroyAllStreams&&KT(),this.logs=[],ps&&window._growthbook===this&&delete window._growthbook,this._activeAutoExperiments.forEach(r=>{r.undo()}),this._activeAutoExperiments.clear(),this._triggeredExpKeys.clear()}setRenderer(t){this._renderer=t}forceVariation(t,r){if(this._options.forcedVariations=this._options.forcedVariations||{},this._options.forcedVariations[t]=r,this._options.remoteEval){this._refreshForRemoteEval();return}this._updateAllAutoExperiments(),this._render()}run(t){const{result:r}=Zf(t,null,this._getEvalContext());return this._onExperimentEval(t,r),r}triggerExperiment(t){return this._triggeredExpKeys.add(t),this._options.experiments?this._options.experiments.filter(n=>n.key===t).map(n=>this._runAutoExperiment(n)).filter(n=>n!==null):null}triggerAutoExperiments(){this._autoExperimentsAllowed=!0,this._updateAllAutoExperiments(!0)}_getEvalContext(){return{user:this._getUserContext(),global:this._getGlobalContext(),stack:{evaluatedFeatures:new Set}}}_getUserContext(){return{attributes:this._options.user?{...this._options.user,...this._options.attributes}:this._options.attributes,enableDevMode:this._options.enableDevMode,blockedChangeIds:this._options.blockedChangeIds,stickyBucketAssignmentDocs:this._options.stickyBucketAssignmentDocs,url:this._getContextUrl(),forcedVariations:this._options.forcedVariations,forcedFeatureValues:this._options.forcedFeatureValues,attributeOverrides:this._options.attributeOverrides,saveStickyBucketAssignmentDoc:this._saveStickyBucketAssignmentDoc,trackingCallback:this._options.trackingCallback,onFeatureUsage:this._options.onFeatureUsage,devLogs:this.logs,trackedExperiments:this._trackedExperiments,trackedFeatureUsage:this._trackedFeatures}}_getGlobalContext(){return{features:this._options.features,experiments:this._options.experiments,log:this.log,enabled:this._options.enabled,qaMode:this._options.qaMode,savedGroups:this._options.savedGroups,groups:this._options.groups,overrides:this._options.overrides,onExperimentEval:this._onExperimentEval,recordChangeId:this._recordChangedId,saveDeferredTrack:this._saveDeferredTrack,eventLogger:this._options.eventLogger}}_runAutoExperiment(t,r){const n=this._activeAutoExperiments.get(t);if(t.manual&&!this._triggeredExpKeys.has(t.key)&&!n)return null;const o=this._isAutoExperimentBlockedByContext(t);let s,i;o?s=Pt(this._getEvalContext(),t,-1,!1,""):({result:s,trackingCall:i}=Zf(t,null,this._getEvalContext()),this._onExperimentEval(t,s));const l=JSON.stringify(s.value);if(!r&&s.inExperiment&&n&&n.valueHash===l)return s;if(n&&this._undoActiveAutoExperiment(t),s.inExperiment){const u=tp(t);if(u==="redirect"&&s.value.urlRedirect&&t.urlPatterns){const d=t.persistQueryString?u8(this._getContextUrl(),s.value.urlRedirect):s.value.urlRedirect;if(HT(d,t.urlPatterns))return this.log("Skipping redirect because original URL matches redirect URL",{id:t.key}),s;this._redirectedUrl=d;const{navigate:p,delay:f}=this._getNavigateFunction();if(p)if(ps)Promise.all([...i?[UT(i,this._options.maxNavigateDelay??1e3)]:[],new Promise(m=>window.setTimeout(m,this._options.navigateDelay??f))]).then(()=>{try{p(d)}catch(m){console.error(m)}});else try{p(d)}catch(m){console.error(m)}}else if(u==="visual"){const d=this._options.applyDomChangesCallback?this._options.applyDomChangesCallback(s.value):this._applyDOMChanges(s.value);d&&this._activeAutoExperiments.set(t,{undo:d,valueHash:l})}}return s}_undoActiveAutoExperiment(t){const r=this._activeAutoExperiments.get(t);r&&(r.undo(),this._activeAutoExperiments.delete(t))}_updateAllAutoExperiments(t){if(!this._autoExperimentsAllowed)return;const r=this._options.experiments||[],n=new Set(r);this._activeAutoExperiments.forEach((o,s)=>{n.has(s)||(o.undo(),this._activeAutoExperiments.delete(s))});for(const o of r){const s=this._runAutoExperiment(o,t);if(s&&s.inExperiment&&tp(o)==="redirect")break}}_onExperimentEval(t,r){const n=this._assigned.get(t.key);this._assigned.set(t.key,{experiment:t,result:r}),this._subscriptions.size>0&&this._fireSubscriptions(t,r,n)}_fireSubscriptions(t,r,n){(!n||n.result.inExperiment!==r.inExperiment||n.result.variationId!==r.variationId)&&this._subscriptions.forEach(o=>{try{o(t,r)}catch(s){console.error(s)}})}_recordChangedId(t){this._completedChangeIds.add(t)}isOn(t){return this.evalFeature(t).on}isOff(t){return this.evalFeature(t).off}getFeatureValue(t,r){const n=this.evalFeature(t).value;return n===null?r:n}feature(t){return this.evalFeature(t)}evalFeature(t){return Vg(t,this._getEvalContext())}log(t,r){this.debug&&(this._options.log?this._options.log(t,r):console.log(t,r))}getDeferredTrackingCalls(){return Array.from(this._deferredTrackingCalls.values())}setDeferredTrackingCalls(t){this._deferredTrackingCalls=new Map(t.filter(r=>r&&r.experiment&&r.result).map(r=>[tm(r.experiment,r.result),r]))}async fireDeferredTrackingCalls(){if(!this._options.trackingCallback)return;const t=[];this._deferredTrackingCalls.forEach(r=>{!r||!r.experiment||!r.result?console.error("Invalid deferred tracking call",{call:r}):t.push(this._options.trackingCallback(r.experiment,r.result))}),this._deferredTrackingCalls.clear(),await Promise.all(t)}setTrackingCallback(t){this._options.trackingCallback=t,this.fireDeferredTrackingCalls()}setFeatureUsageCallback(t){this._options.onFeatureUsage=t}setEventLogger(t){this._options.eventLogger=t}async logEvent(t,r){if(this._destroyed){console.error("Cannot log event to destroyed GrowthBook instance");return}if(this._options.enableDevMode&&this.logs.push({eventName:t,properties:r,timestamp:Date.now().toString(),logType:"event"}),this._options.eventLogger)try{await this._options.eventLogger(t,r||{},this._getUserContext())}catch(n){console.error(n)}else console.error("No event logger configured")}_saveDeferredTrack(t){this._deferredTrackingCalls.set(tm(t.experiment,t.result),t)}_getContextUrl(){return this._options.url||(ps?window.location.href:"")}_isAutoExperimentBlockedByContext(t){const r=tp(t);if(r==="visual"){if(this._options.disableVisualExperiments||this._options.disableJsInjection&&t.variations.some(n=>n.js))return!0}else if(r==="redirect"){if(this._options.disableUrlRedirectExperiments)return!0;try{const n=new URL(this._getContextUrl());for(const o of t.variations){if(!o||!o.urlRedirect)continue;const s=new URL(o.urlRedirect);if(this._options.disableCrossOriginUrlRedirectExperiments&&(s.protocol!==n.protocol||s.host!==n.host))return!0}}catch(n){return this.log("Error parsing current or redirect URL",{id:t.key,error:n}),!0}}else return!0;return!!(t.changeId&&(this._options.blockedChangeIds||[]).includes(t.changeId))}getRedirectUrl(){return this._redirectedUrl}_getNavigateFunction(){return this._options.navigate?{navigate:this._options.navigate,delay:0}:ps?{navigate:t=>{window.location.replace(t)},delay:100}:{navigate:null,delay:0}}_applyDOMChanges(t){if(!ps)return;const r=[];if(t.css){const n=document.createElement("style");n.innerHTML=t.css,document.head.appendChild(n),r.push(()=>n.remove())}if(t.js){const n=document.createElement("script");n.innerHTML=t.js,this._options.jsInjectionNonce&&(n.nonce=this._options.jsInjectionNonce),document.head.appendChild(n),r.push(()=>n.remove())}return t.domMutations&&t.domMutations.forEach(n=>{r.push(U8.declarative(n).revert)}),()=>{r.forEach(n=>n())}}async refreshStickyBuckets(t){if(this._options.stickyBucketService){const r=this._getEvalContext(),n=await cG(r,this._options.stickyBucketService,t);this._options.stickyBucketAssignmentDocs=n}}generateStickyBucketAssignmentDocsSync(t,r){if(!("getAllAssignmentsSync"in t)){console.error("generating StickyBucketAssignmentDocs docs requires StickyBucketServiceSync");return}const n=this._getEvalContext(),o=iI(n,r);return t.getAllAssignmentsSync(o)}inDevMode(){return!!this._options.enableDevMode}}const mG="https://cdn.growthbook.io",_c=new fG({apiHost:mG,clientKey:"",enableDevMode:!1,trackingCallback:(e,t)=>{Do("experiment_exposure",{experiment_id:e.key,variation_id:t.variationId,variant:String(t.value),in_experiment:t.inExperiment})}}),Z_="avalog.ab.anon_id",hG=()=>aI();function aI(){if(typeof window>"u")return;let e;try{e=localStorage.getItem(Z_)??"",e||(e=gG(),localStorage.setItem(Z_,e))}catch{e="no-storage"}_c.setAttributes({id:e})}function gG(){try{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();if(typeof crypto<"u"&&crypto.getRandomValues){const e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")}}catch{}return Math.random().toString(36).slice(2)+Date.now().toString(36)}const Qre={HERO_CTA_COPY:"hero_cta_copy",PRICING_DISPLAY:"pricing_display",TRUST_SIGNAL:"trust_signal"},Q_=new Set;function ene(e,t){const[r,n]=a.useState(t[0]),o=a.useRef(!1),s=a.useCallback(i=>{const l=`${e}:${i}`;Q_.has(l)||o.current||(o.current=!0,Q_.add(l),Do("experiment_exposure",{experiment_id:e,variant:i}))},[e]);return a.useEffect(()=>{if(typeof window>"u")return;const l=_c.run({key:e,variations:t}).value;n(l),s(l)},[e]),r}const vG=({children:e})=>{var s;const{user:t,isAuthenticated:r}=Aa(),n=((s=t==null?void 0:t.tier)==null?void 0:s.toLowerCase())??"free",o=["free","starter","pro","enterprise"].includes(n)?n:"free";return a.useEffect(()=>{hG(),_U({isOn:i=>_c.isOn(i)})},[]),a.useEffect(()=>{_c.setAttributes({id:(t==null?void 0:t.email)??"",loggedIn:r,tier:o})},[t==null?void 0:t.email,r,o]),a.useEffect(()=>{},[o]),c.jsx(NP.Provider,{value:{tier:o,isAuthenticated:r},children:e})},bG={selectedShippingOption:void 0,setSelectedShippingOption:()=>{}},lI=a.createContext(bG),_G=({children:e})=>{const[t,r]=a.useState();return c.jsx(lI.Provider,{value:{selectedShippingOption:t,setSelectedShippingOption:r},children:e})},tne=()=>a.useContext(lI),yG={async getStatus(){return(await je.get("/license/status",{skipAuth:!0})).data},async activate(e){return(await je.post("/license/activate",{token:e},{skipAuth:!0})).data},async deactivate(e){return(await je.post("/license/deactivate",{token:e},{skipAuth:!0})).data}},ey=5e3,Pi=new Map;function xG(e){const t=Date.now(),r=Pi.get(e);if(r&&t-r<ey)return!1;if(Pi.set(e,t),Pi.size>50)for(const[n,o]of Pi)t-o>ey&&Pi.delete(n);return!0}function rm(e,t){const r=e instanceof Error?e.message:typeof e=="string"?e:"Unknown error",n=e instanceof Error?e.stack:void 0,o=`${t}::${r}`;if(!xG(o))return;const s={message:r,stack:n,source:t,url:typeof window<"u"?window.location.href:"",userAgent:typeof navigator<"u"?navigator.userAgent:"",timestamp:new Date().toISOString()};console.error(`[errorLogger:${t}]`,s)}function wG(){typeof window>"u"||(window.addEventListener("error",e=>{rm(e.error??e.message,"window-error")}),window.addEventListener("unhandledrejection",e=>{rm(e.reason,"unhandled-rejection")}))}class nm extends a.Component{constructor(){super(...arguments);Ct(this,"state",{hasError:!1,error:null});Ct(this,"handleReload",()=>{window.location.reload()});Ct(this,"handleHome",()=>{window.location.assign("/")})}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){const o=this.props.label?`[${this.props.label}] `:"",s=new Error(`${o}${r.message}

Component stack:${n.componentStack??""}`);s.stack=r.stack,rm(s,"react-boundary")}render(){return this.state.hasError?this.props.fallback?this.props.fallback:c.jsxs("div",{role:"alert",style:{maxWidth:640,margin:"80px auto",padding:"32px 24px",fontFamily:"Montserrat, system-ui, sans-serif",textAlign:"center"},children:[c.jsx("h1",{style:{fontSize:28,marginBottom:16},children:"Что-то пошло не так"}),c.jsx("p",{style:{fontSize:16,color:"#666",marginBottom:24},children:"Произошла непредвиденная ошибка. Мы получили уведомление и уже разбираемся."}),c.jsxs("div",{style:{display:"flex",gap:12,justifyContent:"center"},children:[c.jsx("button",{type:"button",onClick:this.handleReload,style:{padding:"10px 20px",border:"1px solid #1a1a1a",background:"#1a1a1a",color:"#fff",borderRadius:6,cursor:"pointer"},children:"Обновить страницу"}),c.jsx("button",{type:"button",onClick:this.handleHome,style:{padding:"10px 20px",border:"1px solid #1a1a1a",background:"transparent",color:"#1a1a1a",borderRadius:6,cursor:"pointer"},children:"На главную"})]}),!1]}):this.props.children}}function EG(){const e=Fr();return a.useEffect(()=>{$w(e.pathname+e.search)},[e.pathname,e.search]),null}var oe=typeof window<"u"?window:void 0,qt=typeof globalThis<"u"?globalThis:oe;typeof self>"u"&&(qt.self=qt),typeof File>"u"&&(qt.File=function(){});var Mr=qt==null?void 0:qt.navigator,Oe=qt==null?void 0:qt.document,Zt=qt==null?void 0:qt.location,om=qt==null?void 0:qt.fetch,sm=qt!=null&&qt.XMLHttpRequest&&"withCredentials"in new qt.XMLHttpRequest?qt.XMLHttpRequest:void 0,ty=qt==null?void 0:qt.AbortController,SG=qt==null?void 0:qt.CompressionStream,Er=Mr==null?void 0:Mr.userAgent,Je=oe??{},ry="1.372.10",hr={DEBUG:!1,LIB_VERSION:ry,LIB_NAME:"web",JS_SDK_VERSION:ry};function ny(e,t,r,n,o,s,i){try{var l=e[s](i),u=l.value}catch(d){return void r(d)}l.done?t(u):Promise.resolve(u).then(n,o)}function Gr(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var s=e.apply(t,r);function i(u){ny(s,n,o,i,l,"next",u)}function l(u){ny(s,n,o,i,l,"throw",u)}i(void 0)})}}function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Re.apply(null,arguments)}function cI(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function im(){return im=Gr(function*(e,t,r){t===void 0&&(t=!0);try{var n=new CompressionStream("gzip"),o=n.writable.getWriter(),s=o.write(new TextEncoder().encode(e)).then(()=>o.close()).catch(function(){var u=Gr(function*(d){try{yield o.abort(d)}catch{}throw d});return function(d){return u.apply(this,arguments)}}()),i=new Response(n.readable).blob(),[l]=yield Promise.all([i,s]);return l}catch(u){if(r!=null&&r.rethrow)throw u;return t&&console.error("Failed to gzip compress data",u),null}}),im.apply(this,arguments)}var CG=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],oy=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var r=e.toLowerCase();return CG.concat(t).some(n=>{var o=n.toLowerCase();return r.indexOf(o)!==-1})},PG=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function it(e,t){return e.indexOf(t)!==-1}var Qu=function(e){return e.trim()},am=function(e){return e.replace(/^\$/,"")},uI=Object.prototype,dI=uI.hasOwnProperty,ed=uI.toString,pt=Array.isArray||function(e){return ed.call(e)==="[object Array]"},On=e=>typeof e=="function",Dt=e=>e===Object(e)&&!pt(e),Is=e=>{if(Dt(e)){for(var t in e)if(dI.call(e,t))return!1;return!0}return!1},Le=e=>e===void 0,It=e=>ed.call(e)=="[object String]",kl=e=>It(e)&&e.trim().length===0,Vn=e=>e===null,at=e=>Le(e)||Vn(e),Yr=e=>ed.call(e)=="[object Number]"&&e==e,xs=e=>Yr(e)&&e>0,yn=e=>ed.call(e)==="[object Boolean]",RG=e=>e instanceof FormData,TG=e=>it(PG,e);function pI(e){return e===null||typeof e!="object"}function yc(e,t){return{}.toString.call(e)==="[object "+t+"]"}function Bg(e){return typeof Event<"u"&&function(t,r){try{return t instanceof r}catch{return!1}}(e,Event)}var IG=[!0,"true",1,"1","yes"],sp=e=>it(IG,e),$G=[!1,"false",0,"0","no"];function xn(e,t,r,n,o){return t>r&&(n.warn("min cannot be greater than max."),t=r),Yr(e)?e>r?(n.warn(" cannot be  greater than max: "+r+". Using max value instead."),r):t>e?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+o),xn(o||r,t,r,n))}class AG{constructor(t){this.$t={},this.zt=t.zt,this.Zt=xn(t.bucketSize,0,100,t.Gt),this.Qt=xn(t.refillRate,0,this.Zt,t.Gt),this.Jt=xn(t.refillInterval,0,864e5,t.Gt)}Kt(t,r){var n=Math.floor((r-t.lastAccess)/this.Jt);n>0&&(t.tokens=Math.min(t.tokens+n*this.Qt,this.Zt),t.lastAccess=t.lastAccess+n*this.Jt)}consumeRateLimit(t){var r,n=Date.now(),o=String(t),s=this.$t[o];return s?this.Kt(s,n):this.$t[o]=s={tokens:this.Zt,lastAccess:n},s.tokens===0||(s.tokens--,s.tokens===0&&((r=this.zt)==null||r.call(this,t)),s.tokens===0)}stop(){this.$t={}}}var ml,sy,ip,Lr="Mobile",xc="iOS",Mn="Android",Qs="Tablet",fI=Mn+" "+Qs,mI="iPad",hI="Apple",gI=hI+" Watch",Qi="Safari",ei="BlackBerry",vI="Samsung",bI=vI+"Browser",_I=vI+" Internet",jo="Chrome",jG=jo+" OS",yI=jo+" "+xc,Hg="Internet Explorer",xI=Hg+" "+Lr,Ug="Opera",OG=Ug+" Mini",Wg="Edge",wI="Microsoft "+Wg,Fs="Firefox",EI=Fs+" "+xc,ma="Nintendo",ha="PlayStation",Vs="Xbox",SI=Mn+" "+Lr,CI=Lr+" "+Qi,Vi="Windows",lm=Vi+" Phone",iy="Nokia",cm="Ouya",PI="Generic",NG=PI+" "+Lr.toLowerCase(),RI=PI+" "+Qs.toLowerCase(),um="Konqueror",mr="(\\d+(\\.\\d+)?)",ap=new RegExp("Version/"+mr),DG=new RegExp(Vs,"i"),kG=new RegExp(ha+" \\w+","i"),MG=new RegExp(ma+" \\w+","i"),qg=new RegExp(ei+"|PlayBook|BB10","i"),LG={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},TI=function(e,t){return t=t||"",it(e," OPR/")&&it(e,"Mini")?OG:it(e," OPR/")?Ug:qg.test(e)?ei:it(e,"IE"+Lr)||it(e,"WPDesktop")?xI:it(e,bI)?_I:it(e,Wg)||it(e,"Edg/")?wI:it(e,"FBIOS")?"Facebook "+Lr:it(e,"UCWEB")||it(e,"UCBrowser")?"UC Browser":it(e,"CriOS")?yI:it(e,"CrMo")||it(e,jo)?jo:it(e,Mn)&&it(e,Qi)?SI:it(e,"FxiOS")?EI:it(e.toLowerCase(),um.toLowerCase())?um:((r,n)=>n&&it(n,hI)||function(o){return it(o,Qi)&&!it(o,jo)&&!it(o,Mn)}(r))(e,t)?it(e,Lr)?CI:Qi:it(e,Fs)?Fs:it(e,"MSIE")||it(e,"Trident/")?Hg:it(e,"Gecko")?Fs:""},zG={[xI]:[new RegExp("rv:"+mr)],[wI]:[new RegExp(Wg+"?\\/"+mr)],[jo]:[new RegExp("("+jo+"|CrMo)\\/"+mr)],[yI]:[new RegExp("CriOS\\/"+mr)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+mr)],[Qi]:[ap],[CI]:[ap],[Ug]:[new RegExp("(Opera|OPR)\\/"+mr)],[Fs]:[new RegExp(Fs+"\\/"+mr)],[EI]:[new RegExp("FxiOS\\/"+mr)],[um]:[new RegExp("Konqueror[:/]?"+mr,"i")],[ei]:[new RegExp(ei+" "+mr),ap],[SI]:[new RegExp("android\\s"+mr,"i")],[_I]:[new RegExp(bI+"\\/"+mr)],[Hg]:[new RegExp("(rv:|MSIE )"+mr)],Mozilla:[new RegExp("rv:"+mr)]},FG=function(e,t){var r=TI(e,t),n=zG[r];if(Le(n))return null;for(var o=0;n.length>o;o++){var s=e.match(n[o]);if(s)return parseFloat(s[s.length-2])}return null},ay=[[new RegExp(Vs+"; "+Vs+" (.*?)[);]","i"),e=>[Vs,e&&e[1]||""]],[new RegExp(ma,"i"),[ma,""]],[new RegExp(ha,"i"),[ha,""]],[qg,[ei,""]],[new RegExp(Vi,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[lm,""];if(new RegExp(Lr).test(t)&&!/IEMobile\b/.test(t))return[Vi+" "+Lr,""];var r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){var n=LG[r[1]]||"";return/arm/i.test(t)&&(n="RT"),[Vi,n]}return[Vi,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[xc,[e[3],e[4],e[5]||"0"].join(".")]:[xc,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=Le(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Mn+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Mn+")","i"),e=>e&&e[2]?[Mn,[e[2],e[3],e[4]||"0"].join(".")]:[Mn,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[jG,""]],[/Linux|debian/i,["Linux",""]]],ly=function(e){return MG.test(e)?ma:kG.test(e)?ha:DG.test(e)?Vs:new RegExp(cm,"i").test(e)?cm:new RegExp("("+lm+"|WPDesktop)","i").test(e)?lm:/iPad/.test(e)?mI:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?gI:qg.test(e)?ei:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(iy,"i").test(e)?iy:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(Lr).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Mn:fI:new RegExp("(pda|"+Lr+")","i").test(e)?NG:new RegExp(Qs,"i").test(e)&&!new RegExp(Qs+" pc","i").test(e)?RI:""},VG=e=>e instanceof Error,II={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},BG=II.info;function $I(e){if(yn(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(pt(e))return{arrayValue:{values:e.map(t=>$I(t))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function cy(e){var t=[];for(var r in e){var n=e[r];Vn(n)||Le(n)||t.push({key:r,value:$I(n)})}return t}function HG(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return ip&&r.length===sy||(sy=r.length,ip=r.reduce((n,o)=>{ml||(ml={});var s=ml[o];if(s)n[s[0]]=s[1];else for(var i=e(o),l=i.length-1;l>=0;l--){var u=i[l],d=u==null?void 0:u.filename,p=t[o];if(d&&p){n[d]=p,ml[o]=[d,p];break}}return n},{})),ip}}class UG{constructor(t,r,n){n===void 0&&(n=[]),this.coercers=t,this.stackParser=r,this.modifiers=n}buildFromUnknown(t,r){r===void 0&&(r={});var n=r&&r.mechanism||{handled:!0,type:"generic"},o=this.buildCoercingContext(n,r,0).apply(t),s=this.buildParsingContext(r),i=this.parseStacktrace(o,s);return{$exception_list:this.convertToExceptionList(i,n),$exception_level:"error"}}modifyFrames(t){var r=this;return Gr(function*(){for(var n of t)n.stacktrace&&n.stacktrace.frames&&pt(n.stacktrace.frames)&&(n.stacktrace.frames=yield r.applyModifiers(n.stacktrace.frames));return t})()}coerceFallback(t){var r;return{type:"Error",value:"Unknown error",stack:(r=t.syntheticException)==null?void 0:r.stack,synthetic:!0}}parseStacktrace(t,r){var n,o;return t.cause!=null&&(n=this.parseStacktrace(t.cause,r)),t.stack!=""&&t.stack!=null&&(o=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?r.skipFirstLines:0),r.chunkIdMap)),Re({},t,{cause:n,stack:o})}applyChunkIds(t,r){return t.map(n=>(n.filename&&r&&(n.chunk_id=r[n.filename]),n))}applyCoercers(t,r){for(var n of this.coercers)if(n.match(t))return n.coerce(t,r);return this.coerceFallback(r)}applyModifiers(t){var r=this;return Gr(function*(){var n=t;for(var o of r.modifiers)n=yield o(n);return n})()}convertToExceptionList(t,r){var n,o,s,i={type:t.type,value:t.value,mechanism:{type:(n=r.type)!==null&&n!==void 0?n:"generic",handled:(o=r.handled)===null||o===void 0||o,synthetic:(s=t.synthetic)!==null&&s!==void 0&&s}};t.stack&&(i.stacktrace={type:"raw",frames:t.stack});var l=[i];return t.cause!=null&&l.push(...this.convertToExceptionList(t.cause,Re({},r,{handled:!0}))),l}buildParsingContext(t){var r;return{chunkIdMap:HG(this.stackParser),skipFirstLines:(r=t.skipFirstLines)!==null&&r!==void 0?r:1}}buildCoercingContext(t,r,n){n===void 0&&(n=0);var o=(s,i)=>{if(4>=i){var l=this.buildCoercingContext(t,r,i);return this.applyCoercers(s,l)}};return Re({},r,{syntheticException:n==0?r.syntheticException:void 0,mechanism:t,apply:s=>o(s,n),next:s=>o(s,n+1)})}}var ti="?";function dm(e,t,r,n,o){var s={platform:e,filename:t,function:r==="<anonymous>"?ti:r,in_app:!0};return Le(n)||(s.lineno=n),Le(o)||(s.colno=o),s}var AI=(e,t)=>{var r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:ti,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},WG=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,qG=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,GG=/\((\S*)(?::(\d+))(?::(\d+))\)/,KG=(e,t)=>{var r=WG.exec(e);if(r){var[,n,o,s]=r;return dm(t,n,ti,+o,+s)}var i=qG.exec(e);if(i){if(i[2]&&i[2].indexOf("eval")===0){var l=GG.exec(i[2]);l&&(i[2]=l[1],i[3]=l[2],i[4]=l[3])}var[u,d]=AI(i[1]||ti,i[2]);return dm(t,d,u,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}},XG=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,YG=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,JG=(e,t)=>{var r=XG.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=YG.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var o=r[3],s=r[1]||ti;return[s,o]=AI(s,o),dm(t,o,s,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},uy=/\(error: (.*)\)/;class ZG{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){var n=It(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var r=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?r+": "+t.message:r}isDOMException(t){return yc(t,"DOMException")}isDOMError(t){return yc(t,"DOMError")}}class QG{match(t){return(r=>r instanceof Error)(t)}coerce(t,r){return{type:this.getType(t),value:this.getMessage(t,r),stack:this.getStack(t),cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,r){var n=t.message;return String(n.error&&typeof n.error.message=="string"?n.error.message:n)}getStack(t){return t.stacktrace||t.stack||void 0}}class e9{constructor(){}match(t){return yc(t,"ErrorEvent")&&t.error!=null}coerce(t,r){var n;return r.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}var t9=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class r9{match(t){return typeof t=="string"}coerce(t,r){var n,[o,s]=this.getInfos(t);return{type:o??"Error",value:s??t,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}getInfos(t){var r="Error",n=t,o=t.match(t9);return o&&(r=o[1],n=o[2]),[r,n]}}var n9=["fatal","error","warning","log","info","debug"];function jI(e,t){t===void 0&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var o=r.slice(0,n).join(", ");if(t>=o.length)return n===r.length?o:o.length>t?o.slice(0,t)+"...":o}return""}class o9{match(t){return typeof t=="object"&&t!==null}coerce(t,r){var n,o=this.getErrorPropertyFromObject(t);return o?r.apply(o):{type:this.getType(t),value:this.getValue(t),stack:(n=r.syntheticException)==null?void 0:n.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return Bg(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var r="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(r+=" with message: '"+t.message+"'"),r}if("message"in t&&typeof t.message=="string")return t.message;var n=this.getObjectClassName(t);return(n&&n!=="Object"?"'"+n+"'":"Object")+" captured as exception with keys: "+jI(t)}isSeverityLevel(t){return It(t)&&!kl(t)&&n9.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var r in t)if({}.hasOwnProperty.call(t,r)){var n=t[r];if(VG(n))return n}}getObjectClassName(t){try{var r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}}class s9{match(t){return Bg(t)}coerce(t,r){var n,o=t.constructor.name;return{type:o,value:o+" captured as exception with keys: "+jI(t),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class i9{match(t){return pI(t)}coerce(t,r){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class a9{match(t){return yc(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!Bg(t))return!1;try{var r=t.detail;return r!=null&&typeof r=="object"&&"reason"in r}catch{return!1}}coerce(t,r){var n,o=this.getUnhandledRejectionReason(t);return pI(o)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(o),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}:r.apply(o)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var wc="$message",Ec="$timestamp",l9=new Set([wc,Ec]),lp={enabled:!0,max_bytes:32768};function Sc(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:lp.enabled,max_bytes:u9(e.max_bytes,lp.max_bytes)}:Re({},lp)}class c9{constructor(t){this.Yt=[],this.Xt=0,this.qt=Sc(t)}setConfig(t){this.qt=Sc(t),this.er()}add(t){var r=function(o){var s=function(p){var f=new WeakSet;try{return JSON.stringify(p,(m,h)=>{if(typeof h=="bigint")return h.toString();if(typeof h!="function"&&typeof h!="symbol"){if(h instanceof Date)return h.toISOString();if(h instanceof Error)return{name:h.name,message:h.message,stack:h.stack};if(h&&typeof h=="object"){if(f.has(h))return"[Circular]";f.add(h)}return h}})}catch{return}}(o);if(s)try{var i=JSON.parse(s);if(!Dt(i))return;var l=i,u=l[wc],d=l[Ec];return!It(u)||u.trim().length===0||!It(d)&&!Yr(d)?void 0:{step:l,json:s}}catch{return}}(t);if(r){var n=function(o){if(typeof TextEncoder<"u")return new TextEncoder().encode(o).length;for(var s=encodeURIComponent(o),i=0,l=0;s.length>l;l++)s[l]==="%"?(i+=1,l+=2):i+=1;return i}(r.json);n>this.qt.max_bytes||(this.Yt.push({step:r.step,bytes:n}),this.Xt+=n,this.er())}}getAttachable(){return this.Yt.map(t=>t.step)}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var t=this.Yt.shift();t&&(this.Xt-=t.bytes)}}}function u9(e,t){if(!Yr(e)||e===1/0||e===-1/0)return t;var r=Math.floor(e);return 0>r?t:r}var OI=function(e,t){var{debugEnabled:r}=t===void 0?{}:t,n={k(o){if(oe&&(hr.DEBUG||Je.POSTHOG_DEBUG||r)&&!Le(oe.console)&&oe.console){for(var s=("__rrweb_original__"in oe.console[o])?oe.console[o].__rrweb_original__:oe.console[o],i=arguments.length,l=new Array(i>1?i-1:0),u=1;i>u;u++)l[u-1]=arguments[u];s(e,...l)}},debug(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];n.k("debug",...s)},info(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];n.k("log",...s)},warn(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];n.k("warn",...s)},error(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];n.k("error",...s)},critical(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];console.error(e,...s)},uninitializedWarning(o){n.error("You must initialize PostHog before calling "+o)},createLogger:(o,s)=>OI(e+" "+o,s)};return n},De=OI("[PostHog.js]"),St=De.createLogger,d9=St("[ExternalScriptsLoader]"),cp=(e,t,r)=>{if(e.config.disable_external_dependency_loading)return d9.warn(t+" was requested but loading of external scripts is disabled."),r("Loading of external scripts is disabled");var n=Oe==null?void 0:Oe.querySelectorAll("script");if(n){for(var o,s=function(){if(n[i].src===t){var u=n[i];return u.__posthog_loading_callback_fired?{v:r()}:(u.addEventListener("load",d=>{u.__posthog_loading_callback_fired=!0,r(void 0,d)}),u.onerror=d=>r(d),{v:void 0})}},i=0;n.length>i;i++)if(o=s())return o.v}var l=()=>{if(!Oe)return r("document not found");var u=Oe.createElement("script");if(u.type="text/javascript",u.crossOrigin="anonymous",u.src=t,u.onload=f=>{u.__posthog_loading_callback_fired=!0,r(void 0,f)},u.onerror=f=>r(f),e.config.prepare_external_dependency_script&&(u=e.config.prepare_external_dependency_script(u)),!u)return r("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")Oe.head.appendChild(u);else{var d,p=Oe.querySelectorAll("body > script");p.length>0?(d=p[0].parentNode)==null||d.insertBefore(u,p[0]):Oe.body.appendChild(u)}};Oe!=null&&Oe.body?l():Oe==null||Oe.addEventListener("DOMContentLoaded",l)};Je.__PosthogExtensions__=Je.__PosthogExtensions__||{},Je.__PosthogExtensions__.loadExternalDependency=(e,t,r)=>{if(t!=="remote-config"){var n;if(e.config.__preview_external_dependency_versioned_paths)n=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var o="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var s=3e5;o=o+"&t="+Math.floor(Date.now()/s)*s}n=e.requestRouter.endpointFor("assets",o)}cp(e,n,r)}else{var i=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");cp(e,i,r)}},Je.__PosthogExtensions__.loadSiteApp=(e,t,r)=>{var n=e.requestRouter.endpointFor("api",t);cp(e,n,r)};var NI="$people_distinct_id",Cc="$device_id",Bi="__alias",Hi="__timers",pm="$autocapture_disabled_server_side",fm="$heatmaps_enabled_server_side",mm="$exception_capture_enabled_server_side",hm="$error_tracking_suppression_rules",gm="$error_tracking_capture_extension_exceptions",vm="$web_vitals_enabled_server_side",Gg="$dead_clicks_enabled_server_side",bm="$product_tours_enabled_server_side",_m="$web_vitals_allowed_metrics",Ui="$session_recording_remote_config",DI="$replay_override_sampling",kI="$replay_override_linked_flag",MI="$replay_override_url_trigger",LI="$replay_override_event_trigger",Pc="$sesid",Kg="$session_is_sampled",$s="$enabled_feature_flags",Ml="$active_feature_flags",Wi="$early_access_features",ym="$feature_flag_details",xm="$feature_flag_payloads",wm="$feature_flag_request_id",jn="$override_feature_flags",ws="$override_feature_flag_payloads",qi="$stored_person_properties",So="$stored_group_properties",Em="$surveys",Sm="$surveys_activated",Ll="ph_product_tours",ea="$flag_call_reported",Cm="$flag_call_reported_session_id",Pm="$feature_flag_errors",Rc="$feature_flag_evaluated_at",rn="$user_state",Rm="$client_session_props",Tm="$capture_rate_limit",Im="$initial_campaign_params",$m="$initial_referrer_info",Tc="$initial_person_info",Ic="$epp",zI="__POSTHOG_TOOLBAR__",hl="$posthog_cookieless",FI="$sdk_debug_extensions_init_method",VI="$sdk_debug_extensions_init_time_ms",BI="$sdk_debug_recording_script_not_loaded",Xg="PostHog loadExternalDependency extension not found.",Co="on_reject",Dn="always",fs="anonymous",ms="identified",Am="identified_only",$c="visibilitychange",Ac="beforeunload",Es="$pageview",up="$pageleave",dp="$identify",dy="$groupidentify";function gl(e,t){pt(e)&&e.forEach(t)}function wt(e,t){if(!at(e))if(pt(e))e.forEach(t);else if(RG(e))e.forEach((n,o)=>t(n,o));else for(var r in e)dI.call(e,r)&&t(e[r],r)}var At=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];for(var o of r)for(var s in o)o[s]!==void 0&&(e[s]=o[s]);return e};function zl(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}var py=function(e){try{return e()}catch{return}},p9=function(e){return function(){try{for(var t=arguments.length,r=new Array(t),n=0;t>n;n++)r[n]=arguments[n];return e.apply(this,r)}catch(o){De.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),De.critical(o)}}},Yg=function(e){var t={};return wt(e,function(r,n){(It(r)&&r.length>0||Yr(r))&&(t[n]=r)}),t},f9=["herokuapp.com","vercel.app","netlify.app"];function m9(e){var t=e==null?void 0:e.hostname;if(!It(t))return!1;var r=t.split(".").slice(-2).join(".");for(var n of f9)if(r===n)return!1;return!0}function zt(e,t,r,n){var{capture:o=!1,passive:s=!0}=n??{};e==null||e.addEventListener(t,r,{capture:o,passive:s})}function HI(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Yr(e)&&isFinite(e)&&Math.floor(e)===e});class jc{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,r,n,o){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(o)||0>t||0>r||0>n||0>o||t>0xffffffffffff||r>4095||n>1073741823||o>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|r>>>8,s[7]=r,s[8]=128|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=o>>>24,s[13]=o>>>16,s[14]=o>>>8,s[15]=o,new jc(s)}toString(){for(var t="",r=0;this.bytes.length>r;r++)t=t+(this.bytes[r]>>>4).toString(16)+(15&this.bytes[r]).toString(16),r!==3&&r!==5&&r!==7&&r!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new jc(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var r=0;16>r;r++){var n=this.bytes[r]-t.bytes[r];if(n!==0)return Math.sign(n)}return 0}}class h9{constructor(){this.S=0,this.C=0,this.I=new g9}generate(){var t=this.generateOrAbort();if(Le(t)){this.S=0;var r=this.generateOrAbort();if(Le(r))throw new Error("Could not generate UUID after timestamp reset");return r}return t}generateOrAbort(){var t=Date.now();if(t>this.S)this.S=t,this.T();else{if(this.S>=t+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.T())}return jc.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var fy,UI=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};oe&&!Le(oe.crypto)&&crypto.getRandomValues&&(UI=e=>crypto.getRandomValues(e));class g9{constructor(){this.M=new Uint32Array(8),this.O=1/0}nextUint32(){return this.M.length>this.O||(UI(this.M),this.O=0),this.M[this.O++]}}var Zn=()=>v9().toString(),v9=()=>(fy||(fy=new h9)).generate(),Ri="",b9=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,bn={R:()=>!!Oe,D(e){De.error("cookieStore error: "+e)},A(e){if(Oe){try{for(var t=e+"=",r=Oe.cookie.split(";").filter(s=>s.length),n=0;r.length>n;n++){for(var o=r[n];o.charAt(0)==" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return decodeURIComponent(o.substring(t.length,o.length))}}catch{}return null}},F(e){var t;try{t=JSON.parse(bn.A(e))||{}}catch{}return t},N(e,t,r,n,o){if(Oe)try{var s="",i="",l=function(p,f){if(f){var m=function(v,g){if(g===void 0&&(g=Oe),Ri)return Ri;if(!g||["localhost","127.0.0.1"].includes(v))return"";for(var b=v.split("."),_=Math.min(b.length,8),y="dmn_chk_"+Zn();!Ri&&_--;){var x=b.slice(_).join("."),S=y+"=1;domain=."+x+";path=/";g.cookie=S+";max-age=3",g.cookie.includes(y)&&(g.cookie=S+";max-age=0",Ri=x)}return Ri}(p);if(!m){var h=(v=>{var g=v.match(b9);return g?g[0]:""})(p);h!==m&&De.info("Warning: cookie subdomain discovery mismatch",h,m),m=h}return m?"; domain=."+m:""}return""}(Oe.location.hostname,n);if(r){var u=new Date;u.setTime(u.getTime()+864e5*r),s="; expires="+u.toUTCString()}o&&(i="; secure");var d=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+l+i;return d.length>3686.4&&De.warn("cookieStore warning: large cookie, len="+d.length),Oe.cookie=d,d}catch{return}},q(e,t){if(Oe!=null&&Oe.cookie)try{bn.N(e,"",-1,t)}catch{return}}},pp=null,Tt={R(){if(!Vn(pp))return pp;var e=!0;if(Le(oe))e=!1;else try{var t="__mplssupport__";Tt.N(t,"xyz"),Tt.A(t)!=='"xyz"'&&(e=!1),Tt.q(t)}catch{e=!1}return e||De.error("localStorage unsupported; falling back to cookie store"),pp=e,e},D(e){De.error("localStorage error: "+e)},A(e){try{return oe==null?void 0:oe.localStorage.getItem(e)}catch(t){Tt.D(t)}return null},F(e){try{return JSON.parse(Tt.A(e))||{}}catch{}return null},N(e,t){try{oe==null||oe.localStorage.setItem(e,JSON.stringify(t))}catch(r){Tt.D(r)}},q(e){try{oe==null||oe.localStorage.removeItem(e)}catch(t){Tt.D(t)}}},_9=[Cc,"distinct_id",Pc,Kg,Ic,Tc,rn],vl={},y9={R:()=>!0,D(e){De.error("memoryStorage error: "+e)},A:e=>vl[e]||null,F:e=>vl[e]||null,N(e,t){vl[e]=t},q(e){delete vl[e]}},xo=null,Qt={R(){if(!Vn(xo))return xo;if(xo=!0,Le(oe))xo=!1;else try{var e="__support__";Qt.N(e,"xyz"),Qt.A(e)!=='"xyz"'&&(xo=!1),Qt.q(e)}catch{xo=!1}return xo},D(e){De.error("sessionStorage error: ",e)},A(e){try{return oe==null?void 0:oe.sessionStorage.getItem(e)}catch(t){Qt.D(t)}return null},F(e){try{return JSON.parse(Qt.A(e))||null}catch{}return null},N(e,t){try{oe==null||oe.sessionStorage.setItem(e,JSON.stringify(t))}catch(r){Qt.D(r)}},q(e){try{oe==null||oe.sessionStorage.removeItem(e)}catch(t){Qt.D(t)}}};class x9{constructor(t){this._instance=t}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===Dn||this.isRejected()||this.consent===-1&&this.qt.cookieless_mode===Co}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.qt.opt_out_capturing_by_default}optInOut(t){this.nr.N(this.sr,t?1:0,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:t,opt_out_capturing_cookie_prefix:r,consent_persistence_name:n}=this._instance.config;return n||(r?r+t:"__ph_opt_in_out_"+t)}get ir(){var t=this.nr.A(this.sr);return sp(t)?1:it($G,t)?0:-1}get nr(){var t=this.qt.opt_out_capturing_persistence_type,r=t==="localStorage"?Tt:bn;if(!this.ar||this.ar!==r){this.ar=r;var n=t==="localStorage"?bn:Tt;n.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(sp(n.A(this.sr))),n.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[Mr==null?void 0:Mr.doNotTrack,Mr==null?void 0:Mr.msDoNotTrack,Je.doNotTrack].some(t=>sp(t))}}var bl=St("[Dead Clicks]"),w9=()=>!0,E9=e=>{var t,r=!((t=e.instance.persistence)==null||!t.get_property(Gg)),n=e.instance.config.capture_dead_clicks;return yn(n)?n:!!Dt(n)||r};class my{get lazyLoadedDeadClicksAutocapture(){return this.ur}constructor(t,r,n){this.instance=t,this.isEnabled=r,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[Gg]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.lr(()=>{this.hr()}):this.stop()}lr(t){var r,n;(r=Je.__PosthogExtensions__)!=null&&r.initDeadClicksAutocapture&&t(),(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",o=>{o?bl.error("failed to load script",o):t()})}hr(){var t;if(Oe){if(!this.ur&&(t=Je.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var r=Dt(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};r.__onCapture=this.onCapture,this.ur=Je.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,r),this.ur.start(Oe),bl.info("starting...")}}else bl.error("`document` not found. Cannot start.")}stop(){this.ur&&(this.ur.stop(),this.ur=void 0,bl.info("stopping..."))}}var fp=St("[SegmentIntegration]"),WI="posthog-js";function qI(e,t){var{organization:r,projectId:n,prefix:o,severityAllowList:s=["error"],sendExceptionsToPostHog:i=!0}=t===void 0?{}:t;return l=>{var u,d,p,f,m;if(s!=="*"&&!s.includes(l.level)||!e.__loaded)return l;l.tags||(l.tags={});var h=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());l.tags["PostHog Person URL"]=h,e.sessionRecordingStarted()&&(l.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var v,g=((u=l.exception)==null?void 0:u.values)||[],b=g.map(y=>Re({},y,{stacktrace:y.stacktrace?Re({},y.stacktrace,{type:"raw",frames:(y.stacktrace.frames||[]).map(x=>Re({},x,{platform:"web:javascript"}))}):void 0})),_={$exception_message:((d=g[0])==null?void 0:d.value)||l.message,$exception_type:(p=g[0])==null?void 0:p.type,$exception_level:l.level,$exception_list:b,$sentry_event_id:l.event_id,$sentry_exception:l.exception,$sentry_exception_message:((f=g[0])==null?void 0:f.value)||l.message,$sentry_exception_type:(m=g[0])==null?void 0:m.type,$sentry_tags:l.tags};return r&&n&&(_.$sentry_url=(o||"https://sentry.io/organizations/")+r+"/issues/?project="+n+"&query="+l.event_id),i&&((v=e.exceptions)==null||v.sendExceptionEvent(_)),l}}class S9{constructor(t,r,n,o,s,i){this.name=WI,this.setupOnce=function(l){l(qI(t,{organization:r,projectId:n,prefix:o,severityAllowList:s,sendExceptionsToPostHog:i==null||i}))}}}class hy{constructor(t){this.cr=(r,n,o)=>{o&&(o.noSessionId||o.activityTimeout||o.sessionPastMaximumLength)&&(De.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:r,changeReason:o}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.vr()}vr(){var t;this.pr=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.cr)}destroy(){var t;(t=this.pr)==null||t.call(this),this.pr=void 0}doPageView(t,r){var n,o=this.gr(t,r);return this.dr={pathname:(n=oe==null?void 0:oe.location.pathname)!==null&&n!==void 0?n:"",pageViewId:r,timestamp:t},this._instance.scrollManager.resetContext(),o}doPageLeave(t){var r;return this.gr(t,(r=this.dr)==null?void 0:r.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.dr)==null?void 0:t.pageViewId}}gr(t,r){var n=this.dr;if(!n)return{$pageview_id:r};var o={$pageview_id:r,$prev_pageview_id:n.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:i,lastScrollY:l,maxScrollY:u,maxContentHeight:d,lastContentY:p,maxContentY:f}=s;if(!(Le(i)||Le(l)||Le(u)||Le(d)||Le(p)||Le(f))){i=Math.ceil(i),l=Math.ceil(l),u=Math.ceil(u),d=Math.ceil(d),p=Math.ceil(p),f=Math.ceil(f);var m=i>1?xn(l/i,0,1,De):1,h=i>1?xn(u/i,0,1,De):1,v=d>1?xn(p/d,0,1,De):1,g=d>1?xn(f/d,0,1,De):1;o=At(o,{$prev_pageview_last_scroll:l,$prev_pageview_last_scroll_percentage:m,$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:v,$prev_pageview_max_content:f,$prev_pageview_max_content_percentage:g})}}return n.pathname&&(o.$prev_pageview_pathname=n.pathname),n.timestamp&&(o.$prev_pageview_duration=(t.getTime()-n.timestamp.getTime())/1e3),o}}var C9={[NI]:{exposure:"hidden"},[Bi]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[Hi]:{exposure:"hidden"},[pm]:{exposure:"event"},[fm]:{exposure:"hidden"},[mm]:{exposure:"event"},[hm]:{exposure:"hidden"},[gm]:{exposure:"event"},[vm]:{exposure:"event"},[Gg]:{exposure:"event"},[bm]:{exposure:"hidden"},[_m]:{exposure:"event"},[Ui]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[Pc]:{exposure:"hidden"},[Kg]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[$s]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!Dt(e))return{};for(var t={},r=Object.keys(e),n=0;r.length>n;n++)t["$feature/"+r[n]]=e[r[n]];return t}},[Ml]:{exposure:"event"},[Wi]:{exposure:"hidden"},[ym]:{exposure:"hidden"},[xm]:{exposure:"event"},[wm]:{exposure:"event"},[jn]:{exposure:"event"},[ws]:{exposure:"hidden"},[qi]:{exposure:"hidden"},[So]:{exposure:"hidden"},[Em]:{exposure:"hidden"},[Sm]:{exposure:"event"},[Ll]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[ea]:{exposure:"hidden"},[Cm]:{exposure:"hidden"},[Pm]:{exposure:"hidden"},[Rc]:{exposure:"hidden"},[rn]:{exposure:"hidden"},[Rm]:{exposure:"hidden"},[Tm]:{exposure:"hidden"},[Im]:{exposure:"hidden"},[$m]:{exposure:"hidden"},[Tc]:{exposure:"hidden"},[Ic]:{exposure:"hidden"},[DI]:{exposure:"event"},[kI]:{exposure:"event"},[MI]:{exposure:"event"},[LI]:{exposure:"event"},[FI]:{exposure:"event"},[VI]:{exposure:"event"},[BI]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},P9=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Oc=e=>{var t=Oe==null?void 0:Oe.createElement("a");return Le(t)?null:(t.href=e,t)},Nc=function(e,t){for(var r,n=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),o=0;n.length>o;o++){var s=n[o].split("=");if(s[0]===t){r=s;break}}if(!pt(r)||2>r.length)return"";var i=r[1];try{i=decodeURIComponent(i)}catch{De.error("Skipping decoding for malformed query param: "+i)}return i.replace(/\+/g," ")},ga=function(e,t,r){if(!e||!t||!t.length)return e;for(var n=e.split("#"),o=n[1],s=(n[0]||"").split("?"),i=s[1],l=s[0],u=(i||"").split("&"),d=[],p=0;u.length>p;p++){var f=u[p].split("=");pt(f)&&(t.includes(f[0])?d.push(f[0]+"="+r):d.push(u[p]))}var m=l;return i!=null&&(m+="?"+d.join("&")),o!=null&&(m+="#"+o),m},Dc=function(e,t){var r=e.match(new RegExp(t+"=([^&]*)"));return r?r[1]:null},_l="https?://(.*)",ri=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],R9=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...ri],va="<masked>",T9=["li_fat_id"];function GI(e,t,r){if(!Oe)return{};var n,o=t?[...ri,...r||[]]:[],s=KI(ga(Oe.URL,o,va),e),i=(n={},wt(T9,function(l){var u=bn.A(l);n[l]=u||null}),n);return At(i,s)}function KI(e,t){var r=R9.concat(t||[]),n={};return wt(r,function(o){var s=Nc(e,o);n[o]=s||null}),n}function XI(e){var t=function(s){return s?s.search(_l+"google.([^/?]*)")===0?"google":s.search(_l+"bing.com")===0?"bing":s.search(_l+"yahoo.com")===0?"yahoo":s.search(_l+"duckduckgo.com")===0?"duckduckgo":null:null}(e),r=t!="yahoo"?"q":"p",n={};if(!Vn(t)){n.$search_engine=t;var o=Oe?Nc(Oe.referrer,r):"";o.length&&(n.ph_keyword=o)}return n}function gy(){return navigator.language||navigator.userLanguage}var kc="$direct";function YI(){return(Oe==null?void 0:Oe.referrer)||kc}function JI(e,t){var r=e?[...ri,...t||[]]:[],n=Zt==null?void 0:Zt.href.substring(0,1e3);return{r:YI().substring(0,1e3),u:n?ga(n,r,va):void 0}}function ZI(e){var t,{r,u:n}=e,o={$referrer:r,$referring_domain:r==null?void 0:r==kc?kc:(t=Oc(r))==null?void 0:t.host};if(n){o.$current_url=n;var s=Oc(n);o.$host=s==null?void 0:s.host,o.$pathname=s==null?void 0:s.pathname;var i=KI(n);At(o,i)}if(r){var l=XI(r);At(o,l)}return o}function QI(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function I9(){try{return new Date().getTimezoneOffset()}catch{return}}var $9=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class mp{constructor(t,r){this.qt=t,this.props={},this.mr=!1,this.yr=(n=>{var o="";return n.token&&(o=n.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),n.persistence_name?"ph_"+n.persistence_name:"ph_"+o+"_posthog"})(t),this.nr=this.br(t),this.load(),t.debug&&De.info("Persistence loaded",t.persistence,Re({},this.props)),this.update_config(t,t,r),this.save()}isDisabled(){return!!this._r}br(t){$9.indexOf(t.persistence.toLowerCase())===-1&&(De.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var r=function(o){o===void 0&&(o=[]);var s=[..._9,...o];return Re({},Tt,{F(i){try{var l={};try{l=bn.F(i)||{}}catch{}var u=At(l,JSON.parse(Tt.A(i)||"{}"));return Tt.N(i,u),u}catch{}return null},N(i,l,u,d,p,f){try{Tt.N(i,l,void 0,void 0,f);var m={};s.forEach(h=>{l[h]&&(m[h]=l[h])}),Object.keys(m).length&&bn.N(i,m,u,d,p,f)}catch(h){Tt.D(h)}},q(i,l){try{oe==null||oe.localStorage.removeItem(i),bn.q(i,l)}catch(u){Tt.D(u)}}})}(t.cookie_persisted_properties||[]),n=t.persistence.toLowerCase();return n==="localstorage"&&Tt.R()?Tt:n==="localstorage+cookie"&&r.R()?r:n==="sessionstorage"&&Qt.R()?Qt:n==="memory"?y9:n==="cookie"?bn:r.R()?r:bn}wr(t){var r=t??this.qt.feature_flag_cache_ttl_ms;if(!r||0>=r)return!1;var n=this.props[Rc];return!n||typeof n!="number"||Date.now()-n>r}properties(){var t={};return wt(this.props,(r,n)=>{var o=(s=>{var i=C9[s];if(i)return i;for(var[l,u]of P9)if(s.indexOf(l)===0)return u})(n);if((o==null?void 0:o.exposure)==="derived"){if(o.shouldSkipFromEventProperties!=null&&o.shouldSkipFromEventProperties(r,n===$s?()=>this.wr():()=>!1))return;o.transformToEventProperties&&At(t,o.transformToEventProperties(r))}else o&&o.exposure!=="event"||(t[n]=r)}),t}load(){if(!this._r){var t=this.nr.F(this.yr);t&&(this.props=At({},t))}}save(){this._r||this.nr.N(this.yr,this.props,this.Sr,this.kr,this.Cr,this.qt.debug)}remove(){this.nr.q(this.yr,!1),this.nr.q(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(t,r,n){if(Dt(t)){Le(r)&&(r="None"),this.Sr=Le(n)?this.Ir:n;var o=!1;if(wt(t,(s,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==r||(this.Tr(i,s),o=!0)}),o)return this.save(),!0}return!1}register(t,r){if(Dt(t)){this.Sr=Le(r)?this.Ir:r;var n=!1;if(wt(t,(o,s)=>{t.hasOwnProperty(s)&&this.props[s]!==o&&(this.Tr(s,o),n=!0)}),n)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.Er(t),this.save())}update_campaign_params(){if(!this.mr){var t=GI(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);Is(Yg(t))||this.register(t),this.mr=!0}}update_search_keyword(){var t;this.register((t=Oe==null?void 0:Oe.referrer)?XI(t):{})}update_referrer_info(){var t;this.register_once({$referrer:YI(),$referring_domain:Oe!=null&&Oe.referrer&&((t=Oc(Oe.referrer))==null?void 0:t.host)||kc},void 0)}set_initial_person_info(){this.props[Im]||this.props[$m]||this.register_once({[Tc]:JI(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};wt([$m,Im],i=>{var l=this.props[i];l&&wt(l,function(u,d){t["$initial_"+am(d)]=u})});var r,n,o=this.props[Tc];if(o){var s=(r=ZI(o),n={},wt(r,function(i,l){n["$initial_"+am(l)]=i}),n);At(t,s)}return t}safe_merge(t){return wt(this.props,function(r,n){n in t||(t[n]=r)}),t}update_config(t,r,n){if(this.Ir=this.Sr=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!n),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==r.persistence||!((i,l)=>{if(i.length!==l.length)return!1;var u=[...i].sort(),d=[...l].sort();return u.every((p,f)=>p===d[f])})(t.cookie_persisted_properties||[],r.cookie_persisted_properties||[])){var o=this.br(t),s=this.props;this.clear(),this.nr=o,this.props=s,this.save()}}set_disabled(t){this._r=t,this._r?this.remove():this.save()}set_cross_subdomain(t){t!==this.kr&&(this.kr=t,this.remove(),this.save())}set_secure(t){t!==this.Cr&&(this.Cr=t,this.remove(),this.save())}set_event_timer(t,r){var n=this.props[Hi]||{};n[t]=r,this.Tr(Hi,n),this.save()}remove_event_timer(t){var r=this.props[Hi]||{},n=r[t];return Le(n)||(delete r[t],this.Tr(Hi,r),this.save()),n}get_property(t){return this.props[t]}set_property(t,r){this.Tr(t,r),this.save()}Tr(t,r){this.props[t]=r}Er(t){delete this.props[t]}}var Ss={Activation:"events",Cancellation:"cancelEvents"},Fl={Popover:"popover",API:"api",Widget:"widget"},As={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Vl={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Mc={Popover:"popover",Inline:"inline"},e$={SHOWN:"product tour shown"},jm={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},vy=St("[RateLimiter]");class A9{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=r=>{var n=r.text;if(n&&n.length)try{(JSON.parse(n).quota_limited||[]).forEach(o=>{vy.info((o||"events")+" is quota limited."),this.serverLimits[o]=new Date().getTime()+6e4})}catch(o){return void vy.warn('could not rate limit - continuing. Error: "'+(o==null?void 0:o.message)+'"',{text:n})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var r,n,o;t===void 0&&(t=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:i}=this,l=new Date().getTime(),u=(r=(n=this.instance.persistence)==null?void 0:n.get_property(Tm))!==null&&r!==void 0?r:{tokens:s,last:l};u.tokens+=(l-u.last)/1e3*i,u.last=l,u.tokens>s&&(u.tokens=s);var d=1>u.tokens;return d||t||(u.tokens=Math.max(0,u.tokens-1)),!d||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+i+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=d,(o=this.instance.persistence)==null||o.set_property(Tm,u),{isRateLimited:d,remainingTokens:u.tokens}}isServerRateLimited(t){var r=this.serverLimits[t||"events"]||!1;return r!==!1&&new Date().getTime()<r}}var Ti=St("[RemoteConfig]");class t${constructor(t){this._instance=t}get remoteConfig(){var t;return(t=Je._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Mr(t){var r,n;(r=Je.__PosthogExtensions__)!=null&&r.loadExternalDependency?(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"remote-config",()=>t(this.remoteConfig)):t()}Pr(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(r){t(r.json)}})}load(){try{if(this.remoteConfig)return Ti.info("Using preloaded remote config",this.remoteConfig),this.Rr(this.remoteConfig),void this.Or();if(this._instance.Lr())return void Ti.warn("Remote config is disabled. Falling back to local config.");this.Mr(t=>{if(!t)return Ti.info("No config found after loading remote JS config. Falling back to JSON."),void this.Pr(r=>{this.Rr(r),this.Or()});this.Rr(t),this.Or()})}catch(t){Ti.error("Error loading remote config",t)}}stop(){this.Fr&&(clearInterval(this.Fr),this.Fr=void 0)}refresh(){this._instance.Lr()||(Oe==null?void 0:Oe.visibilityState)==="hidden"||this._instance.reloadFeatureFlags()}Or(){var t;if(!this.Fr){var r=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;r!==0&&(this.Fr=setInterval(()=>{this.refresh()},r))}}Rr(t){var r;t||Ti.error("Failed to fetch remote config from PostHog."),this._instance.Rr(t??{}),(t==null?void 0:t.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(r=this._instance.featureFlags)==null||r.ensureFlagsLoaded())}}var nn={GZipJS:"gzip-js",Base64:"base64"},Xr=Uint8Array,Pr=Uint16Array,ni=Uint32Array,Jg=new Xr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Zg=new Xr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),by=new Xr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),r$=function(e,t){for(var r=new Pr(31),n=0;31>n;++n)r[n]=t+=1<<e[n-1];var o=new ni(r[30]);for(n=1;30>n;++n)for(var s=r[n];r[n+1]>s;++s)o[s]=s-r[n]<<5|n;return[r,o]},n$=r$(Jg,2),Om=n$[1];n$[0][28]=258,Om[258]=28;for(var _y=r$(Zg,0)[1],o$=new Pr(32768),Et=0;32768>Et;++Et){var hs=(43690&Et)>>>1|(21845&Et)<<1;o$[Et]=((65280&(hs=(61680&(hs=(52428&hs)>>>2|(13107&hs)<<2))>>>4|(3855&hs)<<4))>>>8|(255&hs)<<8)>>>1}var ta=function(e,t,r){for(var n=e.length,o=0,s=new Pr(t);n>o;++o)++s[e[o]-1];var i,l=new Pr(t);for(o=0;t>o;++o)l[o]=l[o-1]+s[o-1]<<1;for(i=new Pr(n),o=0;n>o;++o)i[o]=o$[l[e[o]-1]++]>>>15-e[o];return i},Vo=new Xr(288);for(Et=0;144>Et;++Et)Vo[Et]=8;for(Et=144;256>Et;++Et)Vo[Et]=9;for(Et=256;280>Et;++Et)Vo[Et]=7;for(Et=280;288>Et;++Et)Vo[Et]=8;var Lc=new Xr(32);for(Et=0;32>Et;++Et)Lc[Et]=5;var j9=ta(Vo,9),O9=ta(Lc,5),s$=function(e){return(e/8>>0)+(7&e&&1)},i$=function(e,t,r){(r==null||r>e.length)&&(r=e.length);var n=new(e instanceof Pr?Pr:e instanceof ni?ni:Xr)(r-t);return n.set(e.subarray(t,r)),n},$n=function(e,t,r){var n=t/8>>0;e[n]|=r<<=7&t,e[n+1]|=r>>>8},Ii=function(e,t,r){var n=t/8>>0;e[n]|=r<<=7&t,e[n+1]|=r>>>8,e[n+2]|=r>>>16},hp=function(e,t){for(var r=[],n=0;e.length>n;++n)e[n]&&r.push({s:n,f:e[n]});var o=r.length,s=r.slice();if(!o)return[new Xr(0),0];if(o==1){var i=new Xr(r[0].s+1);return i[r[0].s]=1,[i,1]}r.sort(function(w,I){return w.f-I.f}),r.push({s:-1,f:25001});var l=r[0],u=r[1],d=0,p=1,f=2;for(r[0]={s:-1,f:l.f+u.f,l,r:u};p!=o-1;)l=r[r[f].f>r[d].f?d++:f++],u=r[d!=p&&r[f].f>r[d].f?d++:f++],r[p++]={s:-1,f:l.f+u.f,l,r:u};var m=s[0].s;for(n=1;o>n;++n)s[n].s>m&&(m=s[n].s);var h=new Pr(m+1),v=Nm(r[p-1],h,0);if(v>t){n=0;var g=0,b=v-t,_=1<<b;for(s.sort(function(w,I){return h[I.s]-h[w.s]||w.f-I.f});o>n;++n){var y=s[n].s;if(t>=h[y])break;g+=_-(1<<v-h[y]),h[y]=t}for(g>>>=b;g>0;){var x=s[n].s;t>h[x]?g-=1<<t-h[x]++-1:++n}for(;n>=0&&g;--n){var S=s[n].s;h[S]==t&&(--h[S],++g)}v=t}return[new Xr(h),v]},Nm=function(e,t,r){return e.s==-1?Math.max(Nm(e.l,t,r+1),Nm(e.r,t,r+1)):t[e.s]=r},yy=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Pr(++t),n=0,o=e[0],s=1,i=function(u){r[n++]=u},l=1;t>=l;++l)if(e[l]==o&&l!=t)++s;else{if(!o&&s>2){for(;s>138;s-=138)i(32754);s>2&&(i(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(i(o),--s;s>6;s-=6)i(8304);s>2&&(i(s-3<<5|8208),s=0)}for(;s--;)i(o);s=1,o=e[l]}return[r.subarray(0,n),t]},$i=function(e,t){for(var r=0,n=0;t.length>n;++n)r+=e[n]*t[n];return r},Dm=function(e,t,r){var n=r.length,o=s$(t+2);e[o]=255&n,e[o+1]=n>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var s=0;n>s;++s)e[o+s+4]=r[s];return 8*(o+4+n)},xy=function(e,t,r,n,o,s,i,l,u,d,p){$n(t,p++,r),++o[256];for(var f=hp(o,15),m=f[0],h=f[1],v=hp(s,15),g=v[0],b=v[1],_=yy(m),y=_[0],x=_[1],S=yy(g),w=S[0],I=S[1],T=new Pr(19),R=0;y.length>R;++R)T[31&y[R]]++;for(R=0;w.length>R;++R)T[31&w[R]]++;for(var P=hp(T,7),$=P[0],A=P[1],k=19;k>4&&!$[by[k-1]];--k);var D,z,X,V,Y=d+5<<3,U=$i(o,Vo)+$i(s,Lc)+i,F=$i(o,m)+$i(s,g)+i+14+3*k+$i(T,$)+(2*T[16]+3*T[17]+7*T[18]);if(U>=Y&&F>=Y)return Dm(t,p,e.subarray(u,u+d));if($n(t,p,1+(U>F)),p+=2,U>F){D=ta(m,h),z=m,X=ta(g,b),V=g;var H=ta($,A);for($n(t,p,x-257),$n(t,p+5,I-1),$n(t,p+10,k-4),p+=14,R=0;k>R;++R)$n(t,p+3*R,$[by[R]]);p+=3*k;for(var ee=[y,w],O=0;2>O;++O){var M=ee[O];for(R=0;M.length>R;++R)$n(t,p,H[G=31&M[R]]),p+=$[G],G>15&&($n(t,p,M[R]>>>5&127),p+=M[R]>>>12)}}else D=j9,z=Vo,X=O9,V=Lc;for(R=0;l>R;++R)if(n[R]>255){var G;Ii(t,p,D[257+(G=n[R]>>>18&31)]),p+=z[G+257],G>7&&($n(t,p,n[R]>>>23&31),p+=Jg[G]);var L=31&n[R];Ii(t,p,X[L]),p+=V[L],L>3&&(Ii(t,p,n[R]>>>5&8191),p+=Zg[L])}else Ii(t,p,D[n[R]]),p+=z[n[R]];return Ii(t,p,D[256]),p+z[256]},N9=new ni([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D9=function(){for(var e=new ni(256),t=0;256>t;++t){for(var r=t,n=9;--n;)r=(1&r&&3988292384)^r>>>1;e[t]=r}return e}(),gp=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function k9(e,t){t===void 0&&(t={});var r=function(){var f=4294967295;return{p(m){for(var h=f,v=0;m.length>v;++v)h=D9[255&h^m[v]]^h>>>8;f=h},d(){return 4294967295^f}}}(),n=e.length;r.p(e);var o,s,i,l,u,d=(l=10+((o=t).filename&&o.filename.length+1||0),u=8,function(f,m,h,v,g,b){var _=f.length,y=new Xr(v+_+5*(1+Math.floor(_/7e3))+g),x=y.subarray(v,y.length-g),S=0;if(!m||8>_)for(var w=0;_>=w;w+=65535){var I=w+65535;_>I?S=Dm(x,S,f.subarray(w,I)):(x[w]=!0,S=Dm(x,S,f.subarray(w,_)))}else{for(var T=N9[m-1],R=T>>>13,P=8191&T,$=(1<<h)-1,A=new Pr(32768),k=new Pr($+1),D=Math.ceil(h/3),z=2*D,X=function(be){return(f[be]^f[be+1]<<D^f[be+2]<<z)&$},V=new ni(25e3),Y=new Pr(288),U=new Pr(32),F=0,H=0,ee=(w=0,0),O=0,M=0;_>w;++w){var G=X(w),L=32767&w,W=k[G];if(A[L]=W,k[G]=L,w>=O){var B=_-w;if((F>7e3||ee>24576)&&B>423){S=xy(f,x,0,V,Y,U,H,ee,M,w-M,S),ee=F=H=0,M=w;for(var J=0;286>J;++J)Y[J]=0;for(J=0;30>J;++J)U[J]=0}var K=2,re=0,se=P,Z=L-W&32767;if(B>2&&G==X(w-Z))for(var ne=Math.min(R,B)-1,ie=Math.min(32767,w),he=Math.min(258,B);ie>=Z&&--se&&L!=W;){if(f[w+K]==f[w+K-Z]){for(var me=0;he>me&&f[w+me]==f[w+me-Z];++me);if(me>K){if(K=me,re=Z,me>ne)break;var Pe=Math.min(Z,me-2),Se=0;for(J=0;Pe>J;++J){var Ce=w-Z+J+32768&32767,Ze=Ce-A[Ce]+32768&32767;Ze>Se&&(Se=Ze,W=Ce)}}}Z+=(L=W)-(W=A[L])+32768&32767}if(re){V[ee++]=268435456|Om[K]<<18|_y[re];var Ye=31&Om[K],pe=31&_y[re];H+=Jg[Ye]+Zg[pe],++Y[257+Ye],++U[pe],O=w+K,++F}else V[ee++]=f[w],++Y[f[w]]}}S=xy(f,x,!0,V,Y,U,H,ee,M,w-M,S)}return i$(y,0,v+s$(S)+g)}(s=e,(i=t).level==null?6:i.level,i.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+i.mem,l,u)),p=d.length;return function(f,m){var h=m.filename;if(f[0]=31,f[1]=139,f[2]=8,f[8]=2>m.level?4:m.level==9?2:0,f[9]=3,m.mtime!=0&&gp(f,4,Math.floor(new Date(m.mtime||Date.now())/1e3)),h){f[3]=8;for(var v=0;h.length>=v;++v)f[v+10]=h.charCodeAt(v)}}(d,t),gp(d,p-8,r.d()),gp(d,p-4,n),d}var M9=!!sm||!!om,a$="text/plain",wy=!1,td=function(e,t,r){var n;r===void 0&&(r=!0);var[o,s]=e.split("?"),i=Re({},t),l=(n=s==null?void 0:s.split("&").map(d=>{var p,[f,m]=d.split("="),h=r&&(p=i[f])!==null&&p!==void 0?p:m;return delete i[f],f+"="+h}))!==null&&n!==void 0?n:[],u=function(d,p){var f,m;p===void 0&&(p="&");var h=[];return wt(d,function(v,g){Le(v)||Le(g)||g==="undefined"||(f=encodeURIComponent((b=>b instanceof File)(v)?v.name:v.toString()),m=encodeURIComponent(g),h[h.length]=m+"="+f)}),h.join(p)}(i);return u&&l.push(u),o+"?"+l.join("&")},js=(e,t)=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n,t),vp=e=>{if(e.tr)return e.tr;var{data:t,compression:r}=e;if(t){if(r===nn.GZipJS){var n=k9(function(l,u){var d=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var p=new Xr(l.length+(l.length>>>1)),f=0,m=function(b){p[f++]=b},h=0;d>h;++h){if(f+5>p.length){var v=new Xr(f+8+(d-h<<1));v.set(p),p=v}var g=l.charCodeAt(h);128>g?m(g):2048>g?(m(192|g>>>6),m(128|63&g)):g>55295&&57344>g?(m(240|(g=65536+(1047552&g)|1023&l.charCodeAt(++h))>>>18),m(128|g>>>12&63),m(128|g>>>6&63),m(128|63&g)):(m(224|g>>>12),m(128|g>>>6&63),m(128|63&g))}return i$(p,0,f)}(js(t)),{mtime:0});return{contentType:a$,body:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),estimatedSize:n.byteLength}}if(r===nn.Base64){var o=function(l){return l&&btoa(encodeURIComponent(l).replace(/%([0-9A-F]{2})/g,(u,d)=>String.fromCharCode(parseInt(d,16))))}(js(t)),s=(l=>"data="+encodeURIComponent(typeof l=="string"?l:js(l)))(o);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var i=js(t);return{contentType:"application/json",body:i,estimatedSize:new Blob([i]).size}}},L9=function(){var e=Gr(function*(t){var r=js(t.data),n=yield function(s,i,l){return im.apply(this,arguments)}(r,hr.DEBUG,{rethrow:!0});if(!n)return t;var o=yield n.arrayBuffer();return Re({},t,{tr:{contentType:a$,body:o,estimatedSize:o.byteLength}})});return function(t){return e.apply(this,arguments)}}(),Ey=(e,t)=>td(e,{_:new Date().getTime().toString(),ver:hr.JS_SDK_VERSION,compression:t}),Bl=[];om&&Bl.push({transport:"fetch",method(e){var t,r,{contentType:n,body:o,estimatedSize:s}=(t=vp(e))!==null&&t!==void 0?t:{},i=new Headers;wt(e.headers,function(p,f){i.append(f,p)}),n&&i.append("Content-Type",n);var l=e.url,u=null;if(ty){var d=new ty;u={signal:d.signal,timeout:setTimeout(()=>d.abort(),e.timeout)}}om(l,Re({method:(e==null?void 0:e.method)||"GET",headers:i,keepalive:e.method==="POST"&&52428.8>(s||0),body:o,signal:(r=u)==null?void 0:r.signal},e.fetchOptions)).then(p=>p.text().then(f=>{var m={statusCode:p.status,text:f};if(p.status===200)try{m.json=JSON.parse(f)}catch(h){De.error(h)}e.callback==null||e.callback(m)})).catch(p=>{De.error(p),e.callback==null||e.callback({statusCode:0,error:p})}).finally(()=>u?clearTimeout(u.timeout):null)}}),sm&&Bl.push({transport:"XHR",method(e){var t,r=new sm;r.open(e.method||"GET",e.url,!0);var{contentType:n,body:o}=(t=vp(e))!==null&&t!==void 0?t:{};wt(e.headers,function(s,i){r.setRequestHeader(i,s)}),n&&r.setRequestHeader("Content-Type",n),e.timeout&&(r.timeout=e.timeout),e.disableXHRCredentials||(r.withCredentials=!0),r.onreadystatechange=()=>{if(r.readyState===4){var s={statusCode:r.status,text:r.responseText};if(r.status===200)try{s.json=JSON.parse(r.responseText)}catch{}e.callback==null||e.callback(s)}},r.send(o)}}),Mr!=null&&Mr.sendBeacon&&Bl.push({transport:"sendBeacon",method(e){var t=td(e.url,{beacon:"1"});try{var r,{contentType:n,body:o}=(r=vp(e))!==null&&r!==void 0?r:{};if(!o)return;var s=o instanceof Blob?o:new Blob([o],{type:n});Mr.sendBeacon(t,s)}catch{}}});var km=3e3;class z9{constructor(t,r){this.Ar=!0,this.Nr=[],this.$r=xn((r==null?void 0:r.flush_interval_ms)||km,250,5e3,De.createLogger("flush interval"),km),this.Dr=t}enqueue(t){this.Nr.push(t),this.qr||this.jr()}unload(){this.Hr();var t=this.Nr.length>0?this.Ur():{},r=Object.values(t);[...r.filter(n=>n.url.indexOf("/e")===0),...r.filter(n=>n.url.indexOf("/e")!==0)].map(n=>{this.Dr(Re({},n,{transport:"sendBeacon"}))})}enable(){this.Ar=!1,this.jr()}jr(){var t=this;this.Ar||(this.qr=setTimeout(()=>{if(this.Hr(),this.Nr.length>0){var r=this.Ur(),n=function(){var s=r[o],i=new Date().getTime();s.data&&pt(s.data)&&wt(s.data,l=>{l.offset=Math.abs(l.timestamp-i),delete l.timestamp}),t.Dr(s)};for(var o in r)n()}},this.$r))}Hr(){clearTimeout(this.qr),this.qr=void 0}Ur(){var t={};return wt(this.Nr,r=>{var n,o=r,s=(o?o.batchKey:null)||o.url;Le(t[s])&&(t[s]=Re({},o,{data:[]})),(n=t[s].data)==null||n.push(o.data)}),this.Nr=[],t}}var F9=["retriesPerformedSoFar"];class V9{constructor(t){this.Br=!1,this.zr=3e3,this.Nr=[],this._instance=t,this.Nr=[],this.Vr=!0,!Le(oe)&&"onLine"in oe.navigator&&(this.Vr=oe.navigator.onLine,this.Wr=()=>{this.Vr=!0,this.Zr()},this.Gr=()=>{this.Vr=!1},zt(oe,"online",this.Wr),zt(oe,"offline",this.Gr))}get length(){return this.Nr.length}retriableRequest(t){var{retriesPerformedSoFar:r}=t,n=cI(t,F9);xs(r)&&(n.url=td(n.url,{retry_count:r})),this._instance._send_request(Re({},n,{callback:o=>{o.statusCode===200||o.statusCode>=400&&500>o.statusCode||(r??0)>=10?n.callback==null||n.callback(o):this.Qr(Re({retriesPerformedSoFar:r},n))}}))}Qr(t){var r=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=r+1;var n=function(i){var l=3e3*Math.pow(2,i),u=l/2,d=Math.min(18e5,l),p=Math.random()-.5;return Math.ceil(d+p*(d-u))}(r),o=Date.now()+n;this.Nr.push({retryAt:o,requestOptions:t});var s="Enqueued failed request for retry in "+n;navigator.onLine||(s+=" (Browser is offline)"),De.warn(s),this.Br||(this.Br=!0,this.Jr())}Jr(){if(this.Kr&&clearTimeout(this.Kr),this.Nr.length===0)return this.Br=!1,void(this.Kr=void 0);this.Kr=setTimeout(()=>{this.Vr&&this.Nr.length>0&&this.Zr(),this.Jr()},this.zr)}Zr(){var t=Date.now(),r=[],n=this.Nr.filter(s=>t>s.retryAt||(r.push(s),!1));if(this.Nr=r,n.length>0)for(var{requestOptions:o}of n)this.retriableRequest(o)}unload(){for(var{requestOptions:t}of(this.Kr&&(clearTimeout(this.Kr),this.Kr=void 0),this.Br=!1,Le(oe)||(this.Wr&&(oe.removeEventListener("online",this.Wr),this.Wr=void 0),this.Gr&&(oe.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Nr))try{this._instance._send_request(Re({},t,{transport:"sendBeacon"}))}catch(r){De.error(r)}this.Nr=[]}}class B9{constructor(t){this.Yr=()=>{var r,n,o,s;this.Xr||(this.Xr={});var i=this.scrollElement(),l=this.scrollY(),u=i?Math.max(0,i.scrollHeight-i.clientHeight):0,d=l+((i==null?void 0:i.clientHeight)||0),p=(i==null?void 0:i.scrollHeight)||0;this.Xr.lastScrollY=Math.ceil(l),this.Xr.maxScrollY=Math.max(l,(r=this.Xr.maxScrollY)!==null&&r!==void 0?r:0),this.Xr.maxScrollHeight=Math.max(u,(n=this.Xr.maxScrollHeight)!==null&&n!==void 0?n:0),this.Xr.lastContentY=d,this.Xr.maxContentY=Math.max(d,(o=this.Xr.maxContentY)!==null&&o!==void 0?o:0),this.Xr.maxContentHeight=Math.max(p,(s=this.Xr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Xr}resetContext(){var t=this.Xr;return setTimeout(this.Yr,0),t}startMeasuringScrollPosition(){zt(oe,"scroll",this.Yr,{capture:!0}),zt(oe,"scrollend",this.Yr,{capture:!0}),zt(oe,"resize",this.Yr)}scrollElement(){if(!this.ei)return oe==null?void 0:oe.document.documentElement;var t=pt(this.ei)?this.ei:[this.ei];for(var r of t){var n=oe==null?void 0:oe.document.querySelector(r);if(n)return n}}scrollY(){if(this.ei){var t=this.scrollElement();return t&&t.scrollTop||0}return oe&&(oe.scrollY||oe.pageYOffset||oe.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var t=this.scrollElement();return t&&t.scrollLeft||0}return oe&&(oe.scrollX||oe.pageXOffset||oe.document.documentElement.scrollLeft)||0}}var H9=e=>JI(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties);class Sy{constructor(t,r,n,o){this.ti=s=>{var i=this.ri();if(!i||i.sessionId!==s){var l={sessionId:s,props:this.ii(this._instance)};this.ni.register({[Rm]:l})}},this._instance=t,this.si=r,this.ni=n,this.ii=o||H9,this.si.onSessionId(this.ti)}ri(){return this.ni.props[Rm]}getSetOnceProps(){var t,r=(t=this.ri())==null?void 0:t.props;return r?"r"in r?ZI(r):{$referring_domain:r.referringDomain,$pathname:r.initialPathName,utm_source:r.utm_source,utm_campaign:r.utm_campaign,utm_medium:r.utm_medium,utm_content:r.utm_content,utm_term:r.utm_term}:{}}getSessionProps(){var t={};return wt(Yg(this.getSetOnceProps()),(r,n)=>{n==="$current_url"&&(n="url"),t["$session_entry_"+am(n)]=r}),t}}class Qg{constructor(){this.oi={}}on(t,r){return this.oi[t]||(this.oi[t]=[]),this.oi[t].push(r),()=>{this.oi[t]=this.oi[t].filter(n=>n!==r)}}emit(t,r){for(var n of this.oi[t]||[])n(r);for(var o of this.oi["*"]||[])o(t,r)}}var bp=St("[SessionId]");class Cy{on(t,r){return this.ai.on(t,r)}constructor(t,r,n){var o;if(this.ui=[],this.li=void 0,this.ai=new Qg,this.hi=(d,p)=>!(!xs(d)||!xs(p))&&Math.abs(d-p)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===Dn)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=t.config,this.ni=t.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=r||Zn,this.fi=n||Zn;var s=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*xn(this.qt.session_idle_timeout_seconds||1800,60,36e3,bp.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+s+"_window_id",this.mi="ph_"+s+"_primary_window_exists",this.yi()){var i=Qt.F(this.gi),l=Qt.F(this.mi);i&&!l?this.ci=i:Qt.q(this.gi),Qt.N(this.mi,!0)}if((o=this.qt.bootstrap)!=null&&o.sessionID)try{var u=(d=>{var p=this.qt.bootstrap.sessionID.replace(/-/g,"");if(p.length!==32)throw new Error("Not a valid UUID");if(p[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(p.substring(0,12),16)})();this.bi(this.qt.bootstrap.sessionID,new Date().getTime(),u)}catch(d){bp.error("Invalid sessionID in bootstrap",d)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return Le(this.ui)&&(this.ui=[]),this.ui.push(t),this.di&&t(this.di,this.ci),()=>{this.ui=this.ui.filter(r=>r!==t)}}yi(){return this.qt.persistence!=="memory"&&!this.ni._r&&Qt.R()}xi(t){t!==this.ci&&(this.ci=t,this.yi()&&Qt.N(this.gi,t))}Si(){return this.ci?this.ci:this.yi()?Qt.F(this.gi):null}bi(t,r,n){t===this.di&&r===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=r,this.di=t,this.ni.register({[Pc]:[r,t,n]}))}ki(){var t=this.ni.props[Pc];return pt(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.Ci),this.Ci=void 0,this.li&&oe&&(oe.removeEventListener(Ac,this.li,{capture:!1}),this.li=void 0),this.ui=[]}wi(){this.li=()=>{this.yi()&&Qt.q(this.mi)},zt(oe,Ac,this.li,{capture:!1})}checkAndGetSessionAndWindowId(t,r){if(t===void 0&&(t=!1),r===void 0&&(r=null),this.qt.cookieless_mode===Dn)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=r||new Date().getTime(),[o,s,i]=this.ki(),l=this.Si(),u=xs(i)&&Math.abs(n-i)>864e5,d=!1,p=!s,f=!p&&!t&&this.hi(n,o);p||f||u?(s=this.vi(),l=this.fi(),bp.info("new session ID generated",{sessionId:s,windowId:l,changeReason:{noSessionId:p,activityTimeout:f,sessionPastMaximumLength:u}}),i=n,d=!0):l||(l=this.fi(),d=!0);var m=xs(o)&&t&&!u?o:n,h=xs(i)?i:new Date().getTime();return this.xi(l),this.bi(s,m,h),t||this.pi(),d&&this.ui.forEach(v=>v(s,l,d?{noSessionId:p,activityTimeout:f,sessionPastMaximumLength:u}:void 0)),{sessionId:s,windowId:l,sessionStartTimestamp:h,changeReason:d?{noSessionId:p,activityTimeout:f,sessionPastMaximumLength:u}:void 0,lastActivityTimestamp:o}}pi(){clearTimeout(this.Ci),this.Ci=setTimeout(()=>{var[t]=this.ki();if(this.hi(new Date().getTime(),t)){var r=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:r})}},1.1*this.sessionTimeoutMs)}}var l$=function(e,t){if(!e)return!1;var r=e.userAgent;if(r&&oy(r,t))return!0;try{var n=e==null?void 0:e.userAgentData;if(n!=null&&n.brands&&n.brands.some(o=>oy(o==null?void 0:o.brand,t)))return!0}catch{}return!!e.webdriver},zc=function(e,t){if(!function(r){try{new RegExp(r)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function Py(e,t,r){return js({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:r})}var c$={exact:(e,t)=>t.some(r=>e.some(n=>r===n)),is_not:(e,t)=>t.every(r=>e.every(n=>r!==n)),regex:(e,t)=>t.some(r=>e.some(n=>zc(r,n))),not_regex:(e,t)=>t.every(r=>e.every(n=>!zc(r,n))),icontains:(e,t)=>t.map(yl).some(r=>e.map(yl).some(n=>r.includes(n))),not_icontains:(e,t)=>t.map(yl).every(r=>e.map(yl).every(n=>!r.includes(n))),gt:(e,t)=>t.some(r=>{var n=parseFloat(r);return!isNaN(n)&&e.some(o=>n>parseFloat(o))}),lt:(e,t)=>t.some(r=>{var n=parseFloat(r);return!isNaN(n)&&e.some(o=>n<parseFloat(o))})},yl=e=>e.toLowerCase();function u$(e,t){return!e||Object.entries(e).every(r=>{var[n,o]=r,s=t==null?void 0:t[n];if(Le(s)||Vn(s))return!1;var i=[String(s)],l=c$[o.operator];return!!l&&l(o.values,i)})}var Mm="custom",Ry="i.posthog.com",U9=/^\/static\//;class W9{constructor(t){this.Ii={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,r=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return r||(r=this.apiHost.replace("."+Ry,".posthog.com")),r==="https://app.posthog.com"?"https://us.posthog.com":r}get region(){return this.Ii[this.apiHost]||(this.Ii[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":Mm),this.Ii[this.apiHost]}Ti(t){var r=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof r=="string"&&U9.test(t))return r.trim().replace(/\/$/,"")||void 0}endpointFor(t,r){if(r===void 0&&(r=""),r&&(r=r[0]==="/"?r:"/"+r),t==="ui")return this.uiHost+r;if(t==="flags")return this.flagsApiHost+r;if(t==="assets"){var n=this.Ti(r);if(n)return""+n+r}if(this.region===Mm)return this.apiHost+r;var o=Ry+r;switch(t){case"assets":return"https://"+this.region+"-assets."+o;case"api":return"https://"+this.region+"."+o}}}var gt=St("[Surveys]"),Lm="seenSurvey_",q9=[Fl.Popover,Fl.Widget,Fl.API],G9={ignoreConditions:!1,ignoreDelay:!1,displayType:Mc.Popover},K9=St("[PostHog ExternalIntegrations]"),X9={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class Y9{constructor(t){this._instance=t}lr(t,r){var n;(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,t,o=>{if(o)return K9.error("failed to load script",o);r()})}startIfEnabledOrStop(){var t=this,r=function(i){var l,u,d;!o||(l=Je.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[i]||t.lr(X9[i],()=>{var p;(p=Je.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[i])==null||p.start(t._instance)}),!o&&(u=Je.__PosthogExtensions__)!=null&&(u=u.integrations)!=null&&u[i]&&((d=Je.__PosthogExtensions__)==null||(d=d.integrations)==null||(d=d[i])==null||d.stop())};for(var[n,o]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;r(n)}}}var gs,ra={},_p=0,zm=()=>{},Ty='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Ai="Surveys module not available",Iy="sanitize_properties is deprecated. Use before_send instead",d$="Invalid value for property_denylist config: ",Cs="posthog",p$=!M9&&(Er==null?void 0:Er.indexOf("MSIE"))===-1&&(Er==null?void 0:Er.indexOf("Mozilla"))===-1,$y=e=>{var t;return Re({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:m9(Oe==null?void 0:Oe.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:zm,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:Zt&&It(Zt==null?void 0:Zt.search)&&Zt.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(oe==null||(t=oe.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(r){De.error("Bad HTTP status: "+r.statusCode+" "+r.text)},get_device_id:r=>r,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Am,before_send:void 0,request_queue_config:{flush_interval_ms:km},error_tracking:{},_onCapture:zm,__preview_eager_load_replay:!1},(r=>({rageclick:!r||"2025-11-30">r||{content_ignorelist:!0},capture_pageview:!r||"2025-05-24">r||"history_change",session_recording:r&&r>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:r&&r>="2026-01-30"?"head":"body",internal_or_test_user_hostname:r&&r>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},J9=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],Ay=e=>{var t={};for(var[r,n]of J9)Le(e[r])||(t[n]=e[r]);var o=At({},t,e);return pt(e.property_blacklist)&&(Le(e.property_denylist)?o.property_denylist=e.property_blacklist:pt(e.property_denylist)?o.property_denylist=[...e.property_blacklist,...e.property_denylist]:De.error(d$+e.property_denylist)),o};class Z9{constructor(){this.__forceAllowLocalhost=!1}get Ei(){return this.__forceAllowLocalhost}set Ei(t){De.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class kr{Mi(t,r){if(t){var n=this.Pi.indexOf(t);n!==-1&&this.Pi.splice(n,1)}return this.Pi.push(r),r.initialize==null||r.initialize(),r}Ri(){return this.config.cookieless_mode===Dn||this.config.cookieless_mode===Co&&this.consent.isRejected()}get decideEndpointWasHit(){var t,r;return(t=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,r;return(t=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new Z9,this.Oi=!1,this.version=hr.LIB_VERSION,this.Li=new Qg,this.Pi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=$y(),this.SentryIntegration=S9,this.sentryIntegration=n=>function(o,s){var i=qI(o,s);return{name:WI,processEvent:l=>i(l)}}(this,n),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Fi=!1,this.Ai=null,this.Ni=null,this.$i=null,this.scrollManager=new B9(this),this.pageViewManager=new hy(this),this.rateLimiter=new A9(this),this.requestRouter=new W9(this),this.consent=new x9(this),this.externalIntegrations=new Y9(this);var r=(t=kr.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=r.featureFlags&&new r.featureFlags(this),this.toolbar=r.toolbar&&new r.toolbar(this),this.surveys=r.surveys&&new r.surveys(this),this.conversations=r.conversations&&new r.conversations(this),this.logs=r.logs&&new r.logs(this),this.experiments=r.experiments&&new r.experiments(this),this.exceptions=r.exceptions&&new r.exceptions(this),this.people={set:(n,o,s)=>{var i=It(n)?{[n]:o}:n;this.setPersonProperties(i),s==null||s({})},set_once:(n,o,s)=>{var i=It(n)?{[n]:o}:n;this.setPersonProperties(void 0,i),s==null||s({})}},this.on("eventCaptured",n=>De.info('send "'+(n==null?void 0:n.event)+'"',n))}init(t,r,n){if(n&&n!==Cs){var o,s=(o=ra[n])!==null&&o!==void 0?o:new kr;return s._init(t,r,n),ra[n]=s,ra[Cs][n]=s,s}return this._init(t,r,n)}_init(t,r,n){var o,s;if(r===void 0&&(r={}),Le(t)||kl(t))return De.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},r.debug=this.Di(r.debug),this.qi=r,this.ji=[],r.person_profiles?this.Ni=r.person_profiles:r.process_person&&(this.Ni=r.process_person),this.set_config(At({},$y(r.defaults),Ay(r),{name:n,token:t})),this.config.on_xhr_error&&De.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=r.disable_compression?void 0:nn.GZipJS;var i=this.Hi();this.persistence=new mp(this.config,i),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new mp(Re({},this.config,{persistence:"sessionStorage"}),i);var l=Re({},this.persistence.props),u=Re({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Ui=new z9(b=>this.Bi(b),this.config.request_queue_config),this.zi=new V9(this),this.__request_queue=[];var d=this.Ri();if(d||(this.sessionManager=new Cy(this),this.sessionPropsManager=new Sy(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(De.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Vi(d)},0)):(De.info("Initializing extensions synchronously"),this.Vi(d)),hr.DEBUG=hr.DEBUG||this.config.debug,hr.DEBUG&&De.info("Starting in debug mode",{this:this,config:r,thisC:Re({},this.config),p:l,s:u}),!this.config.identity_distinct_id||(o=r.bootstrap)!=null&&o.distinctID||(r.bootstrap=Re({},r.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=r.bootstrap)==null?void 0:s.distinctID)!==void 0){var p=r.bootstrap.distinctID,f=this.get_distinct_id(),m=this.persistence.get_property(rn);if(r.bootstrap.isIdentifiedID&&f!=null&&f!==p&&m===fs)this.identify(p);else if(r.bootstrap.isIdentifiedID&&f!=null&&f!==p&&m===ms)De.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var h=this.config.get_device_id(Zn()),v=r.bootstrap.isIdentifiedID?h:p;this.persistence.set_property(rn,r.bootstrap.isIdentifiedID?ms:fs),this.register({distinct_id:p,$device_id:v})}}if(d)this.register_once({distinct_id:hl,$device_id:null},"");else if(!this.get_distinct_id()){var g=this.config.get_device_id(Zn());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(rn,fs)}return zt(oe,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),r.segment?function(b,_){var y=b.config.segment;if(!y)return _();(function(x,S){var w=x.config.segment;if(!w)return S();var I=R=>{var P=()=>R.anonymousId()||Zn();x.config.get_device_id=P,R.id()&&(x.register({distinct_id:R.id(),$device_id:P()}),x.persistence.set_property(rn,ms)),S()},T=w.user();"then"in T&&On(T.then)?T.then(I):I(T)})(b,()=>{y.register((x=>{Promise&&Promise.resolve||fp.warn("This browser does not have Promise support, and can not use the segment integration");var S=(w,I)=>{if(!I)return w;w.event.userId||w.event.anonymousId===x.get_distinct_id()||(fp.info("No userId set, resetting PostHog"),x.reset()),w.event.userId&&w.event.userId!==x.get_distinct_id()&&(fp.info("UserId set, identifying with PostHog"),x.identify(w.event.userId));var T=x.calculateEventProperties(I,w.event.properties);return w.event.properties=Object.assign({},T,w.event.properties),w};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:w=>S(w,w.event.event),page:w=>S(w,Es),identify:w=>S(w,dp),screen:w=>S(w,"$screen")}})(b)).then(()=>{_()})})}(this,()=>this.Wi()):this.Wi(),On(this.config._onCapture)&&this.config._onCapture!==zm&&(De.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",b=>this.config._onCapture(b.event,b))),this.config.ip&&De.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Vi(t){var r,n,o,s,i,l,u,d=performance.now(),p=Re({},kr.__defaultExtensionClasses,this.config.__extensionClasses),f=[];p.featureFlags&&this.Pi.push(this.featureFlags=(r=this.featureFlags)!==null&&r!==void 0?r:new p.featureFlags(this)),p.exceptions&&this.Pi.push(this.exceptions=(n=this.exceptions)!==null&&n!==void 0?n:new p.exceptions(this)),p.historyAutocapture&&this.Pi.push(this.historyAutocapture=new p.historyAutocapture(this)),p.tracingHeaders&&this.Pi.push(new p.tracingHeaders(this)),p.siteApps&&this.Pi.push(this.siteApps=new p.siteApps(this)),p.sessionRecording&&!t&&this.Pi.push(this.sessionRecording=new p.sessionRecording(this)),this.config.disable_scroll_properties||f.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),p.autocapture&&this.Pi.push(this.autocapture=new p.autocapture(this)),p.surveys&&this.Pi.push(this.surveys=(o=this.surveys)!==null&&o!==void 0?o:new p.surveys(this)),p.logs&&this.Pi.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new p.logs(this)),p.conversations&&this.Pi.push(this.conversations=(i=this.conversations)!==null&&i!==void 0?i:new p.conversations(this)),p.productTours&&this.Pi.push(this.productTours=new p.productTours(this)),p.heatmaps&&this.Pi.push(this.heatmaps=new p.heatmaps(this)),p.webVitalsAutocapture&&this.Pi.push(this.webVitalsAutocapture=new p.webVitalsAutocapture(this)),p.exceptionObserver&&this.Pi.push(this.exceptionObserver=new p.exceptionObserver(this)),p.deadClicksAutocapture&&this.Pi.push(this.deadClicksAutocapture=new p.deadClicksAutocapture(this,E9)),p.toolbar&&this.Pi.push(this.toolbar=(l=this.toolbar)!==null&&l!==void 0?l:new p.toolbar(this)),p.experiments&&this.Pi.push(this.experiments=(u=this.experiments)!==null&&u!==void 0?u:new p.experiments(this)),this.Pi.forEach(m=>{m.initialize&&f.push(()=>{m.initialize==null||m.initialize()})}),f.push(()=>{if(this.Zi){var m=this.Zi;this.Zi=void 0,this.Rr(m)}}),this.Gi(f,d)}Gi(t,r){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-r>=30&&t.length>0)return void setTimeout(()=>{this.Gi(t,r)},0);var n=t.shift();if(n)try{n()}catch(s){De.error("Error initializing extension:",s)}}var o=Math.round(performance.now()-r);this.register_for_session({[FI]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[VI]:o}),this.config.__preview_deferred_init_extensions&&De.info("PostHog extensions initialized ("+o+"ms)")}Rr(t){var r;if(!Oe||!Oe.body)return De.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Rr(t)},500);this.config.__preview_deferred_init_extensions&&(this.Zi=t),this.Qi=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=it(t.supportedCompression,nn.GZipJS)?nn.GZipJS:it(t.supportedCompression,nn.Base64)?nn.Base64:void 0),(r=t.analytics)!=null&&r.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Ni?this.Ni:Am}),this.Pi.forEach(n=>n.onRemoteConfig==null?void 0:n.onRemoteConfig(t))}Wi(){try{this.config.loaded(this)}catch(n){De.critical("`loaded` function failed",n)}if(this.Ji(),this.config.internal_or_test_user_hostname&&Zt!=null&&Zt.hostname){var t=Zt.hostname,r=this.config.internal_or_test_user_hostname;(typeof r=="string"?t===r:r.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.Ri())&&this.Ki()},1),this.Yi=new t$(this),this.Yi.load()}Ji(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Ui)==null||t.enable())}_dom_loaded(){this.is_capturing()&&gl(this.__request_queue,t=>this.Bi(t)),this.__request_queue=[],this.Ji()}_handle_unload(){var t,r,n,o;(t=this.surveys)==null||t.handlePageUnload(),this.config.request_batching?(this.Xi()&&this.capture(up),(r=this.logs)==null||r.flushLogs("sendBeacon"),(n=this.Ui)==null||n.unload(),(o=this.zi)==null||o.unload()):this.Xi()&&this.capture(up,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(p$?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=td(t.url,{ip:this.config.ip?1:0}),t.headers=Re({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(r=>{var n,o,s,i=Re({},r);i.timeout=i.timeout||6e4,i.url=Ey(i.url,i.compression);var l=(n=i.transport)!==null&&n!==void 0?n:"fetch",u=Bl.filter(p=>!i.disableTransport||!p.transport||!i.disableTransport.includes(p.transport)),d=(o=(s=function(p,f){for(var m=0;p.length>m;m++)if(p[m].transport===l)return p[m]}(u))==null?void 0:s.method)!==null&&o!==void 0?o:u[0].method;if(!d)throw new Error("No available transport method");l!=="sendBeacon"&&i.data&&i.compression===nn.GZipJS&&SG&&!wy?L9(i).then(p=>{d(p)}).catch(p=>{if((f=>!(!f||typeof f!="object")&&("name"in f?String(f.name):"")==="NotReadableError")(p))return wy=!0,void d(Re({},i,{compression:void 0,url:Ey(r.url,void 0)}));d(i)}):d(i)})(Re({},t,{callback:r=>{var n,o;this.rateLimiter.checkForLimiting(r),400>r.statusCode||(n=(o=this.config).on_request_error)==null||n.call(o,r),t.callback==null||t.callback(r)}}))))}Bi(t){this.zi?this.zi.retriableRequest(t):this._send_request(t)}_execute_array(t){_p++;try{var r,n=[],o=[],s=[];gl(t,l=>{l&&(pt(r=l[0])?s.push(l):On(l)?l.call(this):pt(l)&&r==="alias"?n.push(l):pt(l)&&r.indexOf("capture")!==-1&&On(this[r])?s.push(l):o.push(l))});var i=function(l,u){gl(l,function(d){if(pt(d[0])){var p=u;wt(d,function(f){p=p[f[0]].apply(p,f.slice(1))})}else u[d[0]].apply(u,d.slice(1))})};i(n,this),i(o,this),i(s,this)}finally{_p--}}push(t){if(_p>0&&pt(t)&&It(t[0])){var r=kr.prototype[t[0]];On(r)&&r.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,r,n){var o,s,i,l,u;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ui){if(this.is_capturing())if(!Le(t)&&It(t)){var d=!this.config.opt_out_useragent_filter&&this._is_bot();if(!d||this.config.__preview_capture_bot_pageviews){var p=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(p==null||!p.isRateLimited){r!=null&&r.$current_url&&!It(r==null?void 0:r.$current_url)&&(De.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),r==null||delete r.$current_url),t!=="$exception"||n!=null&&n.en||De.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var f=new Date,m=(n==null?void 0:n.timestamp)||f,h=Zn(),v={uuid:h,event:t,properties:this.calculateEventProperties(t,r||{},m,h)};t===Es&&this.config.__preview_capture_bot_pageviews&&d&&(v.event="$bot_pageview",v.properties.$browser_type="bot"),p&&(v.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens),n!=null&&n.$set&&(v.$set=n==null?void 0:n.$set);var g,b,_,y=this.tn(n==null?void 0:n.$set_once,t!==dy,t===dp);if(y&&(v.$set_once=y),n!=null&&n._noTruncate||(s=this.config.properties_string_max_length,i=v,l=P=>It(P)?P.slice(0,s):P,u=new Set,v=function P($,A){return $!==Object($)?l?l($):$:u.has($)?void 0:(u.add($),pt($)?(k=[],gl($,D=>{k.push(P(D))})):(k={},wt($,(D,z)=>{u.has(D)||(k[z]=P(D))})),k);var k}(i)),v.timestamp=m,Le(n==null?void 0:n.timestamp)||(v.properties.$event_time_override_provided=!0,v.properties.$event_time_override_system_time=f),t===As.DISMISSED||t===As.SENT){var x=r==null?void 0:r[Vl.SURVEY_ID],S=r==null?void 0:r[Vl.SURVEY_ITERATION];(P=>{try{var $=(A=>((k,D)=>{var z=""+Lm+D.id;return D.current_iteration&&D.current_iteration>0&&(z=""+Lm+D.id+"_"+D.current_iteration),z})(0,A))(P);if(localStorage.getItem($))return;localStorage.setItem($,"true")}catch(A){gt.error("Failed to persist survey seen state",A)}})({id:x,current_iteration:S}),v.$set=Re({},v.$set,{[(g={id:x,current_iteration:S},b=t===As.SENT?"responded":"dismissed",_="$survey_"+b+"/"+g.id,g.current_iteration&&g.current_iteration>0&&(_="$survey_"+b+"/"+g.id+"/"+g.current_iteration),_)]:!0})}else t===As.SHOWN&&(v.$set=Re({},v.$set,{[Vl.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===e$.SHOWN){var w=r==null?void 0:r[jm.TOUR_TYPE];w&&(v.$set=Re({},v.$set,{[jm.TOUR_LAST_SEEN_DATE+"/"+w]:new Date().toISOString()}))}var I=Re({},v.properties.$set,v.$set);if(Is(I)||this.setPersonPropertiesForFlags(I),!at(this.config.before_send)){var T=this.rn(v);if(!T)return;v=T}this.Li.emit("eventCaptured",v);var R={method:"POST",url:(o=n==null?void 0:n._url)!==null&&o!==void 0?o:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:v,compression:"best-available",batchKey:n==null?void 0:n._batchKey};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.Bi(R):this.Ui.enqueue(R),v}De.critical("This capture call is ignored due to client rate limiting.")}}else De.error("No event name provided to posthog.capture")}else De.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",r=>t(r.event,r))}calculateEventProperties(t,r,n,o,s){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return r;var i=s?void 0:this.persistence.remove_event_timer(t),l=Re({},r);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,this.Ri()&&(l.$cookieless_mode=!0),t==="$snapshot"){var u=Re({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=u.distinct_id,(!It(l.distinct_id)&&!Yr(l.distinct_id)||kl(l.distinct_id))&&De.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var d,p=function(_,y){var x,S,w,I;if(!Er)return{};var T,R,P,$,A,k,D,z,X=_?[...ri,...y||[]]:[],[V,Y]=function(U){for(var F=0;ay.length>F;F++){var[H,ee]=ay[F],O=H.exec(U),M=O&&(On(ee)?ee(O,U):ee);if(M)return M}return["",""]}(Er);return At(Yg({$os:V,$os_version:Y,$browser:TI(Er,navigator.vendor),$device:ly(Er),$device_type:(R=Er,P={userAgentDataPlatform:(x=navigator)==null||(x=x.userAgentData)==null?void 0:x.platform,maxTouchPoints:(S=navigator)==null?void 0:S.maxTouchPoints,screenWidth:oe==null||(w=oe.screen)==null?void 0:w.width,screenHeight:oe==null||(I=oe.screen)==null?void 0:I.height,devicePixelRatio:oe==null?void 0:oe.devicePixelRatio},z=ly(R),z===mI||z===fI||z==="Kobo"||z==="Kindle Fire"||z===RI?Qs:z===ma||z===Vs||z===ha||z===cm?"Console":z===gI?"Wearable":z?Lr:(P==null?void 0:P.userAgentDataPlatform)==="Android"&&(($=P==null?void 0:P.maxTouchPoints)!==null&&$!==void 0?$:0)>0?600>Math.min((A=P==null?void 0:P.screenWidth)!==null&&A!==void 0?A:0,(k=P==null?void 0:P.screenHeight)!==null&&k!==void 0?k:0)/((D=P==null?void 0:P.devicePixelRatio)!==null&&D!==void 0?D:1)?Lr:Qs:"Desktop"),$timezone:QI(),$timezone_offset:I9()}),{$current_url:ga(Zt==null?void 0:Zt.href,X,va),$host:Zt==null?void 0:Zt.host,$pathname:Zt==null?void 0:Zt.pathname,$raw_user_agent:Er.length>1e3?Er.substring(0,997)+"...":Er,$browser_version:FG(Er,navigator.vendor),$browser_language:gy(),$browser_language_prefix:(T=gy(),typeof T=="string"?T.split("-")[0]:void 0),$screen_height:oe==null?void 0:oe.screen.height,$screen_width:oe==null?void 0:oe.screen.width,$viewport_height:oe==null?void 0:oe.innerHeight,$viewport_width:oe==null?void 0:oe.innerWidth,$lib:hr.LIB_NAME,$lib_version:hr.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:f,windowId:m}=this.sessionManager.checkAndGetSessionAndWindowId(s,n.getTime());l.$session_id=f,l.$window_id=m}this.sessionPropsManager&&At(l,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&At(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=(h=this.zi)==null?void 0:h.length}catch(_){l.$sdk_debug_error_capturing_properties=String(_)}if(this.requestRouter.region===Mm&&(l.$lib_custom_api_host=this.config.api_host),d=t!==Es||s?t!==up||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,o),l=At(l,d),t===Es&&Oe&&(l.title=Oe.title),!Le(i)){var v=n.getTime()-i;l.$duration=parseFloat((v/1e3).toFixed(3))}Er&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser"),(l=At({},p,this.persistence.properties(),this.sessionPersistence.properties(),l)).$is_identified=this._isIdentified(),pt(this.config.property_denylist)?wt(this.config.property_denylist,function(_){delete l[_]}):De.error(d$+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var g=this.config.sanitize_properties;g&&(De.error(Iy),l=g(l,t));var b=this.nn();return l.$process_person_profile=b,b&&!s&&this.sn("_calculate_event_properties"),l}tn(t,r,n){var o;if(r===void 0&&(r=!0),n===void 0&&(n=!1),!this.persistence||!this.nn()||this.Oi&&!n)return t;var s=this.persistence.get_initial_props(),i=(o=this.sessionPropsManager)==null?void 0:o.getSetOnceProps(),l=At({},s,i||{},t||{}),u=this.config.sanitize_properties;return u&&(De.error(Iy),l=u(l,"$set_once")),r&&(this.Oi=!0),Is(l)?void 0:l}register(t,r){var n;(n=this.persistence)==null||n.register(t,r)}register_once(t,r,n){var o;(o=this.persistence)==null||o.register_once(t,r,n)}register_for_session(t){var r;(r=this.sessionPersistence)==null||r.register(t)}unregister(t){var r;(r=this.persistence)==null||r.unregister(t)}unregister_for_session(t){var r;(r=this.sessionPersistence)==null||r.unregister(t)}an(t,r){this.register({[t]:r})}getFeatureFlag(t,r){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlag(t,r)}getFeatureFlagPayload(t){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagPayload(t)}getFeatureFlagResult(t,r){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagResult(t,r)}isFeatureEnabled(t,r){var n;return(n=this.featureFlags)==null?void 0:n.isFeatureEnabled(t,r)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,r,n){var o;(o=this.featureFlags)==null||o.updateFlags(t,r,n)}updateEarlyAccessFeatureEnrollment(t,r,n){var o;(o=this.featureFlags)==null||o.updateEarlyAccessFeatureEnrollment(t,r,n)}getEarlyAccessFeatures(t,r,n){var o;return r===void 0&&(r=!1),(o=this.featureFlags)==null?void 0:o.getEarlyAccessFeatures(t,r,n)}on(t,r){return this.Li.on(t,r)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:Ai}),()=>{})}onSessionId(t){var r,n;return(r=(n=this.sessionManager)==null?void 0:n.onSessionId(t))!==null&&r!==void 0?r:()=>{}}getSurveys(t,r){r===void 0&&(r=!1),this.surveys?this.surveys.getSurveys(t,r):t([],{isLoaded:!1,error:Ai})}getActiveMatchingSurveys(t,r){r===void 0&&(r=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,r):t([],{isLoaded:!1,error:Ai})}renderSurvey(t,r){var n;(n=this.surveys)==null||n.renderSurvey(t,r)}displaySurvey(t,r){var n;r===void 0&&(r=G9),(n=this.surveys)==null||n.displaySurvey(t,r)}cancelPendingSurvey(t){var r;(r=this.surveys)==null||r.cancelPendingSurvey(t)}canRenderSurvey(t){var r,n;return(r=(n=this.surveys)==null?void 0:n.canRenderSurvey(t))!==null&&r!==void 0?r:{visible:!1,disabledReason:Ai}}canRenderSurveyAsync(t,r){var n,o;return r===void 0&&(r=!1),(n=(o=this.surveys)==null?void 0:o.canRenderSurveyAsync(t,r))!==null&&n!==void 0?n:Promise.resolve({visible:!1,disabledReason:Ai})}un(t){return!t||kl(t)?(De.critical("Unique user id has not been set in posthog.identify"),!1):t===hl?(De.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(De.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,r,n){if(!this.__loaded||!this.persistence)return De.uninitializedWarning("posthog.identify");if(Yr(t)&&(t=t.toString(),De.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.un(t)&&this.sn("posthog.identify")){var o=this.get_distinct_id();this.register({$user_id:t}),this.get_property(Cc)||this.register_once({$had_persisted_distinct_id:!0,$device_id:o},""),t!==o&&t!==this.get_property(Bi)&&(this.unregister(Bi),this.register({distinct_id:t}));var s,i=(this.persistence.get_property(rn)||fs)===fs;t!==o&&i?(this.persistence.set_property(rn,ms),this.setPersonPropertiesForFlags({$set:r||{},$set_once:n||{}},!1),this.capture(dp,{distinct_id:t,$anon_distinct_id:o},{$set:r||{},$set_once:n||{}}),this.$i=Py(t,r,n),(s=this.featureFlags)==null||s.setAnonymousDistinctId(o)):(r||n)&&this.setPersonProperties(r,n),t!==o&&(this.reloadFeatureFlags(),this.unregister(ea))}}setPersonProperties(t,r){if((t||r)&&this.sn("posthog.setPersonProperties")){var n=Py(this.get_distinct_id(),t,r);this.$i!==n?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:r||{}},!0),this.capture("$set",{$set:t||{},$set_once:r||{}}),this.$i=n):De.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,r,n){if(t&&r){var o=this.getGroups(),s=o[t]!==r;if(s&&this.resetGroupPropertiesForFlags(t),this.register({$groups:Re({},o,{[t]:r})}),s||n){var i={$group_type:t,$group_key:r};n&&(i.$group_set=n),this.capture(dy,i)}n&&this.setGroupPropertiesForFlags({[t]:n}),s&&!n&&this.reloadFeatureFlags()}else De.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,r){var n;r===void 0&&(r=!0),(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(t,r)}resetPersonPropertiesForFlags(){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,r){var n;r===void 0&&(r=!0),this.sn("posthog.setGroupPropertiesForFlags")&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(t,r))}resetGroupPropertiesForFlags(t){var r;(r=this.featureFlags)==null||r.resetGroupPropertiesForFlags(t)}reset(t){var r,n,o,s,i,l,u,d;if(De.info("reset"),!this.__loaded)return De.uninitializedWarning("posthog.reset");var p=this.get_property(Cc);if(this.consent.reset(),(r=this.persistence)==null||r.clear(),(n=this.sessionPersistence)==null||n.clear(),(o=this.surveys)==null||o.reset(),(s=this.Yi)==null||s.stop(),(i=this.featureFlags)==null||i.reset(),(l=this.conversations)==null||l.reset(),(u=this.persistence)==null||u.set_property(rn,fs),(d=this.sessionManager)==null||d.resetSessionId(),this.$i=null,this.config.cookieless_mode===Dn)this.register_once({distinct_id:hl,$device_id:null},"");else{var f=this.config.get_device_id(Zn());this.register_once({distinct_id:f,$device_id:t?f:p},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,r){var n;this.config.identity_distinct_id=t,this.config.identity_hash=r,this.alias(t),(n=this.conversations)==null||n.ln()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,r;return(t=(r=this.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:r,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),o=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+r);if(t!=null&&t.withTimestamp&&n){var s,i=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!n)return o;o+="?t="+Math.max(Math.floor((new Date().getTime()-n)/1e3)-i,0)}return o}alias(t,r){return t===this.get_property(NI)?(De.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(Le(r)&&(r=this.get_distinct_id()),t!==r?(this.an(Bi,t),this.capture("$create_alias",{alias:t,distinct_id:r})):(De.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var r=Re({},this.config);if(Dt(t)){var n,o,s,i,l,u,d,p,f,m;At(this.config,Ay(t));var h=this.Hi();(n=this.persistence)==null||n.update_config(this.config,r,h),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new mp(Re({},this.config,{persistence:"sessionStorage"}),h);var v=this.Di(this.config.debug);yn(v)&&(this.config.debug=v),yn(this.config.debug)&&(this.config.debug?(hr.DEBUG=!0,Tt.R()&&Tt.N("ph_debug",!0),De.info("set_config",{config:t,oldConfig:r,newConfig:Re({},this.config)})):(hr.DEBUG=!1,Tt.R()&&Tt.q("ph_debug"))),(o=this.exceptionObserver)==null||o.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(l=this.autocapture)==null||l.startIfEnabled(),(u=this.heatmaps)==null||u.startIfEnabled(),(d=this.exceptionObserver)==null||d.startIfEnabledOrStop(),(p=this.deadClicksAutocapture)==null||p.startIfEnabledOrStop(),(f=this.surveys)==null||f.loadIfEnabled(),this.cn(),(m=this.externalIntegrations)==null||m.startIfEnabledOrStop()}}_overrideSDKInfo(t,r){hr.LIB_NAME=t,hr.LIB_VERSION=r}startSessionRecording(t){var r,n,o,s,i,l=t===!0,u={sampling:l||!(t==null||!t.sampling),linked_flag:l||!(t==null||!t.linked_flag),url_trigger:l||!(t==null||!t.url_trigger),event_trigger:l||!(t==null||!t.event_trigger)};Object.values(u).some(Boolean)&&((r=this.sessionManager)==null||r.checkAndGetSessionAndWindowId(),u.sampling&&((n=this.sessionRecording)==null||n.overrideSampling()),u.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),u.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),u.event_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,r){if(this.exceptions){var n=new Error("PostHog syntheticException"),o=this.exceptions.buildProperties(t,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(Re({},o,r))}}addExceptionStep(t,r){var n;(n=this.exceptions)==null||n.addExceptionStep(t,r)}captureLog(t){var r;(r=this.logs)==null||r.captureLog(t)}get logger(){var t,r;return(t=(r=this.logs)==null?void 0:r.logger)!==null&&t!==void 0?t:kr.dn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var r,n;return(r=(n=this.toolbar)==null?void 0:n.loadToolbar(t))!==null&&r!==void 0&&r}get_property(t){var r;return(r=this.persistence)==null?void 0:r.props[t]}getSessionProperty(t){var r;return(r=this.sessionPersistence)==null?void 0:r.props[t]}toString(){var t,r=(t=this.config.name)!==null&&t!==void 0?t:Cs;return r!==Cs&&(r=Cs+"."+r),r}_isIdentified(){var t,r;return((t=this.persistence)==null?void 0:t.get_property(rn))===ms||((r=this.sessionPersistence)==null?void 0:r.get_property(rn))===ms}nn(){var t,r;return!(this.config.person_profiles==="never"||this.config.person_profiles===Am&&!this._isIdentified()&&Is(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[Bi])&&((r=this.persistence)==null||(r=r.props)==null||!r[Ic]))}Xi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(t){return this.config.person_profiles==="never"?(De.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(Ic,!0),!0)}Hi(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Co)}cn(){var t,r,n,o,s=this.Hi();return((t=this.persistence)==null?void 0:t._r)!==s&&((n=this.persistence)==null||n.set_disabled(s)),((r=this.sessionPersistence)==null?void 0:r._r)!==s&&((o=this.sessionPersistence)==null||o.set_disabled(s)),s}opt_in_capturing(t){var r;if(this.config.cookieless_mode!==Dn){if(this.Ri()){var n,o,s,i,l;this.reset(!0),(n=this.sessionManager)==null||n.destroy(),(o=this.pageViewManager)==null||o.destroy(),this.sessionManager=new Cy(this),this.pageViewManager=new hy(this),this.persistence&&(this.sessionPropsManager=new Sy(this,this.sessionManager,this.persistence));var u,d=(s=(i=this.config.__extensionClasses)==null?void 0:i.sessionRecording)!==null&&s!==void 0?s:(l=kr.__defaultExtensionClasses)==null?void 0:l.sessionRecording;d&&(this.sessionRecording=this.Mi(this.sessionRecording,new d(this)),this.Qi&&((u=this.sessionRecording)==null||u.onRemoteConfig==null||u.onRemoteConfig(this.Qi)))}var p,f;this.consent.optInOut(!0),this.cn(),this.Ji(),(r=this.sessionRecording)==null||r.startIfEnabledOrStop(),this.config.cookieless_mode==Co&&((p=this.surveys)==null||p.loadIfEnabled()),(Le(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((f=t==null?void 0:t.captureEventName)!==null&&f!==void 0?f:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ki()}else De.warn(Ty)}opt_out_capturing(){var t,r,n;this.config.cookieless_mode!==Dn?(this.config.cookieless_mode===Co&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===Co&&(this.register({distinct_id:hl,$device_id:null}),(t=this.sessionRecording)==null||t.stopRecording(),this.sessionRecording=void 0,(r=this.sessionManager)==null||r.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.Ki())):De.warn(Ty)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===Dn||(this.config.cookieless_mode===Co?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return Mr?l$(Mr,this.config.custom_blocked_useragents):void 0}Ki(){Oe&&(Oe.visibilityState==="visible"?this.Fi||(this.Fi=!0,this.capture(Es,{title:Oe.title},{send_instantly:!0}),this.Ai&&(Oe.removeEventListener($c,this.Ai),this.Ai=null)):this.Ai||(this.Ai=this.Ki.bind(this),zt(Oe,$c,this.Ai)))}debug(t){t===!1?(oe==null||oe.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(oe==null||oe.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Lr(){var t,r,n,o,s,i,l=this.qi||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(De.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",o=De,s=(r="advanced_disable_flags")in(t=l)&&!at(t[r]),i=n in t&&!at(t[n]),s?t[r]:!!i&&(o&&o.warn("Config field '"+n+"' is deprecated. Please use '"+r+"' instead. The old field will be removed in a future major version."),t[n]))}rn(t){if(at(this.config.before_send))return t;var r=pt(this.config.before_send)?this.config.before_send:[this.config.before_send],n=t;for(var o of r){if(n=o(n),at(n)){var s="Event '"+t.event+"' was rejected in beforeSend function";return TG(t.event)?De.warn(s+". This can cause unexpected behavior."):De.info(s),null}n.properties&&!Is(n.properties)||De.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return n}getPageViewId(){var t;return(t=this.pageViewManager.dr)==null?void 0:t.pageViewId}captureTraceFeedback(t,r){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:r})}captureTraceMetric(t,r,n){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:r,$ai_metric_value:String(n)})}Di(t){var r=yn(t)&&!t,n=Tt.R()&&Tt.A("ph_debug")==="true";return!r&&(!!n||t)}}kr.__defaultExtensionClasses={},kr.dn={trace:gs=()=>{},debug:gs,info:gs,warn:gs,error:gs,fatal:gs},function(e,t){for(var r=0;t.length>r;r++)e.prototype[t[r]]=p9(e.prototype[t[r]])}(kr,["identify"]);var Q9=1,e7=3,t7=11;function jy(e){return e instanceof Element&&(e.id===zI||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function Bo(e){return!!e&&e.nodeType===Q9}function an(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function f$(e){return!!e&&e.nodeType===e7}function m$(e){return!!e&&e.nodeType===t7&&Bo(e.host)}function ev(e){return e?Qu(e).split(/\s+/):[]}function Oy(e){var t=oe==null?void 0:oe.location.href;return!!(t&&e&&e.some(r=>t.match(r)))}function Fc(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return ev(t)}function h$(e){return at(e)?null:Qu(e).split(/(\s+)/).filter(t=>na(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function ba(e){var t="";return Vm(e)&&!v$(e)&&e.childNodes&&e.childNodes.length&&wt(e.childNodes,function(r){var n;f$(r)&&r.textContent&&(t+=(n=h$(r.textContent))!==null&&n!==void 0?n:"")}),Qu(t)}function Ny(e){return Le(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var tv=["a","button","form","input","select","textarea","label"];function Dy(e,t){if(Le(t))return!0;var r,n=function(s){if(t.some(i=>s.matches(i)))return{v:!0}};for(var o of e)if(r=n(o))return r.v;return!1}function g$(e){var t=e.parentNode;return!(!t||!Bo(t))&&t}var r7=["next","previous","prev",">","<"],ky=[".ph-no-rageclick",".ph-no-capture"],Fm=e=>!e||an(e,"html")||!Bo(e),My=(e,t)=>{if(!oe||Fm(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var r=!1,n=[e],o=e;o.parentNode&&!an(o,"body");)if(m$(o.parentNode))n.push(o.parentNode.host),o=o.parentNode.host;else{var s=g$(o);if(!s)break;if(t||tv.indexOf(s.tagName.toLowerCase())>-1)r=!0;else{var i=oe.getComputedStyle(s);i&&i.getPropertyValue("cursor")==="pointer"&&(r=!0)}n.push(s),o=s}return{parentIsUsefulElement:r,targetElementList:n}};function Vm(e){for(var t=e;t.parentNode&&!an(t,"body");t=t.parentNode){var r=Fc(t);if(it(r,"ph-sensitive")||it(r,"ph-no-capture"))return!1}if(it(Fc(e),"ph-include"))return!0;var n=e.type||"";if(It(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";return!It(o)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(o.replace(/[^a-zA-Z0-9]/g,""))}function v$(e){return!!(an(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||an(e,"select")||an(e,"textarea")||e.getAttribute("contenteditable")==="true")}var b$="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",n7=new RegExp("^(?:"+b$+")$"),o7=new RegExp(b$),_$="\\d{3}-?\\d{2}-?\\d{4}",s7=new RegExp("^("+_$+")$"),i7=new RegExp("("+_$+")");function na(e,t){return t===void 0&&(t=!0),!(at(e)||It(e)&&(e=Qu(e),(t?n7:o7).test((e||"").replace(/[- ]/g,""))||(t?s7:i7).test(e)))}function Ly(e){var t=ba(e);return na(t=(t+" "+y$(e)).trim())?t:""}function y$(e){var t="";return e&&e.childNodes&&e.childNodes.length&&wt(e.childNodes,function(r){var n;if(r&&((n=r.tagName)==null?void 0:n.toLowerCase())==="span")try{var o=ba(r);t=(t+" "+o).trim(),r.childNodes&&r.childNodes.length&&(t=(t+" "+y$(r)).trim())}catch(s){De.error("[AutoCapture]",s)}}),t}function zy(e){return e.replace(/"|\\"/g,'\\"')}function a7(e){var t=e.attr__class;return t?pt(t)?t:ev(t):void 0}class Fy{constructor(t){this.disabled=t===!1;var r=Dt(t)?t:{};this.thresholdPx=r.threshold_px||30,this.timeoutMs=r.timeout_ms||1e3,this.clickCount=r.click_count||3,this.clicks=[]}isRageClick(t,r,n){if(this.disabled)return!1;var o=this.clicks[this.clicks.length-1];if(o&&Math.abs(t-o.x)+Math.abs(r-o.y)<this.thresholdPx&&this.timeoutMs>n-o.timestamp){if(this.clicks.push({x:t,y:r,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:r,timestamp:n}];return!1}}var yp="$copy_autocapture",xp=St("[AutoCapture]");function wp(e,t){return t.length>e?t.slice(0,e)+"...":t}function l7(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Bo(t));return t}function c7(e,t){var r,n,{e:o,maskAllElementAttributes:s,maskAllText:i,elementAttributeIgnoreList:l,elementsChainAsString:u}=t;if(!Bo(e))return{props:{}};for(var d=[e],p=e;p.parentNode&&!an(p,"body");)if(m$(p.parentNode))d.push(p.parentNode.host),p=p.parentNode.host;else{if(!Bo(p.parentNode))break;d.push(p.parentNode),p=p.parentNode}var f,m,h=[],v={},g=!1,b=!1;if(wt(d,w=>{var I=Vm(w);if(an(w,"a")){var T=w.getAttribute("href");g=I&&!!T&&na(T)&&T}it(Fc(w),"ph-no-capture")&&(b=!0),h.push(function(P,$,A,k){var D=P.tagName.toLowerCase(),z={tag_name:D};tv.indexOf(D)>-1&&!A&&(z.$el_text=D.toLowerCase()==="a"||D.toLowerCase()==="button"?wp(1024,Ly(P)):wp(1024,ba(P)));var X=Fc(P);X.length>0&&(z.classes=X.filter(function(F){return F!==""})),wt(P.attributes,function(F){var H;if((!v$(P)||["name","id","class","aria-label"].indexOf(F.name)!==-1)&&(k==null||!k.includes(F.name))&&!$&&na(F.value)&&(!It(H=F.name)||H.substring(0,10)!=="_ngcontent"&&H.substring(0,7)!=="_nghost")){var ee=F.value;F.name==="class"&&(ee=ev(ee).join(" ")),z["attr__"+F.name]=wp(1024,ee)}});for(var V=1,Y=1,U=P;U=l7(U);)V++,U.tagName===P.tagName&&Y++;return z.nth_child=V,z.nth_of_type=Y,z}(w,s,i,l));var R=function(P){if(!Vm(P))return{};var $={};return wt(P.attributes,function(A){if(A.name&&A.name.indexOf("data-ph-capture-attribute")===0){var k=A.name.replace("data-ph-capture-attribute-",""),D=A.value;k&&D&&na(D)&&($[k]=D)}}),$}(w);At(v,R)}),b)return{props:{},explicitNoCapture:b};if(i||(h[0].$el_text=an(e,"a")||an(e,"button")?Ly(e):ba(e)),g){var _,y;h[0].attr__href=g;var x=(_=Oc(g))==null?void 0:_.host,S=oe==null||(y=oe.location)==null?void 0:y.host;x&&S&&x!==S&&(f=g)}return{props:At({$event_type:o.type,$ce_version:1},u?{}:{$elements:h},{$elements_chain:(m=h,function(w){return w.map(I=>{var T,R,P="";if(I.tag_name&&(P+=I.tag_name),I.attr_class)for(var $ of(I.attr_class.sort(),I.attr_class))P+="."+$.replace(/"/g,"");var A=Re({},I.text?{text:I.text}:{},{"nth-child":(T=I.nth_child)!==null&&T!==void 0?T:0,"nth-of-type":(R=I.nth_of_type)!==null&&R!==void 0?R:0},I.href?{href:I.href}:{},I.attr_id?{attr_id:I.attr_id}:{},I.attributes),k={};return zl(A).sort((D,z)=>{var[X]=D,[V]=z;return X.localeCompare(V)}).forEach(D=>{var[z,X]=D;return k[zy(z.toString())]=zy(X.toString())}),(P+=":")+zl(k).map(D=>{var[z,X]=D;return z+'="'+X+'"'}).join("")}).join(";")}(function(w){return w.map(I=>{var T,R,P={text:(T=I.$el_text)==null?void 0:T.slice(0,400),tag_name:I.tag_name,href:(R=I.attr__href)==null?void 0:R.slice(0,2048),attr_class:a7(I),attr_id:I.attr__id,nth_child:I.nth_child,nth_of_type:I.nth_of_type,attributes:{}};return zl(I).filter($=>{var[A]=$;return A.indexOf("attr__")===0}).forEach($=>{var[A,k]=$;return P.attributes[A]=k}),P})}(m)))},(r=h[0])!=null&&r.$el_text?{$el_text:(n=h[0])==null?void 0:n.$el_text}:{},f&&o.type==="click"?{$external_click_url:f}:{},v)}}var ji=St("[ExceptionAutocapture]");function Vy(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return On(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}var u7=St("[TracingHeaders]"),Wn=St("[Web Vitals]"),By=9e5,Hy="disabled",Uy="lazy_loading",Oi="awaiting_config",xl="missing_config";St("[SessionRecording]"),St("[SessionRecording]");var Bm="[SessionRecording]",qn=St(Bm),d7=St("[Heatmaps]");function Wy(e){return Dt(e)&&"clientX"in e&&"clientY"in e&&Yr(e.clientX)&&Yr(e.clientY)}var qy=St("[Product Tours]"),p7=["$set_once","$set"],Gn=St("[SiteApps]"),Gy="Error while initializing PostHog app with config id ";function vs(e,t,r){if(at(e))return!1;switch(r){case"exact":return e===t;case"contains":var n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(n,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class f7{constructor(t){this.vn=new Qg,this.fn=(r,n)=>this.pn(r,n)&&this.gn(r,n)&&this.mn(r,n)&&this.yn(r,n),this.pn=(r,n)=>n==null||!n.event||(r==null?void 0:r.event)===(n==null?void 0:n.event),this._instance=t,this.bn=new Set,this._n=new Set}init(){var t,r;Le((t=this._instance)==null?void 0:t._addCaptureHook)||(r=this._instance)==null||r._addCaptureHook((n,o)=>{this.on(n,o)})}register(t){var r,n;if(!Le((r=this._instance)==null?void 0:r._addCaptureHook)&&(t.forEach(i=>{var l,u;(l=this._n)==null||l.add(i),(u=i.steps)==null||u.forEach(d=>{var p;(p=this.bn)==null||p.add((d==null?void 0:d.event)||"")})}),(n=this._instance)!=null&&n.autocapture)){var o,s=new Set;t.forEach(i=>{var l;(l=i.steps)==null||l.forEach(u=>{u!=null&&u.selector&&s.add(u==null?void 0:u.selector)})}),(o=this._instance)==null||o.autocapture.setElementSelectors(s)}}on(t,r){var n;r!=null&&t.length!=0&&(this.bn.has(t)||this.bn.has(r==null?void 0:r.event))&&this._n&&((n=this._n)==null?void 0:n.size)>0&&this._n.forEach(o=>{this.wn(r,o)&&this.vn.emit("actionCaptured",o.name)})}xn(t){this.onAction("actionCaptured",r=>t(r))}wn(t,r){if((r==null?void 0:r.steps)==null)return!1;for(var n of r.steps)if(this.fn(t,n))return!0;return!1}onAction(t,r){return this.vn.on(t,r)}gn(t,r){if(r!=null&&r.url){var n,o=t==null||(n=t.properties)==null?void 0:n.$current_url;if(!o||typeof o!="string"||!vs(o,r.url,r.url_matching||"contains"))return!1}return!0}mn(t,r){return!!this.Sn(t,r)&&!!this.kn(t,r)&&!!this.Cn(t,r)}Sn(t,r){var n;if(r==null||!r.href)return!0;var o=this.In(t);if(o.length>0)return o.some(l=>vs(l.href,r.href,r.href_matching||"exact"));var s,i=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!i&&vs((s=i.match(/(?::|")href="(.*?)"/))?s[1]:"",r.href,r.href_matching||"exact")}kn(t,r){var n;if(r==null||!r.text)return!0;var o=this.In(t);if(o.length>0)return o.some(d=>vs(d.text,r.text,r.text_matching||"exact")||vs(d.$el_text,r.text,r.text_matching||"exact"));var s,i,l,u=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!u&&(s=function(d){for(var p,f=[],m=/(?::|")text="(.*?)"/g;!at(p=m.exec(d));)f.includes(p[1])||f.push(p[1]);return f}(u),i=r.text,l=r.text_matching||"exact",s.some(d=>vs(d,i,l)))}Cn(t,r){var n,o;if(r==null||!r.selector)return!0;var s=t==null||(n=t.properties)==null?void 0:n.$element_selectors;if(s!=null&&s.includes(r.selector))return!0;var i=(t==null||(o=t.properties)==null?void 0:o.$elements_chain)||"";if(r.selector_regex&&i)try{return new RegExp(r.selector_regex).test(i)}catch{return!1}return!1}In(t){var r;return(t==null||(r=t.properties)==null?void 0:r.$elements)==null?[]:t==null?void 0:t.properties.$elements}yn(t,r){return r==null||!r.properties||r.properties.length===0||u$(r.properties.reduce((n,o)=>{var s=pt(o.value)?o.value.map(String):o.value!=null?[String(o.value)]:[];return n[o.key]={values:s,operator:o.operator||"exact"},n},{}),t==null?void 0:t.properties)}}class m7{constructor(t){this._instance=t,this.Tn=new Map,this.En=new Map,this.Mn=new Map}Pn(t,r){return!!t&&u$(t.propertyFilters,r==null?void 0:r.properties)}Rn(t,r){var n=new Map;return t.forEach(o=>{var s;(s=o.conditions)==null||(s=s[r])==null||(s=s.values)==null||s.forEach(i=>{if(i!=null&&i.name){var l=n.get(i.name)||[];l.push(o.id),n.set(i.name,l)}})}),n}On(t,r,n){var o=(n===Ss.Activation?this.Tn:this.En).get(t),s=[];return this.Ln(i=>{s=i.filter(l=>o==null?void 0:o.includes(l.id))}),s.filter(i=>{var l,u=(l=i.conditions)==null||(l=l[n])==null||(l=l.values)==null?void 0:l.find(d=>d.name===t);return this.Pn(u,r)})}register(t){var r;Le((r=this._instance)==null?void 0:r._addCaptureHook)||(this.Fn(t),this.An(t))}An(t){var r=t.filter(n=>{var o,s;return((o=n.conditions)==null?void 0:o.actions)&&((s=n.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0});r.length!==0&&(this.Nn==null&&(this.Nn=new f7(this._instance),this.Nn.init(),this.Nn.xn(n=>{this.onAction(n)})),r.forEach(n=>{var o,s,i,l,u;n.conditions&&(o=n.conditions)!=null&&o.actions&&(s=n.conditions)!=null&&(s=s.actions)!=null&&s.values&&((i=n.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0&&((l=this.Nn)==null||l.register(n.conditions.actions.values),(u=n.conditions)==null||(u=u.actions)==null||(u=u.values)==null||u.forEach(d=>{if(d&&d.name){var p=this.Mn.get(d.name);p&&p.push(n.id),this.Mn.set(d.name,p||[n.id])}}))}))}Fn(t){var r,n=t.filter(s=>{var i,l;return((i=s.conditions)==null?void 0:i.events)&&((l=s.conditions)==null||(l=l.events)==null||(l=l.values)==null?void 0:l.length)>0}),o=t.filter(s=>{var i,l;return((i=s.conditions)==null?void 0:i.cancelEvents)&&((l=s.conditions)==null||(l=l.cancelEvents)==null||(l=l.values)==null?void 0:l.length)>0});n.length===0&&o.length===0||((r=this._instance)==null||r._addCaptureHook((s,i)=>{this.onEvent(s,i)}),this.Tn=this.Rn(t,Ss.Activation),this.En=this.Rn(t,Ss.Cancellation))}onEvent(t,r){var n,o=this.le(),s=this.$n(),i=this.Dn(),l=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[s])||[];if(i===t&&r&&l.length>0){var u,d;o.info("event matched, removing item from activated items",{event:t,eventPayload:r,existingActivatedItems:l});var p=(r==null||(u=r.properties)==null?void 0:u.$survey_id)||(r==null||(d=r.properties)==null?void 0:d.$product_tour_id);if(p){var f=l.indexOf(p);0>f||(l.splice(f,1),this.qn(l))}}else{if(this.En.has(t)){var m=this.On(t,r,Ss.Cancellation);m.length>0&&(o.info("cancel event matched, cancelling items",{event:t,itemsToCancel:m.map(v=>v.id)}),m.forEach(v=>{var g=l.indexOf(v.id);0>g||l.splice(g,1),this.jn(v.id)}),this.qn(l))}if(this.Tn.has(t)){o.info("event name matched",{event:t,eventPayload:r,items:this.Tn.get(t)});var h=this.On(t,r,Ss.Activation);this.qn(l.concat(h.map(v=>v.id)||[]))}}}onAction(t){var r,n=this.$n(),o=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[n])||[];this.Mn.has(t)&&this.qn(o.concat(this.Mn.get(t)||[]))}qn(t){var r=this.le(),n=[...new Set(t)].filter(o=>!this.Hn(o));r.info("updating activated items",{activatedItems:n}),this.Un(n)}getActivatedIds(){var t,r=this.$n();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[r])||[]}getEventToItemsMap(){return this.Tn}Bn(){return this.Nn}}class h7 extends m7{constructor(t){super(t)}$n(){return Sm}Dn(){return As.SHOWN}Ln(t){var r;(r=this._instance)==null||r.getSurveys(t)}jn(t){var r;(r=this._instance)==null||r.cancelPendingSurvey(t)}le(){return gt}Un(t){var r;(r=this._instance)==null||(r=r.persistence)==null||r.register({[Sm]:t})}Hn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Ep="SDK is not enabled or survey functionality is not yet loaded",Ky="Disabled. Not loading surveys.",g7=oe!=null&&oe.location?Dc(oe.location.hash,"__posthog")||Dc(location.hash,"state"):null,Xy="_postHogToolbarParams",Yy=St("[Toolbar]"),fr=St("[FeatureFlags]"),wo=St("[FeatureFlags]",{debugEnabled:!0}),Sp=`" failed. Feature flags didn't load in time.`,Jy=e=>{for(var t={},r=0;e.length>r;r++)t[e[r]]=!0;return t},Zy=e=>{var t={};for(var[r,n]of zl(e||{}))n&&(t[r]=n);return t},An=St("[Error tracking]"),Qy="Refusing to render web experiment since the viewer is a likely bot",v7={icontains:(e,t)=>!!oe&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!oe&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!oe&&zc(t.href,e),not_regex:(e,t)=>!!oe&&!zc(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class or{get qt(){return this._instance.config}constructor(t){var r=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(n){n===void 0&&(n=!1),r.getWebExperiments(o=>{or.zn("retrieved web experiments from the server"),r.Vn=new Map,o.forEach(s=>{if(s.feature_flag_key){var i;r.Vn&&(or.zn("setting flag key ",s.feature_flag_key," to web experiment ",s),(i=r.Vn)==null||i.set(s.feature_flag_key,s));var l=r._instance.getFeatureFlag(s.feature_flag_key);It(l)&&s.variants[l]&&r.Wn(s.name,l,s.variants[l].transforms)}else if(s.variants)for(var u in s.variants){var d=s.variants[u];or.Zn(d)&&r.Wn(s.name,u,d.transforms)}})},n)},this._instance=t,this._instance.onFeatureFlags(n=>{this.onFeatureFlags(n)})}initialize(){}onFeatureFlags(t){if(this._is_bot())or.zn(Qy);else if(!this.qt.disable_web_experiments){if(at(this.Vn))return this.Vn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();or.zn("applying feature flags",t),t.forEach(r=>{var n;if(this.Vn&&(n=this.Vn)!=null&&n.has(r)){var o,s=this._instance.getFeatureFlag(r),i=(o=this.Vn)==null?void 0:o.get(r);s&&i!=null&&i.variants[s]&&this.Wn(i.name,s,i.variants[s].transforms)}})}}previewWebExperiment(){var t=or.getWindowLocation();if(t!=null&&t.search){var r=Nc(t==null?void 0:t.search,"__experiment_id"),n=Nc(t==null?void 0:t.search,"__experiment_variant");r&&n&&(or.zn("previewing web experiments "+r+" && "+n),this.getWebExperiments(o=>{this.Gn(parseInt(r),n,o)},!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,r,n){if(this.qt.disable_web_experiments&&!n)return t([]);var o=this._instance.get_property("$web_experiments");if(o&&!r)return t(o);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:s=>t(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(t,r,n){var o=n.filter(s=>s.id===t);o&&o.length>0&&(or.zn("Previewing web experiment ["+o[0].name+"] with variant ["+r+"]"),this.Wn(o[0].name,r,o[0].variants[r].transforms))}static Zn(t){return!at(t.conditions)&&or.Qn(t)&&or.Jn(t)}static Qn(t){var r;if(at(t.conditions)||at((r=t.conditions)==null?void 0:r.url))return!0;var n,o,s,i=or.getWindowLocation();return!!i&&((n=t.conditions)==null||!n.url||v7[(o=(s=t.conditions)==null?void 0:s.urlMatchType)!==null&&o!==void 0?o:"icontains"](t.conditions.url,i))}static getWindowLocation(){return oe==null?void 0:oe.location}static Jn(t){var r;if(at(t.conditions)||at((r=t.conditions)==null?void 0:r.utm))return!0;var n=GI();if(n.utm_source){var o,s,i,l,u,d,p,f,m=(o=t.conditions)==null||(o=o.utm)==null||!o.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==n.utm_campaign,h=(i=t.conditions)==null||(i=i.utm)==null||!i.utm_source||((l=t.conditions)==null||(l=l.utm)==null?void 0:l.utm_source)==n.utm_source,v=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_medium||((d=t.conditions)==null||(d=d.utm)==null?void 0:d.utm_medium)==n.utm_medium,g=(p=t.conditions)==null||(p=p.utm)==null||!p.utm_term||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_term)==n.utm_term;return m&&v&&g&&h}return!1}static zn(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];De.info("[WebExperiments] "+t,n)}Wn(t,r,n){this._is_bot()?or.zn(Qy):r!=="control"?n.forEach(o=>{if(o.selector){var s;or.zn("applying transform of variant "+r+" for experiment "+t+" ",o);var i=(s=document)==null?void 0:s.querySelectorAll(o.selector);i==null||i.forEach(l=>{var u=l;o.html&&(u.innerHTML=o.html),o.css&&u.setAttribute("style",o.css)})}}):or.zn("Control variants leave the page unmodified.")}_is_bot(){return Mr&&this._instance?l$(Mr,this.qt.custom_blocked_useragents):void 0}}var Wr=St("[Conversations]"),Eo="Conversations not available yet.",rd={featureFlags:class{constructor(e){this.Kn=!1,this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}us(){var e,t;return(e=(t=this.ni)==null?void 0:t.wr(this.qt.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}ls(){return!!this.us()&&(this.ss||this.Xn||(this.ss=!0,fr.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=(e=this.qt.evaluation_contexts)!==null&&e!==void 0?e:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.ns||(fr.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),t!=null&&t.length?t.filter(r=>{var n=r&&typeof r=="string"&&r.trim().length>0;return n||fr.error("Invalid evaluation context found:",r,"Expected non-empty string"),n}):[]}cs(){return this.hs().length>0}initialize(){var e,t,{config:r}=this._instance,n=(e=(t=r.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(n).length){var o,s,i=(o=(s=r.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&o!==void 0?o:{},l=Object.keys(n).filter(d=>!!n[d]).reduce((d,p)=>(d[p]=n[p]||!1,d),{}),u=Object.keys(i).filter(d=>l[d]).reduce((d,p)=>(i[p]&&(d[p]=i[p]),d),{});this.receivedFeatureFlags({featureFlags:l,featureFlagPayloads:u})}}updateFlags(e,t,r){var n=r!=null&&r.merge?this.getFlagVariants():{},o=r!=null&&r.merge?this.getFlagPayloads():{},s=Re({},n,e),i=Re({},o,t),l={};for(var[u,d]of Object.entries(s)){var p=typeof d=="string";l[u]={key:u,enabled:!!p||!!d,variant:p?d:void 0,reason:void 0,metadata:Le(i==null?void 0:i[u])?void 0:{id:0,version:void 0,description:void 0,payload:i[u]}}}this.receivedFeatureFlags({flags:l})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(ym),t=this.os(jn),r=this.os(ws);if(!r&&!t)return e||{};var n=At({},e||{}),o=[...new Set([...Object.keys(r||{}),...Object.keys(t||{})])];for(var s of o){var i,l,u=n[s],d=t==null?void 0:t[s],p=Le(d)?(i=u==null?void 0:u.enabled)!==null&&i!==void 0&&i:!!d,f=Le(d)?u.variant:typeof d=="string"?d:void 0,m=r==null?void 0:r[s],h=Re({},u,{enabled:p,variant:p?f??(u==null?void 0:u.variant):void 0});p!==(u==null?void 0:u.enabled)&&(h.original_enabled=u==null?void 0:u.enabled),f!==(u==null?void 0:u.variant)&&(h.original_variant=u==null?void 0:u.variant),m&&(h.metadata=Re({},u==null?void 0:u.metadata,{payload:m,original_payload:u==null||(l=u.metadata)==null?void 0:l.payload})),n[s]=h}return this.Kn||(fr.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:r,finalDetails:n}),this.Kn=!0),n}getFlagVariants(){var e=this.os($s),t=this.os(jn);if(!t)return e||{};for(var r=At({},e),n=Object.keys(t),o=0;n.length>o;o++)r[n[o]]=t[n[o]];return this.Kn||(fr.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:r}),this.Kn=!0),r}getFlagPayloads(){var e=this.os(xm),t=this.os(ws);if(!t)return e||{};for(var r=At({},e||{}),n=Object.keys(t),o=0;n.length>o;o++)r[n[o]]=t[n[o]];return this.Kn||(fr.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:r}),this.Kn=!0),r}reloadFeatureFlags(){this.es||this.qt.advanced_disable_feature_flags||this.ds||(this._instance.Li.emit("featureFlagsReloading",!0),this.ds=setTimeout(()=>{this.vs()},5))}fs(){clearTimeout(this.ds),this.ds=void 0}ensureFlagsLoaded(){this.Yn||this.Xn||this.ds||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}vs(e){var t;if(this.fs(),!this._instance.Lr())if(this.Xn)this.ts=!0;else{var r=this.qt.token,n=this.os(Cc),o={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Re({},((t=this.ni)==null?void 0:t.get_initial_props())||{},this.os(qi)||{}),group_properties:this.os(So),timezone:QI()};Vn(n)||Le(n)||(o.$device_id=n),(e!=null&&e.disableFlags||this.qt.advanced_disable_feature_flags)&&(o.disable_flags=!0),this.cs()&&(o.evaluation_contexts=this.hs());var s=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Xn=!0,this._instance._send_request({method:"POST",url:s,data:o,compression:this.qt.disable_compression?void 0:nn.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback:i=>{var l,u,d,p=!0;if(i.statusCode===200&&(this.ts||(this.$anon_distinct_id=void 0),p=!1),this.Xn=!1,!o.disable_flags||this.ts){this.rs=!p;var f=[];i.error?i.error instanceof Error?f.push(i.error.name==="AbortError"?"timeout":"connection_error"):f.push("unknown_error"):i.statusCode!==200&&f.push("api_error_"+i.statusCode),(l=i.json)!=null&&l.errorsWhileComputingFlags&&f.push("errors_while_computing_flags");var m,h=!((u=i.json)==null||(u=u.quotaLimited)==null||!u.includes("feature_flags"));h&&f.push("quota_limited"),(d=this.ni)==null||d.register({[Pm]:f}),h?fr.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(o.disable_flags||this.receivedFeatureFlags((m=i.json)!==null&&m!==void 0?m:{},p,{partialResponse:!!this.qt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(e,t){var r;if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFeatureFlagResult(e,t);return(r=n==null?void 0:n.variant)!==null&&r!==void 0?r:n==null?void 0:n.enabled}}else fr.warn('getFeatureFlag for key "'+e+Sp)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t==null?void 0:t.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var r=this.getFlagVariants(),n=e in r,o=r[e],s=this.getFlagPayloads()[e],i=String(o),l=this.os(wm)||void 0,u=this.os(Rc)||void 0,d=this.os(ea)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var p,f=this._instance.get_session_id(),m=this.os(Cm);f&&f!==m&&(d={},(p=this.ni)==null||p.register({[ea]:d,[Cm]:f}))}if((t.send_event||!("send_event"in t))&&(!(e in d)||!d[e].includes(i))){var h,v,g,b,_,y,x,S,w,I;pt(d[e])?d[e].push(i):d[e]=[i],(h=this.ni)==null||h.register({[ea]:d});var T=this.getFeatureFlagDetails(e),R=[...(v=this.os(Pm))!==null&&v!==void 0?v:[]];Le(o)&&R.push("flag_missing");var P={$feature_flag:e,$feature_flag_response:o,$feature_flag_payload:s||null,$feature_flag_request_id:l,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((g=this.qt.bootstrap)==null||(g=g.featureFlags)==null?void 0:g[e])||null,$feature_flag_bootstrapped_payload:((b=this.qt.bootstrap)==null||(b=b.featureFlagPayloads)==null?void 0:b[e])||null,$used_bootstrap_value:!this.rs};Le(T==null||(_=T.metadata)==null?void 0:_.version)||(P.$feature_flag_version=T.metadata.version);var $,A=(y=T==null||(x=T.reason)==null?void 0:x.description)!==null&&y!==void 0?y:T==null||(S=T.reason)==null?void 0:S.code;A&&(P.$feature_flag_reason=A),T!=null&&(w=T.metadata)!=null&&w.id&&(P.$feature_flag_id=T.metadata.id),Le(T==null?void 0:T.original_variant)&&Le(T==null?void 0:T.original_enabled)||(P.$feature_flag_original_response=Le(T.original_variant)?T.original_enabled:T.original_variant),T!=null&&(I=T.metadata)!=null&&I.original_payload&&(P.$feature_flag_original_payload=T==null||($=T.metadata)==null?void 0:$.original_payload),R.length&&(P.$feature_flag_error=R.join(",")),this._instance.capture("$feature_flag_called",P)}if(n){var k=s;if(!Le(s))try{k=JSON.parse(s)}catch{}return{key:e,enabled:!!o,variant:typeof o=="string"?o:void 0,payload:k}}}}else fr.warn('getFeatureFlagResult for key "'+e+Sp)}getRemoteConfigPayload(e,t){var r=this.qt.token,n={distinct_id:this._instance.get_distinct_id(),token:r};this.cs()&&(n.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:n,compression:this.qt.disable_compression?void 0:nn.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback(o){var s,i=(s=o.json)==null?void 0:s.featureFlagPayloads;t((i==null?void 0:i[e])||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(e,t);return Le(r)?void 0:!!r}fr.warn('isFeatureEnabled for key "'+e+Sp)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,r){if(this.ni){this.Yn=!0;var n=this.getFlagVariants(),o=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(i,l,u,d,p,f){u===void 0&&(u={}),d===void 0&&(d={}),p===void 0&&(p={});var m=(R=>{var P=R.flags;return P?(R.featureFlags=Object.fromEntries(Object.keys(P).map($=>{var A;return[$,(A=P[$].variant)!==null&&A!==void 0?A:P[$].enabled]})),R.featureFlagPayloads=Object.fromEntries(Object.keys(P).filter($=>P[$].enabled).filter($=>{var A;return(A=P[$].metadata)==null?void 0:A.payload}).map($=>{var A;return[$,(A=P[$].metadata)==null?void 0:A.payload]}))):fr.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),R})(i),h=m.flags,v=m.featureFlags,g=m.featureFlagPayloads;if(v){var b=i.requestId,_=i.evaluatedAt;if(pt(v)){fr.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var y={};if(v)for(var x=0;v.length>x;x++)y[v[x]]=!0;l&&l.register({[Ml]:v,[$s]:y})}else{var S=v,w=g,I=h;if(f!=null&&f.partialResponse)S=Re({},u,S),w=Re({},d,w),I=Re({},p,I);else if(i.errorsWhileComputingFlags)if(h){var T=new Set(Object.keys(h).filter(R=>{var P;return!((P=h[R])!=null&&P.failed)}));S=Re({},u,Object.fromEntries(Object.entries(S).filter(R=>{var[P]=R;return T.has(P)}))),w=Re({},d,Object.fromEntries(Object.entries(w||{}).filter(R=>{var[P]=R;return T.has(P)}))),I=Re({},p,Object.fromEntries(Object.entries(I||{}).filter(R=>{var[P]=R;return T.has(P)})))}else S=Re({},u,S),w=Re({},d,w),I=Re({},p,I);l&&l.register(Re({[Ml]:Object.keys(Zy(S)),[$s]:S||{},[xm]:w||{},[ym]:I||{}},b?{[wm]:b}:{},_?{[Rc]:_}:{}))}}})(e,this.ni,n,o,s,r),t||(this.ss=!1),this.ps(t)}}override(e,t){t===void 0&&(t=!1),fr.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return fr.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ni.unregister(jn),this.ni.unregister(ws),this.ps(),wo.info("All overrides cleared");if(pt(e)){var t=Jy(e);return this.ni.register({[jn]:t}),this.ps(),wo.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var r,n=e;if(this.Kn=!!((r=n.suppressWarning)!==null&&r!==void 0&&r),"flags"in n){if(n.flags===!1)this.ni.unregister(jn),wo.info("Flag overrides cleared");else if(n.flags){if(pt(n.flags)){var o=Jy(n.flags);this.ni.register({[jn]:o})}else this.ni.register({[jn]:n.flags});wo.info("Flag overrides set",{flags:n.flags})}}return"payloads"in n&&(n.payloads===!1?(this.ni.unregister(ws),wo.info("Payload overrides cleared")):n.payloads&&(this.ni.register({[ws]:n.payloads}),wo.info("Payload overrides set",{payloads:n.payloads}))),void this.ps()}if(e&&typeof e=="object")return this.ni.register({[jn]:e}),this.ps(),wo.info("Flag overrides set",{flags:e});fr.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Yn){var{flags:t,flagVariants:r}=this.gs();e(t,r)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,r){var n,o=(this.os(Wi)||[]).find(u=>u.flagKey===e),s={["$feature_enrollment/"+e]:t},i={$feature_flag:e,$feature_enrollment:t,$set:s};o&&(i.$early_access_feature_name=o.name),r&&(i.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",i),this.setPersonPropertiesForFlags(s,!1);var l=Re({},this.getFlagVariants(),{[e]:t});(n=this.ni)==null||n.register({[Ml]:Object.keys(Zy(l)),[$s]:l}),this.ps()}getEarlyAccessFeatures(e,t,r){t===void 0&&(t=!1);var n=this.os(Wi),o=r?"&"+r.map(s=>"stage="+s).join("&"):"";if(n&&!t)return e(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+o),method:"GET",callback:s=>{var i,l;if(s.json){var u=s.json.earlyAccessFeatures;return(i=this.ni)==null||i.unregister(Wi),(l=this.ni)==null||l.register({[Wi]:u}),e(u)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(r=>t[r]),flagVariants:Object.keys(t).filter(r=>t[r]).reduce((r,n)=>(r[n]=t[n],r),{})}}ps(e){var{flags:t,flagVariants:r}=this.gs();this.featureFlagEventHandlers.forEach(n=>n(t,r,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var r=this.os(qi)||{},n=(e==null?void 0:e.$set)||(e!=null&&e.$set_once?{}:e),o=e==null?void 0:e.$set_once,s={};if(o)for(var i in o)({}).hasOwnProperty.call(o,i)&&(i in r||(s[i]=o[i]));this._instance.register({[qi]:Re({},r,s,n)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(qi)}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var r=this.os(So)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(n=>{r[n]=Re({},r[n],e[n]),delete e[n]}),this._instance.register({[So]:Re({},r,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(So)||{};this._instance.register({[So]:Re({},t,{[e]:{}})})}else this._instance.unregister(So)}reset(){this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.fs(),this.Kn=!1}}},b7={sessionRecording:class{get qt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){var e,t;return this.bs===Oi||this.bs===xl?this.bs:(e=(t=this.ys)==null?void 0:t.status)!==null&&e!==void 0?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=Hy,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw qn.error("started without valid sessionManager"),new Error(Bm+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===Dn)throw new Error(Bm+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!((e=this._instance.get_property(Ui))==null||!e.enabled),r=!this.qt.disable_session_recording,n=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return oe&&t&&r&&!n}startIfEnabledOrStop(e){var t;if(!this.ws||(t=this.ys)==null||!t.isStarted){var r=!Le(Object.assign)&&!Le(Array.from);this.ws&&r?(this.xs(e),qn.info("starting")):(this.bs=Hy,this.stopRecording())}}xs(e){var t,r,n;this.ws&&(this.bs!==Oi&&this.bs!==xl&&(this.bs=Uy),Je!=null&&(t=Je.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(r=Je.__PosthogExtensions__)!=null&&r.initSessionRecording?this.Ss(e):(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.ks,o=>{if(o)return qn.error("could not load recorder",o);this.Ss(e)}))}stopRecording(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.stop()}Cs(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.discard()}Is(){var e;(e=this.ni)==null||e.unregister(Kg)}Ts(e,t){if(at(e))return null;var r,n=Yr(e)?e:parseFloat(e);return typeof(r=n)!="number"||!Number.isFinite(r)||0>r||r>1?(qn.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):n}Es(e){if(this.ni){var t,r,n=this.ni,o=()=>{var s,i=e.sessionRecording===!1?void 0:e.sessionRecording,l=this.Ts((s=this.qt.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),u=this.Ts(i==null?void 0:i.sampleRate,"remote config sampleRate"),d=l??u;at(d)&&this.Is();var p=i==null?void 0:i.minimumDurationMilliseconds;n.register({[Ui]:Re({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:Re({capturePerformance:e.capturePerformance},i==null?void 0:i.networkPayloadCapture),canvasRecording:{enabled:i==null?void 0:i.recordCanvas,fps:i==null?void 0:i.canvasFps,quality:i==null?void 0:i.canvasQuality},sampleRate:d,minimumDurationMilliseconds:Le(p)?null:p,endpoint:i==null?void 0:i.endpoint,triggerMatchType:i==null?void 0:i.triggerMatchType,masking:i==null?void 0:i.masking,urlTriggers:i==null?void 0:i.urlTriggers,version:i==null?void 0:i.version,triggerGroups:i==null?void 0:i.triggerGroups})})};o(),(t=this._s)==null||t.call(this),this._s=(r=this._instance.sessionManager)==null?void 0:r.onSessionId(o)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.Es(e),void this.Cs()):(this.Es(e),void this.startIfEnabledOrStop()):(this.bs===Oi&&(this.bs=xl,qn.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var r;t===void 0&&(t="log"),(r=this.ys)!=null&&r.log?this.ys.log(e,t):qn.warn("log called before recorder was ready")}get ks(){var e,t,r=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(Ui);return(r==null||(t=r.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Ms(){var e,t=this._instance.get_property(Ui);if(!t)return!1;var r=(e=(typeof t=="object"?t:JSON.parse(t)).cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-r}Ss(e){var t,r;if((t=Je.__PosthogExtensions__)==null||!t.initSessionRecording)return qn.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[BI]:!0});if(this.ys||(this.ys=(r=Je.__PosthogExtensions__)==null?void 0:r.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ms())return this.bs===xl||this.bs===Oi?void 0:(this.bs=Oi,qn.info("persisted remote config is stale, requesting fresh config before starting"),void new t$(this._instance).load());this.bs=Uy,this.ys.start(e)}onRRwebEmit(e){var t;(t=this.ys)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||(t=this.ni)==null||t.register({[kI]:!0}),(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||(t=this.ni)==null||t.register({[DI]:!0}),(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var t,r;this.ys||(r=this.ni)==null||r.register({[e==="url"?MI:LI]:!0}),(t=this.ys)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.ys)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var r;return!((r=this.ys)==null||!r.tryAddCustomEvent(e,t))}}},_7={autocapture:class{constructor(e){this.Ps=!1,this.Rs=null,this.Os=!1,this.instance=e,this.rageclicks=new Fy(e.config.rageclick),this.Ls=null}initialize(){this.startIfEnabled()}get qt(){var e,t,r=Dt(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(e=r.url_allowlist)==null?void 0:e.map(n=>new RegExp(n)),r.url_ignorelist=(t=r.url_ignorelist)==null?void 0:t.map(n=>new RegExp(n)),r}Fs(){if(this.isBrowserSupported()){if(oe&&Oe){var e=r=>{r=r||(oe==null?void 0:oe.event);try{this.As(r)}catch(n){xp.error("Failed to capture event",n)}};if(zt(Oe,"submit",e,{capture:!0}),zt(Oe,"change",e,{capture:!0}),zt(Oe,"click",e,{capture:!0}),this.qt.capture_copied_text){var t=r=>{r=r||(oe==null?void 0:oe.event);try{this.As(r,yp)}catch(n){xp.error("Failed to capture copy/cut event",n)}};zt(Oe,"copy",t,{capture:!0}),zt(Oe,"cut",t,{capture:!0})}}}else xp.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Ps&&(this.Fs(),this.Ps=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Os=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[pm]:!!e.autocapture_opt_out}),this.Rs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Ls=e}getElementSelectors(e){var t,r=[];return(t=this.Ls)==null||t.forEach(n=>{var o=Oe==null?void 0:Oe.querySelectorAll(n);o==null||o.forEach(s=>{e===s&&r.push(n)})}),r}get isEnabled(){var e,t,r=(e=this.instance.persistence)==null?void 0:e.props[pm];if(Vn(this.Rs)&&!yn(r)&&!this.instance.Lr())return!1;var n=(t=this.Rs)!==null&&t!==void 0?t:!!r;return!!this.instance.config.autocapture&&!n}As(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var r,n=Ny(e);f$(n)&&(n=n.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&function(f,m){if(!oe||Fm(f))return!1;var h,v,g;if(yn(m)?(h=!!m&&ky,v=void 0):(h=(g=m==null?void 0:m.css_selector_ignorelist)!==null&&g!==void 0?g:ky,v=m==null?void 0:m.content_ignorelist),h===!1)return!1;var{targetElementList:b}=My(f,!1);return!function(_,y){if(_===!1||Le(_))return!1;var x;if(_===!0)x=r7;else{if(!pt(_))return!1;if(_.length>10)return De.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;x=_.map(S=>S.toLowerCase())}return y.some(S=>{var{safeText:w,ariaLabel:I}=S;return x.some(T=>w.includes(T)||I.includes(T))})}(v,b.map(_=>{var y;return{safeText:ba(_).toLowerCase(),ariaLabel:((y=_.getAttribute("aria-label"))==null?void 0:y.toLowerCase().trim())||""}}))&&!Dy(b,h)}(n,this.instance.config.rageclick)&&this.As(e,"$rageclick");var o=t===yp;if(n&&function(f,m,h,v,g){var b,_,y,x;if(h===void 0&&(h=void 0),!oe||Fm(f)||(b=h)!=null&&b.url_allowlist&&!Oy(h.url_allowlist)||(_=h)!=null&&_.url_ignorelist&&Oy(h.url_ignorelist))return!1;if((y=h)!=null&&y.dom_event_allowlist){var S=h.dom_event_allowlist;if(S&&!S.some(P=>m.type===P))return!1}var{parentIsUsefulElement:w,targetElementList:I}=My(f,v);if(!function(P,$){var A=$==null?void 0:$.element_allowlist;if(Le(A))return!0;var k,D=function(X){if(A.some(V=>X.tagName.toLowerCase()===V))return{v:!0}};for(var z of P)if(k=D(z))return k.v;return!1}(I,h)||!Dy(I,(x=h)==null?void 0:x.css_selector_allowlist))return!1;var T=oe.getComputedStyle(f);if(T&&T.getPropertyValue("cursor")==="pointer"&&m.type==="click")return!0;var R=f.tagName.toLowerCase();switch(R){case"html":return!1;case"form":return(g||["submit"]).indexOf(m.type)>=0;case"input":case"select":case"textarea":return(g||["change","click"]).indexOf(m.type)>=0;default:return w?(g||["click"]).indexOf(m.type)>=0:(g||["click"]).indexOf(m.type)>=0&&(tv.indexOf(R)>-1||f.getAttribute("contenteditable")==="true")}}(n,e,this.qt,o,o?["copy","cut"]:void 0)){var{props:s,explicitNoCapture:i}=c7(n,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsChainAsString:this.Os});if(i)return!1;var l=this.getElementSelectors(n);if(l&&l.length>0&&(s.$element_selectors=l),t===yp){var u,d=h$(oe==null||(u=oe.getSelection())==null?void 0:u.toString()),p=e.type||"clipboard";if(!d)return!1;s.$selected_content=d,s.$copy_type=p}return this.instance.capture(t,s),!0}}}isBrowserSupported(){return On(Oe==null?void 0:Oe.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ns=(oe==null||(t=oe.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(De.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.$s&&this.$s(),this.$s=void 0,De.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(oe&&oe.history){var r=this;(e=oe.history.pushState)!=null&&e.__posthog_wrapped__||Vy(oe.history,"pushState",n=>function(o,s,i){n.call(this,o,s,i),r.Ds("pushState")}),(t=oe.history.replaceState)!=null&&t.__posthog_wrapped__||Vy(oe.history,"replaceState",n=>function(o,s,i){n.call(this,o,s,i),r.Ds("replaceState")}),this.qs()}}Ds(e){try{var t,r=oe==null||(t=oe.location)==null?void 0:t.pathname;if(!r)return;r!==this.Ns&&this.isEnabled&&this._instance.capture(Es,{navigation_type:e}),this.Ns=r}catch(n){De.error("Error capturing "+e+" pageview",n)}}qs(){if(!this.$s){var e=()=>{this.Ds("popstate")};zt(oe,"popstate",e),this.$s=()=>{oe&&oe.removeEventListener("popstate",e)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(e){var t;this.js=!1,this.Ps=!1,this.Hs=null,this.instance=e,this.js=!((t=this.instance.persistence)==null||!t.props[fm]),this.rageclicks=new Fy(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return Dt(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(e=this.qt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return at(this.qt.capture_heatmaps)?at(this.qt.enable_heatmaps)?this.js:this.qt.enable_heatmaps:this.qt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Ps)return;d7.info("starting..."),this.Us(),this.At()}else{var e;clearInterval((e=this.Hs)!==null&&e!==void 0?e:void 0),this.Bs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[fm]:t}),this.js=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.M;return this.M=void 0,e}zs(e){this.Mt(e.originalEvent,"deadclick")}At(){this.Hs&&clearInterval(this.Hs),this.Hs=(Oe==null?void 0:Oe.visibilityState)==="visible"?setInterval(this.Zr.bind(this),this.flushIntervalMilliseconds):null}Us(){oe&&Oe&&(this.Vs=this.Zr.bind(this),zt(oe,Ac,this.Vs),this.Ws=e=>this.Mt(e||(oe==null?void 0:oe.event)),zt(Oe,"click",this.Ws,{capture:!0}),this.Zs=e=>this.Gs(e||(oe==null?void 0:oe.event)),zt(Oe,"mousemove",this.Zs,{capture:!0}),this.Qs=new my(this.instance,w9,this.zs.bind(this)),this.Qs.startIfEnabledOrStop(),this.Js=this.At.bind(this),zt(Oe,$c,this.Js),this.Ps=!0)}Bs(){var e;oe&&Oe&&(this.Vs&&oe.removeEventListener(Ac,this.Vs),this.Ws&&Oe.removeEventListener("click",this.Ws,{capture:!0}),this.Zs&&Oe.removeEventListener("mousemove",this.Zs,{capture:!0}),this.Js&&Oe.removeEventListener($c,this.Js),clearTimeout(this.Ks),(e=this.Qs)==null||e.stop(),this.Ps=!1)}Ys(e,t){var r=this.instance.scrollManager.scrollY(),n=this.instance.scrollManager.scrollX(),o=this.instance.scrollManager.scrollElement(),s=function(i,l,u){for(var d=i;d&&Bo(d)&&!an(d,"body");){if(d===u)return!1;if(it(l,oe==null?void 0:oe.getComputedStyle(d).position))return!0;d=g$(d)}return!1}(Ny(e),["fixed","sticky"],o);return{x:e.clientX+(s?0:n),y:e.clientY+(s?0:r),target_fixed:s,type:t}}Mt(e,t){var r;if(t===void 0&&(t="click"),!jy(e.target)&&Wy(e)){var n=this.Ys(e,t);(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.Xs(Re({},n,{type:"rageclick"})),this.Xs(n)}}Gs(e){!jy(e.target)&&Wy(e)&&(clearTimeout(this.Ks),this.Ks=setTimeout(()=>{this.Xs(this.Ys(e,"mousemove"))},500))}Xs(e){if(oe){var t=oe.location.href,r=this.qt.custom_personal_data_properties,n=this.qt.mask_personal_data_properties?[...ri,...r||[]]:[],o=ga(t,n,va);this.M=this.M||{},this.M[o]||(this.M[o]=[]),this.M[o].push(e)}}Zr(){this.M&&!Is(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:my,webVitalsAutocapture:class{constructor(e){var t;this.js=!1,this.Ps=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.eo=()=>{clearTimeout(this.ro),this.M.metrics.length!==0&&(this._instance.capture("$web_vitals",this.M.metrics.reduce((r,n)=>Re({},r,{["$web_vitals_"+n.name+"_event"]:Re({},n),["$web_vitals_"+n.name+"_value"]:n.value}),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=r=>{var n,o=(n=this._instance.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0);if(Le(o))Wn.error("Could not read session ID. Dropping metrics!");else{this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.io();Le(s)||(at(r==null?void 0:r.name)||at(r==null?void 0:r.value)?Wn.error("Invalid metric received",r):!this.no||this.no>r.value?(this.M.url!==s&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),Le(this.M.url)&&(this.M.url=s),this.M.firstMetricTimestamp=Le(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.M.metrics.push(Re({},r,{$current_url:s,$session_id:o.sessionId,$window_id:o.windowId,timestamp:Date.now()})),this.M.metrics.length===this.allowedMetrics.length&&this.eo()):Wn.error("Ignoring metric with value >= "+this.no,r))}},this.so=()=>{if(!this.Ps){var r,n,o,s,i=Je.__PosthogExtensions__;Le(i)||Le(i.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:n,onFCP:o,onINP:s}=i.postHogWebVitalsCallbacks),r&&n&&o&&s?(this.allowedMetrics.indexOf("LCP")>-1&&r(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&o(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.ht.bind(this)),this.Ps=!0):Wn.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.js=!((t=this._instance.persistence)==null||!t.props[vm]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,r=Dt(this.oo)?(e=this.oo)==null?void 0:e.web_vitals_allowed_metrics:void 0;return at(r)?((t=this._instance.persistence)==null?void 0:t.props[_m])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(Dt(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=Dt(this.oo)?this.oo.web_vitals_attribution:void 0;return e!=null&&e}get no(){var e=Dt(this.oo)&&Yr(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:By;return e>0&&6e4>=e?By:e}get isEnabled(){var e=Zt==null?void 0:Zt.protocol;if(e!=="http:"&&e!=="https:")return Wn.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Dt(this.oo)?this.oo.web_vitals:yn(this.oo)?this.oo:void 0;return yn(t)?t:this.js}startIfEnabled(){this.isEnabled&&!this.Ps&&(Wn.info("enabled, starting..."),this.lr(this.so))}onRemoteConfig(e){if("capturePerformance"in e){var t=Dt(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=Dt(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[vm]:t}),this._instance.persistence.register({[_m]:r})),this.js=t,this.startIfEnabled()}}lr(e){var t,r;(t=Je.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(r=Je.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",n=>{n?Wn.error("failed to load script",n):e()})}io(){var e=oe?oe.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,r=this._instance.config.mask_personal_data_properties?[...ri,...t||[]]:[];return ga(e,r,va)}Wn.error("Could not determine current URL")}}},y7={exceptionObserver:class{constructor(e){var t,r,n;this.so=()=>{var o;if(oe&&this.isEnabled&&(o=Je.__PosthogExtensions__)!=null&&o.errorWrappingFunctions){var s=Je.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=Je.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=Je.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.qt.capture_unhandled_errors&&(this.ao=s(this.captureException.bind(this))),!this.uo&&this.qt.capture_unhandled_rejections&&(this.uo=i(this.captureException.bind(this))),!this.lo&&this.qt.capture_console_errors&&(this.lo=l(this.captureException.bind(this)))}catch(u){ji.error("failed to start",u),this.ho()}}},this._instance=e,this.co=!((t=this._instance.persistence)==null||!t.props[mm]),this.do=new AG({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(n=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&n!==void 0?n:10,refillInterval:1e4,Gt:ji}),this.qt=this.vo(),this.startIfEnabledOrStop()}vo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Dt(e)?t=Re({},t,e):(Le(e)?this.co:e)&&(t=Re({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(ji.info("enabled"),this.ho(),this.lr(this.so)):this.ho()}lr(e){var t,r;(t=Je.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(r=Je.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",n=>{if(n)return ji.error("failed to load script",n);e()})}ho(){var e,t,r;(e=this.ao)==null||e.call(this),this.ao=void 0,(t=this.uo)==null||t.call(this),this.uo=void 0,(r=this.lo)==null||r.call(this),this.lo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.co=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[mm]:this.co}),this.qt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.vo()}captureException(e){var t,r,n,o=(t=e==null||(r=e.$exception_list)==null||(r=r[0])==null?void 0:r.type)!==null&&t!==void 0?t:"Exception";this.do.consumeRateLimit(o)?ji.info("Skipping exception capture because of client rate limiting.",{exception:o}):(n=this._instance.exceptions)==null||n.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,r;this.fo=[],this.po=new UG([new ZG,new a9,new e9,new QG,new s9,new o9,new r9,new i9],function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;o>i;i++)s[i-1]=arguments[i];return function(l,u){u===void 0&&(u=0);for(var d=[],p=l.split(`
`),f=u;p.length>f;f++){var m=p[f];if(1024>=m.length){var h=uy.test(m)?m.replace(uy,"$1"):m;if(!h.match(/\S*Error: /)){for(var v of s){var g=v(h,n);if(g){d.push(g);break}}if(d.length>=50)break}}}return function(b){if(!b.length)return[];var _=Array.from(b);return _.reverse(),_.slice(0,50).map(y=>{return Re({},y,{filename:y.filename||(x=_,x[x.length-1]||{}).filename,function:y.function||ti});var x})}(d)}}("web:javascript",KG,JG)),this._instance=e,this.fo=(t=(r=this._instance.persistence)==null?void 0:r.get_property(hm))!==null&&t!==void 0?t:[],this.mo=Sc(this.yo()),this.bo=new c9(this.mo)}onConfigChange(){this.mo=Sc(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,r,n;if("errorTracking"in e){var o=(t=(r=e.errorTracking)==null?void 0:r.suppressionRules)!==null&&t!==void 0?t:[],s=(n=e.errorTracking)==null?void 0:n.captureExtensionExceptions;this.fo=o,this._instance.persistence&&this._instance.persistence.register({[hm]:this.fo,[gm]:s})}}get _o(){var e,t=!!this._instance.get_property(gm),r=this._instance.config.error_tracking.captureExtensionExceptions;return(e=r??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.po.buildFromUnknown(e,{syntheticException:t==null?void 0:t.syntheticException,mechanism:{handled:t==null?void 0:t.handled}})}addExceptionStep(e,t){if(this.mo.enabled)try{if(!It(e)||e.trim().length===0)return void An.warn("Ignoring exception step because message must be a non-empty string");var r=this.wo(t),{sanitizedProperties:n,droppedKeys:o}=function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var i=[];return{sanitizedProperties:Object.keys(s).reduce((l,u)=>l9.has(u)?(i.push(u),l):(l[u]=s[u],l),{}),droppedKeys:i}}(r);o.length>0&&An.warn("Ignoring reserved exception step fields",{droppedKeys:o}),this.bo.add(Re({[wc]:e,[Ec]:new Date().toISOString()},n))}catch(s){An.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.xo(t)){if(this.So(t))return this.ko("Exception dropped: matched a suppression rule"),void An.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.Co(t))return this.ko("Exception dropped: thrown by a browser extension"),void An.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Io(t))return this.ko("Exception dropped: thrown by the PostHog SDK"),void An.info("Skipping exception capture because it was thrown by the PostHog SDK")}var r=this.mo.enabled&&at(e.$exception_steps)?this.To(e):e;try{var n=this._instance.capture("$exception",r,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return n&&this.bo.clear(),n}catch(o){return An.error("Failed to capture exception event. Dropping this exception.",o),void this.bo.clear()}}catch(o){return void An.error("Failed to process exception event. Ignoring this exception.",o)}}To(e){try{var t=this.bo.getAttachable();return t.length===0?e:Re({},e,{$exception_steps:t})}catch(r){return An.error("Failed to read buffered exception steps. Capturing exception without steps.",r),e}}ko(e){this.mo.enabled&&this.bo.add({[wc]:e,[Ec]:new Date().toISOString()})}wo(e){return Dt(e)?Re({},e):{}}yo(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}So(e){if(e.length===0)return!1;var t=e.reduce((r,n)=>{var{type:o,value:s}=n;return It(o)&&o.length>0&&r.$exception_types.push(o),It(s)&&s.length>0&&r.$exception_values.push(s),r},{$exception_types:[],$exception_values:[]});return this.fo.some(r=>{var n=r.values.map(o=>{var s,i=c$[o.operator],l=pt(o.value)?o.value:[o.value],u=(s=t[o.key])!==null&&s!==void 0?s:[];return l.length>0&&i(l,u)});return r.type==="OR"?n.some(Boolean):n.every(Boolean)})}Co(e){return e.flatMap(t=>{var r,n;return(r=(n=t.stacktrace)==null?void 0:n.frames)!==null&&r!==void 0?r:[]}).some(t=>t.filename&&t.filename.startsWith("chrome-extension://"))}Io(e){if(e.length>0){var t,r,n,o,s=(t=(r=e[0].stacktrace)==null?void 0:r.frames)!==null&&t!==void 0?t:[],i=s[s.length-1];return(n=i==null||(o=i.filename)==null?void 0:o.includes("posthog.com/static"))!==null&&n!==void 0&&n}return!1}xo(e){return!at(e)&&pt(e)}}},x7=Re({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Eo=null,this.Mo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[bm]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Eo||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(bm)||this.lr(()=>this.Po())}lr(e){var t,r;(t=Je.__PosthogExtensions__)!=null&&t.generateProductTours?e():(r=Je.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"product-tours",n=>{n?qy.error("Could not load product tours script",n):e()})}Po(){var e;!this.Eo&&(e=Je.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Eo=Je.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!pt(this.Mo)||t){var r=this.ni;if(r){var n=r.props[Ll];if(pt(n)&&!t)return this.Mo=n,void e(n,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:o=>{var s=o.statusCode;if(s!==200||!o.json){var i="Product Tours API could not be loaded, status: "+s;return qy.error(i),void e([],{isLoaded:!1,error:i})}var l=pt(o.json.product_tours)?o.json.product_tours:[];this.Mo=l,r&&r.register({[Ll]:l}),e(l,{isLoaded:!0})}})}else e(this.Mo,{isLoaded:!0})}getActiveProductTours(e){at(this.Eo)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Eo.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Eo)==null||t.showTourById(e)}previewTour(e){this.Eo?this.Eo.previewTour(e):this.lr(()=>{var t;this.Po(),(t=this.Eo)==null||t.previewTour(e)})}dismissProductTour(){var e;(e=this.Eo)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Eo)==null||e.nextStep()}previousStep(){var e;(e=this.Eo)==null||e.previousStep()}clearCache(){var e;this.Mo=null,(e=this.ni)==null||e.unregister(Ll)}resetTour(e){var t;(t=this.Eo)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Eo)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Eo)==null||t.cancelPendingTour(e)}}},rd),w7={siteApps:class{constructor(e){this._instance=e,this.Ro=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Oo(e,t){if(t){var r=this.globalsForEvent(t);this.Ro.push(r),this.Ro.length>1e3&&(this.Ro=this.Ro.slice(10))}}get siteAppLoaders(){var e;return(e=Je._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Oo.bind(this));this.Lo=()=>{e(),this.Ro=[],this.Lo=void 0}}}globalsForEvent(e){var t,r,n,o,s,i,l;if(!e)throw new Error("Event payload is required");var u={},d=this._instance.get_property("$groups")||[],p=this._instance.get_property("$stored_group_properties")||{};for(var[f,m]of Object.entries(p))u[f]={id:d[f],type:f,properties:m};var{$set_once:h,$set:v}=e;return{event:Re({},cI(e,p7),{properties:Re({},e.properties,v?{$set:Re({},(t=(r=e.properties)==null?void 0:r.$set)!==null&&t!==void 0?t:{},v)}:{},h?{$set_once:Re({},(n=(o=e.properties)==null?void 0:o.$set_once)!==null&&n!==void 0?n:{},h)}:{}),elements_chain:(s=(i=e.properties)==null?void 0:i.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(l=e.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var t=this.apps[e.id],r=()=>{var i;!t.errored&&this.Ro.length&&(Gn.info("Processing "+this.Ro.length+" events for site app with id "+e.id),this.Ro.forEach(l=>t.processEvent==null?void 0:t.processEvent(l)),t.processedBuffer=!0),Object.values(this.apps).every(l=>l.processedBuffer||l.errored)&&((i=this.Lo)==null||i.call(this))},n=!1,o=i=>{t.errored=!i,t.loaded=!0,Gn.info("Site app with id "+e.id+" "+(i?"loaded":"errored")),n&&r()};try{var{processEvent:s}=e.init({posthog:this._instance,callback(i){o(i)}});s&&(t.processEvent=s),n=!0}catch(i){Gn.error(Gy+e.id,i),o(!1)}if(n&&t.loaded)try{r()}catch(i){Gn.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}Fo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of e)this.setupSiteApp(r)}Ao(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(t)}catch(n){Gn.error("Error while processing event "+e.event+" for site app "+r.id,n)}}}onRemoteConfig(e){var t,r,n,o=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Fo(),void this._instance.on("eventCaptured",u=>this.Ao(u))):void Gn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.Lo)==null||r.call(this),(n=e.siteApps)!=null&&n.length)if(this.isEnabled){var s=function(u){var d;Je["__$$ph_site_app_"+u]=o._instance,(d=Je.__PosthogExtensions__)==null||d.loadSiteApp==null||d.loadSiteApp(o._instance,l,p=>{if(p)return Gn.error(Gy+u,p)})};for(var{id:i,url:l}of e.siteApps)s(i)}else Gn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},E7={tracingHeaders:class{constructor(e){this.No=void 0,this.$o=void 0,this.so=()=>{var t,r,n=this.Do()||[];Le(this.No)&&((t=Je.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(n,this._instance.get_distinct_id(),this._instance.sessionManager)),Le(this.$o)&&((r=Je.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchFetch(n,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}lr(e){var t,r;(t=Je.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(r=Je.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"tracing-headers",n=>{if(n)return u7.error("failed to load script",n);e()})}Do(){var e;return(e=this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.Do()?this.lr(this.so):((e=this.No)==null||e.call(this),(t=this.$o)==null||t.call(this),this.No=void 0,this.$o=void 0)}}},S7=Re({surveys:class{get qt(){return this._instance.config}constructor(e){this.qo=void 0,this._surveyManager=null,this.jo=!1,this.Ho=[],this.Uo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.qt.disable_surveys){var t=e.surveys;if(at(t))return gt.warn("Flags not loaded yet. Not loading surveys.");var r=pt(t);this.qo=r?t.length>0:t,gt.info("flags response received, isSurveysEnabled: "+this.qo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var r=localStorage.key(t);(r!=null&&r.startsWith(Lm)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach(n=>localStorage.removeItem(n))}loadIfEnabled(){if(!this._surveyManager)if(this.jo)gt.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)gt.info(Ky);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())gt.info("Not loading surveys in cookieless mode without consent.");else{var e=Je==null?void 0:Je.__PosthogExtensions__;if(e){if(!Le(this.qo)||this.qt.advanced_enable_surveys){var t=this.qo||this.qt.advanced_enable_surveys;this.jo=!0;try{var r=e.generateSurveys;if(r)return void this.Bo(r,t);var n=e.loadExternalDependency;if(!n)return void this.zo(Xg);n(this._instance,"surveys",o=>{o||!e.generateSurveys?this.zo("Could not load surveys script",o):this.Bo(e.generateSurveys,t)})}catch(o){throw this.zo("Error initializing surveys",o),o}finally{this.jo=!1}}}else gt.error("PostHog Extensions not found.")}}Bo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new h7(this._instance),gt.info("Surveys loaded successfully"),this.Vo({isLoaded:!0})}zo(e,t){gt.error(e,t),this.Vo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Ho.push(e),this._surveyManager&&this.Vo({isLoaded:!0}),()=>{this.Ho=this.Ho.filter(t=>t!==e)}}getSurveys(e,t){if(t===void 0&&(t=!1),this.qt.disable_surveys)return gt.info(Ky),e([]);var r,n=this._instance.get_property(Em);if(n&&!t)return e(n,{isLoaded:!0});typeof Promise<"u"&&this.Uo?this.Uo.then(o=>{var{surveys:s,context:i}=o;return e(s,i)}):(typeof Promise<"u"&&(this.Uo=new Promise(o=>{r=o})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:o=>{var s;this.Uo=null;var i=o.statusCode;if(i!==200||!o.json){var l="Surveys API could not be loaded, status: "+i;gt.error(l);var u={isLoaded:!1,error:l};return e([],u),void(r==null||r({surveys:[],context:u}))}var d,p=o.json.surveys||[],f=p.filter(h=>function(v){return!(!v.start_date||v.end_date)}(h)&&(function(v){var g;return!((g=v.conditions)==null||(g=g.events)==null||(g=g.values)==null||!g.length)}(h)||function(v){var g;return!((g=v.conditions)==null||(g=g.actions)==null||(g=g.values)==null||!g.length)}(h)));f.length>0&&((d=this._surveyEventReceiver)==null||d.register(f)),(s=this._instance.persistence)==null||s.register({[Em]:p});var m={isLoaded:!0};e(p,m),r==null||r({surveys:p,context:m})}}))}Vo(e){for(var t of this.Ho)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(r){gt.error("Error in survey callback",r)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!at(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);gt.warn("init was not called")}Wo(e){var t=null;return this.getSurveys(r=>{var n;t=(n=r.find(o=>o.id===e))!==null&&n!==void 0?n:null}),t}Zo(e){if(at(this._surveyManager))return{eligible:!1,reason:Ep};var t=typeof e=="string"?this.Wo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(at(this._surveyManager))return gt.warn("init was not called"),{visible:!1,disabledReason:Ep};var t=this.Zo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return at(this._surveyManager)?(gt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:Ep})):new Promise(r=>{this.getSurveys(n=>{var o,s=(o=n.find(l=>l.id===e))!==null&&o!==void 0?o:null;if(s){var i=this.Zo(s);r({visible:i.eligible,disabledReason:i.reason})}else r({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,r){var n;if(at(this._surveyManager))gt.warn("init was not called");else{var o=typeof e=="string"?this.Wo(e):e;if(o!=null&&o.id)if(q9.includes(o.type)){var s=Oe==null?void 0:Oe.querySelector(t);if(s)return(n=o.appearance)!=null&&n.surveyPopupDelaySeconds?(gt.info("Rendering survey "+o.id+" with delay of "+o.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var i,l;gt.info("Rendering survey "+o.id+" with delay of "+((i=o.appearance)==null?void 0:i.surveyPopupDelaySeconds)+" seconds"),(l=this._surveyManager)==null||l.renderSurvey(o,s,r),gt.info("Survey "+o.id+" rendered")},1e3*o.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(o,s,r);gt.warn("Survey element not found")}else gt.warn("Surveys of type "+o.type+" cannot be rendered in the app");else gt.warn("Survey not found")}}displaySurvey(e,t){var r;if(at(this._surveyManager))gt.warn("init was not called");else{var n=this.Wo(e);if(n){var o=n;if((r=n.appearance)!=null&&r.surveyPopupDelaySeconds&&t.ignoreDelay&&(o=Re({},n,{appearance:Re({},n.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Mc.Popover&&t.initialResponses&&gt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var s=this.canRenderSurvey(n);if(!s.visible)return void gt.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==Mc.Inline?this._surveyManager.handlePopoverSurvey(o,t):this.renderSurvey(o,t.selector,t.properties)}else gt.warn("Survey not found")}}cancelPendingSurvey(e){at(this._surveyManager)?gt.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},rd),C7={toolbar:class{constructor(e){this.instance=e}Go(e){Je.ph_toolbar_state=e}Qo(){var e;return(e=Je.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,r){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),r===void 0&&(r=void 0),HI(this.instance.config)||!oe||!Oe)return!1;e=e??oe.location,r=r??oe.history;try{if(!t){try{oe.localStorage.setItem("test","test"),oe.localStorage.removeItem("test")}catch{return!1}t=oe==null?void 0:oe.localStorage}var n,o=g7||Dc(e.hash,"__posthog")||Dc(e.hash,"state"),s=o?py(()=>JSON.parse(atob(decodeURIComponent(o))))||py(()=>JSON.parse(decodeURIComponent(o))):null;return s&&s.action==="ph_authorize"?((n=s).source="url",n&&Object.keys(n).length>0&&(s.desiredHash?e.hash=s.desiredHash:r?r.replaceState(r.state,"",e.pathname+e.search):e.hash="")):((n=JSON.parse(t.getItem(Xy)||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token||(this.loadToolbar(n),0))}catch{return!1}}Jo(e){var t=Je.ph_load_toolbar||Je.ph_load_editor;!at(t)&&On(t)?t(e,this.instance):Yy.warn("No toolbar load function found")}loadToolbar(e){var t=!(Oe==null||!Oe.getElementById(zI));if(!oe||t)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,n=Re({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(oe.localStorage.setItem(Xy,JSON.stringify(Re({},n,{source:void 0}))),this.Qo()===2)this.Jo(n);else if(this.Qo()===0){var o;this.Go(1),(o=Je.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this.instance,"toolbar",s=>{if(s)return Yy.error("[Toolbar] Failed to load",s),void this.Go(0);this.Go(2),this.Jo(n)}),zt(oe,"turbolinks:load",()=>{this.Go(0),this.loadToolbar(n)})}return!0}Ko(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,r){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(e,t,r)}}},P7=Re({experiments:or},rd),R7={conversations:class{constructor(e){this.Yo=void 0,this._conversationsManager=null,this.Xo=!1,this.ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;at(t)||(yn(t)?this.Yo=t:(this.Yo=t.enabled,this.ea=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Yo=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Xo||this._instance.config.disable_conversations||HI(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=Je==null?void 0:Je.__PosthogExtensions__;if(e&&!Le(this.Yo)&&this.Yo)if(this.ea&&this.ea.token){this.Xo=!0;try{var t=e.initConversations;if(t)return this.ta(t),void(this.Xo=!1);var r=e.loadExternalDependency;if(!r)return void this.ra(Xg);r(this._instance,"conversations",n=>{n||!e.initConversations?this.ra("Could not load conversations script",n):this.ta(e.initConversations),this.Xo=!1})}catch(n){this.ra("Error initializing conversations",n),this.Xo=!1}}else Wr.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),Wr.info("Conversations loaded successfully")}catch(t){this.ra("Error completing conversations initialization",t)}else Wr.error("Cannot complete initialization: remote config is null")}ra(e,t){Wr.error(e,t),this._conversationsManager=null,this.Xo=!1}show(){this._conversationsManager?this._conversationsManager.show():Wr.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Yo===!0&&!Vn(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,r){var n=this;return Gr(function*(){return n._conversationsManager?n._conversationsManager.sendMessage(e,t,r):(Wr.warn(Eo),null)})()}getMessages(e,t){var r=this;return Gr(function*(){return r._conversationsManager?r._conversationsManager.getMessages(e,t):(Wr.warn(Eo),null)})()}markAsRead(e){var t=this;return Gr(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Wr.warn(Eo),null)})()}getTickets(e){var t=this;return Gr(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Wr.warn(Eo),null)})()}requestRestoreLink(e){var t=this;return Gr(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Wr.warn(Eo),null)})()}restoreFromToken(e){var t=this;return Gr(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Wr.warn(Eo),null)})()}restoreFromUrlToken(){var e=this;return Gr(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Wr.warn(Eo),null)})()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}ln(){var e;(e=this._conversationsManager)==null||e.setIdentity()}hn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},T7={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=St("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.ua=!1,this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,r=(t=e.logs)==null?void 0:t.captureConsoleLogs;!at(r)&&r&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.oa=0,this.aa=0,this.ua=!1}loadIfEnabled(){if(this.ia&&!this.na){var e=Je==null?void 0:Je.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",r=>{var n;r||(n=e.logs)==null||!n.initializeLogs?this.Gt.error("Could not load logs script",r):(e.logs.initializeLogs(this._instance),this.na=!0)}):this.Gt.error(Xg)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,r,n,o,s,i;if(this._instance.is_capturing())if(e&&e.body){var l=(t=(r=this._instance.config.logs)==null?void 0:r.flushIntervalMs)!==null&&t!==void 0?t:3e3,u=(n=(o=this._instance.config.logs)==null?void 0:o.maxLogsPerInterval)!==null&&n!==void 0?n:1e3,d=Date.now();if(l>d-this.aa||(this.aa=d,this.oa=0,this.ua=!1),u>this.oa){this.oa++;var p=function(f,m){var h=f.level||"info",{text:v,number:g}=II[h]||BG,b=String(Date.now())+"000000",_={};m.distinctId&&(_.posthogDistinctId=m.distinctId),m.sessionId&&(_.sessionId=m.sessionId),m.currentUrl&&(_["url.full"]=m.currentUrl),m.screenName&&(_["screen.name"]=m.screenName),m.appState&&(_["app.state"]=m.appState),m.activeFeatureFlags&&m.activeFeatureFlags.length>0&&(_.feature_flags=m.activeFeatureFlags);var y=Re({},_,f.attributes||{}),x={timeUnixNano:b,observedTimeUnixNano:b,severityNumber:g,severityText:v,body:{stringValue:f.body},attributes:cy(y)};return f.trace_id&&(x.traceId=f.trace_id),f.span_id&&(x.spanId=f.span_id),Le(f.trace_flags)||(x.flags=f.trace_flags),x}(e,this.la());this.sa.push({record:p}),((s=(i=this._instance.config.logs)==null?void 0:i.maxBufferSize)!==null&&s!==void 0?s:100)>this.sa.length?this.ha():this.flushLogs()}else this.ua||(this.Gt.warn("captureLog dropping logs: exceeded "+u+" logs per "+l+"ms"),this.ua=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.ca}flushLogs(e){if(this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.sa.length!==0){var t=this.sa;this.sa=[];var r=this._instance.config.logs,n=Re({"service.name":(r==null?void 0:r.serviceName)||"unknown_service"},(r==null?void 0:r.environment)&&{"deployment.environment":r.environment},(r==null?void 0:r.serviceVersion)&&{"service.version":r.serviceVersion},r==null?void 0:r.resourceAttributes),o=function(i,l,u,d){return{resourceLogs:[{resource:{attributes:cy(l)},scopeLogs:[{scope:{name:u,version:d},logRecords:i}]}]}}(t.map(i=>i.record),n,hr.LIB_NAME,hr.LIB_VERSION),s=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Bi({method:"POST",url:s,data:o,compression:"best-available",batchKey:"logs",transport:e})}}ha(){var e,t;this.qr||(this.qr=setTimeout(()=>{this.qr=void 0,this.flushLogs()},(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3))}la(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:r}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=r}if(Je!=null&&(e=Je.location)!=null&&e.href&&(t.currentUrl=Je.location.href),this._instance.featureFlags){var n=this._instance.featureFlags.getFlags();n&&n.length>0&&(t.activeFeatureFlags=n)}return t}}},I7=Re({},rd,b7,_7,y7,x7,w7,S7,E7,C7,P7,R7,T7);kr.__defaultExtensionClasses=Re({},I7);var ex,Vc=(ex=ra[Cs]=new kr,function(){function e(){e.done||(e.done=!0,p$=!1,wt(ra,function(t){t._dom_loaded()}))}Oe!=null&&Oe.addEventListener?Oe.readyState==="complete"?e():zt(Oe,"DOMContentLoaded",e,{capture:!1}):oe&&De.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),ex);const $7=Object.freeze(Object.defineProperty({__proto__:null,Compression:nn,DisplaySurveyType:Mc,PostHog:kr,ProductTourEventName:e$,ProductTourEventProperties:jm,SurveyEventName:As,SurveyEventProperties:Vl,SurveyEventType:Ss,SurveyType:Fl,default:Vc,posthog:Vc},Symbol.toStringTag,{value:"Module"})),A7=["/m/","/faq","/glossary","/blog","/compare","/vs/","/help"];function j7(e){return A7.some(t=>e.startsWith(t))}function O7(){const{pathname:e}=Fr();return a.useEffect(()=>{Rw()&&(j7(e)?Vc.startSessionRecording():Vc.stopSessionRecording())},[e]),null}const N7=()=>{if(typeof window>"u")return null;const e=window.location.hostname;return e==="test.avalog.ru"||e.startsWith("staging.")?c.jsxs("div",{className:"staging-badge",role:"status","aria-label":"staging environment",children:[c.jsx("span",{className:"staging-badge__dot","aria-hidden":"true",children:"●"}),"STAGING"]}):null};function _t({to:e}){const{search:t,hash:r}=Fr();return c.jsx(Ut,{to:`${e}${t}${r}`,replace:!0})}function D7(){const{id:e}=Km(),{search:t,hash:r}=Fr();return c.jsx(Ut,{to:`/order/${e??""}${t}${r}`,replace:!0})}function bs({from:e,to:t}){const{pathname:r,search:n,hash:o}=Fr(),s=r.startsWith(e)?r.slice(e.length):"";return c.jsx(Ut,{to:`${t}${s}${n}${o}`,replace:!0})}const k7=a.lazy(()=>C(()=>import("./MarketingCalculatorPage-SVzzoR2X.js"),__vite__mapDeps([26,1,27,28,8,29,30,5,31,32,33,4,34,7,35,36,37,3,6,38,39,40,41,42,43,44,45,46,9,10]))),M7=a.lazy(()=>C(()=>import("./MarketingCustomsCalculatorPage-CqGfEfs8.js"),__vite__mapDeps([47,1,4,33,8,5,34,7,35,36,37,3,6,38,48,49,50,51,52,53,32,54,55,44,56,9,10]))),L7=a.lazy(()=>C(()=>import("./MarketingSearchResultsPage-Nqml8cnR.js"),__vite__mapDeps([57,1,8,4,42,41,29,28,30,5,33,34,7,35,36,37,3,6,38,58,59,60,61,40,62,63,64,65,66,67,68,69,53,70,56,44,71,72,49,45,73,51,74,17,39,75,76,77,9,10]))),z7=a.lazy(()=>C(()=>import("./MarketingOrderDetailsPage-BII0l80H.js"),__vite__mapDeps([78,1,4,42,29,33,8,5,34,7,35,36,37,3,6,38,79,80,60,81,58,40,82,83,84,85,75,43,86,67,87,88,66,89,44,53,90,91,56,70,77,92,93,76,94,95,65,96,9,10]))),tx=a.lazy(()=>C(()=>import("./MarketingSnapshotViewPage-DwPt4zpu.js"),__vite__mapDeps([97,1,4,42,33,8,5,34,7,35,36,37,3,6,38,80,98,58,60,81,40,92,77,70,9,10]))),F7=a.lazy(()=>C(()=>import("./MarketingMailingViewPage-onRef2VL.js"),__vite__mapDeps([99,1,4,42,33,8,5,34,7,35,36,37,3,6,38,63,64,58,60,40,65,66,67,68,69,53,70,56,44,71,100,32,9,10]))),V7=a.lazy(()=>C(()=>import("./MarketingForgotPasswordPage-DFmBFq5P.js"),__vite__mapDeps([101,1,66,4,33,8,5,34,7,35,36,37,3,6,38,56,9,10]))),B7=a.lazy(()=>C(()=>import("./MarketingSettingsPage-BdDDFlIN.js"),__vite__mapDeps([102,1,4,33,8,5,34,7,35,36,37,3,6,38,66,103,42,86,70,45,104,105,106,107,88,108,109,91,110,111,9,10]))),H7=a.lazy(()=>C(()=>import("./MarketingOrdersPage-CAS81SqW.js"),__vite__mapDeps([112,1,8,4,113,114,115,96,116,117,118,33,5,34,7,35,36,37,3,6,38,69,119,120,9,10]))),U7=a.lazy(()=>C(()=>import("./MarketingMailingsArchivePage-CsntZOMJ.js"),__vite__mapDeps([121,1,8,4,42,115,33,5,34,7,35,36,37,3,6,38,122,100,70,96,119,118,9,10]))),W7=a.lazy(()=>C(()=>import("./MarketingRouteSubscriptionsPage-DFyecEgA.js"),__vite__mapDeps([123,1,8,124,4,5,75,42,115,33,34,7,35,36,37,3,6,38,125,70,96,89,109,9,10]))),q7=a.lazy(()=>C(()=>import("./MarketingNotificationsInboxPage-CRaHTIV-.js"),__vite__mapDeps([126,1,4,33,8,5,34,7,35,36,37,3,6,38,127,42,70,128,9,10]))),G7=a.lazy(()=>C(()=>import("./MarketingExchangeAboutPage-CrFiUtvX.js"),__vite__mapDeps([129,1,4,33,8,5,34,7,35,36,37,3,6,38,130,131,44,132,108,46,116,9,10]))),K7=a.lazy(()=>C(()=>import("./MarketingExchangeListPage-Bt7qCy1U.js"),__vite__mapDeps([133,1,8,4,42,33,5,34,7,35,36,37,3,6,38,134,130,88,70,92,9,10]))),X7=a.lazy(()=>C(()=>import("./MarketingExchangeCreatePage-CoIc1dDz.js"),__vite__mapDeps([135,1,66,4,33,8,5,34,7,35,36,37,3,6,38,56,130,70,9,10]))),Y7=a.lazy(()=>C(()=>import("./MarketingExchangeDetailPage-DH1dvpTy.js"),__vite__mapDeps([136,1,8,4,42,66,5,70,132,33,34,7,35,36,37,3,6,38,56,77,75,94,108,9,10]))),J7=a.lazy(()=>C(()=>import("./MarketingExchangeManagePage-BF953xY8.js"),__vite__mapDeps([137,1,8,4,42,33,5,34,7,35,36,37,3,6,38,56,70,108,138,132,139,9,10]))),Z7=a.lazy(()=>C(()=>import("./MarketingBidEditPage-2r_tcnfm.js"),__vite__mapDeps([140,1,66,8,4,42,33,5,34,7,35,36,37,3,6,38,56,132,70,103,75,109,9,10]))),Q7=a.lazy(()=>C(()=>import("./MarketingExchangeChatPage-CdPiayeq.js"),__vite__mapDeps([141,1,8,4,42,33,5,34,7,35,36,37,3,6,38,56,139,70,50,9,10]))),eK=a.lazy(()=>C(()=>import("./MarketingCounterOffersPage-DD-dplBv.js"),__vite__mapDeps([142,1,8,4,42,33,5,34,7,35,36,37,3,6,38,56,143,70,94,108,9,10]))),tK=a.lazy(()=>C(()=>import("./MarketingBidAttachmentsPage-Dtu1D_Iy.js"),__vite__mapDeps([144,1,8,4,42,33,5,34,7,35,36,37,3,6,38,56,145,70,71,96,109,9,10]))),rK=a.lazy(()=>C(()=>import("./MarketingExchangeWatchListPage-C67wU_jt.js"),__vite__mapDeps([146,1,8,4,42,33,5,34,7,35,36,37,3,6,38,70,92,9,10]))),nK=a.lazy(()=>C(()=>import("./MarketingExchangeClonePage-CHr7tLCf.js"),__vite__mapDeps([147,1,8,4,42,33,5,34,7,35,36,37,3,6,38,56,76,70,9,10]))),oK=a.lazy(()=>C(()=>import("./MarketingSupplierPortalPage-C9xbLf8V.js"),__vite__mapDeps([148,1,4,33,8,5,34,7,35,36,37,3,6,38,132,108,119,149,9,10]))),sK=a.lazy(()=>C(()=>import("./MarketingSupplierAuctionsPage-Cgf2TJj-.js"),__vite__mapDeps([150,1,8,4,42,33,5,34,7,35,36,37,3,6,38,132,70,92,9,10]))),iK=a.lazy(()=>C(()=>import("./MarketingSupplierMyBidsPage-BqT0V4Ji.js"),__vite__mapDeps([151,1,8,4,42,33,5,34,7,35,36,37,3,6,38,70,132,9,10]))),rx=a.lazy(()=>C(()=>import("./MarketingSupplierReputationPage-97QSUjcI.js"),__vite__mapDeps([152,1,8,4,42,33,5,34,7,35,36,37,3,6,38,56,70,91,108,139,132,9,10]))),aK=a.lazy(()=>C(()=>import("./MarketingAdminExchangeStatsPage-dFOJmrcU.js"),__vite__mapDeps([153,1,8,4,42,33,5,34,7,35,36,37,3,6,38,56,55,70,75,132,108,139,9,10]))),lK=a.lazy(()=>C(()=>import("./MarketingAdminChatModerationPage-CUPzQRqO.js"),__vite__mapDeps([154,1,8,4,42,33,5,34,7,35,36,37,3,6,38,56,55,70,75,50,94,9,10]))),cK=a.lazy(()=>C(()=>import("./MarketingAdminRequestAuditPage-Dwo2g8v5.js"),__vite__mapDeps([155,1,8,4,42,33,5,34,7,35,36,37,3,6,38,56,55,70,119,132,139,94,9,10]))),uK=a.lazy(()=>C(()=>import("./MarketingAdminOverviewPage-VmH5d_Kd.js"),__vite__mapDeps([156,1,8,4,42,33,5,34,7,35,36,37,3,6,38,157,158,70,50,9,44,159,143,10]))),dK=a.lazy(()=>C(()=>import("./MarketingExchangePublicStatsPage-jtaHgnr4.js"),__vite__mapDeps([160,1,8,4,42,33,5,34,7,35,36,37,3,6,38,70,159,132,9,10]))),pK=a.lazy(()=>C(()=>import("./MarketingPreviewTourPage-T1T_iEFS.js"),__vite__mapDeps([161,1,4,33,8,5,34,7,35,36,37,3,6,38,75,108,94,45,88,132,139,143,145,76,55,91,9,10])));function fK(){return[c.jsx(E,{path:"/m",element:c.jsx(_t,{to:"/"})},"m-home"),c.jsx(E,{path:"/preview",element:c.jsx(pK,{})},"m-preview"),c.jsx(E,{path:"/calculator/customs",element:c.jsx(M7,{})},"m-calc-customs"),c.jsx(E,{path:"/calculator",element:c.jsx(k7,{})},"m-calc"),c.jsx(E,{path:"/search",element:c.jsx(L7,{})},"m-results"),c.jsx(E,{path:"/order/:id",element:c.jsx(z7,{})},"m-order"),c.jsx(E,{path:"/q/:token",element:c.jsx(tx,{})},"m-q"),c.jsx(E,{path:"/p/:token",element:c.jsx(tx,{})},"m-p"),c.jsx(E,{path:"/mailing-view/:token",element:c.jsx(F7,{})},"m-mailing-view"),c.jsx(E,{path:"/m/tracking/*",element:c.jsx(bs,{from:"/m/tracking",to:"/tracking"})},"m-tracking-redirect"),c.jsx(E,{path:"/m/auth",element:c.jsx(_t,{to:"/login"})},"m-auth"),c.jsx(E,{path:"/forgot-password",element:c.jsx(V7,{})},"m-forgot"),c.jsx(E,{path:"/lk/settings",element:c.jsx(B7,{})},"lk-settings"),c.jsx(E,{path:"/lk/orders",element:c.jsx(H7,{})},"lk-orders"),c.jsx(E,{path:"/lk/mailings",element:c.jsx(U7,{})},"lk-mailings"),c.jsx(E,{path:"/lk/subscriptions",element:c.jsx(W7,{})},"lk-subscriptions"),c.jsx(E,{path:"/dashboard",element:c.jsx(_t,{to:"/lk"})},"m-dashboard"),c.jsx(E,{path:"/dashboard/settings",element:c.jsx(_t,{to:"/lk/settings"})},"m-settings"),c.jsx(E,{path:"/dashboard/orders",element:c.jsx(_t,{to:"/lk/orders"})},"m-orders"),c.jsx(E,{path:"/dashboard/saved",element:c.jsx(_t,{to:"/lk/saved-calcs"})},"m-saved"),c.jsx(E,{path:"/dashboard/mailings",element:c.jsx(_t,{to:"/lk/mailings"})},"m-mailings"),c.jsx(E,{path:"/dashboard/subscriptions",element:c.jsx(_t,{to:"/lk/subscriptions"})},"m-subscriptions"),c.jsx(E,{path:"/dashboard/notifications",element:c.jsx(_t,{to:"/lk/notifications"})},"m-notifications-prefs"),c.jsx(E,{path:"/notifications",element:c.jsx(q7,{})},"m-notifications-inbox"),c.jsx(E,{path:"/exchange/about",element:c.jsx(G7,{})},"m-exchange-about"),c.jsx(E,{path:"/exchange/new",element:c.jsx(X7,{})},"m-exchange-new"),c.jsx(E,{path:"/exchange/watching",element:c.jsx(rK,{})},"m-exchange-watching"),c.jsx(E,{path:"/exchange/stats",element:c.jsx(dK,{})},"m-exchange-stats"),c.jsx(E,{path:"/exchange/bids/:bidId/attachments",element:c.jsx(tK,{})},"m-bid-attachments"),c.jsx(E,{path:"/exchange/bids/:bidId/edit",element:c.jsx(Z7,{})},"m-bid-edit"),c.jsx(E,{path:"/exchange/bids/:bidId/counter-offers",element:c.jsx(eK,{})},"m-counter-offers"),c.jsx(E,{path:"/exchange/:id/chat",element:c.jsx(Q7,{})},"m-exchange-chat"),c.jsx(E,{path:"/exchange/:id/manage",element:c.jsx(J7,{})},"m-exchange-manage"),c.jsx(E,{path:"/exchange/:id/clone",element:c.jsx(nK,{})},"m-exchange-clone"),c.jsx(E,{path:"/exchange/supplier",element:c.jsx(oK,{})},"m-supplier"),c.jsx(E,{path:"/exchange/supplier/auctions",element:c.jsx(sK,{})},"m-supplier-auctions"),c.jsx(E,{path:"/exchange/supplier/bids",element:c.jsx(iK,{})},"m-supplier-bids"),c.jsx(E,{path:"/exchange/supplier/reputation",element:c.jsx(rx,{})},"m-supplier-reputation"),c.jsx(E,{path:"/exchange/supplier/reputation/:userId",element:c.jsx(rx,{})},"m-supplier-reputation-id"),c.jsx(E,{path:"/exchange/:id",element:c.jsx(Y7,{})},"m-exchange-detail"),c.jsx(E,{path:"/exchange",element:c.jsx(K7,{})},"m-exchange-list"),c.jsx(E,{path:"/m/supplier/*",element:c.jsx(bs,{from:"/m/supplier",to:"/exchange/supplier"})},"m-supplier-redirect"),c.jsx(E,{path:"/m/admin",element:c.jsx(uK,{})},"m-admin-overview"),c.jsx(E,{path:"/m/admin/exchange/stats",element:c.jsx(aK,{})},"m-admin-stats"),c.jsx(E,{path:"/m/admin/exchange/chat-moderation",element:c.jsx(lK,{})},"m-admin-chat-mod"),c.jsx(E,{path:"/m/admin/exchange/requests/:id",element:c.jsx(cK,{})},"m-admin-audit"),c.jsx(E,{path:"/m/reviews",element:c.jsx(Ut,{to:"/reviews",replace:!0})},"m-reviews"),c.jsx(E,{path:"/m/calc",element:c.jsx(_t,{to:"/calculator"})},"m-calc-redirect"),c.jsx(E,{path:"/m/results",element:c.jsx(_t,{to:"/search"})},"m-results-redirect"),c.jsx(E,{path:"/m/order/:id",element:c.jsx(D7,{})},"m-order-redirect"),c.jsx(E,{path:"/m/forgot-password",element:c.jsx(_t,{to:"/forgot-password"})},"m-forgot-redirect"),c.jsx(E,{path:"/m/preview",element:c.jsx(_t,{to:"/preview"})},"m-preview-redirect"),c.jsx(E,{path:"/m/dashboard/settings",element:c.jsx(_t,{to:"/lk/settings"})},"m-dashboard-settings-redirect"),c.jsx(E,{path:"/m/dashboard/orders",element:c.jsx(_t,{to:"/lk/orders"})},"m-dashboard-orders-redirect"),c.jsx(E,{path:"/m/dashboard/saved",element:c.jsx(_t,{to:"/lk/saved-calcs"})},"m-dashboard-saved-redirect"),c.jsx(E,{path:"/m/dashboard/mailings",element:c.jsx(_t,{to:"/lk/mailings"})},"m-dashboard-mailings-redirect"),c.jsx(E,{path:"/m/dashboard/subscriptions",element:c.jsx(_t,{to:"/lk/subscriptions"})},"m-dashboard-subscriptions-redirect"),c.jsx(E,{path:"/m/dashboard/notifications",element:c.jsx(_t,{to:"/lk/notifications"})},"m-dashboard-notifications-redirect"),c.jsx(E,{path:"/m/dashboard",element:c.jsx(_t,{to:"/lk"})},"m-dashboard-redirect"),c.jsx(E,{path:"/m/profile/settings",element:c.jsx(_t,{to:"/lk/settings"})},"m-profile-settings-redirect"),c.jsx(E,{path:"/m/profile/orders",element:c.jsx(_t,{to:"/lk/orders"})},"m-profile-orders-redirect"),c.jsx(E,{path:"/m/profile/saved",element:c.jsx(_t,{to:"/lk/saved-calcs"})},"m-profile-saved-redirect"),c.jsx(E,{path:"/m/profile",element:c.jsx(_t,{to:"/lk"})},"m-profile-redirect"),c.jsx(E,{path:"/m/exchange/*",element:c.jsx(bs,{from:"/m/exchange",to:"/exchange"})},"m-exchange-redirect"),c.jsx(E,{path:"/m/notifications",element:c.jsx(_t,{to:"/notifications"})},"m-notifications-redirect"),c.jsx(E,{path:"/m/q/*",element:c.jsx(bs,{from:"/m/q",to:"/q"})},"m-q-redirect"),c.jsx(E,{path:"/m/p/*",element:c.jsx(bs,{from:"/m/p",to:"/p"})},"m-p-redirect"),c.jsx(E,{path:"/m/mailing-view/*",element:c.jsx(bs,{from:"/m/mailing-view",to:"/mailing-view"})},"m-mailing-view-redirect")]}const mK=({children:e})=>c.jsx(c.Fragment,{children:e}),hK=a.lazy(()=>C(()=>import("./CookieConsentBanner-h2slS6_z.js"),__vite__mapDeps([162,1,5,111,163,130,8,4,9,10]))),gK=a.lazy(()=>C(()=>import("./AuthForm-BS32coPN.js"),__vite__mapDeps([164,1,165,4,29,59,166,30,5,167,9,168,169,170,79,171,172,173,174,125,175,115,176,177,122,114,104,8,10,178]))),vK=a.lazy(()=>C(()=>import("./DesignSystemShowcase-uiN1_zS2.js"),__vite__mapDeps([179,1,4,42,180,8,5,9,10,45,7,83,44,70,40,181]))),bK=a.lazy(()=>C(()=>import("./ServicesIndexPage-DG56Jq6X.js"),__vite__mapDeps([182,1,4,33,8,5,34,7,35,36,37,3,6,38,40,183,184,181,9,10]))),_K=a.lazy(()=>C(()=>import("./PricingPage-B2n6l44G.js"),__vite__mapDeps([185,1,4,33,8,5,34,7,35,36,37,3,6,38,49,45,186,52,9,10]))),yK=a.lazy(()=>C(()=>import("./WebhookDocsPage-DnWr6SfT.js"),__vite__mapDeps([187,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),xK=a.lazy(()=>C(()=>import("./PortalWebhooksPage-DIXx1aTA.js"),__vite__mapDeps([188,1,4,42,33,8,5,34,7,35,36,37,3,6,38,88,70,105,76,109,9,10]))),wK=a.lazy(()=>C(()=>import("./AcceptInvitePage-CNB9EZIZ.js"),__vite__mapDeps([189,1,4,33,8,5,34,7,35,36,37,3,6,38,70,44,9,10]))),EK=a.lazy(()=>C(()=>import("./PortalShipmentDetailPage-q8y_kCOK.js"),__vite__mapDeps([190,1,191,8,5,4,9,10,192,42,33,34,7,35,36,37,3,6,38,70,56]))),SK=a.lazy(()=>C(()=>import("./PortalShipmentsPage-BjOZiLKJ.js"),__vite__mapDeps([193,1,194,4,42,33,8,5,34,7,35,36,37,3,6,38,70,9,10]))),CK=a.lazy(()=>C(()=>import("./PortalHomePage-Dij07WtM.js"),__vite__mapDeps([195,1,194,4,42,33,8,5,34,7,35,36,37,3,6,38,196,181,159,9,10]))),PK=a.lazy(()=>C(()=>import("./LkOverviewPage-BW0rdlW2.js"),__vite__mapDeps([197,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),RK=a.lazy(()=>C(()=>import("./LkCalcPage-BXrMLX-9.js"),__vite__mapDeps([198,1,4,33,8,5,34,7,35,36,37,3,6,38,27,28,29,30,31,32,39,40,56,9,10]))),nx=a.lazy(()=>C(()=>import("./LkApplicationsListPage-DUL1HY_4.js"),__vite__mapDeps([199,1,4,42,33,8,5,34,7,35,36,37,3,6,38,200,69,70,9,10]))),TK=a.lazy(()=>C(()=>import("./LkApplicationPage-BDRwQx9w.js"),__vite__mapDeps([201,1,4,5,37,44,96,42,35,111,87,166,202,50,203,204,71,70,109,205,33,8,34,7,36,3,6,38,138,65,43,76,206,207,184,56,9,10]))),IK=a.lazy(()=>C(()=>import("./LkDocumentsPage-CdJka0R4.js"),__vite__mapDeps([208,1,8,203,4,204,71,37,44,70,109,42,33,5,34,7,35,36,3,6,38,209,61,96,65,9,10]))),$K=a.lazy(()=>C(()=>import("./LkNotificationsPage-DXwGuV3t.js"),__vite__mapDeps([210,1,4,33,8,5,34,7,35,36,37,3,6,38,211,42,70,44,128,106,94,9,10]))),AK=a.lazy(()=>C(()=>import("./LkTeamPage-BGROL8KR.js"),__vite__mapDeps([212,1,4,113,8,114,115,96,116,117,118,33,5,34,7,35,36,37,3,6,38,200,166,70,9,10]))),jK=a.lazy(()=>C(()=>import("./LkSavedCalcsPage-DeM8t6Cw.js"),__vite__mapDeps([213,1,4,42,33,8,5,34,7,35,36,37,3,6,38,79,70,118,89,93,109,9,10]))),OK=a.lazy(()=>C(()=>import("./LkShipmentsPage-DDbcCvWy.js"),__vite__mapDeps([214,1,4,5,44,33,8,34,7,35,36,37,3,6,38,42,215,117,70,216,9,10]))),NK=a.lazy(()=>C(()=>import("./LkCalendarPage-CQ35oi3p.js"),__vite__mapDeps([217,1,4,42,33,8,5,34,7,35,36,37,3,6,38,118,218,65,76,109,9,10]))),DK=a.lazy(()=>C(()=>import("./LkShipmentDetailPage-DgE6wjhB.js"),__vite__mapDeps([219,8,1,4,42,33,5,34,7,35,36,37,3,6,38,215,56,70,216,65,44,9,10]))),kK=a.lazy(()=>C(()=>import("./LkCustomsPage-5_kBMF4H.js"),__vite__mapDeps([220,1,4,42,33,8,5,34,7,35,36,37,3,6,38,48,32,70,39,44,9,10]))),MK=a.lazy(()=>C(()=>import("./LkShipmentTrackerPage-DGdWr1Jp.js"),__vite__mapDeps([221,8,1,4,42,33,5,34,7,35,36,37,3,6,38,44,56,70,206,222,93,76,65,9,10]))),LK=a.lazy(()=>C(()=>import("./LkHelpPage-BTlEl7yT.js"),__vite__mapDeps([223,1,4,33,8,5,34,7,35,36,37,3,6,38,224,9,10]))),zK=a.lazy(()=>C(()=>import("./LkSalesFastQuotePage-nKAxGXU4.js"),__vite__mapDeps([225,1,4,33,8,5,34,7,35,36,37,3,6,38,226,76,227,9,10]))),FK=a.lazy(()=>C(()=>import("./LkSalesLeadsPage-DzAhiFHK.js"),__vite__mapDeps([228,1,4,42,33,8,5,34,7,35,36,37,3,6,38,206,77,76,50,9,10]))),VK=a.lazy(()=>C(()=>import("./LkReferralPage-DOja2TwX.js"),__vite__mapDeps([229,1,4,42,33,8,5,34,7,35,36,37,3,6,38,43,230,93,70,44,159,76,94,9,10])));a.lazy(()=>C(()=>import("./LkPartnerPage-CQuvNn2N.js"),__vite__mapDeps([231,1,4,42,33,8,5,34,7,35,36,37,3,6,38,230,70,159,44,96,9,10])));const BK=a.lazy(()=>C(()=>import("./ReferralProgramPage-CqQTQDOI.js"),__vite__mapDeps([232,1,4,33,8,5,34,7,35,36,37,3,6,38,139,72,44,93,9,10]))),HK=a.lazy(()=>C(()=>import("./LkAdminCustomersPage-CM2PAl0D.js"),__vite__mapDeps([233,1,4,42,33,8,5,34,7,35,36,37,3,6,38,234,50,206,117,159,143,9,10]))),UK=a.lazy(()=>C(()=>import("./PublicHelpPage-DBsQjYOu.js"),__vite__mapDeps([235,1,4,33,8,5,34,7,35,36,37,3,6,38,224,236,45,9,10]))),WK=a.lazy(()=>C(()=>import("./HelpArticlePage-CAiLKLqR.js"),__vite__mapDeps([237,1,4,42,33,8,5,34,7,35,36,37,3,6,38,224,56,238,9,10]))),ox=a.lazy(()=>C(()=>import("./LkInsuranceClaimPage-DRgAo0Sn.js"),__vite__mapDeps([239,1,4,33,8,5,34,7,35,36,37,3,6,38,56,44,222,70,9,10]))),qK=a.lazy(()=>C(()=>import("./LkContractWizardPage-cghXlPnO.js"),__vite__mapDeps([240,1,4,33,8,5,34,7,35,36,37,3,6,38,200,86,67,43,204,56,44,222,70,109,9,10]))),GK=a.lazy(()=>C(()=>import("./PublicResearchIndexPage-DtLckH_B.js"),__vite__mapDeps([241,1,4,33,8,5,34,7,35,36,37,3,6,38,242,163,96,75,9,10]))),KK=a.lazy(()=>C(()=>import("./PublicResearchSmbCostIndexPage-DSzRbBR5.js"),__vite__mapDeps([243,1,4,33,8,5,34,7,35,36,37,3,6,38,56,45,75,159,96,242,46,111,116,65,163,9,10]))),XK=a.lazy(()=>C(()=>import("./PublicEnFaqPage-DGZAzkZr.js"),__vite__mapDeps([244,1,4,33,8,5,34,7,35,36,37,3,6,38,245,9,10]))),YK=a.lazy(()=>C(()=>import("./PublicEnFaqArticlePage-FsPBF5by.js"),__vite__mapDeps([246,1,4,33,8,5,34,7,35,36,37,3,6,38,245,9,10]))),JK=a.lazy(()=>C(()=>import("./PublicEnGlossaryIndexPage-DDRVUgUR.js"),__vite__mapDeps([247,1,4,33,8,5,34,7,35,36,37,3,6,38,248,249,9,10]))),ZK=a.lazy(()=>C(()=>import("./PublicEnGlossaryTermPage-o9x7f_WN.js"),__vite__mapDeps([250,1,4,33,8,5,34,7,35,36,37,3,6,38,248,9,10]))),QK=a.lazy(()=>C(()=>import("./PublicEnBlogIndexPage-DYB1B2Ay.js"),__vite__mapDeps([251,1,4,33,8,5,34,7,35,36,37,3,6,38,252,9,10]))),eX=a.lazy(()=>C(()=>import("./PublicEnBlogArticlePage-DRxSb5ad.js"),__vite__mapDeps([253,1,4,33,8,5,34,7,35,36,37,3,6,38,252,9,10]))),tX=a.lazy(()=>C(()=>import("./PublicEnAboutPage-CGA56e5U.js"),__vite__mapDeps([254,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),rX=a.lazy(()=>C(()=>import("./PublicEnServicesPage-DN_HJuiu.js"),__vite__mapDeps([255,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),nX=a.lazy(()=>C(()=>import("./YdFreightChinaPage-erBrIG6K.js"),__vite__mapDeps([256,1,257,4,33,8,5,34,7,35,36,37,3,6,38,44,72,9,10]))),oX=a.lazy(()=>C(()=>import("./YdCustomsBrokerPage-CtUw4DaK.js"),__vite__mapDeps([258,1,257,4,33,8,5,34,7,35,36,37,3,6,38,44,72,111,259,9,10]))),sX=a.lazy(()=>C(()=>import("./YdSmbImportPage--r1HGRAe.js"),__vite__mapDeps([260,1,257,4,33,8,5,34,7,35,36,37,3,6,38,44,72,143,84,9,10]))),iX=a.lazy(()=>C(()=>import("./MultiOriginCalculatorPage-vQHtTqBR.js"),__vite__mapDeps([261,1,4,42,33,8,5,34,7,35,36,37,3,6,38,226,75,83,93,70,9,10]))),aX=a.lazy(()=>C(()=>import("./PlansPage-B9IbRLVR.js"),__vite__mapDeps([262,1,4,33,8,5,34,7,35,36,37,3,6,38,49,45,186,9,10]))),lX=a.lazy(()=>C(()=>import("./LoginPage-khZg59it.js"),__vite__mapDeps([263,8,1,4,42,33,5,34,7,35,36,37,3,6,38,9,10]))),cX=a.lazy(()=>C(()=>import("./SignupLegalEntityPage-DgVF1Ll7.js"),__vite__mapDeps([264,1,226,8,4,33,5,34,7,35,36,37,3,6,38,91,265,227,70,56,9,10]))),uX=a.lazy(()=>C(()=>import("./PublicTrackPage-D0j6CiHu.js"),__vite__mapDeps([266,1,4,42,33,8,5,34,7,35,36,37,3,6,38,93,181,9,10]))),dX=a.lazy(()=>C(()=>import("./SupplierPortalPage-v2asoDPm.js"),__vite__mapDeps([267,1,4,5,218,70,35,222,71,44,8,9,10]))),pX=a.lazy(()=>C(()=>import("./ToolsHubPage-CBthteU2.js"),__vite__mapDeps([268,1,4,33,8,5,34,7,35,36,37,3,6,38,45,269,270,83,271,181,184,206,73,159,272,49,74,218,82,265,111,273,274,50,275,149,276,277,278,131,279,143,70,242,116,280,281,282,39,9,10]))),fX=a.lazy(()=>C(()=>import("./ToolsIncotermsPage-6uuED2Vf.js"),__vite__mapDeps([283,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,83,70,44,138,9,10]))),mX=a.lazy(()=>C(()=>import("./ToolsCo2Page-CzDUCrt8.js"),__vite__mapDeps([286,1,4,33,8,5,34,7,35,36,37,3,6,38,56,270,9,10]))),hX=a.lazy(()=>C(()=>import("./ToolsPortsPage-Spihcziw.js"),__vite__mapDeps([287,1,4,33,8,5,34,7,35,36,37,3,6,38,56,83,46,209,9,10]))),gX=a.lazy(()=>C(()=>import("./ToolsDistancePage-BSAzNA-B.js"),__vite__mapDeps([288,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,269,83,61,9,10]))),vX=a.lazy(()=>C(()=>import("./ToolsCbmPage-Ce0geGBQ.js"),__vite__mapDeps([289,1,4,33,8,5,34,7,35,36,37,3,6,38,284,285,56,88,277,109,9,10]))),bX=a.lazy(()=>C(()=>import("./ToolsAirFreightPage-Ckffoqef.js"),__vite__mapDeps([290,1,4,33,8,5,34,7,35,36,37,3,6,38,56,277,138,50,159,9,10]))),_X=a.lazy(()=>C(()=>import("./ToolsPackingListPage-BwQOHz5f.js"),__vite__mapDeps([291,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,109,88,44,9,10]))),yX=a.lazy(()=>C(()=>import("./ToolsContainerPage-CtjcBmBc.js"),__vite__mapDeps([292,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,109,271,293,88,9,10]))),xX=a.lazy(()=>C(()=>import("./ToolsHsCodePage-DAucWJkF.js"),__vite__mapDeps([294,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,70,9,10]))),wX=a.lazy(()=>C(()=>import("./ToolsCustomsCalcPage-DUU21Shj.js"),__vite__mapDeps([295,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,17,56,70,9,10]))),EX=a.lazy(()=>C(()=>import("./ToolsCurrencyPage-Dqz1lvPl.js"),__vite__mapDeps([296,1,4,33,8,5,34,7,35,36,37,3,6,38,56,273,206,159,143,52,9,10]))),SX=a.lazy(()=>C(()=>import("./ToolsDocsCheckPage-BIx4FcXw.js"),__vite__mapDeps([297,1,4,33,8,5,34,7,35,36,37,3,6,38,56,44,70,96,9,10]))),CX=a.lazy(()=>C(()=>import("./ToolsSchedulePage-DH8zidj0.js"),__vite__mapDeps([298,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,70,9,10]))),PX=a.lazy(()=>C(()=>import("./ToolsFreightRatesPage-DnEQRPDE.js"),__vite__mapDeps([299,1,4,33,8,5,34,7,35,36,37,3,6,38,143,50,9,10]))),RX=a.lazy(()=>C(()=>import("./ToolsFreightIndexPage-zr1CMYZO.js"),__vite__mapDeps([300,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),TX=a.lazy(()=>C(()=>import("./ToolsLandedCostPage-CVZSBxWP.js"),__vite__mapDeps([301,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,70,9,10]))),IX=a.lazy(()=>C(()=>import("./ToolsComparisonPage-8s-_RH0g.js"),__vite__mapDeps([302,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,270,44,138,50,9,10]))),$X=a.lazy(()=>C(()=>import("./ToolsChinaCalendarPage-C--de6df.js"),__vite__mapDeps([303,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,50,75,9,10]))),AX=a.lazy(()=>C(()=>import("./ToolsPreShipmentPage-XjtSESNn.js"),__vite__mapDeps([304,1,4,33,8,5,34,7,35,36,37,3,6,38,56,259,61,44,50,9,10]))),jX=a.lazy(()=>C(()=>import("./ToolsDemurragePage-CDjdr2iB.js"),__vite__mapDeps([305,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,306,44,50,9,10]))),OX=a.lazy(()=>C(()=>import("./ToolsPaymentTermsPage-zQLl7JxD.js"),__vite__mapDeps([307,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,70,44,138,9,10]))),NX=a.lazy(()=>C(()=>import("./ToolsInsurancePage-D7yqudlf.js"),__vite__mapDeps([308,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,111,50,9,10]))),DX=a.lazy(()=>C(()=>import("./ToolsLeadTimePage-DhDt-Bwu.js"),__vite__mapDeps([309,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,83,75,50,184,9,10]))),kX=a.lazy(()=>C(()=>import("./ToolsContainerTrackingPage-Bkb2l1X4.js"),__vite__mapDeps([310,1,4,33,8,5,34,7,35,36,37,3,6,38,311,312,56,65,83,9,10]))),MX=a.lazy(()=>C(()=>import("./ToolsConverterPage-DlNRYCKw.js"),__vite__mapDeps([313,1,4,33,8,5,34,7,35,36,37,3,6,38,56,273,9,10]))),LX=a.lazy(()=>C(()=>import("./ToolsFreightForwarderPage--63O-BHr.js"),__vite__mapDeps([314,1,4,33,8,5,34,7,35,36,37,3,6,38,56,274,227,138,9,10]))),zX=a.lazy(()=>C(()=>import("./ToolsPackagingPage-DU69ZbP9.js"),__vite__mapDeps([315,1,4,33,8,5,34,7,35,36,37,3,6,38,56,227,50,316,9,10]))),FX=a.lazy(()=>C(()=>import("./ToolsDangerousGoodsPage-DAd_egBV.js"),__vite__mapDeps([317,1,284,5,285,4,33,8,34,7,35,36,37,3,6,38,56,50,44,242,55,9,10]))),VX=a.lazy(()=>C(()=>import("./ToolsGlossaryPage-D13kjAOi.js"),__vite__mapDeps([318,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),BX=a.lazy(()=>C(()=>import("./ToolsWarehousePage-DQk3fH6d.js"),__vite__mapDeps([319,1,4,33,8,5,34,7,35,36,37,3,6,38,56,44,143,50,306,9,10]))),HX=a.lazy(()=>C(()=>import("./ToolsTimelinePage-CV6owJRz.js"),__vite__mapDeps([320,1,4,33,8,5,34,7,35,36,37,3,6,38,75,83,184,9,10]))),UX=a.lazy(()=>C(()=>import("./ToolsTradeFinancePage-dziRArV6.js"),__vite__mapDeps([321,1,4,33,8,5,34,7,35,36,37,3,6,38,111,149,227,138,159,50,265,9,10]))),WX=a.lazy(()=>C(()=>import("./ToolsCargoStandardsPage-BKWEJk6I.js"),__vite__mapDeps([322,1,4,33,8,5,34,7,35,36,37,3,6,38,269,293,9,10]))),qX=a.lazy(()=>C(()=>import("./ToolsExportDocsPage-BxmgtqZH.js"),__vite__mapDeps([323,1,4,33,8,5,34,7,35,36,37,3,6,38,227,96,70,9,10]))),GX=a.lazy(()=>C(()=>import("./ToolsSurchargesPage-BQATEso7.js"),__vite__mapDeps([324,1,4,33,8,5,34,7,35,36,37,3,6,38,50,149,159,9,10]))),KX=a.lazy(()=>C(()=>import("./ToolsRussiaPortsPage-D_SAMb8l.js"),__vite__mapDeps([325,1,4,33,8,5,34,7,35,36,37,3,6,38,83,9,10]))),XX=a.lazy(()=>C(()=>import("./ToolsSupplierCheckPage-0BaJfOjl.js"),__vite__mapDeps([326,1,4,33,8,5,34,7,35,36,37,3,6,38,111,227,138,50,9,10]))),YX=a.lazy(()=>C(()=>import("./ToolsAntiDumpingPage-CwEYC4sx.js"),__vite__mapDeps([327,1,4,33,8,5,34,7,35,36,37,3,6,38,111,159,50,9,10]))),JX=a.lazy(()=>C(()=>import("./ToolsVatRefundPage-DRfSCjgX.js"),__vite__mapDeps([328,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),ZX=a.lazy(()=>C(()=>import("./ToolsTradeLanesPage-UECaN2Cr.js"),__vite__mapDeps([329,1,4,33,8,5,34,7,35,36,37,3,6,38,56,131,9,10]))),QX=a.lazy(()=>C(()=>import("./ToolsKpiPage-Bb0BhnHx.js"),__vite__mapDeps([330,1,4,33,8,5,34,7,35,36,37,3,6,38,50,272,159,227,9,10]))),eY=a.lazy(()=>C(()=>import("./ToolsFreightBrokerPage-CgCAY2kV.js"),__vite__mapDeps([331,1,4,33,8,5,34,7,35,36,37,3,6,38,56,50,138,9,10]))),tY=a.lazy(()=>C(()=>import("./ToolsExchangeRiskPage-cd01e77w.js"),__vite__mapDeps([332,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),rY=a.lazy(()=>C(()=>import("./ToolsPortCongestionPage-CfgHuPai.js"),__vite__mapDeps([333,1,4,33,8,5,34,7,35,36,37,3,6,38,50,83,159,143,52,9,10]))),nY=a.lazy(()=>C(()=>import("./ToolsCargoClaimsPage-B9Iyq_b3.js"),__vite__mapDeps([334,1,4,33,8,5,34,7,35,36,37,3,6,38,56,44,55,50,9,10]))),oY=a.lazy(()=>C(()=>import("./ToolsChemicalRegPage-CZIrMG_P.js"),__vite__mapDeps([335,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),sY=a.lazy(()=>C(()=>import("./ToolsSeasonalityPage-Dz0ImU0b.js"),__vite__mapDeps([336,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),iY=a.lazy(()=>C(()=>import("./ToolsTransitTimePage-Czbm35Ff.js"),__vite__mapDeps([337,1,4,33,8,5,34,7,35,36,37,3,6,38,50,73,83,270,44,9,10]))),aY=a.lazy(()=>C(()=>import("./ToolsFreightCostPage-DJKg_oOJ.js"),__vite__mapDeps([338,1,4,33,8,5,34,7,35,36,37,3,6,38,56,50,149,55,138,44,9,10]))),lY=a.lazy(()=>C(()=>import("./ToolsExportControlPage-CO_iXAPw.js"),__vite__mapDeps([339,1,4,33,8,5,34,7,35,36,37,3,6,38,55,227,50,111,277,9,10]))),cY=a.lazy(()=>C(()=>import("./ToolsCargoInsuranceCalcPage-pIBcB7SC.js"),__vite__mapDeps([340,1,4,33,8,5,34,7,35,36,37,3,6,38,56,70,9,10]))),uY=a.lazy(()=>C(()=>import("./ToolsRussiaRegionsPage-rJZMRhuT.js"),__vite__mapDeps([341,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),dY=a.lazy(()=>C(()=>import("./ToolsContainerTypesPage-B4m-yCFK.js"),__vite__mapDeps([342,1,4,33,8,5,34,7,35,36,37,3,6,38,44,281,271,343,50,138,9,10]))),pY=a.lazy(()=>C(()=>import("./ToolsBillOfLadingPage-N_3DCML9.js"),__vite__mapDeps([344,1,4,33,8,5,34,7,35,36,37,3,6,38,56,70,44,316,345,50,111,138,9,10]))),fY=a.lazy(()=>C(()=>import("./ToolsWeightDimensionsPage-CtibEOy5.js"),__vite__mapDeps([346,1,4,33,8,5,34,7,35,36,37,3,6,38,56,293,269,277,271,44,273,9,10]))),mY=a.lazy(()=>C(()=>import("./ToolsMultimodalPage-CMFuRuDw.js"),__vite__mapDeps([347,1,4,33,8,5,34,7,35,36,37,3,6,38,50,149,44,138,9,10]))),hY=a.lazy(()=>C(()=>import("./ToolsLetterOfCreditPage-Cf0UVgFc.js"),__vite__mapDeps([348,1,33,4,8,5,34,7,35,36,37,3,6,38,265,111,70,44,9,10]))),gY=a.lazy(()=>C(()=>import("./ToolsFreeZonesPage-VKJ0uRqA.js"),__vite__mapDeps([349,1,4,33,8,5,34,7,35,36,37,3,6,38,56,44,138,9,10]))),vY=a.lazy(()=>C(()=>import("./ToolsColdChainPage-DaFcnupo.js"),__vite__mapDeps([350,1,4,33,8,5,34,7,35,36,37,3,6,38,56,281,159,50,44,138,9,10]))),bY=a.lazy(()=>C(()=>import("./ToolsCargoReadinessPage-Cbyw1UY_.js"),__vite__mapDeps([351,1,4,33,8,5,34,7,35,36,37,3,6,38,56,44,50,96,9,10]))),_Y=a.lazy(()=>C(()=>import("./ToolsTariffSchedulePage-BQ_UVWnl.js"),__vite__mapDeps([352,1,4,33,8,5,34,7,35,36,37,3,6,38,56,70,54,138,44,9,10]))),yY=a.lazy(()=>C(()=>import("./ToolsSupplyChainRiskPage-CF6Hn64V.js"),__vite__mapDeps([353,1,4,33,8,5,34,7,35,36,37,3,6,38,56,50,163,143,227,9,10]))),xY=a.lazy(()=>C(()=>import("./ToolsFreightNegotiationPage-B59Vxg_U.js"),__vite__mapDeps([354,1,4,33,8,5,34,7,35,36,37,3,6,38,56,143,95,163,50,44,9,10]))),wY=a.lazy(()=>C(()=>import("./ToolsWarehouseCalcPage-B55tNMiS.js"),__vite__mapDeps([355,1,4,33,8,5,34,7,35,36,37,3,6,38,56,143,281,70,9,10]))),EY=a.lazy(()=>C(()=>import("./ToolsOriginCertPage-Cr8dpX4m.js"),__vite__mapDeps([356,1,4,33,8,5,34,7,35,36,37,3,6,38,276,227,50,138,238,316,345,9,10]))),SY=a.lazy(()=>C(()=>import("./ToolsImportLicensePage-keGVzzup.js"),__vite__mapDeps([357,1,4,33,8,5,34,7,35,36,37,3,6,38,50,55,138,70,44,9,10]))),CY=a.lazy(()=>C(()=>import("./ToolsShipmentTrackerPage-C1W5Btjr.js"),__vite__mapDeps([358,1,4,33,8,5,34,7,35,36,37,3,6,38,311,50,44,9,10]))),PY=a.lazy(()=>C(()=>import("./ToolsChinaSupplierPage-DjMf6Hjp.js"),__vite__mapDeps([359,1,4,33,8,5,34,7,35,36,37,3,6,38,44,138,265,50,360,54,72,108,9,10]))),RY=a.lazy(()=>C(()=>import("./ToolsTradeCompliancePage-CaPZ9yrm.js"),__vite__mapDeps([361,1,4,33,8,5,34,7,35,36,37,3,6,38,111,55,277,227,50,9,10]))),TY=a.lazy(()=>C(()=>import("./ToolsCustomsBrokerCalcPage-BQRYEXYc.js"),__vite__mapDeps([362,1,4,33,8,5,34,7,35,36,37,3,6,38,56,274,277,44,70,9,10]))),IY=a.lazy(()=>C(()=>import("./ToolsEcommerceImportPage-HuNg7tjW.js"),__vite__mapDeps([363,1,4,33,8,5,34,7,35,36,37,3,6,38,282,108,50,227,238,138,9,10]))),$Y=a.lazy(()=>C(()=>import("./ToolsFreightForwarderGuidePage-C7JZdfJ-.js"),__vite__mapDeps([364,1,4,33,8,5,34,7,35,36,37,3,6,38,111,227,50,159,184,72,276,9,10]))),AY=a.lazy(()=>C(()=>import("./ToolsIncotermsCalcPage-CcSF150T.js"),__vite__mapDeps([365,1,4,33,8,5,34,7,35,36,37,3,6,38,17,273,149,111,227,50,9,10]))),jY=a.lazy(()=>C(()=>import("./ToolsPackagingRequirementsPage-D9SCWtT6.js"),__vite__mapDeps([366,1,4,33,8,5,34,7,35,36,37,3,6,38,50,281,271,282,227,9,10]))),OY=a.lazy(()=>C(()=>import("./ToolsRailwayFreightPage-ClA8xolC.js"),__vite__mapDeps([367,1,4,33,8,5,34,7,35,36,37,3,6,38,149,227,278,50,9,10]))),NY=a.lazy(()=>C(()=>import("./ToolsLetterOfCreditCalcPage-CdnivRZO.js"),__vite__mapDeps([368,1,4,33,8,5,34,7,35,36,37,3,6,38,265,149,50,227,111,9,10]))),DY=a.lazy(()=>C(()=>import("./ToolsCarbonFootprintPage-BTNScZ3R.js"),__vite__mapDeps([369,1,4,33,8,5,34,7,35,36,37,3,6,38,270,143,272,227,50,149,9,10]))),kY=a.lazy(()=>C(()=>import("./ToolsAirCargoGuidePage-S_g_hDe3.js"),__vite__mapDeps([370,1,4,33,8,5,34,7,35,36,37,3,6,38,50,227,9,10]))),MY=a.lazy(()=>C(()=>import("./ToolsChinaHolidaysPage-DkyWPJxr.js"),__vite__mapDeps([371,1,4,33,8,5,34,7,35,36,37,3,6,38,143,227,50,9,10]))),LY=a.lazy(()=>C(()=>import("./ToolsPortStoragePage-DA8Y1nAf.js"),__vite__mapDeps([372,1,4,33,8,5,34,7,35,36,37,3,6,38,83,149,50,227,143,9,10]))),zY=a.lazy(()=>C(()=>import("./ToolsContainerSizesPage-DHMjPiEm.js"),__vite__mapDeps([373,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),FY=a.lazy(()=>C(()=>import("./ToolsImportDocumentsPage-DKQb-db1.js"),__vite__mapDeps([374,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),VY=a.lazy(()=>C(()=>import("./ToolsLogisticsCostPage-6gMRMIXX.js"),__vite__mapDeps([375,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),BY=a.lazy(()=>C(()=>import("./ToolsShippingTermsPage-V3OIb8pe.js"),__vite__mapDeps([376,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),HY=a.lazy(()=>C(()=>import("./ToolsSupplyChainFinancePage-DRpkqsyR.js"),__vite__mapDeps([377,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),UY=a.lazy(()=>C(()=>import("./ToolsChineseSuppliersPage-cMZRLXYt.js"),__vite__mapDeps([378,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),WY=a.lazy(()=>C(()=>import("./ToolsRailwayCalcPage-DYiXLJNs.js"),__vite__mapDeps([379,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),qY=a.lazy(()=>C(()=>import("./ToolsMultimodalComparePage-DxVw8Cd-.js"),__vite__mapDeps([380,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),GY=a.lazy(()=>C(()=>import("./ToolsWarrantyClaimsPage-DOZwrY6g.js"),__vite__mapDeps([381,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),KY=a.lazy(()=>C(()=>import("./ToolsExportDocumentsPage-CnQtwVvE.js"),__vite__mapDeps([382,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),XY=a.lazy(()=>C(()=>import("./ToolsChinaPaymentsPage-e2VoI2Q4.js"),__vite__mapDeps([383,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),YY=a.lazy(()=>C(()=>import("./ToolsLoadingNormsPage-BV4Tskx5.js"),__vite__mapDeps([384,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),JY=a.lazy(()=>C(()=>import("./ToolsHazmatGuidePage-CuhOsReF.js"),__vite__mapDeps([385,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),ZY=a.lazy(()=>C(()=>import("./ToolsFreeTradeZonesPage-iEBjMAoW.js"),__vite__mapDeps([386,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),QY=a.lazy(()=>C(()=>import("./ToolsShipmentVisibilityPage-CpT0nDrj.js"),__vite__mapDeps([387,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),eJ=a.lazy(()=>C(()=>import("./ToolsImporterInsurancePage-DIwurtwl.js"),__vite__mapDeps([388,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),tJ=a.lazy(()=>C(()=>import("./ToolsCurrencyHedgingPage-DMMUGRBC.js"),__vite__mapDeps([389,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),rJ=a.lazy(()=>C(()=>import("./ToolsHonestSignPage-DWAdn0TA.js"),__vite__mapDeps([390,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),nJ=a.lazy(()=>C(()=>import("./ToolsLclCalculatorPage-BiAjTQMO.js"),__vite__mapDeps([391,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),oJ=a.lazy(()=>C(()=>import("./ToolsCarrierComparePage-CEHtfIg1.js"),__vite__mapDeps([392,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),sJ=a.lazy(()=>C(()=>import("./ToolsEaeuRulesPage-CBMbEsUm.js"),__vite__mapDeps([393,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),iJ=a.lazy(()=>C(()=>import("./ToolsHsCodeWizardPage-Dy972kNx.js"),__vite__mapDeps([394,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),aJ=a.lazy(()=>C(()=>import("./ToolsInventoryPlanningPage-6_nDT6Xe.js"),__vite__mapDeps([395,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),lJ=a.lazy(()=>C(()=>import("./ToolsRouteOptimizationPage-BySAyLnZ.js"),__vite__mapDeps([396,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),cJ=a.lazy(()=>C(()=>import("./ToolsFreightAuditPage-N2OzofRm.js"),__vite__mapDeps([397,1,4,33,8,5,34,7,35,36,37,3,6,38,149,70,44,9,10]))),uJ=a.lazy(()=>C(()=>import("./ToolsBolGuidePage-Dt2vwA36.js"),__vite__mapDeps([398,1,4,33,8,5,34,7,35,36,37,3,6,38,83,50,44,9,10]))),dJ=a.lazy(()=>C(()=>import("./ToolsCustomsBondPage-DRuf5bWr.js"),__vite__mapDeps([399,1,4,33,8,5,34,7,35,36,37,3,6,38,56,70,111,116,44,138,149,9,10]))),pJ=a.lazy(()=>C(()=>import("./ToolsCertOriginPage-DuZsTQ8c.js"),__vite__mapDeps([400,1,4,33,8,5,34,7,35,36,37,3,6,38,184,278,70,44,9,10]))),fJ=a.lazy(()=>C(()=>import("./ToolsImportVatPage-DMgF6ssD.js"),__vite__mapDeps([401,1,33,4,8,5,34,7,35,36,37,3,6,38,49,44,70,9,10]))),mJ=a.lazy(()=>C(()=>import("./ToolsLithiumBatteryPage-BnQ6lOLI.js"),__vite__mapDeps([402,1,4,33,8,5,34,7,35,36,37,3,6,38,50,83,44,9,10]))),hJ=a.lazy(()=>C(()=>import("./ToolsIspm15Page-BnlijYsh.js"),__vite__mapDeps([403,1,4,33,8,5,34,7,35,36,37,3,6,38,270,44,50,9,10]))),gJ=a.lazy(()=>C(()=>import("./ToolsPhytoCertPage-DqKXnusu.js"),__vite__mapDeps([404,1,4,33,8,5,34,7,35,36,37,3,6,38,270,184,138,44,50,9,10]))),vJ=a.lazy(()=>C(()=>import("./ToolsTemperatureCargoPage-D36oBgFq.js"),__vite__mapDeps([405,1,4,33,8,5,34,7,35,36,37,3,6,38,56,281,44,343,50,9,10]))),bJ=a.lazy(()=>C(()=>import("./ToolsOversizeCargoPage-Bt2gInG9.js"),__vite__mapDeps([406,1,4,33,8,5,34,7,35,36,37,3,6,38,284,56,50,44,316,345,9,10]))),_J=a.lazy(()=>C(()=>import("./ToolsTradeFinanceCalcPage-Dd0m9XRZ.js"),__vite__mapDeps([407,1,4,33,8,5,34,7,35,36,37,3,6,38,159,227,265,50,149,111,9,10]))),yJ=a.lazy(()=>C(()=>import("./ToolsBreakBulkPage-CZfCm1qz.js"),__vite__mapDeps([408,1,4,33,8,5,34,7,35,36,37,3,6,38,56,70,44,409,9,10]))),xJ=a.lazy(()=>C(()=>import("./ToolsSanctionsCheckPage-JZJHhD4h.js"),__vite__mapDeps([410,1,4,33,8,5,34,7,35,36,37,3,6,38,54,50,55,111,138,227,65,277,9,10]))),wJ=a.lazy(()=>C(()=>import("./ToolsExportLicensePage-kyGZb9YJ.js"),__vite__mapDeps([411,1,4,33,8,5,34,7,35,36,37,3,6,38,50,44,9,10]))),EJ=a.lazy(()=>C(()=>import("./ToolsFumigationPage-VLbCqXE6.js"),__vite__mapDeps([412,1,4,33,8,5,34,7,35,36,37,3,6,38,50,270,44,138,9,10]))),SJ=a.lazy(()=>C(()=>import("./ToolsContainerInspectionPage-DE89EEKX.js"),__vite__mapDeps([413,1,284,5,4,33,8,34,7,35,36,37,3,6,38,9,10]))),CJ=a.lazy(()=>C(()=>import("./ToolsRoRoGuidePage-B7rdiBh5.js"),__vite__mapDeps([414,1,4,33,8,5,34,7,35,36,37,3,6,38,56,44,70,415,83,9,10]))),PJ=a.lazy(()=>C(()=>import("./ToolsVgmCalcPage-D1oXzJsL.js"),__vite__mapDeps([416,1,4,33,8,5,34,7,35,36,37,3,6,38,277,50,227,9,10]))),RJ=a.lazy(()=>C(()=>import("./ToolsBondedWarehousePage-BxVdLoC9.js"),__vite__mapDeps([417,1,4,33,8,5,34,7,35,36,37,3,6,38,56,61,44,70,9,10]))),TJ=a.lazy(()=>C(()=>import("./ToolsAirWaybillPage-CvhL2zPV.js"),__vite__mapDeps([418,1,4,33,8,5,34,7,35,36,37,3,6,38,44,50,111,9,10]))),IJ=a.lazy(()=>C(()=>import("./ToolsInvoiceTemplatePage-CsJqYDxo.js"),__vite__mapDeps([419,1,4,33,8,5,34,7,35,36,37,3,6,38,44,138,70,9,10]))),$J=a.lazy(()=>C(()=>import("./ToolsShippingInstructionsPage-CSOQUW-e.js"),__vite__mapDeps([420,1,4,33,8,5,34,7,35,36,37,3,6,38,56,70,73,44,50,9,10]))),AJ=a.lazy(()=>C(()=>import("./ToolsTruckingCalcPage-D65RIpxF.js"),__vite__mapDeps([421,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),jJ=a.lazy(()=>C(()=>import("./ToolsSupplyChainKpiPage-BOkJ9nyy.js"),__vite__mapDeps([422,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),OJ=a.lazy(()=>C(()=>import("./ToolsSeaFreightChecklistPage-lpQDCxGf.js"),__vite__mapDeps([423,1,4,33,8,5,34,7,35,36,37,3,6,38,61,44,50,9,10]))),NJ=a.lazy(()=>C(()=>import("./ToolsSpotRateCalcPage-CBYZJFGu.js"),__vite__mapDeps([424,1,4,33,8,5,34,7,35,36,37,3,6,38,163,143,159,44,50,9,10]))),DJ=a.lazy(()=>C(()=>import("./ToolsPoManagementPage-PoaLHeBs.js"),__vite__mapDeps([425,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),kJ=a.lazy(()=>C(()=>import("./ToolsCharterPartyPage-5OKZ65Kx.js"),__vite__mapDeps([426,1,4,33,8,5,34,7,35,36,37,3,6,38,56,83,50,111,9,10]))),MJ=a.lazy(()=>C(()=>import("./ToolsSingleWindowPage-DBVFU4XX.js"),__vite__mapDeps([427,1,284,5,4,33,8,34,7,35,36,37,3,6,38,9,10]))),LJ=a.lazy(()=>C(()=>import("./ToolsDdpDduCalcPage-C1r0vspV.js"),__vite__mapDeps([428,1,4,33,8,5,34,7,35,36,37,3,6,38,56,227,138,50,9,10]))),zJ=a.lazy(()=>C(()=>import("./ToolsCbamGuidePage-Bamdo-8x.js"),__vite__mapDeps([429,1,4,33,8,5,34,7,35,36,37,3,6,38,360,270,50,163,44,9,10]))),FJ=a.lazy(()=>C(()=>import("./ToolsImportQuotasPage-iv2c6uuH.js"),__vite__mapDeps([430,1,4,33,8,5,34,7,35,36,37,3,6,38,44,50,9,10]))),VJ=a.lazy(()=>C(()=>import("./ToolsLetterOfIndemnityPage-DZGVHHqi.js"),__vite__mapDeps([431,1,4,33,8,5,34,7,35,36,37,3,6,38,277,44,50,111,9,10]))),BJ=a.lazy(()=>C(()=>import("./ToolsParallelImportPage-B6tWj9C0.js"),__vite__mapDeps([432,1,4,33,8,5,34,7,35,36,37,3,6,38,111,50,227,55,138,9,10]))),HJ=a.lazy(()=>C(()=>import("./ToolsFreightRateIndexPage-ofvobc4L.js"),__vite__mapDeps([433,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),UJ=a.lazy(()=>C(()=>import("./ToolsCargoReleaseOrderPage-qUAbAydj.js"),__vite__mapDeps([434,1,4,33,8,5,34,7,35,36,37,3,6,38,56,50,44,279,9,10]))),WJ=a.lazy(()=>C(()=>import("./ToolsTransshipmentGuidePage-CfmAxhsc.js"),__vite__mapDeps([435,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),qJ=a.lazy(()=>C(()=>import("./ToolsCustomsValueCalcPage-CvBOoGfI.js"),__vite__mapDeps([436,1,4,33,8,5,34,7,35,36,37,3,6,38,70,76,9,10]))),GJ=a.lazy(()=>C(()=>import("./ToolsContainerLeasingPage-CwH1CLVK.js"),__vite__mapDeps([437,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),KJ=a.lazy(()=>C(()=>import("./ToolsExciseDutyPage-D9uuO9KS.js"),__vite__mapDeps([438,1,33,4,8,5,34,7,35,36,37,3,6,38,70,44,9,10]))),XJ=a.lazy(()=>C(()=>import("./ToolsChinaExportTaxPage-DwCl4fCF.js"),__vite__mapDeps([439,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),YJ=a.lazy(()=>C(()=>import("./ToolsAirVsSeaCalcPage-B-aDa5g4.js"),__vite__mapDeps([440,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),JJ=a.lazy(()=>C(()=>import("./ToolsEuCustomsClearancePage-Dn_vefj2.js"),__vite__mapDeps([441,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),ZJ=a.lazy(()=>C(()=>import("./ToolsPortDwellTimePage-D8OhO3nW.js"),__vite__mapDeps([442,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),QJ=a.lazy(()=>C(()=>import("./ToolsRailwayLogisticsPage-B7FXe-c2.js"),__vite__mapDeps([443,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),eZ=a.lazy(()=>C(()=>import("./ToolsCourierVsFreightPage-BOqwUOnj.js"),__vite__mapDeps([444,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),tZ=a.lazy(()=>C(()=>import("./ToolsIncotermsQuizPage-BSdOH1Sg.js"),__vite__mapDeps([445,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),rZ=a.lazy(()=>C(()=>import("./ToolsFreightPaymentTermsPage-DPWwPb7v.js"),__vite__mapDeps([446,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),nZ=a.lazy(()=>C(()=>import("./ToolsTradeDocPackPage-CElNJchz.js"),__vite__mapDeps([447,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),oZ=a.lazy(()=>C(()=>import("./ToolsEaeuTariffPage-4i60Fh40.js"),__vite__mapDeps([448,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),sZ=a.lazy(()=>C(()=>import("./ToolsColdChainMonitorPage-DOYBJR8p.js"),__vite__mapDeps([449,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),iZ=a.lazy(()=>C(()=>import("./ToolsSupplierAuditPage-NIkLnM2x.js"),__vite__mapDeps([450,1,4,33,8,5,34,7,35,36,37,3,6,38,50,108,276,44,138,360,149,46,95,9,10]))),aZ=a.lazy(()=>C(()=>import("./ToolsLoadPlanPage-C8FYbxoU.js"),__vite__mapDeps([451,1,4,33,8,5,34,7,35,36,37,3,6,38,56,159,88,50,227,109,9,10]))),lZ=a.lazy(()=>C(()=>import("./ToolsContainerFillCalculatorPage-DE-7NnyY.js"),__vite__mapDeps([452,1,4,33,8,5,34,7,35,36,37,3,6,38,284,285,56,39,109,88,181,269,9,10]))),cZ=a.lazy(()=>C(()=>import("./ToolsEcommerceLogisticsPage-BeC5qhvN.js"),__vite__mapDeps([453,1,4,33,8,5,34,7,35,36,37,3,6,38,56,44,50,282,9,10]))),uZ=a.lazy(()=>C(()=>import("./ToolsCertificationPage-D2mltXat.js"),__vite__mapDeps([454,1,4,33,8,5,34,7,35,36,37,3,6,38,111,50,227,149,9,10]))),dZ=a.lazy(()=>C(()=>import("./ToolsFclVsLclPage-DXmOqvJt.js"),__vite__mapDeps([455,1,4,33,8,5,34,7,35,36,37,3,6,38,181,277,149,159,9,10]))),pZ=a.lazy(()=>C(()=>import("./ToolsChinaRegionsPage-6Ym6c7rr.js"),__vite__mapDeps([456,1,4,33,8,5,34,7,35,36,37,3,6,38,360,9,10]))),fZ=a.lazy(()=>C(()=>import("./ToolsTruckFreightCalcPage-BSzYqyJl.js"),__vite__mapDeps([457,1,33,4,8,5,34,7,35,36,37,3,6,38,9,10]))),mZ=a.lazy(()=>C(()=>import("./ToolsPhytosanitaryPage-Dc8AamE-.js"),__vite__mapDeps([458,1,33,4,8,5,34,7,35,36,37,3,6,38,270,9,10]))),hZ=a.lazy(()=>C(()=>import("./ToolsReExportPage-CJ68Tmpf.js"),__vite__mapDeps([459,1,33,4,8,5,34,7,35,36,37,3,6,38,206,9,10]))),gZ=a.lazy(()=>C(()=>import("./ToolsQualityControlPage-CvwnWJOe.js"),__vite__mapDeps([460,1,33,4,8,5,34,7,35,36,37,3,6,38,9,10]))),vZ=a.lazy(()=>C(()=>import("./ToolsGoodsDeclarationPage-ORafJiPf.js"),__vite__mapDeps([461,1,33,4,8,5,34,7,35,36,37,3,6,38,9,10]))),bZ=a.lazy(()=>C(()=>import("./ToolsConsolidationCalcPage-DdmjATEh.js"),__vite__mapDeps([462,1,33,4,8,5,34,7,35,36,37,3,6,38,9,10]))),_Z=a.lazy(()=>C(()=>import("./ToolsBankGuaranteePage-tJMBE-Vt.js"),__vite__mapDeps([463,1,33,4,8,5,34,7,35,36,37,3,6,38,111,9,10]))),yZ=a.lazy(()=>C(()=>import("./ToolsPortFeesCalcPage-aWv91nvY.js"),__vite__mapDeps([464,1,33,4,8,5,34,7,35,36,37,3,6,38,83,9,10]))),xZ=a.lazy(()=>C(()=>import("./ToolsImportQuotaPage-ByynJrBl.js"),__vite__mapDeps([465,1,33,4,8,5,34,7,35,36,37,3,6,38,116,9,10]))),wZ=a.lazy(()=>C(()=>import("./ToolsCarnetAtaPage-CwtBocI0.js"),__vite__mapDeps([466,1,33,4,8,5,34,7,35,36,37,3,6,38,184,9,10]))),EZ=a.lazy(()=>C(()=>import("./ToolsDutyDrawbackPage-DPU-seFj.js"),__vite__mapDeps([467,1,33,4,8,5,34,7,35,36,37,3,6,38,143,9,10]))),SZ=a.lazy(()=>C(()=>import("./ToolsColdStorageCalcPage-BQtC3KeP.js"),__vite__mapDeps([468,1,33,4,8,5,34,7,35,36,37,3,6,38,281,9,10]))),CZ=a.lazy(()=>C(()=>import("./ToolsMarineInsuranceTypesPage-76cchrJ1.js"),__vite__mapDeps([469,1,33,4,8,5,34,7,35,36,37,3,6,38,280,9,10]))),PZ=a.lazy(()=>C(()=>import("./ToolsPalletCalcPage-DHQvdSAw.js"),__vite__mapDeps([470,1,33,4,8,5,34,7,35,36,37,3,6,38,9,10]))),RZ=a.lazy(()=>C(()=>import("./ToolsImportProcedurePage-CP0AVvTU.js"),__vite__mapDeps([471,1,33,4,8,5,34,7,35,36,37,3,6,38,9,10]))),TZ=a.lazy(()=>C(()=>import("./ToolsLinerTermsPage-CSFBNI3h.js"),__vite__mapDeps([472,1,33,4,8,5,34,7,35,36,37,3,6,38,275,9,10]))),IZ=a.lazy(()=>C(()=>import("./ToolsFreightTenderPage-DDExRABZ.js"),__vite__mapDeps([473,1,4,33,8,5,34,7,35,36,37,3,6,38,56,274,276,143,76,44,88,109,50,9,10]))),$Z=a.lazy(()=>C(()=>import("./ToolsCustomsRulingPage-C7z2FWW5.js"),__vite__mapDeps([474,1,33,4,8,5,34,7,35,36,37,3,6,38,9,10]))),AZ=a.lazy(()=>C(()=>import("./ToolsBufferStockPage-BfipmAXq.js"),__vite__mapDeps([475,1,4,33,8,5,34,7,35,36,37,3,6,38,50,9,10]))),jZ=a.lazy(()=>C(()=>import("./ToolsGreenLogisticsPage-_YjGawHG.js"),__vite__mapDeps([476,1,4,33,8,5,34,7,35,36,37,3,6,38,270,316,345,9,10]))),OZ=a.lazy(()=>C(()=>import("./ToolsFreightMarkupPage-CmMEDAKe.js"),__vite__mapDeps([477,1,4,33,8,5,34,7,35,36,37,3,6,38,17,149,159,44,9,10]))),NZ=a.lazy(()=>C(()=>import("./ToolsPortProcedurePage-TvNq1Ajy.js"),__vite__mapDeps([478,1,4,33,8,5,34,7,35,36,37,3,6,38,227,50,9,10]))),DZ=a.lazy(()=>C(()=>import("./ToolsContainerStuffingPage-Bc2ttnTC.js"),__vite__mapDeps([479,1,4,33,8,5,34,7,35,36,37,3,6,38,277,227,50,9,10]))),kZ=a.lazy(()=>C(()=>import("./ToolsCargoRejectionPage-DR-4strA.js"),__vite__mapDeps([480,1,4,33,8,5,34,7,35,36,37,3,6,38,50,227,76,9,10]))),MZ=a.lazy(()=>C(()=>import("./ToolsReverseLogisticsPage-pULxnAF4.js"),__vite__mapDeps([481,1,4,33,8,5,34,7,35,36,37,3,6,38,61,273,149,50,9,10]))),LZ=a.lazy(()=>C(()=>import("./ToolsBookingChecklistPage-BLt2mDaD.js"),__vite__mapDeps([482,1,4,33,8,5,34,7,35,36,37,3,6,38,50,281,206,316,345,9,10]))),zZ=a.lazy(()=>C(()=>import("./ToolsMultimodalDocsPage-CSAol7ec.js"),__vite__mapDeps([483,1,4,33,8,5,34,7,35,36,37,3,6,38,227,9,10]))),FZ=a.lazy(()=>C(()=>import("./ToolsExportFinancePage-CPmNaBRp.js"),__vite__mapDeps([484,1,4,33,8,5,34,7,35,36,37,3,6,38,265,111,159,149,227,50,9,10]))),VZ=a.lazy(()=>C(()=>import("./ToolsComplianceCertPage-CH_deOcO.js"),__vite__mapDeps([485,1,4,33,8,5,34,7,35,36,37,3,6,38,111,238,149,50,9,10]))),BZ=a.lazy(()=>C(()=>import("./ToolsShipperLetterPage-Dde5iz9q.js"),__vite__mapDeps([486,1,4,33,8,5,34,7,35,36,37,3,6,38,50,227,9,10]))),HZ=a.lazy(()=>C(()=>import("./ToolsPreAdvicePage-ChVe5zQo.js"),__vite__mapDeps([487,1,4,33,8,5,34,7,35,36,37,3,6,38,143,111,227,138,50,9,10]))),UZ=a.lazy(()=>C(()=>import("./ToolsCargoSurveyPage-DY5WWzRU.js"),__vite__mapDeps([488,1,4,33,8,5,34,7,35,36,37,3,6,38,119,277,227,50,9,10]))),WZ=a.lazy(()=>C(()=>import("./ToolsDemurrageClaimPage-DYM-DkUh.js"),__vite__mapDeps([489,1,4,33,8,5,34,7,35,36,37,3,6,38,277,111,149,227,50,9,10]))),qZ=a.lazy(()=>C(()=>import("./ToolsPortAgencyPage-BHsEj6p6.js"),__vite__mapDeps([490,1,4,33,8,5,34,7,35,36,37,3,6,38,149,83,227,50,9,10]))),GZ=a.lazy(()=>C(()=>import("./ToolsFreightClaimPage-Cw9t6UCI.js"),__vite__mapDeps([491,1,4,33,8,5,34,7,35,36,37,3,6,38,277,227,149,50,111,9,10]))),KZ=a.lazy(()=>C(()=>import("./ToolsStorageInTransitPage-lXsTLrKN.js"),__vite__mapDeps([492,1,4,33,8,5,34,7,35,36,37,3,6,38,143,227,50,149,9,10]))),XZ=a.lazy(()=>C(()=>import("./ToolsLclBookingPage-ChRdZA92.js"),__vite__mapDeps([493,1,4,33,8,5,34,7,35,36,37,3,6,38,109,88,50,44,9,10]))),YZ=a.lazy(()=>C(()=>import("./ToolsSpecialCargoPage-BMOUzydy.js"),__vite__mapDeps([494,1,4,33,8,5,34,7,35,36,37,3,6,38,50,269,44,9,10]))),JZ=a.lazy(()=>C(()=>import("./ToolsHazardousClassPage-ljZRk_uN.js"),__vite__mapDeps([495,1,4,33,8,5,34,7,35,36,37,3,6,38,44,50,138,9,10]))),ZZ=a.lazy(()=>C(()=>import("./ToolsCargoTempPage-Csw1h2zQ.js"),__vite__mapDeps([496,1,4,33,8,5,34,7,35,36,37,3,6,38,281,50,9,10]))),QZ=a.lazy(()=>C(()=>import("./ToolsInsuranceClaimPage-Cq0uADF3.js"),__vite__mapDeps([497,1,4,33,8,5,34,7,35,36,37,3,6,38,50,44,138,9,10]))),eQ=a.lazy(()=>C(()=>import("./ToolsContainerDamagePage-BlaNX7cf.js"),__vite__mapDeps([498,1,4,33,8,5,34,7,35,36,37,3,6,38,50,44,138,9,10]))),tQ=a.lazy(()=>C(()=>import("./ToolsReeferBookingPage-9WlF3i8Q.js"),__vite__mapDeps([499,1,4,33,8,5,34,7,35,36,37,3,6,38,44,281,50,9,10]))),rQ=a.lazy(()=>C(()=>import("./ToolsTrackTracePage-CS99eHOP.js"),__vite__mapDeps([500,1,4,33,8,5,34,7,35,36,37,3,6,38,44,50,9,10]))),nQ=a.lazy(()=>C(()=>import("./MarketingHomePage-BuEU1eBD.js"),__vite__mapDeps([501,1,8,25,5,4,9,10,134,33,34,7,35,36,37,3,6,38,311,28,29,30,31,32,39,40,181,502,409,415,119,44,111,45,503,504,118,72,116,276,46,505,218]))),oQ=a.lazy(()=>C(()=>import("./PublicFaqPage-DKrVXw9O.js"),__vite__mapDeps([506,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),sQ=a.lazy(()=>C(()=>import("./MarketingCasesPage-BfbO3Mq0.js"),__vite__mapDeps([507,1,4,33,8,5,34,7,35,36,37,3,6,38,508,72,209,44,509,504,9,10]))),iQ=a.lazy(()=>C(()=>import("./MarketingCaseDetailPage-B5x2wqyk.js"),__vite__mapDeps([510,1,4,33,8,5,34,7,35,36,37,3,6,38,508,56,184,509,504,45,44,9,10]))),aQ=a.lazy(()=>C(()=>import("./MarketingReviewsPage-BtAykRne.js"),__vite__mapDeps([511,1,4,33,8,5,34,7,35,36,37,3,6,38,503,134,72,209,504,95,116,9,10]))),lQ=a.lazy(()=>C(()=>import("./MarketingPartnersPage-fGMFxp2Y.js"),__vite__mapDeps([512,1,4,33,8,5,34,7,35,36,37,3,6,38,209,116,513,514,276,46,9,10]))),cQ=a.lazy(()=>C(()=>import("./MarketingTrustPage-Cd2NpCzk.js"),__vite__mapDeps([515,1,4,33,8,5,34,7,35,36,37,3,6,38,116,105,82,46,505,516,276,44,9,10]))),uQ=a.lazy(()=>C(()=>import("./MarketingDocumentsPage-qb5yB33c.js"),__vite__mapDeps([517,1,4,33,8,5,34,7,35,36,37,3,6,38,209,116,65,9,10]))),dQ=a.lazy(()=>C(()=>import("./MarketingCooperationPage-DD-RmoA-.js"),__vite__mapDeps([518,1,4,33,8,5,34,7,35,36,37,3,6,38,519,520,44,513,9,10]))),pQ=a.lazy(()=>C(()=>import("./MarketingJoinPage-BoIplJTD.js"),__vite__mapDeps([521,1,4,33,8,5,34,7,35,36,37,3,6,38,274,514,519,159,520,522,523,9,10]))),fQ=a.lazy(()=>C(()=>import("./MarketingHowItWorksPage-Be2-Xkgx.js"),__vite__mapDeps([524,1,4,33,8,5,34,7,35,36,37,3,6,38,44,218,64,259,278,40,46,9,10]))),mQ=a.lazy(()=>C(()=>import("./MarketingAdvantagesPage-CGwfAC81.js"),__vite__mapDeps([525,1,4,33,8,5,34,7,35,36,37,3,6,38,72,119,82,49,514,519,513,183,70,44,54,9,10]))),hQ=a.lazy(()=>C(()=>import("./MarketingSupportPage-CPnSu75N.js"),__vite__mapDeps([526,1,4,33,8,5,34,7,35,36,37,3,6,38,17,95,94,82,209,44,9,10]))),gQ=a.lazy(()=>C(()=>import("./MarketingCashbackPage-CMxNIzq8.js"),__vite__mapDeps([527,1,4,33,8,5,34,7,35,36,37,3,6,38,509,111,276,186,49,44,159,45,513,9,10]))),vQ=a.lazy(()=>C(()=>import("./MarketingNewsPage-VS2XSyAv.js"),__vite__mapDeps([528,1,4,33,8,5,34,7,35,36,37,3,6,38,522,75,209,159,9,10]))),bQ=a.lazy(()=>C(()=>import("./MarketingAdditionalServicesPage-CjD-Mmfp.js"),__vite__mapDeps([529,1,4,33,8,5,34,7,35,36,37,3,6,38,516,84,409,44,9,10]))),_Q=a.lazy(()=>C(()=>import("./SolutionsIndexPage-CCVrK368.js"),__vite__mapDeps([530,1,4,33,8,5,34,7,35,36,37,3,6,38,218,514,9,10]))),yQ=a.lazy(()=>C(()=>import("./SolutionsImporterPage-bjnU0808.js"),__vite__mapDeps([531,1,532,4,33,8,5,34,7,35,36,37,3,6,38,409,65,44,49,514,39,216,9,10]))),xQ=a.lazy(()=>C(()=>import("./SolutionsExporterPage-BBd2t8W1.js"),__vite__mapDeps([533,1,532,4,33,8,5,34,7,35,36,37,3,6,38,409,65,44,46,184,513,278,9,10]))),wQ=a.lazy(()=>C(()=>import("./SolutionsForwarderPage-DWknNgBF.js"),__vite__mapDeps([534,1,532,4,33,8,5,34,7,35,36,37,3,6,38,409,65,44,519,513,9,10]))),EQ=a.lazy(()=>C(()=>import("./SolutionsCarrierPage-CD6aay1-.js"),__vite__mapDeps([535,1,532,4,33,8,5,34,7,35,36,37,3,6,38,409,65,44,536,183,64,537,259,9,10]))),SQ=a.lazy(()=>C(()=>import("./MarineServicePage-BtQeTRmj.js"),__vite__mapDeps([538,1,539,4,33,8,5,34,7,35,36,37,3,6,38,44,46,39,49,83,540,9,10]))),CQ=a.lazy(()=>C(()=>import("./RailwayServicePage-CgtO0yuH.js"),__vite__mapDeps([541,1,539,4,33,8,5,34,7,35,36,37,3,6,38,44,40,540,49,542,39,9,10]))),PQ=a.lazy(()=>C(()=>import("./AutoServicePage-DW_RCNTH.js"),__vite__mapDeps([543,1,539,4,33,8,5,34,7,35,36,37,3,6,38,44,540,39,46,131,9,10]))),RQ=a.lazy(()=>C(()=>import("./AirServicePage-CY9v6RPR.js"),__vite__mapDeps([544,1,539,4,33,8,5,34,7,35,36,37,3,6,38,44,540,49,545,45,9,10]))),TQ=a.lazy(()=>C(()=>import("./GroupageServicePage-DTerBt9t.js"),__vite__mapDeps([546,1,539,4,33,8,5,34,7,35,36,37,3,6,38,44,84,514,75,39,542,9,10]))),IQ=a.lazy(()=>C(()=>import("./MultimodalServicePage-4tWJIttv.js"),__vite__mapDeps([547,1,539,4,33,8,5,34,7,35,36,37,3,6,38,44,183,536,49,542,120,9,10]))),$Q=a.lazy(()=>C(()=>import("./CustomsServicePage-BCPLj0PN.js"),__vite__mapDeps([548,1,539,4,33,8,5,34,7,35,36,37,3,6,38,44,184,259,216,9,10]))),AQ=a.lazy(()=>C(()=>import("./ContainerRentalServicePage-C1Ez1KY0.js"),__vite__mapDeps([549,1,539,4,33,8,5,34,7,35,36,37,3,6,38,44,181,75,49,271,9,10]))),jQ=a.lazy(()=>C(()=>import("./AboutCompanyPage-ll5hic7G.js"),__vite__mapDeps([550,1,4,33,8,5,34,7,35,36,37,3,6,38,504,45,536,46,9,10]))),OQ=a.lazy(()=>C(()=>import("./ContactsPageDS-B-toHPrB.js"),__vite__mapDeps([551,1,4,33,8,5,34,7,35,36,37,3,6,38,540,46,44,94,9,10]))),NQ=a.lazy(()=>C(()=>import("./VacanciesPage-PyKjUpyn.js"),__vite__mapDeps([552,1,4,33,8,5,34,7,35,36,37,3,6,38,279,523,45,9,10]))),DQ=a.lazy(()=>C(()=>import("./PrivacyPolicyPage-BoEZTnwd.js"),__vite__mapDeps([553,1,4,33,8,5,34,7,35,36,37,3,6,38,9,10]))),kQ=a.lazy(()=>C(()=>import("./RoutePairLandingPage-BcAs16YN.js"),__vite__mapDeps([554,1,8,4,42,33,5,34,7,35,36,37,3,6,38,25,9,10,540,83,40]))),MQ=a.lazy(()=>C(()=>import("./IndustryLandingPage-Db5zhIYI.js"),__vite__mapDeps([555,1,415,36,33,4,8,5,34,7,35,37,3,6,38,269,242,545,502,409,64,46,537,90,39,532,65,44,9,10]))),LQ=a.lazy(()=>C(()=>import("./CompetitorLandingPage-C_nFS0gT.js"),__vite__mapDeps([556,1,4,33,8,5,34,7,35,36,37,3,6,38,44,138,9,10]))),zQ=a.lazy(()=>C(()=>import("./DostavkaIndexPage-CdS-xoxn.js"),__vite__mapDeps([557,1,4,33,8,5,34,7,35,36,37,3,6,38,558,46,9,10]))),FQ=a.lazy(()=>C(()=>import("./DostavkaCountryPage-BnDiv6KU.js"),__vite__mapDeps([559,1,4,33,8,5,34,7,35,36,37,3,6,38,558,17,46,44,9,10]))),VQ=a.lazy(()=>C(()=>import("./DostavkaCityPage-zBsXxv2t.js"),__vite__mapDeps([560,1,4,33,8,5,34,7,35,36,37,3,6,38,558,17,226,46,44,9,10]))),BQ=a.lazy(()=>C(()=>import("./MarketingNotFoundPage-LmhLR5B6.js"),__vite__mapDeps([561,1,4,33,8,5,34,7,35,36,37,3,6,38,536,9,10]))),HQ=a.lazy(()=>C(()=>import("./ResourcesHubPage-BkeVJzwd.js"),__vite__mapDeps([562,1,4,33,8,5,34,7,35,36,37,3,6,38,563,564,45,274,159,409,9,10]))),UQ=a.lazy(()=>C(()=>import("./GlossaryPage-BqAjC8PJ.js"),__vite__mapDeps([565,1,4,33,8,5,34,7,35,36,37,3,6,38,249,564,9,10]))),WQ=a.lazy(()=>C(()=>import("./GuidesIndexPage-BTps7ZwS.js"),__vite__mapDeps([566,1,4,33,8,5,34,7,35,36,37,3,6,38,563,75,9,10]))),qQ=a.lazy(()=>C(()=>import("./CustomsChina2026-DJH4P9hN.js"),__vite__mapDeps([567,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),GQ=a.lazy(()=>C(()=>import("./IncotermsPlain-DzPTbVRs.js"),__vite__mapDeps([569,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),KQ=a.lazy(()=>C(()=>import("./HowToReadBL-iNLI1-V8.js"),__vite__mapDeps([570,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),XQ=a.lazy(()=>C(()=>import("./ReduceLogisticsCosts-C4FYJpd-.js"),__vite__mapDeps([571,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),YQ=a.lazy(()=>C(()=>import("./VttGuide-YrMF78Gw.js"),__vite__mapDeps([572,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),JQ=a.lazy(()=>C(()=>import("./ChinaContractGuide-B1psFMCL.js"),__vite__mapDeps([573,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),ZQ=a.lazy(()=>C(()=>import("./DemurrageDetentionGuide-CRlbm8ez.js"),__vite__mapDeps([574,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),QQ=a.lazy(()=>C(()=>import("./FclVsLclGuide-BVE4ULw9.js"),__vite__mapDeps([575,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),eee=a.lazy(()=>C(()=>import("./AirCargoGuide-Bg_jQZG8.js"),__vite__mapDeps([576,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),tee=a.lazy(()=>C(()=>import("./CustomsDutiesGuide-BxSU08pg.js"),__vite__mapDeps([577,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),ree=a.lazy(()=>C(()=>import("./RailFreightGuide-LS1ubEsp.js"),__vite__mapDeps([578,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),nee=a.lazy(()=>C(()=>import("./CargoInsuranceGuide-CfSE27rr.js"),__vite__mapDeps([579,1,568,4,33,8,5,34,7,35,36,37,3,6,38,75,56,563,9,10]))),oee=a.lazy(()=>C(()=>import("./MarketingResetPasswordPage-VU4sm2i1.js"),__vite__mapDeps([580,1,66,4,5,44,119,8,9,10]))),see=a.lazy(()=>C(()=>import("./VerifyEmailPage-DnvvJiq7.js"),__vite__mapDeps([581,1,582,583,8,5,4,9,10]))),iee=a.lazy(()=>C(()=>import("./ConfirmEmailChangePage-CyAEdGQr.js"),__vite__mapDeps([584,1,582,583,8,5,4,9,10]))),aee=a.lazy(()=>C(()=>import("./AdminGuard-Baxtx83_.js"),__vite__mapDeps([585,1,4,42,8,5,9,10]))),lee=a.lazy(()=>C(()=>import("./AdminLayout-BZUaAgic.js"),__vite__mapDeps([586,1,4,587,5,588,158,589,590,591,234,50,196,100,36,75,72,238,38,278,37,276,209,592,159,35,206,94,110,8,9,10,593]))),cee=a.lazy(()=>C(()=>import("./PublicTrackingPage-CQGRB1Cm.js"),__vite__mapDeps([594,1,595,9,596,597,169,168,176,598,599,600,175,8,5,4,10]))),uee=a.lazy(()=>C(()=>import("./PublicContainerTrackingPage-Bz6PJD3_.js"),__vite__mapDeps([601,1,4,42,33,8,5,34,7,35,36,37,3,6,38,311,312,56,82,50,77,65,73,76,9,10]))),dee=a.lazy(()=>C(()=>import("./AdminOverviewPage-DWye0cie.js"),__vite__mapDeps([602,1,157,4,113,8,114,115,96,116,117,118,42,158,603,5,604,166,236,206,70,9,10]))),pee=a.lazy(()=>C(()=>import("./AdminMultiTenantPage-DDLTXHp6.js"),__vite__mapDeps([605,1,4,42,113,8,114,115,96,116,117,118,5,206,70,9,10]))),fee=a.lazy(()=>C(()=>import("./AdminWbrPage-D2mIL-Hc.js"),__vite__mapDeps([606,1,4,42,5,206,70,8,9,10]))),mee=a.lazy(()=>C(()=>import("./AdminTrackingPage-C1KZLsZ8.js"),__vite__mapDeps([607,1,4,42,113,8,114,115,96,116,117,118,5,34,206,70,9,10]))),hee=a.lazy(()=>C(()=>import("./AdminOkrQuartersPage-sPJ9yjFo.js"),__vite__mapDeps([608,1,609,4,42,5,206,88,70,8,9,10]))),gee=a.lazy(()=>C(()=>import("./AdminOkrQuarterDetailPage-YY8hbTAE.js"),__vite__mapDeps([610,1,609,4,42,5,70,56,88,8,9,10]))),vee=a.lazy(()=>C(()=>import("./AdminPostmortemsListPage-BMyWtqpE.js"),__vite__mapDeps([611,1,612,4,113,8,114,115,96,116,117,118,5,206,70,9,10]))),bee=a.lazy(()=>C(()=>import("./AdminPostmortemDetailPage-WleXS7vQ.js"),__vite__mapDeps([613,1,612,4,42,5,70,56,88,8,9,10]))),sx=a.lazy(()=>C(()=>import("./AdminCompany360Page-DkYNT0_M.js"),__vite__mapDeps([614,1,4,42,5,38,70,56,8,9,10]))),_ee=a.lazy(()=>C(()=>import("./AdminUnknownCitiesPage-BCfEWAqU.js"),__vite__mapDeps([615,1,4,113,8,114,115,96,116,117,118,157,616,5,9,10]))),yee=a.lazy(()=>C(()=>import("./AdminCitiesPage-CaHx1iaD.js"),__vite__mapDeps([617,1,4,113,8,114,115,96,116,117,118,616,5,70,9,10]))),xee=a.lazy(()=>C(()=>import("./AdminSupplierActionsPage-De4k5T_C.js"),__vite__mapDeps([618,1,4,113,8,114,115,96,116,117,118,619,5,70,9,10]))),wee=a.lazy(()=>C(()=>import("./AdminPricingProfilesPage-B19I6-8z.js"),__vite__mapDeps([620,1,4,113,8,114,115,96,116,117,118,621,5,70,9,10]))),Eee=a.lazy(()=>C(()=>import("./AdminInternationalAutoPage-COZkcmd1.js"),__vite__mapDeps([622,1,4,124,5,75,113,8,114,115,96,116,117,118,70,88,9,10]))),See=a.lazy(()=>C(()=>import("./AdminInvoicesPage-DlEkU1uc.js"),__vite__mapDeps([623,1,4,124,5,75,113,8,114,115,96,116,117,118,624,625,86,626,166,627,42,70,37,71,9,10]))),Cee=a.lazy(()=>C(()=>import("./AdminContractsPage-CqS0noW9.js"),__vite__mapDeps([628,1,4,124,5,75,42,113,8,114,115,96,116,117,118,624,626,166,627,70,71,9,10]))),Pee=a.lazy(()=>C(()=>import("./AdminUsersPage-gWN2Jsjj.js"),__vite__mapDeps([629,1,4,113,8,114,115,96,116,117,118,621,42,5,70,111,50,9,10]))),Ree=a.lazy(()=>C(()=>import("./AdminCompanyInvitationsPage-BdyRJeNy.js"),__vite__mapDeps([630,1,4,113,8,114,115,96,116,117,118,5,70,9,10]))),Tee=a.lazy(()=>C(()=>import("./AdminOrdersPage-DXCQltaN.js"),__vite__mapDeps([631,1,4,113,8,114,115,96,116,117,118,588,587,589,603,632,633,624,166,598,9,168,175,5,626,72,70,10]))),Iee=a.lazy(()=>C(()=>import("./AdminBookmarksPage-4SRKQszx.js"),__vite__mapDeps([634,1,4,113,8,114,115,96,116,117,118,588,166,5,9,10]))),$ee=a.lazy(()=>C(()=>import("./AdminRemindersPage-DcpFhYAh.js"),__vite__mapDeps([635,1,4,113,8,114,115,96,116,117,118,589,166,5,70,9,10]))),Aee=a.lazy(()=>C(()=>import("./AdminTagsPage-BvKhJVef.js"),__vite__mapDeps([636,1,4,113,8,114,115,96,116,117,118,603,166,5,9,10]))),jee=a.lazy(()=>C(()=>import("./AdminOrderDetailPage-CqPzbp2b.js").then(e=>e.A),__vite__mapDeps([637,8,1,4,42,588,98,632,166,205,175,168,9,171,172,173,174,169,587,5,598,192,167,638,595,625,70,72,589,603,76,206,73,242,50,113,114,115,96,116,117,118,44,100,119,109,639,640]))),Oee=a.lazy(()=>C(()=>import("./AdminNotificationsPage-CoYhIFwN.js"),__vite__mapDeps([641,1,4,113,8,114,115,96,116,117,118,624,166,626,5,71,206,9,10]))),Nee=a.lazy(()=>C(()=>import("./AdminAmoCrmPage-CvEzNY0c.js"),__vite__mapDeps([642,1,4,42,113,8,114,115,96,116,117,118,166,5,89,206,88,44,76,9,10]))),Dee=a.lazy(()=>C(()=>import("./AdminMarketingPage-m9Abo0KJ.js"),__vite__mapDeps([643,1,4,42,166,5,70,100,71,8,9,10]))),kee=a.lazy(()=>C(()=>import("./AdminAnalyticsPage-Bu-ns3RT.js"),__vite__mapDeps([644,1,124,4,5,75,42,113,8,114,115,96,116,117,118,604,166,209,206,70,9,10]))),Mee=a.lazy(()=>C(()=>import("./AdminActivationFunnelPage-C7XukuZ0.js"),__vite__mapDeps([645,1,124,4,5,75,42,113,8,114,115,96,116,117,118,604,166,592,206,70,9,10]))),Lee=a.lazy(()=>C(()=>import("./AdminDcsaPage-B81qvNZ_.js"),__vite__mapDeps([646,1,4,42,113,8,114,115,96,116,117,118,166,5,206,70,44,76,138,119,9,10]))),zee=a.lazy(()=>C(()=>import("./AdminRevenueAnalyticsPage-BpbaEHNL.js"),__vite__mapDeps([647,1,4,124,5,75,42,113,8,114,115,96,116,117,118,604,166,149,206,70,9,10]))),Fee=a.lazy(()=>C(()=>import("./AdminStuckApplicationsPage-Bpwy6YZo.js"),__vite__mapDeps([648,1,4,113,8,114,115,96,116,117,118,590,587,166,5,206,592,202,70,9,10]))),Vee=a.lazy(()=>C(()=>import("./AdminExceptionsInboxPage-BC3d7Q_a.js"),__vite__mapDeps([649,1,4,113,8,114,115,96,116,117,118,591,166,5,65,82,44,100,206,70,9,10]))),Bee=a.lazy(()=>C(()=>import("./AdminTelegramPage-jumgQT2j.js"),__vite__mapDeps([650,1,4,42,5,8,9,10]))),Hee=a.lazy(()=>C(()=>import("./AdminApiKeysPage-DkqIDqII.js"),__vite__mapDeps([651,1,4,113,8,114,115,96,116,117,118,166,5,206,70,9,10]))),Uee=a.lazy(()=>C(()=>import("./AdminSupplierScorecardPage-DQMLlFq4.js"),__vite__mapDeps([652,1,4,113,8,114,115,96,116,117,118,166,5,70,72,9,10]))),Wee=a.lazy(()=>C(()=>import("./AdminTariffsChangesPage-DUC7AksF.js"),__vite__mapDeps([653,1,4,113,8,114,115,96,116,117,118,624,626,166,5,206,70,9,10]))),qee=a.lazy(()=>C(()=>import("./AdminExternalSchedulesPage-DVP_TeT1.js"),__vite__mapDeps([654,1,4,166,5,206,8,9,10]))),Gee=a.lazy(()=>C(()=>import("./AdminReconciliationPage-DihSecNX.js"),__vite__mapDeps([655,1,4,42,113,8,114,115,96,116,117,118,5,44,70,100,9,10]))),Kee=a.lazy(()=>C(()=>import("./SupplierGuard-LV-Tj7yZ.js"),__vite__mapDeps([656,1,4,42,8,5,9,10]))),Xee=a.lazy(()=>C(()=>import("./SupplierLayout-DmMBigES.js"),__vite__mapDeps([657,1,196,5,8,4,9,10,658]))),Yee=a.lazy(()=>C(()=>import("./SupplierProfilePage-DBGAlAiX.js"),__vite__mapDeps([659,1,4,42,660,5,70,8,9,10]))),Jee=a.lazy(()=>C(()=>import("./SupplierDashboardPage-BX9S3leh.js"),__vite__mapDeps([661,1,4,42,660,166,5,72,70,50,8,9,10]))),Ni=a.lazy(()=>C(()=>import("./SupplierRoutesPage-DJqhxdel.js"),__vite__mapDeps([662,1,124,4,5,75,113,8,114,115,96,116,117,118,633,58,663,166,100,70,50,29,119,40,9,10]))),wl=a.lazy(()=>C(()=>import("./SupplierResourcePage-FUUZrh2b.js"),__vite__mapDeps([664,1,124,4,5,75,113,8,114,115,96,116,117,118,663,633,166,100,70,50,9,10]))),Zee=a.lazy(()=>C(()=>import("./SupplierAnalyticsPage-XJ_2Cbpp.js"),__vite__mapDeps([665,1,4,113,8,114,115,96,116,117,118,166,5,70,9,10]))),Qee=a.lazy(()=>C(()=>import("./SupplierAuditPage-3sff1zGH.js"),__vite__mapDeps([666,1,4,113,8,114,115,96,116,117,118,619,5,70,9,10]))),ete=a.lazy(()=>C(()=>import("./SupplierTeamPage-BsRy5fn4.js"),__vite__mapDeps([667,1,4,113,8,114,115,96,116,117,118,668,166,5,70,9,10]))),tte=a.lazy(()=>C(()=>import("./SupplierInvoicesPage-C5safEEg.js"),__vite__mapDeps([669,1,4,124,5,75,113,8,114,115,96,116,117,118,639,625,37,71,70,9,10]))),rte=a.lazy(()=>C(()=>import("./SupplierContractsPage-DrWVarU8.js"),__vite__mapDeps([670,1,4,124,5,75,113,8,114,115,96,116,117,118,70,100,9,10]))),nte=a.lazy(()=>C(()=>import("./SupplierNotificationsPage-D33EzlbL.js"),__vite__mapDeps([671,1,4,127,8,42,70,128,211,44,106,94,6,5,9,10]))),ote=a.lazy(()=>C(()=>import("./SupplierBlackoutsPage-C-eetEv7.js"),__vite__mapDeps([672,1,124,4,5,75,113,8,114,115,96,116,117,118,166,9,10]))),ste=a.lazy(()=>C(()=>import("./AcceptInvitationPage--75VYLsJ.js"),__vite__mapDeps([673,1,668,166,598,9,168,175,174,8,5,4,10]))),ite=a.lazy(()=>C(()=>import("./About-BnnAt3nZ.js"),__vite__mapDeps([674,1,5,675]))),ate=a.lazy(()=>C(()=>import("./Blog-C8NysNC5.js"),__vite__mapDeps([14,1,15,16,17,5,2,3,4,6,7,8,9,10,18]))),lte=a.lazy(()=>C(()=>import("./BlogPost-DKMz1wMy.js"),__vite__mapDeps([676,1,15,16]))),cte=a.lazy(()=>C(()=>import("./index-Bh7wc1El.js"),__vite__mapDeps([677,1,17,5,2,3,4,6,7,8,9,10,678]))),ute=a.lazy(()=>C(()=>import("./SearchResultsPage-BXFPz_Rr.js"),__vite__mapDeps([679,8,1,17,165,4,29,59,166,30,5,167,9,168,169,170,58,60,85,599,62,174,80,638,10,680]))),dte=a.lazy(()=>C(()=>import("./AboutCompany-BIlK04LY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),pte=a.lazy(()=>C(()=>import("./AdminExchangeStatsPage-DzRsizBE.js"),__vite__mapDeps([681,1,4,124,5,75,42,113,8,114,115,96,116,117,118,70,9,10]))),fte=a.lazy(()=>C(()=>import("./AdminChatModerationPage-BCvSgLBU.js"),__vite__mapDeps([682,1,4,124,5,75,42,113,8,114,115,96,116,117,118,70,9,10]))),mte=a.lazy(()=>C(()=>import("./AdminCalendarPage-8-dJ6voR.js"),__vite__mapDeps([683,1,4,42,624,166,5,70,8,9,10]))),hte={enabled:!0,active:!1,validUntil:null,defaultValidityDays:3},gte=5e3,vte=()=>c.jsx("div",{className:"route-loading",children:c.jsx("img",{src:"/loading-loader.gif",alt:"Загрузка..."})}),bte=(e,t)=>Promise.race([e,new Promise((r,n)=>setTimeout(()=>n(new Error(`Timeout after ${t}ms`)),t))]);function _te(){const{pathname:e}=Fr();return e.startsWith("/admin")||e.startsWith("/supplier")?null:c.jsx(a.Suspense,{fallback:null,children:c.jsx(hK,{})})}function yte(){const{isManager:e,isAdmin:t,isSuperAdmin:r}=_1();return e&&!t&&!r?c.jsx(Ut,{to:"/admin/agenda",replace:!0}):c.jsx(dee,{})}function xte(){const{id:e}=Km(),{search:t,hash:r}=Fr();return c.jsx(Ut,{to:`/order/${e??""}${t}${r}`,replace:!0})}function wte({to:e}){const{search:t,hash:r}=Fr();return c.jsx(Ut,{to:`${e}${t}${r}`,replace:!0})}function Ete(){const{applicationNumber:e}=Km(),{search:t}=Fr();return new URLSearchParams(t).has("token")?c.jsx(cee,{}):c.jsx(uee,{query:e??""})}function Ste(){const[e,t]=a.useState(null),[r,n]=a.useState(!0);return a.useEffect(()=>{Tz()},[]),a.useEffect(()=>{(async()=>{try{const s=await bte(yG.getStatus(),gte);t(s)}catch{t(hte)}finally{n(!1)}})()},[]),r?c.jsx("div",{className:"lease-black-screen"}):e!=null&&e.enabled&&!e.active?c.jsx("div",{className:"lease-black-screen"}):c.jsx(mK,{children:c.jsx(_G,{children:c.jsx(jL,{children:c.jsx(vG,{children:c.jsxs(B$,{children:[c.jsx(EG,{}),c.jsx(O7,{}),c.jsx(Zq,{}),c.jsx(N7,{}),c.jsx(_te,{}),c.jsx(a.Suspense,{fallback:c.jsx(vte,{}),children:c.jsxs(H$,{children:[c.jsxs(E,{element:c.jsx(Zz,{}),children:[c.jsx(E,{path:"/search-results",element:c.jsx(ute,{})}),c.jsx(E,{path:"/tracking/:applicationNumber",element:c.jsx(Ete,{})}),c.jsx(E,{path:"/track/:token",element:c.jsx(uX,{})}),c.jsx(E,{path:"/supplier-portal/:token",element:c.jsx(dX,{})}),c.jsx(E,{path:"/ktk",element:c.jsx(Ut,{to:"/?tab=ktk",replace:!0})}),c.jsx(E,{path:"/Profile",element:c.jsx(nm,{label:"Route:Profile",children:c.jsx(gK,{})})}),c.jsx(E,{path:"/reset-password",element:c.jsx(oee,{})}),c.jsx(E,{path:"/verify-email",element:c.jsx(see,{})}),c.jsx(E,{path:"/confirm-email-change",element:c.jsx(iee,{})}),c.jsx(E,{path:"/accept-invitation",element:c.jsx(ste,{})}),c.jsx(E,{path:"/Dashboard",element:c.jsx(wte,{to:"/lk"})}),c.jsx(E,{path:"/order-details/:id",element:c.jsx(xte,{})}),c.jsx(E,{path:"/about",element:c.jsx(Ut,{to:"/about-company",replace:!0})}),c.jsx(E,{path:"/o-kompanii",element:c.jsx(dte,{})}),c.jsx(E,{path:"/Main",element:c.jsx(ite,{})}),c.jsx(E,{path:"/railway",element:c.jsx(Ut,{to:"/services/railway",replace:!0})}),c.jsx(E,{path:"/marineservice",element:c.jsx(Ut,{to:"/services/marine",replace:!0})}),c.jsx(E,{path:"/autotransport",element:c.jsx(Ut,{to:"/services/auto",replace:!0})}),c.jsx(E,{path:"/airtransportations",element:c.jsx(Ut,{to:"/services/air",replace:!0})}),c.jsx(E,{path:"/groupagecargo",element:c.jsx(Ut,{to:"/services/groupage",replace:!0})}),c.jsx(E,{path:"/multimodal",element:c.jsx(Ut,{to:"/services/multimodal",replace:!0})}),c.jsx(E,{path:"/customsservices",element:c.jsx(Ut,{to:"/services/customs",replace:!0})}),c.jsx(E,{path:"/containerrental",element:c.jsx(Ut,{to:"/services/container-rental",replace:!0})}),c.jsx(E,{path:"/successstories",element:c.jsx(cte,{})}),c.jsx(E,{path:"/blog",element:c.jsx(ate,{})}),c.jsx(E,{path:"/blog/:id",element:c.jsx(nm,{label:"Route:BlogPost",children:c.jsx(lte,{})})})]}),c.jsxs(E,{path:"/admin",element:c.jsx(aee,{children:c.jsx(lee,{})}),children:[c.jsx(E,{index:!0,element:c.jsx(yte,{})}),c.jsx(E,{path:"wbr",element:c.jsx(fee,{})}),c.jsx(E,{path:"multi-tenant",element:c.jsx(pee,{})}),c.jsx(E,{path:"tracking",element:c.jsx(mee,{})}),c.jsx(E,{path:"okr",element:c.jsx(hee,{})}),c.jsx(E,{path:"okr/quarters/:id",element:c.jsx(gee,{})}),c.jsx(E,{path:"postmortems",element:c.jsx(vee,{})}),c.jsx(E,{path:"postmortems/:id",element:c.jsx(bee,{})}),c.jsx(E,{path:"cities",element:c.jsx(yee,{})}),c.jsx(E,{path:"unknown-cities",element:c.jsx(_ee,{})}),c.jsx(E,{path:"supplier-actions",element:c.jsx(xee,{})}),c.jsx(E,{path:"pricing-profiles",element:c.jsx(wee,{})}),c.jsx(E,{path:"international-auto",element:c.jsx(Eee,{})}),c.jsx(E,{path:"invoices",element:c.jsx(See,{})}),c.jsx(E,{path:"contracts",element:c.jsx(Cee,{})}),c.jsx(E,{path:"users",element:c.jsx(Pee,{})}),c.jsx(E,{path:"companies/:companyId/invitations",element:c.jsx(Ree,{})}),c.jsx(E,{path:"companies",element:c.jsx(sx,{})}),c.jsx(E,{path:"companies/:id",element:c.jsx(sx,{})}),c.jsx(E,{path:"orders",element:c.jsx(Tee,{})}),c.jsx(E,{path:"orders/:id",element:c.jsx(jee,{})}),c.jsx(E,{path:"bookmarks",element:c.jsx(Iee,{})}),c.jsx(E,{path:"reminders",element:c.jsx($ee,{})}),c.jsx(E,{path:"tags",element:c.jsx(Aee,{})}),c.jsx(E,{path:"notifications",element:c.jsx(Oee,{})}),c.jsx(E,{path:"amocrm",element:c.jsx(Nee,{})}),c.jsx(E,{path:"marketing",element:c.jsx(Dee,{})}),c.jsx(E,{path:"analytics",element:c.jsx(kee,{})}),c.jsx(E,{path:"analytics/revenue",element:c.jsx(zee,{})}),c.jsx(E,{path:"activation",element:c.jsx(Mee,{})}),c.jsx(E,{path:"dcsa",element:c.jsx(Lee,{})}),c.jsx(E,{path:"applications/stuck",element:c.jsx(Fee,{})}),c.jsx(E,{path:"exceptions",element:c.jsx(Vee,{})}),c.jsx(E,{path:"telegram",element:c.jsx(Bee,{})}),c.jsx(E,{path:"api-keys",element:c.jsx(Hee,{})}),c.jsx(E,{path:"tariffs/changes",element:c.jsx(Wee,{})}),c.jsx(E,{path:"external-schedules",element:c.jsx(qee,{})}),c.jsx(E,{path:"supplier-scorecard",element:c.jsx(Uee,{})}),c.jsx(E,{path:"exchange-stats",element:c.jsx(pte,{})}),c.jsx(E,{path:"exchange-chat-moderation",element:c.jsx(fte,{})}),c.jsx(E,{path:"calendar",element:c.jsx(mte,{})}),c.jsx(E,{path:"reconciliation",element:c.jsx(Gee,{})})]}),c.jsxs(E,{path:"/supplier",element:c.jsx(Kee,{children:c.jsx(Xee,{})}),children:[c.jsx(E,{index:!0,element:c.jsx(Jee,{})}),c.jsx(E,{path:"profile",element:c.jsx(Yee,{})}),c.jsx(E,{path:"routes/sea",element:c.jsx(Ni,{kind:"SEA",title:"Морские тарифы"})}),c.jsx(E,{path:"routes/auto",element:c.jsx(Ni,{kind:"AUTO",title:"Автомобильные тарифы"})}),c.jsx(E,{path:"routes/railway",element:c.jsx(Ni,{kind:"RAILWAY",title:"Железнодорожные тарифы"})}),c.jsx(E,{path:"routes/air",element:c.jsx(Ni,{kind:"AIR",title:"Авиа тарифы"})}),c.jsx(E,{path:"routes/local",element:c.jsx(Ni,{kind:"LOCAL",title:"Локальная доставка (door-to-door сегменты)"})}),c.jsx(E,{path:"schedules",element:c.jsx(wl,{path:"schedules",title:"Расписания (Schedules)",info:"Рейсы и расписания судов. POL/POD по портам, dateFrom/dateTo — окно действия.",fields:[{key:"pol",label:"POL",inTable:!0,required:!0,placeholder:"Shanghai"},{key:"pod",label:"POD",inTable:!0,required:!0,placeholder:"Vladivostok"},{key:"dateFrom",label:"Дата с",inTable:!0,width:120,type:"date"},{key:"dateTo",label:"Дата по",inTable:!0,width:120,type:"date"},{key:"nameOfTheVessel",label:"Судно",inTable:!0,placeholder:"MAERSK SEMARANG"},{key:"eqpt",label:"Equipment",placeholder:"40HC"},{key:"teuSpace",label:"TEU space",placeholder:"50"},{key:"routeLimit",label:"Route limit (текст)"}]})}),c.jsx(E,{path:"drop-offs",element:c.jsx(wl,{path:"drop-offs",title:"Drop-off",info:"Условия сдачи контейнера на портах. Prices — Map<CargoSize, RUB>.",fields:[{key:"portFrom",label:"Порт отправления",inTable:!0,required:!0,placeholder:"Shanghai"},{key:"portTo",label:"Порт назначения",inTable:!0,required:!0,placeholder:"Vladivostok"},{key:"validFrom",label:"С",inTable:!0,width:120,type:"date"},{key:"validTo",label:"До",inTable:!0,width:120,type:"date"},{key:"currency",label:"Валюта",type:"select",options:["RUB","USD","EUR","CNY"]},{key:"prices",label:"Цены (JSON)",type:"json",placeholder:'{"FILO20": 5000, "FILO40": 7500}'}]})}),c.jsx(E,{path:"rents",element:c.jsx(wl,{path:"rents",title:"Аренда контейнеров",info:"Стоимость аренды по маршрутам. Тот же формат что Drop-off — Map<CargoSize, RUB>.",fields:[{key:"portFrom",label:"Порт отправления",inTable:!0,required:!0,placeholder:"Shanghai"},{key:"portTo",label:"Порт назначения",inTable:!0,required:!0,placeholder:"Vladivostok"},{key:"validFrom",label:"С",inTable:!0,width:120,type:"date"},{key:"validTo",label:"До",inTable:!0,width:120,type:"date"},{key:"currency",label:"Валюта",type:"select",options:["RUB","USD","EUR","CNY"]},{key:"prices",label:"Цены (JSON)",type:"json",placeholder:'{"FILO20": 5000, "FILO40": 7500}'}]})}),c.jsx(E,{path:"additional-services",element:c.jsx(wl,{path:"additional-services",title:"Дополнительные услуги",info:"Сервисы поставщика: оформление документов, страхование, supercharges и т.п.",importResource:"ADDITIONAL_SERVICE",fields:[{key:"name",label:"Название",inTable:!0,required:!0,placeholder:"BAF surcharge"},{key:"prices",label:"Цены (JSON)",type:"json",placeholder:'{"FILO20": 50, "FILO40": 80}'}]})}),c.jsx(E,{path:"analytics",element:c.jsx(Zee,{})}),c.jsx(E,{path:"audit",element:c.jsx(Qee,{})}),c.jsx(E,{path:"team",element:c.jsx(ete,{})}),c.jsx(E,{path:"invoices",element:c.jsx(tte,{})}),c.jsx(E,{path:"contracts",element:c.jsx(rte,{})}),c.jsx(E,{path:"notifications",element:c.jsx(nte,{})}),c.jsx(E,{path:"blackouts",element:c.jsx(ote,{})})]}),c.jsx(E,{path:"/design-system",element:c.jsx(vK,{})}),c.jsx(E,{path:"/",element:c.jsx(nQ,{})}),c.jsx(E,{path:"/services",element:c.jsx(bK,{})}),c.jsx(E,{path:"/pricing",element:c.jsx(_K,{})}),c.jsx(E,{path:"/docs/webhooks",element:c.jsx(yK,{})}),c.jsx(E,{path:"/portal/webhooks",element:c.jsx(xK,{})}),c.jsx(E,{path:"/accept-invite",element:c.jsx(wK,{})}),c.jsx(E,{path:"/lk",element:c.jsx(PK,{})}),c.jsx(E,{path:"/lk/calc",element:c.jsx(H_,{children:c.jsx(RK,{})})}),c.jsx(E,{path:"/lk/applications",element:c.jsx(nx,{})}),c.jsx(E,{path:"/lk/contracts",element:c.jsx(nx,{mode:"contracts"})}),c.jsx(E,{path:"/lk/applications/:id",element:c.jsx(TK,{})}),c.jsx(E,{path:"/lk/documents",element:c.jsx(IK,{})}),c.jsx(E,{path:"/lk/saved-calcs",element:c.jsx(jK,{})}),c.jsx(E,{path:"/lk/notifications",element:c.jsx($K,{})}),c.jsx(E,{path:"/lk/team",element:c.jsx(AK,{})}),c.jsx(E,{path:"/lk/calendar",element:c.jsx(NK,{})}),c.jsx(E,{path:"/lk/shipments",element:c.jsx(OK,{})}),c.jsx(E,{path:"/lk/shipments/:id/tracker",element:c.jsx(MK,{})}),c.jsx(E,{path:"/lk/shipments/:id",element:c.jsx(DK,{})}),c.jsx(E,{path:"/lk/customs",element:c.jsx(H_,{children:c.jsx(kK,{})})}),c.jsx(E,{path:"/lk/help",element:c.jsx(LK,{})}),c.jsx(E,{path:"/lk/referral",element:c.jsx(VK,{})}),c.jsx(E,{path:"/lk/partner",element:c.jsx(Ut,{to:"/portal",replace:!0})}),c.jsx(E,{path:"/lk/sales/fast-quote",element:c.jsx(zK,{})}),c.jsx(E,{path:"/lk/sales/leads",element:c.jsx(FK,{})}),c.jsx(E,{path:"/lk/admin/customers",element:c.jsx(HK,{})}),c.jsx(E,{path:"/lk/insurance/claim",element:c.jsx(ox,{})}),c.jsx(E,{path:"/lk/claims/new",element:c.jsx(ox,{})}),c.jsx(E,{path:"/lk/contract",element:c.jsx(qK,{})}),c.jsx(E,{path:"/calculator/multi-origin",element:c.jsx(iX,{})}),c.jsx(E,{path:"/m/calculator",element:c.jsx(_t,{to:"/calculator/multi-origin"})}),c.jsx(E,{path:"/portal/shipments/:id",element:c.jsx(EK,{})}),c.jsx(E,{path:"/portal/shipments",element:c.jsx(SK,{})}),c.jsx(E,{path:"/portal",element:c.jsx(CK,{})}),c.jsx(E,{path:"/plans",element:c.jsx(aX,{})}),c.jsx(E,{path:"/login",element:c.jsx(lX,{})}),c.jsx(E,{path:"/signup/legal-entity",element:c.jsx(cX,{})}),c.jsx(E,{path:"/tools",element:c.jsx(pX,{})}),c.jsx(E,{path:"/tools/incoterms",element:c.jsx(fX,{})}),c.jsx(E,{path:"/tools/co2",element:c.jsx(mX,{})}),c.jsx(E,{path:"/tools/ports",element:c.jsx(hX,{})}),c.jsx(E,{path:"/tools/distance",element:c.jsx(gX,{})}),c.jsx(E,{path:"/tools/cbm",element:c.jsx(vX,{})}),c.jsx(E,{path:"/tools/packing-list",element:c.jsx(_X,{})}),c.jsx(E,{path:"/tools/container",element:c.jsx(yX,{})}),c.jsx(E,{path:"/tools/hs-code",element:c.jsx(xX,{})}),c.jsx(E,{path:"/tools/customs-calc",element:c.jsx(wX,{})}),c.jsx(E,{path:"/tools/currency",element:c.jsx(EX,{})}),c.jsx(E,{path:"/tools/docs-check",element:c.jsx(SX,{})}),c.jsx(E,{path:"/tools/schedule",element:c.jsx(CX,{})}),c.jsx(E,{path:"/tools/freight-rates",element:c.jsx(PX,{})}),c.jsx(E,{path:"/tools/freight-index",element:c.jsx(RX,{})}),c.jsx(E,{path:"/tools/landed-cost",element:c.jsx(TX,{})}),c.jsx(E,{path:"/tools/comparison",element:c.jsx(IX,{})}),c.jsx(E,{path:"/tools/china-calendar",element:c.jsx($X,{})}),c.jsx(E,{path:"/tools/pre-shipment",element:c.jsx(AX,{})}),c.jsx(E,{path:"/tools/demurrage",element:c.jsx(jX,{})}),c.jsx(E,{path:"/tools/payment-terms",element:c.jsx(OX,{})}),c.jsx(E,{path:"/tools/insurance",element:c.jsx(NX,{})}),c.jsx(E,{path:"/tools/lead-time",element:c.jsx(DX,{})}),c.jsx(E,{path:"/tools/tracking",element:c.jsx(kX,{})}),c.jsx(E,{path:"/tools/converter",element:c.jsx(MX,{})}),c.jsx(E,{path:"/tools/forwarder",element:c.jsx(LX,{})}),c.jsx(E,{path:"/tools/packaging",element:c.jsx(zX,{})}),c.jsx(E,{path:"/tools/dangerous-goods",element:c.jsx(FX,{})}),c.jsx(E,{path:"/tools/glossary",element:c.jsx(VX,{})}),c.jsx(E,{path:"/tools/warehouse",element:c.jsx(BX,{})}),c.jsx(E,{path:"/tools/timeline",element:c.jsx(HX,{})}),c.jsx(E,{path:"/tools/trade-finance",element:c.jsx(UX,{})}),c.jsx(E,{path:"/tools/cargo-standards",element:c.jsx(WX,{})}),c.jsx(E,{path:"/tools/export-docs",element:c.jsx(qX,{})}),c.jsx(E,{path:"/tools/surcharges",element:c.jsx(GX,{})}),c.jsx(E,{path:"/tools/russia-ports",element:c.jsx(KX,{})}),c.jsx(E,{path:"/tools/supplier-check",element:c.jsx(XX,{})}),c.jsx(E,{path:"/tools/anti-dumping",element:c.jsx(YX,{})}),c.jsx(E,{path:"/tools/vat-refund",element:c.jsx(JX,{})}),c.jsx(E,{path:"/tools/trade-lanes",element:c.jsx(ZX,{})}),c.jsx(E,{path:"/tools/kpi",element:c.jsx(QX,{})}),c.jsx(E,{path:"/tools/customs-broker",element:c.jsx(eY,{})}),c.jsx(E,{path:"/tools/exchange-risk",element:c.jsx(tY,{})}),c.jsx(E,{path:"/tools/port-congestion",element:c.jsx(rY,{})}),c.jsx(E,{path:"/tools/cargo-claims",element:c.jsx(nY,{})}),c.jsx(E,{path:"/tools/chemical-reg",element:c.jsx(oY,{})}),c.jsx(E,{path:"/tools/load-plan",element:c.jsx(aZ,{})}),c.jsx(E,{path:"/tools/container-fill-calculator",element:c.jsx(lZ,{})}),c.jsx(E,{path:"/tools/ecommerce-logistics",element:c.jsx(cZ,{})}),c.jsx(E,{path:"/tools/certification",element:c.jsx(uZ,{})}),c.jsx(E,{path:"/tools/fcl-vs-lcl",element:c.jsx(dZ,{})}),c.jsx(E,{path:"/tools/china-regions",element:c.jsx(pZ,{})}),c.jsx(E,{path:"/tools/air-freight",element:c.jsx(bX,{})}),c.jsx(E,{path:"/tools/seasonality",element:c.jsx(sY,{})}),c.jsx(E,{path:"/tools/transit-time",element:c.jsx(iY,{})}),c.jsx(E,{path:"/tools/freight-cost",element:c.jsx(aY,{})}),c.jsx(E,{path:"/tools/export-control",element:c.jsx(lY,{})}),c.jsx(E,{path:"/tools/cargo-insurance-calc",element:c.jsx(cY,{})}),c.jsx(E,{path:"/tools/russia-regions",element:c.jsx(uY,{})}),c.jsx(E,{path:"/tools/container-types",element:c.jsx(dY,{})}),c.jsx(E,{path:"/tools/bill-of-lading",element:c.jsx(pY,{})}),c.jsx(E,{path:"/tools/weight-dimensions",element:c.jsx(fY,{})}),c.jsx(E,{path:"/tools/multimodal",element:c.jsx(mY,{})}),c.jsx(E,{path:"/tools/letter-of-credit",element:c.jsx(hY,{})}),c.jsx(E,{path:"/tools/free-zones",element:c.jsx(gY,{})}),c.jsx(E,{path:"/tools/cold-chain",element:c.jsx(vY,{})}),c.jsx(E,{path:"/tools/cargo-readiness",element:c.jsx(bY,{})}),c.jsx(E,{path:"/tools/tariff-schedule",element:c.jsx(_Y,{})}),c.jsx(E,{path:"/tools/supply-chain-risk",element:c.jsx(yY,{})}),c.jsx(E,{path:"/tools/freight-negotiation",element:c.jsx(xY,{})}),c.jsx(E,{path:"/tools/warehouse-calc",element:c.jsx(wY,{})}),c.jsx(E,{path:"/tools/origin-cert",element:c.jsx(EY,{})}),c.jsx(E,{path:"/tools/import-license",element:c.jsx(SY,{})}),c.jsx(E,{path:"/tools/shipment-tracker",element:c.jsx(CY,{})}),c.jsx(E,{path:"/tools/china-supplier",element:c.jsx(PY,{})}),c.jsx(E,{path:"/tools/trade-compliance",element:c.jsx(RY,{})}),c.jsx(E,{path:"/tools/customs-broker-calc",element:c.jsx(TY,{})}),c.jsx(E,{path:"/tools/ecommerce-import",element:c.jsx(IY,{})}),c.jsx(E,{path:"/tools/forwarder-guide",element:c.jsx($Y,{})}),c.jsx(E,{path:"/tools/incoterms-calc",element:c.jsx(AY,{})}),c.jsx(E,{path:"/tools/packaging-req",element:c.jsx(jY,{})}),c.jsx(E,{path:"/tools/railway-freight",element:c.jsx(OY,{})}),c.jsx(E,{path:"/tools/lc-calc",element:c.jsx(NY,{})}),c.jsx(E,{path:"/tools/carbon-footprint",element:c.jsx(DY,{})}),c.jsx(E,{path:"/tools/air-cargo-guide",element:c.jsx(kY,{})}),c.jsx(E,{path:"/tools/china-holidays",element:c.jsx(MY,{})}),c.jsx(E,{path:"/tools/port-storage",element:c.jsx(LY,{})}),c.jsx(E,{path:"/tools/container-sizes",element:c.jsx(zY,{})}),c.jsx(E,{path:"/tools/import-documents",element:c.jsx(FY,{})}),c.jsx(E,{path:"/tools/logistics-cost",element:c.jsx(VY,{})}),c.jsx(E,{path:"/tools/shipping-terms",element:c.jsx(BY,{})}),c.jsx(E,{path:"/tools/supply-chain-finance",element:c.jsx(HY,{})}),c.jsx(E,{path:"/tools/chinese-suppliers",element:c.jsx(UY,{})}),c.jsx(E,{path:"/tools/railway-calc",element:c.jsx(WY,{})}),c.jsx(E,{path:"/tools/multimodal-compare",element:c.jsx(qY,{})}),c.jsx(E,{path:"/tools/warranty-claims",element:c.jsx(GY,{})}),c.jsx(E,{path:"/tools/export-documents",element:c.jsx(KY,{})}),c.jsx(E,{path:"/tools/china-payments",element:c.jsx(XY,{})}),c.jsx(E,{path:"/tools/loading-norms",element:c.jsx(YY,{})}),c.jsx(E,{path:"/tools/hazmat-guide",element:c.jsx(JY,{})}),c.jsx(E,{path:"/tools/free-trade-zones",element:c.jsx(ZY,{})}),c.jsx(E,{path:"/tools/shipment-visibility",element:c.jsx(QY,{})}),c.jsx(E,{path:"/tools/importer-insurance",element:c.jsx(eJ,{})}),c.jsx(E,{path:"/tools/currency-hedging",element:c.jsx(tJ,{})}),c.jsx(E,{path:"/tools/honest-sign",element:c.jsx(rJ,{})}),c.jsx(E,{path:"/tools/lcl-calculator",element:c.jsx(nJ,{})}),c.jsx(E,{path:"/tools/carrier-compare",element:c.jsx(oJ,{})}),c.jsx(E,{path:"/tools/eaeu-rules",element:c.jsx(sJ,{})}),c.jsx(E,{path:"/tools/hs-code-wizard",element:c.jsx(iJ,{})}),c.jsx(E,{path:"/tools/inventory-planning",element:c.jsx(aJ,{})}),c.jsx(E,{path:"/tools/route-optimization",element:c.jsx(lJ,{})}),c.jsx(E,{path:"/tools/freight-audit",element:c.jsx(cJ,{})}),c.jsx(E,{path:"/tools/bol-guide",element:c.jsx(uJ,{})}),c.jsx(E,{path:"/tools/customs-bond",element:c.jsx(dJ,{})}),c.jsx(E,{path:"/tools/cert-of-origin",element:c.jsx(pJ,{})}),c.jsx(E,{path:"/tools/import-vat",element:c.jsx(fJ,{})}),c.jsx(E,{path:"/tools/lithium-battery",element:c.jsx(mJ,{})}),c.jsx(E,{path:"/tools/ispm15",element:c.jsx(hJ,{})}),c.jsx(E,{path:"/tools/phyto-cert",element:c.jsx(gJ,{})}),c.jsx(E,{path:"/tools/temperature-cargo",element:c.jsx(vJ,{})}),c.jsx(E,{path:"/tools/oversize-cargo",element:c.jsx(bJ,{})}),c.jsx(E,{path:"/tools/trade-finance-calc",element:c.jsx(_J,{})}),c.jsx(E,{path:"/tools/break-bulk",element:c.jsx(yJ,{})}),c.jsx(E,{path:"/tools/sanctions-check",element:c.jsx(xJ,{})}),c.jsx(E,{path:"/tools/export-license",element:c.jsx(wJ,{})}),c.jsx(E,{path:"/tools/fumigation",element:c.jsx(EJ,{})}),c.jsx(E,{path:"/tools/container-inspection",element:c.jsx(SJ,{})}),c.jsx(E,{path:"/tools/roro-guide",element:c.jsx(CJ,{})}),c.jsx(E,{path:"/tools/vgm-calc",element:c.jsx(PJ,{})}),c.jsx(E,{path:"/tools/bonded-warehouse",element:c.jsx(RJ,{})}),c.jsx(E,{path:"/tools/air-waybill",element:c.jsx(TJ,{})}),c.jsx(E,{path:"/tools/invoice-template",element:c.jsx(IJ,{})}),c.jsx(E,{path:"/tools/shipping-instructions",element:c.jsx($J,{})}),c.jsx(E,{path:"/tools/trucking-calc",element:c.jsx(AJ,{})}),c.jsx(E,{path:"/tools/supply-chain-kpi",element:c.jsx(jJ,{})}),c.jsx(E,{path:"/tools/sea-freight-checklist",element:c.jsx(OJ,{})}),c.jsx(E,{path:"/tools/spot-rate",element:c.jsx(NJ,{})}),c.jsx(E,{path:"/tools/po-management",element:c.jsx(DJ,{})}),c.jsx(E,{path:"/tools/charter-party",element:c.jsx(kJ,{})}),c.jsx(E,{path:"/tools/single-window",element:c.jsx(MJ,{})}),c.jsx(E,{path:"/tools/ddp-ddu-calc",element:c.jsx(LJ,{})}),c.jsx(E,{path:"/tools/cbam-guide",element:c.jsx(zJ,{})}),c.jsx(E,{path:"/tools/import-quotas",element:c.jsx(FJ,{})}),c.jsx(E,{path:"/tools/letter-of-indemnity",element:c.jsx(VJ,{})}),c.jsx(E,{path:"/tools/parallel-import",element:c.jsx(BJ,{})}),c.jsx(E,{path:"/tools/freight-rate-index",element:c.jsx(HJ,{})}),c.jsx(E,{path:"/tools/cargo-release-order",element:c.jsx(UJ,{})}),c.jsx(E,{path:"/tools/transshipment-guide",element:c.jsx(WJ,{})}),c.jsx(E,{path:"/tools/customs-value-calc",element:c.jsx(qJ,{})}),c.jsx(E,{path:"/tools/container-leasing",element:c.jsx(GJ,{})}),c.jsx(E,{path:"/tools/excise-duty",element:c.jsx(KJ,{})}),c.jsx(E,{path:"/tools/china-export-tax",element:c.jsx(XJ,{})}),c.jsx(E,{path:"/tools/air-vs-sea-calc",element:c.jsx(YJ,{})}),c.jsx(E,{path:"/tools/eu-customs-clearance",element:c.jsx(JJ,{})}),c.jsx(E,{path:"/tools/port-dwell-time",element:c.jsx(ZJ,{})}),c.jsx(E,{path:"/tools/railway-logistics",element:c.jsx(QJ,{})}),c.jsx(E,{path:"/tools/courier-vs-freight",element:c.jsx(eZ,{})}),c.jsx(E,{path:"/tools/incoterms-quiz",element:c.jsx(tZ,{})}),c.jsx(E,{path:"/tools/freight-payment-terms",element:c.jsx(rZ,{})}),c.jsx(E,{path:"/tools/trade-doc-pack",element:c.jsx(nZ,{})}),c.jsx(E,{path:"/tools/eaeu-tariff",element:c.jsx(oZ,{})}),c.jsx(E,{path:"/tools/cold-chain-monitor",element:c.jsx(sZ,{})}),c.jsx(E,{path:"/tools/supplier-audit",element:c.jsx(iZ,{})}),c.jsx(E,{path:"/tools/truck-freight-calc",element:c.jsx(fZ,{})}),c.jsx(E,{path:"/tools/phytosanitary",element:c.jsx(mZ,{})}),c.jsx(E,{path:"/tools/re-export",element:c.jsx(hZ,{})}),c.jsx(E,{path:"/tools/quality-control",element:c.jsx(gZ,{})}),c.jsx(E,{path:"/tools/goods-declaration",element:c.jsx(vZ,{})}),c.jsx(E,{path:"/tools/consolidation-calc",element:c.jsx(bZ,{})}),c.jsx(E,{path:"/tools/bank-guarantee",element:c.jsx(_Z,{})}),c.jsx(E,{path:"/tools/port-fees-calc",element:c.jsx(yZ,{})}),c.jsx(E,{path:"/tools/import-quota",element:c.jsx(xZ,{})}),c.jsx(E,{path:"/tools/carnet-ata",element:c.jsx(wZ,{})}),c.jsx(E,{path:"/tools/duty-drawback",element:c.jsx(EZ,{})}),c.jsx(E,{path:"/tools/cold-storage-calc",element:c.jsx(SZ,{})}),c.jsx(E,{path:"/tools/marine-insurance-types",element:c.jsx(CZ,{})}),c.jsx(E,{path:"/tools/pallet-calc",element:c.jsx(PZ,{})}),c.jsx(E,{path:"/tools/import-procedure",element:c.jsx(RZ,{})}),c.jsx(E,{path:"/tools/liner-terms",element:c.jsx(TZ,{})}),c.jsx(E,{path:"/tools/freight-tender",element:c.jsx(IZ,{})}),c.jsx(E,{path:"/tools/customs-ruling",element:c.jsx($Z,{})}),c.jsx(E,{path:"/tools/buffer-stock",element:c.jsx(AZ,{})}),c.jsx(E,{path:"/tools/green-logistics",element:c.jsx(jZ,{})}),c.jsx(E,{path:"/tools/freight-markup",element:c.jsx(OZ,{})}),c.jsx(E,{path:"/tools/port-procedure",element:c.jsx(NZ,{})}),c.jsx(E,{path:"/tools/container-stuffing",element:c.jsx(DZ,{})}),c.jsx(E,{path:"/tools/cargo-rejection",element:c.jsx(kZ,{})}),c.jsx(E,{path:"/tools/reverse-logistics",element:c.jsx(MZ,{})}),c.jsx(E,{path:"/tools/booking-checklist",element:c.jsx(LZ,{})}),c.jsx(E,{path:"/tools/multimodal-docs",element:c.jsx(zZ,{})}),c.jsx(E,{path:"/tools/export-finance",element:c.jsx(FZ,{})}),c.jsx(E,{path:"/tools/compliance-cert",element:c.jsx(VZ,{})}),c.jsx(E,{path:"/tools/shipper-letter",element:c.jsx(BZ,{})}),c.jsx(E,{path:"/tools/pre-advice",element:c.jsx(HZ,{})}),c.jsx(E,{path:"/tools/cargo-survey",element:c.jsx(UZ,{})}),c.jsx(E,{path:"/tools/demurrage-claim",element:c.jsx(WZ,{})}),c.jsx(E,{path:"/tools/port-agency",element:c.jsx(qZ,{})}),c.jsx(E,{path:"/tools/freight-claim",element:c.jsx(GZ,{})}),c.jsx(E,{path:"/tools/storage-in-transit",element:c.jsx(KZ,{})}),c.jsx(E,{path:"/tools/lcl-booking",element:c.jsx(XZ,{})}),c.jsx(E,{path:"/tools/special-cargo",element:c.jsx(YZ,{})}),c.jsx(E,{path:"/tools/hazardous-class",element:c.jsx(JZ,{})}),c.jsx(E,{path:"/tools/cargo-temp",element:c.jsx(ZZ,{})}),c.jsx(E,{path:"/tools/insurance-claim",element:c.jsx(QZ,{})}),c.jsx(E,{path:"/tools/container-damage",element:c.jsx(eQ,{})}),c.jsx(E,{path:"/tools/reefer-booking",element:c.jsx(tQ,{})}),c.jsx(E,{path:"/tools/track-trace",element:c.jsx(rQ,{})}),c.jsx(E,{path:"/faq",element:c.jsx(oQ,{})}),fK(),c.jsx(E,{path:"/solutions",element:c.jsx(_Q,{})}),c.jsx(E,{path:"/solutions/importer",element:c.jsx(yQ,{})}),c.jsx(E,{path:"/solutions/exporter",element:c.jsx(xQ,{})}),c.jsx(E,{path:"/solutions/forwarder",element:c.jsx(wQ,{})}),c.jsx(E,{path:"/solutions/carrier",element:c.jsx(EQ,{})}),c.jsx(E,{path:"/cases",element:c.jsx(sQ,{})}),c.jsx(E,{path:"/cases/:slug",element:c.jsx(iQ,{})}),c.jsx(E,{path:"/reviews",element:c.jsx(aQ,{})}),c.jsx(E,{path:"/partners",element:c.jsx(lQ,{})}),c.jsx(E,{path:"/trust",element:c.jsx(cQ,{})}),c.jsx(E,{path:"/documents",element:c.jsx(uQ,{})}),c.jsx(E,{path:"/cooperation",element:c.jsx(dQ,{})}),c.jsx(E,{path:"/join",element:c.jsx(pQ,{})}),c.jsx(E,{path:"/how-it-works",element:c.jsx(fQ,{})}),c.jsx(E,{path:"/advantages",element:c.jsx(mQ,{})}),c.jsx(E,{path:"/support",element:c.jsx(hQ,{})}),c.jsx(E,{path:"/referral-program",element:c.jsx(BK,{})}),c.jsx(E,{path:"/help",element:c.jsx(UK,{})}),c.jsx(E,{path:"/help/article/:id",element:c.jsx(WK,{})}),c.jsx(E,{path:"/research",element:c.jsx(GK,{})}),c.jsx(E,{path:"/research/smb-import-cost-index-q2-2026",element:c.jsx(KK,{})}),c.jsx(E,{path:"/en/faq",element:c.jsx(XK,{})}),c.jsx(E,{path:"/en/faq/:slug",element:c.jsx(YK,{})}),c.jsx(E,{path:"/en/glossary",element:c.jsx(JK,{})}),c.jsx(E,{path:"/en/glossary/:slug",element:c.jsx(ZK,{})}),c.jsx(E,{path:"/en/blog",element:c.jsx(QK,{})}),c.jsx(E,{path:"/en/blog/:slug",element:c.jsx(eX,{})}),c.jsx(E,{path:"/en/about",element:c.jsx(tX,{})}),c.jsx(E,{path:"/en/services",element:c.jsx(rX,{})}),c.jsx(E,{path:"/landing/yd/freight-china",element:c.jsx(nX,{})}),c.jsx(E,{path:"/landing/yd/customs-broker",element:c.jsx(oX,{})}),c.jsx(E,{path:"/landing/yd/smb-import",element:c.jsx(sX,{})}),c.jsx(E,{path:"/cashback",element:c.jsx(gQ,{})}),c.jsx(E,{path:"/news",element:c.jsx(vQ,{})}),c.jsx(E,{path:"/additional-services",element:c.jsx(bQ,{})}),c.jsx(E,{path:"/services/marine",element:c.jsx(SQ,{})}),c.jsx(E,{path:"/services/railway",element:c.jsx(CQ,{})}),c.jsx(E,{path:"/services/auto",element:c.jsx(PQ,{})}),c.jsx(E,{path:"/services/air",element:c.jsx(RQ,{})}),c.jsx(E,{path:"/services/groupage",element:c.jsx(TQ,{})}),c.jsx(E,{path:"/services/multimodal",element:c.jsx(IQ,{})}),c.jsx(E,{path:"/services/customs",element:c.jsx($Q,{})}),c.jsx(E,{path:"/services/container-rental",element:c.jsx(AQ,{})}),c.jsx(E,{path:"/about-company",element:c.jsx(jQ,{})}),c.jsx(E,{path:"/contacts",element:c.jsx(OQ,{})}),c.jsx(E,{path:"/vacancies",element:c.jsx(NQ,{})}),c.jsx(E,{path:"/privacy-policy",element:c.jsx(DQ,{})}),c.jsx(E,{path:"/marshrut/:slug",element:c.jsx(kQ,{})}),c.jsx(E,{path:"/industry/:slug",element:c.jsx(MQ,{})}),c.jsx(E,{path:"/vs/:slug",element:c.jsx(LQ,{})}),c.jsx(E,{path:"/dostavka",element:c.jsx(zQ,{})}),c.jsx(E,{path:"/dostavka/:country",element:c.jsx(FQ,{})}),c.jsx(E,{path:"/dostavka/:country/:city",element:c.jsx(VQ,{})}),c.jsx(E,{path:"/resources",element:c.jsx(HQ,{})}),c.jsx(E,{path:"/resources/glossary",element:c.jsx(UQ,{})}),c.jsx(E,{path:"/resources/guides",element:c.jsx(WQ,{})}),c.jsx(E,{path:"/resources/guides/customs-china-2026",element:c.jsx(qQ,{})}),c.jsx(E,{path:"/resources/guides/incoterms-plain",element:c.jsx(GQ,{})}),c.jsx(E,{path:"/resources/guides/how-to-read-bl",element:c.jsx(KQ,{})}),c.jsx(E,{path:"/resources/guides/reduce-logistics-costs",element:c.jsx(XQ,{})}),c.jsx(E,{path:"/resources/guides/vtt-guide",element:c.jsx(YQ,{})}),c.jsx(E,{path:"/resources/guides/china-contract-guide",element:c.jsx(JQ,{})}),c.jsx(E,{path:"/resources/guides/demurrage-detention-guide",element:c.jsx(ZQ,{})}),c.jsx(E,{path:"/resources/guides/fcl-vs-lcl-guide",element:c.jsx(QQ,{})}),c.jsx(E,{path:"/resources/guides/air-cargo-guide",element:c.jsx(eee,{})}),c.jsx(E,{path:"/resources/guides/customs-duties-guide",element:c.jsx(tee,{})}),c.jsx(E,{path:"/resources/guides/rail-freight-guide",element:c.jsx(ree,{})}),c.jsx(E,{path:"/resources/guides/cargo-insurance-guide",element:c.jsx(nee,{})}),c.jsx(E,{path:"*",element:c.jsx(BQ,{})})]})})]})})})})})}const x$=new $$({defaultOptions:{queries:{staleTime:6e4,gcTime:5*6e4,retry:1,refetchOnWindowFocus:!1},mutations:{retry:0}}}),Cte=Object.freeze(Object.defineProperty({__proto__:null,queryClient:x$},Symbol.toStringTag,{value:"Module"})),rv="avalog.cookieConsent",nd=1;function rne(){if(typeof window>"u")return"unknown";try{const e=localStorage.getItem(rv);if(!e)return"unknown";const t=JSON.parse(e);return t.version!==nd?"unknown":t.decision}catch{return"unknown"}}function Pte(){if(typeof window>"u")return null;try{const e=localStorage.getItem(rv);if(!e)return null;const t=JSON.parse(e);return t.version!==nd?null:t}catch{return null}}function Rte(){const e=Pte();return(e==null?void 0:e.decision)==="accepted"&&e.analytics===!0}function nne(e={}){const t={version:nd,decision:"accepted",decidedAt:new Date().toISOString(),analytics:e.analytics??!0,marketing:e.marketing??!0,functional:!0};return w$(t),t}function one(){const e={version:nd,decision:"rejected",decidedAt:new Date().toISOString(),analytics:!1,marketing:!1,functional:!0};return w$(e),e}function w$(e){if(!(typeof window>"u"))try{localStorage.setItem(rv,JSON.stringify(e))}catch{}}let E$=-1;const gi=e=>{addEventListener("pageshow",t=>{t.persisted&&(E$=t.timeStamp,e(t))},!0)},En=(e,t,r,n)=>{let o,s;return i=>{t.value>=0&&(i||n)&&(s=t.value-(o??0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=((l,u)=>l>u[1]?"poor":l>u[0]?"needs-improvement":"good")(t.value,r),e(t)))}},nv=e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},ov=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},qa=()=>{var e;return((e=ov())==null?void 0:e.activationStart)??0},Sn=(e,t=-1)=>{const r=ov();let n="navigate";return E$>=0?n="back-forward-cache":r&&(document.prerendering||qa()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},Cp=new WeakMap;function sv(e,t){return Cp.get(e)||Cp.set(e,new t),Cp.get(e)}class Tte{constructor(){Ct(this,"t");Ct(this,"i",0);Ct(this,"o",[])}h(t){var o;if(t.hadRecentInput)return;const r=this.o[0],n=this.o.at(-1);this.i&&r&&n&&t.startTime-n.startTime<1e3&&t.startTime-r.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),(o=this.t)==null||o.call(this,t)}}const Ga=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const n=new PerformanceObserver(o=>{queueMicrotask(()=>{t(o.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}},iv=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Os=-1;const S$=new Set,ix=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,Hm=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of S$)t();isFinite(Os)||(Os=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",Hm,!0))}},od=()=>{var e;if(Os<0){const t=qa();Os=(document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").find(n=>n.name==="hidden"&&n.startTime>=t))==null?void 0:e.startTime)??ix(),addEventListener("visibilitychange",Hm,!0),addEventListener("prerenderingchange",Hm,!0),gi(()=>{setTimeout(()=>{Os=ix()})})}return{get firstHiddenTime(){return Os},onHidden(t){S$.add(t)}}},sd=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},ax=[1800,3e3],C$=(e,t={})=>{sd(()=>{const r=od();let n,o=Sn("FCP");const s=Ga("paint",i=>{for(const l of i)l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<r.firstHiddenTime&&(o.value=Math.max(l.startTime-qa(),0),o.entries.push(l),n(!0)))});s&&(n=En(e,o,ax,t.reportAllChanges),gi(i=>{o=Sn("FCP"),n=En(e,o,ax,t.reportAllChanges),nv(()=>{o.value=performance.now()-i.timeStamp,n(!0)})}))})},lx=[.1,.25],Ite=(e,t={})=>{const r=od();C$(iv(()=>{let n,o=Sn("CLS",0);const s=sv(t,Tte),i=u=>{for(const d of u)s.h(d);s.i>o.value&&(o.value=s.i,o.entries=s.o,n())},l=Ga("layout-shift",i);l&&(n=En(e,o,lx,t.reportAllChanges),r.onHidden(()=>{i(l.takeRecords()),n(!0)}),gi(()=>{s.i=0,o=Sn("CLS",0),n=En(e,o,lx,t.reportAllChanges),nv(n)}),setTimeout(n))}))};let P$=0,Pp=1/0,El=0;const $te=e=>{for(const t of e)t.interactionId&&(Pp=Math.min(Pp,t.interactionId),El=Math.max(El,t.interactionId),P$=El?(El-Pp)/7+1:0)};let Um;const cx=()=>Um?P$:performance.interactionCount??0,Ate=()=>{"interactionCount"in performance||Um||(Um=Ga("event",$te,{durationThreshold:0}))};let ux=0;class jte{constructor(){Ct(this,"l",[]);Ct(this,"u",new Map);Ct(this,"m");Ct(this,"p")}v(){ux=cx(),this.l.length=0,this.u.clear()}T(){const t=Math.min(this.l.length-1,Math.floor((cx()-ux)/50));return this.l[t]}h(t){var o,s;if((o=this.m)==null||o.call(this,t),!t.interactionId&&t.entryType!=="first-input")return;const r=this.l.at(-1);let n=this.u.get(t.interactionId);if(n||this.l.length<10||t.duration>r.L){if(n?t.duration>n.L?(n.entries=[t],n.L=t.duration):t.duration===n.L&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],L:t.duration},this.u.set(n.id,n),this.l.push(n)),this.l.sort((i,l)=>l.L-i.L),this.l.length>10){const i=this.l.splice(10);for(const l of i)this.u.delete(l.id)}(s=this.p)==null||s.call(this,n)}}}const R$=e=>{const t=globalThis.requestIdleCallback||setTimeout,r=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState==="hidden")e();else{const n=iv(e);let o=-1;const s=()=>{r(o),n()};addEventListener("visibilitychange",s,{once:!0,capture:!0}),o=t(()=>{removeEventListener("visibilitychange",s,{capture:!0}),n()})}},dx=[200,500],Ote=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const r=od();sd(()=>{Ate();let n,o=Sn("INP");const s=sv(t,jte),i=u=>{R$(()=>{for(const p of u)s.h(p);const d=s.T();d&&d.L!==o.value&&(o.value=d.L,o.entries=d.entries,n())})},l=Ga("event",i,{durationThreshold:t.durationThreshold??40});n=En(e,o,dx,t.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),r.onHidden(()=>{i(l.takeRecords()),n(!0)}),gi(()=>{s.v(),o=Sn("INP"),n=En(e,o,dx,t.reportAllChanges)}))})};class Nte{constructor(){Ct(this,"m")}h(t){var r;(r=this.m)==null||r.call(this,t)}}const px=[2500,4e3],Dte=(e,t={})=>{sd(()=>{const r=od();let n,o=Sn("LCP");const s=sv(t,Nte),i=u=>{t.reportAllChanges||(u=u.slice(-1));for(const d of u)s.h(d),d.startTime<r.firstHiddenTime&&(o.value=Math.max(d.startTime-qa(),0),o.entries=[d],n())},l=Ga("largest-contentful-paint",i);if(l){n=En(e,o,px,t.reportAllChanges);const u=iv(()=>{i(l.takeRecords()),l.disconnect(),n(!0)}),d=p=>{p.isTrusted&&(R$(u),removeEventListener(p.type,d,{capture:!0}))};for(const p of["keydown","click","visibilitychange"])addEventListener(p,d,{capture:!0});gi(p=>{o=Sn("LCP"),n=En(e,o,px,t.reportAllChanges),nv(()=>{o.value=performance.now()-p.timeStamp,n(!0)})})}})},fx=[800,1800],Wm=e=>{document.prerendering?sd(()=>Wm(e)):document.readyState!=="complete"?addEventListener("load",()=>Wm(e),!0):setTimeout(e)},kte=(e,t={})=>{let r=Sn("TTFB"),n=En(e,r,fx,t.reportAllChanges);Wm(()=>{const o=ov();o&&(r.value=Math.max(o.responseStart-qa(),0),r.entries=[o],n(!0),gi(()=>{r=Sn("TTFB",0),n=En(e,r,fx,t.reportAllChanges),n(!0)}))})};function Mte(){return typeof EA=="function"}function Di(e){const{name:t,value:r,rating:n,id:o,navigationType:s}=e,i=Math.round(r),l=n??"needs-improvement";Mte()&&wA(`web-vital ${t} ${l}`,{level:l==="poor"?"warning":"info",tags:{web_vital:t,rating:l,navigation_type:s},contexts:{web_vitals:{metric:t,value:i,rating:l,id:o,navigationType:s}}})}let mx=!1;function Lte(){mx||(mx=!0,Dte(Di),Ite(Di),Ote(Di),C$(Di),kte(Di))}let hx=!1;function zte(e){return typeof e=="object"&&e!==null&&e.source==="avalog-push"}function Fte(){hx||typeof navigator>"u"||!("serviceWorker"in navigator)||(hx=!0,navigator.serviceWorker.addEventListener("message",e=>{if(!zte(e.data))return;const{title:t,body:r,url:n,eventCode:o,type:s}=e.data;Do("push_foreground_toast_shown",{type:s,eventCode:o}),H6(t||r||"Новое уведомление",{description:t&&r?r:void 0,action:n?{label:"Открыть",onClick:()=>{Do("push_foreground_toast_clicked",{type:s,eventCode:o});try{window.location.assign(n)}catch{}}}:void 0})}))}const Vte=a.lazy(()=>C(()=>import("./UpdatePrompt-CAAqP7Ub.js"),__vite__mapDeps([684,8,1])).then(e=>({default:e.UpdatePrompt}))),Bte=a.lazy(()=>C(()=>import("./PwaInstallPromptDS-M91TGFt6.js"),__vite__mapDeps([685,1,4,5,96,34,8,9,10])).then(e=>({default:e.PwaInstallPromptDS}))),Hte=a.lazy(()=>C(()=>import("./toaster-DjvhUWnr.js"),__vite__mapDeps([180,1,8,5,4,9,10])).then(e=>({default:e.Toaster})));Rte()&&(typeof requestIdleCallback<"u"?requestIdleCallback:t=>setTimeout(t,200))(()=>{Pw()});aI();wG();Lte();Fte();window.addEventListener("vite:preloadError",e=>{const t=Number(sessionStorage.getItem("vite-preload-reload-at")||0);Date.now()-t<1e4||(sessionStorage.setItem("vite-preload-reload-at",String(Date.now())),e.preventDefault(),window.location.reload())});U$.createRoot(document.getElementById("root")).render(c.jsx(nm,{label:"Root",children:c.jsx(Zx,{children:c.jsx(X$,{i18n:wn,children:c.jsx(a.Suspense,{fallback:c.jsx("img",{src:"/loading-loader.gif",alt:"load"}),children:c.jsxs(A$,{client:x$,children:[c.jsxs(yz,{locale:BA,children:[c.jsx(Ste,{}),c.jsxs(a.Suspense,{fallback:null,children:[c.jsx(Vte,{}),c.jsx(Bte,{}),c.jsx(Hte,{})]})]}),!1]})})})})}));export{p5 as $,Xre as A,TS as B,Hq as C,Ws as D,Yre as E,Kre as F,IS as G,$S as H,TH as I,IH as J,PH as K,RH as L,Oh as M,NH as N,Nh as O,pF as P,mF as Q,Hw as R,gF as S,Fb as T,PT as U,fq as V,MN as W,KS as X,$re as Y,m5 as Z,h5 as _,Kq as a,Qj as a$,v5 as a0,f5 as a1,tq as a2,i5 as a3,GS as a4,d5 as a5,c5 as a6,l5 as a7,u5 as a8,Ire as a9,yF as aA,SU as aB,kP as aC,wF as aD,p0 as aE,gf as aF,Vb as aG,CF as aH,Ca as aI,ru as aJ,LP as aK,Gre as aL,qre as aM,Zre as aN,sN as aO,TD as aP,uz as aQ,RF as aR,gC as aS,ng as aT,vC as aU,v0 as aV,hq as aW,UU as aX,tW as aY,rW as aZ,QD as a_,cq as aa,U0 as ab,DO as ac,jre as ad,M4 as ae,D4 as af,k4 as ag,z4 as ah,F4 as ai,Ore as aj,Qre as ak,mU as al,Zq as am,Sa as an,TU as ao,Ure as ap,Fq as aq,Vq as ar,Wre as as,Lq as at,zq as au,Bq as av,Ln as aw,sq as ax,dq as ay,b1 as az,Pre as b,yre as b$,Yj as b0,D0 as b1,h0 as b2,zN as b3,IF as b4,aq as b5,ii as b6,Dre as b7,ZW as b8,kre as b9,P6 as bA,Nb as bB,Bre as bC,Cr as bD,Wo as bE,jP as bF,hg as bG,AP as bH,OP as bI,OF as bJ,DF as bK,Qn as bL,Dh as bM,Ar as bN,nne as bO,wre as bP,xre as bQ,je as bR,bre as bS,Eq as bT,Ki as bU,Ere as bV,Kh as bW,Do as bX,Iz as bY,ve as bZ,Vt as b_,e6 as ba,QW as bb,JW as bc,Mre as bd,sT as be,Lre as bf,Fre as bg,c6 as bh,f6 as bi,d6 as bj,u6 as bk,p6 as bl,zre as bm,AF as bn,lu as bo,BN as bp,Ch as bq,Ts as br,_6 as bs,aO as bt,Vre as bu,C6 as bv,E6 as bw,S6 as bx,Po as by,aD as bz,vV as c,dz as c0,Sre as c1,bU as c2,Sh as c3,EN as c4,SN as c5,xN as c6,RN as c7,PN as c8,Ne as c9,Zte as cA,lO as cB,NN as cC,Qte as cD,gU as cE,m0 as cF,Rs as cG,zw as ca,rne as cb,j1 as cc,iu as cd,su as ce,ure as cf,pz as cg,fz as ch,Jre as ci,sz as cj,one as ck,nb as cl,yt as cm,vU as cn,H6 as co,Cre as cp,y1 as cq,_1 as cr,Aa as cs,mh as ct,qN as cu,ene as cv,Nre as cw,Hre as cx,tne as cy,eO as cz,hV as d,gV as e,Jte as f,_V as g,xV as h,Rre as i,pH as j,fH as k,aH as l,dH as m,cH as n,lH as o,uH as p,Tre as q,yV as r,Bw as s,Aw as t,_re as u,wH as v,SH as w,Cf as x,WN as y,zb as z};