1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jszip.min-Be-umpX2.js","assets/react-vendor-DJtAp8P_.js","assets/index-Cq3Thd2G.js","assets/moment-Bj79pgB5.js","assets/mui-DvP2hOwX.js","assets/mui-styles-C9F12l22.js","assets/babel-helpers-D2wBBc1I.js","assets/Button-C4goEOKP.js","assets/SessionPlannerMobile-85wkJ1ZS.js","assets/Modal-BzPnYVEi.js","assets/mutation--iSLlBrt.js","assets/apollo-DL0KWP0Y.js","assets/index-CyS3LFy6.js","assets/index-CV9OfG1C.css","assets/UpgradePlanModal-Cx-12O2U.js","assets/ArrowRightUp-CfAFwt7J.js","assets/Graphic-BzX0DM42.js","assets/CopySessionsModal-HNb2y_4T.js","assets/query-CcmDMjHA.js","assets/dayjs-CFxoC4n5.js","assets/drawer-CKgR88Nl.js","assets/teamActions-BwC441Ib.js","assets/_baseDifference-BHjDay7E.js","assets/_arrayIncludes-DFQcso6E.js","assets/_baseIndexOf-DqPIyCu4.js","assets/isArrayLikeObject-CcVCHQro.js","assets/useBetterAuth-D_W5RyAn.js","assets/auth-DECj28bo.js","assets/filters-D4RYviTZ.js","assets/Add-DRSElN7O.js","assets/LockedBlack-DWQMDhAs.js","assets/CircularProgressWithLabel-BYvhIF3u.js","assets/ToolChooserModal-Bja6F0-n.js","assets/MultiLevelMenu-CasgpzOW.js","assets/token-j6514cz0.js","assets/Playlist-CukyolQ2.js","assets/FixturesTwoTone-BuK2zyvo.js","assets/isEqual-SawseRfU.js","assets/SessionPlanner-BGrT_ndO.js","assets/GlobalLibrary-CypmQjjP.js","assets/AddBlack-qFPS8CaB.js","assets/compact-DZdspzxW.js","assets/orderBy-FNWL2R8s.js","assets/info-5YsGm4Va.js","assets/arrow-right-CPcr9UUY.js","assets/AmbientBackdrop-BT4OTS7s.js","assets/popover-DQmY_bgT.js","assets/index-C53T7JDS.js","assets/floating-ui.dom-CpqR1Q5s.js","assets/bookmark-D81rgROb.js","assets/sparkles-DgxfdHqs.js","assets/chevron-right-Bx281FLM.js","assets/index.esm-CWqXbt53.js","assets/_baseClone-DByvJCmO.js","assets/_baseAssignValue-CjtYt4eh.js","assets/cloneDeep-mVQ3twB2.js","assets/index-CrwW5ro-.js","assets/subMonths-CpZP7vPB.js","assets/chevron-left-hHkvU2-n.js","assets/index-BHFF4lkW.js","assets/triangle-alert-BdPscC9S.js","assets/check-njpSxvzl.js","assets/trash-2-B3r-aJQU.js","assets/chevron-up-Cdk80VBZ.js","assets/chevron-down-D9vZfud1.js","assets/circle-check-D5IF10Yd.js","assets/editable-input-BbmoAFqJ.js","assets/plus-jTnJ9Ylg.js","assets/index-CvVUxn0l.js","assets/imageUrl-gCnBcCAn.js","assets/switch-DVTTALDv.js","assets/arrow-left-D2QUTCdL.js","assets/settings-CZZ5K1Ap.js","assets/useClubMessagesApi-vAEvRqrI.js","assets/messages-square-3WAX5Rng.js","assets/library-D4hHsTq6.js","assets/activity-cwSc3umC.js","assets/notebook-tabs-BHj0ZsLq.js","assets/wand-sparkles-Cv-99xAq.js","assets/featureFlag-DMMCx43p.js","assets/useOnboardingServerSync-D8jgXIFJ.js","assets/onboardingStorage-VOmd6pEl.js","assets/user-round-EZEb1nGs.js","assets/checkbox-BCFY1QRf.js","assets/rotate-ccw-clock-BMQFH01O.js","assets/copy-D5ibeuXk.js","assets/ClubMessagesApp-0WSCd3TZ.js","assets/shield-check-COAUs1sL.js","assets/send-CYJEruln.js","assets/ClubMessagesApp-D2UI6BSz.css","assets/index-C4N0y56H.js","assets/swiper-react-DcF17yCe.js","assets/imageOptimization-zUL1CBPb.js","assets/Search-BEYvHCFs.js","assets/lodash-icp7yO-G.js","assets/merge-TfBrBrIh.js","assets/map-BI8CQ8np.js","assets/browser-B3fhYDhb.js","assets/hello-pangea-dnd-1bhs5THC.js","assets/some-YFJAbcVi.js","assets/values-DeBIqcD0.js","assets/index-B79atc36.js","assets/omit-BaIHraq0.js","assets/index-bEsv4Yks.js","assets/mui-x-DMY3qA32.js","assets/s3FileHandler-Bp64keCt.js","assets/swiper-react-CGdrHBuS.css","assets/Tabs-lVcpmzV2.js","assets/EditBlack-BFf5j3Z7.js","assets/UploadImage-DM9jg--i.js","assets/index-DcaTyaMB.js","assets/stripe.esm-CN1CO_pV.js","assets/GreenCheck-Dcsf_AMO.js","assets/subscription-iAza0g6-.js","assets/planConstants-_-t6GZnA.js","assets/UpgradeSubscription-D7OwODQr.js","assets/PaymentSummary-CDfNC-zw.js","assets/react-paypal-js-w2Ds6h67.js","assets/isNil-R7kYXCYw.js","assets/index-Dr_1fSfs.js","assets/ppt-CsxfrmCx.js","assets/SecondaryHeader-CQ32PoR-.js","assets/InlineHint-BwtPd7HF.js","assets/Pdf-BkIpCvcL.js","assets/Manage-BcZiAr0H.js","assets/DeleteGray-K_LbbGcc.js","assets/Download-Bk4TTf4W.js","assets/DeleteModal-BX6BaNP3.js","assets/differenceWith-_cM8_RT3.
1js","assets/reverse-DAxmyBuF.js","assets/index-DyhJ0sX7.js","assets/tableColumnsActions-C5ZE-Z6V.js","assets/Bar-DCvpPblB.js","assets/_basePickBy-jHhPNsuZ.js","assets/CardTable-Dt1Jggjv.js","assets/InfoCard-zt450lEo.js","assets/index-BieZYjyx.js","assets/Copy-Bx2E8fMZ.js","assets/fixtures-import-D2qsSBTS.js","assets/FilterHeader-RonmFUsJ.js","assets/GridCardView-DEqv0l0G.js","assets/ToggleButton-mhLknYBH.js","assets/AlertModal-CGXcj45Q.js","assets/SortMenu-CjsJdGGV.js","assets/MultiSelectMenu-T4g75gFl.js","assets/Filter-vdZeYdaV.js","assets/SearchBlue-Cq--C03-.js","assets/club-bdHkPrsY.js","assets/fixtureConstants-B-crqK8o.js","assets/ManageFixtureModal-ZcJHVBOM.js","assets/ImportFixturesModal-BSr7J64q.js","assets/findKey-Gt-tDAVi.js","assets/mapValues-CGRglPEa.js","assets/groupBy-BsGpKOH5.js","assets/index-BqWD01wt.js","assets/VideoAnalysisStates-DzUIQxFV.js","assets/index-DJ6G58M6.js","assets/UploadModal-DPGYHwV1.js","assets/replayMutation-DqoP36SS.js","assets/replayQuery-CrjZRCmu.js","assets/VideoGrid-C9V1_kLD.js","assets/evictPlayerCaches-DGsy6cw4.js","assets/update-Cd1lH7gX.js","assets/index-_emSioTI.js","assets/ArrowUp-BTarMPYZ.js","assets/imageConverter-CWAEraMQ.js","assets/joi-browser.min-DZtZ1q_t.js","assets/indexOf-ytkWh2W4.js","assets/html2pdf-BfTKX46Z.js","assets/jspdf.es.min-BVNJcEPA.js","assets/FullDescriptionHorizontal-BNtxhPy5.js","assets/SearchHeader-BOq_PWig.js","assets/omitBy-CVfI2Mdq.js","assets/PDFGray-nAIXNVuQ.js","assets/index-BKM4Qh-q.js","assets/ConfirmDeleteModal-BXNC5e4A.js","assets/players-import-BfGZvTEL.js","assets/ManagePlayerModal-D7WZNLv4.js","assets/DatePicker-BFwkswR8.js","assets/DuplicateModal-EdzRJtPh.js","assets/importPlayersModal-DYgPJ7sB.js","assets/isNumber-C5LS83rw.js","assets/InviteParentModal-CYujvavd.js","assets/playerConstants-BHlk66D6.js","assets/PlayerCardGridView-CZi5FkpL.js","assets/playerInsights-Ccdm7rok.js","assets/flatMap-DZaaYYaA.js","assets/index-B4TbUxhL.js","assets/filter-D-vVnHLs.js","assets/ManageObjectiveModal-B6V-_Jq4.js","assets/index-CifC9-rB.js","assets/search-DNkl80Xk.js","assets/index--h0_iZ8e.js","assets/sessions-import-BnnoNQi4.js","assets/start-flag-icon-1m6rfzfX.js","assets/AddClubSessionToTeamModal-BpGusS2T.js","assets/ArrowLeft-Da6iFsoD.js","assets/index-Cor9x_UP.js","assets/input-CuTRSUQZ.js","assets/DuplicateSessionModal-FOTI7xd1.js","assets/index-BUKBONWq.js","assets/FileSaver.min-CVXvx7px.js","assets/ManageSessionModal-Bj6CF5E5.js","assets/sessionConstants-SlYbNrWq.js","assets/QuickViewDrawer-C01javJ8.js","assets/CoachNotesNew-Bns5SEHM.js","assets/ClubNotes-CwYSQnQ2.js","assets/TeamSession-D26LimVZ.js","assets/AddToGlobalLibrary-D0Dz9Ui3.js","assets/TextareaAutosize-t2TCv3sg.js","assets/SwiperSlider-DSKI-lr8.js","assets/UnChecked-CFhuOM22.js","assets/ManagePracticeModal-CuLKk-Zk.js","assets/mapKeys-BOig4Tgf.js","assets/pagination-ZReODKpj.css","assets/DugoutSession-CuhTFEh0.js","assets/sessionInsights-Bx5p0Th7.js","assets/ImportSessionsModal-CViNqlHl.js","assets/index-C29Qg2hZ.js","assets/VideoPlayerModal-BgJm66DJ.js","assets/CreateEditSeasonModal-CSydoVwi.js","assets/index-D0Nw2OIB.js","assets/index-fdBQ6KwP.js","assets/DroppableWrapper-BV3SYTIO.js","assets/PlaylistThumbnail-BQGQtBTO.js","assets/sessionSections-a-lprBoU.js","assets/findIndex-DCshQyVE.js","assets/DraggableWrapper-C7z6XFG8.js","assets/AddPracticeToSessionModalGate-BB6n61YO.js","assets/seededSessionFill-BljGszd4.js","assets/label-DlgL8a7V.js","assets/funnel-CHKnj2yC.js","assets/AddPracticeToSessionModalGate-B2eHOhbs.css","assets/PracticeCard-CxYO6tgo.js","assets/Checkbox-BfyNlPRU.js","assets/startCase-BXgY2jSl.js","assets/playbackAnalytics-BS68FQAv.js","assets/index-Br7it_tE.js","assets/teams-import-rbjkohqZ.js","assets/evictClubTeamsLite-CvhAN8cV.js","assets/importTeamsModal-DiMbkOmx.js","assets/xlsx-DFCG_uyv.js","assets/ManageTeamModal-Dl7uN3U1.js","assets/teamInsights-Bo5tltaR.js","assets/TeamsV2-zCvZf9XT.js","assets/index-Dmrtjh9z.js","assets/DataTableC-Bjx5j7uG.js","assets/dropdown-menu-Cf_HXWjm.js","assets/index-DbR5jsy0.js","assets/useDragScroll-DS-iG0FP.js","assets/lock-BhACGXRx.js","assets/ellipsis-vertical-EfBRlYg5.js","assets/GridCardViewC-DDVO42jB.js","assets/dugoutCardStyles-CSt8DeWU.js","assets/dugoutCardStyles-CiIe2-jL.css","assets/index-Dz9DtQCq.js","assets/queryListingWithCache-DQLnVHKJ.js","assets/AvatarNameCellC-DaciOyPa.js","assets/TeamCrestFallback-CFcPR2Qo.js","assets/TextCellC-_D8K2CVP.js","assets/NumericCellC-BVdwnswH.js","assets/tooltip-BAn5bXOX.js","assets/index-CMsqgI2o.js","assets/select-BkBd-IXy.js","assets/InsightTooltipWra
1p-DtjEWBCk.js","assets/lightbulb-CluGZi-m.js","assets/star-DNcD-a5x.js","assets/trending-up-CYMXBtcN.js","assets/TeamTooltips-PLRvdzMN.js","assets/PillCellC-OsMLnFcE.js","assets/badge-CdIHN1UA.js","assets/index-u7ctmdfL.js","assets/index-DFAqAA9H.js","assets/index-CehyU5yM.css","assets/IconTooltipC-CIRgTaC1.js","assets/index-qaHslVcQ.js","assets/ResponsiveHeaderSearchV2-kPbhCxyW.js","assets/list-Bn_teG-D.js","assets/layout-grid-71yoZBL3.js","assets/arrow-up-down-Cyob2fWI.js","assets/columns-3--UrfKVY2.js","assets/arrow-up-Bnsw1-8C.js","assets/arrow-down-oYUkFNnA.js","assets/index-Dg9Ob-9g.js","assets/arrow-up-right-BHTble7A.js","assets/index-CZ_8eCp1.js","assets/grip-vertical-B3X-bmLk.js","assets/deferModal-CzRxSbHe.js","assets/search-x-Dd8McuQW.js","assets/file-spreadsheet-DIz94-rN.js","assets/PlayersV2-ClPk3X0l.js","assets/zap-BONeBcEP.js","assets/undo-2-D8Cv9fil.js","assets/list-filter-CFqa9hVM.js","assets/download-avhwAJjG.js","assets/upload-C-RVOicD.js","assets/ellipsis-BPffiR7H.js","assets/playerConstantsV2-BrKcNBVo.js","assets/getAvailabilityIndicator-DUBCZiSu.js","assets/InlineSelectC-Dv7sH9m1.js","assets/playerConstantsV2-CZqQn7kT.css","assets/pencil-D2T7VuLA.js","assets/copy-JbrY5-sx.js","assets/FixturesV2-DK19qzdG.js","assets/file-text-BNcik8vm.js","assets/index-DiF3cX1U.js","assets/addYears-C1EnW8Bh.js","assets/calendar-DxTc29Bo.js","assets/resolveFixtureFormations-CfuNpT_O.js","assets/DateTimeCellC-DyVQyAo8.js","assets/house-DjrxS3X6.js","assets/resolveFixtureResult-BNfNQta9.js","assets/formatFixtureDate-BLEqGWQ_.js","assets/index-D1dhoRGq.js","assets/AvatarImgC-DLZ8EYiW.js","assets/fixtureCardInsight-DtUJyzXL.js","assets/resolveFixtureFormations-DfC8Sjvl.css","assets/ViewToggleV2-D3wqvItY.js","assets/calendar-clock-DLaUufr_.js","assets/SessionsV2-BAGhqq8s.js","assets/index-DVtZpAdE.js","assets/index-DR3TqHo-.js","assets/DashboardV2-DEoBUZz9.js","assets/animationTool-q908f9eu.js","assets/PerformanceTrendChartV2-Dfzdi9cr.js","assets/AttendanceTrendChartV2-DGOfN-P4.js","assets/trending-down-Bo6DCIA8.js","assets/trophy-BRLAIDYh.js","assets/target-Bir_87t8.js","assets/user-check-Cu7ZBoGv.js","assets/sliders-horizontal-Bh3m2IBU.js","assets/entryPoints-B9aDjD_R.js","assets/WeeklyPracticeCard-XnegRLfU.js","assets/index-DC1sP82m.js","assets/useHoverTrailerV2-C_vNBnFz.js","assets/WeeklyPracticeCard-3MQXPqBX.css","assets/WeeklySessionPreferencesStep-DQuPlJx8.js","assets/weeklySessionPrototype-C2Sc-oto.js","assets/useSuggestedAgeBand-5rJfp5g2.js","assets/SessionDetailV2-Bizl1Plg.js","assets/sessionSaveCopy-2cD21jMD.js","assets/index-CV4d4vNT.js","assets/index-DYb8OJI5.js","assets/api-Ay-9DW4b.js","assets/globe-wjwtVzP3.js","assets/practiceTypeDisplay-ixPkQdXG.js","assets/PracticeNotesStyle-BI2Oy8Xh.js","assets/notebook-pen-CylHQ532.js","assets/permissions-Yy0NM63Q.js","assets/useIsMobileShell-BG-PNUUI.js","assets/heart-SY2Qtxi5.js","assets/image-CwUTZjHK.js","assets/index-DCNIU6Vb.js","assets/SessionDetailV2-BRYtTio8.css","assets/TemplateStarterV2-Be9ExJJR.js","assets/SessionPlannerLibraryV2-DhSowAxq.js","assets/LibraryFiltersV2-uPy8y9Yu.js","assets/play-CBxhfLg4.js","assets/useAnchoredMenuPosition-DDWpecM1.js","assets/share-2-BcYbamX-.js","assets/folder-plus-BuJChPs4.js","assets/index-ngBBROCs.js","assets/AddPracticeToSessionTemplateModalGate-BxLDbiig.js","assets/AddPracticeToSessionTemplateModal-LyU9_1Zk.js","assets/external-link-DcuPqd1P.js","assets/PlayerDetailV2-4FY68vrZ.js","assets/ManageObjectiveModalV2-ziYk1DhD.js","assets/refresh-cw-CGImtvBQ.js","assets/camera-ByDMTfQ8.js","assets/ContextVideoAnalysisV2-D-Prtmoh.js","assets/ReplayUploadModalV2-gjVL0-Kv.js","assets/useViewportV2-Ywb1Hi-U.js","assets/uploadKey-ByIVd_Vz.js","assets/StandardGate-LiLFonF_.js","assets/InviteParentModalV2-oAc9Rm7k.js","assets/formatSessionDate-BesemcQK.js","assets/dumbbell-BsA7MGE4.js","assets/recorderMetrics-drlQvM4a.js","assets/liveStatsRates-Cb44RuyJ.js","assets/useLiveStatsTimeline-D75PuXCr.js","assets/flag-Dp7nV-O9.js","assets/compass-Ccs_kLku.js","assets/clock-DzZeQc5T.js","assets/save-PA5JphAM.js","assets/message-square-D-qgNSOV.js","assets/message-circle-DXS1GR7L.js","assets/PlayerDetailV2-DXUbACPg.css","assets/SessionDetailV2-QzK3xzxt.js","assets/gafferDugoutHandoff-XpKOt_uZ.js","assets/FormColumnV2-Cqv9L8eA.js","assets/index-gqzRfvf
1S.js","assets/FormColumnV2-DBIrS_-D.css","assets/MediaDescriptionText-x2hMvt6a.js","assets/square-DEzQTtQy.js","assets/EvaluationControls-DzmKan78.js","assets/index-DEYzTw8S.js","assets/index-Qwitn9cN.css","assets/index-_xUGCgCD.js","assets/rotate-cw-C3CCEtsC.js","assets/index-Cp_HDmt4.css","assets/SessionSectionAddV2-B4vsH8uX.js","assets/LibraryLoadingStatus-C7OfBfBE.js","assets/index-Bj_oAgTS.js","assets/MediaCardV2-CVjrjZCx.js","assets/plainText-DBpeJa6y.js","assets/calendar-range-BRkGfDrQ.js","assets/list-plus-jbEUR6Jd.js","assets/footballize-CKQT9bi3.js","assets/useIsTabletOrBelow-XMMGxyyS.js","assets/index-CeeFDfJ-.js","assets/index-CuGEODqV.js","assets/DuplicateSessionModalV2-BPGrWSII.js","assets/index-Bbn2kwUO.js","assets/CopyTeamSessionsToClubSessionsModalV2-DUP4DTdB.js","assets/AddClubSessionToTeamModalV2-Ccq_eLWt.js","assets/ClubDocumentsV2-cpw-uNdF.js","assets/file-up-CtHzHl66.js","assets/TeamDetailV2-DZAlHvz9.js","assets/index-C8s4O2nf.js","assets/field-C3a6OMZb.js","assets/ManagePlayerModal-Cv8D5-W2.js","assets/index-pQuD8iz6.js","assets/useSessionInsightMap-BKgg0Rx3.js","assets/CalendarV2-BzHoAYYK.js","assets/index-cotgHnXG.js","assets/syncfusion-jDbbEPAU.js","assets/loadSyncfusionTheme-vI47UJ_T.js","assets/CalendarV2-CTnnzFB1.css","assets/FixtureDetailV2-NusZHCNJ.js","assets/playerEvaluationPayload-Lk9v5U3S.js","assets/useFixtureData-DWdrdue9.js","assets/FixtureDetailV2-DNFYT1o2.css","assets/LiveStatsV2-CCEgr7-9.js","assets/PlayerObservationsV2-ChVClS0l.js","assets/recorderOffline-CZbmLHCY.js","assets/rotate-ccw-i0PdhBGb.js","assets/PlayerObservationsV2-B4_TzSRa.css","assets/BillingV2-BuVBAltL.js","assets/styles-CExZz_74.js","assets/styles-D4nXKbN1.css","assets/UpgradeSubscriptionV2-CU0GKFAm.js","assets/AccountV2-DjAPG888.js","assets/FormSectionV2-DTboHxDV.js","assets/ProfileV2-B_yjJyIC.js","assets/NavigationPreferences-BUqx9zI-.js","assets/useWeeklySessionVisibility-Cq6aValn.js","assets/theme-De1E2Y6C.js","assets/list-video-BeMT6jAI.js","assets/index-CP9V4tYe.js","assets/index-DF0hmEnw.js","assets/index-Ddh2CaBP.js","assets/Sort-DOORKFIJ.js","assets/Trailer-gVffTodC.js","assets/Apple-CZyH-Klh.js","assets/index-w5DYIDvu.js","assets/AddPlaylistModal-CnE-eNO7.js","assets/EngineRoomMobileFilters-CUIuI1gK.js","assets/VideoHeader-CCo4Nda9.js","assets/useCoordinatedLoading-XKQda0nS.js","assets/SaveToPopover-DIvTKqx9.js","assets/QuickViewDrawer-CaXFXbuw.js","assets/usePlaybackProgress-_1fECkJ3.js","assets/SearchRecovery-CYdbUSRL.js","assets/SearchRecovery-Cjm10elT.css","assets/index-BWQ867dj.js","assets/useCollectionsPracticeTypeMap-Diyla1H4.js","assets/index-C1t7uqC1.js","assets/CategorySortDropdown-CR9YM-yu.js","assets/TrailerModal-CVX4TgKw.js","assets/MultiSelectBarV2-YoOpbYEX.js","assets/AddPlaylistModalV2-CK13cVBA.js","assets/PlanBuilderV2-bNZKSOzf.js","assets/index-DI7EGspv.js","assets/index-BV4DY1_C.js","assets/index-CUzDeUYg.js","assets/index-CB0mj_O3.js","assets/buildSessionPdfDocument-Cr4fNpTl.js","assets/PlanBuilderV2-B3Np5YxH.css","assets/EngineRoomBreadcrumbV2-DyOCPLFM.js","assets/tokens-BIS2AW1b.js","assets/DesktopBulkBar-CKYIlLDP.js","assets/index-BsiPhTjw.js","assets/club-CAt4PSJ5.js","assets/PlaylistTwoTone-C2NT716u.js","assets/Carousel-CQBE7uOi.js","assets/useRecentlyViewed-B56pK0QT.js","assets/index-V1oGvfYd.js","assets/ShelfRow-CSSHROA7.js","assets/index-BI3lZdag.js","assets/RelatedVideos-ohlTThV4.js","assets/autoplay-DbgV5Ch6.js","assets/index-Bb3P8DjQ.js","assets/BackButtonV2-DsCFeevZ.js","assets/CollectionChapterNav-CAiLCK_o.js","assets/film-DLewCPSw.js","assets/index-BC5vJzQ3.js","assets/index-DPtTR-nh.js","assets/index-bxBTb9x5.js","assets/Share-AFIreKiA.js","assets/SharePlaylistModal-CSU5h6Fd.js","assets/index-CgPQXOhI.js","assets/index-DThcSrQY.js","assets/index-BYpyTL8r.js","assets/PlaylistDetailV2-Ikh_R2Wt.js","assets/index-iDptPIbJ.js","assets/TouchTightHomeHeader-BiM60CYL.js","assets/LogoDark-BynYVOdd.js","assets/index-DiXv24_A.js","assets/PublicHeader-Ce1ONhD_.js","assets/usePublicHeaderAuth-PgV10LIu.js","assets/WelcomeFreeTrail-C0DN2mPc.js","assets/Checked-CS1NFCQA.js","assets/TrailSlider-CfMQLLBe.js","assets/index-XVpM6OAF.js","assets/index-DR62Pa2T.js","assets/index-D-7OxtnH.js","assets/index-DJs8H3J2.js","assets/TouchTightHeader-Bm3Eiuxm.js","assets/AuthWordmark-_Q9KWMEp.js","assets/AuthWordmark-D0TMiS8w.css","assets/index-DAPOUptY.js","assets/PasswordStrength-BTv5gJzX.js","assets/index-C3INZBW7.js","assets/Gate-DNpeketG.js","assets/SessionPlannerGraphic-DlW27AdK.js","assets/SessionTemplate-CclCxoG6.js","assets/QuickPreviewSessionDrawer-FdfS-nq9.js","assets/GeneratePdfModal-DqRQcpgJ.js","assets/SideDrawer-BEXrdiXt.js","assets/index-Brk9TV9m.js","assets/index-B2JnbMCF.js","assets/index-g7wN3pfn.js","assets/index-CMDSwVek.js","assets/index-DEafmvIz.js","assets/circle-alert-FEItrHSe.js","assets/OAuthButtonsV2-Cq7frOm1.js","assets/Google-BzX9EhLD.js","assets/index-D0nNECsh.js","assets/index-CixUk5ZJ.js","assets/index-DdlKOfO4.js","assets/inviteUser-C6p32oyE.js","assets/UsersV2-C1xHq9ot.js","assets/index-j9ogpTHv.js","assets/index-DDQrogoH.js","assets/index-CdVEKITW.js","assets/SignUpSimplified-fKlvhIPa.js","assets/OAuthButtons-2bKXOkff.js","assets/useOAuthSignupCompletion-Vb7ydel5.js","assets/index-B06k-gnX.js","assets/index-Bx4VfgFG.js","assets/index-B1qSdxD9.js","assets/PricingV2-CBpvbDLJ.js","assets/PrivateRoute-k0UsZ7e9.js","assets/index-CjlL2ryl.js","assets/index-CgWquTh6.js","assets/Listing-A4EEgu9_.js","assets/CommonHeader-BS50CQzY.js","assets/index-DRk1o1EO.js","assets/index-CA7V2Of
1n.js","assets/index-B0TTZV-Y.js","assets/index-Cc-mj5yh.js","assets/GlobalHomeV2-D9pGVPZy.js","assets/LibraryRoute-CvWJhnh4.js","assets/EngineRoomQuickViewV2-ByiwOKnh.js","assets/ActivitiesAndDrillsV2-BPYvwad3.js","assets/SessionsV2-BlM0ixh-.js","assets/MySubmissionsV2-BhSa6nWX.js","assets/index-CEhQmK3V.js","assets/index-Djf2KDSF.js","assets/index-CaJUb-Kn.js","assets/index-BLD3P1xf.js","assets/index-B8CpV2Y8.js","assets/queries-DiB9xTdd.js","assets/BuildSessionV2-DGYagh7W.js","assets/SessionSavedSheetV2-D11Hnark.js","assets/MySessionV2-Ansitm3k.js","assets/AddToDugoutModal-9V7I5vOy.js","assets/AutoBuilderCanvas-BA5OSZDR.js","assets/AutoBuilderCanvas-1DHTJPN4.css","assets/index-C4mohiZX.js","assets/index-CBKEYBKm.js","assets/useReplayProcessingPoll-Bmd6wHA6.js","assets/EditVideoModal-tJ8nCm9K.js","assets/ReplayHubV2-WhtUIbV2.js","assets/PlaylistFormModalV2-CtVPJw9K.js","assets/index-A19xdhQu.js","assets/index-C-8xLrvO.js","assets/VideoDetailReadOnly-CCVIMlHP.js","assets/purify.es-Db8BfgAR.js","assets/ReplayVideoDetailV2-bleGZqMd.js","assets/ReplayPlayerV2-DXVIwwRM.js","assets/ReplayReelViewV2-CER2CPHP.js","assets/skip-forward-C5G04RNx.js","assets/PlaylistDetailV2-Cz1zTPWG.js","assets/ReplayPlanRequiredV2-e9wU42zY.js","assets/ReplayPublicViewer-CCIZtgGG.js","assets/index-D4U9KIoR.js","assets/ThreadView-C8AfLqyG.js","assets/index-Bl7SSNHp.js","assets/ThreadView-CQhCnvdo.js","assets/LegacyTeamMessagesNotice-o-KBn4Yu.js","assets/ErrorPage-Bb2huUCI.js","assets/index-C7qUfoab.js","assets/GlobalSearch-BTGixg00.js","assets/browser-ponyfill-CeUhObmB.js","assets/index-__UXMj9V.js"])))=>i.map(i=>d[i]); 2import{D as Gl,l as z,g as Jn,G as Je,a as at,b as ht,c as fe,S as Xi,d as Ts,e as Ja,f as by,T as Sy,s as ye,h as Kl,i as Fr,j as Gs,k as Ks,m as Xn,n as Af,o as Ys,p as Ey,q as Yl,r as Jl,t as Ct,u as Is,v as pt,w as Qx,x as Pi,y as kn,z as Pf,A as e1,B as rp,C as t1,E as be,F as st,H as xa,I as sp,J as n1,K as Df,L as wy,M as xy,_ as r1,N as Ty,O as ip,P as s1,Q as Nf,R as qc,U as i1,V as Iy,W as Rr,X as op,Y as Lf,Z as ap,$ as Nn,a0 as Oy,a1 as ky,a2 as o1,a3 as Cy,a4 as Xa,a5 as Ry,a6 as a1,a7 as Wc,a8 as lp,a9 as l1,aa as u1,ab as c1,ac as d1,ad as f1,ae as Mf,af as Bn,ag as Wn,ah as Zi,ai as h1,aj as p1,ak as Pt,al as up,am as cp,an as Ay,ao as g1,ap as Py,aq as m1,ar as Gc,as as Qi,at as Ff,au as Dy,av as dp,aw as _1,ax as $f,ay as v1,az as y1,aA as gt,aB as Zn,aC as Ny,aD as Di,aE as b1,aF as Os,aG as fp,aH as hp,aI as pp,aJ as Ly,aK as My,aL as S1,aM as E1,aN as Fy,aO as w1,aP as x1,aQ as T1,aR as I1,aS as O1,aT as Mt,aU as Le,aV as gr,aW as Gt,aX as Eu,aY as k1,aZ as C1,a_ as gp,a$ as mp,b0 as R1,b1 as $y,b2 as Qt,b3 as _p,b4 as A1,b5 as Xr,b6 as jy,b7 as wu,b8 as vp,b9 as xu,ba as P1,bb as D1,bc as vo,bd as Ar,be as N1,bf as L1,bg as zt,bh as jf,bi as yo,bj as M1,bk as $,bl as F1,bm as Uf,bn as $1,bo as j1,bp as U1,bq as B1,br as H1,bs as V1,bt as z1,bu as yp,bv as bp,bw as Sp,bx as Ep,by as q1,bz as wp,bA as W1}from"./index-CyS3LFy6.js";import{a as b,b as ge,d as Bf,g as G1,j as v,f as K1}from"./react-vendor-DJtAp8P_.js";import{A as Za,s as Y1,a as J1,b as xp,r as X1,O as Qa,c as Z1,p as Q1,d as eT,f as tT,u as Uy,e as Kc,g as nT,h as rT,I as sT,i as iT,o as oT,j as Tp}from"./apollo-DL0KWP0Y.js";import{U as aT,s as By,ai as lT}from"./mui-styles-C9F12l22.js";import{d as Ip,s as uT}from"./babel-helpers-D2wBBc1I.js";import{d as Js,u as cT}from"./dayjs-CFxoC4n5.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="acfc7885-d1f4-4adc-b138-47692b3ef679",t._sentryDebugIdIdentifier="sentry-dbid-acfc7885-d1f4-4adc-b138-47692b3ef679")}catch{}const dT="modulepreload",fT=function(t){return"/"+t},Op={},j=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let o=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=o(n.map(u=>{if(u=fT(u),u in Op)return;Op[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":dT,c||(f.as="script"),f.crossOrigin="",f.href=u,l&&f.setAttribute("nonce",l),document.head.appendChild(f),c)return new Promise((p,h)=>{f.addEventListener("load",p),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})},Ta={},kp={};function sr(t,e){Ta[t]=Ta[t]||[],Ta[t].push(e)}function ir(t,e){if(!kp[t]){kp[t]=!0;try{e()}catch(n){Gl&&z.error(`Error while instrumenting ${t}`,n)}}}function Kt(t,e){const n=t&&Ta[t];if(n)for(const r of n)try{r(e)}catch(s){Gl&&z.error(`Error while triggering instrumentation handler. 3Type: ${t} 4Name: ${Jn(r)} 5Error:`,s)}}let Tu=null;function Hy(t){const e="error";sr(e,t),ir(e,hT)}function hT(){Tu=Je.onerror,Je.onerror=function(t,e,n,r,s){return Kt("error",{column:r,error:s,line:n,msg:t,url:e}),Tu?Tu.apply(this,arguments):!1},Je.onerror.__SENTRY_INSTRUMENTED__=!0}let Iu=null;function Vy(t){const e="unhandledrejection";sr(e,t),ir(e,pT)}function pT(){Iu=Je.onunhandledrejection,Je.onunhandledrejection=function(t){return Kt("unhandledrejection",t),Iu?Iu.apply(this,arguments):!0},Je.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let Cp=!1;function gT(){Cp||(Cp=!0,Hy(Yc),Vy(Yc))}function Yc(){const t=at(),e=t&&ht(t);if(e){const n="internal_error";fe&&z.log(`[Tracing] Root span: ${n} -> Global error occurred`),e.setStatus({code:Xi,message:n})}}Yc.tag="sentry_tracingErrorCallback";const zy="_sentryScope",qy="_sentryIsolationScope";function mT(t,e,n){t&&(Ts(t,qy,n),Ts(t,zy,e))}function Rp(t){return{scope:t[zy],isolationScope:t[qy]}}class Xs{constructor(e={}){this._traceId=e.traceId||Ja(),this._spanId=e.spanId||by()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Sy}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}
5addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}function _T(t){if(!fe)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=ye(t),{spanId:s}=t.spanContext(),i=Kl(t),o=ht(t),a=o===t,l=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:c,description:d}=ye(o);u.push(`root ID: ${o.spanContext().spanId}`),c&&u.push(`root op: ${c}`),d&&u.push(`root description: ${d}`)}z.log(`${l} 6 ${u.join(` 7 `)}`)}function vT(t){if(!fe)return;const{description:e="< unknown name >",op:n="< unknown op >"}=ye(t),{spanId:r}=t.spanContext(),i=ht(t)===t,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${e}" with ID ${r}`;z.log(o)}function el(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){fe&&z.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function yT(t,e){if(!Fr(t))return[!1];const n=Gs().getScopeData().sdkProcessingMetadata.normalizedRequest,r={...e,normalizedRequest:e.normalizedRequest||n};let s;typeof t.tracesSampler=="function"?s=t.tracesSampler(r):r.parentSampled!==void 0?s=r.parentSampled:typeof t.tracesSampleRate<"u"?s=t.tracesSampleRate:s=1;const i=el(s);return i===void 0?(fe&&z.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):i?Math.random()<i?[!0,i]:(fe&&z.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[!1,i]):(fe&&z.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i])}const bT=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ST(t){return t==="http"||t==="https"}function bo(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:l}=t;return`${a}://${l}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function ET(t){const e=bT.exec(t);if(!e){Ks(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,s="",i="",o="",a=""]=e.slice(1);let l="",u=a;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return Wy({host:i,pass:s,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function Wy(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function wT(t){if(!Gl)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(z.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?ST(r)?e&&isNaN(parseInt(e,10))?(z.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(z.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(z.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function xT(t){const e=typeof t=="string"?ET(t):Wy(t);if(!(!e||!wT(e)))return e}function Wr(t,e=[]){return[t,e]}function TT(t,e){const[n,r]=t;return[n,[...r,e]]}function Jc(t,e){const n=t[1];for(const r of n){const s=r[0].type;if(e(r,s))return!0}return!1}function Xc(t){return Je.__SENTRY__&&Je.__SENTRY__.encodePolyfill?Je.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function IT(t){const[e,n]=t;let r=JSON.stringify(e);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Xc(r),i]:r.push(typeof i=="string"?Xc(i):i)}for(const i of n){const[o,a]=i;if(s(` 8${JSON.stringify(o)} 9`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Af(a))}s(l)}}return typeof r=="string"?r:OT(r)}function OT(t){const e=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function kT(t){return[{type:"span"},t]}function CT(t){const e=typeof t.data=="string"?Xc(t.data):t.data;
9return[Xn({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const RT={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Ap(t){return RT[t]}function Hf(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Gy(t,e,n,r){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:bo(r)},...s&&{trace:Xn({...s})}}}function AT(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function PT(t,e,n,r){const s=Hf(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:bo(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Wr(i,[o])}function DT(t,e,n,r){const s=Hf(n),i=t.type&&t.type!=="replay_event"?t.type:"event";AT(t,n&&n.sdk);const o=Gy(t,s,r,e);return delete t.sdkProcessingMetadata,Wr(o,[[{type:i},t]])}function NT(t,e){function n(c){return!!c.trace_id&&!!c.public_key}const r=Ys(t[0]),s=e&&e.getDsn(),i=e&&e.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:bo(s)}},a=e&&e.getOptions().beforeSendSpan,l=a?c=>{const d=a(ye(c));return d||Ey(),d}:c=>ye(c),u=[];for(const c of t){const d=l(c);d&&u.push(kT(d))}return Wr(o,u)}function LT(t,e,n,r=at()){const s=r&&ht(r);s&&(fe&&z.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),s.addEvent(t,{[Jl]:e,[Yl]:n}))}function Pp(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},s=r[Yl],i=r[Jl];typeof s=="string"&&typeof i=="number"&&(e[n.name]={value:i,unit:s})}),e}const Dp=1e3;class Vf{constructor(e={}){this._traceId=e.traceId||Ja(),this._spanId=e.spanId||by(),this._startTime=e.startTimestamp||Ct(),this._attributes={},this.setAttributes({[pt]:"manual",[Is]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?Qx:Sy}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=Pi(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(kn,"custom"),this}end(e){this._endTime||(this._endTime=Pi(e),vT(this),this._onSpanEnded())}getSpanJSON(){return Xn({data:this._attributes,description:this._name,op:this._attributes[Is],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:t1(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[pt],_metrics_summary:rp(this),profile_id:this._attributes[e1],exclusive_time:this._attributes[Pf],measurements:Pp(this._events),is_segment:this._isStandaloneSpan&&ht(this)===this||void 0,segment_id:this._isStandaloneSpan?ht(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){fe&&z.log("[Tracing] Adding an event to span:",e);const s=Np(n)?n:r||Ct(),i=Np(n)?{}:n||{},o={name:e,time:Pi(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=be();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===ht(this)))return;if(this._isStandaloneSpan){this._sampled?FT(NT([this],e)):(fe&&z.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();
9r&&(Rp(this).scope||st()).captureEvent(r)}_convertSpanToTransaction(){if(!Lp(ye(this)))return;this._name||(fe&&z.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:n}=Rp(this),s=(e||st()).getClient()||be();if(this._sampled!==!0){fe&&z.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),s&&s.recordDroppedEvent("sample_rate","transaction");return}const o=xa(this).filter(d=>d!==this&&!MT(d)).map(d=>ye(d)).filter(Lp),a=this._attributes[kn];delete this._attributes[sp],o.forEach(d=>{d.data&&delete d.data[sp]});const l={contexts:{trace:n1(this)},spans:o.length>Dp?o.sort((d,f)=>d.start_timestamp-f.start_timestamp).slice(0,Dp):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,...Xn({dynamicSamplingContext:Ys(this)})},_metrics_summary:rp(this),...a&&{transaction_info:{source:a}}},u=Pp(this._events);return u&&Object.keys(u).length&&(fe&&z.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),l.measurements=u),l}}function Np(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function Lp(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function MT(t){return t instanceof Vf&&t.isStandaloneSpan()}function FT(t){const e=be();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}const Ky="__SENTRY_SUPPRESS_TRACING__";function So(t){const e=Jy();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=jT(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?o=>Df(t.scope,o):s!==void 0?o=>Yy(s,o):o=>o())(()=>{const o=st(),a=BT(o);return t.onlyIfParent&&!a?new Xs:$T({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function Yy(t,e){const n=Jy();return n.withActiveSpan?n.withActiveSpan(t,e):Df(r=>(Nf(r,t||void 0),e(r)))}function $T({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Fr())return new Xs;const s=Gs();let i;if(t&&!n)i=UT(t,r,e),Ty(t,i);else if(t){const o=Ys(t),{traceId:a,spanId:l}=t.spanContext(),u=Kl(t);i=Mp({traceId:a,parentSpanId:l,...e},r,u),ip(i,o)}else{const{traceId:o,dsc:a,parentSpanId:l,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=Mp({traceId:o,parentSpanId:l,...e},r,u),a&&ip(i,a)}return _T(i),mT(i,r,s),i}function jT(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const r={...n};return r.startTimestamp=Pi(t.startTime),delete r.startTime,r}return n}function Jy(){const t=wy();return xy(t)}function Mp(t,e,n){const r=be(),s=r&&r.getOptions()||{},{name:i="",attributes:o}=t,[a,l]=e.getScopeData().sdkProcessingMetadata[Ky]?[!1]:yT(s,{name:i,parentSampled:n,attributes:o,transactionContext:{name:i,parentSampled:n}}),u=new Vf({...t,attributes:{[kn]:"custom",...t.attributes},sampled:a});return l!==void 0&&u.setAttribute(s1,l),r&&r.emit("spanStart",u),u}function UT(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),i=e.getScopeData().sdkProcessingMetadata[Ky]?!1:Kl(t),o=i?new Vf({...n,parentSpanId:r,traceId:s,sampled:i}):new Xs({traceId:s});Ty(t,o);const a=be();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function BT(t){const e=r1(t);if(!e)return;const n=be();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?ht(e):e}const Ia={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},HT="heartbeatFailed",VT="idleTimeout",zT="finalTimeout",qT="externalFinish";function Xy(t,e={}){const n=new Map;let r=!1,s,i=qT,o=!e.disableAutoFinish;const a=[],{idleTimeout:l=Ia.idleTimeout,finalTimeout:u=Ia.finalTimeout,childSpanTimeout:c=Ia.childSpanTimeout,beforeSpanEnd:d}=e,f=be();if(!f||!Fr())return new Xs;const p=st(),h=at(),g=WT(t);g.end=new Proxy(g.end,{apply(x,R,C){d&&d(g);const[S,...w]=C,A=S||Ct(),P=Pi(A),O=xa(g).filter(q=>q!==g);if(!O.length)return I(P),Reflect.apply(x,R,[P,...w]);const N=O.map(q=>ye(q).timestamp).filter(q=>!!q),V=N.length?Math.max(...N):void 0,L=ye(g).start_timestamp,W=Math.min(L?L+u/1e3:1/0,Math.max(L||-1/0,Math.min(P,V||1/0)));return I(W),Reflect.apply(x,R,[W,...w])}});function _(){s&&(clearTimeout(s),s=void 0)}function m(x){_(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=VT,g.end(x))},l)}function y(x){s=setTimeout(()=>{!r&&o&&(i=HT,g.end(x))},c)}function E(x){_(),n.set(x,!0);const R=Ct();y(R+c/1e3)}function T(x){if(n.has(x)&&n.delete(x),n.size===0){const R=Ct();m(R+l/1e3)}}function I(x){r=!0,n.clear(),a.forEach(P=>P()),Nf(p,h);const R=ye(g),{start_timestamp:C}=R;if(!C)return;(R.data||{})[qc]||g.setAttribute(qc,i),z.log(`[Tracing] Idle span "${R.op}" finished`);const w=xa(g).filter(P=>P!==g);let A=0;
9w.forEach(P=>{P.isRecording()&&(P.setStatus({code:Xi,message:"cancelled"}),P.end(x),fe&&z.log("[Tracing] Cancelling span since span ended early",JSON.stringify(P,void 0,2)));const O=ye(P),{timestamp:N=0,start_timestamp:V=0}=O,L=V<=x,W=(u+l)/1e3,q=N-V<=W;if(fe){const ie=JSON.stringify(P,void 0,2);L?q||z.log("[Tracing] Discarding span since it finished after idle span final timeout",ie):z.log("[Tracing] Discarding span since it happened after idle span was finished",ie)}(!q||!L)&&(i1(g,P),A++)}),A>0&&g.setAttribute("sentry.idle_span_discarded_spans",A)}return a.push(f.on("spanStart",x=>{if(r||x===g||ye(x).timestamp)return;xa(g).includes(x)&&E(x.spanContext().spanId)})),a.push(f.on("spanEnd",x=>{r||T(x.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",x=>{x===g&&(o=!0,m(),n.size&&y())})),e.disableAutoFinish||m(),setTimeout(()=>{r||(g.setStatus({code:Xi,message:"deadline_exceeded"}),i=zT,g.end())},u),g}function WT(t){const e=So(t);return Nf(st(),e),fe&&z.log("[Tracing] Started span is an idle span"),e}const GT="7";function KT(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function YT(t){return`${KT(t)}${t.projectId}/envelope/`}function JT(t,e){const n={sentry_version:GT};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function XT(t,e,n){return e||`${YT(t)}?${JT(t,n)}`}const Fp=[];function ZT(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.values(e)}function QT(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){const o=n(e);r=Array.isArray(o)?o:[o]}else r=e;const s=ZT(r),i=s.findIndex(o=>o.name==="Debug");if(i>-1){const[o]=s.splice(i,1);s.push(o)}return s}function eI(t,e){const n={};return e.forEach(r=>{r&&Zy(t,r,n)}),n}function $p(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Zy(t,e,n){if(n[e.name]){fe&&z.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Fp.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Fp.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,i)=>r(s,i,t))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((i,o)=>r(i,o,t),{id:e.name});t.addEventProcessor(s)}fe&&z.log(`Integration installed: ${e.name}`)}function tI(t,e,n){const r=[{type:"client_report"},{timestamp:Iy(),discarded_events:t}];return Wr(e?{dsn:e}:{},[r])}class en extends Error{constructor(e,n="warn"){super(e),this.message=e,this.logLevel=n}}const jp="Not capturing exception because it's already been captured.";class nI{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=xT(e.dsn):fe&&z.warn("No DSN provided, client will not send events."),this._dsn){const s=XT(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:s})}const r=["enableTracing","tracesSampleRate","tracesSampler"].find(s=>s in e&&e[s]==null);r&&Ks(()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(e,n,r){const s=Rr();if(op(e))return fe&&z.log(jp),s;const i={event_id:s,...n};return this._process(this.eventFromException(e,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(e,n,r,s){const i={event_id:Rr(),...r},o=Ry(e)?e:String(e),a=Lf(e)?this.eventFromMessage(o,n,i):this.eventFromException(e,i);return this._process(a.then(l=>this._captureEvent(l,i,s))),i.event_id}captureEvent(e,n,r){const s=Rr();if(n&&n.originalException&&op(n.originalException))return fe&&z.log(jp),s;const i={event_id:s,...n},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,a||r)),i.event_id}captureSession(e){typeof e.release!="string"?fe&&z.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ap(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;
9return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(s=>r&&s))):Nn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const n=this._integrations[e.name];Zy(this,e,this._integrations),n||$p(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=DT(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=TT(r,CT(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){const n=PT(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${e}:${n}`;fe&&z.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}on(e,n){const r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(e,...n){const r=this._hooks[e];r&&r.forEach(s=>s(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(fe&&z.error("Error while sending envelope:",n),n)):(fe&&z.error("Transport disabled"),Nn({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=eI(this,e),$p(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const l of i){const u=l.mechanism;if(u&&u.handled===!1){r=!0;break}}}const o=e.status==="ok";(o&&e.errors===0||o&&r)&&(ap(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Oy(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,e&&r>=e&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r=st(),s=Gs()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",e,n),e.type||s.setLastEventId(e.event_id||n.event_id),ky(i,e,n,r,this,s).then(a=>{if(a===null)return a;a.contexts={trace:o1(r),...a.contexts};const l=Cy(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(s=>s.event_id,s=>{fe&&(s instanceof en&&s.logLevel==="log"?z.log(s.message):z.warn(s))})}_processEvent(e,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=eb(e),a=Qy(e),l=e.type||"error",u=`before send for type \`${l}\``,c=typeof i>"u"?void 0:el(i);if(a&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),Xa(new en(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d=l==="replay_event"?"replay":l,p=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,p).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",d,e),new en("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return h;const _=sI(this,s,h,n);return rI(_,u)}).then(h=>{if(h===null){if(this.recordDroppedEvent("before_send",d,e),o){const y=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw new en(`${u} returned \`null\`, will not send event.`,"log")}const g=r&&r.getSession();if(!o&&g&&this._updateSessionFromEvent(g,h),o){const m=h.sdkProcessingMetadata&&h.sdkProcessingMetadata.spanCountBeforeProcessing||0,y=h.spans?h.spans.length:0,E=m-y;E>0&&this.recordDroppedEvent("before_send","span",E)}const _=h.transaction_info;if(o&&_&&h.transaction!==e.transaction){const m="custom";h.transaction_info={..._,source:m}}return this.sendEvent(h,n),h}).then(null,h=>{throw h instanceof en?h:(this.captureException(h,{data:{__sentry__:!0},originalException:h}),new en(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 10Reason: ${h}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){fe&&z.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){fe&&z.log("No outcomes to send");return}if(!this._dsn){fe&&z.log("No dsn provided, will not send outcomes");return}fe&&z.log("Sending outcomes:",e);const n=tI(e,this._options.tunnel&&bo(this._dsn));this.sendEnvelope(n)}}function rI(t,e){const n=`${e} must return \`null\` or a valid event.`;if(a1(t))return t.then(r=>{if(!Wc(r)&&r!==null)throw new en(n);return r},r=>{throw new en(`${e} rejected with ${r}`)});if(!Wc(t)&&t!==null)throw new en(n);return t}function sI(t,e,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=e;if(Qy(n)&&s)return s(n,r);if(eb(n)){if(n.spans&&o){const a=[];for(const l of n.spans){const u=o(l);u?a.push(u):(Ey(),t.recordDroppedEvent("before_send","span"))}n.spans=a}if(i){if(n.spans){const a=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(n,r)}}return n}function Qy(t){return t.type===void 0}function eb(t){return t.type==="transaction"}function iI(t,e){e.debug===!0&&(fe?z.enable():Ks(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),st().update(e.initialScope);const r=new t(e);return oI(r),r.init(),r}function oI(t){st().setClient(t)}function aI(t){const e=[];function n(){return t===void 0||e.length<t}function r(o){return e.splice(e.indexOf(o),1)[0]||Promise.resolve(void 0)}function s(o){if(!n())return Xa(new en("Not adding Promise because buffer limit was reached."));const a=o();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Oy((a,l)=>{let u=e.length;if(!u)return a(!0);const c=setTimeout(()=>{o&&o>0&&a(!1)},o);e.forEach(d=>{Nn(d).then(()=>{--u||(clearTimeout(c),a(!0))},l)})})}return{$:e,add:s,drain:i}}const lI=60*1e3;function uI(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?lI:r-e}function cI(t,e){return t[e]||t.all||0}function tb(t,e,n=Date.now()){return cI(t,e)>n}function nb(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[l,u,,,c]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+uI(o,r):e===429&&(s.all=r+60*1e3);return s}const dI=64;function fI(t,e,n=aI(t.bufferSize||dI)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(Jc(o,(d,f)=>{const p=Ap(f);if(tb(r,p)){const h=Up(d,f);t.recordDroppedEvent("ratelimit_backoff",p,h)}else a.push(d)}),a.length===0)return Nn({});const l=Wr(o[0],a),u=d=>{Jc(l,(f,p)=>{const h=Up(f,p);t.recordDroppedEvent(d,Ap(p),h)})},c=()=>e({body:IT(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&fe&&z.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=nb(r,d),d),d=>{throw u("network_error"),d});return n.add(c).then(d=>d,d=>{if(d instanceof en)return fe&&z.error("Skipped sending event because buffer is full."),u("queue_overflow"),Nn({});throw d})}return{send:i,flush:s}}function Up(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function hI(t,e){const n=e&&e.getDsn(),r=e&&e.getOptions().tunnel;return gI(t,n)||pI(t,r)}function pI(t,e){return e?Bp(t)===Bp(e):!1}function gI(t,e){return e?t.includes(e.host):!1}function Bp(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function rb(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:lp})),version:lp}),t._metadata=s}
10function sb(t={}){const e=be();if(!l1()||!e)return{};const n=wy(),r=xy(n);if(r.getTraceData)return r.getTraceData(t);const s=st(),i=t.span||at(),o=i?u1(i):mI(s),a=i?Ys(i):Cy(e,s),l=c1(a);return d1.test(o)?{"sentry-trace":o,baggage:l}:(z.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function mI(t){const{traceId:e,sampled:n,spanId:r}=t.getPropagationContext();return f1(e,r,n)}const _I=100;function Qn(t,e){const n=be(),r=Gs();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=_I}=n.getOptions();if(i<=0)return;const a={timestamp:Iy(),...t},l=s?Ks(()=>s(a,e)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,e),r.addBreadcrumb(l,i))}let Hp;const vI="FunctionToString",Vp=new WeakMap,yI=(()=>({name:vI,setupOnce(){Hp=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=Mf(this),n=Vp.has(be())&&e!==void 0?e:this;return Hp.apply(n,t)}}catch{}},setup(t){Vp.set(t,!0)}})),bI=yI,SI=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],EI="InboundFilters",wI=((t={})=>({name:EI,processEvent(e,n,r){const s=r.getOptions(),i=TI(t,s);return II(e,i)?null:e}})),xI=wI;function TI(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:SI],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function II(t,e){return e.ignoreInternal&&PI(t)?(fe&&z.warn(`Event dropped due to being internal Sentry Error. 11Event: ${Bn(t)}`),!0):OI(t,e.ignoreErrors)?(fe&&z.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${Bn(t)}`),!0):NI(t)?(fe&&z.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${Bn(t)}`),!0):kI(t,e.ignoreTransactions)?(fe&&z.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 14Event: ${Bn(t)}`),!0):CI(t,e.denyUrls)?(fe&&z.warn(`Event dropped due to being matched by \`denyUrls\` option. 15Event: ${Bn(t)}. 16Url: ${tl(t)}`),!0):RI(t,e.allowUrls)?!1:(fe&&z.warn(`Event dropped due to not being matched by \`allowUrls\` option. 17Event: ${Bn(t)}. 18Url: ${tl(t)}`),!0)}function OI(t,e){return t.type||!e||!e.length?!1:AI(t).some(n=>Wn(n,e))}function kI(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?Wn(n,e):!1}function CI(t,e){if(!e||!e.length)return!1;const n=tl(t);return n?Wn(n,e):!1}function RI(t,e){if(!e||!e.length)return!0;const n=tl(t);return n?Wn(n,e):!0}function AI(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function PI(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function DI(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function tl(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?DI(e):null}catch{return fe&&z.error(`Cannot extract url for event ${Bn(t)}`),null}}function NI(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}function LI(t,e,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!Zi(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=MI(Zc(t,e,s,o.originalException,r,i.exception.values,a,0),n))}function Zc(t,e,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(Zi(r[s],Error)){zp(o,a);const u=t(e,r[s]),c=l.length;qp(u,s,c,a),l=Zc(t,e,n,r[s],s,[u,...l],u,c)}
18return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(Zi(u,Error)){zp(o,a);const d=t(e,u),f=l.length;qp(d,`errors[${c}]`,f,a),l=Zc(t,e,n,u,s,[d,...l],d,f)}}),l}function zp(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function qp(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function MI(t,e){return t.map(n=>(n.value&&(n.value=h1(n.value,e)),n))}function Pr(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function FI(t){const e="console";sr(e,t),ir(e,$I)}function $I(){"console"in Je&&p1.forEach(function(t){t in Je.console&&Pt(Je.console,t,function(e){return up[t]=e,function(...n){Kt("console",{args:n,level:t});const s=up[t];s&&s.apply(Je.console,n)}})})}function ib(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const jI="Dedupe",UI=(()=>{let t;return{name:jI,processEvent(e){if(e.type)return e;try{if(HI(e,t))return fe&&z.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}}),BI=UI;function HI(t,e){return e?!!(VI(t,e)||zI(t,e)):!1}function VI(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ab(t,e)||!ob(t,e))}function zI(t,e){const n=Wp(e),r=Wp(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!ab(t,e)||!ob(t,e))}function ob(t,e){let n=cp(t),r=cp(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function ab(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Wp(t){return t.exception&&t.exception.values&&t.exception.values[0]}function qI(t,e,n,r,s="auto.http.browser"){if(!t.fetchData)return;const i=Fr()&&e(t.fetchData.url);if(t.endTimestamp&&i){const f=t.fetchData.__span;if(!f)return;const p=r[f];p&&(KI(p,t),delete r[f]);return}const{method:o,url:a}=t.fetchData,l=GI(a),u=l?Pr(l).host:void 0,c=!!at(),d=i&&c?So({name:`${o} ${a}`,attributes:{url:a,type:"fetch","http.method":o,"http.url":l,"server.address":u,[pt]:s,[Is]:"http.client"}}):new Xs;if(t.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(t.fetchData.url)){const f=t.args[0],p=t.args[1]||{},h=WI(f,p,Fr()&&c?d:void 0);h&&(t.args[1]=p,p.headers=h)}return d}function WI(t,e,n){const r=sb({span:n}),s=r["sentry-trace"],i=r.baggage;if(!s)return;const o=e.headers||(YI(t)?t.headers:void 0);if(o)if(JI(o)){const a=new Headers(o);if(a.set("sentry-trace",s),i){const l=a.get("baggage");if(l){const u=Uo(l);a.set("baggage",u?`${u},${i}`:i)}else a.set("baggage",i)}return a}else if(Array.isArray(o)){const a=[...o.filter(l=>!(Array.isArray(l)&&l[0]==="sentry-trace")).map(l=>{if(Array.isArray(l)&&l[0]==="baggage"&&typeof l[1]=="string"){const[u,c,...d]=l;return[u,Uo(c),...d]}else return l}),["sentry-trace",s]];return i&&a.push(["baggage",i]),a}else{const a="baggage"in o?o.baggage:void 0;let l=[];return Array.isArray(a)?l=a.map(u=>typeof u=="string"?Uo(u):u).filter(u=>u===""):a&&l.push(Uo(a)),i&&l.push(i),{...o,"sentry-trace":s,baggage:l.length>0?l.join(","):void 0}}else return{...r}}function GI(t){try{return new URL(t).href}catch{return}}function KI(t,e){if(e.response){Ay(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus({code:Xi,message:"internal_error"});t.end()}function Uo(t){return t.split(",").filter(e=>!e.split("=")[0].startsWith(g1)).join(",")}function YI(t){return typeof Request<"u"&&Zi(t,Request)}function JI(t){return typeof Headers<"u"&&Zi(t,Headers)}function lb(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const Qc=Je;function ub(){if(!("fetch"in Qc))return!1;
18try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ed(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function XI(){if(typeof EdgeRuntime=="string")return!0;if(!ub())return!1;if(ed(Qc.fetch))return!0;let t=!1;const e=Qc.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=ed(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Gl&&z.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function cb(t,e){const n="fetch";sr(n,t),ir(n,()=>db(void 0,e))}function ZI(t){const e="fetch-body-resolved";sr(e,t),ir(e,()=>db(eO))}function db(t,e=!1){e&&!XI()||Pt(Je,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=tO(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:Ct()*1e3,virtualError:s};return t||Kt("fetch",{...a}),n.apply(Je,r).then(async l=>(t?t(l):Kt("fetch",{...a,endTimestamp:Ct()*1e3,response:l}),l),l=>{throw Kt("fetch",{...a,endTimestamp:Ct()*1e3,error:l}),Py(l)&&l.stack===void 0&&(l.stack=s.stack,Ts(l,"framesToPop",1)),l})}})}async function QI(t,e){if(t&&t.body){const n=t.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(o),a&&(e(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function eO(t){let e;try{e=t.clone()}catch{return}QI(e,()=>{Kt("fetch-body-resolved",{endTimestamp:Ct()*1e3,response:t})})}function td(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Gp(t){return typeof t=="string"?t:t?td(t,"url")?t.url:t.toString?t.toString():"":""}function tO(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:Gp(n),method:td(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:Gp(e),method:td(e,"method")?String(e.method).toUpperCase():"GET"}}function nO(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function rO(){return"npm"}function sO(){return!nO()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Kp(){return typeof window<"u"&&(!sO()||iO())}function iO(){const t=Je.process;return!!t&&t.type==="renderer"}const Bo=Je;function oO(){const t=Bo.chrome,e=t&&t.app&&t.app.runtime,n="history"in Bo&&!!Bo.history.pushState&&!!Bo.history.replaceState;return!e&&n}function aO(t,e){return t??e()}function Oa(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}const J=Je;let nd=0;function fb(){return nd>0}function lO(){nd++,setTimeout(()=>{nd--})}function ks(t,e={}){function n(s){return typeof s=="function"}if(!n(t))return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(Mf(t))return t}catch{return t}const r=function(...s){try{const i=s.map(o=>ks(o,e));return t.apply(this,i)}catch(i){throw lO(),Df(o=>{o.addEventProcessor(a=>(e.mechanism&&(Gc(a,void 0),Qi(a,e.mechanism)),a.extra={...a.extra,arguments:s},a)),Ff(i)}),i}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}m1(r,t),Ts(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}const xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function zf(t,e){const n=qf(t,e),r={type:hO(e),value:pO(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function uO(t,e,n,r){const s=be(),i=s&&s.getOptions().normalizeDepth,o=yO(e),a={__serialized__:v1(e,i)};if(o)return{exception:{values:[zf(t,o)]},extra:a};const l={exception:{values:[{type:$f(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:_O(e,{isUnhandledRejection:r})}]},extra:a};if(n){const u=qf(t,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function Ou(t,e){return{exception:{values:[zf(t,e)]}}}function qf(t,e){const n=e.stacktrace||e.stack||"",r=dO(e),s=fO(e);try{return t(n,r,s)}catch{}return[]}const cO=/Minified React error #\d+;/i;function dO(t){return t&&cO.test(t.message)?1:0}function fO(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function hb(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function hO(t){const e=t&&t.name;return!e&&hb(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function pO(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:hb(t)&&Array.isArray(t.message)&&t.message.length==2?t.message[1]:e:"No error message"}function gO(t,e,n,r){const s=n&&n.syntheticException||void 0,i=Wf(t,e,s,r);return Qi(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Nn(i)}function mO(t,e,n="info",r,s){const i=r&&r.syntheticException||void 0,o=rd(t,e,
18i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Nn(o)}function Wf(t,e,n,r,s){let i;if(Dy(e)&&e.error)return Ou(t,e.error);if(dp(e)||_1(e)){const o=e;if("stack"in e)i=Ou(t,e);else{const a=o.name||(dp(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=rd(t,l,n,r),Gc(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Py(e)?Ou(t,e):Wc(e)||$f(e)?(i=uO(t,e,n,s),Qi(i,{synthetic:!0}),i):(i=rd(t,e,n,r),Gc(i,`${e}`),Qi(i,{synthetic:!0}),i)}function rd(t,e,n,r){const s={};if(r&&n){const i=qf(t,n);i.length&&(s.exception={values:[{value:e,stacktrace:{frames:i}}]}),Qi(s,{synthetic:!0})}if(Ry(e)){const{__sentry_template_string__:i,__sentry_template_values__:o}=e;return s.logentry={message:i,params:o},s}return s.message=e,s}function _O(t,{isUnhandledRejection:e}){const n=y1(t),r=e?"promise rejection":"exception";return Dy(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:$f(t)?`Event \`${vO(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function vO(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function yO(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}}function bO(t,{metadata:e,tunnel:n,dsn:r}){const s={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:bo(r)}},i=SO(t);return Wr(s,[i])}function SO(t){return[{type:"user_report"},t]}class EO extends nI{constructor(e){const n={parentSpanIsAlwaysRootSpan:!0,...e},r=J.SENTRY_SDK_SOURCE||rO();rb(n,"browser",["browser"],r),super(n),n.sendClientReports&&J.document&&J.document.addEventListener("visibilitychange",()=>{J.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return gO(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return mO(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){xe&&z.warn("SDK not enabled, will not capture user feedback.");return}const n=bO(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}}const Gf=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,wO=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",Zs=(t,e,n,r)=>{let s,i;return o=>{e.value>=0&&(o||r)&&(i=e.value-(s||0),(i||s===void 0)&&(s=e.value,e.delta=i,e.rating=wO(e.value,n),t(e)))}},X=Je,xO=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Eo=(t=!0)=>{const e=X.performance&&X.performance.getEntriesByType&&X.performance.getEntriesByType("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e},wo=()=>{const t=Eo();return t&&t.activationStart||0},Qs=(t,e)=>{const n=Eo();let r="navigate";return n&&(X.document&&X.document.prerendering||wo()>0?r="prerender":X.document&&X.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:xO(),navigationType:r}},Gr=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{e(s.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},ei=t=>{const e=n=>{(n.type==="pagehide"||X.document&&X.document.visibilityState==="hidden")&&t(n)};X.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},Xl=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let Ni=-1;const TO=()=>X.document.visibilityState==="hidden"&&!X.document.prerendering?0:1/0,nl=t=>{X.document.visibilityState==="hidden"&&Ni>-1&&(Ni=t.type==="visibilitychange"?t.timeStamp:0,OO())},IO=()=>{addEventListener("visibilitychange",nl,!0),addEventListener("prerenderingchange",nl,!0)},OO=()=>{removeEventListener("visibilitychange",nl,!0),removeEventListener("prerenderingchange",nl,!0)},Zl=()=>(X.document&&Ni<0&&(Ni=TO(),IO()),{get firstHiddenTime(){return Ni}}),xo=t=>{X.document&&X.document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},kO=[1800,3e3],CO=(t,e={})=>{xo(()=>{const n=Zl(),r=Qs("FCP");let s;const o=Gr("paint",a=>{a.forEach(l=>{l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-wo(),0),r.entries.push(l),s(!0)))})});o&&(s=Zs(t,r,kO,e.reportAllChanges))})},RO=[.1,.25],AO=(t,e={})=>{CO(Xl(()=>{const n=Qs("CLS",0);let r,s=0,i=[];const o=l=>{l.forEach(u=>{if(!u.hadRecentInput){const c=i[0],d=i[i.length-1];s&&c&&d&&u.startTime-d.startTime<1e3&&u.startTime-c.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u])}}),s>n.value&&(n.value=s,n.entries=i,r())},a=Gr("layout-shift",o);a&&(r=Zs(t,n,RO,e.reportAllChanges),ei(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},PO=[100,300],DO=(t,e={})=>{xo(()=>{const n=Zl(),r=Qs("FID");let s;const i=l=>{l.startTime<n.firstHiddenTime&&(r.value=l.processingStart-l.startTime,r.entries.push(l),s(!0))},o=l=>{l.forEach(i)},a=Gr("first-input",o);s=Zs(t,r,PO,e.reportAllChanges),a&&ei(Xl(()=>{o(a.takeRecords()),a.disconnect()}))})};let pb=0,ku=1/0,Ho=0;const NO=t=>
18{t.forEach(e=>{e.interactionId&&(ku=Math.min(ku,e.interactionId),Ho=Math.max(Ho,e.interactionId),pb=Ho?(Ho-ku)/7+1:0)})};let sd;const LO=()=>sd?pb:performance.interactionCount||0,MO=()=>{"interactionCount"in performance||sd||(sd=Gr("event",NO,{type:"event",buffered:!0,durationThreshold:0}))},Sn=[],Cu=new Map,FO=40;let $O=0;const jO=()=>LO()-$O,UO=()=>{const t=Math.min(Sn.length-1,Math.floor(jO()/50));return Sn[t]},Ru=10,BO=[],HO=t=>{if(BO.forEach(r=>r(t)),!(t.interactionId||t.entryType==="first-input"))return;const e=Sn[Sn.length-1],n=Cu.get(t.interactionId);if(n||Sn.length<Ru||e&&t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(t);else{const r={id:t.interactionId,latency:t.duration,entries:[t]};Cu.set(r.id,r),Sn.push(r)}Sn.sort((r,s)=>s.latency-r.latency),Sn.length>Ru&&Sn.splice(Ru).forEach(r=>Cu.delete(r.id))}},gb=t=>{const e=X.requestIdleCallback||X.setTimeout;let n=-1;return t=Xl(t),X.document&&X.document.visibilityState==="hidden"?t():(n=e(t),ei(t)),n},VO=[200,500],zO=(t,e={})=>{"PerformanceEventTiming"in X&&"interactionId"in PerformanceEventTiming.prototype&&xo(()=>{MO();const n=Qs("INP");let r;const s=o=>{gb(()=>{o.forEach(HO);const a=UO();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())})},i=Gr("event",s,{durationThreshold:e.durationThreshold!=null?e.durationThreshold:FO});r=Zs(t,n,VO,e.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),ei(()=>{s(i.takeRecords()),r(!0)}))})},qO=[2500,4e3],Yp={},WO=(t,e={})=>{xo(()=>{const n=Zl(),r=Qs("LCP");let s;const i=a=>{e.reportAllChanges||(a=a.slice(-1)),a.forEach(l=>{l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-wo(),0),r.entries=[l],s())})},o=Gr("largest-contentful-paint",i);if(o){s=Zs(t,r,qO,e.reportAllChanges);const a=Xl(()=>{Yp[r.id]||(i(o.takeRecords()),o.disconnect(),Yp[r.id]=!0,s(!0))});["keydown","click"].forEach(l=>{X.document&&addEventListener(l,()=>gb(a),{once:!0,capture:!0})}),ei(a)}})},GO=[800,1800],id=t=>{X.document&&X.document.prerendering?xo(()=>id(t)):X.document&&X.document.readyState!=="complete"?addEventListener("load",()=>id(t),!0):setTimeout(t,0)},KO=(t,e={})=>{const n=Qs("TTFB"),r=Zs(t,n,GO,e.reportAllChanges);id(()=>{const s=Eo();s&&(n.value=Math.max(s.responseStart-wo(),0),n.entries=[s],r(!0))})},Li={},rl={};let mb,_b,vb,yb,bb;function Kf(t,e=!1){return To("cls",t,JO,mb,e)}function Sb(t,e=!1){return To("lcp",t,ZO,vb,e)}function Eb(t){return To("fid",t,XO,_b)}function YO(t){return To("ttfb",t,QO,yb)}function wb(t){return To("inp",t,ek,bb)}function Cs(t,e){return xb(t,e),rl[t]||(tk(t),rl[t]=!0),Tb(t,e)}function ti(t,e){const n=Li[t];if(!(!n||!n.length))for(const r of n)try{r(e)}catch(s){Gf&&z.error(`Error while triggering instrumentation handler. 19Type: ${t} 20Name: ${Jn(r)} 21Error:`,s)}}function JO(){return AO(t=>{ti("cls",{metric:t}),mb=t},{reportAllChanges:!0})}function XO(){return DO(t=>{ti("fid",{metric:t}),_b=t})}function ZO(){return WO(t=>{ti("lcp",{metric:t}),vb=t},{reportAllChanges:!0})}function QO(){return KO(t=>{ti("ttfb",{metric:t}),yb=t})}function ek(){return zO(t=>{ti("inp",{metric:t}),bb=t})}function To(t,e,n,r,s=!1){xb(t,e);let i;return rl[t]||(i=n(),rl[t]=!0),r&&e({metric:r}),Tb(t,e,s?i:void 0)}function tk(t){const e={};t==="event"&&(e.durationThreshold=0),Gr(t,n=>{ti(t,{entries:n})},e)}function xb(t,e){Li[t]=Li[t]||[],Li[t].push(e)}function Tb(t,e,n){return()=>{n&&n();const r=Li[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}function nk(t){return"duration"in t}function Au(t){return typeof t=="number"&&isFinite(t)}function Ln(t,e,n,{...r}){const s=ye(t).start_timestamp;return s&&s>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),Yy(t,()=>{const i=So({startTime:e,...r});return i&&i.end(n),i})}function Ib(t){const e=be();if(!e)return;const{name:n,transaction:r,attributes:s,startTime:i}=t,{release:o,environment:a}=e.getOptions(),l=e.getIntegrationByName("Replay"),u=l&&l.getReplayId(),c=st(),d=c.getUser(),f=d!==void 0?d.email||d.id||d.ip_address:void 0;let p;try{p=c.getScopeData().contexts.profile.profile_id}catch{}const h={release:o,environment:a,user:f||void 0,profile_id:p||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":X.navigator&&X.navigator.userAgent,...s};return So({name:n,attributes:h,startTime:i,experimental:{standalone:!0}})}function Yf(){return X&&X.addEventListener&&X.performance}function nt(t){return t/1e3}function Ob(t){let e="unknown",n="unknown",r="";for(const s of t){if(s==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=s}return r===t&&(e=r),{name:e,version:n}}function rk(){let t=0,e,n;if(!ik())return;let r=!1;function s(){r||(r=!0,n&&sk(t,e,n),i())}const i=Kf(({metric:o})=>{const a=o.entries[o.entries.length-1];a&&(t=o.value,e=a)},!0);ei(()=>{s()}),setTimeout(()=>{const o=be();if(!o)return;const a=o.on("startNavigationSpan",()=>{s(),a&&a()}),l=at(),u=l&&ht(l),c=u&&ye(u);c&&c.op==="pageload"&&(n=u.spanContext().spanId)},0)}function sk(t,e,n){Gf&&z.log(`Sending CLS span (${t})`);const r=nt((gt||0)+(e&&e.startTime||0)),s=st().getScopeData().transactionName,i=e?Zn(e.sources[0]&&e.sources[0].node):"Layout shift",o=Xn({[pt]:"auto.http.browser.cls",[Is]:"ui.webvital.cls",[Pf]:e&&e.duration||0,"sentry.pageload.span_id":n}),a=Ib({name:i,transaction:s,attributes:o,startTime:r});a&&(a.addEvent("cls",{[Yl]:"",[Jl]:t}),a.end(r))}function ik(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const ok=2147483647;let Jp=0,dt={},Rt,Mi;function ak({recordClsStandaloneSpans:t}){const e=Yf();if(e&>){e.mark&&X.performance.mark("sentry-tracing-init");const n=hk(),r=fk(),s=pk(),i=t?rk():dk();return()=>{n(),r(),s(),i&&i()}}return()=>{}}function lk(){Cs("longtask",({entries:t})=>{const e=at();if(!e)return;const{op:n,start_timestamp:r}=ye(e);for(const s of t){const i=nt(gt+s.startTime),o=nt(s.duration);n==="navigation"&&r&&i<r||Ln(e,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[pt]:"auto.ui.browser.metrics"}})}})}function uk(){new PerformanceObserver(e=>{const n=at();if(n)for(const r of e.getEntries()){if(!r.scripts[0])continue;const s=nt(gt+r.startTime),{start_timestamp:i,op:o}=ye(n);if(o==="navigation"&&i&&s<i)continue;const a=nt(r.duration),l={[pt]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:p,sourceCharPosition:h}=u;l["browser.script.invoker"]=c,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),p&&(l["code.function"]=p),h!==-1&&(l["browser.script.source_char_position"]=h),Ln(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function ck(){Cs("event",({entries:t})=>{const e=at();if(e){for(const n of t)if(n.name==="click"){const r=nt(gt+n.startTime),s=nt(n.duration),i={name:Zn(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[pt]:"auto.ui.browser.metrics"}},o=Ny(n.target);o&&(i.attributes["ui.component_name"]=o),Ln(e,r,r+s,i)}}})}function dk(){return Kf(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(dt.cls={value:t.value,unit:""},Mi=e)},!0)}function fk(){return Sb(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(dt.lcp={value:t.value,unit:"millisecond"},Rt=e)},!0)}function hk(){return Eb(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=nt(gt),r=nt(e.startTime);dt.fid={value:t.value,unit:"millisecond"},dt["mark.fid"]={value:n+r,unit:"second"}})}function pk(){return YO(({metric:t})=>{t.entries[t.entries.length-1]&&(dt.ttfb={value:t.value,unit:"millisecond"})})}function gk(t,e){const n=Yf();if(!n||!n.getEntries||!gt)return;const r=nt(gt),s=n.getEntries(),{op:i,start_timestamp:o}=ye(t);
21if(s.slice(Jp).forEach(a=>{const l=nt(a.startTime),u=nt(Math.max(0,a.duration));if(!(i==="navigation"&&o&&r+l<o))switch(a.entryType){case"navigation":{_k(t,a,r);break}case"mark":case"paint":case"measure":{mk(t,a,l,u,r);const c=Zl(),d=a.startTime<c.firstHiddenTime;a.name==="first-paint"&&d&&(dt.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&d&&(dt.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{bk(t,a,a.name,l,u,r);break}}}),Jp=Math.max(s.length-1,0),Sk(t),i==="pageload"){wk(dt);const a=dt["mark.fid"];a&&dt.fid&&(Ln(t,a.value,a.value+nt(dt.fid.value),{name:"first input delay",op:"ui.action",attributes:{[pt]:"auto.ui.browser.metrics"}}),delete dt["mark.fid"]),(!("fcp"in dt)||!e.recordClsOnPageloadSpan)&&delete dt.cls,Object.entries(dt).forEach(([l,u])=>{LT(l,u.value,u.unit)}),t.setAttribute("performance.timeOrigin",r),t.setAttribute("performance.activationStart",wo()),Ek(t)}Rt=void 0,Mi=void 0,dt={}}function mk(t,e,n,r,s){const i=Eo(!1),o=nt(i?i.requestStart:0),a=s+Math.max(n,o),l=s+n,u=l+r,c={[pt]:"auto.resource.browser.metrics"};a!==l&&(c["sentry.browser.measure_happened_before_request"]=!0,c["sentry.browser.measure_start_time"]=a),a<=u&&Ln(t,a,u,{name:e.name,op:e.entryType,attributes:c})}function _k(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Vo(t,e,r,n)}),Vo(t,e,"secureConnection",n,"TLS/SSL"),Vo(t,e,"fetch",n,"cache"),Vo(t,e,"domainLookup",n,"DNS"),yk(t,e,n)}function Vo(t,e,n,r,s=n){const i=vk(n),o=e[i],a=e[`${n}Start`];!a||!o||Ln(t,r+nt(a),r+nt(o),{op:`browser.${s}`,name:e.name,attributes:{[pt]:"auto.ui.browser.metrics"}})}function vk(t){return t==="secureConnection"?"connectEnd":t==="fetch"?"domainLookupStart":`${t}End`}function yk(t,e,n){const r=n+nt(e.requestStart),s=n+nt(e.responseEnd),i=n+nt(e.responseStart);e.responseEnd&&(Ln(t,r,s,{op:"browser.request",name:e.name,attributes:{[pt]:"auto.ui.browser.metrics"}}),Ln(t,i,s,{op:"browser.response",name:e.name,attributes:{[pt]:"auto.ui.browser.metrics"}}))}function bk(t,e,n,r,s,i){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const o=Pr(n),a={[pt]:"auto.resource.browser.metrics"};Pu(a,e,"transferSize","http.response_transfer_size"),Pu(a,e,"encodedBodySize","http.response_content_length"),Pu(a,e,"decodedBodySize","http.decoded_response_content_length");const l=e.deliveryType;l!=null&&(a["http.response_delivery_type"]=l);const u=e.renderBlockingStatus;u&&(a["resource.render_blocking_status"]=u),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(X.location.origin);const{name:c,version:d}=Ob(e.nextHopProtocol);a["network.protocol.name"]=c,a["network.protocol.version"]=d;const f=i+r,p=f+s;Ln(t,f,p,{name:n.replace(X.location.origin,""),op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",attributes:a})}function Sk(t){const e=X.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&t.setAttribute("connectionType",n.type),Au(n.rtt)&&(dt["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Au(e.deviceMemory)&&t.setAttribute("deviceMemory",`${e.deviceMemory} GB`),Au(e.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}function Ek(t){Rt&&(Rt.element&&t.setAttribute("lcp.element",Zn(Rt.element)),Rt.id&&t.setAttribute("lcp.id",Rt.id),Rt.url&&t.setAttribute("lcp.url",Rt.url.trim().slice(0,200)),Rt.loadTime!=null&&t.setAttribute("lcp.loadTime",Rt.loadTime),Rt.renderTime!=null&&t.setAttribute("lcp.renderTime",Rt.renderTime),t.setAttribute("lcp.size",Rt.size)),Mi&&Mi.sources&&Mi.sources.forEach((e,n)=>t.setAttribute(`cls.source.${n+1}`,Zn(e.node)))}function Pu(t,e,n,r){const s=e[n];s!=null&&s<ok&&(t[r]=s)}function wk(t){const e=Eo(!1);if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const xk=1e3;let Xp,od,ad;function kb(t){sr("dom",t),ir("dom",Tk)}function Tk(){if(!X.document)return;const t=Kt.bind(null,"dom"),e=Zp(t,!0);X.document.addEventListener("click",e,!1),X.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const s=X[n],i=s&&s.prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Pt(i,"addEventListener",function(o){return function(a,l,u){if(a==="click"||a=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=c[a]=c[a]||{refCount:0};if(!d.handler){const f=Zp(t);d.handler=f,o.call(this,a,f,u)}d.refCount++}catch{}return o.call(this,a,l,u)}}),Pt(i,"removeEventListener",function(o){return function(a,l,u){if(a==="click"||a=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},d=c[a];d&&(d.refCount--,d.refCount<=0&&(o.call(this,a,d.handler,u),d.handler=void 0,delete c[a]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,a,l,u)}}))})}function Ik(t){if(t.type!==od)return!1;try{if(!t.target||t.target._sentryId!==ad)return!1}catch{}return!0}function Ok(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Zp(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=kk(n);
21if(Ok(n.type,r))return;Ts(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ts(r,"_sentryId",Rr());const s=n.type==="keypress"?"input":n.type;Ik(n)||(t({event:n,name:s,global:e}),od=n.type,ad=r?r._sentryId:void 0),clearTimeout(Xp),Xp=X.setTimeout(()=>{ad=void 0,od=void 0},xk)}}function kk(t){try{return t.target}catch{return null}}let zo;function Ql(t){const e="history";sr(e,t),ir(e,Ck)}function Ck(){if(!oO())return;const t=X.onpopstate;X.onpopstate=function(...n){const r=X.location.href,s=zo;if(zo=r,Kt("history",{from:s,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=zo,o=String(s);zo=o,Kt("history",{from:i,to:o})}return n.apply(this,r)}}Pt(X.history,"pushState",e),Pt(X.history,"replaceState",e)}const ka={};function Cb(t){const e=ka[t];if(e)return e;let n=X[t];if(ed(n))return ka[t]=n.bind(X);const r=X.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i&&i[t]&&(n=i[t]),r.head.removeChild(s)}catch(s){Gf&&z.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,s)}return n&&(ka[t]=n.bind(X))}function Qp(t){ka[t]=void 0}function Rs(...t){return Cb("setTimeout")(...t)}const Tr="__sentry_xhr_v3__";function Rb(t){sr("xhr",t),ir("xhr",Rk)}function Rk(){if(!X.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){const s=new Error,i=Ct()*1e3,o=Di(r[0])?r[0].toUpperCase():void 0,a=Ak(r[1]);if(!o||!a)return e.apply(n,r);n[Tr]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[Tr];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:Ct()*1e3,startTimestamp:i,xhr:n,virtualError:s};Kt("xhr",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,c,d){return l(),u.apply(c,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,c,d){const[f,p]=d,h=c[Tr];return h&&Di(f)&&Di(p)&&(h.request_headers[f.toLowerCase()]=p),u.apply(c,d)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){const s=n[Tr];if(!s)return e.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:Ct()*1e3,xhr:n};return Kt("xhr",i),e.apply(n,r)}})}function Ak(t){if(Di(t))return t;try{return t.toString()}catch{}}const Du=[],Ca=new Map;function Pk(){if(Yf()&>){const e=Dk();return()=>{e()}}return()=>{}}const eg={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Dk(){return wb(({metric:t})=>{if(t.value==null)return;const e=t.entries.find(h=>h.duration===t.value&&eg[h.name]);if(!e)return;const{interactionId:n}=e,r=eg[e.name],s=nt(gt+e.startTime),i=nt(t.value),o=at(),a=o?ht(o):void 0,u=(n!=null?Ca.get(n):void 0)||a,c=u?ye(u).description:st().getScopeData().transactionName,d=Zn(e.target),f=Xn({[pt]:"auto.http.browser.inp",[Is]:`ui.interaction.${r}`,[Pf]:e.duration}),p=Ib({name:d,transaction:c,attributes:f,startTime:s});p&&(p.addEvent("inp",{[Yl]:"millisecond",[Jl]:t.value}),p.end(s+i))})}function Nk(t){const e=({entries:n})=>{const r=at(),s=r&&ht(r);n.forEach(i=>{if(!nk(i)||!s)return;const o=i.interactionId;if(o!=null&&!Ca.has(o)){if(Du.length>10){const a=Du.shift();Ca.delete(a)}Du.push(o),Ca.set(o,s)}})};Cs("event",e),Cs("first-input",e)}function Lk(t,e=Cb("fetch")){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return Qp("fetch"),Xa("No fetch implementation available");try{return e(t.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Qp("fetch"),n-=o,r--,Xa(l)}}return fI(t,s)}const Mk=30,Fk=50;function ld(t,e,n,r){const s={filename:t,function:e==="<anonymous>"?Os:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}
21const $k=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,jk=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Uk=/\((\S*)(?::(\d+))(?::(\d+))\)/,Bk=t=>{const e=$k.exec(t);if(e){const[,r,s,i]=e;return ld(r,Os,+s,+i)}const n=jk.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=Uk.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=Ab(n[1]||Os,n[2]);return ld(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Hk=[Mk,Bk],Vk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,zk=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,qk=t=>{const e=Vk.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=zk.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],s=e[1]||Os;return[s,r]=Ab(s,r),ld(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Wk=[Fk,qk],Gk=[Hk,Wk],Kk=b1(...Gk),Ab=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Os,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},qo=1024,Yk="Breadcrumbs",Jk=((t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:Yk,setup(n){e.console&&FI(eC(n)),e.dom&&kb(Qk(n,e.dom)),e.xhr&&Rb(tC(n)),e.fetch&&cb(nC(n)),e.history&&Ql(rC(n)),e.sentry&&n.on("beforeSendEvent",Zk(n))}}}),Xk=Jk;function Zk(t){return function(n){be()===t&&Qn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Bn(n)},{event:n})}}function Qk(t,e){return function(r){if(be()!==t)return;let s,i,o=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>qo&&(xe&&z.warn(`\`dom.maxStringLength\` cannot exceed ${qo}, but a value of ${a} was configured. Sentry will use ${qo} instead.`),a=qo),typeof o=="string"&&(o=[o]);try{const u=r.event,c=sC(u)?u.target:u;s=Zn(c,{keyAttrs:o,maxStringLength:a}),i=Ny(c)}catch{s="<unknown>"}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),Qn(l,{event:r.event,name:r.name,global:r.global})}}function eC(t){return function(n){if(be()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ib(n.level),message:fp(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${fp(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Qn(r,{input:n.args,level:n.level})}}function tC(t){return function(n){if(be()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Tr];if(!r||!s||!i)return;const{method:o,url:a,status_code:l,body:u}=i,c={method:o,url:a,status_code:l},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f=lb(l);Qn({category:"xhr",data:c,type:"http",level:f},d)}}function nC(t){return function(n){if(be()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};Qn({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s},l=lb(o.status_code);Qn({category:"fetch",data:o,type:"http",level:l},a)}}}function rC(t){return function(n){if(be()!==t)return;let r=n.from,s=n.to;const i=Pr(J.location.href);let o=r?Pr(r):void 0;const a=Pr(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),Qn({category:"navigation",data:{from:r,to:s}})}}function sC(t){return!!t&&!!t.target}const iC=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],oC="BrowserApiErrors",aC=((t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:oC,setupOnce(){e.setTimeout&&Pt(J,"setTimeout",tg),e.setInterval&&Pt(J,"setInterval",tg),e.requestAnimationFrame&&Pt(J,"requestAnimationFrame",uC),e.XMLHttpRequest&&"XMLHttpRequest"in J&&Pt(XMLHttpRequest.prototype,"send",cC);const n=e.eventTarget;
21n&&(Array.isArray(n)?n:iC).forEach(dC)}}}),lC=aC;function tg(t){return function(...e){const n=e[0];return e[0]=ks(n,{mechanism:{data:{function:Jn(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function uC(t){return function(e){return t.apply(this,[ks(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Jn(t)},handled:!1,type:"instrument"}})])}}function cC(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&Pt(n,s,function(i){const o={mechanism:{data:{function:s,handler:Jn(i)},handled:!1,type:"instrument"}},a=Mf(i);return a&&(o.mechanism.data.handler=Jn(a)),ks(i,o)})}),t.apply(this,e)}}function dC(t){const n=J[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Pt(r,"addEventListener",function(s){return function(i,o,a){try{fC(o)&&(o.handleEvent=ks(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Jn(o),target:t},handled:!1,type:"instrument"}}))}catch{}return s.apply(this,[i,ks(o,{mechanism:{data:{function:"addEventListener",handler:Jn(o),target:t},handled:!1,type:"instrument"}}),a])}}),Pt(r,"removeEventListener",function(s){return function(i,o,a){try{const l=o.__sentry_wrapped__;l&&s.call(this,i,l,a)}catch{}return s.call(this,i,o,a)}}))}function fC(t){return typeof t.handleEvent=="function"}const hC=()=>({name:"BrowserSession",setupOnce(){if(typeof J.document>"u"){xe&&z.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}hp({ignoreDuration:!0}),pp(),Ql(({from:t,to:e})=>{t!==void 0&&t!==e&&(hp({ignoreDuration:!0}),pp())})}}),pC="GlobalHandlers",gC=((t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:pC,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(_C(n),ng("onerror")),e.onunhandledrejection&&(vC(n),ng("onunhandledrejection"))}}}),mC=gC;function _C(t){Hy(e=>{const{stackParser:n,attachStacktrace:r}=Pb();if(be()!==t||fb())return;const{msg:s,url:i,line:o,column:a,error:l}=e,u=SC(Wf(n,l||s,void 0,r,!1),i,o,a);u.level="error",Ly(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function vC(t){Vy(e=>{const{stackParser:n,attachStacktrace:r}=Pb();if(be()!==t||fb())return;const s=yC(e),i=Lf(s)?bC(s):Wf(n,s,void 0,r,!0);i.level="error",Ly(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function yC(t){if(Lf(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function bC(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function SC(t,e,n,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],u=r,c=n,d=Di(e)&&e.length>0?e:My();return l.length===0&&l.push({colno:u,filename:d,function:Os,in_app:!0,lineno:c}),t}function ng(t){xe&&z.log(`Global Handler attached: ${t}`)}function Pb(){const t=be();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const EC=()=>({name:"HttpContext",preprocessEvent(t){if(!J.navigator&&!J.location&&!J.document)return;const e=t.request&&t.request.url||J.location&&J.location.href,{referrer:n}=J.document||{},{userAgent:r}=J.navigator||{},s={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:s};t.request=i}}),wC="cause",xC=5,TC="LinkedErrors",IC=((t={})=>{const e=t.limit||xC,n=t.key||wC;return{name:TC,preprocessEvent(r,s,i){const o=i.getOptions();LI(zf,o.stackParser,o.maxValueLength,n,e,r,s)}}}),OC=IC;function kC(t){const e=[xI(),bI(),lC(),Xk(),mC(),OC(),BI(),EC()];return t.autoSessionTracking!==!1&&e.push(hC()),e}function CC(t={}){const e={defaultIntegrations:kC(t),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:J.SENTRY_RELEASE&&J.SENTRY_RELEASE.id?J.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return t.defaultIntegrations==null&&delete t.defaultIntegrations,{...e,...t}}function RC(){const t=typeof J.window<"u"&&J;if(!t)return!1;const e=t.chrome?"chrome":"browser",n=t[e],r=n&&n.runtime&&n.runtime.id,s=J.location&&J.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&J===J.top&&i.some(l=>s.startsWith(`${l}//`)),a=typeof t.nw<"u";return!!r&&!o&&!a}function AC(t={}){const e=CC(t);
21if(!e.skipBrowserExtensionCheck&&RC()){Ks(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}xe&&(ub()||z.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...e,stackParser:S1(e.stackParser||Kk),integrations:QT(e),transport:e.transport||Lk};return iI(EO,n)}const Fe=Je,Jf="sentryReplaySession",PC="replay_event",Xf="Unable to send Replay",DC=3e5,NC=9e5,LC=5e3,MC=5500,FC=6e4,$C=5e3,jC=3,rg=15e4,Wo=5e3,UC=3e3,BC=300,Zf=2e7,HC=4999,VC=15e3,sg=36e5;function ud(t,e){return t??e()}function eo(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}var ot;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(ot||(ot={}));function zC(t){return t.nodeType===t.ELEMENT_NODE}function Fi(t){const e=eo([t,"optionalAccess",n=>n.host]);return eo([e,"optionalAccess",n=>n.shadowRoot])===t}function $i(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function qC(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function WC(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function sl(t){try{const e=t.rules||t.cssRules;return e?qC(Array.from(e,Db).join("")):null}catch{return null}}function GC(t){let e="";for(let n=0;n<t.style.length;n++){const r=t.style,s=r[n],i=r.getPropertyPriority(s);e+=`${s}:${r.getPropertyValue(s)}${i?" !important":""};`}return`${t.selectorText} { ${e} }`}function Db(t){let e;if(YC(t))try{e=sl(t.styleSheet)||WC(t)}catch{}else if(JC(t)){let n=t.cssText;const r=t.selectorText.includes(":"),s=typeof t.style.all=="string"&&t.style.all;if(s&&(n=GC(t)),r&&(n=KC(n)),r||s)return n}return e||t.cssText}function KC(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function YC(t){return"styleSheet"in t}function JC(t){return"selectorText"in t}class Nb{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;const n=eo([this,"access",r=>r.getMeta,"call",r=>r(e),"optionalAccess",r=>r.id]);return ud(n,()=>-1)}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){const r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){const r=this.getNode(e);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function XC(){return new Nb}function eu({maskInputOptions:t,tagName:e,type:n}){return e==="OPTION"&&(e="SELECT"),!!(t[e.toLowerCase()]||n&&t[n]||n==="password"||e==="INPUT"&&!n&&t.text)}function to({isMasked:t,element:e,value:n,maskInputFn:r}){let s=n||"";return t?(r&&(s=r(s,e)),"*".repeat(s.length)):s}function As(t){return t.toLowerCase()}function cd(t){return t.toUpperCase()}const ig="__rrweb_original__";function ZC(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let r=0;r<t.width;r+=n)for(let s=0;s<t.height;s+=n){const i=e.getImageData,o=ig in i?i[ig]:i;if(new Uint32Array(o.call(e,r,s,Math.min(n,t.width-r),Math.min(n,t.height-s)).data.buffer).some(l=>l!==0))return!1}return!0}function Qf(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?As(e):null}function il(t,e,n){return e==="INPUT"&&(n==="radio"||n==="checkbox")?t.getAttribute("value")||"":t.value}
21function Lb(t,e){let n;try{n=new URL(t,ud(e,()=>window.location.href))}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return ud(eo([s,"optionalAccess",i=>i[1]]),()=>null)}const og={};function Mb(t){const e=og[t];if(e)return e;const n=window.document;let r=window[t];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[t]&&(r=i[t]),n.head.removeChild(s)}catch{}return og[t]=r.bind(window)}function dd(...t){return Mb("setTimeout")(...t)}function Fb(...t){return Mb("clearTimeout")(...t)}function $b(t){try{return t.contentDocument}catch{}}let QC=1;const eR=new RegExp("[^a-z0-9-_:]"),no=-2;function eh(){return QC++}function tR(t){if(t instanceof HTMLFormElement)return"form";const e=As(t.tagName);return eR.test(e)?"div":e}function nR(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}let Zr,ag;const rR=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,sR=/^(?:[a-z+]+:)?\/\//i,iR=/^www\..*/i,oR=/^(data:)([^,]*),(.*)/i;function ol(t,e){return(t||"").replace(rR,(n,r,s,i,o,a)=>{const l=s||o||a,u=r||i||"";if(!l)return n;if(sR.test(l)||iR.test(l))return`url(${u}${l}${u})`;if(oR.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${nR(e)+l}${u})`;const c=e.split("/"),d=l.split("/");c.pop();for(const f of d)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}const aR=/^[^ \t\n\r\u000c]+/,lR=/^[, \t\n\r\u000c]+/;function uR(t,e){if(e.trim()==="")return e;let n=0;function r(i){let o;const a=i.exec(e.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(lR),!(n>=e.length);){let i=r(aR);if(i.slice(-1)===",")i=ps(t,i.substring(0,i.length-1)),s.push(i);else{let o="";i=ps(t,i);let a=!1;for(;;){const l=e.charAt(n);if(l===""){s.push((i+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,s.push((i+o).trim());break}else l==="("&&(a=!0);o+=l,n+=1}}}return s.join(", ")}const lg=new WeakMap;function ps(t,e){return!e||e.trim()===""?e:tu(t,e)}function cR(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function tu(t,e){let n=lg.get(t);if(n||(n=t.createElement("a"),lg.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function jb(t,e,n,r,s,i){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?ps(t,r):n==="srcset"?uR(t,r):n==="style"?ol(r,tu(t)):e==="object"&&n==="data"?ps(t,r):typeof i=="function"?i(n,r,s):r)}function Ub(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function dR(t,e,n,r){try{if(r&&t.matches(r))return!1;if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let s=t.classList.length;s--;){const i=t.classList[s];if(e.test(i))return!0}if(n)return t.matches(n)}catch{}return!1}function fR(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}function Ir(t,e,n=1/0,r=0){return!t||t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Ir(t.parentNode,e,n,r+1)}function gs(t,e){return n=>{const r=n;if(r===null)return!1;try{if(t){if(typeof t=="string"){if(r.matches(`.${t}`))return!0}else if(fR(r,t))return!0}return!!(e&&r.matches(e))}catch{return!1}}}function Ps(t,e,n,r,s,i){try{const o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,l=-1;if(i){if(l=Ir(o,gs(r,s)),l<0)return!0;a=Ir(o,gs(e,n),l>=0?l:1/0)}else{if(a=Ir(o,gs(e,n)),a<0)return!1;l=Ir(o,gs(r,s),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function hR(t,e,n){const r=t.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=dd(()=>{s||(e(),s=!0)},n);t.addEventListener("load",()=>{Fb(a),s=!0,e()});return}const o="about:blank";if(r.location.href!==o||t.src===o||t.src==="")return dd(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function pR(t,e,n){let r=!1,s;try{s=t.sheet}catch{return}if(s)return;const i=dd(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{Fb(i),r=!0,e()})}function gR(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:g,maskInputFn:_,dataURLOptions:m={},inlineImages:y,recordCanvas:E,keepIframeSrcFn:T,newlyAddedElement:I=!1}=e,x=mR(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:ot.Document,childNodes:[],compatMode:t.compatMode}:{type:ot.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:ot.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:x};case t.ELEMENT_NODE:return vR(t,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:l,maskInputOptions:h,maskInputFn:_,dataURLOptions:m,inlineImages:y,recordCanvas:E,keepIframeSrcFn:T,newlyAddedElement:I,rootId:x,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f});case t.TEXT_NODE:return _R(t,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:g,maskInputOptions:h,maskInputFn:_,rootId:x});case t.CDATA_SECTION_NODE:return{type:ot.CDATA,textContent:"",rootId:x};case t.COMMENT_NODE:return{type:ot.Comment,textContent:t.textContent||"",rootId:x};default:return!1}}function mR(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function _R(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:l,maskInputFn:u,rootId:c}=e,d=t.parentNode&&t.parentNode.tagName;let f=t.textContent;const p=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(p&&f){try{t.nextSibling||t.previousSibling||eo([t,"access",m=>m.parentNode,"access",m=>m.sheet,"optionalAccess",m=>m.cssRules])&&(f=sl(t.parentNode.sheet))}catch(m){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${m}`,t)}f=ol(f,tu(e.doc))}h&&(f="SCRIPT_PLACEHOLDER");const _=Ps(t,r,i,s,o,n);if(!p&&!h&&!g&&f&&_&&(f=a?a(f,t.parentElement):f.replace(/[\S]/g,"*")),g&&f&&(l.textarea||_)&&(f=u?u(f,t.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const m=eu({type:null,tagName:d,maskInputOptions:l});f=to({isMasked:Ps(t,r,i,s,o,m),element:t,value:f,maskInputFn:u})}return{type:ot.Text,textContent:f||"",isStyle:p,rootId:c}}function vR(t,e){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:u,dataURLOptions:c={}
21,inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:g,maskTextClass:_,unmaskTextClass:m,maskTextSelector:y,unmaskTextSelector:E}=e,T=dR(t,r,s,i),I=tR(t);let x={};const R=t.attributes.length;for(let S=0;S<R;S++){const w=t.attributes[S];w.name&&!Ub(I,w.name,w.value)&&(x[w.name]=jb(n,I,As(w.name),w.value,t,l))}if(I==="link"&&o){const S=Array.from(n.styleSheets).find(A=>A.href===t.href);let w=null;S&&(w=sl(S)),w&&(x.rel=null,x.href=null,x.crossorigin=null,x._cssText=ol(w,S.href))}if(I==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const S=sl(t.sheet);S&&(x._cssText=ol(S,tu(n)))}if(I==="input"||I==="textarea"||I==="select"||I==="option"){const S=t,w=Qf(S),A=il(S,cd(I),w),P=S.checked;if(w!=="submit"&&w!=="button"&&A){const O=Ps(S,_,y,m,E,eu({type:w,tagName:cd(I),maskInputOptions:a}));x.value=to({isMasked:O,element:S,value:A,maskInputFn:u})}P&&(x.checked=P)}if(I==="option"&&(t.selected&&!a.select?x.selected=!0:delete x.selected),I==="canvas"&&f){if(t.__context==="2d")ZC(t)||(x.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){const S=t.toDataURL(c.type,c.quality),w=n.createElement("canvas");w.width=t.width,w.height=t.height;const A=w.toDataURL(c.type,c.quality);S!==A&&(x.rr_dataURL=S)}}if(I==="img"&&d){Zr||(Zr=n.createElement("canvas"),ag=Zr.getContext("2d"));const S=t,w=S.currentSrc||S.getAttribute("src")||"<unknown-src>",A=S.crossOrigin,P=()=>{S.removeEventListener("load",P);try{Zr.width=S.naturalWidth,Zr.height=S.naturalHeight,ag.drawImage(S,0,0),x.rr_dataURL=Zr.toDataURL(c.type,c.quality)}catch(O){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?P():S.addEventListener("load",P);return}else console.warn(`Cannot inline img src=${w}! Error: ${O}`)}S.crossOrigin==="anonymous"&&(A?x.crossOrigin=A:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?P():S.addEventListener("load",P)}if((I==="audio"||I==="video")&&(x.rr_mediaState=t.paused?"paused":"played",x.rr_mediaCurrentTime=t.currentTime),h||(t.scrollLeft&&(x.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(x.rr_scrollTop=t.scrollTop)),T){const{width:S,height:w}=t.getBoundingClientRect();x={class:x.class,rr_width:`${S}px`,rr_height:`${w}px`}}I==="iframe"&&!p(x.src)&&(!T&&!$b(t)&&(x.rr_src=x.src),delete x.src);let C;try{customElements.get(I)&&(C=!0)}catch{}return{type:ot.Element,tagName:I,attributes:x,childNodes:[],isSVG:cR(t)||void 0,needBlock:T,rootId:g,isCustom:C}}function Me(t){return t==null?"":t.toLowerCase()}function yR(t,e){if(e.comment&&t.type===ot.Comment)return!0;if(t.type===ot.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Lb(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Me(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Me(t.attributes.name)==="application-name"||Me(t.attributes.rel)==="icon"||Me(t.attributes.rel)==="apple-touch-icon"||Me(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Me(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Me(t.attributes.property).match(/^(og|twitter|fb):/)||Me(t.attributes.name).match(/^(og|twitter):/)||Me(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Me(t.attributes.name)==="robots"||Me(t.attributes.name)==="googlebot"||Me(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Me(t.attributes.name)==="author"||Me(t.attributes.name)==="generator"||Me(t.attributes.name)==="framework"||Me(t.attributes.name)==="publisher"||Me(t.attributes.name)==="progid"||Me(t.attributes.property).match(/^article:/)||Me(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Me(t.attributes.name)==="google-site-verification"||Me(t.attributes.name)==="yandex-verification"||Me(t.attributes.name)==="csrf-token"||Me(t.attributes.name)==="p:domain_verify"||Me(t.attributes.name)==="verify-v1"||Me(t.attributes.name)==="verification"||Me(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ms(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:_,maskInputFn:m,slimDOMOptions:y,dataURLOptions:E={}
vendor: 4,230 bytes, line 21
21,inlineImages:T=!1,recordCanvas:I=!1,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:C=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:P=!1}=e;let{preserveWhiteSpace:O=!0}=e;const N=gR(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:m,dataURLOptions:E,inlineImages:T,recordCanvas:I,keepIframeSrcFn:A,newlyAddedElement:P});if(!N)return console.warn(t,"not serialized"),null;let V;r.hasNode(t)?V=r.getId(t):yR(N,y)||!O&&N.type===ot.Text&&!N.isStyle&&!N.textContent.replace(/^\s+|\s+$/gm,"").length?V=no:V=eh();const L=Object.assign(N,{id:V});if(r.add(t,L),V===no)return null;x&&x(t);let W=!f;if(L.type===ot.Element){W=W&&!L.needBlock,delete L.needBlock;const q=t.shadowRoot;q&&$i(q)&&(L.isShadowHost=!0)}if((L.type===ot.Document||L.type===ot.Element)&&W){y.headWhitespace&&L.type===ot.Element&&L.tagName==="head"&&(O=!1);const q={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:m,slimDOMOptions:y,dataURLOptions:E,inlineImages:T,recordCanvas:I,preserveWhiteSpace:O,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:C,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:A};for(const ie of Array.from(t.childNodes)){const ce=ms(ie,q);ce&&L.childNodes.push(ce)}if(zC(t)&&t.shadowRoot)for(const ie of Array.from(t.shadowRoot.childNodes)){const ce=ms(ie,q);ce&&($i(t.shadowRoot)&&(ce.isShadow=!0),L.childNodes.push(ce))}}return t.parentNode&&Fi(t.parentNode)&&$i(t.parentNode)&&(L.isShadow=!0),L.type===ot.Element&&L.tagName==="iframe"&&hR(t,()=>{const q=$b(t);if(q&&R){const ie=ms(q,{doc:q,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:m,slimDOMOptions:y,dataURLOptions:E,inlineImages:T,recordCanvas:I,preserveWhiteSpace:O,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:C,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:A});ie&&R(t,ie)}},C),L.type===ot.Element&&L.tagName==="link"&&typeof L.attributes.rel=="string"&&(L.attributes.rel==="stylesheet"||L.attributes.rel==="preload"&&typeof L.attributes.href=="string"&&Lb(L.attributes.href)==="css")&&pR(t,()=>{if(S){const q=ms(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:m,slimDOMOptions:y,dataURLOptions:E,inlineImages:T,recordCanvas:I,preserveWhiteSpace:O,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:C,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:A});q&&S(t,q)}},w),L}function bR(t,e){const{mirror:n=new Nb,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:u=null,unmaskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:_,maskInputFn:m,slimDOM:y=!1,dataURLOptions:E,preserveWhiteSpace:T,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:R,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:w=()=>!1}=e||{};return ms(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:g,maskTextFn:_,maskInputFn:m,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}
21:y===!1?{}:y,dataURLOptions:E,inlineImages:f,recordCanvas:p,preserveWhiteSpace:T,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:R,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:w,newlyAddedElement:!1})}function Hn(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}function Ot(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const us=`Please stop import mirror directly. Instead of that,\r 22now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 23or you can use record.mirror to access the mirror instance during recording.`;let ug={map:{},getId(){return console.error(us),-1},getNode(){return console.error(us),null},removeNodeFromMap(){console.error(us)},has(){return console.error(us),!1},reset(){console.error(us)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ug=new Proxy(ug,{get(t,e,n){return e==="map"&&console.error(us),Reflect.get(t,e,n)}}));function ro(t,e,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=e-(o-s),l=this;a<=0||a>e?(r&&(OR(r),r=null),s=o,t.apply(l,i)):!r&&n.trailing!==!1&&(r=nu(()=>{s=n.leading===!1?0:Date.now(),r=null,t.apply(l,i)},a))}}function Bb(t,e,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(o){nu(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Bb(t,e,i||{},!0)}function th(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}let al=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(al=()=>new Date().getTime());function Hb(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:Hn([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Hn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Hn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:Hn([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Hn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Hn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Vb(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function zb(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function qb(t){return t?t.nodeType===t.ELEMENT_NODE?t:t.parentElement:null}function $t(t,e,n,r,s){if(!t)return!1;const i=qb(t);if(!i)return!1;const o=gs(e,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=Ir(i,o);let l=-1;return a<0?!1:(r&&(l=Ir(i,gs(null,r))),a>-1&&l<0?!0:a<l)}function SR(t,e){return e.getId(t)!==-1}function Nu(t,e){return e.getId(t)===no}function Wb(t,e){if(Fi(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?Wb(t.parentNode,e):!0:!0}function fd(t){return!!t.changedTouches}function ER(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let n=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Gb(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Kb(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function hd(t){return!!Hn([t,"optionalAccess",e=>e.shadowRoot])}class wR{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return aO(this.styleIDMap.get(e),()=>-1)}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Yb(t){let e=null;return Hn([t,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function xR(t){let e=t,n;for(;n=Yb(e);)e=n;return e}function TR(t){const e=t.ownerDocument;if(!e)return!1;const n=xR(t);return e.contains(n)}function Jb(t){const e=t.ownerDocument;return e?e.contains(t)||TR(t):!1}const cg={};function nh(t){const e=cg[t];if(e)return e;const n=window.document;let r=window[t];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[t]&&(r=i[t]),n.head.removeChild(s)}catch{}return cg[t]=r.bind(window)}function IR(...t){return nh("requestAnimationFrame")(...t)}function nu(...t){return nh("setTimeout")(...t)}function OR(...t){return nh("clearTimeout")(...t)}var pe=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(pe||{}),oe=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.In
23put=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(oe||{}),xt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(xt||{}),vn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(vn||{}),dg;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(dg||(dg={}));var fg;(function(t){t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(fg||(fg={}));function rh(t){try{return t.contentDocument}catch{}}function kR(t){try{return t.contentWindow}catch{}}function CR(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}function hg(t){return"__ln"in t}class RR{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=CR([n,"optionalAccess",s=>s.next])||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&hg(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&hg(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){const n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const pg=(t,e)=>`${t}@${e}`;class AR{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,r=new RR,s=l=>{let u=l,c=no;for(;c===no;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},i=l=>{if(!l.parentNode||!Jb(l))return;const u=Fi(l.parentNode)?this.mirror.getId(Yb(l)):this.mirror.getId(l.parentNode),c=s(l);if(u===-1||c===-1)return r.addNode(l);const d=ms(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inl
23ineImages,onSerialize:f=>{Gb(f,this.mirror)&&!$t(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),Kb(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),hd(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{$t(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});d&&(e.push({parentId:u,nextId:c,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)gg(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(const l of this.addedSet)!mg(this.droppedSet,l)&&!gg(this.removes,l,this.mirror)||mg(this.movedSet,l)?i(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(o.value.parentNode),c=s(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const d=this.mirror.getId(c.value.parentNode);if(s(c.value)===-1)continue;if(d!==-1){l=c;break}else{const p=c.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),i(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+d).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=e=>{if(!Nu(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!$t(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:Ps(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,qb(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){const o=Qf(n),a=n.tagName;s=il(n,a,o);const l=eu({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=Ps(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);s=to({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if($t(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===e.oldValue)return;let i=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!rh(n))r="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
23,this.attributes.push(i),this.attributeMap.set(e.target,i)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Ub(n.tagName,r)&&(i.attributes[r]=jb(this.doc,As(n.tagName),As(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,u]:i._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if($t(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=Fi(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);$t(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Nu(n,this.mirror)||!SR(n,this.mirror)||(this.addedSet.has(n)?(pd(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Wb(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[pg(r,s)]?pd(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Fi(e.target)&&$i(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Nu(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[pg(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);$t(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(r=>this.genAdds(r)),hd(e)&&e.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function pd(t,e){t.delete(e),e.childNodes.forEach(n=>pd(t,n))}function gg(t,e,n){return t.length===0?!1:PR(t,e,n)}function PR(t,e,n){let r=e.parentNode;for(;r;){const s=n.getId(r);if(t.some(i=>i.id===s))return!0;r=r.parentNode}return!1}function mg(t,e){return t.size===0?!1:Xb(t,e)}function Xb(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Xb(t,n):!1}let ji;function DR(t){ji=t}function NR(){ji=void 0}const me=t=>ji?((...n)=>{try{return t(...n)}catch(r){if(ji&&ji(r)===!0)return()=>{};throw r}}):t;function tn(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}const _s=[];function Io(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function Zb(t,e){const n=new AR;_s.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const s=tn([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(me(o=>{t.onMutation&&t.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function LR({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],a;const l=ro(me(d=>{const f=Date.now()-a;t(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=me(ro(me(d=>{const f=Io(d),{clientX:p,clientY:h}=fd(d)?d.changedTouches[0]:d;a||(a=al()),o.push({x:p,y:h,id:r.getId(f),timeOffset:al()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?oe.Drag:d instanceof MouseEvent?oe.MouseMove:oe.TouchMove)}),s,{trailing:!1})),c=[Ot("mousemove",u,n),Ot("touchmove",u,n),Ot("drag",u,n)];return me(()=>
23{c.forEach(d=>d())})}function MR({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let u=null;const c=d=>f=>{const p=Io(f);if($t(p,r,s,i,!0))return;let h=null,g=d;if("pointerType"in f){switch(f.pointerType){case"mouse":h=vn.Mouse;break;case"touch":h=vn.Touch;break;case"pen":h=vn.Pen;break}h===vn.Touch?xt[d]===xt.MouseDown?g="TouchStart":xt[d]===xt.MouseUp&&(g="TouchEnd"):vn.Pen}else fd(f)&&(h=vn.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===vn.Touch||g.startsWith("Mouse")&&h===vn.Mouse)&&(h=null)):xt[d]===xt.Click&&(h=u,u=null);const _=fd(f)?f.changedTouches[0]:f;if(!_)return;const m=n.getId(p),{clientX:y,clientY:E}=_;me(t)({type:xt[g],id:m,x:y,y:E,...h!==null&&{pointerType:h}})};return Object.keys(xt).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=As(d);const p=c(d);if(window.PointerEvent)switch(xt[d]){case xt.MouseDown:case xt.MouseUp:f=f.replace("mouse","pointer");break;case xt.TouchStart:case xt.TouchEnd:return}l.push(Ot(f,p,e))}),me(()=>{l.forEach(d=>d())})}function Qb({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=me(ro(me(l=>{const u=Io(l);if(!u||$t(u,r,s,i,!0))return;const c=n.getId(u);if(u===e&&e.defaultView){const d=Hb(e.defaultView);t({id:c,x:d.left,y:d.top})}else t({id:c,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return Ot("scroll",a,e)}function FR({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=me(ro(me(()=>{const i=Vb(),o=zb();(n!==i||r!==o)&&(t({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return Ot("resize",s,e)}const $R=["INPUT","TEXTAREA","SELECT"],_g=new WeakMap;function jR({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:g}){function _(R){let C=Io(R);const S=R.isTrusted,w=C&&cd(C.tagName);if(w==="OPTION"&&(C=C.parentElement),!C||!w||$R.indexOf(w)<0||$t(C,r,s,i,!0))return;const A=C;if(A.classList.contains(o)||a&&A.matches(a))return;const P=Qf(C);let O=il(A,w,P),N=!1;const V=eu({maskInputOptions:l,tagName:w,type:P}),L=Ps(C,f,h,p,g,V);(P==="radio"||P==="checkbox")&&(N=C.checked),O=to({isMasked:L,element:C,value:O,maskInputFn:u}),m(C,d?{text:O,isChecked:N,userTriggered:S}:{text:O,isChecked:N});const W=C.name;P==="radio"&&W&&N&&e.querySelectorAll(`input[type="radio"][name="${W}"]`).forEach(q=>{if(q!==C){const ie=to({isMasked:L,element:q,value:il(q,w,P),maskInputFn:u});m(q,d?{text:ie,isChecked:!N,userTriggered:!1}:{text:ie,isChecked:!N})}})}function m(R,C){const S=_g.get(R);if(!S||S.text!==C.text||S.isChecked!==C.isChecked){_g.set(R,C);const w=n.getId(R);me(t)({...C,id:w})}}const E=(c.input==="last"?["change"]:["input","change"]).map(R=>Ot(R,me(_),e)),T=e.defaultView;if(!T)return()=>{E.forEach(R=>R())};const I=T.Object.getOwnPropertyDescriptor(T.HTMLInputElement.prototype,"value"),x=[[T.HTMLInputElement.prototype,"value"],[T.HTMLInputElement.prototype,"checked"],[T.HTMLSelectElement.prototype,"value"],[T.HTMLTextAreaElement.prototype,"value"],[T.HTMLSelectElement.prototype,"selectedIndex"],[T.HTMLOptionElement.prototype,"selected"]];return I&&I.set&&E.push(...x.map(R=>Bb(R[0],R[1],{set(){me(_)({target:this,isTrusted:!1})}},!1,T))),me(()=>{E.forEach(R=>R())})}function ll(t){const e=[];function n(r,s){if(Go("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Go("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Go("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Go("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(t,e)}function Vn(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function UR({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:me((c,d,f)=>{const[p,h]=f,{id:g,styleId:_}=Vn(d,e,n.styleMirror);
23return(g&&g!==-1||_&&_!==-1)&&t({id:g,styleId:_,adds:[{rule:p,index:h}]}),c.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:me((c,d,f)=>{const[p]=f,{id:h,styleId:g}=Vn(d,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,removes:[{index:p}]}),c.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:me((c,d,f)=>{const[p]=f,{id:h,styleId:g}=Vn(d,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,replace:p}),c.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:me((c,d,f)=>{const[p]=f,{id:h,styleId:g}=Vn(d,e,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&t({id:h,styleId:g,replaceSync:p}),c.apply(d,f)})}));const l={};Ko("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Ko("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Ko("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Ko("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,d])=>{u[c]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[c].insertRule,{apply:me((f,p,h)=>{const[g,_]=h,{id:m,styleId:y}=Vn(p.parentStyleSheet,e,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&t({id:m,styleId:y,adds:[{rule:g,index:[...ll(p),_||0]}]}),f.apply(p,h)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:me((f,p,h)=>{const[g]=h,{id:_,styleId:m}=Vn(p.parentStyleSheet,e,n.styleMirror);return(_&&_!==-1||m&&m!==-1)&&t({id:_,styleId:m,removes:[{index:[...ll(p),g]}]}),f.apply(p,h)})})}),me(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,d])=>{d.prototype.insertRule=u[c].insertRule,d.prototype.deleteRule=u[c].deleteRule})})}function e0({mirror:t,stylesheetManager:e},n){let r=null;n.nodeName==="#document"?r=t.getId(n):r=t.getId(n.host);const s=n.nodeName==="#document"?tn([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):tn([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=tn([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(tn([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return tn([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=tn([i,"access",l=>l.set,"optionalAccess",l=>l.call,"call",l=>l(this,o)]);if(r!==null&&r!==-1)try{e.adoptStyleSheets(o,r)}catch{}return a}}),me(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function BR({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:me((a,l,u)=>{const[c,d,f]=u;if(n.has(c))return i.apply(l,[c,d,f]);const{id:p,styleId:h}=Vn(tn([l,"access",g=>g.parentRule,"optionalAccess",g=>g.parentStyleSheet]),e,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&t({id:p,styleId:h,set:{property:c,value:d,priority:f},index:ll(l.parentRule)}),a.apply(l,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:me((a,l,u)=>{const[c]=u;if(n.has(c))return o.apply(l,[c]);const{id:d,styleId:f}=Vn(tn([l,"access",p=>p.parentRule,"optionalAccess",p=>p.parentStyleSheet]),e,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&t({id:d,styleId:f,remove:{property:c},index:ll(l.parentRule)}),a.apply(l,u)})}),me(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function HR({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=me(u=>ro(me(c=>{const d=Io(c);if(!d||$t(d,e,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:g}=d;t({type:u,id:s.getId(d),currentTime:f,volume:p,muted:h,playbackRate:g})}),i.media||500)),l=[Ot("play",a(0),o),Ot("pause",a(1),o),Ot("seeked",a(2),o),Ot("volumechange",a(3),o),Ot("ratechange",a(4),o)];return me(()=>{l.forEach(u=>u())})}function VR({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(l,u,c){const d=new i(l,u,c);return s.set(d,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=th(e.fonts,"add",function(a){return function(l){return nu(me(()=>{const u=s.get(l);u&&(t(u),s.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(o),me(()=>{r.forEach(a=>a())})}function zR(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=t;let a=!0;const l=me(()=>{const u=e.getSelection();if(!u||a&&tn([u,"optionalAccess",f=>f.isCollapsed]))return;a=u.isCollapsed||!1;const c=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const p=u.getRangeAt(f),{startContainer:h,startOffset:g,endContainer:_,endOffset:m}=p;$t(h,r,s,i,!0)||$t(_,r,s,i,!0)||c.push({start:n.getId(h),startOffset:g,end:n.getId(_),endOffset:m})}o({ranges:c})});return l(),Ot("selectionchange",l)}function qR({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:th(n.customElements,"define",function(s){return function(i,o,a){try{e({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function WR(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let r;t.recordDOM&&(r=Zb(t,t.doc));const s=LR(t),i=MR(t),o=Qb(t),a=FR(t,{win:n}),l=jR(t),u=HR(t);let c=()=>{},d=()=>{},f=()=>{},p=()=>{};t.recordDOM&&(c=UR(t,{win:n}),d=e0(t,t.doc),f=BR(t,{win:n}),t.collectFonts&&(p=VR(t)));const h=zR(t),g=qR(t),_=[];for(const m of t.plugins)_.push(m.observer(m.callback,n,m.options));return me(()=>
23{_s.forEach(m=>m.reset()),tn([r,"optionalAccess",m=>m.disconnect,"call",m=>m()]),s(),i(),o(),a(),l(),u(),c(),d(),f(),p(),h(),g(),_.forEach(m=>m())})}function Go(t){return typeof window[t]<"u"}function Ko(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class gd{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,n,r,s){const i=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(e,n){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return n.map(i=>this.getId(e,i,r,s))}getRemoteId(e,n,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(e,n){const r=this.getRemoteIdToIdMap(e);return n.map(s=>this.getRemoteId(e,s,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}function vg(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(e=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(e,...o)),e=void 0)}return n}class GR{constructor(){this.crossOriginIframeMirror=new gd(eh),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class KR{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new gd(eh),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new gd(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),vg([this,"access",s=>s.loadListener,"optionalCall",s=>s(e)]);const r=rh(e);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(e,n){switch(n.type){case pe.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:pe.IncrementalSnapshot,data:{source:oe.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case pe.Meta:case pe.Load:case pe.DomContentLoaded:return!1;case pe.Plugin:return n;case pe.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case pe.IncrementalSnapshot:switch(n.data.source){case oe.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}
23),n.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case oe.Drag:case oe.TouchMove:case oe.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case oe.ViewportResize:return!1;case oe.MediaInteraction:case oe.MouseInteraction:case oe.Scroll:case oe.CanvasMutation:case oe.Input:return this.replaceIds(n.data,e,["id"]),n;case oe.StyleSheetRule:case oe.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case oe.Font:return n;case oe.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),n;case oe.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),vg([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,e,["styleId"])})]),n}}return!1}replace(e,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=e.getIds(r,n[i]):n[i]=e.getId(r,n[i]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==ot.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class YR{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class JR{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!$i(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const r=Zb({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Qb({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),nu(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(e0({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const n=rh(e),r=kR(e);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(th(e.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Jb(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class yg{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class XR{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new wR,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of e){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:Db(a),index:l}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class ZR{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,n){const r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==n)}add(e,n){this.active||(this.active=!0,IR(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}}let Qe,ul;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=Oa([t,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Zt=XC();function An(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr
23-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:u=!1,maskTextClass:c="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:_,slimDOMOptions:m,maskAttributeFn:y,maskInputFn:E,maskTextFn:T,maxCanvasSize:I=null,packFn:x,sampling:R={},dataURLOptions:C={},mousemoveWait:S,recordDOM:w=!0,recordCanvas:A=!1,recordCrossOriginIframes:P=!1,recordAfter:O=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:N=!1,collectFonts:V=!1,inlineImages:L=!1,plugins:W,keepIframeSrcFn:q=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:ce,onMutation:Z,getCanvasManager:Ee}=t;DR(ce);const de=P?window.parent===window:!0;let _e=!1;if(!de)try{window.parent.document&&(_e=!1)}catch{_e=!0}if(de&&!e)throw new Error("emit function is required");if(!de&&!_e)return()=>{};S!==void 0&&R.mousemove===void 0&&(R.mousemove=S),Zt.reset();const Ie=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:_!==void 0?_:{},ae=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};ER();let We,Se=0;const ct=he=>{for(const _t of W||[])_t.eventProcessor&&(he=_t.eventProcessor(he));return x&&!_e&&(he=x(he)),he};Qe=(he,_t)=>{const le=he;if(le.timestamp=al(),Oa([_s,"access",De=>De[0],"optionalAccess",De=>De.isFrozen,"call",De=>De()])&&le.type!==pe.FullSnapshot&&!(le.type===pe.IncrementalSnapshot&&le.data.source===oe.Mutation)&&_s.forEach(De=>De.unfreeze()),de)Oa([e,"optionalCall",De=>De(ct(le),_t)]);else if(_e){const De={type:"rrweb",event:ct(le),origin:window.location.origin,isCheckout:_t};window.parent.postMessage(De,"*")}if(le.type===pe.FullSnapshot)We=le,Se=0;else if(le.type===pe.IncrementalSnapshot){if(le.data.source===oe.Mutation&&le.data.isAttachIframe)return;Se++;const De=r&&Se>=r,we=n&&We&&le.timestamp-We.timestamp>n;(De||we)&<(!0)}};const wt=he=>{Qe({type:pe.IncrementalSnapshot,data:{source:oe.Mutation,...he}})},Xt=he=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.Scroll,...he}}),Ge=he=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.CanvasMutation,...he}}),it=he=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.AdoptedStyleSheet,...he}}),mt=new XR({mutationCb:wt,adoptedStyleSheetCb:it}),Xe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new GR:new KR({mirror:Zt,mutationCb:wt,stylesheetManager:mt,recordCrossOriginIframes:P,wrappedEmit:Qe});for(const he of W||[])he.getMirror&&he.getMirror({nodeMirror:Zt,crossOriginIframeMirror:Xe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Xe.crossOriginIframeStyleMirror});const Y=new ZR,Ze=eA(Ee,{mirror:Zt,win:window,mutationCb:he=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.CanvasMutation,...he}}),recordCanvas:A,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:I,sampling:R.canvas,dataURLOptions:C,errorHandler:ce}),rt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new YR:new JR({mutationCb:wt,scrollCb:Xt,bypassOptions:{onMutation:Z,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:Ie,dataURLOptions:C,maskAttributeFn:y,maskTextFn:T,maskInputFn:E,recordCanvas:A,inlineImages:L,sampling:R,slimDOMOptions:ae,iframeManager:Xe,stylesheetManager:mt,canvasManager:Ze,keepIframeSrcFn:q,processedNodeManager:Y},mirror:Zt}),lt=(he=!1)=>{if(!w)return;Qe({type:pe.Meta,data:{href:window.location.href,width:zb(),height:Vb()}}
23,he),mt.reset(),rt.init(),_s.forEach(le=>le.lock());const _t=bR(document,{mirror:Zt,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:Ie,maskAttributeFn:y,maskInputFn:E,maskTextFn:T,slimDOM:ae,dataURLOptions:C,recordCanvas:A,inlineImages:L,onSerialize:le=>{Gb(le,Zt)&&Xe.addIframe(le),Kb(le,Zt)&&mt.trackLinkElement(le),hd(le)&&rt.addShadowRoot(le.shadowRoot,document)},onIframeLoad:(le,De)=>{Xe.attachIframe(le,De),le.contentWindow&&Ze.addWindow(le.contentWindow),rt.observeAttachShadow(le)},onStylesheetLoad:(le,De)=>{mt.attachLinkElement(le,De)},keepIframeSrcFn:q});if(!_t)return console.warn("Failed to snapshot the document");Qe({type:pe.FullSnapshot,data:{node:_t,initialOffset:Hb(window)}}),_s.forEach(le=>le.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&mt.adoptStyleSheets(document.adoptedStyleSheets,Zt.getId(document))};ul=lt;try{const he=[],_t=De=>me(WR)({onMutation:Z,mutationCb:wt,mousemoveCb:(we,or)=>Qe({type:pe.IncrementalSnapshot,data:{source:or,positions:we}}),mouseInteractionCb:we=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.MouseInteraction,...we}}),scrollCb:Xt,viewportResizeCb:we=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.ViewportResize,...we}}),inputCb:we=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.Input,...we}}),mediaInteractionCb:we=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.MediaInteraction,...we}}),styleSheetRuleCb:we=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.StyleSheetRule,...we}}),styleDeclarationCb:we=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.StyleDeclaration,...we}}),canvasMutationCb:Ge,fontCb:we=>Qe({type:pe.IncrementalSnapshot,data:{source:oe.Font,...we}}),selectionCb:we=>{Qe({type:pe.IncrementalSnapshot,data:{source:oe.Selection,...we}}
23)},customElementCb:we=>{Qe({type:pe.IncrementalSnapshot,data:{source:oe.CustomElement,...we}})},blockClass:s,ignoreClass:a,ignoreSelector:l,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:Ie,inlineStylesheet:h,sampling:R,recordDOM:w,recordCanvas:A,inlineImages:L,userTriggeredOnInput:N,collectFonts:V,doc:De,maskAttributeFn:y,maskInputFn:E,maskTextFn:T,keepIframeSrcFn:q,blockSelector:i,unblockSelector:o,slimDOMOptions:ae,dataURLOptions:C,mirror:Zt,iframeManager:Xe,stylesheetManager:mt,shadowDomManager:rt,processedNodeManager:Y,canvasManager:Ze,ignoreCSSAttributes:ie,plugins:Oa([W,"optionalAccess",we=>we.filter,"call",we=>we(or=>or.observer),"optionalAccess",we=>we.map,"call",we=>we(or=>({observer:or.observer,options:or.options,callback:Zx=>Qe({type:pe.Plugin,data:{plugin:or.name,payload:Zx}})}))])||[]},{});Xe.addLoadListener(De=>{try{he.push(_t(De.contentDocument))}catch(we){console.warn(we)}});const le=()=>{lt(),he.push(_t(document))};return document.readyState==="interactive"||document.readyState==="complete"?le():(he.push(Ot("DOMContentLoaded",()=>{Qe({type:pe.DomContentLoaded,data:{}}),O==="DOMContentLoaded"&&le()})),he.push(Ot("load",()=>{Qe({type:pe.Load,data:{}}),O==="load"&&le()},window))),()=>{he.forEach(De=>De()),Y.destroy(),ul=void 0,NR()}}catch(he){console.warn(he)}}function QR(t){if(!ul)throw new Error("please take full snapshot after start recording");ul(t)}An.mirror=Zt;An.takeFullSnapshot=QR;function eA(t,e){try{return t?t(e):new yg}catch{return console.warn("Unable to initialize CanvasManager"),new yg}}const tA=3,nA=5;function sh(t){return t>9999999999?t:t*1e3}function Lu(t){return t>9999999999?t/1e3:t}function Oo(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:pe.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Af(e,10,1e3)}}),e.category==="console")))}const rA="button,a";function t0(t){return t.closest(rA)||t}function n0(t){const e=r0(t);return!e||!(e instanceof Element)?e:t0(e)}function r0(t){return sA(t)?t.target:t}function sA(t){return typeof t=="object"&&!!t&&"target"in t}let zn;function iA(t){return zn||(zn=[],oA()),zn.push(t),()=>{const e=zn?zn.indexOf(t):-1;e>-1&&zn.splice(e,1)}}function oA(){Pt(Fe,"open",function(t){return function(...e){if(zn)try{zn.forEach(n=>n())}catch{}return t.apply(Fe,e)}})}const aA=new Set([oe.Mutation,oe.StyleSheetRule,oe.StyleDeclaration,oe.AdoptedStyleSheet,oe.CanvasMutation,oe.Selection,oe.MediaInteraction]);function lA(t,e,n){t.handleClick(e,n)}class uA{constructor(e,n,r=Oo){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const e=iA(()=>{this._lastMutation=bg()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,n){if(dA(n,this._ignoreSelector)||!fA(e))return;const r={timestamp:Lu(e.timestamp),clickBreadcrumb:e,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Lu(e)}registerScroll(e=Date.now()){this._lastScroll=Lu(e)}registerClick(e){const n=t0(e);this._handleMultiClick(n)}_handleMultiClick(e){this._getClicks(e).forEach(n=>{n.clickCount++})}_getClicks(e){return this._clicks.filter(n=>n.node===e)}_checkClicks(){const e=[],n=bg();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&e.push(r)});for(const r of e){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const n=this._replay,r=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,s=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=e;if(i){const l=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,u=l<this._timeout*1e3?"mutation":"timeout",c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Fe.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,c);return}if(o>1){const l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Fe.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Rs(()=>this._checkClicks(),1e3)}}const cA=["A","BUTTON","INPUT"];function dA(t,e){return!!(!cA.includes(t.tagName)||t.tagName==="INPUT"&&!["submit","button"].includes(t.getAttribute("type")||"")||t.tagName==="A"&&(t.hasAttribute("download")||t.hasAttribute("target")&&t.getAttribute("target")!=="_self")||e&&t.matches(e))}function fA(t){return!!(t.data&&typeof t.data.nodeId=="number"&&t.timestamp)}function bg(){return Date.now()/1e3}function hA(t,e){try{if(!pA(e))return;const{source:n}=e.data;if(aA.has(n)&&t.registerMutation(e.timestamp),n===oe.Scroll&&t.registerScroll(e.timestamp),gA(e)){const{type:r,id:s}=e.data,i=An.mirror.getNode(s);i instanceof HTMLElement&&r===xt.Click&&t.registerClick(i)}}catch{}}function pA(t){return t.type===tA}function gA(t){return t.data.source===oe.MouseInteraction}function ln(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var cl;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(cl||(cl={}));const mA=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function _A(t){const e={};!t["data-sentry-component"]&&t["data-sentry-element"]&&(t["data-sentry-component"]=t["data-sentry-element"]);for(const n in t)if(mA.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),e[r]=t[n]}return e}const vA=t=>e=>{if(!t.isEnabled())return;const n=yA(e);if(!n)return;
23const r=e.name==="click",s=r?e.event:void 0;r&&t.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&lA(t.clickDetector,n,n0(e.event)),Oo(t,n)};function s0(t,e){const n=An.mirror.getId(t),r=n&&An.mirror.getNode(n),s=r&&An.mirror.getMeta(r),i=s&&SA(s)?s:null;return{message:e,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===cl.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:_A(i.attributes)}}:{}}}function yA(t){const{target:e,message:n}=bA(t);return ln({category:`ui.${t.name}`,...s0(e,n)})}function bA(t){const e=t.name==="click";let n,r=null;try{r=e?n0(t.event):r0(t.event),n=Zn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function SA(t){return t.type===cl.Element}function EA(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=wA(e);n&&Oo(t,n)}function wA(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=t;if(!o||xA(o)||!i)return null;const a=e||r||s,l=i.length===1;if(!a&&l)return null;const u=Zn(o,{maxStringLength:200})||"<unknown>",c=s0(o,u);return ln({category:"ui.keyDown",message:u,data:{...c.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function xA(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}const TA={resource:RA,paint:kA,navigation:CA};function Yo(t,e){return({metric:n})=>void e.replayPerformanceEntries.push(t(n))}function IA(t){return t.map(OA).filter(Boolean)}function OA(t){const e=TA[t.entryType];return e?e(t):null}function Ds(t){return((gt||Fe.performance.timeOrigin)+t)/1e3}function kA(t){const{duration:e,entryType:n,name:r,startTime:s}=t,i=Ds(s);return{type:n,name:r,start:i,end:i+e,data:void 0}}function CA(t){const{entryType:e,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:u,loadEventStart:c,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:h,type:g}=t;return s===0?null:{type:`${e}.${g}`,start:Ds(p),end:Ds(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:i,redirectCount:f}}}function RA(t){const{entryType:e,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:l,transferSize:u}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:Ds(i),end:Ds(s),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}}function AA(t){const e=t.entries[t.entries.length-1],n=e&&e.element?[e.element]:void 0;return ru(t,"largest-contentful-paint",n)}function PA(t){return t.sources!==void 0}function DA(t){const e=[],n=[];for(const r of t.entries)if(PA(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=An.mirror.getId(i.node);o&&s.push(o)}e.push({value:r.value,nodeIds:s.length?s:void 0})}return ru(t,"cumulative-layout-shift",n,e)}function NA(t){const e=t.entries[t.entries.length-1],n=e&&e.target?[e.target]:void 0;return ru(t,"first-input-delay",n)}function LA(t){const e=t.entries[t.entries.length-1],n=e&&e.target?[e.target]:void 0;return ru(t,"interaction-to-next-paint",n)}function ru(t,e,n,r){const s=t.value,i=t.rating,o=Ds(s);return{type:"web-vital",name:e,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>An.mirror.getId(a)):void 0,attributions:r}}}function MA(t){function e(s){t.performanceEntries.includes(s)||t.performanceEntries.push(s)}function n({entries:s}){s.forEach(e)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(Cs(s,n))}),r.push(Sb(Yo(AA,t)),Kf(Yo(DA,t)),Eb(Yo(NA,t)),wb(Yo(LA,t))),()=>{r.forEach(s=>s())}}const ee=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,FA='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([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]),i=new t([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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}
vendor: 5,457 bytes, line 23
23},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;
23++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function $A(){const t=new Blob([FA]);return URL.createObjectURL(t)}const Sg=["info","warn","error","log"],Ra="[Replay] ";function Mu(t,e="info"){Qn({category:"console",data:{logger:"replay"},level:e,message:`${Ra}${t}`},{level:e})}function jA(){let t=!1,e=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{t=r.captureExceptions,e=r.traceInternals}};return ee?(Sg.forEach(r=>{n[r]=(...s)=>{z[r](Ra,...s),e&&Mu(s.join(""),ib(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),z.error(Ra,r),t?Ff(r):e&&Mu(r,"error")},n.infoTick=(...r)=>{z.info(Ra,...r),e&&setTimeout(()=>Mu(r[0]),0)}):Sg.forEach(r=>{n[r]=()=>{}}),n}const ne=jA();
23class ih extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Zf}.`)}}class i0{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const n=JSON.stringify(e).length;if(this._totalSize+=n,this._totalSize>Zf)throw new ih;this.events.push(e)}finish(){return new Promise(e=>{const n=this.events;this.clear(),e(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(n=>n.timestamp).sort()[0];return e?sh(e):null}}class UA{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((e,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?e():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){ee&&ne.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const l=a;if(l.method===e&&l.id===r){if(this._worker.removeEventListener("message",o),!l.success){ee&&ne.error("Error in compression worker: ",l.response),i(new Error("Error in compression worker"));return}s(l.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:e,arg:n})})}_getAndIncrementId(){return this._id++}}class BA{constructor(e){this._worker=new UA(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const n=sh(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(e);return this._totalSize+=r.length,this._totalSize>Zf?Promise.reject(new ih):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{ee&&ne.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class HA{constructor(e){this._fallback=new i0,this._compression=new BA(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){ee&&ne.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const i of e)s.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(i){ee&&ne.exception(i,"Failed to add events when switching buffers.")}}}function VA({useCompression:t,workerUrl:e}){if(t&&window.Worker){const n=zA(e);if(n)return n}return ee&&ne.info("Using simple buffer"),new i0}function zA(t){try{const e=t||qA();if(!e)return;ee&&ne.info(`Using compression worker${t?` from ${t}`:""}`);const n=new Worker(e);return new HA(n)}catch(e){ee&&ne.exception(e,"Failed to create compression worker")}}function qA(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?$A():""}function oh(){try{return"sessionStorage"in Fe&&!!Fe.sessionStorage}catch{return!1}}function WA(t){GA(),t.session=void 0}function GA(){if(oh())try{Fe.sessionStorage.removeItem(Jf)}catch{}}function o0(t){return t===void 0?!1:Math.random()<t}function a0(t){const e=Date.now(),n=t.id||Rr(),r=t.started||e,s=t.lastActivity||e,i=t.segmentId||0,o=t.sampled,a=t.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function ah(t){if(oh())try{Fe.sessionStorage.setItem(Jf,JSON.stringify(t))}catch{}}function KA(t,e){return o0(t)?"session":e?"buffer":!1}function Eg({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){const s=KA(t,e),i=a0({sampled:s,previousSessionId:r});return n&&ah(i),i}
23function YA(){if(!oh())return null;try{const t=Fe.sessionStorage.getItem(Jf);if(!t)return null;const e=JSON.parse(t);return ee&&ne.infoTick("Loading existing session"),a0(e)}catch{return null}}function md(t,e,n=+new Date){return t===null||e===void 0||e<0?!0:e===0?!1:t+e<=n}function l0(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return md(t.started,e,r)||md(t.lastActivity,n,r)}function u0(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!(!l0(t,{sessionIdleExpire:e,maxReplayDuration:n})||t.sampled==="buffer"&&t.segmentId===0)}function Fu({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},r){const s=r.stickySession&&YA();return s?u0(s,{sessionIdleExpire:t,maxReplayDuration:e})?(ee&&ne.infoTick("Session in sessionStorage is expired, creating new one..."),Eg(r,{previousSessionId:s.id})):s:(ee&&ne.infoTick("Creating new session"),Eg(r,{previousSessionId:n}))}function JA(t){return t.type===pe.Custom}function lh(t,e,n){return d0(t,e)?(c0(t,e,n),!0):!1}function XA(t,e,n){return d0(t,e)?c0(t,e,n):Promise.resolve(null)}async function c0(t,e,n){const{eventBuffer:r}=t;if(!r||r.waitForCheckout&&!n)return null;const s=t.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=t.getOptions(),o=ZA(e,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof ih,a=o?"addEventSizeExceeded":"addEvent";if(o&&s)return r.clear(),r.waitForCheckout=!0,null;t.handleException(i),await t.stop({reason:a});const l=be();l&&l.recordDroppedEvent("internal_sdk_error","replay")}}function d0(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=sh(e.timestamp);return n+t.timeouts.sessionIdlePause<Date.now()?!1:n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration?(ee&&ne.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function ZA(t,e){try{if(typeof e=="function"&&JA(t))return e(t)}catch(n){return ee&&ne.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return t}function uh(t){return!t.type}function _d(t){return t.type==="transaction"}function QA(t){return t.type==="replay_event"}function wg(t){return t.type==="feedback"}function eP(t){return(e,n)=>{if(!t.isEnabled()||!uh(e)&&!_d(e))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(_d(e)){tP(t,e);return}nP(t,e)}}}function tP(t,e){const n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}function nP(t,e){const n=t.getContext();if(e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id),t.recordingMode!=="buffer"||!e.tags||!e.tags.replayId)return;const{beforeErrorSampling:r}=t.getOptions();typeof r=="function"&&!r(e)||Rs(async()=>{try{await t.sendBufferedReplayOrFlush()}catch(s){t.handleException(s)}})}function rP(t){return e=>{!t.isEnabled()||!uh(e)||sP(t,e)}}function sP(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0]&&e.exception.values[0].value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=ln({category:"replay.hydrate-error",data:{url:My()}});Oo(t,r)}}function iP(t){const e=be();e&&e.on("beforeAddBreadcrumb",n=>oP(t,n))}function oP(t,e){if(!t.isEnabled()||!f0(e))return;const n=aP(e);n&&Oo(t,n)}function aP(t){return!f0(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")?null:t.category==="console"?lP(t):ln(t)}function lP(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||e.length===0)return ln(t);let n=!1;const r=e.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Wo?(n=!0,`${s.slice(0,Wo)}â¦`):s;if(typeof s=="object")try{const i=Af(s,7);return JSON.stringify(i).length>Wo?(n=!0,`${JSON.stringify(i,null,2).slice(0,Wo)}â¦`):i}catch{}return s});return ln({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function f0(t){return!!t.category}function uP(t,e){return t.type||!t.exception||!t.exception.values||!t.exception.values.length?!1:!!(e.originalException&&e.originalException.__rrweb__)}function h0(){const t=st().getPropagationContext().dsc;t&&delete t.replay_id;const e=at();if(e){const n=Ys(e);delete n.replay_id}}function cP(t,e){t.triggerUserActivity(),t.addUpdate(()=>e.timestamp?(t.throttledAddEvent({type:pe.Custom,timestamp:e.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1):!0)}function dP(t,e){return t.recordingMode!=="buffer"||e.message===Xf||!e.exception||e.type?!1:o0(t.getOptions().errorSampleRate)}function fP(t){return Object.assign((e,n)=>!t.isEnabled()||t.isPaused()?e:QA(e)?(delete e.breadcrumbs,e):!uh(e)&&!_d(e)&&!wg(e)?e:t.checkAndHandleExpiredSession()?wg(e)?(t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),cP(t,e),e):uP(e,n)&&!t.getOptions()._experiments.captureExceptions?(ee&&ne.log("Ignoring error from rrweb internals",e),null):((dP(t,e)||t.recordingMode==="session")&&(e.tags={...e.tags,replayId:t.getSessionId()}),e):(h0(),e),{id:"Replay"})}function su(t,e){return e.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=t.throttledAddEvent({type:pe.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});
23return typeof a=="string"?Promise.resolve(null):a})}function hP(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}function pP(t){return e=>{if(!t.isEnabled())return;const n=hP(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(su(t,[n]),!1)))}}function gP(t,e){return ee&&t.getOptions()._experiments.traceInternals?!1:hI(e,be())}function p0(t,e){t.isEnabled()&&e!==null&&(gP(t,e.name)||t.addUpdate(()=>(su(t,[e]),!0)))}function iu(t){if(!t)return;const e=new TextEncoder;try{if(typeof t=="string")return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=v0(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function g0(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function m0(t){try{if(typeof t=="string")return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[v0(t)];if(!t)return[void 0]}catch(e){return ee&&ne.exception(e,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return ee&&ne.info("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function dl(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function _0(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:l}=e;return{type:t,start:n/1e3,end:r/1e3,name:s,data:Xn({method:i,statusCode:o,request:a,response:l})}}function so(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Gn(t,e,n){if(!e&&Object.keys(t).length===0)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:s,warnings:i}=mP(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function vd(t,e){return Object.entries(t).reduce((n,[r,s])=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=s),n},{})}function v0(t){return new URLSearchParams(t).toString()}function mP(t){if(!t||typeof t!="string")return{body:t};const e=t.length>rg,n=_P(t);if(e){const r=t.slice(0,rg);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}â¦`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch{}return{body:t}}function _P(t){const e=t[0],n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function fl(t,e){const n=vP(t);return Wn(n,e)}function vP(t,e=Fe.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(Fe.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function yP(t,e,n){try{const r=await SP(t,e,n),s=_0("resource.fetch",r);p0(n.replay,s)}catch(r){ee&&ne.exception(r,"Failed to capture fetch breadcrumb")}}function bP(t,e){const{input:n,response:r}=e,s=n?y0(n):void 0,i=iu(s),o=r?g0(r.headers.get("content-length")):void 0;i!==void 0&&(t.data.request_body_size=i),o!==void 0&&(t.data.response_body_size=o)}async function SP(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=e,{url:o,method:a,status_code:l=0,request_body_size:u,response_body_size:c}=t.data,d=fl(o,n.networkDetailAllowUrls)&&!fl(o,n.networkDetailDenyUrls),f=d?EP(n,e.input,u):so(u),p=await wP(d,n,e.response,c);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:l,request:f,response:p}}function EP({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const s=n?IP(n,e):{};if(!t)return Gn(s,r,void 0);const i=y0(n),[o,a]=m0(i),l=Gn(s,r,o);return a?dl(l,a):l}async function wP(t,{networkCaptureBodies:e,networkResponseHeaders:n},r,s){if(!t&&s!==void 0)return so(s);const i=r?b0(r.headers,n):{};if(!r||!e&&s!==void 0)return Gn(i,s,void 0);const[o,a]=await TP(r),l=xP(o,{networkCaptureBodies:e,responseBodySize:s,captureDetails:t,headers:i});return a?dl(l,a):l}function xP(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:s}){try{const i=t&&t.length&&n===void 0?iu(t):n;return r?e?Gn(s,i,t):Gn(s,i,void 0):so(i)}catch(i){return ee&&ne.exception(i,"Failed to serialize response body"),Gn(s,n,void 0)}}async function TP(t){const e=OP(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{return[await kP(e)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(ee&&ne.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(ee&&ne.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function y0(t=[]){if(!(t.length!==2||typeof t[1]!="object"))return t[1].body}function b0(t,e){const n={};return e.forEach(r=>{t.get(r)&&(n[r]=t.get(r))}),n}
23function IP(t,e){return t.length===1&&typeof t[0]!="string"?xg(t[0],e):t.length===2?xg(t[1],e):{}}function xg(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?b0(n,e):Array.isArray(n)?{}:vd(n,e):{}}function OP(t){try{return t.clone()}catch(e){ee&&ne.exception(e,"Failed to clone response body")}}function kP(t){return new Promise((e,n)=>{const r=Rs(()=>n(new Error("Timeout while trying to read response body")),500);CP(t).then(s=>e(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function CP(t){return await t.text()}async function RP(t,e,n){try{const r=PP(t,e,n),s=_0("resource.xhr",r);p0(n.replay,s)}catch(r){ee&&ne.exception(r,"Failed to capture xhr breadcrumb")}}function AP(t,e){const{xhr:n,input:r}=e;if(!n)return;const s=iu(r),i=n.getResponseHeader("content-length")?g0(n.getResponseHeader("content-length")):MP(n.response,n.responseType);s!==void 0&&(t.data.request_body_size=s),i!==void 0&&(t.data.response_body_size=i)}function PP(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=e,{url:l,method:u,status_code:c=0,request_body_size:d,response_body_size:f}=t.data;if(!l)return null;if(!a||!fl(l,n.networkDetailAllowUrls)||fl(l,n.networkDetailDenyUrls)){const x=so(d),R=so(f);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:x,response:R}}const p=a[Tr],h=p?vd(p.request_headers,n.networkRequestHeaders):{},g=vd(DP(a),n.networkResponseHeaders),[_,m]=n.networkCaptureBodies?m0(o):[void 0],[y,E]=n.networkCaptureBodies?NP(a):[void 0],T=Gn(h,d,_),I=Gn(g,f,y);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:m?dl(T,m):T,response:E?dl(I,E):I}}function DP(t){const e=t.getAllResponseHeaders();return e?e.split(`\r 24`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function NP(t){const e=[];try{return[t.responseText]}catch(n){e.push(n)}try{return LP(t.response,t.responseType)}catch(n){e.push(n)}return ee&&ne.warn("Failed to get xhr response body",...e),[void 0]}function LP(t,e){try{if(typeof t=="string")return[t];if(t instanceof Document)return[t.body.outerHTML];if(e==="json"&&t&&typeof t=="object")return[JSON.stringify(t)];if(!t)return[void 0]}catch(n){return ee&&ne.exception(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return ee&&ne.info("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function MP(t,e){try{const n=e==="json"&&t&&typeof t=="object"?JSON.stringify(t):t;return iu(n)}catch{return}}function FP(t){const e=be();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=t.getOptions(),a={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};e&&e.on("beforeAddBreadcrumb",(l,u)=>$P(a,l,u))}catch{}}function $P(t,e,n){if(e.data)try{jP(e)&&BP(n)&&(AP(e,n),RP(e,n,t)),UP(e)&&HP(n)&&(bP(e,n),yP(e,n,t))}catch(r){ee&&ne.exception(r,"Error when enriching network breadcrumb")}}function jP(t){return t.category==="xhr"}function UP(t){return t.category==="fetch"}function BP(t){return t&&t.xhr}function HP(t){return t&&t.response}function VP(t){const e=be();kb(vA(t)),Ql(pP(t)),iP(t),FP(t);const n=fP(t);E1(n),e&&(e.on("beforeSendEvent",rP(t)),e.on("afterSendEvent",eP(t)),e.on("createDsc",r=>{const s=t.getSessionId();s&&t.isEnabled()&&t.recordingMode==="session"&&t.checkAndHandleExpiredSession()&&(r.replay_id=s)}),e.on("spanStart",r=>{t.lastActiveSpan=r}),e.on("spanEnd",r=>{t.lastActiveSpan=r}),e.on("beforeSendFeedback",(r,s)=>{const i=t.getSessionId();s&&s.includeReplay&&t.isEnabled()&&i&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=i)}))}async function zP(t){try{return Promise.all(su(t,[qP(Fe.performance.memory)]))}catch{return[]}}function qP(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function WP(t,e,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,e):0;function a(){return l(),r=t(),r}function l(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function c(){return s&&clearTimeout(s),s=Rs(a,e),o&&i===void 0&&(i=Rs(a,o)),r}return c.cancel=l,c.flush=u,c}const ar=Je.navigator;function GP(){return/iPhone|iPad|iPod/i.test(ar&&ar.userAgent||"")||/Macintosh/i.test(ar&&ar.userAgent||"")&&ar&&ar.maxTouchPoints&&ar.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function KP(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession()){ee&&ne.warn("Received replay event after session expired.");return}const s=r||!e;e=!0,t.clickDetector&&hA(t.clickDetector,n),t.addUpdate(()=>{if(t.recordingMode==="buffer"&&s&&t.setInitialState(),!lh(t,n,s))return!0;
24if(!s)return!1;const i=t.session;if(JP(t,s),t.recordingMode==="buffer"&&i&&t.eventBuffer){const o=t.eventBuffer.getEarliestTimestamp();o&&(ee&&ne.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,t.getOptions().stickySession&&ah(i))}return i&&i.previousSessionId||t.recordingMode==="session"&&t.flush(),!0})}}function YP(t){const e=t.getOptions();return{type:pe.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:t.eventBuffer?t.eventBuffer.type==="worker":!1,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}function JP(t,e){!e||!t.session||t.session.segmentId!==0||lh(t,YP(t),!1)}function XP(t,e,n,r){return Wr(Gy(t,Hf(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e=="string"?new TextEncoder().encode(e).length:e.length},e]])}function ZP({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)} 25`;if(typeof t=="string")n=`${r}${t}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+t.length),n.set(i),n.set(t,i.length)}return n}async function QP({client:t,scope:e,replayId:n,event:r}){const s=typeof t._integrations=="object"&&t._integrations!==null&&!Array.isArray(t._integrations)?Object.keys(t._integrations):void 0,i={event_id:n,integrations:s};t.emit("preprocessEvent",r,i);const o=await ky(t.getOptions(),r,i,e,t,Gs());if(!o)return null;o.platform=o.platform||"javascript";const a=t.getSdkMetadata(),{name:l,version:u}=a&&a.sdk||{};return o.sdk={...o.sdk,name:l||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function eD({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=ZP({recordingData:t,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:u,initialTimestamp:c}=r,d=be(),f=st(),p=d&&d.getTransport(),h=d&&d.getDsn();if(!d||!p||!h||!i.sampled)return Nn({});const g={type:PC,replay_start_timestamp:c/1e3,timestamp:s/1e3,error_ids:l,trace_ids:u,urls:a,replay_id:e,segment_id:n,replay_type:i.sampled},_=await QP({scope:f,client:d,replayId:e,event:g});if(!_)return d.recordDroppedEvent("event_processor","replay",g),ee&&ne.info("An event processor returned `null`, will not send event."),Nn({});delete _.sdkProcessingMetadata;const m=XP(_,o,h,d.getOptions().tunnel);let y;try{y=await p.send(m)}catch(T){const I=new Error(Xf);try{I.cause=T}catch{}throw I}if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new S0(y.statusCode);const E=nb({},y);if(tb(E,"replay"))throw new ch(E);return y}class S0 extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class ch extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function E0(t,e={count:0,interval:$C}){const{recordingData:n,onError:r}=t;if(n.length)try{return await eD(t),!0}catch(s){if(s instanceof S0||s instanceof ch)throw s;if(Fy("Replays",{_retryCount:e.count}),r&&r(s),e.count>=jC){const i=new Error(`${Xf} - max retries exceeded`);try{i.cause=s}catch{}throw i}return e.interval*=++e.count,new Promise((i,o)=>{Rs(async()=>{try{await E0(t,e),i(!0)}catch(a){o(a)}},e.interval)})}}const w0="__THROTTLED",tD="__SKIPPED";function nD(t,e,n){const r=new Map,s=a=>{const l=a-n;r.forEach((u,c)=>{c<l&&r.delete(c)})},i=()=>[...r.values()].reduce((a,l)=>a+l,0);let o=!1;return(...a)=>{const l=Math.floor(Date.now()/1e3);if(s(l),i()>=e){const c=o;return o=!0,c?tD:w0}o=!1;const u=r.get(l)||0;return r.set(l,u+1),t(...a)}}class qn{constructor({options:e,recordingOptions:n}){qn.prototype.__init.call(this),qn.prototype.__init2.call(this),qn.prototype.__init3.call(this),qn.prototype.__init4.call(this),qn.prototype.__init5.call(this),qn.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:DC,sessionIdleExpire:NC},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=e,this._debouncedFlush=WP(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=nD((o,a)=>XA(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(UC,r),timeout:r,scrollTimeout:BC,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new uA(this,i)),ee){const o=e._experiments;ne.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){ee&&ne.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(e),!this.session){ee&&ne.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",ee&&ne.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}
25start(){if(this._isEnabled&&this.recordingMode==="session"){ee&&ne.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){ee&&ne.info("Buffering is in progress, call `flush()` to save the replay");return}ee&&ne.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Fu({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled){ee&&ne.info("Buffering is in progress, call `flush()` to save the replay");return}ee&&ne.infoTick("Starting replay in buffer mode");const e=Fu({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=An({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:FC}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:KP(this),...GP(),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{ee&&ne.info(`Stopping Replay${n?` triggered by ${n}`:""}`),h0(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,WA(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),ee&&ne.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),ee&&ne.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();ee&&ne.info("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!e||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const n=e();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&md(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const e=`${Fe.location.pathname}${Fe.location.hash}${Fe.location.search}`,n=`${Fe.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(e,n){const r=this._throttledAddEvent(e,n);if(r===w0){const s=ln({category:"replay.throttled"});this.addUpdate(()=>!lh(this,{type:nA,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const e=this.lastActiveSpan||at(),n=e&&ht(e),s=(n&&ye(n).data||{})[kn];if(!(!n||!s||!["route","custom"].includes(s)))return ye(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=VA({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const n=this._options.errorSampleRate>0,r=Fu({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const e=this.session;return u0(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Fe.document.addEventListener("visibilitychange",this._handleVisibilityChange),Fe.addEventListener("blur",this._handleWindowBlur),Fe.addEventListener("focus",this._handleWindowFocus),Fe.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(VP(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=MA(this)}_removeListeners(){try{Fe.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Fe.removeEventListener("blur",this._handleWindowBlur),Fe.removeEventListener("focus",this._handleWindowFocus),Fe.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{Fe.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroun
25dTasks()}}__init2(){this._handleWindowBlur=()=>{const e=ln({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=ln({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{EA(this,e)}}_doChangeToBackgroundTasks(e){!this.session||l0(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){ee&&ne.info("Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:pe.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=IA(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;e=e.filter(r=>r.start>=n)}return Promise.all(su(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:n}=this;if(!e||!n||this._requiresManualStart||e.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){ee&&ne.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await zP(this),!!this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await E0({replayId:e,recordingData:i,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=be();if(r){const s=n instanceof ch?"ratelimit_backoff":"send_error";r.recordDroppedEvent(s,"replay")}}}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){ee&&ne.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){ee&&ne.info(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&ee&&ne.info("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&ah(this.session)}__init6(){this._onMutationHandler=e=>{const n=e.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=ln({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function oi(t,e){return[...t,...e].join(",")}function rD({mask:t,unmask:e,block:n,unblock:r,ignore:s}
25){const i=["base","iframe[srcdoc]:not([src])"],o=oi(t,[".sentry-mask","[data-sentry-mask]"]),a=oi(e,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:oi(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:oi(r,[]),ignoreSelector:oi(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function sD({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&t.matches(s.unmaskTextSelector)?i:n.includes(e)||e==="value"&&t.tagName==="INPUT"&&["submit","button"].includes(t.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const Tg='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',iD=["content-length","content-type","accept"];let Ig=!1;const oD=(t=>new x0(t));let x0=class T0{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=LC,flushMaxDelay:n=MC,minReplayDuration:r=HC,maxReplayDuration:s=sg,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:l={},maskAllText:u=!0,maskAllInputs:c=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:m=[],networkCaptureBodies:y=!0,networkRequestHeaders:E=[],networkResponseHeaders:T=[],mask:I=[],maskAttributes:x=["title","placeholder"],unmask:R=[],block:C=[],unblock:S=[],ignore:w=[],maskFn:A,beforeAddRecordingEvent:P,beforeErrorSampling:O,onError:N}={}){this.name=T0.id;const V=rD({mask:I,unmask:R,block:C,unblock:S,ignore:w});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:A,maskInputFn:A,maskAttributeFn:(L,W,q)=>sD({maskAttributes:x,maskAllText:u,privacyOptions:V,key:L,value:W,el:q}),...V,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:L=>{try{L.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:n,minReplayDuration:Math.min(r,VC),maxReplayDuration:Math.min(s,sg),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:g,networkDetailAllowUrls:_,networkDetailDenyUrls:m,networkCaptureBodies:y,networkRequestHeaders:Og(E),networkResponseHeaders:Og(T),beforeAddRecordingEvent:P,beforeErrorSampling:O,onError:N,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Tg}`:Tg),this._isInitialized&&Kp())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Ig}set _isInitialized(e){Ig=e}afterAllSetup(e){!Kp()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}getRecordingMode(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const n=aD(this._initialOptions,e);this._replay=new qn({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const n=e.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};x0.__initStatic();function aD(t,e){const n=e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Xn(t)},s=el(n.replaysSessionSampleRate),i=el(n.replaysOnErrorSampleRate);return s==null&&i==null&&Ks(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function Og(t){return[...iD,...t.map(e=>e.toLowerCase())]}
25const kg=new WeakMap,$u=new Map,Aa={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function lD(t,e){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a}={traceFetch:Aa.traceFetch,traceXHR:Aa.traceXHR,trackFetchStreamPerformance:Aa.trackFetchStreamPerformance,...e},l=typeof i=="function"?i:d=>!0,u=d=>dD(d,a),c={};n&&(t.addEventProcessor(d=>(d.type==="transaction"&&d.spans&&d.spans.forEach(f=>{if(f.op==="http.client"){const p=$u.get(f.span_id);p&&(f.timestamp=p/1e3,$u.delete(f.span_id))}}),d)),s&&ZI(d=>{if(d.response){const f=kg.get(d.response);f&&d.endTimestamp&&$u.set(f,d.endTimestamp)}}),cb(d=>{const f=qI(d,l,u,c);if(d.response&&d.fetchData.__span&&kg.set(d.response,d.fetchData.__span),f){const p=I0(d.fetchData.url),h=p?Pr(p).host:void 0;f.setAttributes({"http.url":p,"server.address":h})}o&&f&&Cg(f)})),r&&Rb(d=>{const f=fD(d,l,u,c);o&&f&&Cg(f)})}function uD(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Cg(t){const{url:e}=ye(t).data||{};if(!e||typeof e!="string")return;const n=Cs("resource",({entries:r})=>{r.forEach(s=>{uD(s)&&s.name.endsWith(e)&&(cD(s).forEach(o=>t.setAttribute(...o)),setTimeout(n))})})}function nn(t=0){return((gt||performance.timeOrigin)+t)/1e3}function cD(t){const{name:e,version:n}=Ob(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),gt?[...r,["http.request.redirect_start",nn(t.redirectStart)],["http.request.fetch_start",nn(t.fetchStart)],["http.request.domain_lookup_start",nn(t.domainLookupStart)],["http.request.domain_lookup_end",nn(t.domainLookupEnd)],["http.request.connect_start",nn(t.connectStart)],["http.request.secure_connection_start",nn(t.secureConnectionStart)],["http.request.connection_end",nn(t.connectEnd)],["http.request.request_start",nn(t.requestStart)],["http.request.response_start",nn(t.responseStart)],["http.request.response_end",nn(t.responseEnd)]]:r}function dD(t,e){const n=J.location&&J.location.href;if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return e?Wn(r.toString(),e)||i&&Wn(r.pathname,e):i}else{const r=!!t.match(/^\/(?!\/)/);return e?Wn(t,e):r}}function fD(t,e,n,r){const s=t.xhr,i=s&&s[Tr];if(!s||s.__sentry_own_request__||!i)return;const o=Fr()&&e(i.url);if(t.endTimestamp&&o){const d=s.__sentry_xhr_span_id__;if(!d)return;const f=r[d];f&&i.status_code!==void 0&&(Ay(f,i.status_code),f.end(),delete r[d]);return}const a=I0(i.url),l=a?Pr(a).host:void 0,u=!!at(),c=o&&u?So({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":a,url:i.url,"server.address":l,[pt]:"auto.http.browser",[Is]:"http.client"}}):new Xs;return s.__sentry_xhr_span_id__=c.spanContext().spanId,r[s.__sentry_xhr_span_id__]=c,n(i.url)&&hD(s,Fr()&&u?c:void 0),c}function hD(t,e){const{"sentry-trace":n,baggage:r}=sb({span:e});n&&pD(t,n,r)}function pD(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader("baggage",n)}catch{}}function I0(t){try{return new URL(t,J.location.origin).href}catch{return}}function gD(){J&&J.document?J.document.addEventListener("visibilitychange",()=>{const t=at();if(!t)return;const e=ht(t);if(J.document.hidden&&e){const n="cancelled",{op:r,status:s}=ye(e);xe&&z.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||e.setStatus({code:Xi,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):xe&&z.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const mD="BrowserTracing",_D={...Ia,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Aa},vD=((t={})=>{gT();const{enableInp:e,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:s,enableStandaloneClsSpans:i},beforeStartSpan:o,idleTimeout:a,finalTimeout:l,childSpanTimeout:u,markBackgroun
25dSpan:c,traceFetch:d,traceXHR:f,trackFetchStreamPerformance:p,shouldCreateSpanForRequest:h,enableHTTPTimings:g,instrumentPageLoad:_,instrumentNavigation:m}={..._D,...t},y=ak({recordClsStandaloneSpans:i||!1});e&&Pk(),r&&Je.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?uk():n&&lk(),s&&ck();const E={name:void 0,source:void 0};function T(I,x){const R=x.op==="pageload",C=o?o(x):x,S=C.attributes||{};x.name!==C.name&&(S[kn]="custom",C.attributes=S),E.name=C.name,E.source=S[kn];const w=Xy(C,{idleTimeout:a,finalTimeout:l,childSpanTimeout:u,disableAutoFinish:R,beforeSpanEnd:P=>{y(),gk(P,{recordClsOnPageloadSpan:!i})}});function A(){["interactive","complete"].includes(J.document.readyState)&&I.emit("idleSpanEnableAutoFinish",w)}return R&&J.document&&(J.document.addEventListener("readystatechange",()=>{A()}),A()),w}return{name:mD,afterAllSetup(I){let x,R=J.location&&J.location.href;function C(){x&&!ye(x).timestamp&&(xe&&z.log(`[Tracing] Finishing current active span with op: ${ye(x).op}`),x.end())}I.on("startNavigationSpan",S=>{be()===I&&(C(),x=T(I,{op:"navigation",...S}))}),I.on("startPageLoadSpan",(S,w={})=>{if(be()!==I)return;C();const A=w.sentryTrace||Rg("sentry-trace"),P=w.baggage||Rg("baggage"),O=w1(A,P);st().setPropagationContext(O),x=T(I,{op:"pageload",...S})}),I.on("spanEnd",S=>{const w=ye(S).op;if(S!==ht(S)||w!=="navigation"&&w!=="pageload")return;const A=st(),P=A.getPropagationContext();A.setPropagationContext({...P,sampled:P.sampled!==void 0?P.sampled:Kl(S),dsc:P.dsc||Ys(S)})}),J.location&&(_&&yD(I,{name:J.location.pathname,startTime:gt?gt/1e3:void 0,attributes:{[kn]:"url",[pt]:"auto.pageload.browser"}}),m&&Ql(({to:S,from:w})=>{if(w===void 0&&R&&R.indexOf(S)!==-1){R=void 0;return}w!==S&&(R=void 0,bD(I,{name:J.location.pathname,attributes:{[kn]:"url",[pt]:"auto.navigation.browser"}}))})),c&&gD(),s&&SD(a,l,u,E),e&&Nk(),lD(I,{traceFetch:d,traceXHR:f,trackFetchStreamPerformance:p,tracePropagationTargets:I.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:g})}}});function yD(t,e,n){t.emit("startPageLoadSpan",e,n),st().setTransactionName(e.name);const r=at();return(r&&ye(r).op)==="pageload"?r:void 0}function bD(t,e){Gs().setPropagationContext({traceId:Ja()}),st().setPropagationContext({traceId:Ja()}),t.emit("startNavigationSpan",e),st().setTransactionName(e.name);const n=at();return(n&&ye(n).op)==="navigation"?n:void 0}function Rg(t){const e=x1(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}function SD(t,e,n,r){let s;const i=()=>{const o="ui.action.click",a=at(),l=a&&ht(a);if(l){const u=ye(l).op;if(["navigation","pageload"].includes(u)){xe&&z.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(qc,"interactionInterrupted"),s.end(),s=void 0),!r.name){xe&&z.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}s=Xy({name:r.name,op:o,attributes:{[kn]:r.source||"url"}},{idleTimeout:t,finalTimeout:e,childSpanTimeout:n})};J.document&&addEventListener("click",i,{once:!1,capture:!0})}const Ag=1e6,Pa=String(0),ED="main";let O0="",k0="",C0="",yd=J.navigator&&J.navigator.userAgent||"",R0="";const wD=J.navigator&&J.navigator.language||J.navigator&&J.navigator.languages&&J.navigator.languages[0]||"";function xD(t){return typeof t=="object"&&t!==null&&"getHighEntropyValues"in t}const Pg=J.navigator&&J.navigator.userAgentData;xD(Pg)&&Pg.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(t=>{if(O0=t.platform||"",C0=t.architecture||"",R0=t.model||"",k0=t.platformVersion||"",t.fullVersionList&&t.fullVersionList.length>0){const e=t.fullVersionList[t.fullVersionList.length-1];yd=`${e.brand} ${e.version}`}}).catch(t=>{});function TD(t){return!("thread_metadata"in t)}function ID(t){return TD(t)?CD(t):t}function OD(t){const e=t&&t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id;return typeof e=="string"&&e.length!==32&&xe&&z.log(`[Profiling] Invalid traceId: ${e} on profiled event`),typeof e!="string"?"":e}function kD(t,e,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const s=OD(r),i=ID(n),o=e||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Ct()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:Ct()*1e3;return{event_id:t,timestamp:new Date(o).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||T1,runtime:{name:"javascript",version:J.navigator.userAgent},os:{name:O0,version:k0,build_number:yd},device:{locale:wD,model:R0,manufacturer:yd,architecture:C0,is_emulator:!1},debug_meta:{images:PD(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||Rr(),trace_id:s,active_thread_id:Pa,relative_start_ns:"0",relative_end_ns:((a-o)*1e6).toFixed(0)}]}}function A0(t){return ye(t).op==="pageload"}function CD(t){let e,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Pa]:{name:ED}}},s=t.samples[0];if(!s)return r;const i=s.timestamp,o=typeof performance.timeOrigin=="number"?performance.timeOrigin:gt||0,a=o-(gt||o);
25return t.samples.forEach((l,u)=>{if(l.stackId===void 0){e===void 0&&(e=n,r.stacks[e]=[],n++),r.samples[u]={elapsed_since_start_ns:((l.timestamp+a-i)*Ag).toFixed(0),stack_id:e,thread_id:Pa};return}let c=t.stacks[l.stackId];const d=[];for(;c;){d.push(c.frameId);const p=t.frames[c.frameId];p&&r.frames[c.frameId]===void 0&&(r.frames[c.frameId]={function:p.name,abs_path:typeof p.resourceId=="number"?t.resources[p.resourceId]:void 0,lineno:p.line,colno:p.column}),c=c.parentId===void 0?void 0:t.stacks[c.parentId]}const f={elapsed_since_start_ns:((l.timestamp+a-i)*Ag).toFixed(0),stack_id:n,thread_id:Pa};r.stacks[n]=d,r.samples[u]=f,n++}),r}function RD(t,e){if(!e.length)return t;for(const n of e)t[1].push([{type:"profile"},n]);return t}function AD(t){const e=[];return Jc(t,(n,r)=>{if(r==="transaction")for(let s=1;s<n.length;s++){const i=n[s];i&&i.contexts&&i.contexts.profile&&i.contexts.profile.profile_id&&e.push(n[s])}}),e}function PD(t){const e=be(),n=e&&e.getOptions(),r=n&&n.stackParser;return r?I1(r,t):[]}function DD(t){return typeof t!="number"&&typeof t!="boolean"||typeof t=="number"&&isNaN(t)?(xe&&z.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t===!0||t===!1?!0:t<0||t>1?(xe&&z.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function ND(t){return t.samples.length<2?(xe&&z.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):t.frames.length?!0:(xe&&z.log("[Profiling] Discarding profile because it contains no frames"),!1)}let P0=!1;const D0=3e4;function LD(t){return typeof t=="function"}function MD(){const t=J.Profiler;if(!LD(t)){xe&&z.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const e=10,n=Math.floor(D0/e);try{return new t({sampleInterval:e,maxBufferSize:n})}catch{xe&&(z.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),z.log("[Profiling] Disabling profiling for current user session.")),P0=!0}}function Dg(t){if(P0)return xe&&z.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!t.isRecording())return xe&&z.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const e=be(),n=e&&e.getOptions();if(!n)return xe&&z.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return DD(r)?r?(r===!0?!0:Math.random()<r)?!0:(xe&&z.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(xe&&z.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(xe&&z.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function FD(t,e,n,r){return ND(n)?kD(t,e,n,r):null}const Or=new Map;function $D(){return Or.size}function jD(t){const e=Or.get(t);return e&&Or.delete(t),e}function UD(t,e){if(Or.set(t,e),Or.size>30){const n=Or.keys().next().value;Or.delete(n)}}function Ng(t){let e;A0(t)&&(e=Ct()*1e3);const n=MD();if(!n)return;xe&&z.log(`[Profiling] started profiling span: ${ye(t).description}`);const r=Rr();st().setContext("profile",{profile_id:r,start_timestamp:e});async function s(){if(t&&n)return n.stop().then(l=>{if(i&&(J.clearTimeout(i),i=void 0),xe&&z.log(`[Profiling] stopped profiling of span: ${ye(t).description}`),!l){xe&&z.log(`[Profiling] profiler returned null profile for: ${ye(t).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}UD(r,l)}).catch(l=>{xe&&z.log("[Profiling] error while stopping profiler:",l)})}let i=J.setTimeout(()=>{xe&&z.log("[Profiling] max profile duration elapsed, stopping profiling for:",ye(t).description),s()},D0);const o=t.end.bind(t);function a(){return t?(s().then(()=>{o()},()=>{o()}),t):o()}t.end=a}const BD="BrowserProfiling",HD=(()=>({name:BD,setup(t){const e=at(),n=e&&ht(e);n&&A0(n)&&Dg(n)&&Ng(n),t.on("spanStart",r=>{r===ht(r)&&Dg(r)&&Ng(r)}),t.on("beforeEnvelope",r=>{if(!$D())return;const s=AD(r);if(!s.length)return;const i=[];for(const o of s){const a=o&&o.contexts,l=a&&a.profile&&a.profile.profile_id,u=a&&a.profile&&a.profile.start_timestamp;if(typeof l!="string"){xe&&z.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!l){xe&&z.log("[Profiling] cannot find profile for a span without a profile context");continue}a&&a.profile&&delete a.profile;const c=jD(l);if(!c){xe&&z.log(`[Profiling] Could not retrieve profile for span: ${l}`);continue}const d=FD(l,u,c,o);d&&i.push(d)}RD(r,i)})}})),VD=HD;function zD(t){const e={...t};return rb(e,"react"),Fy("react",{version:b.version}),AC(e)}const qD=b.createContext(null),ju={didCatch:!1,error:null};let WD=class extends b.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=ju}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){var r,s;const{error:n}=this.state;n!==null&&((s=(r=this.props).onReset)==null||s.call(r,{args:e,reason:"imperative-api"}),this.setState(ju))}componentDidCatch(e,n){var r,s;(s=(r=this.props).onError)==null||s.call(r,e,n)}componentDidUpdate(e,n){var i,o;const{didCatch:r}=this.state,{resetKeys:s}=this.props;r&&n.error!==null&&GD(e.resetKeys,s)&&((o=(i=this.props).onReset)==null||o.call(i,{next:s,prev:e.resetKeys,reason:"keys"}),this.setState(ju))}render(){const{children:e,fallbackRender:n,FallbackComponent:r,fallback:s}=this.props,{didCatch:i,error:o}=this.state;let a=e;if(i){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=b.createElement(r,l);else if(s!==void 0)a=s;else throw o}return b.createElement(qD.Provider,{value:{didCatch:i,error:o,resetErrorBoundary:this.resetErrorBoundary}},a)}};function GD(t=[],e=[]){return t.length!==e.length||t.some((n,r)=>!Object.is(n,e[r]))}function KD(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);
25return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function YD(t,e,n=""){if(!arguments.length)throw new TypeError("Argument 1 `value` is required.");if(typeof e!="function")throw new TypeError("Argument 2 `isExtractable` must be a function.");if(typeof n!="string")throw new TypeError("Argument 3 `path` must be a string.");const r=new Map,s=new Map;function i(o,a,l){if(e(o)){const d=s.get(o);return d?d.push(a):s.set(o,[a]),null}const u=Array.isArray(o)||typeof FileList<"u"&&o instanceof FileList,c=KD(o);if(u||c){let d=r.get(o);const f=!d;if(f&&(d=u?[]:o instanceof Object?{}:Object.create(null),r.set(o,d)),!l.has(o)){const p=a?`${a}.`:"",h=new Set(l).add(o);if(u){let g=0;for(const _ of o){const m=i(_,p+g++,h);f&&d.push(m)}}else for(const g in o){const _=i(o[g],p+g,h);f&&(d[g]=_)}}return d}return o}return{clone:i(t,n,new Set),files:s}}function JD(t,e,n){"name"in n?t.append(e,n,n.name):t.append(e,n)}function XD(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob}function ZD({uri:t="/graphql",useGETForQueries:e,isExtractableFile:n=XD,FormData:r,formDataAppendFile:s=JD,print:i=eT,fetch:o,fetchOptions:a,credentials:l,headers:u,includeExtensions:c}={}){const d={http:{includeExtensions:c},options:a,credentials:l,headers:u};return new Za(f=>{const p=f.getContext(),{clientAwareness:{name:h,version:g}={},headers:_}=p,m={http:p.http,options:p.fetchOptions,credentials:p.credentials,headers:{...h&&{"apollographql-client-name":h},...g&&{"apollographql-client-version":g},..._}},{options:y,body:E}=Y1(f,i,tT,d,m),{clone:T,files:I}=YD(E,n,"");let x=J1(f,t);if(I.size){y.headers&&delete y.headers["content-type"];const S=r||FormData,w=new S;w.append("operations",xp(T,"Payload"));const A={};let P=0;I.forEach(O=>{A[++P]=O}),w.append("map",JSON.stringify(A)),P=0,I.forEach((O,N)=>{s(w,String(++P),N)}),y.body=w}else if(e&&!f.query.definitions.some(S=>S.kind==="OperationDefinition"&&S.operation==="mutation")&&(y.method="GET"),y.method==="GET"){const{newURI:S,parseError:w}=X1(x,E);if(w)return new Qa(A=>{A.error(w)});x=S}else y.body=xp(T,"Payload");const{controller:R}=Z1();typeof R!="boolean"&&(y.signal&&(y.signal.aborted?R.abort():y.signal.addEventListener("abort",()=>{R.abort()},{once:!0})),y.signal=R.signal);const C=o||fetch;return new Qa(S=>{let w;return C(x,y).then(A=>(f.setContext({response:A}),A)).then(Q1(f)).then(A=>{S.next(A),S.complete()}).catch(A=>{w||(A.result&&A.result.errors&&A.result.data&&S.next(A.result),S.error(A))}),()=>{w=!0,typeof R!="boolean"&&R.abort()}})})}var D=typeof window<"u"?window:void 0,St=typeof globalThis<"u"?globalThis:D,kt=St==null?void 0:St.navigator,H=St==null?void 0:St.document,He=St==null?void 0:St.location,dh=St==null?void 0:St.fetch,bd=St!=null&&St.XMLHttpRequest&&"withCredentials"in new St.XMLHttpRequest?St.XMLHttpRequest:void 0,Lg=St==null?void 0:St.AbortController,QD=St==null?void 0:St.CompressionStream,At=kt==null?void 0:kt.userAgent;function N0(){return!(!D||D.navigator.onLine===!1)}var ai=typeof globalThis<"u"?globalThis:D;ai&&typeof self>"u"&&(ai.self=ai),ai&&typeof File>"u"&&(ai.File=function(){});var K=D??{},Re={DEBUG:!1,LIB_VERSION:"0.5.0",LIB_NAME:"browser-common"};function Mg(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(u){return void n(u)}a.done?e(l):Promise.resolve(l).then(r,s)}function Pe(t){return function(){var e=this,n=arguments;return new Promise((function(r,s){var i=t.apply(e,n);function o(l){Mg(i,r,s,o,a,"next",l)}function a(l){Mg(i,r,s,o,a,"throw",l)}o(void 0)}))}}function F(){return F=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},F.apply(null,arguments)}function L0(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var Fg=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}};function $g(t){return typeof t=="string"||t}function jg(t){return typeof t=="string"?t:void 0}var li,eN=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain","utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx","$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"],En=(function(t){return t.AnonymousId="anonymous_id",t.DistinctId="distinct_id",t.Props="props",t.EnablePersonProcessing="enable_person_processing",t.PersonMode="person_mode",t.FeatureFlagDetails="feature_flag_details",t.FeatureFlags="feature_flags",t.FeatureFlagPayloads="feature_flag_payloads",t.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",t.BootstrapFeatureFlags="bootstrap_feature_flags",t.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",t.OverrideFeatureFlags="override_feature_flags",t.Queue="queue",t.AiQueue="ai_queue",t.LogsQueue="logs_queue",t.OptedOut="opted_out",t.SessionId="session_id",t.SessionStartTimestamp="session_start_timestamp",t.SessionLastTimestamp="session_timestamp",t.PersonProperties="person_properties",t.GroupProperties="group_properties",t.InstalledAppBuild="installed_app_build",t.InstalledAppVersion="installed_app_version",t.SessionReplay="session_replay",t.PushRegistered="push_registered",t.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",t.SurveyLastSeenDate="survey_last_seen_date",t.
25SurveysSeen="surveys_seen",t.Surveys="surveys",t.RemoteConfig="remote_config",t.FlagsEndpointWasHit="flags_endpoint_was_hit",t.DeviceId="device_id",t})({}),Ug=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),tN=["$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"],nN=["token"],M0="NativeGzipValidationError",Sd=t=>t.length>=2&&t[0]===31&&t[1]===139,Bg=(t,e)=>t===Ug.GZipJS||e===Ug.GZipJS||e==="gzip",Hg=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError",Jo=t=>{var e=new Error("Native gzip produced invalid output: "+t);throw e.name=M0,e},rN=(function(){var t=Pe((function*(e,n){18>e.size&&Jo("too-short");var r=new Uint8Array(yield e.slice(0,10).arrayBuffer());Sd(r)&&r[2]===8||Jo("invalid-header");var s=new DataView(yield e.slice(e.size-8).arrayBuffer());s.getUint32(0,!0)!==(o=>{for(var a=(()=>{if(li)return li;li=[];for(var c=0;256>c;c++){for(var d=c,f=0;8>f;f++)d=1&d?3988292384^d>>>1:d>>>1;li[c]=d>>>0}return li})(),l=4294967295,u=0;o.length>u;u++)l=a[255&(l^o[u])]^l>>>8;return(4294967295^l)>>>0})(n)&&Jo("invalid-crc");var i=n.length>>>0;s.getUint32(4,!0)!==i&&Jo("invalid-size")}));return function(e,n){return t.apply(this,arguments)}})();function Ed(){return Ed=Pe((function*(t,e,n){e===void 0&&(e=!0);try{var r=new TextEncoder().encode(t),s=new globalThis.CompressionStream("gzip"),i=s.writable.getWriter(),o=i.write(r).then((()=>i.close())).catch((function(){var u=Pe((function*(c){try{yield i.abort(c)}catch{}throw c}));return function(c){return u.apply(this,arguments)}})()),a=new Response(s.readable).blob(),l=(yield Promise.all([a,o]))[0];return yield rN(l,r),l}catch(u){if(n!=null&&n.rethrow)throw u;return e&&console.error("Failed to gzip compress data",u),null}})),Ed.apply(this,arguments)}var sN=["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"],Vg=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var n=t.toLowerCase();return sN.concat(e).some((r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1}))};function Q(t,e){return t.indexOf(e)!==-1}var ou=function(t){return t.trim()},wd=function(t){return t.replace(/^\$/,"")};function F0(t){var e,n=[];return(e=JSON.stringify(t,(function(r,s){if(typeof s=="bigint")return s.toString();if(typeof s!="function"&&typeof s!="symbol"){if(s instanceof Error)return{name:s.name,message:s.message,stack:s.stack};if(s&&typeof s=="object"){for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(n.includes(s))return"[Circular]";n.push(s)}return s}})))!==null&&e!==void 0?e:"null"}var $0=Object.prototype,j0=$0.hasOwnProperty,au=$0.toString,te=Array.isArray||function(t){return au.call(t)==="[object Array]"},Tt=t=>typeof t=="function",je=t=>t===Object(t)&&!te(t),Cn=t=>{if(je(t)){for(var e in t)if(j0.call(t,e))return!1;return!0}return!1},U=t=>t===void 0,ve=t=>au.call(t)=="[object String]",xd=t=>ve(t)&&t.trim().length===0,Nt=t=>t===null,se=t=>U(t)||Nt(t),et=t=>au.call(t)=="[object Number]"&&t==t,yn=t=>et(t)&&t>0,Ut=t=>au.call(t)==="[object Boolean]",iN=t=>t instanceof FormData,oN=t=>Q(tN,t),aN=t=>Q(nN,t);function U0(t){return t===null||typeof t!="object"}function hl(t,e){return{}.toString.call(t)==="[object "+e+"]"}function fh(t){return typeof Event<"u"&&B0(t,Event)}function B0(t,e){try{return t instanceof e}catch{return!1}}var lN=[!0,"true",1,"1","yes"],Uu=t=>Q(lN,t),uN=[!1,"false",0,"0","no"];function un(t,e,n,r,s){return e>n&&(r.warn("min cannot be greater than max."),e=n),et(t)?t>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e>t?(r.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+s),un(s||n,e,n,r))}class cN{constructor(e){this.tt={},this.et=e.et,this.it=un(e.bucketSize,0,100,e.rt),this.nt=un(e.refillRate,0,this.it,e.rt),this.st=un(e.refillInterval,0,864e5,e.rt)}ot(e,n){var r=Math.floor((n-e.lastAccess)/this.st);r>0&&(e.tokens=Math.min(e.tokens+r*this.nt,this.it),e.lastAccess=e.lastAccess+r*this.st)}consumeRateLimit(e){var n,r=Date.now(),s=String(e),i=this.tt[s];return i?this.ot(i,r):this.tt[s]=i={tokens:this.it,lastAccess:r},i.tokens===0||(i.tokens--,i.tokens===0&&((n=this.et)==null||n.call(this,e)),i.tokens===0)}stop(){this.tt={}}}var Ht="Mobile",pl="iOS",Rn="Android",Ns="Tablet",H0=Rn+" "+Ns,V0="iPad",z0="Apple",q0=z0+" Watch",Ui="Safari",Ls="BlackBerry",W0="Samsung",G0=W0+"Browser",K0=W0+" Internet",Dr="Chrome",dN=Dr+" OS",Y0=Dr+" "+pl,hh="Internet Explorer",J0=hh+" "+Ht,ph="Opera",fN=ph+" Mini",gh="Edge",X0="Microsoft "+gh,Es="Firefox",Z0=Es+" "+pl,io="Nintendo",oo="PlayStation",ws="Xbox",Q0=Rn+" "+Ht,eS=Ht+" "+Ui,Ti="Windows",Td=Ti+" Phone",zg="Nokia",Id="Ouya",tS="Generic",hN=tS+" "+Ht.toLowerCase(),nS=tS+" "+Ns.toLowerCase(),Od="Konqueror",rS="Oculus Browser",gl="Vivaldi",sS="Yandex",ml="Whale",kd="DuckDuckGo",iS="Pale Moon",_l="Waterfox",Bi="Brave",oS="Google Search App",Ke="(\\d+(\\.\\d+)?)",Bu=new RegExp("Version/"+Ke),pN=new RegExp(ws,"i"),gN=new RegExp(oo+" \\w+","i"),mN=new RegExp(io+" \\w+","i"),mh=new RegExp(Ls+"|PlayBook|BB10","i"),_N={"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"},aS=function(t,e,n,r){e=e||"";var s=(function(i){return i!=null&&i.brave?Bi:null})(n);return s||(r!=null&&r.detectGoogleSearchApp&&Q(t,"GSA/")?oS:Q(t," OPR/")&&Q(t,"Mini")?fN:Q(t," OPR/")?ph:mh.test(t)?Ls:Q(t,"IE"+Ht)||Q(t,"WPDesktop")?J0:Q(t,"OculusBrowser")?rS:Q(t,G0)?K0:Q(t,gh)||Q(t,"Edg/")?X0:Q(t,gl+"/")?gl:Q(t,"YaBrowser/")?sS:Q(t,ml+"/")?ml:Q(t,kd+"/")||Q(t,"Ddg/")?kd:Q(t,"FBIOS")?"Facebook "+Ht:Q(t,"UCWEB")||Q(t,"UCBrowser")?"UC Browser":Q(t,"CriOS")?Y0:Q(t,"CrMo")||Q(t,Dr)?Dr:Q(t,Rn)&&Q(t,Ui)?Q0:Q(t,"FxiOS")?Z0:Q(t.toLowerCase(),Od.toLowerCase())?Od:Q(t,Bi+"/")?Bi:((i,o)=>o&&Q(o,z0)||(function(a){return Q(a,Ui)&&!Q(a,Dr)&&!Q(a,Rn)})(i))(t,e)?Q(t,Ht)?eS:Ui:Q(t,"PaleMoon/")?iS:Q(t,_l+"/")?_l:Q(t,Es)?Es:Q(t,"MSIE")||Q(t,"Trident/")?hh:Q(t,"Gecko")?Es:"")},vN={[J0]:[new RegExp("rv:"+Ke)],[X0]:[new RegExp(gh+"?\\/"+Ke)],[Dr]:[new RegExp("("+Dr+"|CrMo)\\/"+Ke)],[Y0]:[new RegExp("CriOS\\/"+Ke)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ke)],[Ui]:[Bu],[eS]:[Bu],[ph]:[new RegExp("(Opera|OPR)\\/"+Ke)],[Es]:[new RegExp(Es+"\\/"+Ke)],[Z0]:[new RegExp("FxiOS\\/"+Ke)],[Od]:[new RegExp("Konqueror[:/]?"+Ke,"i")],[Ls]:[new RegExp(Ls+" "+Ke),Bu],[Q0]:[new RegExp("android\\s"+Ke,"i")],[K0]:[new RegExp(G0+"\\/"+Ke)],[rS]:[new RegExp("OculusBrowser\\/"+Ke)],[gl]:[new RegExp(gl+"\\/"+Ke)],[sS]:[new RegExp("YaBrowser\\/"+Ke)],[ml]:[new RegExp(ml+"\\/"+Ke)],[Bi]:[new RegExp(Bi+"\\/"+Ke)],[kd]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Ke)],[iS]:[new RegExp("PaleMoon\\/"+Ke)],[_l]:[new RegExp(_l+"\\/"+Ke)],[oS]:[new RegExp("GSA\\/"+Ke)],[hh]:[new RegExp("(rv:|MSIE )"+Ke)],Mozilla:[new RegExp("rv:"+Ke)]},yN=function(t,e,n,r){var s=aS(t,e,n,r),i=vN[s];if(U(i))return null;for(var o=0;i.length>o;o++){var a=t.match(i[o]);if(a)return parseFloat(a[a.length-2])}return null},qg=[[new RegExp(ws+"; "+ws+" (.*?)[);]","i"),t=>[ws,t&&t[1]||""]],[new RegExp(io,"i"),[io,""]],[new RegExp(oo,"i"),[oo,""]],[mh,[Ls,""]],[new RegExp(Ti,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Td,""];if(new RegExp(Ht).test(e)&&!/IEMobile\b/.test(e))return[Ti+" "+Ht,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=_N[n[1]]||"";return/arm/i.test(e)&&(r="RT"),[Ti,r]}return[Ti,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?[pl,[t[3],t[4],t[5]||"0"].join(".")]:[pl,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=U(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Rn+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Rn+")","i"),t=>t&&t[2]?[Rn,[t[2],t[3],t[4]||"0"].join(".")]:[Rn,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];return t&&t[1]&&(e[1]=[t[1],t[2],t[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[dN,""]],[/Linux|debian/i,["Linux",""]]],Wg=function(t){return mN.test(t)?io:gN.test(t)?oo:pN.test(t)?ws:new RegExp(Id,"i").test(t)?Id:new RegExp("("+Td+"|WPDesktop)","i").test(t)?Td:/iPad/.test(t)?V0:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?q0:mh.test(t)?Ls:/(kobo)\s(ereader|touch)/i.test(t)?"K
25obo":new RegExp(zg,"i").test(t)?zg:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?new RegExp(Ht).test(t)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)||/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?Rn:H0:new RegExp("(pda|"+Ht+")","i").test(t)?hN:new RegExp(Ns,"i").test(t)&&!new RegExp(Ns+" pc","i").test(t)?nS:""},bN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Gg(t,e){return typeof(n=t)=="string"&&bN.test(n)?t:e();var n}function er(t){return t&&t.split("#")[0]}function _h(t,e){var n=setTimeout(t,e);return n!=null&&n.unref&&(n==null||n.unref()),n}function Kg(t,e,n){return lS.apply(this,arguments)}function lS(){return(lS=Pe((function*(t,e,n){var r;try{return yield Promise.race([t,new Promise(((s,i)=>{r=_h((()=>{try{n==null||n(),s()}catch(o){i(o)}}),e)}))])}finally{clearTimeout(r)}}))).apply(this,arguments)}var SN=t=>t instanceof Error,uS={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}},EN=uS.info;function cS(t){if(Ut(t))return{boolValue:t};if(typeof t=="number")return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if(typeof t=="string")return{stringValue:t};if(te(t))return{arrayValue:{values:t.map((e=>cS(e)))}};try{return{stringValue:JSON.stringify(t)}}catch{return{stringValue:String(t)}}}function vl(t){var e=[];for(var n in t){var r=t[n];Nt(r)||U(r)||e.push({key:n,value:cS(r)})}return e}function wN(t,e){var n=uS[t.level||"info"]||EN,r=n.text,s=n.number,i=String(Date.now())+"000000",o={};e.distinctId&&(o.posthogDistinctId=e.distinctId),e.sessionId&&(o.sessionId=e.sessionId),e.windowId&&(o["window.id"]=e.windowId),se(e.sessionStartTimestamp)||(o.sessionStartTimestamp=String(e.sessionStartTimestamp)),se(e.lastActivityTimestamp)||(o.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl&&(o["url.full"]=e.currentUrl),e.screenName&&(o["screen.name"]=e.screenName),e.appState&&(o["app.state"]=e.appState),e.activeFeatureFlags&&e.activeFeatureFlags.length>0&&(o.feature_flags=e.activeFeatureFlags);var a=F({},o,t.attributes||{}),l={timeUnixNano:i,observedTimeUnixNano:i,severityNumber:s,severityText:r,body:{stringValue:t.body},attributes:vl(a)};return t.trace_id&&(l.traceId=t.trace_id),t.span_id&&(l.spanId=t.span_id),U(t.trace_flags)||(l.flags=t.trace_flags),l}function dS(t,e,n){return F({},t.resourceAttributes,{"service.name":t.serviceName||"unknown_service"},t.environment&&{"deployment.environment":t.environment},t.serviceVersion&&{"service.version":t.serviceVersion},{"telemetry.sdk.name":e,"telemetry.sdk.version":n})}function fS(t,e,n,r){return{resourceLogs:[{resource:{attributes:vl(e)},scopeLogs:[{scope:{name:n,version:r},logRecords:t}]}]}}let xN=class{constructor(t,e,n,r,s,i,o){var a;i===void 0&&(i=()=>Promise.resolve()),this._instance=t,this.Ne=e,this.rt=n,this.ut=r,this.ht=s,this.dt=i,this.vt=o,this.ct=null,this.ft=0,this.yt=0,this.bt=0,this._t=0,this.wt=!1,this.kt=e.maxBufferSize,this.xt=Math.max((a=e.maxQueueSize)!==null&&a!==void 0?a:e.maxBufferSize,e.maxBufferSize),this.St=e.flushIntervalMs,this.Ct=e.maxBatchRecordsPerPost,this.Mt=e.rateCapWindowMs,this.Tt=e.maxLogsPerInterval}reset(){this.Et(),this.ct=null,this.bt=0,this._t=0,this.wt=!1,this.ft=0,this.yt=0,this.Ct=this.Ne.maxBatchRecordsPerPost}onReconnect(){this.yt=0,this.It()}captureLog(t){if(!this._instance.isDisabled&&!this._instance.optedOut&&t!=null&&t.body){var e=this.Pt(t);if(e!==null)if(e.body){if(this.Rt()){var n={record:wN(e,this.ut())};this.ht((()=>this.At(n)))}}else this.rt.info("Log was rejected in beforeSend function")}}Pt(t){var e=this.Ne.beforeSend;if(!e)return t;var n=te(e)?e:[e],r=t;for(var s of n)try{var i=s(r);if(!i)return this.rt.info("Log was rejected in beforeSend function"),null;r=i}catch(o){return this.rt.error("Error in beforeSend function for log:",o),null}return r}Rt(){if(this.Tt===void 0)return!0;var t=Date.now(),e=t-this.bt;return this.Mt>e&&e>=0||(this.bt=t,this._t=0,this.wt=!1),this.Tt>this._t?(this._t++,!0):(this.wt||(this.rt.warn("captureLog dropping logs: exceeded "+this.Tt+" logs per "+this.Mt+"ms"),this.wt=!0),!1)}flush(){var t=this;return Pe((function*(){if(!t._instance.isDisabled)return t.ct||(t.ct=t.Ft().finally((()=>{t.ct=null}))),t.ct}))()}Ft(){var t=this;return Pe((function*(){var e;t.Et();var n=(e=t._instance.getPersistedProperty(En.LogsQueue))!==null&&e!==void 0?e:[];if(n.length!==0)for(var r=n.length,s=0;n.length>0&&r>s;){var i,o;t.ft=0;var a=Math.min(n.length,t.Ct),l=n.slice(0,a),u=fS(l.map((d=>d.record)),t.Lt(),(i=t.vt)!==null&&i!==void 0?i:t._instance.getLibraryId(),t._instance.getLibraryVersion()),c=yield t._instance.Ot(u);
25if(c.kind==="too-large"&&l.length>1)t.Ct=Math.max(1,Math.floor(l.length/2)),t.rt.warn("Received 413 when sending logs batch of size "+l.length+", reducing batch size to "+t.Ct);else if(c.kind==="retry-later"||(c.kind==="too-large"?t.rt.warn("Dropping a single log record after 413 with batch size 1 â the record is larger than the server cap and cannot be split further."):c.kind==="ok"&&t.Ne.maxBatchRecordsPerPost>t.Ct&&(t.Ct=Math.min(t.Ne.maxBatchRecordsPerPost,t.Ct+1)),yield t.Dt(l.length),n=(o=t._instance.getPersistedProperty(En.LogsQueue))!==null&&o!==void 0?o:[],s+=l.length,c.kind==="fatal"))throw c.error}}))()}Dt(t){var e=this;return Pe((function*(){var n,r=Math.max(0,t-e.ft),s=(n=e._instance.getPersistedProperty(En.LogsQueue))!==null&&n!==void 0?n:[];e._instance.setPersistedProperty(En.LogsQueue,s.slice(r)),yield e.dt()}))()}Lt(){return dS(this.Ne,this._instance.getLibraryId(),this._instance.getLibraryVersion())}At(t){var e;if(!this._instance.optedOut){var n=(e=this._instance.getPersistedProperty(En.LogsQueue))!==null&&e!==void 0?e:[];this.xt>n.length||(n.shift(),this.ft++,this.rt.info("Logs queue is full, dropping oldest record.")),n.push(t),this._instance.setPersistedProperty(En.LogsQueue,n),this.kt>n.length?this.$t():this.It()}}$t(t){t===void 0&&(t=this.St),this.Nt||(this.Nt=_h((()=>{this.Nt=void 0,this.It()}),t))}qt(){var t=Math.min(Math.max(0,this.yt-1),6);return this.St*Math.pow(2,t)}jt(){var t=this._instance.getPersistedProperty(En.LogsQueue);return!!t&&t.length>0}shutdown(t){var e=this;return Pe((function*(){e.Et();var n=e.flush().catch((()=>{}));t!==void 0?yield Kg(n,t):yield n}))()}flushWithTimeout(t){var e=this;return Pe((function*(){var n=e.flush();yield Kg(n,t,(()=>{n.catch((()=>{}))}))}))()}It(){this.flush().then((()=>{this.yt=0}),(t=>{this.yt++,this.rt.error("PostHog logs flush failed:",t)})).finally((()=>{!this._instance.isDisabled&&this.jt()&&this.$t(this.qt())}))}Et(){this.Nt&&(clearTimeout(this.Nt),this.Nt=void 0)}};var Hu=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function Yg(t){return String(t)+"000000"}function Jg(t,e,n,r){var s="";return r&&(s=Object.keys(r).sort().map((i=>JSON.stringify(i)+":"+JSON.stringify(r[i]))).join(",")),t+"\0"+e+"\0"+(n??"")+"\0"+s}let TN=class{constructor(t,e,n){this._instance=t,this.Ne=e,this.rt=n,this.Bt=new Map,this.ct=null,this.Ht=!1,this.Ut=new Map,this.zt=new Set,this.Wt=0}count(t,e,n){e===void 0&&(e=1),this.Vt({name:t,type:"count",value:e,unit:n==null?void 0:n.unit,attributes:n==null?void 0:n.attributes})}gauge(t,e,n){this.Vt({name:t,type:"gauge",value:e,unit:n==null?void 0:n.unit,attributes:n==null?void 0:n.attributes})}histogram(t,e,n){this.Vt({name:t,type:"histogram",value:e,unit:n==null?void 0:n.unit,attributes:n==null?void 0:n.attributes})}flush(){var t=this,e=this.ct,n=(function(){var s=Pe((function*(){e&&(yield e.catch((()=>{}))),yield t.Zt()}));return function(){return s.apply(this,arguments)}})(),r=n().finally((()=>{this.ct===r&&(this.ct=null)}));return this.ct=r,r}drainWindow(){if(this.Bt.size===0)return null;var t=this.Bt;return this.Bt=new Map,this.Ht=!1,this.Ut=new Map,this.zt=new Set,this.Gt(t)}reset(){this.Wt++,this.Et(),this.Bt=new Map,this.ct=null,this.Ht=!1,this.Ut=new Map,this.zt=new Set}Vt(t){if(!this._instance.isDisabled&&!this._instance.optedOut){var e=this.Pt(t);if(e!==null)if(e.name&&typeof e.name=="string")if(typeof e.value=="number"&&Number.isFinite(e.value))if(e.type==="count"&&0>e.value)this.rt.warn("Dropping count '"+e.name+"': counters are monotonic, value must be >= 0");else{var n,r;try{n=e.attributes?F({},e.attributes):void 0,r=Jg(e.type,e.name,e.unit,n)}catch(o){return void this.rt.warn("Dropping metric '"+e.name+"': attributes could not be serialized",o)}var s=this.Bt.get(r);if(!s){if(!this.Qt())return;s={name:e.name,type:e.type,unit:e.unit,attributes:n,windowStartMs:Date.now()},this.Bt.set(r,s)}var i=this.Ut.get(e.name);i===void 0?this.Ut.set(e.name,e.type):i===e.type||this.zt.has(e.name)||(this.zt.add(e.name),this.rt.warn("Metric name '"+e.name+"' is already used as a "+i+"; recording it as a "+e.type+" too will blend both series in charts. Use a distinct name.")),this.Kt(s,e.value),this.$t()}else this.rt.warn("Dropping metric '"+e.name+"': value must be a finite number");else this.rt.warn("Dropping metric with empty name")}}Qt(){return this.Ne.maxSeriesPerFlush>this.Bt.size||(this.Ht||(this.Ht=!0,this.rt.warn("Metric series cap reached ("+this.Ne.maxSeriesPerFlush+" per flush window); dropping new series until the next flush. Reduce attribute cardinality.")),!1)}Kt(t,e){var n;switch(t.type){case"count":t.total=((n=t.total)!==null&&n!==void 0?n:0)+e;break;case"gauge":t.last=e;break;case"histogram":t.hist||(t.hist={count:0,sum:0,min:e,max:e,bucketCounts:new Array(Hu.length+1).fill(0)});var r=t.hist;r.count+=1,r.sum+=e,r.min=Math.min(r.min,e),r.max=Math.max(r.max,e),r.bucketCounts[(function(s,i){for(var o=0;i.length>o;o++)if(i[o]>=s)return o;return i.length})(e,Hu)]+=1}}Pt(t){var e=this.Ne.beforeSend;if(!e)return t;var n=te(e)?e:[e],r=t;for(var s of n)try{var i=s(r);if(!i)return this.rt.info("Metric was rejected in beforeSend function"),null;r=i}catch(o){return this.rt.error("Error in beforeSend function for metric:",o),null}return r}$t(){this.Nt||(this.Nt=_h((()=>{this.Nt=void 0,this.flush().catch((t=>{this.rt.error("Metrics flush failed:",t)}))}),this.Ne.flushIntervalMs))}Et(){this.Nt&&(clearTimeout(this.Nt),this.Nt=void 0)}
25Zt(){var t=this;return Pe((function*(){if(t.Bt.size!==0){var e=t.Bt;t.Bt=new Map,t.Ht=!1,t.Ut=new Map,t.zt=new Set;var n=t.Wt,r=yield t._instance.Jt(t.Gt(e));if(n===t.Wt)switch(r.kind){case"ok":return;case"retry-later":return t.Yt(e),void t.$t();case"too-large":return void t.rt.warn("Metrics batch exceeded the server size limit and was dropped");case"fatal":return void t.rt.error("Failed to send metrics batch:",r.error)}}}))()}Gt(t){return e=this.Xt(t),n=(function(i,o,a){return F({},i.resourceAttributes,{"service.name":i.serviceName||"unknown_service"},i.environment&&{"deployment.environment":i.environment},i.serviceVersion&&{"service.version":i.serviceVersion},{"telemetry.sdk.name":o,"telemetry.sdk.version":a})})(this.Ne,this._instance.getLibraryId(),this._instance.getLibraryVersion()),r=this._instance.getLibraryId(),s=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:vl(n)},scopeMetrics:[{scope:{name:r,version:s},metrics:e}]}]};var e,n,r,s}Xt(t){var e=Yg(Date.now()),n=new Map;for(var r of t.values()){var s,i=Jg(r.type,r.name,r.unit,void 0),o=n.get(i);o||(o=F({name:r.name},r.unit&&{unit:r.unit}),r.type==="count"?o.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:r.type==="gauge"?o.gauge={dataPoints:[]}:o.histogram={aggregationTemporality:1,dataPoints:[]},n.set(i,o));var a=vl((s=r.attributes)!==null&&s!==void 0?s:{}),l=Yg(r.windowStartMs);if(r.type==="count"){var u,c={attributes:a,startTimeUnixNano:l,timeUnixNano:e,asDouble:(u=r.total)!==null&&u!==void 0?u:0};o.sum.dataPoints.push(c)}else if(r.type==="gauge"){var d,f={attributes:a,timeUnixNano:e,asDouble:(d=r.last)!==null&&d!==void 0?d:0};o.gauge.dataPoints.push(f)}else r.hist&&o.histogram.dataPoints.push({attributes:a,startTimeUnixNano:l,timeUnixNano:e,count:r.hist.count,sum:r.hist.sum,min:r.hist.min,max:r.hist.max,bucketCounts:r.hist.bucketCounts,explicitBounds:Hu})}return Array.from(n.values())}Yt(t){var e,n;for(var r of t){var s=r[0],i=r[1],o=this.Bt.get(s);if(o)switch(o.windowStartMs=Math.min(o.windowStartMs,i.windowStartMs),o.type){case"count":o.total=((e=o.total)!==null&&e!==void 0?e:0)+((n=i.total)!==null&&n!==void 0?n:0);break;case"gauge":break;case"histogram":if(i.hist)if(o.hist){o.hist.count+=i.hist.count,o.hist.sum+=i.hist.sum,o.hist.min=Math.min(o.hist.min,i.hist.min),o.hist.max=Math.max(o.hist.max,i.hist.max);for(var a=0;o.hist.bucketCounts.length>a;a++)o.hist.bucketCounts[a]+=i.hist.bucketCounts[a]}else o.hist=i.hist}else this.Qt()&&this.Bt.set(s,i)}}};var Xo,Xg,Vu;function IN(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return Vu&&n.length===Xg||(Xg=n.length,Vu=n.reduce(((r,s)=>{Xo||(Xo={});var i=Xo[s];if(i)r[i[0]]=i[1];else for(var o=t(s),a=o.length-1;a>=0;a--){var l=o[a],u=l==null?void 0:l.filename,c=e[s];if(u&&c){r[u]=c,Xo[s]=[u,c];break}}return r}),{})),Vu}}class ON{constructor(e,n,r){r===void 0&&(r=[]),this.coercers=e,this.stackParser=n,this.modifiers=r}buildFromUnknown(e,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(r,n,0).apply(e),i=this.buildParsingContext(n),o=this.parseStacktrace(s,i);return{$exception_list:this.convertToExceptionList(o,r),$exception_level:"error"}}modifyFrames(e){var n=this;return Pe((function*(){for(var r of e)r.stacktrace&&r.stacktrace.frames&&te(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return e}))()}coerceFallback(e){var n;return{type:"Error",value:"Unknown error",stack:(n=e.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(e,n){var r,s;return e.cause!=null&&(r=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)),F({},e,{cause:r,stack:s})}applyChunkIds(e,n){return e.map((r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r)))}applyCoercers(e,n){for(var r of this.coercers)if(r.match(e))return r.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return Pe((function*(){var r=e;for(var s of n.modifiers)r=yield s(r);return r}))()}convertToExceptionList(e,n){var r,s,i,o={type:e.type,value:e.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(s=n.handled)===null||s===void 0||s,synthetic:(i=e.synthetic)!==null&&i!==void 0&&i}};e.stack&&(o.stacktrace={type:"raw",frames:e.stack});var a=[o];return e.cause!=null&&a.push(...this.convertToExceptionList(e.cause,F({},n,{handled:!0}))),a}buildParsingContext(e){var n;return{chunkIdMap:IN(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(e,n,r){r===void 0&&(r=0);var s=(i,o)=>
25{if(4>=o){var a=this.buildCoercingContext(e,n,o);return this.applyCoercers(i,a)}};return F({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:e,apply:i=>s(i,r),next:i=>s(i,r+1)})}}var Ms="?";function Cd(t,e,n,r,s){var i={platform:t,filename:e,function:n==="<anonymous>"?Ms:n,in_app:!0};return U(r)||(i.lineno=r),U(s)||(i.colno=s),i}var hS=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Ms,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},kN=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,CN=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,RN=/\((\S*)(?::(\d+))(?::(\d+))\)/,AN=(t,e)=>{var n=kN.exec(t);if(n)return Cd(e,n[1],Ms,+n[2],+n[3]);var r=CN.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){var s=RN.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}var i=hS(r[1]||Ms,r[2]);return Cd(e,i[1],i[0],r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},PN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,DN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,NN=(t,e)=>{var n=PN.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=DN.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var s=n[3],i=n[1]||Ms,o=hS(i,s);return Cd(e,s=o[1],i=o[0],n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},Zg=/\(error: (.*)\)/;class LN{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var r=ve(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var n=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?n+": "+e.message:n}isDOMException(e){return hl(e,"DOMException")}isDOMError(e){return hl(e,"DOMError")}}class MN{match(e){return(function(n){switch({}.toString.call(n)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return B0(n,Error)}})(e)}coerce(e,n){return{type:this.getType(e),value:this.getMessage(e,n),stack:this.getStack(e),cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,n){var r=e.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(e){return e.stacktrace||e.stack||void 0}}class FN{constructor(){}match(e){return!!hl(e,"ErrorEvent")&&(e.error!=null||this.fe(e))}coerce(e,n){var r;if(e.error!=null)return n.apply(e.error);var s=n.apply(e.message);return F({},s,{stack:(r=this.pe(e))!==null&&r!==void 0?r:s.stack,synthetic:!0})}fe(e){return ve(e.message)&&e.message.length>0}pe(e){var n=e;if(ve(n.filename)&&n.filename.length>0){var r,s,i=(r=n.lineno)!==null&&r!==void 0?r:0,o=(s=n.colno)!==null&&s!==void 0?s:0;return`Error 26 at `+n.filename+":"+i+":"+o}}}var $N=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class jN{match(e){return typeof e=="string"}coerce(e,n){var r,s=this.getInfos(e),i=s[0],o=s[1];return{type:i??"Error",value:o??e,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(e){var n="Error",r=e,s=e.match($N);return s&&(n=s[1],r=s[2]),[n,r]}}var UN=["fatal","error","warning","log","info","debug"];function pS(t,e){e===void 0&&(e=40);var n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var s=n.slice(0,r).join(", ");if(e>=s.length)return r===n.length?s:s.length>e?s.slice(0,e)+"...":s}return""}class BN{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var r,s,i=this.getErrorPropertyFromObject(e);return i?n.apply(i):{type:this.getType(e),value:this.getValue(e),stack:(r=this.getStack(e))!==null&&r!==void 0?r:(s=n.syntheticException)==null?void 0:s.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return fh(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var n="'"+e.n
26ame+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(n+=" with message: '"+e.message+"'"),n}if("message"in e&&typeof e.message=="string")return e.message;var r=this.getObjectClassName(e);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+pS(e)}isSeverityLevel(e){return ve(e)&&!xd(e)&&UN.indexOf(e)>=0}getStack(e){try{return ve(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:ve(e.stack)&&e.stack.length>0?e.stack:void 0}catch{return}}getErrorPropertyFromObject(e){for(var n in e)if({}.hasOwnProperty.call(e,n)){var r=e[n];if(SN(r))return r}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class HN{match(e){return fh(e)}coerce(e,n){var r,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+pS(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class VN{match(e){return U0(e)}coerce(e,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class zN{match(e){return hl(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!fh(e))return!1;try{var n=e.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(e,n){var r,s=this.getUnhandledRejectionReason(e);return U0(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(s)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var yl="$message",bl="$timestamp",qN=new Set([yl,bl]),zu={enabled:!0,max_bytes:32768};function Sl(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:zu.enabled,max_bytes:GN(t.max_bytes,zu.max_bytes)}:F({},zu)}class WN{constructor(e){this.Ke=[],this.Je=0,this.Ne=Sl(e)}setConfig(e){this.Ne=Sl(e),this.Xe()}add(e){var n=(function(s){var i;try{i=F0(s)}catch{return}try{var o=JSON.parse(i);if(!je(o))return;var a=o,l=a[yl],u=a[bl];return!ve(l)||l.trim().length===0||!ve(u)&&!et(u)?void 0:{step:a,json:i}}catch{return}})(e);if(n){var r=(function(s){if(typeof TextEncoder<"u")return new TextEncoder().encode(s).length;for(var i=encodeURIComponent(s),o=0,a=0;i.length>a;a++)i[a]==="%"?(o+=1,a+=2):o+=1;return o})(n.json);r>this.Ne.max_bytes||(this.Ke.push({step:n.step,bytes:r}),this.Je+=r,this.Xe())}}getAttachable(){return this.Ke.map((e=>e.step))}clear(){this.Ke=[],this.Je=0}size(){return this.Ke.length}Xe(){for(;this.Je>this.Ne.max_bytes&&this.Ke.length>0;){var e=this.Ke.shift();e&&(this.Je-=e.bytes)}}}function GN(t,e){if(!et(t)||t===1/0||t===-1/0)return e;var n=Math.floor(t);return 0>n?e:n}var gS=function(t,e){var n=(e===void 0?{}:e).debugEnabled,r={k(s){if(D&&(Re.DEBUG||D.POSTHOG_DEBUG||n)&&!U(D.console)&&D.console){for(var i=("__rrweb_original__"in D.console[s])?D.console[s].__rrweb_original__:D.console[s],o=arguments.length,a=new Array(o>1?o-1:0),l=1;o>l;l++)a[l-1]=arguments[l];i(t,...a)}},debug(){for(var s=arguments.length,i=new Array(s),o=0;s>o;o++)i[o]=arguments[o];r.k("debug",...i)},info(){for(var s=arguments.length,i=new Array(s),o=0;s>o;o++)i[o]=arguments[o];r.k("log",...i)},warn(){for(var s=arguments.length,i=new Array(s),o=0;s>o;o++)i[o]=arguments[o];r.k("warn",...i)},error(){for(var s=arguments.length,i=new Array(s),o=0;s>o;o++)i[o]=arguments[o];r.k("error",...i)},critical(){for(var s=arguments.length,i=new Array(s),o=0;s>o;o++)i[o]=arguments[o];console.error(t,...i)},uninitializedWarning(s){r.error("You must initialize PostHog before calling "+s)},createLogger:(s,i)=>gS(t+" "+s,i)};return r},B=gS("[PostHog.js]"),Ue=B.createLogger,KN=Ue("[ExternalScriptsLoader]"),qu=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return KN.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=H==null?void 0:H.querySelectorAll("script");
26if(r){for(var s,i=function(){if(r[o].src===e){var l=r[o];return l.__posthog_loading_callback_fired?{v:n()}:(l.addEventListener("load",(u=>{l.__posthog_loading_callback_fired=!0,n(void 0,u)})),l.onerror=u=>n(u),{v:void 0})}},o=0;r.length>o;o++)if(s=i())return s.v}var a=()=>{if(!H)return n("document not found");var l=H.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=e,l.onload=d=>{l.__posthog_loading_callback_fired=!0,n(void 0,d)},l.onerror=d=>n(d),t.config.prepare_external_dependency_script&&(l=t.config.prepare_external_dependency_script(l)),!l)return n("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")H.head.appendChild(l);else{var u,c=H.querySelectorAll("body > script");c.length>0?(u=c[0].parentNode)==null||u.insertBefore(l,c[0]):H.body.appendChild(l)}};H!=null&&H.body?a():H==null||H.addEventListener("DOMContentLoaded",a)};K.__PosthogExtensions__=K.__PosthogExtensions__||{},K.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{if(e!=="remote-config"){var r;if(t.config.strict_script_versioning)r=t.requestRouter.endpointFor("assets","/static/"+t.version+"/"+e+".js");else{var s="/static/"+e+".js?v="+t.version;if(e==="toolbar"){var i=3e5;s=s+"&t="+Math.floor(Date.now()/i)*i}r=t.requestRouter.endpointFor("assets",s)}qu(t,r,n)}else{var o=t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js");qu(t,o,n)}},K.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var r=t.requestRouter.endpointFor("api",e);qu(t,r,n)};Re.DEBUG=!1,Re.LIB_VERSION="1.416.0",Re.LIB_NAME="web";var mS="$people_distinct_id",ao="$device_id",Wu="$device_model",Ii="__alias",Oi="__timers",Rd="$autocapture_disabled_server_side",Ad="$heatmaps_enabled_server_side",Pd="$exception_capture_enabled_server_side",Dd="$error_tracking_suppression_rules",Nd="$error_tracking_capture_extension_exceptions",Ld="$web_vitals_enabled_server_side",vh="$dead_clicks_enabled_server_side",yh="$product_tours_enabled_server_side",Md="$web_vitals_allowed_metrics",kr="$session_recording_remote_config",_S="$replay_sample_rate",vS="$replay_override_sampling",yS="$replay_override_linked_flag",bS="$replay_override_url_trigger",SS="$replay_override_event_trigger",vs="$sesid",bh="$session_is_sampled",mr="$enabled_feature_flags",ki="$active_feature_flags",Da="$early_access_features",Fd="$feature_flag_details",Ci="$feature_flag_payloads",Na="$feature_flag_request_id",El="$minimal_flag_called_events",on="$override_feature_flags",_r="$override_feature_flag_payloads",bn="$stored_person_properties",vr="$stored_group_properties",$d="$surveys",wl="$surveys_loaded_at",jd="$surveys_activated",La="$surveys_activated_session",Ma="$surveys_activated_timestamps",Ri="ph_product_tours",Er="$flag_call_reported",Ai="$flag_call_reported_session_id",Fa="$feature_flag_errors",Hi="$feature_flag_evaluated_at",Ft="$user_state",Ud="$client_session_props",Bd="$capture_rate_limit",Hd="$initial_campaign_params",Vd="$initial_referrer_info",xl="$initial_person_info",Tl="$epp",Zo="$posthog_cookieless",ES="$cookieless_mode",wS="$sdk_debug_extensions_init_method",xS="$sdk_debug_extensions_init_time_ms",TS="$sdk_debug_recording_script_not_loaded",Sh="PostHog loadExternalDependency extension not found.",yr="on_reject",Tn="always",lr="anonymous",$n="identified",zd="identified_only",Il="visibilitychange",Ol="beforeunload",cs="$pageview",Gu="$pageleave",Ku="$identify",Qg="$groupidentify";function Qo(t,e){te(t)&&t.forEach(e)}function Ae(t,e){if(!se(t))if(te(t))t.forEach(e);else if(iN(t))t.forEach(((r,s)=>e(r,s)));else for(var n in t)j0.call(t,n)&&e(t[n],n)}var $e=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];for(var s of n)for(var i in s)s[i]!==void 0&&(t[i]=s[i]);return t};function $a(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}var em=function(t){try{return t()}catch{return}},YN=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return t.apply(this,n)}catch(s){B.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),B.critical(s)}}},Eh=function(t){var e={};return Ae(t,(function(n,r){(ve(n)&&n.length>0||et(n))&&(e[r]=n)})),e},JN=["herokuapp.com","vercel.app","netlify.app"];function XN(t){var e=t==null?void 0:t.hostname;if(!ve(e))return!1;var n=e.split(".").slice(-2).join(".");for(var r of JN)if(n===r)return!1;return!0}function Ve(t,e,n,r){var s=r??{},i=s.capture,o=s.passive;t==null||t.addEventListener(e,n,{capture:i!==void 0&&i,passive:o===void 0||o})}
26function qd(t){return t.name==="ph_toolbar_internal"}var IS=t=>{if(H){try{for(var e=t+"=",n=H.cookie.split(";").filter((i=>i.length)),r=0;n.length>r;r++){for(var s=n[r];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return decodeURIComponent(s.substring(e.length,s.length))}}catch{}return null}};Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return et(t)&&isFinite(t)&&Math.floor(t)===t});class kl{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,r,s){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(s)||0>e||0>n||0>r||0>s||e>0xffffffffffff||n>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/256,i[5]=e,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new kl(i)}toString(){for(var e="",n=0;this.bytes.length>n;n++)e=e+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new kl(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;16>n;n++){var r=this.bytes[n]-e.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class ZN{generate(){var e=this.generateOrAbort();if(!U(e))return e;this.S=0;var n=this.generateOrAbort();if(U(n))throw new Error("Could not generate UUID after timestamp reset");return n}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.C();else{if(this.S>=e+1e4)return;this.I++,this.I>4398046511103&&(this.S++,this.C())}return kl.fromFieldsV7(this.S,Math.trunc(this.I/Math.pow(2,30)),this.I&Math.pow(2,30)-1,this.A.nextUint32())}C(){this.I=1024*this.A.nextUint32()+(1023&this.A.nextUint32())}constructor(){this.S=0,this.I=0,this.A=new QN}}var tm,OS=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;t.length>e;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};D&&!U(D.crypto)&&crypto.getRandomValues&&(OS=t=>crypto.getRandomValues(t));class QN{nextUint32(){return this.R.length>this.O||(OS(this.R),this.O=0),this.R[this.O++]}constructor(){this.R=new Uint32Array(8),this.O=1/0}}var wn=()=>eL().toString(),eL=()=>(tm||(tm=new ZN)).generate(),ui="",tL=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,In={N:()=>!!H,j(t){B.error("cookieStore error: "+t)},P:IS,H(t){var e;try{e=JSON.parse(In.P(t))||{}}catch{}return e},F(t,e,n,r,s){if(!H)return!1;try{var i="",o="",a=(function(c,d){if(d){var f=(function(h,g){if(g===void 0&&(g=H),ui)return ui;if(!g||["localhost","127.0.0.1"].includes(h))return"";for(var _=h.split("."),m=Math.min(_.length,8),y="dmn_chk_"+wn();!ui&&m--;){var E=_.slice(m).join("."),T=y+"=1;domain=."+E+";path=/";g.cookie=T+";max-age=3",g.cookie.includes(y)&&(g.cookie=T+";max-age=0",ui=E)}return ui})(c);if(!f){var p=(h=>{var g=h.match(tL);return g?g[0]:""})(c);p!==f&&B.info("Warning: cookie subdomain discovery mismatch",p,f),f=p}return f?"; domain=."+f:""}return""})(H.location.hostname,r);if(n){var l=new Date;l.setTime(l.getTime()+864e5*n),i="; expires="+l.toUTCString()}s&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+i+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&B.warn("cookieStore warning: large cookie, len="+u.length),H.cookie=u,!0}catch{return!1}},q(t,e){if(H!=null&&H.cookie)try{In.F(t,"",-1,e)}catch{return}}},Yu=null,Ne={N(){if(!Nt(Yu))return Yu;var t=!0;if(U(D))t=!1;else try{var e="__mplssupport__";Ne.F(e,"xyz"),Ne.P(e)!=='"xyz"'&&(t=!1),Ne.q(e)}catch{t=!1}return t||B.error("localStorage unsupported; falling back to cookie store"),Yu=t,t},j(t){B.error("localStorage error: "+t)},P(t){try{return D==null?void 0:D.localStorage.getItem(t)}catch(e){Ne.j(e)}return null},H(t){try{return JSON.parse(Ne.P(t))||{}}catch{}return null},F(t,e){try{return D==null||D.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){Ne.j(n)}return!1},q(t){try{D==null||D.localStorage.removeItem(t)}catch(e){Ne.j(e)}}},nL=[ao,"distinct_id",vs,bh,Tl,xl,Ft],ea={},rL={N:()=>!0,j(t){B.error("memoryStorage error: "+t)},P:t=>ea[t]||null,H:t=>ea[t]||null,F:(t,e)=>(ea[t]=e,!0),q(t){delete ea[t]}},ur=null,Ye={N(){if(!Nt(ur))return ur;if(ur=!0,U(D))ur=!1;else try{var t="__support__";Ye.F(t,"xyz"),Ye.P(t)!=='"xyz"'&&(ur=!1),Ye.q(t)}
26catch{ur=!1}return ur},j(t){B.error("sessionStorage error: ",t)},P(t){try{return D==null?void 0:D.sessionStorage.getItem(t)}catch(e){Ye.j(e)}return null},H(t){try{return JSON.parse(Ye.P(t))||null}catch{}return null},F(t,e){try{return D==null||D.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){Ye.j(n)}return!1},q(t){try{D==null||D.sessionStorage.removeItem(t)}catch(e){Ye.j(e)}}};class sL{constructor(e){this._instance=e}get Ne(){return this._instance.config}get consent(){return this.ti()?0:this.ei}isOptedOut(){return this.Ne.cookieless_mode===Tn||this.isRejected()||this.consent===-1&&this.Ne.cookieless_mode===yr}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Ne.opt_out_capturing_by_default}optInOut(e){this.ii.F(this.ri,e?1:0,this.Ne.cookie_expiration,this.Ne.cross_subdomain_cookie,this.Ne.secure_cookie)}reset(){this.ii.q(this.ri,this.Ne.cross_subdomain_cookie)}get ri(){var e=this._instance.config,n=e.token,r=e.opt_out_capturing_cookie_prefix;return e.consent_persistence_name||(r?r+n:"__ph_opt_in_out_"+n)}get ei(){var e=this.ii.P(this.ri);return Uu(e)?1:Q(uN,e)?0:-1}get ii(){var e=this.Ne.opt_out_capturing_persistence_type,n=e==="localStorage"?Ne:In;if(!this.ni||this.ni!==n){this.ni=n;var r=e==="localStorage"?In:Ne;r.P(this.ri)&&(this.ni.P(this.ri)||this.optInOut(Uu(r.P(this.ri))),r.q(this.ri,this.Ne.cross_subdomain_cookie))}return this.ni}ti(){return!!this.Ne.respect_dnt&&[kt==null?void 0:kt.doNotTrack,kt==null?void 0:kt.msDoNotTrack,K.doNotTrack].some((e=>Uu(e)))}}function kS(t,e){var n,r=t==null||(n=t.config)==null?void 0:n.get_current_url;if(!Tt(r))return e;try{var s=r(e);return ve(s)&&s?s:e}catch(i){return B.error("Error in get_current_url, falling back to window.location.href",i),e}}var CS="__POSTHOG_TOOLBAR__",iL=1,oL=3,aL=11;function nm(t){return t instanceof Element&&(t.id===CS||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function tr(t){return!!t&&t.nodeType===iL}function Bt(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function RS(t){return!!t&&t.nodeType===oL}function AS(t){return!!t&&t.nodeType===aL&&tr(t.host)}var PS=1e3;function wh(t){return t?ou(t).split(/\s+/):[]}function rm(t,e){var n=(function(r){var s,i=D==null||(s=D.location)==null?void 0:s.href;return U(i)?void 0:kS(r,i)})(e);return!!(n&&t&&t.some((r=>n.match(r))))}function Cl(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return wh(e)}function DS(t){return se(t)?null:ou(t).split(/(\s+)/).filter((e=>Vi(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function lo(t){var e="";return Gd(t)&&!FS(t)&&t.childNodes&&t.childNodes.length&&Ae(t.childNodes,(function(n){var r;RS(n)&&n.textContent&&(e+=(r=DS(n.textContent))!==null&&r!==void 0?r:"")})),ou(e)}function Ju(t){var e;return U(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null}var xh=["a","button","form","input","select","textarea","label"];function Wd(t,e){if(U(e))return!0;var n,r=function(i){if(e.some((o=>(function(a,l){var u=a.matches||a.matchesSelector||a.msMatchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.oMatchesSelector;try{return!!u&&u.call(a,l)}catch{return!1}})(i,o))))return{v:!0}};for(var s of t)if(n=r(s))return n.v;return!1}function NS(t){var e=t.parentNode;return!(!e||!tr(e))&&e}var lL=[".ph-no-autocapture","[data-ph-no-autocapture]"],LS=["next","previous","prev",">","<"],uL=[...LS,"+","-","â","â"],sm=(t,e)=>/[a-z0-9]/i.test(e)?t.includes(e):t===e,im=[".ph-no-rageclick",".ph-no-capture"],cL=["","text","search","email","password","url","tel","number"];function om(t,e){if(!D||Th(t))return!1;var n,r,s,i,o;if(Ut(e)?(n=!!e&&im,r=void 0,s=!1):(n=(i=e==null?void 0:e.css_selector_ignorelist)!==null&&i!==void 0?i:im,r=e==null?void 0:e.content_ignorelist,s=(o=e==null?void 0:e.ignore_text_selection)!==null&&o!==void 0&&o),n===!1||s&&(function(l){return!(!l||!tr(l))&&(!!Bt(l,"textarea")||(Bt(l,"input")?Q(cL,(l.getAttribute("type")||"").toLowerCase()):(function(u){if(u.isContentEditable)return!0;var c=u.getAttribute==null?void 0:u.getAttribute("contenteditable");return c==="true"||c===""})(l)))})(t))return!1;var a=MS(t,!1).targetElementList;return!(function(l,u){if(l===!1||U(l))return!1;var c;if(l===!0)c=LS;else{if(!te(l))return!1;if(l.length>10)return B.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;c=l.map((d=>d.toLowerCase()))}return u.some((d=>{var f=d.safeText,p=d.ariaLabel;
26return c.some((h=>sm(f,h)||sm(p,h)))}))})(r,a.map((l=>{var u;return{safeText:lo(l).toLowerCase(),ariaLabel:((u=l.getAttribute("aria-label"))==null?void 0:u.toLowerCase().trim())||""}})))&&!Wd(a,n)}var Th=t=>!t||Bt(t,"html")||!tr(t),MS=(t,e)=>{if(!D||Th(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[t],s=t;s.parentNode&&!Bt(s,"body");)if(AS(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var i=NS(s);if(!i)break;if(e||xh.indexOf(i.tagName.toLowerCase())>-1)n=!0;else try{var o=D.getComputedStyle(i);o&&o.getPropertyValue("cursor")==="pointer"&&(n=!0)}catch{}r.push(i),s=i}return{parentIsUsefulElement:n,targetElementList:r}};function Gd(t){for(var e=new Set,n=0,r=t;r.parentNode&&!Bt(r,"body");r=r.parentNode){if(n++>=PS||e.has(r))return!1;e.add(r);var s=Cl(r);if(Q(s,"ph-sensitive")||Q(s,"ph-no-capture"))return!1}if(Q(Cl(t),"ph-include"))return!0;var i=t.type||"";if(ve(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var o=t.name||t.id||"";return!ve(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 FS(t){return!!(Bt(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Bt(t,"select")||Bt(t,"textarea")||t.getAttribute("contenteditable")==="true")}var am=new RegExp("^(?:(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}))$"),lm=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,dL=[16,15,14,13],fL=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),um=new RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),cm=/[0-9A-Za-z_]/;function hL(t){for(var e=0,n=!1,r=t.length-1;r>=0;r--){var s=t.charCodeAt(r)-48;n&&(s*=2)>9&&(s-=9),e+=s,n=!n}return e%10==0}function Vi(t,e){if(e===void 0&&(e=!0),se(t))return!1;if(ve(t)){t=ou(t);var n=e?am.test((t||"").replace(/[- ]/g,"")):(function(s){var i;for(lm.lastIndex=0;i=lm.exec(s);){var o=i[2];if(o)for(var a=o.replace(/[- ]/g,""),l=0;a.length>l;l++)for(var u of dL){var c=l+u;if(a.length>=c){var d=a.slice(l,c);if(am.test(d)&&hL(d))return!0}}}return!1})(t);if(n)return!1;var r=e?fL.test(t):(function(s){var i;for(um.lastIndex=0;i=um.exec(s);){var o=i[1],a=i[3];if(!(o&&a&&cm.test(o)&&cm.test(a)))return!0}return!1})(t);if(r)return!1}return!0}function dm(t){var e=lo(t);return Vi(e=(e+" "+$S(t)).trim())?e:""}function $S(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Ae(t.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=lo(n);e=(e+" "+s).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+$S(n)).trim())}catch(i){B.error("[AutoCapture]",i)}})),e}function fm(t){return t.replace(/"|\\"/g,'\\"')}function pL(t){var e=t.attr__class;if(e)return te(e)?e:wh(e)}var ta=Ue("[Dead Clicks]"),gL=()=>!0,mL=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(vh)),r=t.instance.config.capture_dead_clicks;return Ut(r)?r:!!je(r)||n};class hm{get lazyLoadedDeadClicksAutocapture(){return this.si}constructor(e,n,r){this.instance=e,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(e){if(e.ok){var n=e.config;"captureDeadClicks"in n&&(this.instance.persistence&&this.instance.persistence.register({[vh]:n.captureDeadClicks}),this.startIfEnabledOrStop())}}startIfEnabledOrStop(){this.isEnabled(this)?this.ai((()=>{this.oi()})):this.stop()}ai(e){var n,r;(n=K.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?e():(r=K.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(s=>{s?ta.error("failed to load script",s):e()}))}oi(){var e;if(H){if(!this.si&&(e=K.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=je(this.instance.config.capture_dead_clicks)?F({},this.instance.config.capture_dead_clicks):{};n.__onCapture=this.onCapture,this.onCapture&&(n.capture_dead_swipes=!1),this.si=K.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.si.start(H),ta.info("starting...")}}else ta.error("`document` not found. Cannot start.")}stop(){this.si&&(this.si.stop(),this.si=void 0,ta.info("stopping..."))}}var Xu=Ue("[SegmentIntegration]"),jS="posthog-js";function US(t,e){var n=e===void 0?{}:e,r=n.organization,s=n.projectId,i=n.prefix,o=n.severityAllowList,a=o===void 0?["error"]:o,l=n.sendExceptionsToPostHog,u=l===void 0||l;return c=>{var d,f,p,h,g;if(a!=="*"&&!a.includes(c.level)||!t.__loaded)return c;c.tags||(c.tags={});var _=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/pers
26on/"+t.get_distinct_id());c.tags["PostHog Person URL"]=_,t.sessionRecordingStarted()&&(c.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var m,y=((d=c.exception)==null?void 0:d.values)||[],E=y.map((I=>F({},I,{stacktrace:I.stacktrace?F({},I.stacktrace,{type:"raw",frames:(I.stacktrace.frames||[]).map((x=>F({},x,{platform:"web:javascript"})))}):void 0}))),T={$exception_message:((f=y[0])==null?void 0:f.value)||c.message,$exception_type:(p=y[0])==null?void 0:p.type,$exception_level:c.level,$exception_list:E,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((h=y[0])==null?void 0:h.value)||c.message,$sentry_exception_type:(g=y[0])==null?void 0:g.type,$sentry_tags:c.tags};return r&&s&&(T.$sentry_url=(i||"https://sentry.io/organizations/")+r+"/issues/?project="+s+"&query="+c.event_id),u&&((m=t.exceptions)==null||m.sendExceptionEvent(T)),c}}class _L{constructor(e,n,r,s,i,o){this.name=jS,this.setupOnce=function(a){a(US(e,{organization:n,projectId:r,prefix:s,severityAllowList:i,sendExceptionsToPostHog:o==null||o}))}}}class pm{constructor(e){this.li=(n,r,s)=>{s&&(s.noSessionId||s.activityTimeout||s.sessionPastMaximumLength||s.crossTabAdoption)&&(B.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:s}),this.ui=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.hi()}hi(){var e;this.di=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.li)}destroy(){var e;(e=this.di)==null||e.call(this),this.di=void 0}doPageView(e,n){var r,s=this.vi(e,n);return this.ui={pathname:(r=D==null?void 0:D.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var n;return this.vi(e,(n=this.ui)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.ui)==null?void 0:e.pageViewId}}vi(e,n){var r=this.ui;if(!r)return{$pageview_id:n};var s={$pageview_id:n,$prev_pageview_id:r.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var o=i.maxScrollHeight,a=i.lastScrollY,l=i.maxScrollY,u=i.maxContentHeight,c=i.lastContentY,d=i.maxContentY;if(!(U(o)||U(a)||U(l)||U(u)||U(c)||U(d))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c),d=Math.ceil(d);var f=o>1?un(a/o,0,1,B):1,p=o>1?un(l/o,0,1,B):1,h=u>1?un(c/u,0,1,B):1,g=u>1?un(d/u,0,1,B):1;s=$e(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:p,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:h,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:g})}}return r.pathname&&(s.$prev_pageview_pathname=r.pathname),r.timestamp&&(s.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),s}}var Zu=["flags","surveys"],vL={[mS]:{exposure:"hidden"},[Ii]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[Oi]:{exposure:"hidden"},[Rd]:{exposure:"event"},[Ad]:{exposure:"hidden"},[Pd]:{exposure:"event"},[Dd]:{exposure:"hidden"},[Nd]:{exposure:"event"},[Ld]:{exposure:"event"},[vh]:{exposure:"event"},[yh]:{exposure:"hidden"},[Md]:{exposure:"event"},[kr]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[vs]:{exposure:"hidden"},[bh]:{exposure:"event"},[_S]:{exposure:"event",shouldSkipFromEventProperties:t=>Nt(t)},$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"},$sess_rec_flush_size:{exposure:"hidden"},[mr]:{exposure:"hidden",storageGroup:"flags"},[ki]:{exposure:"hidden",storageGroup:"flags"}
26,[Da]:{exposure:"hidden"},[Fd]:{exposure:"hidden",storageGroup:"flags"},[Ci]:{exposure:"hidden",storageGroup:"flags"},[Na]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[El]:{exposure:"hidden",storageGroup:"flags"},[on]:{exposure:"hidden"},[_r]:{exposure:"hidden"},[bn]:{exposure:"hidden"},[vr]:{exposure:"hidden"},[$d]:{exposure:"hidden",storageGroup:"surveys"},[wl]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[jd]:{exposure:"event"},[La]:{exposure:"hidden"},[Ma]:{exposure:"hidden"},[Ri]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$product_tours_activated_session:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Er]:{exposure:"hidden"},[Ai]:{exposure:"hidden"},[Fa]:{exposure:"hidden"},[Hi]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[Ft]:{exposure:"hidden"},[Ud]:{exposure:"hidden"},[Bd]:{exposure:"hidden"},[Hd]:{exposure:"hidden"},[Vd]:{exposure:"hidden"},[xl]:{exposure:"hidden"},[Tl]:{exposure:"hidden"},[vS]:{exposure:"event"},[yS]:{exposure:"event"},[bS]:{exposure:"event"},[SS]:{exposure:"event"},[wS]:{exposure:"event"},[xS]:{exposure:"event"}
26,[TS]:{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"}},yL=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],cr=t=>{var e=vL[t];if(e)return e;for(var n of yL){var r=n[1];if(t.indexOf(n[0])===0)return r}},ys=(t,e)=>{try{return JSON.stringify(t,((n,r)=>typeof r=="bigint"?r.toString():r),e)}catch{return F0(t)}},Fs=t=>{var e=H==null?void 0:H.createElement("a");return U(e)?null:(e.href=t,e)},$s=function(t,e){for(var n,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;r.length>s;s++){var i=r[s].split("=");if(i[0]===e){n=i;break}}if(!te(n)||2>n.length)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{B.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},uo=function(t,e,n){if(!t||!e||!e.length)return t;for(var r=t.split("#"),s=r[1],i=(r[0]||"").split("?"),o=i[1],a=i[0],l=(o||"").split("&"),u=[],c=0;l.length>c;c++){var d=l[c].split("=");te(d)&&(e.includes(d[0])?u.push(d[0]+"="+n):u.push(l[c]))}var f=a;return o!=null&&(f+="?"+u.join("&")),s!=null&&(f+="#"+s),f},Rl=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},BS=(t,e)=>t>=e&&N0(),HS=(t,e,n,r)=>{if(t===0){if(N0()){var s=e+1;return s===n&&r(),s}return e}return 0},na="https?://(.*)",js=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],bL=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...js],co="<masked>",SL=["li_fat_id"];function VS(t,e,n){if(!H)return{};var r,s=e?[...js,...n||[]]:[],i=zS(uo(H.URL,s,co),t),o=(r={},Ae(SL,(function(a){var l=IS(a);r[a]=l||null})),r);return $e(o,i)}function zS(t,e){var n=bL.concat(e||[]),r={};return Ae(n,(function(s){var i=$s(t,s);r[s]=i||null})),r}function qS(t){var e=(function(i){return i?i.search(na+"google.([^/?]*)")===0?"google":i.search(na+"bing.com")===0?"bing":i.search(na+"yahoo.com")===0?"yahoo":i.search(na+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",r={};if(!Nt(e)){r.$search_engine=e;var s=H?$s(H.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function gm(){return navigator.language||navigator.userLanguage}var Al="$direct";function WS(){return(H==null?void 0:H.referrer)||Al}function GS(t,e,n){n===void 0&&(n=!1);var r=t?[...js,...e||[]]:[],s=n?er(He==null?void 0:He.href):He==null?void 0:He.href,i=s==null?void 0:s.substring(0,1e3);return{r:WS().substring(0,1e3),u:i?uo(i,r,co):void 0}}function KS(t,e){var n;e===void 0&&(e=!1);var r=t.r,s=t.u,i=e?er(s):s,o={$referrer:r,$referring_domain:r==null?void 0:r==Al?Al:(n=Fs(r))==null?void 0:n.host};
26if(i){o.$current_url=i;var a=Fs(i);o.$host=a==null?void 0:a.host,o.$pathname=a==null?void 0:a.pathname;var l=zS(i);$e(o,l)}if(r){var u=qS(r);$e(o,u)}return o}function YS(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function EL(){try{return new Date().getTimezoneOffset()}catch{return}}var wL={flags:Hi,surveys:wl},xL=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],Qr="main";class Qu{constructor(e,n,r){if(r===void 0&&(r=!0),this.ci={},this.fi=!1,this.pi=!1,this.Ne=e,this.gi=r,this.props={},this.mi=void 0,this.yi=(i=>{var o="";return i.token&&(o=i.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),i.persistence_name?"ph_"+i.persistence_name:"ph_"+o+"_posthog"})(e),this.ii=this.bi(e),this.pi=this.wi(e),this.load(),e.debug&&B.info("Persistence loaded",e.persistence,F({},this.props)),this.update_config(e,e,n),this.save(),D){var s=()=>this.flush();Ve(D,"beforeunload",s,{capture:!1}),Ve(D,"pagehide",s,{capture:!1})}}ki(){var e,n=(e=this.Ne)==null?void 0:e.persistence_save_debounce_ms;return et(n)&&n>0?n:0}isDisabled(){return!!this.xi}bi(e){xL.indexOf(e.persistence.toLowerCase())===-1&&(B.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n,r=(function(o,a){o===void 0&&(o=[]),a===void 0&&(a=!1);var l=[...nL,...o];return F({},Ne,{H(u){try{var c={};try{c=In.H(u)||{}}catch{}var d,f=JSON.parse(Ne.P(u)||"{}");if(a){var p={};for(var h in c){var g=c[h];Nt(g)||g===""||(p[h]=g)}d=$e(f,p)}else d=$e(c,f);return Ne.F(u,d),d}catch{}return null},F(u,c,d,f,p,h){var g=Ne.F(u,c,void 0,void 0,h);try{var _={};l.forEach((m=>{c[m]&&(_[m]=c[m])})),Object.keys(_).length&&In.F(u,_,d,f,p,h)}catch(m){Ne.j(m)}return g},q(u,c){try{D==null||D.localStorage.removeItem(u),In.q(u,c)}catch(d){Ne.j(d)}}})})(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),s=!1,i=e.persistence.toLowerCase();return i==="localstorage"&&Ne.N()?(n=Ne,s=!0):i==="localstorage+cookie"&&r.N()?(n=r,s=!0):i==="sessionstorage"&&Ye.N()?n=Ye:i==="memory"?n=rL:i==="cookie"?n=In:r.N()?(n=r,s=!0):n=In,this.fi=s,n}Si(e){return this.yi+"__"+e}wi(e){return this.fi&&!!e.split_storage}properties(){var e={};return Ae(this.props,((n,r)=>{var s=cr(r);if(!s||s.exposure==="event"){if(s!=null&&s.shouldSkipFromEventProperties!=null&&s.shouldSkipFromEventProperties(n))return;e[r]=n}})),e}load(){if(!this.xi){var e=this.ii.H(this.yi);e&&(this.props=$e({},e)),this.pi&&this.Ci()}}Ci(){for(var e of Zu){var n=Ne.H(this.Si(e));if(n&&!Cn(n)){var r=this.Mi(e);r.persisted=!0,this.Ti(e)||(r.fingerprint=this.Ei(n,e)),this.Ii(e,n)||$e(this.props,n)}}}Ti(e){return Object.keys(this.props).some((n=>{var r;return((r=cr(n))==null?void 0:r.storageGroup)===e}))}Ii(e,n){var r=wL[e];if(!r)return!1;var s=n[r],i=this.props[r];return et(s)&&et(i)&&i>s}refreshKey(e){var n;if(!this.xi){var r=this.pi?(n=cr(e))==null?void 0:n.storageGroup:void 0,s=r?Ne.H(this.Si(r)):this.ii.H(this.yi);if(s&&e in s)this.Pi(e,s[e]);else{if(r){var i=this.ii.H(this.yi);if(i&&e in i)return void this.Pi(e,i[e])}this.Ri(e)}}}save(){if(!this.xi){var e=this.ki();e>0?U(this.Ai)&&(this.Ai=setTimeout((()=>{this.Ai=void 0,this.Fi()}),e)):this.Fi()}}flush(){U(this.Ai)||(clearTimeout(this.Ai),this.Ai=void 0,this.Fi())}Fi(){this.xi||(this.pi?this.Li():this.Oi(this.ii,this.yi,this.props,Qr))}Li(){var e=this.Di(),n=e.main,r=e.groups;for(var s of(this.Oi(this.ii,this.yi,n,Qr),Zu)){var i,o=r[s];(!Cn(o)||(i=this.ci[s])!=null&&i.persisted)&&this.Oi(Ne,this.Si(s),o,s)}}Di(){var e={},n={flags:{},surveys:{}};return Ae(this.props,((r,s)=>{var i,o=(i=cr(s))==null?void 0:i.storageGroup;o?n[o][s]=r:e[s]=r})),{main:e,groups:n}}Ei(e,n){if(n===Qr)return JSON.stringify(e)+"|"+this.$i+"|"+this.Ni+"|"+this.qi;var r={};return Ae(e,((s,i)=>{var o;r[i]=(o=cr(i))!=null&&o.volatile?"__volatile__":s})),JSON.stringify(r)}Oi(e,n,r,s){var i=this.Mi(s);if(s===Qr||i.dirty||U(i.fingerprint)){var o;try{if((o=this.Ei(r,s))===i.fingerprint)return void(i.dirty=!1)}catch{o=void 0}e.F(n,r,this.$i,this.Ni,this.qi,this.Ne.debug)?(i.dirty=!1,s!==Qr&&(i.persisted=!0),U(o)||(i.fingerprint=o)):this.Ne.debug&&B.warn('failed to persist storage entry "'+n+'"; will retry on next save')}}remove(e){var n=(e===void 0?{}:e).keepGroupEntries,r=n!==void 0&&n;if(U(this.Ai)||(clearTimeout(this.Ai),this.Ai=void 0),this.ii.q(this.yi,!1),this.ii.q(this.yi,!0),!r&&this.gi)for(var s of Zu)Ne.q(this.Si(s));r?delete this.ci[Qr]:this.ci={}}clear(){this.remove(),this.props={}}register_once(e,n,r){if(je(e)){U(n)&&(n="None"),this.$i=U(r)?this.ji:r;var s=!1;if(Ae(e,((i,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==n||(this.Pi(o,i),s=!0)})),s)return this.save(),!0}return!1}register(e,n){if(je(e)){this.$i=U(n)?this.ji:n;var r=!1;if(Ae(e,((s,i)=>{e.hasOwnProperty(i)&&(this.props[i]!==s||je(s)||te(s))&&(this.Pi(i,s),r=!0)})),r)return this.save(),!0}return!1}unregister(e){var n=typeof e=="string"?[e]:e,r=!1;for(var s of n)s in this.props&&(this.Ri(s),r=!0);r&&this.save()}update_campaign_params(){var e=H==null?void 0:H.URL;if(e!==this.mi){var n=VS(this.Ne.custom_campaign_params,this.Ne.mask_personal_data_properties,this.Ne.custom_personal_data_properties);Cn(Eh(n))||this.register(n),this.mi=e}}update_search_keyword(){var e;this.register((e=H==null?void 0:H.referrer)?qS(e):{})}update_referrer_info(){var e;this.register_once({$referrer:WS(),$referring_domain:H!=null&&H.referrer&&((e=Fs(H.referrer))==null?void 0:e.host)||Al},void 0)}set_initial_person_info(){this.props[Hd]||this.props[Vd]||this.register_once({[xl]:GS(this.Ne.mask_personal_data_properties,this.Ne.custom_personal_data_properties,this.Ne.disable_capture_url_hashes
26)},void 0)}get_initial_props(){var e={};Ae([Vd,Hd],(s=>{var i=this.props[s];i&&Ae(i,(function(o,a){e["$initial_"+wd(a)]=o}))}));var n=this.props[xl];if(n){var r=(function(s,i){i===void 0&&(i=!1);var o=KS(s,i),a={};return Ae(o,(function(l,u){a["$initial_"+wd(u)]=l})),a})(n,this.Ne.disable_capture_url_hashes);$e(e,r)}return e}safe_merge(e){return Ae(this.props,(function(n,r){r in e||(e[r]=n)})),e}update_config(e,n,r){this.ji=this.$i=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!r),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var s=e.persistence!==n.persistence||!((l,u)=>{if(l.length!==u.length)return!1;var c=[...l].sort(),d=[...u].sort();return c.every(((f,p)=>f===d[p]))})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),i=s?this.bi(e):this.ii,o=this.wi(e);if(s||o!==this.pi){var a=this.props;this.clear(),this.ii=i,this.pi=o,this.props=a,this.save()}}set_disabled(e){this.xi=e,this.xi?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ni&&(this.Ni=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.qi&&(this.qi=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){var r=this.props[Oi]||{};r[e]=n,this.Pi(Oi,r),this.save()}remove_event_timer(e){var n=this.props[Oi]||{},r=n[e];return U(r)||(delete n[e],this.Pi(Oi,n),this.save()),r}get_property(e){return this.props[e]}set_property(e,n){this.Pi(e,n),this.save()}Pi(e,n){var r;this.props[e]=n,(r=cr(e))!=null&&r.volatile||this.Bi(e)}Ri(e){delete this.props[e],this.Bi(e)}Bi(e){var n,r=(n=cr(e))==null?void 0:n.storageGroup;r&&(this.Mi(r).dirty=!0)}Mi(e){return this.ci[e]||(this.ci[e]={})}}function ra(t){var e=!0;return{dispose(){if(e){e=!1;var n=t();n&&Tt(n.then)&&n.then(void 0,(()=>{}))}}}}var It={GZipJS:"gzip-js",Base64:"base64"},ci={Activation:"events",Cancellation:"cancelEvents"},ec={Popover:"popover",API:"api",Widget:"widget"},On={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},tc={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Kd={Popover:"popover",Inline:"inline"},TL={SHOWN:"product tour shown"},mm={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},_m=Ue("[RateLimiter]");class IL{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach((s=>{_m.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4}))}catch(s){return void _m.warn('could not rate limit - continuing. Error: "'+(s==null?void 0:s.message)+'"',{text:r})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var n,r,s;e===void 0&&(e=!1);var i=this.captureEventsBurstLimit,o=this.captureEventsPerSecond,a=new Date().getTime(),l=(n=(r=this.instance.persistence)==null?void 0:r.get_property(Bd))!==null&&n!==void 0?n:{tokens:i,last:a};l.tokens+=(a-l.last)/1e3*o,l.last=a,l.tokens>i&&(l.tokens=i);var u=1>l.tokens;if(u||e||(l.tokens=Math.max(0,l.tokens-1)),u&&!e){var c=(et(l.dropped)?l.dropped:0)+1;l.dropped=c,!this.lastEventRateLimited&&this.Hi(c)&&(l.dropped=0)}return this.lastEventRateLimited=u,(s=this.instance.persistence)==null||s.set_property(Bd,l),{isRateLimited:u,remainingTokens:l.tokens}}Ui(e){var n=this.instance.config.property_denylist;return!te(n)||!n.includes(e)}zi(){var e;if(this.Ui("$current_url")&&this.Ui("$pathname")&&He!=null&&He.pathname)return""+((e=He.origin)!==null&&e!==void 0?e:"")+He.pathname}Hi(e){var n,r,s=this.captureEventsBurstLimit,i=this.captureEventsPerSecond,o=this.zi(),a=this.Ui("$session_id")?(n=(r=this.instance).get_session_id)==null?void 0:n.call(r):void 0,l=[e+" event(s) dropped since the last warning",o?"triggered on "+o:void 0,a?"session "+a:void 0].filter(
26Boolean).join(", ");return!!this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited: "+l+". Config is set to "+i+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0})}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var jn=Ue("[RemoteConfig]");class JS{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=K._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}Wi(e){var n,r;(n=K.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=K.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}Vi(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:e})}load(){try{if(this.remoteConfig)return jn.info("Using preloaded remote config",this.remoteConfig),this.Zi(this.remoteConfig),void this.Gi();if(this._instance.Qi())return void jn.warn("Remote config is disabled. Falling back to local config.");this.Wi((e=>{if(!e)return jn.info("No config found after loading remote JS config. Falling back to JSON."),void this.Vi((n=>{this.Zi(n.json,n),this.Gi()}));this.Zi(e),this.Gi()}))}catch(e){jn.error("Error loading remote config",e),this.Zi()}}stop(){this.Ki&&(clearInterval(this.Ki),this.Ki=void 0)}refresh(){!this._instance.Qi()&&H&&H.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}Gi(){var e;if(!this.Ki){var n=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;n!==0&&(this.Ki=setInterval((()=>{this.refresh()}),n))}}Zi(e,n){!e&&n&&(n.statusCode===0?n.error||jn.warn("Failed to fetch remote config from PostHog."):jn.error("Failed to fetch remote config from PostHog."));try{this._instance.Zi(e?{ok:!0,config:e}:{ok:!1})}catch(s){jn.error("Error applying remote config",s)}if((e==null?void 0:e.hasFeatureFlags)!==!1&&!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var r;(r=this._instance.featureFlags)==null||r.ensureFlagsLoaded()}catch(s){jn.error("Error loading feature flags",s)}}}var Yt=Uint8Array,Dt=Uint16Array,Us=Uint32Array,Ih=new Yt([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]),Oh=new Yt([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]),vm=new Yt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),XS=function(t,e){for(var n=new Dt(31),r=0;31>r;++r)n[r]=e+=1<<t[r-1];var s=new Us(n[30]);for(r=1;30>r;++r)for(var i=n[r];n[r+1]>i;++i)s[i]=i-n[r]<<5|r;return[n,s]},ZS=XS(Ih,2),Yd=ZS[1];ZS[0][28]=258,Yd[258]=28;for(var ym=XS(Oh,0)[1],QS=new Dt(32768),qe=0;32768>qe;++qe){var es=(43690&qe)>>>1|(21845&qe)<<1;QS[qe]=((65280&(es=(61680&(es=(52428&es)>>>2|(13107&es)<<2))>>>4|(3855&es)<<4))>>>8|(255&es)<<8)>>>1}var zi=function(t,e,n){for(var r=t.length,s=0,i=new Dt(e);r>s;++s)++i[t[s]-1];var o,a=new Dt(e);for(s=0;e>s;++s)a[s]=a[s-1]+i[s-1]<<1;for(o=new Dt(r),s=0;r>s;++s)o[s]=QS[a[t[s]-1]++]>>>15-t[s];return o},$r=new Yt(288);for(qe=0;144>qe;++qe)$r[qe]=8;for(qe=144;256>qe;++qe)$r[qe]=9;for(qe=256;280>qe;++qe)$r[qe]=7;for(qe=280;288>qe;++qe)$r[qe]=8;var Pl=new Yt(32);for(qe=0;32>qe;++qe)Pl[qe]=5;var OL=zi($r,9),kL=zi(Pl,5),eE=function(t){return(t/8>>0)+(7&t&&1)},tE=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof Dt?Dt:t instanceof Us?Us:Yt)(n-e);return r.set(t.subarray(e,n)),r},hn=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8},di=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8,t[r+2]|=n>>>16},nc=function(t,e){for(var n=[],r=0;t.length>r;++r)t[r]&&n.push({s:r,f:t[r]});var s=n.length,i=n.slice();if(!s)return[new Yt(0),0];if(s==1){var o=new Yt(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort((function(I,x){return I.f-x.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,d=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=s-1;)a=n[n[d].f>n[u].f?u++:d++],l=n[u!=c&&n[d].f>n[u].f?u++:d++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var f=i[0].s;for(r=1;s>r;++r)i[r].s>f&&(f=i[r].s);var p=new Dt(f+1),h=Jd(n[c-1],p,0);if(h>e){r=0;var g=0,_=h-e,m=1<<_;for(i.sort((function(I,x){return p[x.s]-p[I.s]||I.f-x.f}));s>r;
vendor: 1,707 bytes, line 26
26++r){var y=i[r].s;if(e>=p[y])break;g+=m-(1<<h-p[y]),p[y]=e}for(g>>>=_;g>0;){var E=i[r].s;e>p[E]?g-=1<<e-p[E]++-1:++r}for(;r>=0&&g;--r){var T=i[r].s;p[T]==e&&(--p[T],++g)}h=e}return[new Yt(p),h]},Jd=function(t,e,n){return t.s==-1?Math.max(Jd(t.l,e,n+1),Jd(t.r,e,n+1)):e[t.s]=n},bm=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new Dt(++e),r=0,s=t[0],i=1,o=function(l){n[r++]=l},a=1;e>=a;++a)if(t[a]==s&&a!=e)++i;else{if(!s&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(s),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(s);i=1,s=t[a]}return[n.subarray(0,r),e]},fi=function(t,e){for(var n=0,r=0;e.length>r;++r)n+=t[r]*e[r];return n},Xd=function(t,e,n){var r=n.length,s=eE(e+2);t[s]=255&r,t[s+1]=r>>>8,t[s+2]=255^t[s],t[s+3]=255^t[s+1];for(var i=0;r>i;++i)t[s+i+4]=n[i];return 8*(s+4+r)},Sm=function(t,e,n,r,s,i,o,a,l,u,c){hn(e,c++,n),++s[256];for(var d=nc(s,15),f=d[0],p=d[1],h=nc(i,15),g=h[0],_=h[1],m=bm(f),y=m[0],E=m[1],T=bm(g),I=T[0],x=T[1],R=new Dt(19),C=0;y.length>C;++C)R[31&y[C]]++;for(C=0;I.length>C;++C)R[31&I[C]]++;for(var S=nc(R,7),w=S[0],A=S[1],P=19;P>4&&!w[vm[P-1]];--P);var O,N,V,L,W=u+5<<3,q=fi(s,$r)+fi(i,Pl)+o,ie=fi(s,f)+fi(i,g)+o+14+3*P+fi(R,w)+(2*R[16]+3*R[17]+7*R[18]);if(q>=W&&ie>=W)return Xd(e,c,t.subarray(l,l+u));if(hn(e,c,1+(q>ie)),c+=2,q>ie){O=zi(f,p),N=f,V=zi(g,_),L=g;var ce=zi(w,A);for(hn(e,c,E-257),hn(e,c+5,x-1),hn(e,c+10,P-4),c+=14,C=0;P>C;++C)hn(e,c+3*C,w[vm[C]]);c+=3*P;for(var Z=[y,I],Ee=0;2>Ee;++Ee){var de=Z[Ee];for(C=0;de.length>C;++C)hn(e,c,ce[_e=31&de[C]]),c+=w[_e],_e>15&&(hn(e,c,de[C]>>>5&127),c+=de[C]>>>12)}}else O=OL,N=$r,V=kL,L=Pl;for(C=0;a>C;++C)if(r[C]>255){var _e;di(e,c,O[257+(_e=r[C]>>>
2618&31)]),c+=N[_e+257],_e>7&&(hn(e,c,r[C]>>>23&31),c+=Ih[_e]);var Ie=31&r[C];di(e,c,V[Ie]),c+=L[Ie],Ie>3&&(di(e,c,r[C]>>>5&8191),c+=Oh[Ie])}else di(e,c,O[r[C]]),c+=N[r[C]];return di(e,c,O[256]),c+N[256]},CL=new Us([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),RL=(function(){for(var t=new Us(256),e=0;256>e;++e){for(var n=e,r=9;--r;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),rc=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function AL(t,e){e===void 0&&(e={});var n=(function(){var d=4294967295;return{p(f){for(var p=d,h=0;f.length>h;++h)p=RL[255&p^f[h]]^p>>>8;d=p},d(){return 4294967295^d}}})(),r=t.length;n.p(t);var s,i,o,a,l,u=(a=10+((s=e).filename&&s.filename.length+1||0),l=8,(function(d,f,p,h,g,_){var m=d.length,y=new Yt(h+m+5*(1+Math.floor(m/7e3))+g),E=y.subarray(h,y.length-g),T=0;if(!f||8>m)for(var I=0;m>=I;I+=65535){var x=I+65535;m>x?T=Xd(E,T,d.subarray(I,x)):(E[I]=!0,T=Xd(E,T,d.subarray(I,m)))}else{for(var R=CL[f-1],C=R>>>13,S=8191&R,w=(1<<p)-1,A=new Dt(32768),P=new Dt(w+1),O=Math.ceil(p/3),N=2*O,V=function(De){return(d[De]^d[De+1]<<O^d[De+2]<<N)&w},L=new Us(25e3),W=new Dt(288),q=new Dt(32),ie=0,ce=0,Z=(I=0,0),Ee=0,de=0;m>I;++I){var _e=V(I),Ie=32767&I,ae=P[_e];if(A[Ie]=ae,P[_e]=Ie,I>=Ee){var We=m-I;if((ie>7e3||Z>24576)&&We>423){T=Sm(d,E,0,L,W,q,ce,Z,de,I-de,T),Z=ie=ce=0,de=I;for(var Se=0;286>Se;++Se)W[Se]=0;for(Se=0;30>Se;++Se)q[Se]=0}var ct=2,wt=0,Xt=S,Ge=Ie-ae&32767;if(We>2&&_e==V(I-Ge))for(var it=Math.min(C,We)-1,mt=Math.min(32767,I),Xe=Math.min(258,We);mt>=Ge&&--Xt&&Ie!=ae;){if(d[I+ct]==d[I+ct-Ge]){for(var Y=0;Xe>Y&&d[I+Y]==d[I+Y-Ge];++Y);if(Y>ct){if(ct=Y,wt=Ge,Y>it)break;var Ze=Math.min(Ge,Y-2),rt=0;for(Se=0;Ze>Se;++Se){var lt=I-Ge+Se+32768&32767,he=lt-A[lt]+32768&32767;he>rt&&(rt=he,ae=lt)}}}Ge+=(Ie=ae)-(ae=A[Ie])+32768&32767}if(wt){L[Z++]=268435456|Yd[ct]<<18|ym[wt];var _t=31&Yd[ct],le=31&ym[wt];ce+=Ih[_t]+Oh[le],++W[257+_t],++q[le],Ee=I+ct,++ie}else L[Z++]=d[I],++W[d[I]]}}T=Sm(d,E,!0,L,W,q,ce,Z,de,I-de,T)}return tE(y,0,h+eE(T)+g)})(i=t,(o=e).level==null?6:o.level,o.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+o.mem,a,l)),c=u.length;return(function(d,f){var p=f.filename;if(d[0]=31,d[1]=139,d[2]=8,d[8]=2>f.level?4:f.level==9?2:0,d[9]=3,f.mtime!=0&&rc(d,4,Math.floor(new Date(f.mtime||Date.now())/1e3)),p){d[3]=8;for(var h=0;p.length>=h;++h)d[h+10]=p.charCodeAt(h)}})(u,e),rc(u,c-8,n.d()),rc(u,c-4,r),u}var PL=!!bd||!!dh,nE="text/plain",ja=!1,rE=(t,e)=>{var n=t.split("#"),r=n[1],s=n[0].split("?"),i=s[0],o=s[1];if(!o)return t;var a=o.split("&").filter((l=>l.split("=")[0]!==e)).join("&");return i+(a?"?"+a:"")+(r?"#"+r:"")},lu=function(t,e,n){var r;n===void 0&&(n=!0);var s=t.split("?"),i=s[0],o=s[1],a=F({},e),l=(r=o==null?void 0:o.split("&").map((c=>{var d,f=c.split("="),p=f[0],h=n&&(d=a[p])!==null&&d!==void 0?d:f[1];return delete a[p],p+"="+h})))!==null&&r!==void 0?r:[],u=(function(c,d){var f,p;d===void 0&&(d="&");var h=[];return Ae(c,(function(g,_){U(g)||U(_)||_==="undefined"||(f=encodeURIComponent((m=>m instanceof File)(g)?g.name:g.toString()),p=encodeURIComponent(_),h[h.length]=p+"="+f)})),h.join(d)})(a);return u&&l.push(u),l.length>0?i+"?"+l.join("&"):i},sc=t=>{if(t.Ji)return t.Ji;var e=t.data,n=t.compression;if(e){if(n===It.GZipJS){var r=AL((function(a,l){var u=a.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(a);for(var c=new Yt(a.length+(a.length>>>1)),d=0,f=function(_){c[d++]=_},p=0;u>p;++p){if(d+5>c.length){var h=new Yt(d+8+(u-p<<1));h.set(c),c=h}var g=a.charCodeAt(p);128>g?f(g):2048>g?(f(192|g>>>6),f(128|63&g)):g>55295&&57344>g?(f(240|(g=65536+(1047552&g)|1023&a.charCodeAt(++p))>>>18),f(128|g>>>12&63),f(128|g>>>6&63),f(128|63&g)):(f(224|g>>>12),f(128|g>>>6&63),f(128|63&g))}return tE(c,0,d)})(ys(e)),{mtime:0});return{contentType:nE,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===It.Base64){var s=(function(a){return a&&btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,((l,u)=>String.fromCharCode(parseInt(u,16)))))})(ys(e)),i=(a=>"data="+encodeURIComponent(typeof a=="string"?a:ys(a)))(s);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var o=ys(e);return{contentType:"application/json",body:o,estimatedSize:new Blob([o]).size}}},sE=t=>{var e,n,r=()=>t.transport==="sendBeacon"?{url:lu(t.url,{compression:It.Base64}),encodedBody:sc(F({},t,{compression:It.Base64,Ji:void 0}))}:{url:rE(t.url,"compression"),encodedBody:sc(F({},t,{compression:void 0,Ji:void 0}))};try{e=sc(t)}catch(s){if(Bg(t.compression,$s(t.url,"compression")))return B.error("Failed to gzip request body, sending uncompressed payload",s),r();throw s}return e&&Bg(t.compression,$s(t.url,"compression"))&&!((n=e.body)instanceof ArrayBuffer?Sd(new Uint8Array(n)):ArrayBuffer.isView(n)&&Sd(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(ja=!0,r()):{url:t.url,encodedBody:e}},iE=t=>{try{return sE(t)}catch(e){return B.error(e),void(t.callback==null||t.callback({statusCode:0,error:e}))}},DL=(function(){var t=Pe((function*(e){var n=ys(e.data),r=yield(function(i,o,a){return Ed.apply(this,arguments)})(n,Re.DEBUG,{rethrow:!0});if(!r)return e;var s=yield r.arrayBuffer();return F({},e,{Ji:{contentType:nE,body:s,estimatedSize:s.byteLength}})}));return function(e){return t.apply(this,arguments)}})(),NL=/Failed to fetch|NetworkError|Load failed/i,oE=t=>(t==null?void 0:t.name)==="TypeError"&&NL.test((t==null?void 0:t.message)||""),aE=t=>{var e=iE(t);if(e){var n=e.url,r=e.encodedBody,s=r??{},i=s.contentType,o=s.body,a=s.estimatedSize,l=new Headers;Ae(t.headers,(function(h,g){l.append(g,h)})),i&&l.append("Content-Type",i);var u=null,c=!1;if(Lg){var d=new Lg;u={signal:d.signal,timeout:setTimeout((()=>{var h,g;c=!0,d.abort((h=t.timeout,(g=new Error("PostHog request timed out"+(h?" after "+h+"ms":""))).name="AbortError",g))}),t.timeout)}}var f=h=>{c&&(h==null?void 0:h.name)==="AbortError"||oE(h)?B.warn(h):B.error(h),t.callback==null||t.callback({statusCode:0,error:h})};try{var p;dh(n,F({method:(t==null?void 0:t.method)||"GET",headers:l,keepalive:t.method==="POST"&&!t.Yi&&52428.8>(a||0),body:o,signal:(p=u)==null?void 0:p.signal},t.fetchOptions)).then((h=>h.text().then((g=>{var _={statusCode:h.status,text:g};if(h.status===200)try{_.json=JSON.parse(g)}catch(m){B.error(m)}t.callback==null||t.callback(_)})))).catch(f).finally((()=>u?clearTimeout(u.timeout):null))}catch(h){u&&clearTimeout(u.timeout),f(h)}}},Zd=t=>{try{var e,n=sE(t),r=n.url,s=n.encodedBody,i=s??{},o=i.body,a=i.estimatedSize;if(!o)return;var l=o instanceof Blob?o:new Blob([o],{type:i.contentType});if(kt.sendBeacon(r,l))return;var u=te(t.data)?t.data:(e=t.data)==null?void 0:e.batch;if(te(u)&&u.length>1&&(a??0)>16384){var c=Math.ceil(u.length/2),d=f=>te(t.data)?f:F({},t.data,{batch:f});return Zd(F({},t,{data:d(u.slice(0,c))})),void Zd(F({},t,{data:d(u.slice(c))}))}B.warn("Beacon of ~"+(a??0)+" bytes was rejected by the browser, falling back to fetch"),aE(F({},t,{Yi:!0}))}catch(f){B.warn("Beacon send failed",f)}},Em=(t,e,n,r)=>{var s=r==="query"?e==="POST"?"sent_at":"_":void 0;return lu(n===It.GZipJS?rE(t,"compression"):t,F({},s?{[s]:Date.now().toString()}:{},n===It.GZipJS?{}:{compression:n}))},Ua=[];
26dh&&Ua.push({transport:"fetch",method:aE}),bd&&Ua.push({transport:"XHR",method(t){var e=iE(t);if(e){var n=new bd,r=e.encodedBody;n.open(t.method||"GET",e.url,!0);var s=r??{},i=s.contentType,o=s.body;Ae(t.headers,(function(a,l){n.setRequestHeader(l,a)})),i&&n.setRequestHeader("Content-Type",i),t.timeout&&(n.timeout=t.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var a={statusCode:n.status,text:n.responseText};if(n.status===200)try{a.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(a)}},n.send(o)}}}),kt!=null&&kt.sendBeacon&&Ua.push({transport:"sendBeacon",method:Zd});var Qd=3e3;class LL{constructor(e,n){this.Xi=!0,this.tr=[],this.er=un((n==null?void 0:n.flush_interval_ms)||Qd,250,5e3,B.createLogger("flush interval"),Qd),this.ir=e}enqueue(e){this.tr.push(e),this.rr||this.nr()}unload(){this.sr();var e=this.tr.length>0?this.ar():{},n=Object.values(e);[...n.filter((r=>r.url.indexOf("/e")===0)),...n.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.lr(F({},r,{transport:"sendBeacon"}))}))}enable(){this.Xi=!1,this.nr()}nr(){var e=this;this.Xi||(this.rr=setTimeout((()=>{if(this.sr(),this.tr.length>0){var n=this.ar(),r=function(){var i=n[s],o=new Date().getTime();i.data&&te(i.data)&&Ae(i.data,(a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp})),e.lr(i)};for(var s in n)r()}}),this.er))}lr(e){try{this.ir(e)}catch(n){B.error(n)}}sr(){clearTimeout(this.rr),this.rr=void 0}ar(){var e={};return Ae(this.tr,(n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;U(e[i])&&(e[i]=F({},s,{data:[]})),(r=e[i].data)==null||r.push(s.data)})),this.tr=[],e}}var ML=["retriesPerformedSoFar"];class FL{constructor(e){this.ur=!1,this.hr=3e3,this.tr=[],this._instance=e,this.tr=[],this.dr=!0,!U(D)&&"onLine"in D.navigator&&(this.dr=D.navigator.onLine,this.vr=()=>{this.dr=!0,this.cr()},this.pr=()=>{this.dr=!1},Ve(D,"online",this.vr),Ve(D,"offline",this.pr))}get length(){return this.tr.length}retriableRequest(e){var n=e.retriesPerformedSoFar,r=L0(e,ML);yn(n)&&(r.url=lu(r.url,{retry_count:n})),this._instance._send_request(F({},r,{callback:s=>{if(s.statusCode!==200&&(400>s.statusCode||s.statusCode>=500)){if((s.statusCode===0?3:10)>(n??0))return void this.At(F({retriesPerformedSoFar:n},r));s.statusCode===0&&B.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(n??0)+" retries.")}r.callback==null||r.callback(s)}}))}At(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var r=(function(o){var a=3e3*Math.pow(2,o),l=a/2,u=Math.min(18e5,a),c=Math.random()-.5;return Math.ceil(u+c*(u-l))})(n),s=Date.now()+r;this.tr.push({retryAt:s,requestOptions:e});var i="Enqueued failed request for retry in "+r;navigator.onLine||(i+=" (Browser is offline)"),B.warn(i),this.ur||(this.ur=!0,this.gr())}gr(){if(this.mr&&clearTimeout(this.mr),this.tr.length===0)return this.ur=!1,void(this.mr=void 0);this.mr=setTimeout((()=>{this.dr&&this.tr.length>0&&this.cr(),this.gr()}),this.hr)}cr(){var e=Date.now(),n=[],r=this.tr.filter((i=>e>i.retryAt||(n.push(i),!1)));if(this.tr=n,r.length>0)for(var s of r)this.retriableRequest(s.requestOptions)}unload(){for(var e of(this.mr&&(clearTimeout(this.mr),this.mr=void 0),this.ur=!1,U(D)||(this.vr&&(D.removeEventListener("online",this.vr),this.vr=void 0),this.pr&&(D.removeEventListener("offline",this.pr),this.pr=void 0)),this.tr)){var n=e.requestOptions;try{this._instance._send_request(F({},n,{transport:"sendBeacon"}))}catch(r){B.error(r)}}this.tr=[]}}class $L{constructor(e){this.yr=()=>{var n,r,s,i;this.br||(this.br={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=a+((o==null?void 0:o.clientHeight)||0),c=(o==null?void 0:o.scrollHeight)||0;this.br.lastScrollY=Math.ceil(a),this.br.maxScrollY=Math.max(a,(n=this.br.maxScrollY)!==null&&n!==void 0?n:0),this.br.maxScrollHeight=Math.max(l,(r=this.br.maxScrollHeight)!==null&&r!==void 0?r:0),this.br.lastContentY=u,this.br.maxContentY=Math.max(u,(s=this.br.maxContentY)!==null&&s!==void 0?s:0),this.br.maxContentHeight=Math.max(c,(i=this.br.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=e}get _r(){return this._instance.config.scroll_root_selector}getContext(){return this.br}resetContext(){var e=this.br;return setTimeout(this.yr,0),e}startMeasuringScrollPosition(){Ve(D,"scroll",this.yr,{capture:!0}),Ve(D,"scrollend",this.yr,{capture:!0}),Ve(D,"resize",this.yr)}scrollElement(){if(!this._r)return D==null?void 0:D.document.documentElement;var e=te(this._r)?this._r:[this._r];for(var n of e){var r=D==null?void 0:D.document.querySelector(n);if(r)return r}}wr(e){var n=e==="y"?"scrollTop":"scrollLeft";if(this._r){var r=this.scrollElement();return r&&r[n]||0}return D?e==="y"?D.scrollY||D.pageYOffset||D.document.documentElement.scrollTop||0:D.scrollX||D.pageXOffset||D.document.documentElement.scrollLeft||0:0}scrollY(){return this.wr("y")}scrollX(){return this.wr("x")}}var jL=t=>GS(t==null?void 0:t.config.mask_personal_data_properties,t==null?void 0:t.config.custom_personal_data_properties,t==null?void 0:t.config.disable_capture_url_hashes
26);class wm{constructor(e,n,r,s){this.kr=i=>{var o=this.Sr();if(!o||o.sessionId!==i){var a={sessionId:i,props:this.Cr(this._instance)};this.Mr.register({[Ud]:a})}},this._instance=e,this.Tr=n,this.Mr=r,this.Cr=s||jL,this.Tr.onSessionId(this.kr)}Sr(){return this.Mr.props[Ud]}getSetOnceProps(){var e,n=(e=this.Sr())==null?void 0:e.props;return n?"r"in n?KS(n,this._instance.config.disable_capture_url_hashes):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var e={};return Ae(Eh(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+wd(r)]=n})),e}}class kh{on(e,n){return this.Er[e]||(this.Er[e]=[]),this.Er[e].push(n),()=>{this.Er[e]=this.Er[e].filter((r=>r!==n))}}emit(e,n){for(var r of this.Er[e]||[])r(n);for(var s of this.Er["*"]||[])s(e,n)}constructor(){this.Er={}}}var ts=Ue("[SessionId]"),xm=864e5;class Tm{on(e,n){return this.Ir.on(e,n)}constructor(e,n,r){var s;if(this.Pr=null,this.Rr=[],this.Ar=void 0,this.Fr=!1,this.Ir=new kh,this.Lr=(l,u)=>!(!yn(l)||!yn(u))&&Math.abs(l-u)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===Tn)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Ne=e.config,this.Mr=e.persistence,this.Or=void 0,this.Dr=void 0,this._sessionStartTimestamp=null,this.$r=void 0,this._sessionActivityTimestamp=null,this.Nr=n||wn,this.qr=r||wn;var i=this.Ne.persistence_name||this.Ne.token;if(this._sessionTimeoutMs=1e3*un(this.Ne.session_idle_timeout_seconds||1800,60,36e3,ts.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.jr(),this.Br="ph_"+i+"_window_id",this.Hr="ph_"+i+"_primary_window_exists",this.Ur()){var o=Ye.H(this.Br),a=Ye.H(this.Hr);o&&!a?this.Or=o:Ye.q(this.Br),Ye.F(this.Hr,!0)}(s=this.Ne.bootstrap)!=null&&s.sessionID&&this.setBootstrapSessionId(this.Ne.bootstrap.sessionID),this.zr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return U(this.Rr)&&(this.Rr=[]),this.Rr.push(e),this.Dr&&e(this.Dr,this.Or),()=>{this.Rr=this.Rr.filter((n=>n!==e))}}Ur(){return this.Ne.persistence!=="memory"&&!this.Mr.xi&&Ye.N()}Wr(e){e!==this.Or&&(this.Or=e,this.Ur()&&Ye.F(this.Br,e))}Vr(){return this.Or?this.Or:this.Ur()?Ye.H(this.Br):null}Zr(e){var n=this.Pr;return!Nt(n)&&!Nt(e)&&5e3>Math.abs(e-n)}Gr(e,n,r){var s=n!==this._sessionActivityTimestamp,i=!(e!==this.Dr||r!==this._sessionStartTimestamp);this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.Dr=e,i&&!s||i&&this.Zr(n)||(this.Pr=n,this.Mr.register({[vs]:[n,e,r]}))}Qr(){var e,n=(e=this.Ne)==null?void 0:e.persistence_save_debounce_ms;return yn(n)&&n>0}Kr(){this.Qr()?this.Mr.refreshKey(vs):(this.Mr.flush(),this.Mr.load())}Jr(){var e;if(!Nt(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Pr){this.Kr();var n=this.Yr();n[1]===this.Dr&&n[2]===this._sessionStartTimestamp&&(this.Pr=this._sessionActivityTimestamp,this.Mr.register({[vs]:[this._sessionActivityTimestamp,(e=this.Dr)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.Mr.flush())}}Xr(){var e=this.Yr()[0],n=yn(e)?e:0,r=yn(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,r)}tn(e){return this.Kr(),this.Lr(e,this.Xr())}Yr(){var e=this.Mr.props[vs];return te(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Pr=null,this.$r=void 0,clearTimeout(this.en),this.en=void 0,this.Gr(null,null,null)}setBootstrapSessionId(e,n){n===void 0&&(n=!1);var r=(function(s,i){i===void 0&&(i=new Date().getTime());try{var o=(a=>{var l=a.replace(/-/g,"");if(l.length!==32)throw new Error("Not a valid UUID");if(l[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(l.substring(0,12),16)})(s);return o>i+6e4?void ts.error("Bootstrap sessionID cannot be in the future"):o}catch(a){return void ts.error("Invalid sessionID in bootstrap",a)}})(e);return!U(r)&&(n?this.$r={sessionId:e,sessionStartTimestamp:r}:this.Gr(e,new Date().getTime(),r),!0)}destroy(){this.Fr=!0,this.Jr(),clearTimeout(this.en),this.en=void 0,this.Ar&&D&&(D.removeEventListener(Ol,this.Ar,{capture:!1}),this.Ar=void 0),this.Rr=[]}zr(){this.Ar=()=>{this.Jr(),this.Ur()&&Ye.q(this.Hr)},Ve(D,Ol,this.Ar,{capture:!1})}
26checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.Ne.cookieless_mode===Tn)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),s=this.Yr(),i=s[1],o=s[2],a=this.Xr(),l=this.Vr(),u=this.$r,c=!!u&&(u.sessionStartTimestamp>r+6e4||r-u.sessionStartTimestamp>xm),d=u?c:yn(o)&&Math.abs(r-o)>xm,f=!1,p=!1,h=!i||!!u,g=i,_=!h&&!e&&this.Lr(r,a);if(_){(_=this.tn(r))||ts.info("cross-tab refresh kept the session alive",{sessionId:i});var m=this.Yr();i=m[1],o=m[2]}if(h||_||d){var y=u&&!c;i=y?u.sessionId:this.Nr(),l=this.qr(),ts.info("new session ID assigned",{sessionId:i,windowId:l,bootstrapped:!!y,changeReason:{noSessionId:h,activityTimeout:_,sessionPastMaximumLength:d}}),o=y?u.sessionStartTimestamp:r,this.$r=void 0,f=!0}else l||(l=this.qr(),f=!0),(p=i!==g)&&(ts.info("adopted cross-tab session id",{sessionId:i,windowId:l}),f=!0);var E=yn(a)&&e&&!d?a:r,T=yn(o)?o:new Date().getTime();this.Wr(l),this.Gr(i,E,T),e||this.jr();var I={noSessionId:h,activityTimeout:_,sessionPastMaximumLength:d,crossTabAdoption:p};return f&&this.Rr.forEach((x=>x(i,l,I))),{sessionId:i,windowId:l,sessionStartTimestamp:T,changeReason:f?I:void 0,lastActivityTimestamp:a}}jr(){this.Fr||(clearTimeout(this.en),this.en=setTimeout((()=>{if(!this.Fr)if(this.tn(new Date().getTime())){var e=this.Dr;this.resetSessionId(),this.Ir.emit("forcedIdleReset",{idleSessionId:e})}else this.jr()}),1.1*this.sessionTimeoutMs))}}var lE=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&Vg(n,e))return!0;try{var r=t==null?void 0:t.userAgentData;if(r!=null&&r.brands&&r.brands.some((s=>Vg(s==null?void 0:s.brand,e))))return!0}catch{}return!!t.webdriver};function uE(){return(uE=Pe((function*(){var t=kt==null?void 0:kt.userAgentData;if(t!=null&&t.getHighEntropyValues)try{var e=yield t.getHighEntropyValues(["model"]),n=e==null?void 0:e.model;return ve(n)&&n.length>0?n:void 0}catch(r){return void B.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",r)}}))).apply(this,arguments)}var Dl=function(t,e){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function ic(t,e,n){return ys({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var cE={exact:(t,e)=>e.some((n=>t.some((r=>n===r)))),is_not:(t,e)=>e.every((n=>t.every((r=>n!==r)))),regex:(t,e)=>e.some((n=>t.some((r=>Dl(n,r))))),not_regex:(t,e)=>e.every((n=>t.every((r=>!Dl(n,r))))),icontains:(t,e)=>e.map(sa).some((n=>t.map(sa).some((r=>n.includes(r))))),not_icontains:(t,e)=>e.map(sa).every((n=>t.map(sa).every((r=>!n.includes(r))))),gt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((s=>r>parseFloat(s)))})),lt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((s=>r<parseFloat(s)))}))},sa=t=>t.toLowerCase();function dE(t,e){return!t||Object.entries(t).every((n=>{var r=n[1],s=e==null?void 0:e[n[0]];if(U(s)||Nt(s))return!1;var i=[String(s)],o=cE[r.operator];return!!o&&o(r.values,i)}))}var ef="custom",Im="i.posthog.com",UL=/^\/static\//,BL=["/s/","/e/","/i/"];class HL{constructor(e){this.rn={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+Im,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.rn[this.apiHost]||(this.rn[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":ef),this.rn[this.apiHost]}nn(e){if(UL.test(e)){var n=this.instance.config.asset_host;if(typeof n=="string")return n.trim().replace(/\/$/,"")||void 0}}sn(e){var n=Fs(e);return n?n.protocol+"//"+n.host+n.pathname:void 0}an(e,n,r){if(e==="ui")return r;var s=r,i=this.instance.config.rewriteRequestPath;if(i){var o,a=((o=Fs(r))==null?void 0:o.href)||r;s=i(new URL(a)).toString()}if(i&&e==="api"&&BL.some((f=>n.indexOf(f)===0))){var l=this.sn(s);if(l){var u,c=this.apiHost,d=this.ln;((u=d)==null?void 0:u.apiHost)===c&&d.rewriteRequestPath===i||(d={apiHost:c,rewriteRequestPath:i,urls:new Set},this.ln=d),d.urls.add(l)}}return s}isIngestionEndpoint(e){var n=this.ln,r=this.sn(e);return(n==null?void 0:n.apiHost)===this.apiHost&&n.rewriteRequestPath===this.instance.config.rewriteRequestPath&&!!r&&n.urls.has(r)}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.an(e,n,this.uiHost+n);if(e==="flags")return this.an(e,n,this.flagsApiHost+n);if(e==="assets"){var r=this.nn(n);if(r)return this.an(e,n,""+r+n)}if(this.region===ef)return this.an(e,n,this.apiHost+n);var s=Im+n;switch(e){case"assets":return this.an(e,n,"https://"+this.region+"-assets."+s);case"api":return this.an(e,n,"https://"+this.region+"."+s)}}}function fE(t){var e;return!((e=t.conditions)==null||(e=e.events)==null||(e=e.values)==null||!e.length)}var Te=Ue("[Surveys]"),hE="seenSurvey_",pE=t=>{try{var e=(n=>((r,s)=>""+hE+(function(i){return i.current_iteration&&i.current_iteration>0?i.id+"_"+i.current_iteration:i.id})(s))(0,n))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(n){Te.error("Failed to persist survey seen state",n)}},VL=[ec.Popover,ec.Widget,ec.API],zL={ignoreConditions:!1,ignoreDelay:!1,displayType:Kd.Popover}
26,qL=Ue("[PostHog ExternalIntegrations]"),WL={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class GL{constructor(e){this._instance=e}ai(e,n){var r;(r=K.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,(s=>{if(s)return qL.error("failed to load script",s);n()}))}startIfEnabledOrStop(){var e=this,n=function(){var i,o,a,l=r[0],u=r[1];!u||(i=K.__PosthogExtensions__)!=null&&(i=i.integrations)!=null&&i[l]||e.ai(WL[l],(()=>{var c;(c=K.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[l])==null||c.start(e._instance)})),!u&&(o=K.__PosthogExtensions__)!=null&&(o=o.integrations)!=null&&o[l]&&((a=K.__PosthogExtensions__)==null||(a=a.integrations)==null||(a=a[l])==null||a.stop())};for(var r of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n()}}}class KL{constructor(e,n){this.rt=e,this.un=n,this.hn=new Map,this.dn=!1}add(e){var n=this;return Pe((function*(){if(n.dn)throw new Error("Cannot add an extension to a disposed ExtensionRuntime");if(n.hn.has(e.name))throw new Error('Browser extension "'+e.name+'" is already registered');n.hn.set(e.name,e);try{var r=e.setup(n.un);r&&(yield r)}catch(i){var s=n.hn.get(e.name)===e;s&&n.hn.delete(e.name),n.rt.error('Failed to set up browser extension "'+e.name+'"',i),s&&n.vn(e)}}))()}dispose(){if(!this.dn){this.dn=!0;var e=Array.from(this.hn.values()).reverse();for(var n of(this.hn.clear(),e))this.vn(n)}}vn(e){try{var n=e.dispose==null?void 0:e.dispose();n&&Tt(n.then)&&n.then(void 0,(r=>{this.rt.error('Failed to dispose browser extension "'+e.name+'"',r)}))}catch(r){this.rt.error('Failed to dispose browser extension "'+e.name+'"',r)}}}class YL{constructor(e){this._instance=e}initialize(){}get(e){var n=this._instance.persistence;if(typeof e=="string")return n==null?void 0:n.get_property(e);var r={};for(var s of e){var i=n==null?void 0:n.get_property(s);U(i)||(r[s]=i)}return r}set(e,n){var r;(r=this._instance.persistence)==null||r.register(typeof e=="string"?{[e]:n}:e)}remove(e){var n;(n=this._instance.persistence)==null||n.unregister(e)}}var Om="extensionsRemoteConfig";class JL{constructor(e){this.dn=!1,this.instance=e,this.rt=B,this.cn=e.fn,this.kv=new YL(e),this.onEvent=n=>ra(this.instance.on("eventCaptured",(r=>{try{n({event:r.event,properties:r.properties})}catch(s){this.rt.error("Browser extension event listener failed",s)}}))),this.onRemoteConfig=n=>{if(this.dn)return ra((()=>{}));var r=i=>{try{n(i)}catch(o){this.rt.error("Browser extension remote config listener failed",o)}},s=this.instance.pn.on(Om,r);return this.cn&&r(this.cn),ra(s)},this.gn=new KL(B.createLogger("[BrowserExtensions]"),this)}get logger(){return this.rt}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){var e;return(e=this.instance.get_property(ao))!==null&&e!==void 0?e:this.distinctId}get deviceId(){var e=this.instance.get_property(ao);return typeof e=="string"?e:void 0}get library(){return{name:Re.LIB_NAME,version:Re.LIB_VERSION}}get initialPersonProperties(){var e,n;return(e=(n=this.instance.persistence)==null?void 0:n.get_initial_props())!==null&&e!==void 0?e:{}}get groups(){return this.instance.getGroups()}get session(){try{var e,n,r,s,i=(e=this.instance.sessionManager)==null?void 0:e.checkAndGetSessionAndWindowId(!0);return{sessionId:(n=i==null?void 0:i.sessionId)!==null&&n!==void 0?n:"",windowId:(r=i==null?void 0:i.windowId)!==null&&r!==void 0?r:"",sessionStartTimestamp:(s=i==null?void 0:i.sessionStartTimestamp)!==null&&s!==void 0?s:0}}catch{return{sessionId:"",windowId:"",sessionStartTimestamp:0}}}get projectToken(){return this.instance.config.token}add(e){return this.gn.add(e)}capture(e,n,r){var s=this;return Pe((function*(){r?s.instance.capture(e,n,{timestamp:r.timestamp,uuid:r.uuid,$set:r.set,$set_once:r.setOnce}):s.instance.capture(e,n)}))()}registerDynamicEventProperties(e){return ra(this.instance.mn(e))}handleRemoteConfig(e){this.dn||(this.cn=e,this.instance.pn.emit(Om,e))}sendRequest(e,n){var r=this;return Pe((function*(){var s;n===void 0&&(n={});var i=r.instance.requestRouter.endpointFor((s=n.target)!==null&&s!==void 0?s:"api",e),o={method:n.method,url:n.query?lu(i,n.query):i,data:n.body,headers:n.headers,timeout:n.timeoutMs,fireCallbackOnDrop:!0,transport:n.transport,compression:n.compression,timestampMode:n.sentAt};return n.transport==="sendBeacon"?(r.instance._send_request(o),{statusCode:202}):new Promise((a=>{o.callback=a,r.instance._send_request(o)}))}))()}dispose(){this.dn||(this.dn=!0,this.gn.dispose())}}var qi={},oc=0,Nl=()=>{}
26,km='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',hi="Surveys module not available",Cm="sanitize_properties is deprecated. Use before_send instead",gE="Invalid value for property_denylist config: ",XL=["token","distinct_id",ES],ds="posthog",mE=!PL&&(At==null?void 0:At.indexOf("MSIE"))===-1&&(At==null?void 0:At.indexOf("Mozilla"))===-1,ac=t=>{var e;return F({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:XN(H==null?void 0:H.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Nl,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:t??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:He&&ve(He==null?void 0:He.search)&&He.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,disableDeviceModel:!1,disable_external_dependency_loading:!1,strict_script_versioning:!1,enable_recording_console_log:void 0,secure_cookie:(D==null||(e=D.location)==null?void 0:e.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(n){B.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:zd,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:Qd},error_tracking:{},_onCapture:Nl},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:uL,ignore_text_selection:!0}
26:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:n&&n>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:n&&n>="2026-05-30"?250:0,split_storage:!(!n||"2026-05-30">n),detect_google_search_app:!(!n||"2026-05-30">n),disable_capture_url_hashes:!(!n||"2026-06-25">n)}))(t))},ZL=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"]],Rm=t=>{var e={};for(var n of ZL){var r=n[0],s=n[1];U(t[r])||(e[s]=t[r])}var i=$e({},e,t),o=t.__preview_external_dependency_versioned_paths;return U(o)||(U(t.strict_script_versioning)&&(i.strict_script_versioning=!!o),ve(o)&&U(t.asset_host)&&(i.asset_host=o)),te(t.property_blacklist)&&(U(t.property_denylist)?i.property_denylist=t.property_blacklist:te(t.property_denylist)?i.property_denylist=[...t.property_blacklist,...t.property_denylist]:B.error(gE+t.property_denylist)),i};class QL{constructor(){this.__forceAllowLocalhost=!1}get yn(){return this.__forceAllowLocalhost}set yn(e){B.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class jt{bn(e,n){if(e){var r=this.hn.indexOf(e);r!==-1&&this.hn.splice(r,1)}return this.hn.push(n),n.initialize==null||n.initialize(),n}_n(){return this.config.cookieless_mode===Tn||this.config.cookieless_mode===yr&&this.consent.isRejected()}get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){var e;this.webPerformance=new QL,this.wn=!1,this.version=Re.LIB_VERSION,this.kn=new Set,this.xn="",this.pn=new kh,this.hn=[],this.Sn=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=ac(),this.SentryIntegration=_L,this.sentryIntegration=r=>(function(s,i){var o=US(s,i);return{name:jS,processEvent:a=>o(a)}})(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Cn=!1,this.Mn=null,this.Tn=null,this.En=null,this.scrollManager=new $L(this),this.pageViewManager=new pm(this),this.rateLimiter=new IL(this),this.requestRouter=new HL(this),this.consent=new sL(this),this.externalIntegrations=new GL(this);var n=(e=jt.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.metrics=n.metrics&&new n.metrics(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,s,i)=>{var o=ve(r)?{[r]:s}:r;this.setPersonProperties(o),i==null||i({})},set_once:(r,s,i)=>{var o=ve(r)?{[r]:s}:r;this.setPersonProperties(void 0,o),i==null||i({})}},this.on("eventCaptured",(r=>B.info('send "'+(r==null?void 0:r.event)+'"',r)))}init(e,n,r){if(r&&r!==ds){var s,i=(s=qi[r])!==null&&s!==void 0?s:new jt;return i._init(e,n,r),qi[r]=i,qi[ds][r]=i,i}return this._init(e,n,r)}_init(e,n,r){var s,i;n===void 0&&(n={});var o,a=ve(e)?e.trim():"";if(!a)return B.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 a!==((o=this.config)==null?void 0:o.token)?console.warn("[PostHog.js]","You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('"+a+"', { ... }, 'project2')"):console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config=ac(n.defaults),n.debug=this.In(n.debug),this.Pn=n,this.Rn=[],n.person_profiles?this.Tn=n.person_profiles:n.process_person&&(this.Tn=n.process_person);var l=ac(n.defaults),u=Rm(n),c=$e({},l,u,{name:r,token:a});je(l.rageclick)&&je(u.rageclick)&&(c.rageclick=$e({},l.rageclick,u.rageclick)),je(l.session_recording)&&je(u.session_recording)&&(c.session_recording=$e({},l.session_recording,u.session_recording)),this.set_config(c),this.config.on_xhr_error&&B.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:It.GZipJS;var d=this.An();if(this.persistence=new Qu(this.config,d),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Qu(F({},this.config,{persistence:"sessionStorage"}),d,!1),this.xn="ph_"+(this.config.persistence_name||this.config.token)+"_session_registered_properties",this.config.persistence!=="memory"&&!d&&Ye.N()){var f=Ye.H(this.xn);te(f)&&f.forEach((x=>{ve(x)&&this.kn.add(x)}))}else Ye.q(this.xn);var p=F({},this.persistence.props),h=F({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Fn=new LL((x=>this.Ln(x)),this.config.request_queue_config),this.On=new FL(this),this.__request_queue=[];var g=this._n();if(g||(this.sessionManager=new Tm(this),this.sessionPropsManager=new wm(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId(((x,R,C)=>{(C!=null&&C.activityTimeout||C!=null&&C.sessionPastMaximumLength||C!=null&&C.crossTabAdoption)&&this.Dn()}))),this.$n(),this.config.__preview_deferred_init_extensions?(B.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.Nn(g)}),0)):(B.info("Initializing extensions synchronously"),this.Nn(g)),Re.DEBUG=Re.DEBUG||this.config.debug,Re.DEBUG&&B.info("Starting in debug mode",{this:this,config:n,thisC:F({},this.config),p,s:h}),!this.config.identity_distinct_id||(s=n.bootstrap)!=null&&s.distinctID||(n.bootstrap=F({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((i=n.bootstrap)==null?void 0:i.distinctID)!==void 0){var _=n.bootstrap.distinctID,m=this.get_distinct_id(),y=this.persistence.get_property(Ft);if(n.bootstrap.isIdentifiedID&&m!=null&&m!==_&&y===lr)this.identify(_);else if(n.bootstrap.isIdentifiedID&&m!=null&&m!==_&&y===$n)B.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 E=this.config.get_device_id(wn()),T=n.bootstrap.isIdentifiedID?E:_;this.persistence.set_property(Ft,n.bootstrap.isIdentifiedID?$n:lr),this.register({distinct_id:_,$device_id:T})}}if(g)this.register_once({distinct_id:Zo,$device_id:null},"");else if(!this.get_distinct_id()){var I=this.config.get_device_id(wn());this.register_once({distinct_id:I,$device_id:I},""),this.persistence.set_property(Ft,lr)}return Ve(D,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(x,R){var C=x.config.segment;if(!C)return R();(function(S,w){var A=S.config.segment;if(!A)return w();var P=N=>{var V=()=>N.anonymousId()||wn();S.config.get_device_id=V,N.id()&&(S.register({distinct_id:N.id(),$device_id:V()}),S.persistence.set_property(Ft,$n)),w()},O=A.user();"then"in O&&Tt(O.then)?O.then(P):P(O)})(x,(()=>{C.register((S=>{typeof Promise<"u"&&Promise.resolve||Xu.warn("This browser does not have Promise support, and can not use the segment integration");var w=(A,P)=>{if(!P)return A;A.event.userId||A.event.anonymousId===S.get_distinct_id()||(Xu.info("No userId set, resetting PostHog"),S.reset()),A.event.userId&&A.event.userId!==S.get_distinct_id()&&(Xu.info("UserId set, identifying with PostHog"),S.identify(A.event.userId)
26);var O=S.calculateEventProperties(P,A.event.properties);return A.event.properties=Object.assign({},O,A.event.properties),A};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:A=>w(A,A.event.event),page:A=>w(A,cs),identify:A=>w(A,Ku),screen:A=>w(A,"$screen")}})(x)).then((()=>{R()}))}))})(this,(()=>this.qn())):this.qn(),Tt(this.config._onCapture)&&this.config._onCapture!==Nl&&(B.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(x=>this.config._onCapture(x.event,x)))),this.config.ip&&B.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.config.disableDeviceModel||(function(){return uE.apply(this,arguments)})().then((x=>{x&&this.register({[Wu]:x})})).catch(Nl),this}$n(){var e,n,r,s,i,o,a=(e=(n=this.config.__extensionClasses)==null?void 0:n.featureFlags)!==null&&e!==void 0?e:(r=jt.__defaultExtensionClasses)==null?void 0:r.featureFlags;a&&(this.featureFlags&&this.featureFlags instanceof a||((s=this.jn)==null||s.call(this),this.jn=void 0,this.featureFlags=new a(this)),Tt(this.featureFlags.onReloading)&&Tt(this.featureFlags.setup)?this.jn||(this.jn=this.featureFlags.onReloading((()=>{this.pn.emit("featureFlagsReloading",!0)})),this.Bn().add(this.featureFlags)):(i=(o=this.featureFlags).initialize)==null||i.call(o))}Nn(e){var n,r,s,i,o,a,l,u=performance.now(),c=F({},jt.__defaultExtensionClasses,this.config.__extensionClasses),d=[];c.exceptions&&this.hn.push(this.exceptions=(n=this.exceptions)!==null&&n!==void 0?n:new c.exceptions(this)),c.historyAutocapture&&this.hn.push(this.historyAutocapture=new c.historyAutocapture(this)),c.tracingHeaders&&this.hn.push(this.tracingHeaders=new c.tracingHeaders(this)),c.siteApps&&this.hn.push(this.siteApps=new c.siteApps(this)),c.sessionRecording&&!e&&this.hn.push(this.sessionRecording=new c.sessionRecording(this)),this.config.disable_scroll_properties||d.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),c.autocapture&&this.hn.push(this.autocapture=new c.autocapture(this)),c.surveys&&this.hn.push(this.surveys=(r=this.surveys)!==null&&r!==void 0?r:new c.surveys(this)),c.logs&&this.hn.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new c.logs(this)),c.metrics&&this.hn.push(this.metrics=(i=this.metrics)!==null&&i!==void 0?i:new c.metrics(this)),c.conversations&&this.hn.push(this.conversations=(o=this.conversations)!==null&&o!==void 0?o:new c.conversations(this)),c.productTours&&this.hn.push(this.productTours=new c.productTours(this)),c.heatmaps&&this.hn.push(this.heatmaps=new c.heatmaps(this)),c.webVitalsAutocapture&&this.hn.push(this.webVitalsAutocapture=new c.webVitalsAutocapture(this)),c.exceptionObserver&&this.hn.push(this.exceptionObserver=new c.exceptionObserver(this)),c.deadClicksAutocapture&&this.hn.push(this.deadClicksAutocapture=new c.deadClicksAutocapture(this,mL)),c.toolbar&&this.hn.push(this.toolbar=(a=this.toolbar)!==null&&a!==void 0?a:new c.toolbar(this)),c.experiments&&this.hn.push(this.experiments=(l=this.experiments)!==null&&l!==void 0?l:new c.experiments(this)),this.hn.forEach((f=>{f.initialize&&d.push((()=>{f.initialize==null||f.initialize()}))})),d.push((()=>{if(this.Hn){var f=this.Hn;this.Hn=void 0,this.hn.forEach((p=>p.onRemoteConfig==null?void 0:p.onRemoteConfig(f)))}})),this.Un(d,u)}Un(e,n){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&e.length>0)return void setTimeout((()=>{this.Un(e,n)}),0);var r=e.shift();if(r)try{r()}catch(i){B.error("Error initializing extension:",i)}}var s=Math.round(performance.now()-n);this.register_for_session({[wS]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[xS]:s}),this.config.__preview_deferred_init_extensions&&B.info("PostHog extensions initialized ("+s+"ms)")}Zi(e){var n;if(!H||!H.body)return B.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Zi(e)}),500);if(this.config.__preview_deferred_init_extensions&&(this.Hn=e),this.fn=e,this.compression=void 0,e.ok){var r,s=e.config;s.supportedCompression&&!this.config.disable_compression&&(this.compression=Q(s.supportedCompression,It.GZipJS)?It.GZipJS:Q(s.supportedCompression,It.Base64)?It.Base64:void 0),(r=s.analytics)!=null&&r.endpoint&&(this.analyticsDefaultEndpoint=s.analytics.endpoint)}this.set_config({person_profiles:this.Tn?this.Tn:zd}),(n=this.zn)==null||n.handleRemoteConfig(e),this.hn.forEach((i=>i.onRemoteConfig==null?void 0:i.onRemoteConfig(e)))}qn(){try{this.config.loaded(this)}catch(r){B.critical("`loaded` function failed",r)}if(this.Wn(),this.config.internal_or_test_user_hostname&&He!=null&&He.hostname){var e=He.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?e===n:n.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this._n())&&this.Vn()}),1),this.Zn=new JS(this),this.Zn.load()}Wn(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Fn)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Qo(this.__request_queue,(e=>this.Ln(e))),this.__request_queue=[],this.Wn()}_handle_unload(){var e,n,r,s,i;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),(n=this.metrics)==null||n.flush("sendBeacon"),this.config.request_batching?(this.Gn()&&this.capture(Gu),(r=this.logs)==null||r.flushLogs("sendBeacon"),(s=this.Fn)==null||s.unload(),(i=this.On)==null||i.unload()):this.Gn()&&this.capture(Gu,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?mE?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=F({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,(U(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,
26(n=>{var r,s,i,o=F({},n);o.timeout=o.timeout||6e4;var a,l,u,c,d,f=(r=o.transport)!==null&&r!==void 0?r:"fetch";f==="sendBeacon"&&U(o.compression)&&o.data&&(o.compression=It.Base64),o.method==="POST"&&o.data&&(o.timestampMode==="capture-body"?o.data={api_key:(l=(d=(c=te(a=o.data)?a:[a])[0])==null||(u=d.properties)==null?void 0:u.token)!==null&&l!==void 0?l:d==null?void 0:d.token,batch:c,sent_at:new Date().toISOString()}:o.timestampMode==="body"&&(o.data=(function(_,m){return m===void 0&&(m=new Date().toISOString()),te(_)?_.map((y=>F({},y,{sent_at:m}))):F({},_,{sent_at:m})})(o.data))),o.url=Em(o.url,o.method,o.compression,o.timestampMode);var p=Ua.filter((_=>!o.disableTransport||!_.transport||!o.disableTransport.includes(_.transport))),h=(s=(i=(function(_,m){for(var y=0;_.length>y;y++)if(_[y].transport===f)return _[y]})(p))==null?void 0:i.method)!==null&&s!==void 0?s:p[0].method;if(!h)throw new Error("No available transport method");var g=_=>{try{h(_)}catch(m){oE(m)?B.warn(m):B.error(m),o.callback==null||o.callback({statusCode:0,error:m})}};f!=="sendBeacon"&&o.data&&o.compression===It.GZipJS&&QD&&typeof Promise<"u"&&!ja?DL(o).then((_=>{g(_)})).catch((_=>{if(Hg(_))return ja=!0,void g(F({},o,{compression:void 0,url:Em(n.url,n.method,void 0,n.timestampMode)}));(m=>{if(!m||typeof m!="object")return!1;var y="name"in m?String(m.name):"";return Hg(m)||y===M0})(_)&&(ja=!0),g(o)})):h(o)})(F({},e,{callback:n=>{var r,s;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(r=(s=this.config).on_request_error)==null||r.call(s,n),e.callback==null||e.callback(n)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}Ln(e){this.On?this.On.retriableRequest(e):this._send_request(e)}_execute_array(e){oc++;try{var n,r=[],s=[],i=[];Qo(e,(a=>{if(a)if(te(n=a[0]))i.push(a);else if(Tt(a))try{a.call(this)}catch(l){B.error("Error executing queued PostHog call",a,l)}else te(a)&&n==="alias"?r.push(a):te(a)&&n.indexOf("capture")!==-1&&Tt(this[n])?i.push(a):s.push(a)}));var o=function(a,l){Qo(a,(function(u){try{if(te(u[0])){var c=l;Ae(u,(function(d){c=c[d[0]].apply(c,d.slice(1))}))}else l[u[0]].apply(l,u.slice(1))}catch(d){B.error("Error executing queued PostHog call",u,d)}}))};o(r,this),o(s,this),o(i,this)}finally{oc--}}push(e){if(oc>0&&te(e)&&ve(e[0])){var n=jt.prototype[e[0]];Tt(n)&&n.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,n,r){var s,i,o,a,l;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Fn){if(this.is_capturing())if(!U(e)&&ve(e)){var u=!this.config.opt_out_useragent_filter&&this._is_bot();if(!u||this.config.__preview_capture_bot_pageviews){var c=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(c==null||!c.isRateLimited){n!=null&&n.$current_url&&!ve(n==null?void 0:n.$current_url)&&(B.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),e!=="$exception"||r!=null&&r.Qn||B.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 d=new Date,f=(r==null?void 0:r.timestamp)||d,p=Gg(r==null?void 0:r.uuid,wn),h={uuid:p,event:e,properties:this.calculateEventProperties(e,n||{},f,p)};e===cs&&this.config.__preview_capture_bot_pageviews&&u&&(h.event="$bot_pageview",h.properties.$browser_type="bot"),c&&(h.properties.$lib_rate_limit_remaining_tokens=c.remainingTokens);var g=e==="$feature_flag_called"&&h.properties.$feature_flag_has_experiment===!1&&this.get_property(El)===!0;r!=null&&r.$set&&!g&&(h.$set=r==null?void 0:r.$set);var _=r==null?void 0:r.$unset;_&&(h.$unset=_);var m,y,E,T=g?void 0:this.Kn(r==null?void 0:r.$set_once,e!==Qg,e===Ku);if(T&&(h.$set_once=T),r!=null&&r._noTruncate||(i=this.config.properties_string_max_length,o=h,a=P=>ve(P)?P.slice(0,i):P,l=new Set,h=(function P(O,N){if(O!==Object(O))return a?a(O):O;if(!l.has(O)){var V;if(l.add(O),te(O))V=[],Qo(O,(W=>{V.push(P(W))}));else{var L={};Ae(O,((W,q)=>{l.has(W)||(L[q]=P(W))})),V=L}return V}})(o)),h.timestamp=f,U(r==null?void 0:r.timestamp)||(h.properties.$event_time_override_provided=!0,h.properties.$event_time_override_system_time=d),g&&(h.properties=(function(P,O){O===void 0&&(O=[]);var N={},V=L=>{P[L]!==void 0&&(N[L]=P[L])};
26return eN.forEach(V),O.forEach(V),N})(h.properties,XL)),e===On.DISMISSED||e===On.SENT){var I=n==null?void 0:n[tc.SURVEY_ID],x=n==null?void 0:n[tc.SURVEY_ITERATION];pE({id:I,current_iteration:x}),h.$set=F({},h.$set,{[(m={id:I,current_iteration:x},y=e===On.SENT?"responded":"dismissed",E="$survey_"+y+"/"+m.id,m.current_iteration&&m.current_iteration>0&&(E="$survey_"+y+"/"+m.id+"/"+m.current_iteration),E)]:!0})}else e===On.SHOWN&&(h.$set=F({},h.$set,{[tc.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===TL.SHOWN){var R=n==null?void 0:n[mm.TOUR_TYPE];R&&(h.$set=F({},h.$set,{[mm.TOUR_LAST_SEEN_DATE+"/"+R]:new Date().toISOString()}))}var C=F({},h.properties.$set,h.$set);if(Cn(C)||this.setPersonPropertiesForFlags(C),!se(this.config.before_send)){var S=this.Pt(h);if(!S)return;(h=S).uuid=Gg(h.uuid,wn)}this.pn.emit("eventCaptured",h);var w=(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),A={method:"POST",url:w,data:h,compression:"best-available",timestampMode:(r==null?void 0:r._batchKey)==="recordings"||/\/s\/(?:\?|$)/.test(w)?"body":"capture-body",batchKey:r==null?void 0:r._batchKey,transport:r==null?void 0:r.transport};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Ln(A):this.Fn.enqueue(A),h}B.critical("This capture call is ignored due to client rate limiting.")}}else B.error("No event name provided to posthog.capture")}else B.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(n=>e(n.event,n)))}Bn(){var e;return(e=this.zn)!==null&&e!==void 0?e:this.zn=new JL(this)}mn(e){this.Sn.push(e);var n=!0;return()=>{if(n){n=!1;var r=this.Sn.indexOf(e);r!==-1&&this.Sn.splice(r,1)}}}calculateEventProperties(e,n,r,s,i){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var o=i?void 0:this.persistence.remove_event_timer(e),a=F({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,this._n()&&(a[ES]=!0),e==="$snapshot"){var l=F({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!ve(a.distinct_id)&&!et(a.distinct_id)||xd(a.distinct_id))&&B.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var u,c=(function(I,x,R,C){var S,w,A,P;if(C===void 0&&(C=!1),!At)return{};var O,N=I?[...js,...x||[]]:[],V=(function(Xe){for(var Y=0;qg.length>Y;Y++){var Ze=qg[Y],rt=Ze[1],lt=Ze[0].exec(Xe),he=lt&&(Tt(rt)?rt(lt,Xe):rt);if(he)return he}return["",""]})(At),L=V[0],W=V[1],q=(O=typeof navigator<"u"?navigator:void 0)!=null&&O.brave?{brave:!0}:{},ie={};U(R)||(ie.detectGoogleSearchApp=R);var ce={},Z=(S=navigator)==null||(S=S.userAgentData)==null?void 0:S.platform,Ee=(w=navigator)==null?void 0:w.maxTouchPoints,de=D==null||(A=D.screen)==null?void 0:A.width,_e=D==null||(P=D.screen)==null?void 0:P.height,Ie=D==null?void 0:D.devicePixelRatio;U(Z)||(ce.userAgentDataPlatform=Z),U(Ee)||(ce.maxTouchPoints=Ee),U(de)||(ce.screenWidth=de),U(_e)||(ce.screenHeight=_e),U(Ie)||(ce.devicePixelRatio=Ie);var ae,We,Se,ct,wt,Xt,Ge,it,mt=$e(Eh({$os:L,$os_version:W,$browser:aS(At,navigator.vendor,q,ie),$device:Wg(At),$device_type:(We=At,Se=ce,it=Wg(We),it===V0||it===H0||it==="Kobo"||it==="Kindle Fire"||it===nS?Ns:it===io||it===ws||it===oo||it===Id?"Console":it===q0?"Wearable":it?Ht:(Se==null?void 0:Se.userAgentDataPlatform)==="Android"&&((ct=Se==null?void 0:Se.maxTouchPoints)!==null&&ct!==void 0?ct:0)>0?600>Math.min((wt=Se==null?void 0:Se.screenWidth)!==null&&wt!==void 0?wt:0,(Xt=Se==null?void 0:Se.screenHeight)!==null&&Xt!==void 0?Xt:0)/((Ge=Se==null?void 0:Se.devicePixelRatio)!==null&&Ge!==void 0?Ge:1)?Ht:Ns:"Desktop"),$timezone:YS(),$timezone_offset:EL()}),{$current_url:uo(C?er(He==null?void 0:He.href):He==null?void 0:He.href,N,co),$host:He==null?void 0:He.host,$pathname:He==null?void 0:He.pathname,$raw_user_agent:At.length>1e3?At.substring(0,997)+"...":At,$browser_version:yN(At,navigator.vendor,q,ie),$browser_language:gm(),$browser_language_prefix:(ae=gm(),typeof ae=="string"?ae.split("-")[0]:void 0),$screen_height:D==null?void 0:D.screen.height,$screen_width:D==null?void 0:D.screen.width,$viewport_height:D==null?void 0:D.innerHeight,$viewport_width:D==null?void 0:D.innerWidth,$lib:Re.LIB_NAME,$lib_version:Re.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return Re.SDK_DIST_CHANNEL&&(mt.$sdk_dist_channel=Re.SDK_DIST_CHANNEL),mt})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes
26);if(this.sessionManager){var d=this.sessionManager.checkAndGetSessionAndWindowId(i,r.getTime()),f=d.windowId;a.$session_id=d.sessionId,a.$window_id=f}this.sessionPropsManager&&$e(a,this.sessionPropsManager.getSessionProps());try{var p;this.sessionRecording&&$e(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(p=this.On)==null?void 0:p.length}catch(I){a.$sdk_debug_error_capturing_properties=String(I)}if(this.requestRouter.region===ef&&(a.$lib_custom_api_host=this.config.api_host),u=e!==cs||i?e!==Gu||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),a=$e(a,u),e===cs&&H&&(a.title=H.title),!U(o)){var h=r.getTime()-o;a.$duration=parseFloat((h/1e3).toFixed(3))}At&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser");var g=this.persistence.properties(),_=this.sessionPersistence.properties();Ae(["$referrer","$referring_domain"],(I=>{I in g&&delete _[I]}));var m={};if(this.Sn.length>0)for(var y of this.Sn.slice())try{$e(m,y())}catch(I){B.error("Failed to produce browser extension event properties",I)}(a=$e({},c,g,_,F({},m,a))).$is_identified=this._isIdentified(),te(this.config.property_denylist)?Ae(this.config.property_denylist,(function(I){delete a[I]})):B.error(gE+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var E=this.config.sanitize_properties;E&&(B.error(Cm),a=E(a,e));var T=this.Jn();return a.$process_person_profile=T,T&&!i&&this.Yn("_calculate_event_properties"),a}Kn(e,n,r){var s;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.Jn()||this.wn&&!r)return e;var i=this.persistence.get_initial_props(),o=(s=this.sessionPropsManager)==null?void 0:s.getSetOnceProps(),a=$e({},i,o||{},e||{}),l=this.config.sanitize_properties;return l&&(B.error(Cm),a=l(a,"$set_once")),n&&(this.wn=!0),Cn(a)?void 0:a}register(e,n){var r;(r=this.persistence)==null||r.register(e,n)}register_once(e,n,r){var s;(s=this.persistence)==null||s.register_once(e,n,r)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e),Object.keys(e).forEach((r=>this.kn.add(r))),this.Xn()}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e),this.kn.delete(e),this.Xn()}ts(e,n){this.register({[e]:n})}Dn(){this.kn.forEach((e=>{var n;(n=this.sessionPersistence)==null||n.unregister(e)})),this.kn.clear(),this.Xn()}Xn(){var e;if(this.xn)if(this.config.persistence==="memory"||(e=this.sessionPersistence)!=null&&e.xi||!Ye.N())Ye.q(this.xn);else{var n=[];this.kn.forEach((r=>n.push(r))),n.length>0?Ye.F(this.xn,n):Ye.q(this.xn)}}getFeatureFlag(e,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(e)}getFeatureFlagResult(e,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagResult(e,n)}getAllFeatureFlags(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.getAllFeatureFlags())!==null&&e!==void 0?e:[]}isFeatureEnabled(e,n){var r,s;return(r=(s=this.featureFlags)==null?void 0:s.isFeatureEnabled(e,n))!==null&&r!==void 0?r:n==null?void 0:n.defaultValue}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,n,r){var s;(s=this.featureFlags)==null||s.updateFlags(e,n,r)}updateEarlyAccessFeatureEnrollment(e,n,r){var s;(s=this.featureFlags)==null||s.updateEarlyAccessFeatureEnrollment(e,n,r)}getEarlyAccessFeatures(e,n,r){var s;return n===void 0&&(n=!1),(s=this.featureFlags)==null?void 0:s.getEarlyAccessFeatures(e,n,r)}on(e,n){return this.pn.on(e,n)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:hi}),()=>{})}onSessionId(e){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(e,n):e([],{isLoaded:!1,error:hi})}
26getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:hi})}renderSurvey(e,n){var r;(r=this.surveys)==null||r.renderSurvey(e,n)}displaySurvey(e,n){var r;n===void 0&&(n=zL),(r=this.surveys)==null||r.displaySurvey(e,n)}cancelPendingSurvey(e){var n;(n=this.surveys)==null||n.cancelPendingSurvey(e)}canRenderSurvey(e){var n,r;return(n=(r=this.surveys)==null?void 0:r.canRenderSurvey(e))!==null&&n!==void 0?n:{visible:!1,disabledReason:hi}}canRenderSurveyAsync(e,n){var r,s;return n===void 0&&(n=!1),(r=(s=this.surveys)==null?void 0:s.canRenderSurveyAsync(e,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:hi})}es(e){return!e||xd(e)?(B.critical("Unique user id has not been set in posthog.identify"),!1):e===Zo?(B.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(B.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,n,r){if(!this.__loaded||!this.persistence)return B.uninitializedWarning("posthog.identify");if(et(e)&&(e=e.toString(),B.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.es(e)&&this.Yn("posthog.identify")){var s=this.get_distinct_id();this.register({$user_id:e}),this.get_property(ao)||this.register_once({$had_persisted_distinct_id:!0,$device_id:s},""),e!==s&&e!==this.get_property(Ii)&&(this.unregister(Ii),this.register({distinct_id:e}));var i,o=(this.persistence.get_property(Ft)||lr)===lr,a=e!==s,l=!a&&o;if(a&&o)this.persistence.set_property(Ft,$n),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(Ku,{distinct_id:e,$anon_distinct_id:s},{$set:n||{},$set_once:r||{}}),this.En=ic(e,n,r),(i=this.featureFlags)==null||i.setAnonymousDistinctId(s);else if(l){this.persistence.set_property(Ft,$n);var u=n||{},c=r||{};this.setPersonPropertiesForFlags({$set:u,$set_once:c},!1),this.capture("$set",{$set:u,$set_once:c}),this.En=ic(e,n,r)}else(n||r)&&this.setPersonProperties(n,r);a?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(Er)):l&&(n||r)&&this.reloadFeatureFlags()}}setPersonProperties(e,n){if((e||n)&&this.Yn("posthog.setPersonProperties")){var r=ic(this.get_distinct_id(),e,n);this.En!==r?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.En=r):B.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var n,r=(te(e)?e:[e]).filter((s=>ve(s)&&s.length>0));r.length!==0&&this.Yn("posthog.unsetPersonProperties")&&((n=this.featureFlags)==null||n.unsetPersonPropertiesForFlags(r,!0),this.capture("$set",{$unset:r}),this.En=null)}group(e,n,r){if(e&&n){var s=this.getGroups(),i=s[e]!==n;if(i&&this.resetGroupPropertiesForFlags(e),this.register({$groups:F({},s,{[e]:n})}),i||r){var o={$group_type:e,$group_key:n};r&&(o.$group_set=r),this.capture(Qg,o)}r&&this.setGroupPropertiesForFlags({[e]:r}),i&&!r&&this.reloadFeatureFlags()}else B.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(e){var n;e===void 0&&(e=!0),(n=this.featureFlags)==null||n.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),this.Yn("posthog.setGroupPropertiesForFlags")&&((r=this.featureFlags)==null||r.setGroupPropertiesForFlags(e,n))}resetGroupPropertiesForFlags(e){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(e)}reset(e){var n=Ut(e)?e:e==null?void 0:e.resetDeviceID,r=Ut(e)||e==null?void 0:e.bootstrap;this.rs(n,!1,r)}rs(e,n,r){var s,i,o,a,l,u,c,d,f,p,h,g;if(n===void 0&&(n=!1),B.info("reset"),!this.__loaded)return B.uninitializedWarning("posthog.reset");var _=r==null?void 0:r.sessionID;this.config.bootstrap=r||((s=this.Pn)==null?void 0:s.bootstrap)||{},(i=this.featureFlags)==null||i.updateConfig==null||i.updateConfig(this.config,this.Qi());var m,y,E,T,I=this.get_property(ao),x=this.get_property(Wu),R=this.get_property(kr),C=this.is_capturing();if(this.consent.reset(),n||!C||this.is_capturing()||console.warn("[PostHog.js]","reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after."),(o=this.persistence)==null||o.clear(),(a=this.sessionPersistence)==null||a.clear(),this.kn.clear(),this.Xn(),U(R)||(m=this.persistence)==null||m.register({[kr]:R}),(l=this.surveys)==null||l.reset(),(u=this.Zn)==null||u.stop(),(c=this.featureFlags)==null||c.reset(),(d=this.conversations)==null||d.reset(),(f=this.logs)==null||f.reset(),(p=this.metrics)==null||p.reset(),(h=this.persistence)==null||h.set_property(Ft,lr),(g=this.sessionManager)==null||g.resetSessionId(),this.En=null,this.config.cookieless_mode===Tn)this.register_once({distinct_id:Zo,$device_id:null},"");else{var S=this.config.get_device_id(wn());this.register_once({distinct_id:S,$device_id:e?S:I},""),e||U(x)||this.register({[Wu]:x})}if(this.register({$last_posthog_reset:new Date().toISOString()},1),r&&(r.distinctID===void 0||this._n()||((T=this.persistence)==null||T.set_property(Ft,r.isIdentifiedID?$n:lr),this.register({distinct_id:r.distinctID})),(y=this.featureFlags)==null||y.initialize(),!(U(_)||(E=this.sessionManager)!=null&&E.setBootstrapSessionId(_,!0))
26)){var w=F({},r);delete w.sessionID,this.config.bootstrap=w}delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}shutdown(e){var n=this;return Pe((function*(){var r,s,i,o,a,l,u;if(n.__loaded){(r=n.Zn)==null||r.stop(),(s=n.zn)==null||s.dispose(),(i=n.sessionRecording)==null||i.dispose(),(o=n.logs)==null||o.flushLogs("sendBeacon"),(a=n.metrics)==null||a.flush("sendBeacon"),(l=n.Fn)==null||l.unload(),(u=n.On)==null||u.unload();try{var c;(c=n.featureFlags)==null||c.destroy()}catch(d){B.error("Error while destroying feature flags",d)}}else B.uninitializedWarning("posthog.shutdown")}))()}setIdentity(e,n){var r;this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(r=this.conversations)==null||r.ns()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.ss()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var n=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=n.sessionStartTimestamp,s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n.sessionId);if(e!=null&&e.withTimestamp&&r){var i,o=(i=e.timestampLookBack)!==null&&i!==void 0?i:10;if(!r)return s;s+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-o,0)}return s}alias(e,n){return e===this.get_property(mS)?(B.critical("Attempting to create alias for existing People user - aborting."),-2):this.Yn("posthog.alias")?(U(n)&&(n=this.get_distinct_id()),e!==n?(this.ts(Ii,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(B.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=F({},this.config);if(je(e)){var r,s,i,o,a,l,u,c,d,f,p,h;$e(this.config,Rm(e));var g=this.An();(r=this.persistence)==null||r.update_config(this.config,n,g),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Qu(F({},this.config,{persistence:"sessionStorage"}),g,!1);var _=this.In(this.config.debug);Ut(_)&&(this.config.debug=_),Ut(this.config.debug)&&(this.config.debug?(Re.DEBUG=!0,Ne.N()&&Ne.F("ph_debug",!0),B.info("set_config",{config:e,oldConfig:n,newConfig:F({},this.config)})):(Re.DEBUG=!1,Ne.N()&&Ne.q("ph_debug"))),(s=this.featureFlags)==null||s.updateConfig==null||s.updateConfig(this.config,this.Qi()),(i=this.exceptionObserver)==null||i.onConfigChange(),(o=this.exceptions)==null||o.onConfigChange(),(a=this.sessionRecording)==null||a.startIfEnabledOrStop(),(l=this.tracingHeaders)==null||l.startIfEnabledOrStop(),(u=this.autocapture)==null||u.startIfEnabled(),(c=this.heatmaps)==null||c.startIfEnabled(),(d=this.exceptionObserver)==null||d.startIfEnabledOrStop(),(f=this.deadClicksAutocapture)==null||f.startIfEnabledOrStop(),(p=this.surveys)==null||p.loadIfEnabled(),this.os(),(h=this.externalIntegrations)==null||h.startIfEnabledOrStop()}}_overrideSDKInfo(e,n){Re.LIB_NAME=e,Re.LIB_VERSION=n}startSessionRecording(e){var n,r,s,i,o,a=e===!0,l={sampling:a||!(e==null||!e.sampling),linked_flag:a||!(e==null||!e.linked_flag),url_trigger:a||!(e==null||!e.url_trigger),event_trigger:a||!(e==null||!e.event_trigger)};Object.values(l).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),l.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),l.linked_flag&&((s=this.sessionRecording)==null||s.overrideLinkedFlag()),l.url_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("url")),l.event_trigger&&((o=this.sessionRecording)==null||o.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){if(this.exceptions){var r=new Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(F({},s,n))}}addExceptionStep(e,n){var r;(r=this.exceptions)==null||r.addExceptionStep(e,n)}captureLog(e){var n;(n=this.logs)==null||n.captureLog(e)}get logger(){var e,n;return(e=(n=this.logs)==null?void 0:n.logger)!==null&&e!==void 0?e:jt.ls}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var n,r;return(n=(r=this.toolbar)==null?void 0:r.loadToolbar(e))!==null&&n!==void 0&&n}get_property(e){var n;return(n=this.persistence)==null?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)==null?void 0:n.props[e]}toString(){var e,n=(e=this.config.name)!==null&&e!==void 0?e:ds;return n!==ds&&(n=ds+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(Ft))===$n||((n=this.sessionPersistence)==null?void 0:n.get_property(Ft))===$n}Jn(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===zd&&!this._isIdentified()&&Cn(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[Ii])&&((n=this.persistence)==null||(n=n.props)==null||!n[Tl]))}Gn(){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.Jn()||this.Yn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Yn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Yn(e){return this.config.person_profiles==="never"?(B.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.ts(Tl,!0),!0)}An(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==yr)}os(){var e,n,r,s,i=this.An();return((e=this.persistence)==null?void 0:e.xi)!==i&&((r=this.persistence)==null||r.set_disabled(i)),((n=this.sessionPersistence)==null?void 0:n.xi)!==i&&((s=this.sessionPersistence)==null||s.set_disabled(i)),i&&(this.kn.clear(),this.Xn()),i}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==Tn){if(this._n()){var r,s,i,o,a;this.rs(!0,!0),(r=this.sessionManager)==null||r.destroy(),(s=this.pageViewM
26anager)==null||s.destroy(),this.sessionManager=new Tm(this),this.pageViewManager=new pm(this),this.persistence&&(this.sessionPropsManager=new wm(this,this.sessionManager,this.persistence));var l,u=(i=(o=this.config.__extensionClasses)==null?void 0:o.sessionRecording)!==null&&i!==void 0?i:(a=jt.__defaultExtensionClasses)==null?void 0:a.sessionRecording;u&&(this.sessionRecording=this.bn(this.sessionRecording,new u(this)),this.fn&&((l=this.sessionRecording)==null||l.onRemoteConfig==null||l.onRemoteConfig(this.fn)))}var c,d;this.consent.optInOut(!0),this.os(),this.Wn(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==yr&&((c=this.surveys)==null||c.loadIfEnabled()),(U(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((d=e==null?void 0:e.captureEventName)!==null&&d!==void 0?d:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vn()}else B.warn(km)}opt_out_capturing(){var e,n,r;this.config.cookieless_mode!==Tn?(this.config.cookieless_mode===yr&&this.consent.isOptedIn()&&this.rs(!0,!0),this.consent.optInOut(!1),this.os(),this.config.cookieless_mode===yr&&(this.register({distinct_id:Zo,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Vn(),this.Wn())):B.warn(km)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===1?"granted":e===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===Tn||(this.config.cookieless_mode===yr?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.os()}_is_bot(){return kt?lE(kt,this.config.custom_blocked_useragents):void 0}Vn(){H&&(H.visibilityState==="visible"?this.Cn||(this.Cn=!0,this.capture(cs,{title:H.title},{send_instantly:!0}),this.Mn&&(H.removeEventListener(Il,this.Mn),this.Mn=null)):this.Mn||(this.Mn=this.Vn.bind(this),Ve(H,Il,this.Mn)))}debug(e){e===!1?(D==null||D.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(D==null||D.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}))}Qi(){var e=this.Pn||{};return"advanced_disable_flags"in e?!!e.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(B.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):(function(n,r,s,i,o){var a=r in n&&!se(n[r]),l=s in n&&!se(n[s]);return a?n[r]:!!l&&(o&&o.warn("Config field '"+s+"' is deprecated. Please use '"+r+"' instead. The old field will be removed in a future major version."),n[s])})(e,"advanced_disable_flags","advanced_disable_decide",0,B)}Pt(e){var n;if(se(this.config.before_send))return e;var r=Object.keys((n=e.properties)!==null&&n!==void 0?n:{}).filter(aN),s=te(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var o of s){if(i=o(i),se(i)){var a="Event '"+e.event+"' was rejected in beforeSend function";return oN(e.event)?B.warn(a+". This can cause unexpected behavior."):B.info(a),null}i.properties&&!Cn(i.properties)||B.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}for(var l of r)if(i.properties&&se(i.properties[l]))return B.warn("Event '"+e.event+"' had its '"+l+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return i}getPageViewId(){var e;return(e=this.pageViewManager.ui)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,r){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(r)})}In(e){var n=Ut(e)&&!e,r=Ne.N()&&Ne.P("ph_debug")==="true";return!n&&(!!r||e)}}jt.__defaultExtensionClasses={},jt.ls=(()=>{var t=()=>{};return{trace:t,debug:t,info:t,warn:t,error:t,fatal:t}})(),(function(t,e){for(var n=0;e.length>n;n++)t.prototype[e[n]]=YN(t.prototype[e[n]])})(jt,["identify"]);class Am{constructor(e){this.disabled=e===!1;var n=je(e)?e:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(e,n,r){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(n-s.y)<this.thresholdPx&&this.timeoutMs>r-s.timestamp){if(this.clicks.push({x:e,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:n,timestamp:r}];return!1}}var lc="$copy_autocapture",uc=Ue("[AutoCapture]");function cc(t,e){return e.length>t?e.slice(0,t)+"...":e}function eM(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!tr(e));return e}function tM(t,e){var n,r,s=e.e,i=e.maskAllElementAttributes,o=e.maskAllText,a=e.elementAttributeIgnoreList,l=e.elementsC
26hainAsString,u=e.disableCaptureUrlHashes;if(!tr(t))return{props:{}};for(var c=[t],d=new Set([t]),f=t;f.parentNode&&!Bt(f,"body")&&PS>c.length;)if(AS(f.parentNode)){var p=f.parentNode.host;if(d.has(p))break;d.add(p),c.push(p),f=p}else{if(!tr(f.parentNode)||d.has(f.parentNode))break;d.add(f.parentNode),c.push(f.parentNode),f=f.parentNode}var h,g,_=[],m={},y=!1,E=!1;if(Ae(c,(C=>{var S=Gd(C);if(Bt(C,"a")){var w=C.getAttribute("href");y=!!(S&&w&&Vi(w))&&(u?er(w):w)}Q(Cl(C),"ph-no-capture")&&(E=!0),_.push((function(P,O,N,V,L){L===void 0&&(L=!1);var W=P.tagName.toLowerCase(),q={tag_name:W};xh.indexOf(W)>-1&&!N&&(q.$el_text=W.toLowerCase()==="a"||W.toLowerCase()==="button"?cc(1024,dm(P)):cc(1024,lo(P)));var ie=Cl(P);ie.length>0&&(q.classes=ie.filter((function(de){return de!==""}))),Ae(P.attributes,(function(de){var _e;if((!FS(P)||["name","id","class","aria-label"].indexOf(de.name)!==-1)&&(V==null||!V.includes(de.name))&&!O&&Vi(de.value)&&(!ve(_e=de.name)||_e.substring(0,10)!=="_ngcontent"&&_e.substring(0,7)!=="_nghost")){var Ie=de.value;de.name==="class"&&(Ie=wh(Ie).join(" ")),q["attr__"+de.name]=cc(1024,de.name==="href"&&L?er(Ie):Ie)}}));for(var ce=1,Z=1,Ee=P;Ee=eM(Ee);)ce++,Ee.tagName===P.tagName&&Z++;return q.nth_child=ce,q.nth_of_type=Z,q})(C,i,o,a,u));var A=(function(P){if(!Gd(P))return{};var O={};return Ae(P.attributes,(function(N){if(N.name&&N.name.indexOf("data-ph-capture-attribute")===0){var V=N.name.replace("data-ph-capture-attribute-",""),L=N.value;V&&L&&Vi(L)&&(O[V]=L)}})),O})(C);$e(m,A)})),E)return{props:{},explicitNoCapture:E};if(o||(_[0].$el_text=Bt(t,"a")||Bt(t,"button")?dm(t):lo(t)),y){var T,I;_[0].attr__href=y;var x=(T=Fs(y))==null?void 0:T.host,R=D==null||(I=D.location)==null?void 0:I.host;x&&R&&x!==R&&(h=y)}return{props:$e({$event_type:s.type,$ce_version:1},l?{}:{$elements:_},{$elements_chain:(g=_,(function(C){return C.map((S=>{var w,A,P="";if(S.tag_name&&(P+=S.tag_name),S.attr_class)for(var O of(S.attr_class.sort(),S.attr_class))P+="."+O.replace(/"/g,"");var N=F({},S.text?{text:S.text}:{},{"nth-child":(w=S.nth_child)!==null&&w!==void 0?w:0,"nth-of-type":(A=S.nth_of_type)!==null&&A!==void 0?A:0},S.href?{href:S.href}:{},S.attr_id?{attr_id:S.attr_id}:{},S.attributes),V={};return $a(N).sort(((L,W)=>L[0].localeCompare(W[0]))).forEach((L=>{var W=L[1];return V[fm(L[0].toString())]=fm(W.toString())})),(P+=":")+$a(V).map((L=>L[0]+'="'+L[1]+'"')).join("")})).join(";")})((function(C){return C.map((S=>{var w,A,P={text:(w=S.$el_text)==null?void 0:w.slice(0,400),tag_name:S.tag_name,href:(A=S.attr__href)==null?void 0:A.slice(0,2048),attr_class:pL(S),attr_id:S.attr__id,nth_child:S.nth_child,nth_of_type:S.nth_of_type,attributes:{}};return $a(S).filter((O=>O[0].indexOf("attr__")===0)).forEach((O=>P.attributes[O[0]]=O[1])),P}))})(g)))},(n=_[0])!=null&&n.$el_text?{$el_text:(r=_[0])==null?void 0:r.$el_text}:{},h&&s.type==="click"?{$external_click_url:h}:{},m)}}var pi=Ue("[ExceptionAutocapture]"),Pm=()=>{},nM=Ue("[TracingHeaders]"),dr=Ue("[Web Vitals]"),Dm=9e5,Nm="disabled",Lm="lazy_loading",gi="awaiting_config",ia="missing_config";Ue("[SessionRecording]"),Ue("[SessionRecording]");var tf="[SessionRecording]",pn=Ue(tf),rM=Ue("[Heatmaps]");function dc(t){return je(t)&&"clientX"in t&&"clientY"in t&&et(t.clientX)&&et(t.clientY)}var oa=Ue("[Product Tours]"),fc=t=>{var e;return!t.config.disable_product_tours&&!((e=t.persistence)==null||!e.get_property(yh))},sM=["$set_once","$set"],rn=Ue("[SiteApps]"),Mm="Error while initializing PostHog app with config id ";function ns(t,e,n){if(se(t))return!1;switch(n){case"exact":return t===e;case"contains":var r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(t);case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}class iM{constructor(e){this.us=new kh,this.hs=(n,r)=>this.ds(n,r)&&this.vs(n,r)&&this.cs(n,r)&&this.fs(n,r),this.ds=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=e,this.ps=new Set,this.gs=new Set}init(){var e,n;U((e=this._instance)==null?void 0:e._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((r,s)=>{this.on(r,s)}))}register(e){var n,r;if(!U((n=this._instance)==null?void 0:n._addCaptureHook)&&(e.forEach((o=>{var a,l;(a=this.gs)==null||a.add(o),(l=o.steps)==null||l.forEach((u=>{var c;(c=this.ps)==null||c.add((u==null?void 0:u.event)||"")}))})),(r=this._instance)!=null&&r.autocapture)){var s,i=new Set;e.forEach((o=>{var a;(a=o.steps)==null||a.forEach((l=>{l!=null&&l.selector&&i.add(l==null?void 0:l.selector)}))}
26)),(s=this._instance)==null||s.autocapture.setElementSelectors(i)}}on(e,n){var r;n!=null&&e.length!=0&&(this.ps.has(e)||this.ps.has(n.event))&&this.gs&&((r=this.gs)==null?void 0:r.size)>0&&this.gs.forEach((s=>{this.ys(n,s)&&this.us.emit("actionCaptured",s.name)}))}bs(e){this.onAction("actionCaptured",(n=>e(n)))}ys(e,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.hs(e,r))return!0;return!1}onAction(e,n){return this.us.on(e,n)}vs(e,n){if(n!=null&&n.url){var r,s=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!s||typeof s!="string"||!ns(s,n.url,n.url_matching||"contains"))return!1}return!0}cs(e,n){return!!this._s(e,n)&&!!this.ws(e,n)&&!!this.ks(e,n)}_s(e,n){var r;if(n==null||!n.href)return!0;var s=this.xs(e);if(s.length>0)return s.some((a=>ns(a.href,n.href,n.href_matching||"exact")));var i,o=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!o&&ns((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",n.href,n.href_matching||"exact")}ws(e,n){var r;if(n==null||!n.text)return!0;var s=this.xs(e);if(s.length>0)return s.some((u=>ns(u.text,n.text,n.text_matching||"exact")||ns(u.$el_text,n.text,n.text_matching||"exact")));var i,o,a,l=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!l&&(i=(function(u){for(var c,d=[],f=/(?::|")text="(.*?)"/g;!se(c=f.exec(u));)d.includes(c[1])||d.push(c[1]);return d})(l),o=n.text,a=n.text_matching||"exact",i.some((u=>ns(u,o,a))))}ks(e,n){var r,s;if(n==null||!n.selector)return!0;var i=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(i!=null&&i.includes(n.selector))return!0;var o=(e==null||(s=e.properties)==null?void 0:s.$elements_chain)||"";if(n.selector_regex&&o)try{return new RegExp(n.selector_regex).test(o)}catch{return!1}return!1}xs(e){var n;return(e==null||(n=e.properties)==null?void 0:n.$elements)==null?[]:e==null?void 0:e.properties.$elements}fs(e,n){return n==null||!n.properties||n.properties.length===0||dE(n.properties.reduce(((r,s)=>{var i=te(s.value)?s.value.map(String):s.value!=null?[String(s.value)]:[];return r[s.key]={values:i,operator:s.operator||"exact"},r}),{}),e==null?void 0:e.properties)}}class oM{constructor(e){var n;this.Ss=[],this._instance=e,this.Cs=new Map,this.Ms=new Map,this.Ts=new Map,(n=this._instance)==null||n.onSessionId==null||n.onSessionId((r=>this.Es(r)))}Is(e){return!1}Ps(){return null}Rs(e){}As(){}Fs(e,n){return!!e&&dE(e.propertyFilters,n==null?void 0:n.properties)}Ls(e,n){var r=new Map;return e.forEach((s=>{var i;(i=s.conditions)==null||(i=i[n])==null||(i=i.values)==null||i.forEach((o=>{if(o!=null&&o.name){var a=r.get(o.name)||[];a.push(s.id),r.set(o.name,a)}}))})),r}Os(e,n,r){var s=(r===ci.Activation?this.Cs:this.Ms).get(e),i=[];return this.Ds((o=>{i=o.filter((a=>s==null?void 0:s.includes(a.id)))})),i.filter((o=>{var a,l=(a=o.conditions)==null||(a=a[r])==null||(a=a.values)==null?void 0:a.find((u=>u.name===e));return this.Fs(l,n)}))}register(e){var n;U((n=this._instance)==null?void 0:n._addCaptureHook)||(this.$s(e),this.Ns(e))}Ns(e){var n=e.filter((r=>{var s,i;return((s=r.conditions)==null?void 0:s.actions)&&((i=r.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0}));n.length!==0&&(this.qs==null&&(this.qs=new iM(this._instance),this.qs.init(),this.qs.bs((r=>{this.onAction(r)}))),n.forEach((r=>{var s,i,o,a,l;r.conditions&&(s=r.conditions)!=null&&s.actions&&(i=r.conditions)!=null&&(i=i.actions)!=null&&i.values&&((o=r.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.qs)==null||a.register(r.conditions.actions.values),(l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach((u=>{if(u&&u.name){var c=this.Ts.get(u.name);c&&c.push(r.id),this.Ts.set(u.name,c||[r.id])}})))})))}$s(e){var n,r=e.filter((i=>{var o,a;return((o=i.conditions)==null?void 0:o.events)&&((a=i.conditions)==null||(a=a.events)==null||(a=a.values)==null?void 0:a.length)>0})),s=e.filter((i=>{var o,a;return((o=i.conditions)==null?void 0:o.cancelEvents)&&((a=i.conditions)==null||(a=a.cancelEvents)==null||(a=a.values)==null?void 0:a.length)>0}));r.length===0&&s.length===0||((n=this._instance)==null||n._addCaptureHook(((i,o)=>{this.onEvent(i,o)})),this.Cs=this.Ls(e,ci.Activation),this.Ms=this.Ls(e,ci.Cancellation))}onEvent(e,n){var r,s,i=this.js(),o=(n==null||(r=n.properties)==null?void 0:r.$survey_id)||(n==null||(s=n.properties)==null?void 0:s.$product_tour_id);if(o&&this.getActivatedIds().includes(o)){var a=this.Bs(e,o);if(a==="consume")return i.info("event consumed activated item, remov
26ing it",{event:e,itemId:o}),void this.Hs([o]);if(a==="persist")return i.info("shown item promoted to persisted activation",{event:e,itemId:o}),this.Us(o),void this.zs([o])}if(this.Ms.has(e)){var l=this.Os(e,n,ci.Cancellation);l.length>0&&(i.info("cancel event matched, cancelling items",{event:e,itemsToCancel:l.map((c=>c.id))}),this.Hs(l.map((c=>c.id))),l.forEach((c=>this.Ws(c.id))))}if(this.Cs.has(e)){i.info("event name matched",{event:e,eventPayload:n,items:this.Cs.get(e)});var u=this.Os(e,n,ci.Activation);this.Vs(u.map((c=>c.id)))}}onAction(e){this.Ts.has(e)&&this.Vs(this.Ts.get(e)||[])}Vs(e){var n;if(e.length!==0){var r=!((n=this._instance)==null||n.get_session_id==null||!n.get_session_id()),s=[];for(var i of e)r&&this.Is(i)?this.Us(i)&&this.Zs(i):s.push(i);s.length>0&&(this.Ss=[...new Set([...this.Ss,...s])]),this.js().info("updating activated items",{activatedItems:this.getActivatedIds()})}}Us(e){this.Ss=this.Ss.filter((r=>r!==e));var n=this.Gs();return!n.includes(e)&&(this.Qs([...n,e]),this.Ks(),!0)}Hs(e){var n=new Set(e);this.Ss=this.Ss.filter((i=>!n.has(i)));var r=this.Js(),s=r.filter((i=>!n.has(i)));s.length!==r.length&&(this.Qs(s),s.length===0&&this.Ys()),this.zs(e)}Xs(){var e,n=this.Ps();if(!n)return{};var r=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n];return r&&typeof r=="object"?r:{}}Zs(e){if(this.Ps()){var n=this.Xs();this.Rs(F({},n,{[e]:Date.now()}))}}zs(e){if(this.Ps()){var n=this.Xs(),r={},s=!1;for(var i of Object.entries(n)){var o=i[0],a=i[1];e.includes(o)?s=!0:r[o]=a}s&&(Cn(r)?this.As():this.Rs(r))}}ta(){this.Ps()&&this.As()}getActivationTimestamp(e){if(this.Gs().includes(e)){var n=this.Xs()[e];return et(n)?n:void 0}}Js(){var e,n=this.ea();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n])||[]}Gs(){var e,n,r=this.Js();if(r.length===0)return[];var s=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[this.ia()],i=(n=this._instance)==null||n.get_session_id==null?void 0:n.get_session_id();return i&&s===i?r:[]}Ks(){var e,n=(e=this._instance)==null||e.get_session_id==null?void 0:e.get_session_id();n&&this.ra(n)}Ys(){this.na()}Es(e){var n,r=(n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[this.ia()];if(r&&r!==e){var s=this.Js(),i=this.Xs();s.length>0&&(this.Qs([]),s.filter((o=>et(i[o]))).forEach((o=>this.Ws(o)))),this.Ys(),this.ta()}}getActivatedIds(){return[...new Set([...this.Gs(),...this.Ss])].filter((e=>!this.sa(e)))}reset(){this.Ss=[],this.Js().length>0&&this.Qs([]),this.Ys(),this.ta()}getEventToItemsMap(){return this.Cs}aa(){return this.qs}}class aM extends oM{constructor(e){super(e)}ea(){return jd}ia(){return La}Ps(){return Ma}Rs(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[Ma]:e})}As(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(Ma)}Is(e){var n,r;this.Ds((i=>{r=i.find((o=>o.id===e))}));var s=(n=r)==null||(n=n.appearance)==null?void 0:n.surveyPopupDelaySeconds;return et(s)&&s>0}oa(){return On.SHOWN}Ds(e){var n;(n=this._instance)==null||n.getSurveys(e)}Ws(e){var n;(n=this._instance)==null||n.cancelPendingSurvey(e)}js(){return Te}Qs(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[jd]:e})}ra(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[La]:e})}na(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(La)}sa(){return!1}Bs(e,n){var r;this.Ds((i=>{r=i.find((o=>o.id===n))}));var s=!r||(function(i){var o;return fE(i)&&!((o=i.conditions)==null||(o=o.events)==null||!o.repeatedActivation)||i.schedule==="always"})(r);return s?e===On.SHOWN?"consume":"ignore":e===On.SHOWN?"persist":e===On.DISMISSED||e===On.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var aa="SDK is not enabled or survey functionality is not yet loaded",Fm="Disabled. Not loading surveys.",lM=D!=null&&D.location?Rl(D.location.hash,"__posthog")||Rl(location.hash,"state"):null,$m="_postHogToolbarParams",jm=Ue("[Toolbar]"),Um=Ue("[FeatureFlags]");class uM{constructor(e,n){n===void 0&&(n=!1),this.la=!1,this.update(e,n)}update(e,n){this.ua=((r,s)=>{var i,o,a,l;return{bootstrap:{featureFlags:(i=r.bootstrap)==null?void 0:i.featureFlags,featureFlagPayloads:(o=r.bootstrap)==null?void 0:o.featureFlagPayloads},remoteRequestsDisabled:s,featureFlagsDisabled:!!r.advanced_disable_feature_flags,onlyEvaluateSurveyFeatureFlags:!!r.advanced_only_evaluate_survey_feature_flags,deduplicateCallsPerSession:!!r.advanced_feature_flags_dedup_per_session,cacheTtlMs:r.feature_flag_cache_ttl_ms,requestTimeoutMs:r.feature_flag_request_timeout_ms,compression:r.disable_compression?"none":"base64",evaluationContexts:(a=(l=r.evaluation_contexts)!==null&&l!==void 0?l:r.evaluation_environments)!==null&&a!==void 0?a:[],flagKeys:te(r.flag_keys)?r.flag_keys:void 0}})(e,n),!e.evaluation_environments||e.evaluation_contexts||this.la||(Um.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.la=!0),U(e.flag_keys)||te(e.flag_keys)||Um.error("Invalid flag_keys found:",e.flag_keys,"Expected array of non-empty strings")}get(){return this.ua}}var Bm=Ue("[FeatureFlags]"),fr=Ue("[FeatureFlags]",{debugEnabled:!0}),hc=`" failed. Feature flags didn't load in time.`,Hm="connection_error",Vm=t=>{for(var e={},n=0;t.length>n;n++)e[t[n]]=!0;return e},zm=t=>{var e={};for(var n of $a(t||{})){var r=n[1];r&&(e[n[0]]=r)}return e},sn=Ue("[Error tracking]"),qm="Refusing to render web experiment since the viewer is a likely bot",cM={icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>Dl(e,t),not_regex:(t,e)=>!Dl(e,t),exact:(t,e)=>e===t,is_not:(t,e)=>e!==t};class yt{get Ne(){return this._instance.config}constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((s=>{yt.ha("retrieved web experiments from the server"),n.da=new Map,s.forEac
26h((i=>{if(i.feature_flag_key){var o;n.da&&(yt.ha("setting flag key ",i.feature_flag_key," to web experiment ",i),(o=n.da)==null||o.set(i.feature_flag_key,i));var a=n._instance.getFeatureFlag(i.feature_flag_key);ve(a)&&i.variants[a]&&n.va(i.name,a,i.variants[a].transforms)}else if(i.variants)for(var l in i.variants){var u=i.variants[l];yt.ca(u,n._instance)&&n.va(i.name,l,u.transforms)}}))}),r)},this._instance=e,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())yt.ha(qm);else if(!this.Ne.disable_web_experiments){if(se(this.da))return this.da=new Map,this.loadIfEnabled(),void this.previewWebExperiment();yt.ha("applying feature flags",e),e.forEach((n=>{var r;if(this.da&&(r=this.da)!=null&&r.has(n)){var s,i=this._instance.getFeatureFlag(n),o=(s=this.da)==null?void 0:s.get(n);i&&o!=null&&o.variants[i]&&this.va(o.name,i,o.variants[i].transforms)}}))}}previewWebExperiment(){var e=yt.getWindowLocation();if(e!=null&&e.search){var n=$s(e==null?void 0:e.search,"__experiment_id"),r=$s(e==null?void 0:e.search,"__experiment_variant");n&&r&&(yt.ha("previewing web experiments "+n+" && "+r),this.getWebExperiments((s=>{this.fa(parseInt(n),r,s)}),!1,!0))}}loadIfEnabled(){this.Ne.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,r){if(this.Ne.disable_web_experiments&&!r)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!n)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Ne.token),method:"GET",timestampMode:"query",callback:i=>e(i.statusCode===200&&i.json&&i.json.experiments||[])})}fa(e,n,r){var s=r.filter((i=>i.id===e));s&&s.length>0&&(yt.ha("Previewing web experiment ["+s[0].name+"] with variant ["+n+"]"),this.va(s[0].name,n,s[0].variants[n].transforms))}static ca(e,n){return!se(e.conditions)&&yt.pa(e,n)&&yt.ga(e)}static pa(e,n){var r;if(se(e.conditions)||se((r=e.conditions)==null?void 0:r.url))return!0;var s=yt.getWindowLocation();if(s){var i,o,a,l=kS(n,s.href);return(i=e.conditions)==null||!i.url||cM[(o=(a=e.conditions)==null?void 0:a.urlMatchType)!==null&&o!==void 0?o:"icontains"](e.conditions.url,l)}return!1}
26static getWindowLocation(){return D==null?void 0:D.location}static ga(e){var n;if(se(e.conditions)||se((n=e.conditions)==null?void 0:n.utm))return!0;var r=VS();if(r.utm_source){var s,i,o,a,l,u,c,d,f=(s=e.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((i=e.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==r.utm_campaign,p=(o=e.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==r.utm_source,h=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_medium||((u=e.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,g=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_term||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==r.utm_term;return f&&h&&g&&p}return!1}static ha(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;n>s;s++)r[s-1]=arguments[s];B.info("[WebExperiments] "+e,r)}va(e,n,r){this._is_bot()?yt.ha(qm):n!=="control"?r.forEach((s=>{if(s.selector){var i;yt.ha("applying transform of variant "+n+" for experiment "+e+" ",s);var o=(i=document)==null?void 0:i.querySelectorAll(s.selector);o==null||o.forEach((a=>{var l=a;s.html&&(l.innerHTML=s.html),s.css&&l.setAttribute("style",s.css)}))}})):yt.ha("Control variants leave the page unmodified.")}_is_bot(){return kt&&this._instance?lE(kt,this.Ne.custom_blocked_useragents):void 0}}var qt=Ue("[Conversations]"),hr="Conversations not available yet.",Wm="console",_E="__posthogHandledLogsRequestError",pc=(t,e)=>{var n=t instanceof Error?t:new Error(e);return n[_E]=!0,n},Gm=t=>!!t&&typeof t=="object"&&t[_E]===!0,uu={featureFlags:class{constructor(t){this.name="featureFlags",this.ma=!1,this.featureFlagEventHandlers=[],this.rt=Bm,this.ya={},this.ba={},this._a=[],this.wa=!1,this.ka=!1,this.xa=0,this.Sa=!1,this.Ca=!1,this.Ma=!1,this.Ta=!1,this.Ea=0,this.Ia=()=>{var e=this.Pa();this.Ea=0,e&&this.reloadFeatureFlags()},"get"in t?this.Ra=t:(this.Aa=new uM(t.config,t.Qi()),this.Ra=this.Aa)}updateConfig(t,e){var n;(n=this.Aa)==null||n.update(t,e)}setup(t){return this.Fa=t,this.rt=t.logger.createLogger("[FeatureFlags]"),n=()=>{this.Fa===t&&(this.Fa=void 0,this.un=t,this.La(t))},(e=t.kv.initialize())!=null&&e.then?e.then(n):n();var e,n}La(t){if(this.un===t)return D&&Ve(D,"online",this.Ia),this.Oa=t.registerDynamicEventProperties((()=>this.Da()?this.ya:this.ba)),this.$a(),this.initialize()}destroy(){D==null||D.removeEventListener("online",this.Ia)}dispose(){var t;this.xa++,this.Ca=!1,this.Fa=void 0,this.un&&(this.Na(),(t=this.Oa)==null||t.dispose(),this.Oa=void 0,this._a=[],D==null||D.removeEventListener("online",this.Ia),this.un=void 0)}get Ne(){return this.Ra.get()}qa(t){var e;return(e=this.un)==null?void 0:e.kv.get(t)}F(t){this.ja((()=>{var e;return(e=this.un)==null?void 0:e.kv.set(t)}))}q(t){this.ja((()=>{var e;return(e=this.un)==null?void 0:e.kv.remove(t)}))}ja(t){try{t()}catch(e){this.rt.error("Failed to update feature flag persistence",e)}}$a(){var t={};for(var e of[ki,Ci,Na,on]){var n=this.qa(e);U(n)||(t[e]=n)}this.ya=t;var r=F({},t),s=this.qa(mr);if(s)for(var i of Object.entries(s))r["$feature/"+i[0]]=i[1];this.ba=r}Da(){var t=this.Ne.cacheTtlMs;if(!t||0>=t)return!1;var e=this.qa(Hi);return typeof e!="number"||Date.now()-e>t}Ba(){return!!this.Da()&&(this.Ta||this.ka||(this.Ta=!0,this.rt.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Ha(){var t=this.Ne.evaluationContexts;return t!=null&&t.length?t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||this.rt.error("Invalid evaluation context found:",e,"Expected non-empty string"),n})):[]}Ua(){var t=this.Ne.flagKeys;if(!U(t))return t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||this.rt.error("Invalid flag key found:",e,"Expected non-empty string"),n}))}initialize(){var t,e,n=this.Ne,r=(t=(e=n.bootstrap)==null?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(r).length){var s,i,o=(s=(i=n.bootstrap)==null?void 0:i.featureFlagPayloads)!==null&&s!==void 0?s:{},a=Object.keys(r).filter((u=>!!r[u])).reduce(((u,c)=>(u[c]=r[c]||!1,u)),{}),l=Object.keys(o).filter((u=>a[u])).reduce(((u,c)=>(u[c]=o[c],u)),{});return this.za({featureFlags:a,featureFlagPayloads:l})}}updateFlags(t,e,n){var r,s,i=n!=null&&n.merge&&(r=this.qa(mr))!==null&&r!==void 0?r:{},o=n!=null&&n.merge&&(s=this.qa(Ci))!==null&&s!==void 0?s:{},a=F({},i,t),l=F({},o,e),u={};for(var c of Object.entries(a)){var d=c[0],f=c[1];u[d]={key:d,enabled:$g(f),variant:jg(f),reason:void 0,metadata:U(l==null?void 0:l[d])?void 0:{id:0,version:void 0,description:void 0,payload:l[d]}}}this.za({flags:u})}get hasLoadedFlags(){return this.wa}getFlags(){return Object.keys(this.getFlagVariants())}
26getFlagsWithDetails(){var t=this.qa(Fd),e=this.qa(on),n=this.qa(_r);if(!n&&!e)return t||{};var r=$e({},t||{}),s=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(var i of s){var o,a,l=r[i],u=e==null?void 0:e[i],c=U(u)?(o=l==null?void 0:l.enabled)!==null&&o!==void 0&&o:!!u,d=U(u)?l==null?void 0:l.variant:typeof u=="string"?u:void 0,f=n==null?void 0:n[i],p=F({},l,{enabled:c,variant:c?d??(l==null?void 0:l.variant):void 0});c!==(l==null?void 0:l.enabled)&&(p.original_enabled=l==null?void 0:l.enabled),d!==(l==null?void 0:l.variant)&&(p.original_variant=l==null?void 0:l.variant),f&&(p.metadata=F({},l==null?void 0:l.metadata,{payload:f,original_payload:l==null||(a=l.metadata)==null?void 0:a.payload})),r[i]=p}return this.ma||(this.rt.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:r}),this.ma=!0),r}getAllFeatureFlags(){var t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map((n=>{var r=t[n];return{key:n,enabled:$g(r),variant:jg(r),payload:Fg(e[n])}}))}getFlagVariants(){var t=this.qa(mr),e=this.qa(on);if(!e)return t||{};for(var n=$e({},t||{}),r=Object.keys(e),s=0;r.length>s;s++)n[r[s]]=e[r[s]];return this.ma||(this.rt.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.ma=!0),n}getFlagPayloads(){var t=this.qa(Ci),e=this.qa(_r);if(!e)return t||{};for(var n=$e({},t||{}),r=Object.keys(e),s=0;r.length>s;s++)n[r[s]]=e[r[s]];return this.ma||(this.rt.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.ma=!0),n}reloadFeatureFlags(){this.Sa||this.Ne.featureFlagsDisabled||this.Pa()||this.Wa||(this._a.slice().forEach((t=>{try{t()}catch(e){this.rt.error("Error while running feature flags reloading callback",e)}})),this.Wa=setTimeout((()=>{this.Va()}),5))}Na(){clearTimeout(this.Wa),this.Wa=void 0}onReloading(t){return this._a.push(t),()=>{this._a=this._a.filter((e=>e!==t))}}ensureFlagsLoaded(){this.wa||this.ka||this.Wa||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.Sa=t}resetFlagCallReported(){this.q(Er)}Va(t){this.Na();var e=this.un;if(e&&!this.Ne.remoteRequestsDisabled&&!this.Pa())if(this.ka)this.Ca=!0;else{var n={token:e.projectToken,distinct_id:e.distinctId,groups:e.groups,$anon_distinct_id:this.$anon_distinct_id,person_properties:F({},e.initialPersonProperties,this.qa(bn)||{},{$lib:e.library.name,$lib_version:e.library.version}),group_properties:this.qa(vr),timezone:YS()};U(e.deviceId)||(n.$device_id=e.deviceId),(t!=null&&t.disableFlags||this.Ne.featureFlagsDisabled)&&(n.disable_flags=!0);var r=this.Ha();r.length&&(n.evaluation_contexts=r);var s=this.Ua();U(s)||(n.flag_keys=s);var i=this.Ne.onlyEvaluateSurveyFeatureFlags,o="/flags/?v=2"+(i?"&only_evaluate_survey_feature_flags=true":""),a=this.xa;this.ka=!0;var l=()=>{this.Ca&&(this.Ca=!1,this.Va())},u=c=>{this.ka=!1,a===this.xa&&(this.F({[Fa]:[Hm]}),this.rt.error("Feature flag request failed",c)),l()};try{e.sendRequest(o,{target:"flags",method:"POST",body:n,compression:this.Ne.compression==="base64"?It.Base64:void 0,sentAt:"body",timeoutMs:this.Ne.requestTimeoutMs}).then((c=>{var d,f,p=(d=c.json)!==null&&d!==void 0?d:{},h=c.statusCode!==200;if(this.ka=!1,a===this.xa){if(this.Za(c.statusCode),h||this.Ca||(this.$anon_distinct_id=void 0),!n.disable_flags||this.Ca){this.Ma=!h;var g=[];c.error?g.push(c.error instanceof Error&&c.error.name==="AbortError"?"timeout":c.error instanceof Error?Hm:"unknown_error"):c.statusCode!==200&&g.push("api_error_"+c.statusCode),p.errorsWhileComputingFlags&&g.push("errors_while_computing_flags");var _=!((f=p.quotaLimited)==null||!f.includes("feature_flags"));_&&g.push("quota_limited"),this.F({[Fa]:g}),_?this.rt.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."):n.disable_flags||this.za(p,h,{partialResponse:i}),l()}}else l()})).catch(u)}catch(c){u(c)}}}Pa(){return BS(this.Ea,3)}Za(t){this.Ea=HS(t,this.Ea,3,(()=>this.rt.warn("Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes.")))}getFeatureFlag(t,e){var n;if(e===void 0&&(e={}),!e.fresh||this.Ma)if(this.wa||this.getFlags()&&this.getFlags().length>0){if(!this.Ba()){var r=this.getFeatureFlagResult(t,e);return(n=r==null?void 0:r.variant)!==null&&n!==void 0?n:r==null?void 0:r.enabled}}else this.rt.warn('getFeatureFlag for key "'+t+hc)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var e=this.getFeatureFlagResult(t,{send_event:!1});return e==null?void 0:e.payload}getFeatureFlagResult(t,e){if(e===void 0&&(e={}),!e.fresh||this.Ma)if(this.wa||this.getFlags()&&this.getFlags().length>0){if(!this.Ba()){var n,r=this.getFlagVariants(),s=t in r,i=r[t],o=this.getFlagPayloads()[t],a=String(i),l=this.qa(Na)||void 0,u=this.qa(Hi)||void 0,c=this.qa(Er)||{};if(this.Ne.deduplicateCallsPerSession){var d,f=(d=this.un)==null?void 0:d.session.sessionId,p=this.qa(Ai);
26f&&f!==p&&(c={},n=f)}if(e.send_event||!("send_event"in e))if(t in c&&c[t].includes(a))n&&this.F({[Er]:c,[Ai]:n});else{var h,g,_,m,y,E,T,I,x,R,C,S;te(c[t])?c[t].push(a):c[t]=[a],this.F(F({[Er]:c},n?{[Ai]:n}:{}));var w=this.getFeatureFlagDetails(t),A=[...(h=this.qa(Fa))!==null&&h!==void 0?h:[]];U(i)&&A.push("flag_missing");var P={$feature_flag:t,$feature_flag_response:i,$feature_flag_payload:o??null,$feature_flag_request_id:l,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:(g=(_=this.Ne.bootstrap)==null||(_=_.featureFlags)==null?void 0:_[t])!==null&&g!==void 0?g:null,$feature_flag_bootstrapped_payload:(m=(y=this.Ne.bootstrap)==null||(y=y.featureFlagPayloads)==null?void 0:y[t])!==null&&m!==void 0?m:null,$used_bootstrap_value:!this.Ma};U(w==null||(E=w.metadata)==null?void 0:E.has_experiment)||(P.$feature_flag_has_experiment=w.metadata.has_experiment),U(w==null||(T=w.metadata)==null?void 0:T.version)||(P.$feature_flag_version=w.metadata.version);var O,N=(I=w==null||(x=w.reason)==null?void 0:x.description)!==null&&I!==void 0?I:w==null||(R=w.reason)==null?void 0:R.code;N&&(P.$feature_flag_reason=N),w!=null&&(C=w.metadata)!=null&&C.id&&(P.$feature_flag_id=w.metadata.id),U(w==null?void 0:w.original_variant)&&U(w==null?void 0:w.original_enabled)||(P.$feature_flag_original_response=U(w.original_variant)?w.original_enabled:w.original_variant),w!=null&&(S=w.metadata)!=null&&S.original_payload&&(P.$feature_flag_original_payload=w==null||(O=w.metadata)==null?void 0:O.original_payload),A.length&&(P.$feature_flag_error=A.join(",")),this.Ga(P)}else n&&this.F({[Er]:c,[Ai]:n});if(s)return{key:t,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:Fg(o)}}}else this.rt.warn('getFeatureFlagResult for key "'+t+hc)}Ga(t){try{var e;(e=this.un)==null||e.capture("$feature_flag_called",t).catch((n=>{this.rt.error("Failed to capture feature flag call",n)}))}catch(n){this.rt.error("Failed to capture feature flag call",n)}}getRemoteConfigPayload(t,e){this.Qa(t,e)}Qa(t,e){var n=this;return Pe((function*(){var r=n.un;if(r){var s={distinct_id:r.distinctId,token:r.projectToken,person_properties:{$lib:r.library.name,$lib_version:r.library.version}},i=n.Ha();i.length&&(s.evaluation_contexts=i);var o,a=n.Ua();U(a)||(s.flag_keys=a);try{var l,u=(l=(yield r.sendRequest("/flags/?v=2",{target:"flags",method:"POST",body:s,compression:n.Ne.compression==="base64"?It.Base64:void 0,sentAt:"body",timeoutMs:n.Ne.requestTimeoutMs})).json)==null?void 0:l.featureFlagPayloads;o=(u==null?void 0:u[t])||void 0}catch(c){return void n.rt.error("Remote config feature flag request failed",c)}try{e(o)}catch(c){n.rt.error("Remote config feature flag callback failed",c)}}}))()}isFeatureEnabled(t,e){if(e===void 0&&(e={}),e.fresh&&!this.Ma)return e.defaultValue;if(!(this.wa||this.getFlags()&&this.getFlags().length>0))return this.rt.warn('isFeatureEnabled for key "'+t+hc),e.defaultValue;var n=this.getFeatureFlag(t,e);return U(n)?e.defaultValue:!!n}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==t))}receivedFeatureFlags(t,e,n){this.za(t,e,n)}za(t,e,n){if(this.un){this.wa=!0;var r=(function(s,i,o,a,l,u){i===void 0&&(i={}),o===void 0&&(o={}),a===void 0&&(a={}),u===void 0&&(u=Bm);var c=((x,R)=>{var C=x.flags;return C?F({},x,{featureFlags:Object.fromEntries(Object.keys(C).map((S=>{var w;return[S,(w=C[S].variant)!==null&&w!==void 0?w:C[S].enabled]}))),featureFlagPayloads:Object.fromEntries(Object.keys(C).filter((S=>C[S].enabled)).filter((S=>{var w;return(w=C[S].metadata)==null?void 0:w.payload})).map((S=>{var w;return[S,(w=C[S].metadata)==null?void 0:w.payload]})))}):(x.featureFlags&&R.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),x)})(s,u),d=c.flags,f=c.featureFlags,p=c.featureFlagPayloads;if(f){var h=s.requestId,g=s.evaluatedAt;if(te(f)){u.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var _={};if(f)for(var m=0;f.length>m;m++)_[f[m]]=!0;return{[ki]:f,[mr]:_,[El]:!1}}var y=f,E=p,T=d;if(l!=null&&l.partialResponse)y=F({},i,y),E=F({},o,E),T=F({},a,T);else if(s.errorsWhileComputingFlags)if(d){var I=new Set(Object.keys(d).filter((x=>{var R;return!((R=d[x])!=null&&R.failed)})));y=F({},i,Object.fromEntries(Object.entries(y).filter((x=>I.has(x[0]))))),E=F({},o,Object.fromEntries(Object.entries(E||{}).filter((x=>I.has(x[0]))))),T=F({},a,Object.fromEntries(Object.entries(T||{}).filter((x=>I.has(x[0])))))}else y=F({},i,y),E=F({},o,E),T=F({},a,T);return F({[ki]:Object.keys(zm(y)),[mr]:y||{},[Ci]:E||{},[Fd]:T||{},[El]:s.minimalFlagCalledEvents===!0},h?{[Na]:h}:{},g?{[Hi]:g}:{})}})(t,this.getFlagVariants(),this.getFlagPayloads(),this.getFlagsWithDetails(),n,this.rt);r&&this.F(r),e||(this.Ta=!1),this.Ka(e)}}override(t,e){e===void 0&&(e=!1),this.rt.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){this.Ja(t)}Ja(t){if(this.un){if(t===!1)return this.q([on,_r]),this.Ka(),void fr.info("All overrides cleared");if(te(t))return this.F({[on]:Vm(t)}),this.Ka(),void fr.info("Flag overrides set",{flags:t});if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var e,n=t;this.ma=!!((e=n.suppressWarning)!==null&&e!==void 0&&e);var r={},s=n.flags,i=n.payloads;
26return s&&(r[on]=te(s)?Vm(s):s),i&&(r[_r]=i),Object.keys(r).length&&this.F(r),s===!1&&i===!1?this.q([on,_r]):s===!1?this.q(on):i===!1&&this.q(_r),this.Ka(),s===!1?fr.info("Flag overrides cleared"):s&&fr.info("Flag overrides set",{flags:s}),void(i===!1?fr.info("Payload overrides cleared"):i&&fr.info("Payload overrides set",{payloads:i}))}if(t&&typeof t=="object")return this.F({[on]:t}),this.Ka(),void fr.info("Flag overrides set",{flags:t});this.rt.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}else this.rt.warn("posthog.featureFlags.overrideFeatureFlags called before feature flags were ready")}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.wa){var e=this.Ya(),n=e.flags,r=e.flagVariants;try{t(n,r)}catch(s){this.rt.error("Error while running feature flags callback",s)}}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var r=(this.qa(Da)||[]).find((l=>l.flagKey===t)),s={["$feature_enrollment/"+t]:e},i={$feature_flag:t,$feature_enrollment:e,$set:s};r&&(i.$early_access_feature_name=r.name),n&&(i.$feature_enrollment_stage=n);var o=F({},this.getFlagVariants(),{[t]:e});this.F({[ki]:Object.keys(zm(o)),[mr]:o,[bn]:F({},this.qa(bn)||{},s)}),this.Ka();try{var a;(a=this.un)==null||a.capture("$feature_enrollment_update",i).catch((l=>{this.rt.error("Failed to capture early access feature enrollment",l)}))}catch(l){this.rt.error("Failed to capture early access feature enrollment",l)}}getEarlyAccessFeatures(t,e,n){e===void 0&&(e=!1);var r=this.qa(Da);!r||e?this.Xa(t,n):t(r)}Xa(t,e){var n=this;return Pe((function*(){var r=n.un;if(r){var s,i=e?"&"+e.map((a=>"stage="+a)).join("&"):"";try{var o=yield r.sendRequest("/api/early_access_features/?token="+r.projectToken+i,{target:"api",method:"GET",sentAt:"query"});if(!o.json)return;n.F({[Da]:s=o.json.earlyAccessFeatures})}catch(a){return void n.rt.error("Early access feature request failed",a)}try{t(s)}catch(a){n.rt.error("Early access feature callback failed",a)}}}))()}Ya(){var t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter((n=>e[n])),flagVariants:Object.keys(e).filter((n=>e[n])).reduce(((n,r)=>(n[r]=e[r],n)),{})}}Ka(t){this.$a();var e=this.Ya(),n=e.flags,r=e.flagVariants;this.featureFlagEventHandlers.forEach((s=>{try{s(n,r,{errorsLoading:t})}catch(i){this.rt.error("Error while running feature flags callback",i)}}))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0),this.eo(t,e)}eo(t,e){e===void 0&&(e=!0);var n=this.qa(bn)||{},r=(t==null?void 0:t.$set)||(t!=null&&t.$set_once?{}:t),s=t==null?void 0:t.$set_once,i={};if(s)for(var o in s)({}).hasOwnProperty.call(s,o)&&(o in n||(i[o]=s[o]));this.F({[bn]:F({},n,i,r)}),e&&this.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=F({},this.qa(bn)||{});t.forEach((r=>{delete n[r]})),this.F({[bn]:n}),e&&this.reloadFeatureFlags()}resetPersonPropertiesForFlags(t){t===void 0&&(t=!0),this.q(bn),t&&this.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.qa(vr)||{},r=F({},n);for(var s of Object.keys(t))r[s]=F({},n[s],t[s]);this.F({[vr]:r}),e&&this.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this.qa(vr)||{};this.F({[vr]:F({},e,{[t]:{}})})}else this.q(vr)}reset(){this.xa++,this.Ca=!1,this.$a(),this.wa=!1,this.Sa=!1,this.Ma=!1,this.$anon_distinct_id=void 0,this.Na(),this.ma=!1,this.Ea=0}}},dM={sessionRecording:class{get Ne(){return this._instance.config}get Mr(){return this._instance.persistence}get started(){var t;return!((t=this.io)==null||!t.isStarted)}get status(){var t,e;return this.ro===gi||this.ro===ia?this.ro:(t=(e=this.io)==null?void 0:e.status)!==null&&t!==void 0?t:this.ro}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.ro=Nm,this.no=void 0,this.so=!1,this.ao=(()=>{var e;if(H==null||!H.visibilityState||H.visibilityState==="visible")return!0;var n=D==null||(e=D.performance)==null||e.getEntriesByType==null?void 0:e.getEntriesByType("visibility-state");return!(n!=null&&n.length)||n.some((r=>r.name==="visible"))})(),this.Ie=()=>{var e;(H==null?void 0:H.visibilityState)==="visible"&&(this.ao=!0,(e=this.io)==null||e.setDocumentWasEverVisible==null||e.setDocumentWasEverVisible(!0))},this._instance=t,!this._instance.sessionManager)throw pn.error("started without valid sessionManager"),new Error(tf+" started without valid sessionManager. This is a bug.");if(this.Ne.cookieless_mode===Tn)throw new Error(tf+' cannot be used with cookieless_mode="always"');H!=null&&H.addEventListener&&Ve(H,"visibilitychange",this.Ie)}initialize(){this.startIfEnabledOrStop()}dispose(){this.so=!0,H==null||H.removeEventListener==null||H.removeEventListener("visibilitychange",this.Ie),this.stopRecording()}get oo(){var t,e=!((t=this._instance.get_property(kr))==null||!t.enabled),n=!this.Ne.disable_session_recording,r=this.Ne.disable_session_recording||this._instance.consent.isOptedOut();return D&&e&&n&&!r}startIfEnabledOrStop(t){var e;if(!(this.so||this.oo&&(e=this.io)!=null&&e.isStarted)){var n=!U(Object.assign)&&!U(Array.from);this.oo&&n?(this.lo(t),pn.info("starting")):(this.ro=Nm,this.stopRecording())}}lo(t){var e,n,r;this.oo&&(this.ro!==gi&&this.ro!==ia&&(this.ro=Lm),K!=null&&(e=K.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(n=K.__PosthogExtensions__)!=null&&n.initSessionRecording?this.uo(t):(r=K.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.ho,(s=>{if(s)return pn.error("could not load recorder",s);this.uo(t)})))}stopRecording(){var t,e;(t=this.no)==null||t.call(this),this.no=void 0,(e=this.io)==null||e.stop()}do(){var t,e;(t=this.no)==null||t.call(this),this.no=void 0,(e=this.io)==null||e.discard()}vo(){var t,e;(t=this.Mr)==null||t.unregister(bh),(e=this.Mr)==null||e.unregister(_S)}co(t,e){if(se(t))return null;var n,r=et(t)?t:parseFloat(t);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(pn.warn(e+" must be between 0 and 1. Ignoring invalid value:",t),null):r}fo(t){if(this.Mr){var e,n,r=this.Mr,s=()=>{var i,o=t.sessionRecording===!1?void 0:t.sessionRecording,a=this.co((i=this.Ne.session_recording)==null?void 0:i.sampleRate,"session_recording.sampleRate"),l=this.co(o==null?void 0:o.sampleRate,"remote config sampleRate"),u=a??l;se(u)&&this.vo();var c=o==null?void 0:o.minimumDurationMilliseconds;r.register({[kr]:F({cache_timestamp:Date.now(),enabled:!!o},o,{networkPayloadCapture:F({capturePerformance:t.capturePerformance},o==null?void 0:o.networkPayloadCapture),canvasRecording:{enabled:o==null?void 0:o.recordCanvas,fps:o==null?void 0:o.canvasFps,quality:o==null?void 0:o.canvasQuality},sampleRate:u,minimumDurationMilliseconds:U(c)?null:c,endpoint:o==null?void 0:o.endpoint,triggerMatchType:o==null?void 0:o.triggerMatchType,masking:o==null?void 0:o.masking,urlTriggers:o==null?void 0:o.urlTriggers,version:o==null?void 0:o.version,triggerGroups:o==null?void 0:o.triggerGroups})})};s(),(e=this.no)==null||e.call(this),this.no=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(s)}}onRemoteConfig(t){var e=t.ok?t.config:void 0;return e&&"sessionRecording"in e?e.sessionRecording===!1?(this.fo(e),void this.do()):(this.fo(e),void this.startIfEnabledOrStop()):(this.ro===gi&&(this.ro=ia,pn.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(t,e){var n;e===void 0&&(e="log"),(n=this.io)!=null&&n.log?this.io.log(t,e):pn.warn("log called before recorder was ready")}get ho(){var t,e,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(kr);return(n==null||(e=n.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}po(){var t,e=this._instance.get_property(kr);if(!e)return!1;try{t=typeof e=="object"?e:JSON.parse(e)}catch(n){return pn.warn("persisted remote config for session recording is invali
26d and will be ignored",n),!1}return!se(t.cache_timestamp)&&36e5>=Date.now()-t.cache_timestamp}uo(t){var e,n,r;if(!this.so){if((e=K.__PosthogExtensions__)==null||!e.initSessionRecording)return pn.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[TS]:!0});var s;if(this.io||(this.io=(s=K.__PosthogExtensions__)==null?void 0:s.initSessionRecording(this._instance,this.ao),this.io._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.po())return this.ro===ia||this.ro===gi?void 0:(this.ro=gi,pn.info("persisted remote config is stale, requesting fresh config before starting"),void new JS(this._instance).load());this.ro=Lm,(n=(r=this.io).setDocumentWasEverVisible)==null||n.call(r,this.ao),this.io.start(t)}}onRRwebEmit(t){var e;(e=this.io)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.io||(e=this.Mr)==null||e.register({[yS]:!0}),(t=this.io)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.io||(e=this.Mr)==null||e.register({[vS]:!0}),(t=this.io)==null||t.overrideSampling()}overrideTrigger(t){var e,n;this.io||(n=this.Mr)==null||n.register({[t==="url"?bS:SS]:!0}),(e=this.io)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.io)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var n;return!((n=this.io)==null||!n.tryAddCustomEvent(t,e))}}},fM={autocapture:class{constructor(t){this.mo=!1,this.yo=null,this.bo=!1,this._o=!1,this.instance=t,this.rageclicks=new Am(t.config.rageclick),this.wo=null}initialize(){this.startIfEnabled()}get Ne(){var t,e,n=je(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(t=n.url_allowlist)==null?void 0:t.map((r=>new RegExp(r))),n.url_ignorelist=(e=n.url_ignorelist)==null?void 0:e.map((r=>new RegExp(r))),n}ko(){if(this.isBrowserSupported()){if(D&&H){var t=n=>{n=n||(D==null?void 0:D.event);try{this.xo(n)}catch(r){uc.error("Failed to capture event",r)}};if(Ve(H,"submit",t,{capture:!0}),Ve(H,"change",t,{capture:!0}),Ve(H,"click",t,{capture:!0}),this.Ne.capture_copied_text){var e=n=>{n=n||(D==null?void 0:D.event);try{this.xo(n,lc)}catch(r){uc.error("Failed to capture copy/cut event",r)}};Ve(H,"copy",e,{capture:!0}),Ve(H,"cut",e,{capture:!0})}}}else uc.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.mo&&(this.ko(),this.mo=!0)}onRemoteConfig(t){if(this.bo=!0,t.ok){var e=t.config;e.elementsChainAsString&&(this._o=e.elementsChainAsString);var n=e.autocapture_opt_out;Ut(n)&&(this.instance.persistence&&this.instance.persistence.register({[Rd]:n}),this.yo=n),this.startIfEnabled()}else this.startIfEnabled()}setElementSelectors(t){this.wo=t}getElementSelectors(t){var e,n=[];return(e=this.wo)==null||e.forEach((r=>{var s=H==null?void 0:H.querySelectorAll(r);s==null||s.forEach((i=>{t===i&&n.push(r)}))})),n}get isEnabled(){var t,e,n=(t=this.instance.persistence)==null?void 0:t.props[Rd],r=this.yo,s=this.instance.Qi()&&!this.bo;if(Nt(r)&&!Ut(n)&&!s)return!1;var i=(e=this.yo)!==null&&e!==void 0?e:!!n;return!!this.instance.config.autocapture&&!i}xo(t,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var n,r=Ju(t);RS(r)&&(r=r.parentNode||null),e==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime())&&om(r,this.instance.config.rageclick)&&this.xo(t,"$rageclick");var s=e===lc;if(r&&(function(d,f,p,h,g,_){var m;if(!D||Th(d)||p!=null&&p.url_allowlist&&!rm(p.url_allowlist,_)||p!=null&&p.url_ignorelist&&rm(p.url_ignorelist,_))return!1;if(p!=null&&p.dom_event_allowlist){var y=p.dom_event_allowlist;if(y&&!y.some((C=>f.type===C)))return!1}var E=MS(d,h),T=E.parentIsUsefulElement,I=E.targetElementList;if(!(function(C,S){var w=S==null?void 0:S.element_allowlist;if(U(w))return!0;var A,P=function(N){if(w.some((V=>N.tagName.toLowerCase()===V)))return{v:!0}};for(var O of C)if(A=P(O))return A.v;return!1})(I,p)||!Wd(I,p==null?void 0:p.css_selector_allowlist)||Wd(I,(m=p==null?void 0:p.css_selector_ignorelist)!==null&&m!==void 0?m:lL))return!1;try{var x=D.getComputedStyle(d);if(x&&x.getPropertyValue("cursor")==="pointer"&&f.type==="click")return!0}catch{}var R=d.tagName.toLowerCase();switch(R){case"html":return!1;case"form":return(g||["submit"]).indexOf(f.type)>=0;case"input":case"select":case"textarea":return(g||["change","click"]).indexOf(f.type)>=0;default:return T?(g||["click"]).indexOf(f.type)>=0:(g||["click"]).indexOf(f.type)>=0&&(xh.indexOf(R)>-1||d.getAttribute("contenteditable")==="true")}})(r,t,this.Ne,s,s?["copy","cut"]:void 0,this.instance)){var i=tM(r,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Ne.element_attribute_ignorelist,elementsC
26hainAsString:this._o,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}),o=i.props;if(i.explicitNoCapture)return!1;var a=this.getElementSelectors(r);if(a&&a.length>0&&(o.$element_selectors=a),e===lc){var l,u=DS(D==null||(l=D.getSelection())==null?void 0:l.toString()),c=t.type||"clipboard";if(!u)return!1;o.$selected_content=u,o.$copy_type=c}return this.instance.capture(e,o),!0}}}isBrowserSupported(){return Tt(H==null?void 0:H.querySelectorAll)}},historyAutocapture:class{constructor(t){var e;this._instance=t,this.So=(D==null||(e=D.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(B.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Co&&this.Co(),this.Co=void 0,B.info("History API monitoring stopped")}monitorHistoryChanges(){D&&D.history&&(this.Mo("pushState"),this.Mo("replaceState"),this.To())}Mo(t){var e;if(D&&((e=D.history[t])==null||!e.__posthog_wrapped__)){var n=this;(function(r,s,i){try{if(!(s in r))return Pm;var o={next:r[s]},a=i((function(){for(var l=arguments.length,u=new Array(l),c=0;l>c;c++)u[c]=arguments[c];return o.next.apply(this,u)}));return Tt(a)&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:o}})),r[s]=a,()=>{if(r[s]!==a)for(var l=r[s];Tt(l)&&l.__posthog_layer__;){var u=l.__posthog_layer__;if(u.next===a)return void(u.next=o.next);l=u.next}else r[s]=o.next}}catch{return Pm}})(D.history,t,(r=>function(s,i,o){r.call(this,s,i,o),n.Eo(t)}))}}Eo(t){try{var e,n=D==null||(e=D.location)==null?void 0:e.pathname;if(!n)return;n!==this.So&&this.isEnabled&&this._instance.capture(cs,{navigation_type:t}),this.So=n}catch(r){B.error("Error capturing "+t+" pageview",r)}}To(){if(!this.Co){var t=()=>{this.Eo("popstate")};Ve(D,"popstate",t),this.Co=()=>{D&&D.removeEventListener("popstate",t)}}}},heatmaps:class{get Ne(){return this.instance.config}constructor(t){var e;this.Io=!1,this.mo=!1,this.Po=null,this.instance=t,this.Io=!((e=this.instance.persistence)==null||!e.props[Ad]),this.rageclicks=new Am(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return je(this.Ne.capture_heatmaps)&&this.Ne.capture_heatmaps.flush_interval_milliseconds&&(t=this.Ne.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return se(this.Ne.capture_heatmaps)?se(this.Ne.enable_heatmaps)?this.Io:this.Ne.enable_heatmaps:this.Ne.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.mo)return;rM.info("starting..."),this.Ro(),this.Ie()}else{var t;clearInterval((t=this.Po)!==null&&t!==void 0?t:void 0),this.Ao(),this.getAndClearBuffer()}}onRemoteConfig(t){if(t.ok){var e=t.config;if("heatmaps"in e){var n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Ad]:n}),this.Io=n,this.startIfEnabled()}}}getAndClearBuffer(){var t=this.R;return this.R=void 0,t}Fo(t){dc(t.originalEvent)&&this.ke(t.originalEvent,"deadclick")}Ie(){this.Po&&clearInterval(this.Po),this.Po=(H==null?void 0:H.visibilityState)==="visible"?setInterval(this.cr.bind(this),this.flushIntervalMilliseconds):null}Ro(){D&&H&&(this.Lo=this.cr.bind(this),Ve(D,Ol,this.Lo),this.Oo=t=>this.ke(t||(D==null?void 0:D.event)),Ve(H,"click",this.Oo,{capture:!0}),this.Do=t=>this.$o(t||(D==null?void 0:D.event)),Ve(H,"mousemove",this.Do,{capture:!0}),this.No=new hm(this.instance,gL,this.Fo.bind(this)),this.No.startIfEnabledOrStop(),this.qo=this.Ie.bind(this),Ve(H,Il,this.qo),this.mo=!0)}Ao(){var t;D&&H&&(this.Lo&&D.removeEventListener(Ol,this.Lo),this.Oo&&H.removeEventListener("click",this.Oo,{capture:!0}),this.Do&&H.removeEventListener("mousemove",this.Do,{capture:!0}),this.qo&&H.removeEventListener(Il,this.qo),clearTimeout(this.jo),(t=this.No)==null||t.stop(),this.mo=!1)}Bo(t,e){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),i=(function(o,a,l){for(var u=o;u&&tr(u)&&!Bt(u,"body");){if(u===l)return!1;var c=void 0;try{var d,f,p;c=(d=(f=(p=u.ownerDocument)==null?void 0:p.defaultView)!==null&&f!==void 0?f:D)==null?void 0:d.getComputedStyle(u).position}catch{return!1}if(Q(a,c))return!0;u=NS(u)}return!1})(Ju(t),["fixed","sticky"],s);return{x:t.clientX+(i?0:r),y:t.clientY+(i?0:n),target_fixed:i,type:e}}ke(t,e){var n;if(e===void 0&&(e="click"),!nm(t.target)&&dc(t)){var r=this.Bo(t,e);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&om(Ju(t),this.instance.config.rageclick)&&this.Vt(F({},r,{type:"rageclick"})),this.Vt(r)}}$o(t){!nm(t.target)&&dc(t)&&(clearTimeout(this.jo),this.jo=setTimeout((()=>{this.Vt(this.Bo(t,"mousemove"))}),500))}Vt(t){if(D){var e=this.Ne.disable_capture_url_hashes?er(D.location.href):D.location.href,n=this.Ne.custom_personal_data_properties,r=this.Ne.mask_personal_data_properties?[...js,...n||[]]:[],s=uo(e,r,co);this.R=this.R||{},this.R[s]||(this.R[s]=[]),this.R[s].push(t)}}cr(){this.R&&!Cn(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:hm,webVitalsAutocapture:class{constructor(t){var e;this.Io=!1,this.mo=!1,this.R={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Ho=()=>{clearTimeout(this.Uo),this.Uo=void 0,this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",F({$current_url:this.R.url},this.R.metrics.reduce(((n,r)=>F({},n,{["$web_vitals_"+r.name+"_event"]:F({},r),["$web_vitals_"+r.name+"_value"]:r.value})),{}))),this.R={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.zo=n=>{var r;if(this.R=this.R||{navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},se(n==null?void 0:n.name)||se(n==null?void 0:n.value))dr.error("Invalid metric received",n);
26else{var s=typeof n.navigationURL=="string"?n.navigationURL:void 0,i=this.Wo(s);if(!U(i)){var o=et(n.navigationId)||typeof n.navigationId=="string"?"navigation:"+n.navigationId:"url:"+i;if(!this.Vo||this.Vo>n.value){this.R.navigationKey!==o&&(this.Ho(),this.Uo=setTimeout(this.Ho,this.flushToCaptureTimeoutMs)),U(this.R.navigationKey)&&(this.R.navigationKey=o,this.R.url=i),this.R.firstMetricTimestamp=U(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0);var a=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0),l=F({},n,s?{navigationURL:i}:{},{$current_url:i,timestamp:Date.now()});U(a)||(l.$session_id=a.sessionId,l.$window_id=a.windowId),this.R.metrics.push(l),this.R.metrics.length===this.allowedMetrics.length&&this.Ho()}else dr.error("Ignoring metric with value >= "+this.Vo,n)}}},this.Zo=()=>{if(!this.mo){var n,r,s,i,o=K.__PosthogExtensions__,a=o==null?void 0:o.postHogWebVitalsCallbacksByFlavor,l=(a==null?void 0:a[this.Go])||(this.Go==="web-vitals"&&U(a)?o==null?void 0:o.postHogWebVitalsCallbacks:void 0);if(U(l)||(n=l.onLCP,r=l.onCLS,s=l.onFCP,i=l.onINP),n&&r&&s&&i){var u={reportSoftNavs:this.useSoftNavs};this.allowedMetrics.indexOf("LCP")>-1&&n(this.zo.bind(this),u),this.allowedMetrics.indexOf("CLS")>-1&&r(this.zo.bind(this),u),this.allowedMetrics.indexOf("FCP")>-1&&s(this.zo.bind(this),u),this.allowedMetrics.indexOf("INP")>-1&&i(this.zo.bind(this),u),this.mo=!0}else dr.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this.Io=!((e=this._instance.persistence)==null||!e.props[Ld]),this.startIfEnabled()}get Qo(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e,n=je(this.Qo)?(t=this.Qo)==null?void 0:t.web_vitals_allowed_metrics:void 0;return se(n)?((e=this._instance.persistence)==null?void 0:e.props[Md])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(je(this.Qo)?this.Qo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var t=je(this.Qo)?this.Qo.web_vitals_attribution:void 0;return t!=null&&t}get useSoftNavs(){var t=je(this.Qo)?this.Qo.__preview_web_vitals_soft_navs:void 0;return t!=null&&t}get Vo(){var t=je(this.Qo)&&et(this.Qo.__web_vitals_max_value)?this.Qo.__web_vitals_max_value:Dm;return t>0&&6e4>=t?Dm:t}get isEnabled(){var t=He==null?void 0:He.protocol;if(t!=="http:"&&t!=="https:")return dr.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=je(this.Qo)?this.Qo.web_vitals:Ut(this.Qo)?this.Qo:void 0;return Ut(e)?e:this.Io}startIfEnabled(){this.isEnabled&&!this.mo&&(dr.info("enabled, starting..."),this.ai(this.Zo))}onRemoteConfig(t){if(t.ok){var e=t.config;if("capturePerformance"in e){var n=je(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=je(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[Ld]:n}),this._instance.persistence.register({[Md]:r})),this.Io=n,this.startIfEnabled()}}}get Go(){return this.useSoftNavs?this.useAttribution?"web-vitals-with-attribution-soft-navs":"web-vitals-soft-navs":this.useAttribution?"web-vitals-with-attribution":"web-vitals"}ai(t){var e=K.__PosthogExtensions__,n=this.Go,r=e==null?void 0:e.postHogWebVitalsCallbacksByFlavor;r!=null&&r[n]||n==="web-vitals"&&U(r)&&e!=null&&e.postHogWebVitalsCallbacks?t():e==null||e.loadExternalDependency==null||e.loadExternalDependency(this._instance,n,(s=>{s?dr.error("failed to load script",s):t()}))}Wo(t){var e=t||(D==null?void 0:D.location.href);if(e){var n=this._instance.config.disable_capture_url_hashes?er(e):e,r=this._instance.config.custom_personal_data_properties,s=this._instance.config.mask_personal_data_properties?[...js,...r||[]]:[];return uo(n,s,co)}dr.error("Could not determine current URL")}}},hM={exceptionObserver:class{constructor(t){var e;this.Zo=()=>{var n;if(D&&this.isEnabled&&(n=K.__PosthogExtensions__)!=null&&n.errorWrappingFunctions){var r=K.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,s=K.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,i=K.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Ko&&this.Ne.capture_unhandled_errors&&(this.Ko=r(this.captureException.bind(this))),!this.Jo&&this.Ne.capture_unhandled_rejections&&(this.Jo=s(this.captureException.bind(this))),!this.Yo&&this.Ne.capture_console_errors&&(this.Yo=i(this.captureException.bind(this)))}catch(o){pi.error("failed to start",o),this.Xo()}}},this._instance=t,this.tl=!((e=this._instance.persistence)==null||!e.props[Pd]),this.el=new cN(F({},(function(n){var r,s,i,o;return n===void 0&&(n={}),{refillRate:(r=(s=n.exceptionRateLimiterRefillRate)!==null&&s!==void 0?s:n.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(i=(o=n.exceptionRateLimiterBucketSize)!==null&&o!==void 0?o:n.__exceptionRateLimiterBucketSize)!==null&&i!==void 0?i:10}})(this._instance.config.error_tracking),{refillInterval:1e4,rt:pi})),this.Ne=this.il(),this.startIfEnabledOrStop()}il(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return je(t)?e=F({},e,t):(U(t)?this.tl:t)&&(e=F({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Ne.capture_console_errors||this.Ne.capture_unhandled_errors||this.Ne.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(pi.info("enabled"),this.Xo(),this.ai(this.Zo)):this.Xo()}ai(t){var e,n;(e=K.__PosthogExtensions__)!=null&&e.errorWrappingFunctions?t():(n=K.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return pi.error("failed to load script",r);t()}))}Xo(){var t,e,n;(t=this.Ko)==null||t.call(this),this.Ko=void 0,(e=this.Jo)==null||e.call(this),this.Jo=void 0,(n=this.Yo)==null||n.call(this),this.Yo=void 0}onRemoteConfig(t){if(t.ok){var e=t.config;"autocaptureExceptions"in e&&(this.tl=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[Pd]:this.tl}),this.Ne=this.il(),this.startIfEnabledOrStop())}}onConfigChange(){this.Ne=this.il()}captureException(t){var e,n,r,s=(e=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&e!==void 0?e:"Exception";this.el.consumeRateLimit(s)?pi.info("Skipping exception capture because of client rate limiting.",{exception:s}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(t)}},exceptions:class{constructor(t){var e,n;this.rl=[],this.nl=new ON([new LN,new zN,new FN,new MN,new HN,new BN,new jN,new VN],(function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),o=1;s>o;o++)i[o-1]=arguments[o];return function(a,l){l===void 0&&(l=0);for(var u=[],c=a.split(` 27`),d=l;c.length>d;d++){var f=c[d];if(1024>
27=f.length){var p=Zg.test(f)?f.replace(Zg,"$1"):f;if(!p.match(/\S*Error: /)){for(var h of i){var g=h(p,r);if(g){u.push(g);break}}if(u.length>=50)break}}}return(function(_){if(!_.length)return[];var m=Array.from(_);return m.reverse(),m.slice(0,50).map((y=>{return F({},y,{filename:y.filename||(E=m,E[E.length-1]||{}).filename,function:y.function||Ms});var E}))})(u)}})("web:javascript",AN,NN)),this._instance=t,this.rl=(e=(n=this._instance.persistence)==null?void 0:n.get_property(Dd))!==null&&e!==void 0?e:[],this.sl=Sl(this.al()),this.ol=new WN(this.sl)}onConfigChange(){this.sl=Sl(this.al()),this.ol.setConfig(this.sl)}onRemoteConfig(t){var e,n,r;if(t.ok){var s=t.config;if("errorTracking"in s){var i=(e=(n=s.errorTracking)==null?void 0:n.suppressionRules)!==null&&e!==void 0?e:[],o=(r=s.errorTracking)==null?void 0:r.captureExtensionExceptions;this.rl=i,this._instance.persistence&&this._instance.persistence.register({[Dd]:this.rl,[Nd]:o})}}}get ll(){var t,e=!!this._instance.get_property(Nd),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??e)!==null&&t!==void 0&&t}buildProperties(t,e){return this.nl.buildFromUnknown(t,{syntheticException:e==null?void 0:e.syntheticException,mechanism:{handled:e==null?void 0:e.handled}})}addExceptionStep(t,e){if(this.sl.enabled)try{if(!ve(t)||t.trim().length===0)return void sn.warn("Ignoring exception step because message must be a non-empty string");var n=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};var o=[];return{sanitizedProperties:Object.keys(i).reduce(((a,l)=>qN.has(l)?(o.push(l),a):(a[l]=i[l],a)),{}),droppedKeys:o}})(this.ul(e)),r=n.sanitizedProperties,s=n.droppedKeys;s.length>0&&sn.warn("Ignoring reserved exception step fields",{droppedKeys:s}),this.ol.add(F({[yl]:t,[bl]:new Date().toISOString()},r))}catch(i){sn.error("Failed to add exception step. Ignoring breadcrumb.",i)}}sendExceptionEvent(t){try{var e=t.$exception_list;if(this.hl(e)){if(this.dl(e))return this.vl("Exception dropped: matched a suppression rule"),void sn.info("Skipping exception capture because a suppression rule matched");if(!this.ll&&this.cl(e))return this.vl("Exception dropped: thrown by a browser extension"),void sn.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.fl(e))return this.vl("Exception dropped: thrown by the PostHog SDK"),void sn.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.sl.enabled&&se(t.$exception_steps)?this.pl(t):t,r=typeof(i=globalThis._posthogReleaseId)=="string"&&i.length>0?i:void 0;r&&(n.$release_id=r);try{var s=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",Qn:!0});return s&&this.ol.clear(),s}catch(o){return sn.error("Failed to capture exception event. Dropping this exception.",o),void this.ol.clear()}}catch(o){return void sn.error("Failed to process exception event. Ignoring this exception.",o)}var i}pl(t){try{var e=this.ol.getAttachable();return e.length===0?t:F({},t,{$exception_steps:e})}catch(n){return sn.error("Failed to read buffered exception steps. Capturing exception without steps.",n),t}}vl(t){this.sl.enabled&&this.ol.add({[yl]:t,[bl]:new Date().toISOString()})}ul(t){return je(t)?F({},t):{}}al(){var t,e;return(t=(e=this._instance.config.error_tracking)==null?void 0:e.exception_steps)!==null&&t!==void 0?t:{}}dl(t){if(t.length===0)return!1;try{var e=t.reduce(((n,r)=>{var s=r.type,i=r.value;return ve(s)&&s.length>0&&n.$exception_types.push(s),ve(i)&&i.length>0&&n.$exception_values.push(i),n}),{$exception_types:[],$exception_values:[]});return this.rl.some((n=>{var r=n.values.map((s=>{var i=cE[s.operator],o=e[s.key];if(!i||!o)return!1;var a=te(s.value)?s.value:[s.value];return a.length>0&&i(a,o)}));return n.type==="OR"?r.some(Boolean):r.every(Boolean)}))}catch(n){return sn.warn("Failed to evaluate suppression rules. Capturing the exception.",n),!1}}cl(t){return t.flatMap((e=>{var n,r;return(n=(r=e.stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[]})).some((e=>e.filename&&e.filename.startsWith("chrome-extension://")))}fl(t){if(t.length>0){var e,n,r,s,i=(e=(n=t[0].stacktrace)==null?void 0:n.frames)!==null&&e!==void 0?e:[],o=i[i.length-1];return(r=o==null||(s=o.filename)==null?void 0:s.includes("posthog.com/static"))!==null&&r!==void 0&&r}return!1}hl(t){return!se(t)&&te(t)}}},pM=F({productTours:class{get Mr(){return this._instance.persistence}constructor(t){this.gl=null,this.ml=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(t.ok){var e=t.config;if("productTours"in e){var n,r;if(this.Mr&&this.Mr.register({[yh]:!!e.productTours}),!fc(this._instance))return!this.gl&&se((n=this.Mr)==null?void 0:n.props[Ri])||oa.info("product tours disabled; stopping and clearing cached tours"),(r=this.gl)==null||r.stop(),this.gl=null,void this.clearCache();this.loadIfEnabled()}}}loadIfEnabled(){!this.gl&&fc(this._instance)&&this.ai((()=>this.yl()))}ai(t){var e,n;(e=K.__PosthogExtensions__)!=null&&e.generateProductTours?t():(n=K.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(r=>{r?oa.error("Could not load product tours script",r):t()}))}yl(){var t;!this.gl&&(t=K.__PosthogExtensions__)!=null&&t.generateProductTours&&(this.gl=K.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e){if(e===void 0&&(e=!1),!te(this.ml)||e){var n=this.Mr;if(n){var r=n.props[Ri];if(te(r)&&!e)return this.ml=r,void t(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",timestampMode:"query",callback:s=>{if(fc(this._instance)){var i=s.statusCode;if(i!==200||!s.json){var o="Product Tours API could not be loaded, status: "+i;return i===0?s.error||oa.warn(o):oa.error(o),void t([],{isLoaded:!1,error:o})}var a=te(s.json.product_tours)?s.json.product_tours:[];this.ml=a,n&&n.register({[Ri]:a}),t(a,{isLoaded:!0})}else t([],{isLoaded:!0})}})}else t(this.ml,{isLoaded:!0})}getActiveProductTours(t){se(this.gl)?t([],{isLoaded:!1,error:"Product tours not loaded"}):this.gl.getActiveProductTours(t)}showProductTour(t){var e;(e=this.gl)==null||e.showTourById(t)}previewTour(t){this.gl?this.gl.previewTour(t):this.ai((()=>{var e;this.yl(),(e=this.gl)==null||e.previewTour(t)}))}dismissProductTour(){var t;(t=this.gl)==null||t.dismissTour("user_clicked_skip")}nextStep(){var t;(t=this.gl)==null||t.nextStep()}previousStep(){var t;(t=this.gl)==null||t.previousStep()}clearCache(){var t;this.ml=null,(t=this.Mr)==null||t.unregister(Ri)}resetTour(t){var e;(e=this.gl)==null||e.resetTour(t)}resetAllTours(){var t;(t=this.gl)==null||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.gl)==null||e.cancelPendingTour(t)}}},uu),gM={siteApps:class{constructor(t){this.bl=0,this._instance=t,this._l=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}wl(t,e){if(e){var n=this.globalsForEvent(e);this._l.push(n),this._l.length>1e3&&(this._l=this._l.slice(10))}}get siteAppLoaders(){var t;return(t=K._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.siteApps}initialize(){if(this.isEnabled){var t=this._instance._addCaptureHook(this.wl.bind(this));this.kl=()=>{t(),this._l=[],this.kl=void 0}}}globalsForEvent(t){var e,n,r,s,i,o,a;if(!t)throw new Error("Event payload is required");var l={},u=this._instance.get_property("$groups")||[],c=this._instance.get_property("$stored_group_properties")||{};
27for(var d of Object.entries(c)){var f=d[0];l[f]={id:u[f],type:f,properties:d[1]}}var p=t.$set_once,h=t.$set;return{event:F({},L0(t,sM),{properties:F({},t.properties,h?{$set:F({},(e=(n=t.properties)==null?void 0:n.$set)!==null&&e!==void 0?e:{},h)}:{},p?{$set_once:F({},(r=(s=t.properties)==null?void 0:s.$set_once)!==null&&r!==void 0?r:{},p)}:{}),elements_chain:(i=(o=t.properties)==null?void 0:o.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(a=t.properties)==null?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}xl(t){var e,n=(e=t.tagName)==null?void 0:e.toLowerCase();return n==="style"&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(t)||(rn.error("prepare_external_dependency_stylesheet returned null"),null):n==="script"&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(t)||(rn.error("prepare_external_dependency_script returned null"),null):t}Sl(){var t,e,n,r,s,i,o,a;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var l=H==null?void 0:H.defaultView,u=l==null||(t=l.Node)==null?void 0:t.prototype;if(!l||!u)return()=>{};if(this.bl++,this.Cl)return this.Ml();var c=[],d=this,f=new WeakSet,p=(_,m,y)=>{if(_!=null&&_[m]){var E=_[m];_[m]=y(E),c.push((()=>{_[m]=E}))}},h=_=>{if(f.has(_))return _;var m=d.xl(_);return m&&f.add(m),m},g=_=>_.map((m=>typeof m=="string"?m:h(m))).filter((m=>!Nt(m)));return p(u,"appendChild",(_=>function(m){var y=h(m);return y?_.call(this,y):m})),p(u,"insertBefore",(_=>function(m,y){var E=h(m);return E?_.call(this,E,y):m})),p(u,"replaceChild",(_=>function(m,y){var E=h(m);return E?_.call(this,E,y):y})),[(e=l.Element)==null?void 0:e.prototype,(n=l.Document)==null?void 0:n.prototype,(r=l.DocumentFragment)==null?void 0:r.prototype].forEach((_=>{p(_,"append",(m=>function(){for(var y=arguments.length,E=new Array(y),T=0;y>T;T++)E[T]=arguments[T];return m.apply(this,g(E))})),p(_,"prepend",(m=>function(){for(var y=arguments.length,E=new Array(y),T=0;y>T;T++)E[T]=arguments[T];return m.apply(this,g(E))}))})),[(s=l.Element)==null?void 0:s.prototype,(i=l.CharacterData)==null?void 0:i.prototype,(o=l.DocumentType)==null?void 0:o.prototype].forEach((_=>{p(_,"before",(m=>function(){for(var y=arguments.length,E=new Array(y),T=0;y>T;T++)E[T]=arguments[T];return m.apply(this,g(E))})),p(_,"after",(m=>function(){for(var y=arguments.length,E=new Array(y),T=0;y>T;T++)E[T]=arguments[T];return m.apply(this,g(E))})),p(_,"replaceWith",(m=>function(){for(var y=arguments.length,E=new Array(y),T=0;y>T;T++)E[T]=arguments[T];var I=g(E);return E.length&&!I.length?void 0:m.apply(this,I)}))})),p((a=l.Element)==null?void 0:a.prototype,"insertAdjacentElement",(_=>function(m,y){var E=h(y);return E?_.call(this,m,E):null})),this.Cl=()=>{c.forEach((_=>_())),this.Cl=void 0},this.Ml()}Ml(){var t=!1;return()=>{var e;t||(t=!0,this.bl--,this.bl===0&&((e=this.Cl)==null||e.call(this)))}}Tl(t,e){e===void 0&&(e=!0);var n=this.Sl();try{var r=t(n);return e&&n(),r}catch(s){throw n(),s}}setupSiteApp(t){var e=this.apps[t.id],n=()=>{var o;!e.errored&&this._l.length&&(rn.info("Processing "+this._l.length+" events for site app with id "+t.id),this._l.forEach((a=>this.Tl((()=>e.processEvent==null?void 0:e.processEvent(a))))),e.processedBuffer=!0),Object.values(this.apps).every((a=>a.processedBuffer||a.errored))&&((o=this.kl)==null||o.call(this))},r=!1,s=o=>{e.errored=!o,e.loaded=!0,rn.info("Site app with id "+t.id+" "+(o?"loaded":"errored")),r&&n()};try{var i=this.Tl((o=>t.init({posthog:this._instance,callback(a){o(),s(a)}})),!1).processEvent;i&&(e.processEvent=i),r=!0}catch(o){rn.error(Mm+t.id,o),s(!1)}if(r&&e.loaded)try{n()}catch(o){rn.error("Error while processing buffered events PostHog app with config id "+t.id,o),e.errored=!0}}El(){var t=this.siteAppLoaders||[];for(var e of t)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of t)this.setupSiteApp(n)}Il(t){var e=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(t),r=function(i){try{e.Tl((()=>i.processEvent==null?void 0:i.processEvent(n)))}catch(o){rn.error("Error while processing event "+t.event+" for site app "+i.id,o)}};for(var s of Object.values(this.apps))r(s)}}onRemoteConfig(t){var e,n,r,s=this;
27if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.El(),void this._instance.on("eventCaptured",(l=>this.Il(l)))):void rn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.kl)==null||n.call(this),t.ok){var i=t.config;if((r=i.siteApps)!=null&&r.length)if(this.isEnabled){var o=function(){var l,u=a.id,c=a.url;K["__$$ph_site_app_"+u]=s._instance,(l=K.__PosthogExtensions__)==null||l.loadSiteApp==null||l.loadSiteApp(s._instance,c,(d=>{if(d)return rn.error(Mm+u,d)}))};for(var a of i.siteApps)o()}else rn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}},mM={tracingHeaders:class{constructor(t){this.Pl=void 0,this.Rl=void 0,this.Al=void 0,this.Zo=()=>{var e,n,r=this.Fl();r?(U(this.Pl)&&(this.Pl=(e=K.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null?void 0:e._patchXHR(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),U(this.Rl)&&(this.Rl=(n=K.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.Xo()},this._instance=t}initialize(){this.startIfEnabledOrStop()}ai(t){var e,n;(e=K.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns?t():(n=K.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(r=>{if(r)return nM.error("failed to load script",r);t()}))}Ll(){var t,e;return(t=(e=this._instance.config.tracing_headers)!==null&&e!==void 0?e:this._instance.config.addTracingHeaders)!==null&&t!==void 0?t:this._instance.config.__add_tracing_headers}Fl(){var t=this.Ll();return te(t)?(te(this.Al)?this.Al.splice(0,this.Al.length,...t):this.Al=[...t],t.length>0?this.Al:void 0):(te(this.Al)&&this.Al.splice(0),this.Al=t||void 0,this.Al)}Xo(){var t,e;(t=this.Pl)==null||t.call(this),(e=this.Rl)==null||e.call(this),this.Pl=void 0,this.Rl=void 0}startIfEnabledOrStop(){this.Fl()?this.ai(this.Zo):this.Xo()}}},_M=F({surveys:class{get Ne(){return this._instance.config}constructor(t){this.Ol=void 0,this._surveyManager=null,this.Dl=!1,this.$l=[],this.Nl=null,this.ql=null,this._instance=t,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this.Ne.disable_surveys){if(!t.ok)return Te.warn("Remote config unavailable. Not loading surveys.");var e=t.config.surveys;if(se(e))return Te.warn("Flags not loaded yet. Not loading surveys.");var n=te(e);this.Ol=n?e.length>0:e,Te.info("flags response received, isSurveysEnabled: "+this.Ol),this.loadIfEnabled()}}reset(){try{var t;(t=this._surveyEventReceiver)==null||t.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var e=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(hE)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach((s=>localStorage.removeItem(s)))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.Dl)Te.info("Already initializing surveys, skipping...");else if(this.Ne.disable_surveys)Te.info(Fm);else if(this.Ne.cookieless_mode&&this._instance.consent.isOptedOut())Te.info("Not loading surveys in cookieless mode without consent.");else{var t=K==null?void 0:K.__PosthogExtensions__;if(t){if(!U(this.Ol)||this.Ne.advanced_enable_surveys){var e=this.Ol||this.Ne.advanced_enable_surveys;this.Dl=!0;try{var n=t.generateSurveys;if(n)return void this.jl(n,e);var r=t.loadExternalDependency;if(!r)return void this.Bl(Sh);r(this._instance,"surveys",(s=>{s||!t.generateSurveys?this.Bl("Could not load surveys script",s):this.jl(t.generateSurveys,e)}))}catch(s){throw this.Bl("Error initializing surveys",s),s}finally{this.Dl=!1}}}else Te.error("PostHog Extensions not found.")}}jl(t,e){this._surveyManager=t(this._instance,e),this._surveyEventReceiver=new aM(this._instance),Te.info("Surveys loaded successfully"),this.Hl({isLoaded:!0})}Bl(t,e){Te.error(t,e),this.Hl({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.$l.push(t),this._surveyManager&&this.Hl({isLoaded:!0}),()=>{this.$l=this.$l.filter((e=>e!==t))}}getSurveys(t,e){if(e===void 0&&(e=!1),this.Ne.disable_surveys)return Te.info(Fm),t([]);var n,r=this._instance.get_property($d);if(r&&!e)return t(r,{isLoaded:!0}
27),void(this.Ul()&&this.getSurveys((()=>{}),!0));typeof Promise<"u"&&this.Nl?this.Nl.then((s=>t(s.surveys,s.context))):(typeof Promise<"u"&&(this.Nl=new Promise((s=>{n=s}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Ne.token),method:"GET",timestampMode:"query",timeout:this.Ne.surveys_request_timeout_ms,callback:s=>{var i;this.Nl=null;var o=s.statusCode;if(o!==200||!s.json){var a="Surveys API could not be loaded, status: "+o;o!==0?Te.error(a):s.error||Te.warn(a),this.ql=Date.now();var l={isLoaded:!1,error:a};return t([],l),void(n==null||n({surveys:[],context:l}))}this.ql=null;var u,c=s.json.surveys||[],d=c.filter((p=>(function(h){return!(!h.start_date||h.end_date)})(p)&&(fE(p)||(function(h){var g;return!((g=h.conditions)==null||(g=g.actions)==null||(g=g.values)==null||!g.length)})(p))));d.length>0&&((u=this._surveyEventReceiver)==null||u.register(d)),(i=this._instance.persistence)==null||i.register({[$d]:c,[wl]:Date.now()});var f={isLoaded:!0};t(c,f),n==null||n({surveys:c,context:f})}}))}Ul(){return this.zl()&&!this.Nl&&!this.Wl()}zl(){var t=this._instance.get_property(wl);return et(t)&&Date.now()-t>3e5}Wl(){return et(this.ql)&&3e5>Date.now()-this.ql}markSurveyAsSeen(t,e){var n,r={id:t,current_iteration:(n=e==null?void 0:e.iteration)!==null&&n!==void 0?n:null};pE(r);try{localStorage.setItem("lastSeenSurveyDate",new Date().toISOString())}catch{}}Hl(t){for(var e of this.$l)try{if(!t.isLoaded)return e([],t);this.getSurveys(e)}catch(n){Te.error("Error in survey callback",n)}}getActiveMatchingSurveys(t,e){if(e===void 0&&(e=!1),!se(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,e);Te.warn("init was not called")}Vl(t){var e=null;return this.getSurveys((n=>{var r;e=(r=n.find((s=>s.id===t)))!==null&&r!==void 0?r:null})),e}Zl(t){if(se(this._surveyManager))return{eligible:!1,reason:aa};var e=typeof t=="string"?this.Vl(t):t;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}Gl(t){if(se(this._surveyManager))return{eligible:!1,reason:aa};var e=typeof t=="string"?this.Vl(t):t;return e?this._surveyManager.checkSurveyRenderability(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(se(this._surveyManager))return Te.warn("init was not called"),{visible:!1,disabledReason:aa};var e=this.Gl(t);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(t,e){return se(this._surveyManager)?(Te.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:aa})):new Promise((n=>{this.getSurveys((r=>{var s,i=(s=r.find((a=>a.id===t)))!==null&&s!==void 0?s:null;if(i){var o=this.Gl(i);n({visible:o.eligible,disabledReason:o.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),e)}))}renderSurvey(t,e,n){var r;if(se(this._surveyManager))Te.warn("init was not called");else{var s=typeof t=="string"?this.Vl(t):t;if(s!=null&&s.id)if(VL.includes(s.type)){var i=H==null?void 0:H.querySelector(e);if(i)return(r=s.appearance)!=null&&r.surveyPopupDelaySeconds?(Te.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var o,a;Te.info("Rendering survey "+s.id+" with delay of "+((o=s.appearance)==null?void 0:o.surveyPopupDelaySeconds)+" seconds"),(a=this._surveyManager)==null||a.renderSurvey(s,i,n),Te.info("Survey "+s.id+" rendered")}),1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,i,n);Te.warn("Survey element not found")}else Te.warn("Surveys of type "+s.type+" cannot be rendered in the app");else Te.warn("Survey not found")}}displaySurvey(t,e){var n;if(se(this._surveyManager))Te.warn("init was not called");else{var r=this.Vl(t);if(r){var s=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&e.ignoreDelay&&(s=F({},r,{appearance:F({},r.appearance,{surveyPopupDelaySeconds:0})})),e.displayType!==Kd.Popover&&e.initialResponses&&Te.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){var i=this.Zl(r);if(!i.eligible)return void Te.warn("Survey is not eligible to be displayed: ",i.reason)}e.displayType!==Kd.Inline?this._surveyManager.handlePopoverSurvey(s,e):this.renderSurvey(s,e.selector,e.properties)}else Te.warn("Survey not found")}}cancelPendingSurvey(t){se(this._surveyManager)?Te.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload==null||t.handlePageUnload()}}},uu),vM={toolbar:class{constructor(t){this.instance=t}Ql(t){K.ph_toolbar_state=t}Kl(){var t;return(t=K.ph_toolbar_state)!==null&&t!==void 0?t:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(t,e,n){if(t===void 0&&(t=void 0),e===void 0&&(e=void 0),n===void 0&&(n=void 0),qd(this.instance.config)||!D||!H)return!1;t=t??D.location,n=n??D.history;try{if(!e){try{D.localStorage.setItem("test","test"),D.localStorage.removeItem("test")}catch{return!1}e=D==null?void 0:D.localStorage}var r,s=lM||Rl(t.hash,"__posthog")||Rl(t.hash,"state"),i=s?em((()=>JSON.parse(atob(decodeURIComponent(s)))))||em((()=>JSON.parse(decodeURIComponent(s)))):null;return i&&i.action==="ph_authorize"?((r=i).source="url",r&&Object.keys(r).length>0&&(i.desiredHash?t.hash=i.desiredHash:n?n.replaceState(n.state,"",t.pathname+t.search):t.hash="")):((r=JSON.parse(e.getItem($m)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}Jl(t){var e=K.ph_load_toolbar||K.ph_load_editor;!se(e)&&Tt(e)?e(t,this.instance):jm.warn("No toolbar load function found")}loadToolbar(t){var e=!(H==null||!H.getElementById(CS));if(!D||e)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=F({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(D.localStorage.setItem($m,JSON.stringify(F({},r,{source:void 0}))),this.Kl()===2)this.Jl(r);else if(this.Kl()===0){var s;this.Ql(1),(s=K.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return jm.error("[Toolbar] Failed to load",i),void this.Ql(0);this.Ql(2),this.Jl(r)})),Ve(D,"turbolinks:load",(()=>{this.Ql(0),this.loadToolbar(r)}))}return!0}Yl(t){return this.loadToolbar(t)}maybeLoadEditor(t,e,n){return t===void 0&&(t=void 0),e===void 0&&(e=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(t,e,n)}}},yM=F({experiments:yt},uu),bM={conversations:class{constructor(t){this.Xl=void 0,this._conversationsManager=null,this.tu=!1,this.eu=null,this.iu=!1,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this._instance.config.disable_conversations&&(this.ru=t.ok,t.ok)){var e=t.config.conversations;se(e)||(Ut(e)?this.Xl=e:(this.Xl=e.enabled,this.eu=e),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.Xl=void 0,this.eu=null,this.ru=void 0,this.iu=!1}loadIfEnabled(){if(!(this._conversationsManager||this.tu||this._instance.config.disable_conversations||qd(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=K==null?void 0:K.__PosthogExtensions__;if(t&&!U(this.Xl)&&this.Xl)if(this.eu&&this.eu.token){this.tu=!0;try{var e=t.initConversations;if(e)return this.nu(e),void(this.tu=!1);var n=t.loadExternalDependency;if(!n)return void this.su(Sh);n(this._instance,"conversations",(r=>{r||!t.initConversations?this.su("Could not load conversations script",r):this.nu(t.initConversations),this.tu=!1}))}catch(r){this.su("Error initializing conversations",r),this.tu=!1}}else qt.error("Conversations enabled but missing token in remote config.")}}nu(t){if(this.eu)try{this._conversationsManager=t(this.eu,this._instance),this.iu=!1,qt.info("Conversations loaded successfully")}catch(e){this.su("Error completing conversations initialization",e)}else qt.error("Cannot complete initialization: remote config is null")}su(t,e){qt.error(t,e),this._conversationsManager=null,this.tu=!1,this.iu=!0}show(){this._conversationsManager?this._conversationsManager.show():qt.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Xl===!0&&!Nt(this._conversationsManager)}getUnavailableReason(){return this.isAvailable()?null:this._instance.config.disable_conversations?"disabled_by_config":qd(this._instance.config)?"disabled_for_toolbar":this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut()?"consent_opted_out":this.ru===!1?"remote_config_failed":U(this.Xl)?this.ru?"disabled_in_project":"remote_config_pending":this.Xl?se(this.eu)||!this.eu.token?"missing_token":K!=null&&K.__PosthogExtensions__?this.tu?"initializing":this.iu?"load_failed":"not_loaded":"extensions_unavailable":"disabled_in_project"}isVisible(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.isVisible())!==null&&t!==void 0&&t}sendMessage(t,e,n){var r=this;return Pe((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(t,e,n):(qt.warn(hr),null)}))()}getMessages(t,e){var n=this;return Pe((function*(){return n._conversationsManager?n._conversationsManager.getMessages(t,e):(qt.warn(hr),null)}))()}markAsRead(t){var e=this;return Pe((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(qt.warn(hr),null)}))()}getTickets(t){var e=this;return Pe((function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(qt.warn(hr),null)}))()}requestRestoreLink(t){var e=this;return Pe((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(qt.warn(hr),null)}))()}restoreFromToken(t){var e=this;return Pe((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(qt.warn(hr),null)}))()}restoreFromUrlToken(){var t=this;return Pe((function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(qt.warn(hr),null)}))()}getCurrentTicketId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getCurrentTicketId())!==null&&t!==void 0?t:null}getWidgetSessionId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getWidgetSessionId())!==null&&t!==void 0?t:null}ns(){var t;(t=this._conversationsManager)==null||t.setIdentity()}ss(){var t;(t=this._conversationsManager)==null||t.clearIdentity()}}},SM={logs:class{constructor(t){var e,n=this;this.au=!1,this.ou=!1,this.rt=Ue("[logs]"),this.lu=F({},this.rt,{error(){for(var r=arguments.length,s=new Array(r),i=0;r>i;i++)s[i]=arguments[i];s.some(Gm)||n.rt.error(...s)}}),this.tr=[],this.uu=[],this.Ea=0,this.hu=()=>{var r,s;this.Ea=0,(r=this.du)==null||r.onReconnect(),(s=this.vu)==null||s.onReconnect()},this._instance=t,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.au=!0),D&&Ve(D,"online",this.hu)}cu(t,e,n,r){var s,i=(function(o,a){var l,u,c,d,f,p,h,g=(l=o==null?void 0:o.flushIntervalMs)!==null&&l!==void 0?l:3e3,_=(u=o==null?void 0:o.maxBufferSize)!==null&&u!==void 0?u:100,m=a!=null&&a.consoleCapture?void 0:(c=o==null?void 0:o.maxLogsPerInterval)!==null&&c!==void 0?c:1e3,y=U(m)?Math.max(_,2048):Math.max(_,m),E=o==null?void 0:o.resourceAttributes;return{serviceName:(d=(f=E==null?void 0:E["service.name"])!==null&&f!==void 0?f:o==null?void 0:o.serviceName)!==null&&d!==void 0?d:a==null?void 0:a.serviceNameDefault,serviceVersion:(p=E==null?void 0:E["service.version"])!==null&&p!==void 0?p:o==null?void 0:o.serviceVersion,environment:(h=E==null?void 0:E["deployment.environment"])!==null&&h!==void 0?h:o==null?void 0:o.environment,resourceAttributes:E,beforeSend:o==null?void 0:o.beforeSend,flushIntervalMs:g,maxBufferSize:_,maxQueueSize:y,maxBatchRecordsPerPost:100,rateCapWindowMs:g,maxLogsPerInterval:m,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}})((s=this._instance)==null||(s=s.config)==null?void 0:s.logs,n);return[new xN(this.fu(t,e),i,this.lu,(()=>this.pu()),(o=>o()),void 0,r),i]}gu(){var t,e=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;if(!this.du||this.mu!==e){var n;(n=this.du)==null||n.reset(),this.mu=e;var r=this.cu((()=>this.tr),(s=>{this.tr=s}));this.du=r[0],this.yu=r[1]}return this.du}bu(){var t,e=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;if(!this.vu||this._u!==e){var n;(n=this.vu)==null||n.reset(),this._u=e;var r=this.cu((()=>this.uu),(s=>{this.uu=s}),{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},Wm);this.vu=r[0],this.wu=r[1]}return this.vu}initialize(){this.loadIfEnabled()}onRemoteConfig(t){var e;if(t.ok){var n=(e=t.config.logs)==null?void 0:e.captureConsoleLogs;!se(n)&&n&&(this.au=!0,this.loadIfEnabled())}}reset(){var t,e;this.tr=[],(t=this.du)==null||t.reset(),this.uu=[],(e=this.vu)==null||e.reset(),this.Ea=0}captureLog(t){this.gu().captureLog(t)}he(t){this.bu().captureLog(t)}get logger(){return this.ku||(this.ku={trace:(t,e)=>this.captureLog({body:t,level:"trace",attributes:e}),debug:(t,e)=>this.captureLog({body:t,level:"debug",attributes:e}),info:(t,e)=>this.captureLog({body:t,level:"info",attributes:e}),warn:(t,e)=>this.captureLog({body:t,level:"warn",attributes:e}),error:(t,e)=>this.captureLog({body:t,level:"error",attributes:e}),fatal:(t,e)=>this.captureLog({body:t,level:"fatal",attributes:e})}),this.ku}flushLogs(t){t?this.xu(t):(this.du&&this.du.flush().catch((e=>this.Su(e))),this.vu&&this.vu.flush().catch((e=>this.Su(e))))}Su(t){Gm(t)||this.rt.error("PostHog logs flush failed:",t)}loadIfEnabled(){if(this.au&&!this.ou){var t=K==null?void 0:K.__PosthogExtensions__;if(t){var e=t.loadExternalDependency;e?e(this._instance,"logs",(n=>{var r;n||(r=t.logs)==null||!r.initializeLogs?this.rt.error("Could not load logs script",n):(t.logs.initializeLogs(this._instance),this.ou=!0)})):this.rt.error(Sh)}else this.rt.error("PostHog Extensions not found.")}}fu(t,e){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:r=>r===En.LogsQueue?t():void 0,setPersistedProperty(r,s){var i;r===En.LogsQueue&&e((i=s)!==null&&i!==void 0?i:[])},Ot:r=>this.Ot(r),getLibraryId:()=>Re.LIB_NAME,getLibraryVersion:()=>Re.LIB_VERSION}}Ot(t){return new Promise((e=>{if(BS(this.Ea,3))e({kind:"fatal",error:pc(void 0,"logs endpoint is unreachable, dropping batch")});else{var n=!1,r=i=>{n||(n=!0,clearTimeout(s),e(i))},s=setTimeout((()=>{this.rt.warn("Logs request timed out before receiving a response"),r({kind:"retry-later",error:pc(void 0,"logs request timed out")})}),9e4);this._instance._send_request({method:"POST",url:this.Cu(),data:t,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:i=>{var o=i.statusCode;if(this.Mu(o),o>=200&&300>o)r({kind:"ok"});else if(o===413)r({kind:"too-large"});else if(o!==0&&o!==429&&500>o)r({kind:"fatal",error:new Error("logs request failed with status "+o)});else{var a;o===0?(i.error||this.rt.warn("Logs request failed before receiving an HTTP response"),r({kind:"retry-later",error:pc(i.error,"logs request failed before receiving an HTTP response")})):r({kind:"retry-later",error:(a=i.error)!==null&&a!==void 0?a:new Error("logs request failed with status "+o)})}}})}}))}Mu(t){(t!==0||this._instance.__loaded)&&(this.Ea=HS(t,this.Ea,3,(()=>this.rt.warn("Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes."))))}xu(t){this.tr.length>0&&this.Tu(t,this.tr,this.yu,Re.LIB_NAME,(e=>{this.tr=e})),this.uu.length>0&&this.Tu(t,this.uu,this.wu,Wm,(e=>{this.uu=e}))}Tu(t,e,n,r,s){if(e.length!==0){var i=e.map((a=>a.record));s([]);var o=fS(i,dS(n,Re.LIB_NAME,Re.LIB_VERSION),r,Re.LIB_VERSION);this._instance._send_request({method:"POST",url:this.Cu(),data:o,compression:"best-available",batchKey:"logs",transport:t})}}Cu(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}pu(){var t,e={};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var n=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0),r=n.windowId,s=n.sessionStartTimestamp,i=n.lastActivityTimestamp;e.sessionId=n.sessionId,e.windowId=
27r,se(s)||(e.sessionStartTimestamp=s),se(i)||(e.lastActivityTimestamp=i)}if(K!=null&&(t=K.location)!=null&&t.href&&(e.currentUrl=this._instance.config.disable_capture_url_hashes?er(K.location.href):K.location.href),this._instance.featureFlags){var o=this._instance.featureFlags.getFlags();o&&o.length>0&&(e.activeFeatureFlags=o)}return e}}},EM={metrics:class{constructor(t){this.rt=Ue("[metrics]"),this._instance=t}initialize(){}gu(){var t,e,n=(t=this._instance)==null||(t=t.config)==null?void 0:t.metrics;return this.du&&this.mu===n||((e=this.du)==null||e.reset(),this.mu=n,this.du=new TN(this.fu(),(function(r){var s,i,o,a,l,u=r==null?void 0:r.resourceAttributes;return{serviceName:(s=u==null?void 0:u["service.name"])!==null&&s!==void 0?s:r==null?void 0:r.serviceName,serviceVersion:(i=u==null?void 0:u["service.version"])!==null&&i!==void 0?i:r==null?void 0:r.serviceVersion,environment:(o=u==null?void 0:u["deployment.environment"])!==null&&o!==void 0?o:r==null?void 0:r.environment,resourceAttributes:u,beforeSend:r==null?void 0:r.beforeSend,flushIntervalMs:(a=r==null?void 0:r.flushIntervalMs)!==null&&a!==void 0?a:1e4,maxSeriesPerFlush:(l=r==null?void 0:r.maxSeriesPerFlush)!==null&&l!==void 0?l:1e3}})(n),this.rt)),this.du}count(t,e,n){e===void 0&&(e=1),this.gu().count(t,e,n)}gauge(t,e,n){this.gu().gauge(t,e,n)}histogram(t,e,n){this.gu().histogram(t,e,n)}flush(t){if(!this.du)return Promise.resolve();if(t){var e=this.du.drainWindow();return e&&this.Jt(e,t),Promise.resolve()}return this.du.flush().catch((n=>this.rt.error("PostHog metrics flush failed:",n)))}reset(){var t;(t=this.du)==null||t.reset()}fu(){var t=this._instance,e=this;return{get isDisabled(){return!1},get optedOut(){return!t.is_capturing()},Jt:n=>e.Jt(n),getLibraryId:()=>Re.LIB_NAME,getLibraryVersion:()=>Re.LIB_VERSION}}Jt(t,e){return new Promise((n=>{var r=!1,s=o=>{r||(r=!0,clearTimeout(i),n(o))},i=setTimeout((()=>s({kind:"retry-later",error:new Error("metrics request timed out")})),9e4);this._instance._send_request(F({method:"POST",url:this.Eu(),data:t,compression:"best-available",batchKey:"metrics"},e&&{transport:e},{fireCallbackOnDrop:!0,callback(o){var a=o.statusCode;if(a>=200&&300>a)s({kind:"ok"});else if(a===413)s({kind:"too-large"});else if(a!==0&&a!==429&&500>a)s({kind:"fatal",error:new Error("metrics request failed with status "+a)});else{var l;s({kind:"retry-later",error:(l=o.error)!==null&&l!==void 0?l:new Error("metrics request failed with status "+a)})}}}))}))}Eu(){return this._instance.requestRouter.endpointFor("api","/i/v1/metrics")+"?token="+encodeURIComponent(this._instance.config.token)}}},wM=F({},uu,dM,fM,hM,pM,gM,_M,mM,vM,yM,bM,SM,EM);jt.__defaultExtensionClasses=F({},wM);var ut=(function(){Re.SDK_DIST_CHANNEL="npm";var t=qi[ds]=new jt;return(function(){function e(){e.done||(e.done=!0,mE=!1,Ae(qi,(function(n){n._dom_loaded()})))}H!=null&&H.addEventListener?H.readyState==="complete"?e():Ve(H,"DOMContentLoaded",e,{capture:!1}):D&&B.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),t})(),vE;function xM(t){vE=t}function nf(){return vE}var ko=b.createContext({get client(){return nf()},bootstrap:void 0});function yE(t,e,n){if(n===void 0&&(n=new WeakMap),t===e)return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(n.has(t)&&n.get(t)===e)return!0;n.set(t,e);var r=Object.keys(t),s=Object.keys(e);if(r.length!==s.length)return!1;for(var i=0,o=r;i<o.length;i++){var a=o[i];if(!s.includes(a)||!yE(t[a],e[a],n))return!1}return!0}function TM(t){var e,n,r=t.children,s=t.client,i=t.apiKey,o=t.options,a=b.useRef(null),l=b.useMemo(function(){if(s)return i&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),o&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),s;var u=nf();return i||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),u},[s,i,JSON.stringify(o)]);return b.useEffect(function(){if(!(s||!i)){var u=nf(),c=a.current;c?(i!==c.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),o&&!yE(o,c.options)&&u.set_config(o),a.current={apiKey:i,options:o??{}}):(u.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),u.init(i,o),a.current={apiKey:i,options:o??{}})}},[s,i,JSON.stringify(o)]),ge.createElement(ko.Provider,{value:{client:l,bootstrap:(e=o==null?void 0:o.bootstrap)!==null&&e!==void 0?e:(n=s==null?void 0:s.config)===null||n===void 0?void 0:n.bootstrap}},r)}var gc=function(t){return typeof t=="function"},Km=function(t){return t===void 0};function IM(t,e){var n,r,s=b.useContext(ko),i=s.client,o=s.bootstrap,a=b.useState(function(){return i.isFeatureEnabled(t)}),l=a[0],u=a[1];b.useEffect(function(){return i.onFeatureFlags(function(){u(i.isFeatureEnabled(t))})},[i,t]);var c=(n=o==null?void 0:o.featureFlags)===null||n===void 0?void 0:n[t];return!(!((r=i==null?void 0:i.featureFlags)===null||r===void 0)&&r.hasLoadedFlags)&&(o!=null&&o.featureFlags)?Km(c)?e:!!c:Km(l)?e:l}function OM(){var t,e=b.useContext(ko),n=e.client,r=e.bootstrap,s=b.useState(function(){return n.featureFlags.getFlags()}),i=s[0],o=s[1];return b.useEffect(function(){return n.onFeatureFlags(function(a){o(a)})},[n]),!(!((t=n==null?void 0:n.featureFlags)===null||t===void 0)&&t.hasLoadedFlags)&&(r!=null&&r.featureFlags)?Object.entries(r.featureFlags).filter(function(a){var l=a[
271];return l}).map(function(a){var l=a[0];return l}):i}var Co=function(){var t=b.useContext(ko).client;return t},rf=function(t,e){return rf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])},rf(t,e)};function kM(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");rf(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var CM={componentStack:null,exceptionEvent:null,error:null},RM={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};(function(t){kM(e,t);function e(n){var r=t.call(this,n)||this;return r.state=CM,r}return e.prototype.componentDidCatch=function(n,r){var s=this.props.additionalProperties,i;gc(s)?i=s(n):typeof s=="object"&&(i=s);var o=this.context.client,a=o.captureException(n,i),l=r.componentStack;this.setState({error:n,componentStack:l??null,exceptionEvent:a})},e.prototype.render=function(){var n=this.props,r=n.children,s=n.fallback,i=this.state;if(i.componentStack==null)return gc(r)?r():r;var o=gc(s)?ge.createElement(s,{error:i.error,componentStack:i.componentStack,exceptionEvent:i.exceptionEvent}):s;return ge.isValidElement(o)?o:(console.warn(RM.INVALID_FALLBACK),ge.createElement(ge.Fragment,null))},e.contextType=ko,e})(ge.Component);xM(ut);function AM(t){return b.createElement(O1,{flushSync:Bf.flushSync,...t})}var la={};/*! 28 * cookie 29 * Copyright(c) 2012-2014 Roman Shtylman 30 * Copyright(c) 2015 Douglas Christopher Wilson 31 * MIT Licensed 32 */var Ym;function PM(){if(Ym)return la;Ym=1,la.parse=r,la.serialize=s;var t=decodeURIComponent,e=encodeURIComponent,n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function r(o,a){if(typeof o!="string")throw new TypeError("argument str must be a string");for(var l={},u=a||{},c=o.split(";"),d=u.decode||t,f=0;f<c.length;f++){var p=c[f],h=p.indexOf("=");if(!(h<0)){var g=p.substring(0,h).trim();if(l[g]==null){var _=p.substring(h+1,p.length).trim();_[0]==='"'&&(_=_.slice(1,-1)),l[g]=i(_,d)}}}return l}function s(o,a,l){var u=l||{},c=u.encode||e;if(typeof c!="function")throw new TypeError("option encode is invalid");if(!n.test(o))throw new TypeError("argument name is invalid");var d=c(a);if(d&&!n.test(d))throw new TypeError("argument val is invalid");var f=o+"="+d;if(u.maxAge!=null){var p=u.maxAge-0;if(isNaN(p)||!isFinite(p))throw new TypeError("option maxAge is invalid");f+="; Max-Age="+Math.floor(p)}if(u.domain){if(!n.test(u.domain))throw new TypeError("option domain is invalid");f+="; Domain="+u.domain}if(u.path){if(!n.test(u.path))throw new TypeError("option path is invalid");f+="; Path="+u.path}if(u.expires){if(typeof u.expires.toUTCString!="function")throw new TypeError("option expires is invali
32d");f+="; Expires="+u.expires.toUTCString()}if(u.httpOnly&&(f+="; HttpOnly"),u.secure&&(f+="; Secure"),u.sameSite){var h=typeof u.sameSite=="string"?u.sameSite.toLowerCase():u.sameSite;switch(h){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return f}function i(o,a){try{return a(o)}catch{return o}}return la}var Ba=PM();function DM(){return typeof document=="object"&&typeof document.cookie=="string"}function NM(t,e){return typeof t=="string"?Ba.parse(t,e):typeof t=="object"&&t!==null?t:{}}function LM(t,e){return typeof e>"u"&&(e=!t||t[0]!=="{"&&t[0]!=="["&&t[0]!=='"'),!e}function Jm(t,e){e===void 0&&(e={});var n=MM(t);if(LM(n,e.doNotParse))try{return JSON.parse(n)}catch{}return t}function MM(t){return t&&t[0]==="j"&&t[1]===":"?t.substr(2):t}var wr=function(){return wr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},wr.apply(this,arguments)},bE=(function(){function t(e,n){var r=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=NM(e,n),new Promise(function(){r.HAS_DOCUMENT_COOKIE=DM()}).catch(function(){})}return t.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=Ba.parse(document.cookie,e))},t.prototype._emitChange=function(e){for(var n=0;n<this.changeListeners.length;++n)this.changeListeners[n](e)},t.prototype.get=function(e,n,r){return n===void 0&&(n={}),this._updateBrowserValues(r),Jm(this.cookies[e],n)},t.prototype.getAll=function(e,n){e===void 0&&(e={}),this._updateBrowserValues(n);var r={};for(var s in this.cookies)r[s]=Jm(this.cookies[s],e);return r},t.prototype.set=function(e,n,r){var s;typeof n=="object"&&(n=JSON.stringify(n)),this.cookies=wr(wr({},this.cookies),(s={},s[e]=n,s)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=Ba.serialize(e,n,r)),this._emitChange({name:e,value:n,options:r})},t.prototype.remove=function(e,n){var r=n=wr(wr({},n),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=wr({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=Ba.serialize(e,"",r)),this._emitChange({name:e,value:void 0,options:n})},t.prototype.addChangeListener=function(e){this.changeListeners.push(e)},t.prototype.removeChangeListener=function(e){var n=this.changeListeners.indexOf(e);n>=0&&this.changeListeners.splice(n,1)},t})();function SE(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=SE(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Kr(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=SE(t))&&(r&&(r+=" "),r+=e);return r}let FM={data:""},$M=t=>{if(typeof window=="object"){let e=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||FM},jM=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,UM=/\/\*[^]*?\*\/| +/g,Xm=/\n+/g,xr=(t,e)=>{let n="",r="",s="";for(let i in t){let o=t[i];i[0]=="@"?i[1]=="i"?n=i+" "+o+";":r+=i[1]=="f"?xr(o,i):i+"{"+xr(o,i[1]=="k"?"":e)+"}":typeof o=="object"?r+=xr(o,e?e.replace(/([^,])+/g,a=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):i):o!=null&&(i=i[1]=="-"?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=xr.p?xr.p(i,o):i+":"+o+";")}return n+(e&&s?e+"{"+s+"}":s)+r},Un={},EE=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+EE(t[n]);return e}return t},BM=(t,e,n,r,s)=>{let i=EE(t),o=Un[i]||(Un[i]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(i));if(!Un[o]){let l=i!==t?t:(u=>{let c,d,f=[{}];for(;c=jM.exec(u.replace(UM,""));)c[4]?f.shift():c[3]?(d=c[3].replace(Xm," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(Xm," ").trim();return f[0]})(t);Un[o]=xr(s?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&Un.g;return n&&(Un.g=Un[o]),((l,u,c,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(Un[o],e,r,a),o},HM=(t,e,n)=>t.reduce((r,s,i)=>{let o=e[i];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":xr(a,""):a===!1?"":a}return r+s+(o??"")},"");function Ch(t){let e=this||{},n=t.call?t(e.p):t;
vendor: 4,510 bytes, line 32
32return BM(n.unshift?n.raw?HM(n,[].slice.call(arguments,1),e.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(e.p):s),{}):n,$M(e.target),e.g,e.o,e.k)}Ch.bind({g:1});Ch.bind({k:1});function VM(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wE(t,e,n){return e&&VM(t.prototype,e),t}function Ce(){return Ce=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ce.apply(this,arguments)}function xE(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Ro(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function Zm(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Qm=function(){return""},TE=ge.createContext({enqueueSnackbar:Qm,closeSnackbar:Qm}),br={downXs:"@media (max-width:599.95px)",upSm:"@media (min-width:600px)"},e_=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Rh=function(e){return""+e_(e.vertical)+e_(e.horizontal)},ua=function(e){return!!e||e===0},ca="unmounted",rs="exited",ss="entering",mi="entered",t_="exiting",Ah=(function(t){xE(e,t);function e(r){var s;s=t.call(this,r)||this;var i=r.appear,o;return s.appearStatus=null,r.in?i?(o=rs,s.appearStatus=ss):o=mi:r.unmountOnExit||r.mountOnEnter?o=ca:o=rs,s.state={status:o},s.nextCallback=null,s}e.getDerivedStateFromProps=function(s,i){var o=s.in;return o&&i.status===ca?{status:rs}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(s){var i=null;if(s!==this.props){var o=this.state.status;this.props.in?o!==ss&&o!==mi&&(i=ss):(o===ss||o===mi)&&(i=t_)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var s=this.props.timeout,i=s,o=s;return s!=null&&typeof s!="number"&&typeof s!="string"&&(o=s.exit,i=s.enter),{exit:o,enter:i}},n.updateStatus=function(s,i){s===void 0&&(s=!1),i!==null?(this.cancelNextCallback(),i===ss?this.performEnter(s):this.performExit()):this.props.unmountOnExit&&this.state.status===rs&&this.setState({status:ca})},n.performEnter=function(s){var i=this,o=this.props.enter,a=s,l=this.getTimeouts();if(!s&&!o){this.safeSetState({status:mi},function(){i.props.onEntered&&i.props.onEntered(i.node,a)});return}this.props.onEnter&&this.props.onEnter(this.node,a),this.safeSetState({status:ss},function(){i.props.onEntering&&i.props.onEntering(i.node,a),i.onTransitionEnd(l.enter,function(){i.safeSetState({status:mi},function(){i.props.onEntered&&i.props.onEntered(i.node,a)})})})},n.performExit=function(){var s=this,i=this.props.exit,o=this.getTimeouts();if(!i){this.safeSetState({status:rs},function(){s.props.onExited&&s.props.onExited(s.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:t_},function(){s.props.onExiting&&s.props.onExiting(s.node),s.onTransitionEnd(o.exit,function(){s.safeSetState({status:rs},function(){s.props.onExited&&s.props.onExited(s.node)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(s,i){i=this.setNextCallback(i),this.setState(s,i)},n.setNextCallback=function(s){var i=this,o=!0;return this.nextCallback=function(){o&&(o=!1,i.nextCallback=null,s())},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(s,i){this.setNextCallback(i);var o=s==null&&!this.props.addEndListener;if(!this.node||o){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),s!=null&&setTimeout(this.nextCallback,s)},n.render=function(){var s=this.state.status;if(s===ca)return null;var i=this.props,o=i.children,a=Ro(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return o(s,a)},wE(e,[{key:"node",get:function(){var s,i=(s=this.props.nodeRef)===null||s===void 0?void 0:s.current;if(!i)throw new Error("notistack - Custom snackbar is not refForwarding");return i}}]),e})(ge.Component);function is(){}Ah.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter
32:!0,exit:!0,onEnter:is,onEntering:is,onEntered:is,onExit:is,onExiting:is,onExited:is};function n_(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function sf(t,e){return b.useMemo(function(){return t==null&&e==null?null:function(n){n_(t,n),n_(e,n)}},[t,e])}function Ll(t){var e=t.timeout,n=t.style,r=n===void 0?{}:n,s=t.mode;return{duration:typeof e=="object"?e[s]||0:e,easing:r.transitionTimingFunction,delay:r.transitionDelay}}var of={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},IE=function(e){e.scrollTop=e.scrollTop},r_=function(e){return Math.round(e)+"ms"};function bs(t,e){t===void 0&&(t=["all"]);var n=e||{},r=n.duration,s=r===void 0?300:r,i=n.easing,o=i===void 0?of.easeInOut:i,a=n.delay,l=a===void 0?0:a,u=Array.isArray(t)?t:[t];return u.map(function(c){var d=typeof s=="string"?s:r_(s),f=typeof l=="string"?l:r_(l);return c+" "+d+" "+o+" "+f}).join(",")}function zM(t){return t&&t.ownerDocument||document}function OE(t){var e=zM(t);return e.defaultView||window}function qM(t,e){e===void 0&&(e=166);var n;function r(){for(var s=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var l=function(){t.apply(s,o)};clearTimeout(n),n=setTimeout(l,e)}return r.clear=function(){clearTimeout(n)},r}function WM(t,e){var n=e.getBoundingClientRect(),r=OE(e),s;if(e.fakeTransform)s=e.fakeTransform;else{var i=r.getComputedStyle(e);s=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var o=0,a=0;if(s&&s!=="none"&&typeof s=="string"){var l=s.split("(")[1].split(")")[0].split(",");o=parseInt(l[4],10),a=parseInt(l[5],10)}switch(t){case"left":return"translateX("+(r.innerWidth+o-n.left)+"px)";case"right":return"translateX(-"+(n.left+n.width-o)+"px)";case"up":return"translateY("+(r.innerHeight+a-n.top)+"px)";default:return"translateY(-"+(n.top+n.height-a)+"px)"}}function da(t,e){if(e){var n=WM(t,e);n&&(e.style.webkitTransform=n,e.style.transform=n)}}var kE=b.forwardRef(function(t,e){var n=t.children,r=t.direction,s=r===void 0?"down":r,i=t.in,o=t.style,a=t.timeout,l=a===void 0?0:a,u=t.onEnter,c=t.onEntered,d=t.onExit,f=t.onExited,p=Ro(t,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),h=b.useRef(null),g=sf(n.ref,h),_=sf(g,e),m=function(R,C){da(s,R),IE(R),u&&u(R,C)},y=function(R){var C=(o==null?void 0:o.transitionTimingFunction)||of.easeOut,S=Ll({timeout:l,mode:"enter",style:Ce({},o,{transitionTimingFunction:C})});R.style.webkitTransition=bs("-webkit-transform",S),R.style.transition=bs("transform",S),R.style.webkitTransform="none",R.style.transform="none"},E=function(R){var C=(o==null?void 0:o.transitionTimingFunction)||of.sharp,S=Ll({timeout:l,mode:"exit",style:Ce({},o,{transitionTimingFunction:C})});R.style.webkitTransition=bs("-webkit-transform",S),R.style.transition=bs("transform",S),da(s,R),d&&d(R)},T=function(R){R.style.webkitTransition="",R.style.transition="",f&&f(R)},I=b.useCallback(function(){h.current&&da(s,h.current)},[s]);return b.useEffect(function(){if(!(i||s==="down"||s==="right")){var x=qM(function(){h.current&&da(s,h.current)}),R=OE(h.current);return R.addEventListener("resize",x),function(){x.clear(),R.removeEventListener("resize",x)}}},[s,i]),b.useEffect(function(){i||I()},[i,I]),b.createElement(Ah,Object.assign({appear:!0,nodeRef:h,onEnter:m,onEntered:c,onEntering:y,onExit:E,onExited:T,in:i,timeout:l},p),function(x,R){return b.cloneElement(n,Ce({ref:_,style:Ce({visibility:x==="exited"&&!i?"hidden":void 0},o,{},n.props.style)},R))})});kE.displayName="Slide";var cu=function(e){return ge.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},GM=function(){return ge.createElement(cu,null,ge.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 33 10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},KM=function(){return ge.createElement(cu,null,ge.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},YM=function(){return ge.createElement(cu,null,ge.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 34 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 35 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},JM=function(){return ge.createElement(cu,null,ge.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 36 0 22,12A10,10 0 0,0 12,2Z`}))},XM={default:void 0,success:ge.createElement(GM,null),warning:ge.createElement(KM,null),error:ge.createElement(YM,null),info:ge.createElement(JM,null)},Nr={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:XM,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:kE,transitionDuration:{enter:225,exit:195}},ZM=function(e,n){var r=function(i){return typeof i=="number"||i===null};return r(e)?e:r(n)?n:Nr.autoHideDuration},QM=function(e,n){var r=function(i,o){return o.some(function(a){return typeof i===a})};return r(e,["string","number"])?e:r(e,["object"])?Ce({},Nr.transitionDuration,{},r(n,["object"])&&n,{},e):r(n,["string","number"])?n:r(n,["object"])?Ce({},Nr.transitionDuration,{},n):Nr.transitionDuration},e2=function(e,n){return function(r,s){return s===void 0&&(s=!1),s?Ce({},Nr[r],{},n[r],{},e[r]):r==="autoHideDuration"?ZM(e.autoHideDuration,n.autoHideDuration):r==="transitionDuration"?QM(e.transitionDuration,n.transitionDuration):e[r]||n[r]||Nr[r]}};function Ao(t){return Object.entries(t).reduce(function(e,n){var r,s=n[0],i=n[1];return Ce({},e,(r={},r[s]=Ch(i),r))},{})}var Bs={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(e){return"notistack-MuiContent-"+e}},s_=Ao({root:{height:0},entered:{height:"auto"}}),mc="0px",_c=175,CE=b.forwardRef(function(t,e){var n=t.children,r=t.in,s=t.onExited,i=b.useRef(null),o=b.useRef(null),a=sf(e,o),l=function(){return i.current?i.current.clientHeight:0},u=function(g){g.style.height=mc},c=function(g){var _=l(),m=Ll({timeout:_c,mode:"enter"}),y=m.duration,E=m.easing;g.style.transitionDuration=typeof y=="string"?y:y+"ms",g.style.height=_+"px",g.style.transitionTimingFunction=E||""},d=function(g){g.style.height="auto"},f=function(g){g.style.height=l()+"px"},p=function(g){IE(g);var _=Ll({timeout:_c,mode:"exit"}),m=_.duration,y=_.easing;g.style.transitionDuration=typeof m=="string"?m:m+"ms",g.style.height=mc,g.style.transitionTimingFunction=y||""};return b.createElement(Ah,{in:r,unmountOnExit:!0,onEnter:u,onEntered:d,onEntering:c,onExit:f,onExited:s,onExiting:p,nodeRef:o,timeout:_c},function(h,g){return b.createElement("div",Object.assign({ref:a,className:Kr(s_.root,h==="entered"&&s_.entered),style:Ce({pointerEvents:"all",overflow:"hidden",minHeight:mc,transition:bs("height")},h==="entered"&&{overflow:"visible"},{},h==="exited"&&!r&&{visibility:"hidden"})},g),b.createElement("div",{ref:i,className:Bs.CollapseWrapper,style:{display:"flex",width:"100%"}},n))})});CE.displayName="Collapse";
36var i_={right:"left",left:"right",bottom:"up",top:"down"},t2=function(e){return e.horizontal!=="center"?i_[e.horizontal]:i_[e.vertical]},n2=function(e){return"anchorOrigin"+Rh(e)},r2=function(e){e===void 0&&(e={});var n={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(r){return!n[r]}).reduce(function(r,s){var i;return Ce({},r,(i={},i[s]=e[s],i))},{})},s2=function(){};function Wi(t,e){return t.reduce(function(n,r){return r==null?n:function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var l=[].concat(o);e&&l.indexOf(e)===-1&&l.push(e),n.apply(this,l),r.apply(this,l)}},s2)}var i2=typeof window<"u"?b.useLayoutEffect:b.useEffect;function o_(t){var e=b.useRef(t);return i2(function(){e.current=t}),b.useCallback(function(){return e.current.apply(void 0,arguments)},[])}var RE=b.forwardRef(function(t,e){var n=t.children,r=t.className,s=t.autoHideDuration,i=t.disableWindowBlurListener,o=i===void 0?!1:i,a=t.onClose,l=t.id,u=t.open,c=t.SnackbarProps,d=c===void 0?{}:c,f=b.useRef(),p=o_(function(){a&&a.apply(void 0,arguments)}),h=o_(function(E){!a||E==null||(f.current&&clearTimeout(f.current),f.current=setTimeout(function(){p(null,"timeout",l)},E))});b.useEffect(function(){return u&&h(s),function(){f.current&&clearTimeout(f.current)}},[u,s,h]);var g=function(){f.current&&clearTimeout(f.current)},_=b.useCallback(function(){s!=null&&h(s*.5)},[s,h]),m=function(T){d.onMouseEnter&&d.onMouseEnter(T),g()},y=function(T){d.onMouseLeave&&d.onMouseLeave(T),_()};return b.useEffect(function(){if(!o&&u)return window.addEventListener("focus",_),window.addEventListener("blur",g),function(){window.removeEventListener("focus",_),window.removeEventListener("blur",g)}},[o,_,u]),b.createElement("div",Object.assign({ref:e},d,{className:Kr(Bs.Snackbar,r),onMouseEnter:m,onMouseLeave:y}),n)});RE.displayName="Snackbar";var vc,o2=Ao({root:(vc={display:"flex",flexWrap:"wrap",flexGrow:1},vc[br.upSm]={flexGrow:"initial",minWidth:"288px"},vc)}),AE=b.forwardRef(function(t,e){var n=t.className,r=Ro(t,["className"]);return ge.createElement("div",Object.assign({ref:e,className:Kr(o2.root,n)},r))});AE.displayName="SnackbarContent";var _i=Ao({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),a_="notistack-snackbar",PE=b.forwardRef(function(t,e){var n=t.id,r=t.message,s=t.action,i=t.iconVariant,o=t.variant,a=t.hideIconVariant,l=t.style,u=t.className,c=i[o],d=s;return typeof d=="function"&&(d=d(n)),ge.createElement(AE,{ref:e,role:"alert","aria-describedby":a_,style:l,className:Kr(Bs.MuiContent,Bs.MuiContentVariant(o),_i.root,_i[o],u,!a&&c&&_i.lessPadding)},ge.createElement("div",{id:a_,className:_i.message},a?null:c,r),d&&ge.createElement("div",{className:_i.action},d))});PE.displayName="MaterialDesignContent";var Ph=b.memo(PE),a2=Ao({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),l2=function(e){var n=b.useRef(),r=b.useState(!0),s=r[0],i=r[1],o=Wi([e.snack.onClose,e.onClose]),a=function(){e.snack.requestClose&&o(null,"instructed",e.snack.id)},l=b.useCallback(function(){n.current=setTimeout(function(){i(function(S){return!S})},125)},[]);b.useEffect(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var u=e.snack,c=e.classes,d=e.Component,f=d===void 0?Ph:d,p=b.useMemo(function(){return r2(c)},[c]),h=u.open,g=u.SnackbarProps,_=u.TransitionComponent,m=u.TransitionProps,y=u.transitionDuration,E=u.disableWindowBlurListener,T=u.content,I=Ro(u,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),x=Ce({direction:t2(I.anchorOrigin),timeout:y},m),R=T;typeof R=="function"&&(R=R(I.id,I.message));var C=["onEnter","onEntered","onExit","onExited"].reduce(function(S,w){var A;return Ce({},S,(A={},A[w]=Wi([e.snack[w],e[w]],I.id),A))},{});return ge.createElement(CE,{in:s,onExited:C.onExited},ge.createElement(RE,{open:h,id:I.id,disableWindowBlurListener:E,autoHideDuration:I.autoHideDuration,className:Kr(a2.wrappedRoot,p.root,p[n2(I.anchorOrigin)]),SnackbarProps:g,onClose:o},ge.createElement(_,Object.assign({},x,{appear:!0,in:h,onExit:C.onExit,onExited:l,onEnter:C.onEnter,onEntered:Wi([C.onEntered,a],I.id)}),R||ge.createElement(f,Object.assign({},I)))))},vi,yc,fa,ha,bc,gn={view:{default:20},snackbar:{default:6,dense:2}},l_="."+Bs.CollapseWrapper,Sc=16,pa=Ao({root:(vi={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:bs(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},vi[l_]={padding:gn.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},vi.maxWidth="calc(100% - "+gn.view.default*2+"px)",vi[br.downXs]={width:"100%",maxWidth:"calc(100% - "+Sc*2+"px)"},vi),rootDense:(yc={},yc[l_]={padding:gn.snackbar.dense+"px 0px"},yc),top:{top:gn.view.default-gn.snackbar.default+"px",flexDirection:"column"},bottom:{bottom:gn.view.default-gn.snackbar.default+"px",flexDirection:"column-reverse"},left:(fa={left:gn.view.default+"px"},fa[br.upSm]={alignItems:"flex-start"},fa[br.downXs]={left:Sc+"px"},fa),right:(ha={right:gn.view.default+"px"},ha[br.upSm]={alignItems:"flex-end"},ha[br.downXs]={right:Sc+"px"},ha),center:(bc={left:"50%",transform:"translateX(-50%)"},bc[br.upSm]={alignItems:"center"},bc)}),u2=function(e){var n=e.classes,r=n===void 0?{}
36:n,s=e.anchorOrigin,i=e.dense,o=e.children,a=Kr(Bs.SnackbarContainer,pa[s.vertical],pa[s.horizontal],pa.root,r.containerRoot,r["containerAnchorOrigin"+Rh(s)],i&&pa.rootDense);return ge.createElement("div",{className:a},o)},c2=b.memo(u2),u_=function(e){var n=typeof e=="string"||b.isValidElement(e);return!n},d2=(function(t){xE(e,t);function e(r){var s;return s=t.call(this,r)||this,s.enqueueSnackbar=function(i,o){if(o===void 0&&(o={}),i==null)throw new Error("enqueueSnackbar called with invalid argument");var a=u_(i)?i:o,l=u_(i)?i.message:i,u=a.key,c=a.preventDuplicate,d=Ro(a,["key","preventDuplicate"]),f=ua(u),p=f?u:new Date().getTime()+Math.random(),h=e2(d,s.props),g=Ce({id:p},d,{message:l,open:!0,entered:!1,requestClose:!1,persist:h("persist"),action:h("action"),content:h("content"),variant:h("variant"),anchorOrigin:h("anchorOrigin"),disableWindowBlurListener:h("disableWindowBlurListener"),autoHideDuration:h("autoHideDuration"),hideIconVariant:h("hideIconVariant"),TransitionComponent:h("TransitionComponent"),transitionDuration:h("transitionDuration"),TransitionProps:h("TransitionProps",!0),iconVariant:h("iconVariant",!0),style:h("style",!0),SnackbarProps:h("SnackbarProps",!0),className:Kr(s.props.className,d.className)});return g.persist&&(g.autoHideDuration=void 0),s.setState(function(_){if(c===void 0&&s.props.preventDuplicate||c){var m=function(I){return f?I.id===p:I.message===l},y=_.queue.findIndex(m)>-1,E=_.snacks.findIndex(m)>-1;if(y||E)return _}return s.handleDisplaySnack(Ce({},_,{queue:[].concat(_.queue,[g])}))}),p},s.handleDisplaySnack=function(i){var o=i.snacks;return o.length>=s.maxSnack?s.handleDismissOldest(i):s.processQueue(i)},s.processQueue=function(i){var o=i.queue,a=i.snacks;return o.length>0?Ce({},i,{snacks:[].concat(a,[o[0]]),queue:o.slice(1,o.length)}):i},s.handleDismissOldest=function(i){if(i.snacks.some(function(c){return!c.open||c.requestClose}))return i;var o=!1,a=!1,l=i.snacks.reduce(function(c,d){return c+(d.open&&d.persist?1:0)},0);l===s.maxSnack&&(a=!0);var u=i.snacks.map(function(c){return!o&&(!c.persist||a)?(o=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),s.props.onClose&&s.props.onClose(null,"maxsnack",c.id),Ce({},c,{open:!1})):Ce({},c,{requestClose:!0})):Ce({},c)});return Ce({},i,{snacks:u})},s.handleEnteredSnack=function(i,o,a){if(!ua(a))throw new Error("handleEnteredSnack Cannot be called with undefined key");s.setState(function(l){var u=l.snacks;return{snacks:u.map(function(c){return c.id===a?Ce({},c,{entered:!0}):Ce({},c)})}})},s.handleCloseSnack=function(i,o,a){s.props.onClose&&s.props.onClose(i,o,a);var l=a===void 0;s.setState(function(u){var c=u.snacks,d=u.queue;return{snacks:c.map(function(f){return!l&&f.id!==a?Ce({},f):f.entered?Ce({},f,{open:!1}):Ce({},f,{requestClose:!0})}),queue:d.filter(function(f){return f.id!==a})}})},s.closeSnackbar=function(i){var o=s.state.snacks.find(function(a){return a.id===i});ua(i)&&o&&o.onClose&&o.onClose(null,"instructed",i),s.handleCloseSnack(null,"instructed",i)},s.handleExitedSnack=function(i,o){if(!ua(o))throw new Error("handleExitedSnack Cannot be called with undefined key");s.setState(function(a){var l=s.processQueue(Ce({},a,{snacks:a.snacks.filter(function(u){return u.id!==o})}));return l.queue.length===0?l:s.handleDismissOldest(l)})},s.enqueueSnackbar,s.closeSnackbar,s.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:s.enqueueSnackbar.bind(Zm(s)),closeSnackbar:s.closeSnackbar.bind(Zm(s))}},s}var n=e.prototype;return n.render=function(){var s=this,i=this.state.contextValue,o=this.props,a=o.domRoot,l=o.children,u=o.dense,c=u===void 0?!1:u,d=o.Components,f=d===void 0?{}:d,p=o.classes,h=this.state.snacks.reduce(function(_,m){var y,E=Rh(m.anchorOrigin),T=_[E]||[];return Ce({},_,(y={},y[E]=[].concat(T,[m]),y))},{}),g=Object.keys(h).map(function(_){var m=h[_],y=m[0];
36return ge.createElement(c2,{key:_,dense:c,anchorOrigin:y.anchorOrigin,classes:p},m.map(function(E){return ge.createElement(l2,{key:E.id,snack:E,classes:p,Component:f[E.variant],onClose:s.handleCloseSnack,onEnter:s.props.onEnter,onExit:s.props.onExit,onExited:Wi([s.handleExitedSnack,s.props.onExited],E.id),onEntered:Wi([s.handleEnteredSnack,s.props.onEntered],E.id)})}))});return ge.createElement(TE.Provider,{value:i},l,a?Bf.createPortal(g,a):g)},wE(e,[{key:"maxSnack",get:function(){return this.props.maxSnack||Nr.maxSnack}}]),e})(b.Component),f2=(function(){return b.useContext(TE)}),nr=ge.createContext(null);function h2(t){t()}var DE=h2,p2=function(e){return DE=e},g2=function(){return DE};function m2(){var t=g2(),e=null,n=null;return{clear:function(){e=null,n=null},notify:function(){t(function(){for(var s=e;s;)s.callback(),s=s.next})},get:function(){for(var s=[],i=e;i;)s.push(i),i=i.next;return s},subscribe:function(s){var i=!0,o=n={callback:s,next:null,prev:n};return o.prev?o.prev.next=o:e=o,function(){!i||e===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var c_={notify:function(){},get:function(){return[]}};function NE(t,e){var n,r=c_;function s(d){return l(),r.subscribe(d)}function i(){r.notify()}function o(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=e?e.addNestedSub(o):t.subscribe(o),r=m2())}function u(){n&&(n(),n=void 0,r.clear(),r=c_)}var c={addNestedSub:s,notifyNestedSubs:i,handleChangeWrapper:o,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:function(){return r}};return c}var af=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?b.useLayoutEffect:b.useEffect;function _2(t){var e=t.store,n=t.context,r=t.children,s=b.useMemo(function(){var a=NE(e);return{store:e,subscription:a}},[e]),i=b.useMemo(function(){return e.getState()},[e]);af(function(){var a=s.subscription;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),i!==e.getState()&&a.notifyNestedSubs(),function(){a.tryUnsubscribe(),a.onStateChange=null}},[s,i]);var o=n||nr;return ge.createElement(o.Provider,{value:s},r)}var Ec={exports:{}},ke={};/** @license React v17.0.2 37 * react-is.production.min.js 38 * 39 * Copyright (c) Facebook, Inc. and its affiliates. 40 * 41 * This source code is licensed under the MIT license found in the 42 * LICENSE file in the root directory of this source tree. 43 */var d_;function v2(){if(d_)return ke;d_=1;var t=60103,e=60106,n=60107,r=60108,s=60114,i=60109,o=60110,a=60112,l=60113,u=60120,c=60115,d=60116,f=60121,p=60122,h=60117,g=60129,_=60131;if(typeof Symbol=="function"&&Symbol.for){var m=Symbol.for;t=m("react.element"),e=m("react.portal"),n=m("react.fragment"),r=m("react.strict_mode"),s=m("react.profiler"),i=m("react.provider"),o=m("react.context"),a=m("react.forward_ref"),l=m("react.suspense"),u=m("react.suspense_list"),c=m("react.memo"),d=m("react.lazy"),f=m("react.block"),p=m("react.server.block"),h=m("react.fundamental"),g=m("react.debug_trace_mode"),_=m("react.legacy_hidden")}function y(O){if(typeof O=="object"&&O!==null){var N=O.$$typeof;switch(N){case t:switch(O=O.type,O){case n:case s:case r:case l:case u:return O;default:switch(O=O&&O.$$typeof,O){case o:case a:case d:case c:case i:return O;default:return N}}case e:return N}}}var E=i,T=t,I=a,x=n,R=d,C=c,S=e,w=s,A=r,P=l;return ke.ContextConsumer=o,ke.ContextProvider=E,ke.Element=T,ke.ForwardRef=I,ke.Fragment=x,ke.Lazy=R,ke.Memo=C,ke.Portal=S,ke.Profiler=w,ke.StrictMode=A,ke.Suspense=P,ke.isAsyncMode=function(){return!1},ke.isConcurrentMode=function(){return!1},ke.isContextConsumer=function(O){return y(O)===o},ke.isContextProvider=function(O){return y(O)===i},ke.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},ke.isForwardRef=function(O){return y(O)===a},ke.isFragment=function(O){return y(O)===n},ke.isLazy=function(O){return y(O)===d},ke.isMemo=function(O){return y(O)===c},ke.isPortal=function(O){return y(O)===e},ke.isProfiler=function(O){return y(O)===s},ke.isStrictMode=function(O){return y(O)===r},ke.isSuspense=function(O){return y(O)===l},ke.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===n||O===s||O===g||O===r||O===l||O
43===u||O===_||typeof O=="object"&&O!==null&&(O.$$typeof===d||O.$$typeof===c||O.$$typeof===i||O.$$typeof===o||O.$$typeof===a||O.$$typeof===h||O.$$typeof===f||O[0]===p)},ke.typeOf=y,ke}var f_;function y2(){return f_||(f_=1,Ec.exports=v2()),Ec.exports}y2();function LE(){var t=b.useContext(nr);return t}function ME(t){t===void 0&&(t=nr);var e=t===nr?LE:function(){return b.useContext(t)};return function(){var r=e(),s=r.store;return s}}var FE=ME();function b2(t){t===void 0&&(t=nr);var e=t===nr?FE:ME(t);return function(){var r=e();return r.dispatch}}var S2=b2(),E2=function(e,n){return e===n};function w2(t,e,n,r){var s=b.useReducer(function(h){return h+1},0),i=s[1],o=b.useMemo(function(){return NE(n,r)},[n,r]),a=b.useRef(),l=b.useRef(),u=b.useRef(),c=b.useRef(),d=n.getState(),f;try{if(t!==l.current||d!==u.current||a.current){var p=t(d);c.current===void 0||!e(p,c.current)?f=p:f=c.current}else f=c.current}catch(h){throw a.current&&(h.message+=` 44The error may be correlated with this previous error: 45`+a.current.stack+` 46 47`),h}return af(function(){l.current=t,u.current=d,c.current=f,a.current=void 0}),af(function(){function h(){try{var g=n.getState();if(g===u.current)return;var _=l.current(g);if(e(_,c.current))return;c.current=_,u.current=g}catch(m){a.current=m}i()}return o.onStateChange=h,o.trySubscribe(),h(),function(){return o.tryUnsubscribe()}},[n,o]),f}function x2(t){t===void 0&&(t=nr);var e=t===nr?LE:function(){return b.useContext(t)};return function(r,s){s===void 0&&(s=E2);var i=e(),o=i.store,a=i.subscription,l=w2(r,s,o,a);return b.useDebugValue(l),l}}var $E=x2();p2(Bf.unstable_batchedUpdates);function bt(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var h_=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),wc=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ml={INIT:"@@redux/INIT"+wc(),REPLACE:"@@redux/REPLACE"+wc(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+wc()}};function T2(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Dh(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(bt(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(bt(1));return n(Dh)(t,e)}if(typeof t!="function")throw new Error(bt(2));var s=t,i=e,o=[],a=o,l=!1;function u(){a===o&&(a=o.slice())}function c(){if(l)throw new Error(bt(3));return i}function d(g){if(typeof g!="function")throw new Error(bt(4));if(l)throw new Error(bt(5));var _=!0;return u(),a.push(g),function(){if(_){if(l)throw new Error(bt(6));_=!1,u();var y=a.indexOf(g);a.splice(y,1),o=null}}}function f(g){if(!T2(g))throw new Error(bt(7));if(typeof g.type>"u")throw new Error(bt(8));if(l)throw new Error(bt(9));try{l=!0,i=s(i,g)}finally{l=!1}for(var _=o=a,m=0;m<_.length;m++){var y=_[m];y()}return g}function p(g){if(typeof g!="function")throw new Error(bt(10));s=g,f({type:Ml.REPLACE})}function h(){var g,_=d;return g={subscribe:function(y){if(typeof y!="object"||y===null)throw new Error(bt(11));function E(){y.next&&y.next(c())}E();var T=_(E);return{unsubscribe:T}}},g[h_]=function(){return this},g}return f({type:Ml.INIT}),r={dispatch:f,subscribe:d,getState:c,replaceReducer:p},r[h_]=h,r}var I2=Dh;function O2(t){Object.keys(t).forEach(function(e){var n=t[e],r=n(void 0,{type:Ml.INIT});if(typeof r>"u")throw new Error(bt(12));if(typeof n(void 0,{type:Ml.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(bt(13))})}function k2(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var s=e[r];typeof t[s]=="function"&&(n[s]=t[s])}var i=Object.keys(n),o;try{O2(n)}catch(a){o=a}return function(l,u){if(l===void 0&&(l={}),o)throw o;for(var c=!1,d={},f=0;f<i.length;f++){var p=i[f],h=n[p],g=l[p],_=h(g,u);if(typeof _>"u")throw u&&u.type,new Error(bt(14));d[p]=_,c=c||_!==g}return c=c||i.length!==Object.keys(l).length,c?d:l}}function jE(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?function(r){return r}:e.length===1?e[0]:e.reduce(function(r,s){return function(){return r(s.apply(void 0,arguments))}})}function C2(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){return function(){var s=r.apply(void 0,arguments),i=function(){throw new Error(bt(15))},o={getState:s.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=e.map(function(l){return l(o)});return i=jE.apply(void 0,a)(s.dispatch),Ip(Ip({},s),{},{dispatch:i})}}}function UE(t){var e=function(r){var s=r.dispatch,i=r.getState;return function(o){return function(a){return typeof a=="function"?a(s,i,t):o(a)}}};return e}var BE=UE();BE.withExtraArgument=UE;var Nh="persist:",HE="persist/FLUSH",Lh="persist/REHYDRATE",VE="persist/PAUSE",zE="persist/PERSIST",qE="persist/PURGE",WE="persist/REGISTER",R2=-1;function Ha(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ha=function(n){return typeof n}:Ha=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ha(t)}function p_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function A2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
vendor: 4,872 bytes, line 47
47e%2?p_(n,!0).forEach(function(r){P2(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p_(n).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function P2(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D2(t,e,n,r){r.debug;var s=A2({},n);return t&&Ha(t)==="object"&&Object.keys(t).forEach(function(i){i!=="_persist"&&e[i]===n[i]&&(s[i]=t[i])}),s}function N2(t){var e=t.blacklist||null,n=t.whitelist||null,r=t.transforms||[],s=t.throttle||0,i="".concat(t.keyPrefix!==void 0?t.keyPrefix:Nh).concat(t.key),o=t.storage,a;t.serialize===!1?a=function(I){return I}:typeof t.serialize=="function"?a=t.serialize:a=L2;var l=t.writeFailHandler||null,u={},c={},d=[],f=null,p=null,h=function(I){Object.keys(I).forEach(function(x){m(x)&&u[x]!==I[x]&&d.indexOf(x)===-1&&d.push(x)}),Object.keys(u).forEach(function(x){I[x]===void 0&&m(x)&&d.indexOf(x)===-1&&u[x]!==void 0&&d.push(x)}),f===null&&(f=setInterval(g,s)),u=I};function g(){if(d.length===0){f&&clearInterval(f),f=null;return}var T=d.shift(),I=r.reduce(function(x,R){return R.in(x,T,u)},u[T]);if(I!==void 0)try{c[T]=a(I)}catch(x){console.error("redux-persist/createPersistoid: error serializing state",x)}else delete c[T];d.length===0&&_()}function _(){Object.keys(c).forEach(function(T){u[T]===void 0&&delete c[T]}),p=o.setItem(i,a(c)).catch(y)}function m(T){return!(n&&n.indexOf(T)===-1&&T!=="_persist"||e&&e.indexOf(T)!==-1)}function y(T){l&&l(T)}var E=function(){for(;d.length!==0;)g();return p||Promise.resolve()};return{update:h,flush:E}}function L2(t){return JSON.stringify(t)}function M2(t){var e=t.transforms||[],n="".concat(t.keyPrefix!==void 0?t.keyPrefix:Nh).concat(t.key),r=t.storage;t.debug;var s;return t.deserialize===!1?s=function(o){return o}:typeof t.deserialize=="function"?s=t.deserialize:s=F2,r.getItem(n).then(function(i){if(i)try{var o={},a=s(i);return Object.keys(a).forEach(function(l){o[l]=e.reduceRight(function(u,c){return c.out(u,l,a)},s(a[l]))}),o}catch(l){throw l}else return})}function F2(t){return JSON.parse(t)}function $2(t){var e=t.storage,n="".concat(t.keyPrefix!==void 0?t.keyPrefix:Nh).concat(t.key);return e.removeItem(n,j2)}function j2(t){}function g_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function mn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?g_(n,!0).forEach(function(r){U2(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g_(n).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function U2(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B2(t,e){if(t==null)return{};var n=H2(t,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function H2(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}var V2=5e3;function z2(t,e){var n=t.version!==void 0?t.version:R2;t.debug;var r=t.stateReconciler===void 0?D2:t.stateReconciler,s=t.getStoredState||M2,i=t.timeout!==void 0?t.timeout:V2,o=null,a=!1,l=!0,u=function(d){return d._persist.rehydrated&&o&&!l&&o.update(d),d};return function(c,d){var f=c||{},p=f._persist,h=B2(f,["_persist"]),g=h;if(d.type===zE){var _=!1,m=function(C,S){_||(d.rehydrate(t.key,C,S),_=!0)};if(i&&setTimeout(function(){!_&&m(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(t.key,'"')))},i),l=!1,o||(o=N2(t)),p)return mn({},e(g,d),{_persist:p});if(typeof d.rehydrate!="function"||typeof d.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return d.register(t.key),s(t).then(function(R){var C=t.migrate||function(S,w){return Promise.resolve(S)};C(R,n).then(function(S){m(S)},function(S){m(void 0,S)})},function(R){m(void 0,R)}),mn({},e(g,d),{_persist:{version:n,rehydrated:!1}})}else{if(d.type===qE)return a=!0,d.result($2(t)),mn({},e(g,d),{_persist:p});if(d.type===HE)return d.result(o&&o.flush()),mn({},e(g,d),{_persist:p});if(d.type===VE)l=!0;else if(d.type===Lh){if(a)return mn({},g,{_persist:mn({},p,{rehydrated:!0})});if(d.key===t.key){var y=e(g,d),E=d.payload,T=r!==!1&&E!==void 0?r(E,c,y,t):y,I=mn({},T,{_persist:mn({},p,{rehydrated:!0})});
47return u(I)}}}if(!p)return e(c,d);var x=e(g,d);return x===g?c:u(mn({},x,{_persist:p}))}}function m_(t){return G2(t)||W2(t)||q2()}function q2(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function W2(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function G2(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function __(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function lf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?__(n,!0).forEach(function(r){K2(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):__(n).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function K2(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var GE={registry:[],bootstrapped:!1},Y2=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:GE,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case WE:return lf({},e,{registry:[].concat(m_(e.registry),[n.key])});case Lh:var r=e.registry.indexOf(n.key),s=m_(e.registry);return s.splice(r,1),lf({},e,{registry:s,bootstrapped:s.length===0});default:return e}};function J2(t,e,n){var r=Dh(Y2,GE,void 0),s=function(l){r.dispatch({type:WE,key:l})},i=function(l,u,c){var d={type:Lh,payload:u,err:c,key:l};t.dispatch(d),r.dispatch(d)},o=lf({},r,{purge:function(){var l=[];return t.dispatch({type:qE,result:function(c){l.push(c)}}),Promise.all(l)},flush:function(){var l=[];return t.dispatch({type:HE,result:function(c){l.push(c)}}),Promise.all(l)},pause:function(){t.dispatch({type:VE})},persist:function(){t.dispatch({type:zE,register:s,rehydrate:i})}});return o.persist(),o}var yi={},ga={},ma={},v_;function X2(){if(v_)return ma;v_=1,ma.__esModule=!0,ma.default=s;function t(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(a){return typeof a}:t=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t(i)}function e(){}var n={getItem:e,setItem:e,removeItem:e};function r(i){if((typeof self>"u"?"undefined":t(self))!=="object"||!(i in self))return!1;try{var o=self[i],a="redux-persist ".concat(i," test");o.setItem(a,"test"),o.getItem(a),o.removeItem(a)}catch{return!1}return!0}function s(i){var o="".concat(i,"Storage");return r(o)?self[o]:n}return ma}var y_;function Z2(){if(y_)return ga;y_=1,ga.__esModule=!0,ga.default=n;var t=e(X2());function e(r){return r&&r.__esModule?r:{default:r}}function n(r){var s=(0,t.default)(r);return{getItem:function(o){return new Promise(function(a,l){a(s.getItem(o))})},setItem:function(o,a){return new Promise(function(l,u){l(s.setItem(o,a))})},removeItem:function(o){return new Promise(function(a,l){a(s.removeItem(o))})}}}return ga}var b_;function Q2(){if(b_)return yi;b_=1,yi.__esModule=!0,yi.default=void 0;var t=e(Z2());function e(r){return r&&r.__esModule?r:{default:r}}var n=(0,t.default)("local");return yi.default=n,yi}var eF=Q2();const tF=G1(eF),Wt={lastViewedVideo:{},categoriesSubMenuLoading:!1,mobileNavigationCollapse:!0,dataViews:{},navigationSubMenu:{Categories:!0,Playlists:!0,Sessions:!0,"Session Builder":!0},openDugoutAddPracticeModal:!1,quickViewDrawer:{engineRoom:!1,collection:null},sessionAutoFilters:!0,dugoutSessionCurrentTab:0,useBetterAuth:!0},nF=(t=Wt,e)=>{switch(e.type){case"SET_DATA_VIEW":return{...Wt,...t,dataViews:{...t.dataViews,...e.payload}};case"SET_LAST_VIEWED_VIDEO":return{...Wt,...t,lastViewedVideo:e.payload};case"CATEGORY_SUB_MENU_LOADING":return{...Wt,...t,...e.payload};case"SET_MOBILE_NAVIGATION_COLLAPSE":return{...Wt,...t,...e.payload};case"SET_NAVIGATION_SUB_MENU":return{...Wt,...t,navigationSubMenu:{...t.navigationSubMenu,...e.payload}};case"SET_OPEN_DUGOUT_ADD_PRACTICE_MODAL":return{...Wt,...t,openDugoutAddPracticeModal:e.payload};case"SET_OPEN_ENGINE_ROOM_HOME_QUICK_DRAWER":return{...Wt,...t,quickViewDrawer:{...t.quickViewDrawer,engineRoom:e.payload}};case"SET_OPEN_ENGINE_ROOM_HOME_QUICK_DRAWER_COLLECTION":return{...Wt,...t,quickViewDrawer:{...t.quickViewDrawer,collection:e.payload}};case"SET_SESSION_AUTO_FILTERS":return{...Wt,...t,sessionAutoFilters:e.payload};case"SET_DUGOUT_SESSION_CURRENT_TAB":return{...Wt,...t,dugoutSessionCurrentTab:e.payload};case"SET_USE_BETTER_AUTH":return{...Wt,...t,useBetterAuth:e.payload};default:return t}}
47,S_={autoplay:!0},rF=(t=S_,e)=>{switch(e.type){case"SET_AUTO_PLAY":return{...t,autoplay:e.payload};case"RESET_AUTO_PLAY":return S_;default:return t}},sF=(t={},e)=>{switch(e.type){case"SET_TEAM_INFO":return t=e.payload,t;default:return t}},iF=t=>{const e={...t||{}};return e.club_id==null&&e.id!=null&&(e.club_id=e.id),e.id==null&&e.club_id!=null&&(e.id=e.club_id),e},oF=(t={},e)=>{switch(e.type){case"SET_CLUB_INFO":return iF(e.payload);case"SET_ONBOARDING_COMPLETED":return{...t,...e.payload};default:return t}},aF={sessionPlanner:{createSession:!1}},lF=(t=aF,e)=>{switch(e.type){case"SET_SESSION_PLANNER_SIDE_DRAWER_OPEN":return{...t,sessionPlanner:{...t.sessionPlanner,createSession:e.payload}};default:return t}},E_={dugout:{sessions:{addPracticeToSession:{}}},engineRoom:{},sessionPlanner:{}},uF=(t=E_,e)=>{switch(e.type){case"SET_DUGOUT_ADD_PRACTICE_TO_SESSION_FILTERS":const n=e.payload.value;return{...t,dugout:{...t.dugout,sessions:{...t.dugout.sessions,addPracticeToSession:{...t.dugout.sessions.addPracticeToSession,[e.payload.key]:n}}}};case"SET_ENGINE_ROOM_HOME_FILTERS":return{...t,engineRoom:{...t.engineRoom,[e.payload.key]:e.payload.value}};case"SET_ENGINE_ROOM_CATEGORY_FILTERS":return{...t,engineRoom:{...t.engineRoom,[e.payload.key]:{...t.engineRoom[e.payload.key],...e.payload.value}}};case"RESET_ENGINE_ROOM_FILTERS":return E_;default:return t}},w_={dugout:0,engineRoom:0,sessionPlanner:0,globalLibrary:0,selectedApp:-1},cF=(t=w_,e)=>{const n={...w_,...t};switch(e.type){case"SET_MOBILE_NAVIGATION":return{...n,...e.payload};default:return t}},dF={isOnboardingProgress:!1},fF=(t=dF,e)=>{switch(e.type){case"SET_ONBOARDING_PROGRESS_OPEN":return{...t,...e.payload};default:return t}},hF={isCollapsed:!1},pF=(t=hF,e)=>{switch(e.type){case"SET_PERIOD_GENERAL_INPUTS_COLLAPSE":return{...t,isCollapsed:e.payload.isCollapsed};default:return t}},gF={createPractice:{createPractice:!1}},mF=(t=gF,e)=>{switch(e.type){case"SET_SESSION_PLANNER_PRACTICE_MODAL_OPEN":return{...t,createPractice:{...t.createPractice,createPractice:e.payload}};default:return t}},x_={flow:"",plan:{},duration:"",userCount:"",email:"",password:"",userId:""},_F=(t=x_,e)=>{switch(e.type){case"SET_REGISTER_DATA":return{...t,...e.payload};case"RESET_REGISTER_DATA":return x_;default:return t}},vF={dugout:{},engineRoom:{},sessionPlanner:{}},yF=(t=vF,e)=>{switch(e.type){case"SET_ENGINE_ROOM_SEARCH":return{...t,engineRoom:{...t.engineRoom,[e.payload.key]:e.payload.value}};default:return t}},bF={library:""},SF=(t=bF,e)=>{switch(e.type){case"SET_CURRENT_LIBRARY":return{...t,library:e.payload};default:return t}},EF={dashboardClubStats:[],players:[],teams:[],teamStatsOverview:[],teamStatsPlayers:[],teamPlayers:[]},wF=(t=EF,e)=>{switch(e.type){case"SET_DASHBOARD_CLUB_STAT_COLUMNS":return{...t,dashboardClubStats:e.payload};case"SET_PLAYER_COLUMNS":return{...t,players:e.payload};case"SET_TEAM_COLUMNS":return{...t,teams:e.payload};case"SET_TEAM_STATS_OVERVIEW_COLUMNS":return{...t,teamStatsOverview:e.payload};case"SET_TEAM_STATS_PLAYERS_COLUMNS":return{...t,teamStatsPlayers:e.payload};case"SET_TEAM_PLAYERS_COLUMNS":return{...t,teamPlayers:e.payload};default:return t}}
47,xF={sidebarTeamUpdation:null,team:[],teamStatus:null,selectedTeamStatus:null,searchedData:null},TF=(t=xF,e)=>{switch(e.type){case"SET_SELECTED_TEAMS":return{...t,team:e.payload};case"SET_SIDEBAR_TEAM_UPDATION":return{...t,sidebarTeamUpdation:e.payload};case"TEAM_STATUS":return{...t,teamStatus:e.payload};case"SET_SELECTED_TEAM_STATUS":return{...t,selectedTeamStatus:e.payload};case"SET_SEARCHED_DATA":return{...t,searchedData:e.payload};default:return t}},T_={userDetail:{},userPermission:{}},IF=(t=T_,e)=>{switch(e.type){case"SET_USER_INFO":return{...t,userDetail:{...t.userDetail,...e.payload}};case"UPDATE_USER_INFO":return{...t,userDetail:{...t.userDetail,...e.payload}};case"SET_USER_PERMISSION":return{...t,userPermission:e.payload};case"SET_TIER_USER_LIMIT":return{...t,userDetail:{...t.userDetail,UserActivePlan:{...t.userDetail.UserActivePlan,...e.payload}}};case"SET_USER_IN_PROGRESS_TRANSACTION":return{...t,userDetail:{...t.userDetail,UserActivePlan:{...t.userDetail.UserActivePlan,...e.payload}},userPermission:{...t.userPermission,...e.payload}};case"RESET_USER_STATE":return T_;default:return t}},OF={language:"en"},kF=(t=OF,e)=>{switch(e.type){case"SET_LANGUAGE":return{...t,language:e.payload};default:return t}},I_={items:[],hasUnread:!1,total:0},CF=(t=I_,e)=>{switch(e.type){case"SET_NOTIFICATIONS":return{...t,items:e.payload.items,hasUnread:e.payload.hasUnread,total:e.payload.total};case"SET_NOTIFICATIONS_HAS_UNREAD":return{...t,hasUnread:e.payload};case"RESET_USER_STATE":return I_;default:return t}},RF={mode:"dark"},AF=(t=RF,e)=>{switch(e.type){case"SET_THEME_MODE":return{...t,mode:e.payload};default:return t}},O_={owner:null,entries:{},completed:{}},xc=(t,e)=>(t==null?void 0:t.userId)===e.userId&&(t==null?void 0:t.clubId)===e.clubId;function PF(t=O_,e){var r;const n=e.payload;if(e.type==="SET_USER_INFO"&&t.owner&&n&&(n.id!==void 0&&String(n.id)!==t.owner.userId||n.club_id!==void 0&&String(n.club_id)!==t.owner.clubId))return O_;if(!(n!=null&&n.owner)||!n.key)return t;if(e.type==="PUT_ENGINE_ROOM_DRAFT"&&n.revision){const s=xc(t.owner,n.owner)?t.entries:{},i=n.revision;return{owner:n.owner,completed:xc(t.owner,n.owner)?t.completed:{},entries:{...s,[n.key]:{...s[n.key],...n.patch,revision:i}}}}if(e.type==="CLEAR_ENGINE_ROOM_DRAFT"&&xc(t.owner,n.owner)){if(n.revision!==void 0&&((r=t.entries[n.key])==null?void 0:r.revision)!==n.revision)return t;const{[n.key]:s,...i}=t.entries;return{...t,entries:i,completed:n.revision===void 0?t.completed:{...t.completed,[n.key]:n.revision}}}return t}function hW(t,e){if(!t)return e;const n=new Set(Object.values(t).flat().map(s=>String(s.id))),r=Object.values(e).flat().filter(s=>!n.has(String(s.id)));return r.length?{...t,mainActivities:[...t.mainActivities??[],...r]}:t}const Tc={owner:null,entries:{},pending:{}},bi=(t,e)=>(t==null?void 0:t.userId)===e.userId&&(t==null?void 0:t.clubId)===e.clubId;function DF(t=Tc,e){var r;const n=e.payload;if(e.type==="RESET_APPLICATION"||e.type==="SET_USER_INFO"&&t.owner&&n&&(n.id!==void 0&&String(n.id)!==t.owner.userId||n.club_id!==void 0&&String(n.club_id)!==t.owner.clubId))return Tc;if(!(n!=null&&n.owner)||!n.key)return t;if(e.type==="PUT_PLANNER_PRACTICE_DRAFT"&&n.draft)return{owner:n.owner,pending:bi(t.owner,n.owner)?t.pending:{},entries:{...bi(t.owner,n.owner)?t.entries:{},[n.key]:n.draft}};if(e.type==="START_PLANNER_PRACTICE_SAVE"&&n.revision&&bi(t.owner,n.owner))return{...t,pending:{...t.pending,[n.key]:n.revision}};if(e.type==="FINISH_PLANNER_PRACTICE_SAVE"&&bi(t.owner,n.owner)&&t.pending[n.key]===n.revision){const{[n.key]:s,...i}=t.pending;return{...t,pending:i}}if(e.type==="CLEAR_PLANNER_PRACTICE_DRAFT"&&bi(t.owner,n.owner)){if(n.revision!==void 0&&((r=t.entries[n.key])==null?void 0:r.revision)!==n.revision)return t;const{[n.key]:s,...i}=t.entries;return{...t,entries:i}}return t}const k_=k2({user:IF,engineRoomDrafts:PF,plannerPracticeDrafts:DF,club:oF,teams:TF,drawer:lF,calendar:sF,practice:mF,onboarding:fF,tableColumns:wF,filters:uF,autoplay:rF,search:yF,register:_F,sessionPlanner:SF,periodGeneralInputsCollapse:pF,mobileNavigation:cF,app:nF,locale:kF,notifications:CF,theme:AF}),NF=(t={},e)=>{if(e.type==="RESET_APPLICATION"){const n=k_(void 0,e);return{...n,locale:t.locale??n.locale,theme:t.theme??n.theme}}return k_(t,e)}
47,LF=z2({key:"touchtight",storage:tF,blacklist:["drawer","onboarding","engineRoomDrafts","plannerPracticeDrafts"]},NF),MF=jE,uf=I2(LF,MF(C2(BE))),Po=S2,Oe=$E,pW=FE,FF=new Set([]);function ue(t){const e=Oe(r=>{var s;return!!((s=r.club)!=null&&s.v2_disabled)}),n=Oe(r=>{var s;return!!((s=r.user.userDetail)!=null&&s.v2_enabled)});return FF.has(t)?!1:!e||n}const $F="engine-room-coach-library";function jF(){const t=ue("v2-library"),e=IM($F),n="true";return t&&(n==="true"||n!=="false"&&e===!0)}const UF="/engine-room/library/home",gW=t=>/^\/engine-room\/library(?:\/|$)/.test(t),Mh=t=>t.replace(/^\/engine-room\/library(?=\/|$)/,"/global-library"),BF=t=>t.replace(/^\/global-library(?=\/|$)/,"/engine-room/library");function mW(t,e,n){return t&&(n||(e??0)>=3)?"/engine-room/home":UF}function HF(){const t=jF(),e=Mt(),n=t?BF(e.pathname):Mh(e.pathname),s=/^\/(global-library|engine-room\/library)\/?$/.test(n)?`${n.replace(/\/$/,"")}/home`:n;return s!==e.pathname?v.jsx(Le,{replace:!0,to:{pathname:s,search:e.search,hash:e.hash},state:e.state}):v.jsx(gr,{})}var KE=typeof global=="object"&&global&&global.Object===Object&&global,VF=typeof self=="object"&&self&&self.Object===Object&&self,fn=KE||VF||Function("return this")(),dn=fn.Symbol,YE=Object.prototype,zF=YE.hasOwnProperty,qF=YE.toString,Si=dn?dn.toStringTag:void 0;function WF(t){var e=zF.call(t,Si),n=t[Si];try{t[Si]=void 0;var r=!0}catch{}var s=qF.call(t);return r&&(e?t[Si]=n:delete t[Si]),s}var GF=Object.prototype,KF=GF.toString;function YF(t){return KF.call(t)}var JF="[object Null]",XF="[object Undefined]",C_=dn?dn.toStringTag:void 0;function ni(t){return t==null?t===void 0?XF:JF:C_&&C_ in Object(t)?WF(t):YF(t)}function Hs(t){return t!=null&&typeof t=="object"}var ZF="[object Symbol]";function Vs(t){return typeof t=="symbol"||Hs(t)&&ni(t)==ZF}function Va(t,e){for(var n=-1,r=t==null?0:t.length,s=Array(r);++n<r;)s[n]=e(t[n],n,t);return s}var Vt=Array.isArray,R_=dn?dn.prototype:void 0,A_=R_?R_.toString:void 0;function JE(t){if(typeof t=="string")return t;if(Vt(t))return Va(t,JE)+"";if(Vs(t))return A_?A_.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var QF=/\s/;function e$(t){for(var e=t.length;e--&&QF.test(t.charAt(e)););return e}var t$=/^\s+/;function n$(t){return t&&t.slice(0,e$(t)+1).replace(t$,"")}function jr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var P_=NaN,r$=/^[-+]0x[0-9a-f]+$/i,s$=/^0b[01]+$/i,i$=/^0o[0-7]+$/i,o$=parseInt;function D_(t){if(typeof t=="number")return t;if(Vs(t))return P_;if(jr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=jr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=n$(t);var n=s$.test(t);return n||i$.test(t)?o$(t.slice(2),n?2:8):r$.test(t)?P_:+t}function du(t){return t}var a$="[object AsyncFunction]",l$="[object Function]",u$="[object GeneratorFunction]",c$="[object Proxy]";function XE(t){if(!jr(t))return!1;var e=ni(t);return e==l$||e==u$||e==a$||e==c$}var Ic=fn["__core-js_shared__"],N_=(function(){var t=/[^.]+$/.exec(Ic&&Ic.keys&&Ic.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function d$(t){return!!N_&&N_ in t}var f$=Function.prototype,h$=f$.toString;function Yr(t){if(t!=null){try{return h$.call(t)}catch{}try{return t+""}catch{}}return""}var p$=/[\\^$.*+?()[\]{}|]/g,g$=/^\[object .+?Constructor\]$/,m$=Function.prototype,_$=Object.prototype,v$=m$.toString,y$=_$.hasOwnProperty,b$=RegExp("^"+v$.call(y$).replace(p$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function S$(t){if(!jr(t)||d$(t))return!1;var e=XE(t)?b$:g$;return e.test(Yr(t))}function E$(t,e){return t==null?void 0:t[e]}function Jr(t,e){var n=E$(t,e);return S$(n)?n:void 0}var cf=Jr(fn,"WeakMap");function w$(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var x$=800,T$=16,I$=Date.now;function O$(t){var e=0,n=0;return function(){var r=I$(),s=T$-(r-n);if(n=r,s>0){if(++e>=x$)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function k$(t){return function(){return t}}var L_=(function(){try{var t=Jr(Object,"defineProperty");return t({},"",{}),t}catch{}})(),C$=L_?function(t,e){return L_(t,"toString",{configurable:!0,enumerable:!1,value:k$(e),writable:!0})}:du,R$=O$(C$),A$=9007199254740991,P$=/^(?:0|[1-9]\d*)$/;function Fh(t,e){var n=typeof t;return e=e??A$,!!e&&(n=="number"||n!="symbol"&&P$.test(t))&&t>-1&&t%1==0&&t<e}function $h(t,e){return t===e||t!==t&&e!==e}var M_=Math.max;function D$(t,e,n){return e=M_(e===void 0?t.length-1:e,0),function(){for(var r=arguments,s=-1,i=M_(r.length-e,0),o=Array(i);++s<i;)o[s]=r[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=r[s];return a[e]=n(o),w$(t,this,a)}}function N$(t,e){return R$(D$(t,e,du),t+"")}var L$=9007199254740991;function jh(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=L$}function Do(t){return t!=null&&jh(t.length)&&!XE(t)}function F_(t,e,n){if(!jr(n))return!1;var r=typeof e;return(r=="number"?Do(n)&&Fh(e,n.length):r=="string"&&e in n)?$h(n[e],t):!1}var M$=Object.prototype;function ZE(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||M$;return t===n}function F$(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var $$="[object Arguments]";function $_(t){return Hs(t)&&ni(t)==$$}var QE=Object.prototype,j$=QE.hasOwnProperty,U$=QE.propertyIsEnumerable,fu=$_((function(){return arguments})())?$_:function(t){return Hs(t)&&j$.call(t,"callee")&&!U$.call(t,"callee")};function B$(){return!1}var ew=typeof exports=="object"&&exports&&!exports.nodeType&&exports,j_=ew&&typeof module=="object"&&module&&!module.nodeType&&module,H$=j_&&j_.exp
vendor: 4,588 bytes, line 47
47orts===ew,U_=H$?fn.Buffer:void 0,V$=U_?U_.isBuffer:void 0,Fl=V$||B$,z$="[object Arguments]",q$="[object Array]",W$="[object Boolean]",G$="[object Date]",K$="[object Error]",Y$="[object Function]",J$="[object Map]",X$="[object Number]",Z$="[object Object]",Q$="[object RegExp]",ej="[object Set]",tj="[object String]",nj="[object WeakMap]",rj="[object ArrayBuffer]",sj="[object DataView]",ij="[object Float32Array]",oj="[object Float64Array]",aj="[object Int8Array]",lj="[object Int16Array]",uj="[object Int32Array]",cj="[object Uint8Array]",dj="[object Uint8ClampedArray]",fj="[object Uint16Array]",hj="[object Uint32Array]",Be={};Be[ij]=Be[oj]=Be[aj]=Be[lj]=Be[uj]=Be[cj]=Be[dj]=Be[fj]=Be[hj]=!0;Be[z$]=Be[q$]=Be[rj]=Be[W$]=Be[sj]=Be[G$]=Be[K$]=Be[Y$]=Be[J$]=Be[X$]=Be[Z$]=Be[Q$]=Be[ej]=Be[tj]=Be[nj]=!1;function pj(t){return Hs(t)&&jh(t.length)&&!!Be[ni(t)]}function tw(t){return function(e){return t(e)}}var nw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gi=nw&&typeof module=="object"&&module&&!module.nodeType&&module,gj=Gi&&Gi.exports===nw,Oc=gj&&KE.process,B_=(function(){try{var t=Gi&&Gi.require&&Gi.require("util").types;return t||Oc&&Oc.binding&&Oc.binding("util")}catch{}})(),H_=B_&&B_.isTypedArray,Uh=H_?tw(H_):pj,mj=Object.prototype,_j=mj.hasOwnProperty;function vj(t,e){var n=Vt(t),r=!n&&fu(t),s=!n&&!r&&Fl(t),i=!n&&!r&&!s&&Uh(t),o=n||r||s||i,a=o?F$(t.length,String):[],l=a.length;for(var u in t)(e||_j.call(t,u))&&!(o&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Fh(u,l)))&&a.push(u);return a}function yj(t,e){return function(n){return t(e(n))}}var bj=yj(Object.keys,Object),Sj=Object.prototype,Ej=Sj.hasOwnProperty;function rw(t){if(!ZE(t))return bj(t);var e=[];for(var n in Object(t))Ej.call(t,n)&&n!="constructor"&&e.push(n);return e}function Bh(t){return Do(t)?vj(t):rw(t)}var wj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xj=/^\w*$/;function Hh(t,e){if(Vt(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Vs(t)?!0:xj.test(t)||!wj.test(t)||e!=null&&t in Object(e)}var fo=Jr(Object,"create");function Tj(){this.__data__=fo?fo(null):{},this.size=0}function Ij(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Oj="__lodash_hash_undefined__",kj=Object.prototype,Cj=kj.hasOwnProperty;function Rj(t){var e=this.__data__;if(fo){var n=e[t];return n===Oj?void 0:n}return Cj.call(e,t)?e[t]:void 0}var Aj=Object.prototype,Pj=Aj.hasOwnProperty;function Dj(t){var e=this.__data__;return fo?e[t]!==void 0:Pj.call(e,t)}var Nj="__lodash_hash_undefined__";function Lj(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=fo&&e===void 0?Nj:e,this}function Ur(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ur.prototype.clear=Tj;Ur.prototype.delete=Ij;Ur.prototype.get=Rj;Ur.prototype.has=Dj;Ur.prototype.set=Lj;function Mj(){this.__data__=[],this.size=0}function hu(t,e){for(var n=t.length;n--;)if($h(t[n][0],e))return n;return-1}var Fj=Array.prototype,$j=Fj.splice;function jj(t){var e=this.__data__,n=hu(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():$j.call(e,n,1),--this.size,!0}function Uj(t){var e=this.__data__,n=hu(e,t);return n<0?void 0:e[n][1]}function Bj(t){return hu(this.__data__,t)>-1}function Hj(t,e){var n=this.__data__,r=hu(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Mn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Mn.prototype.clear=Mj;Mn.prototype.delete=jj;Mn.prototype.get=Uj;Mn.prototype.has=Bj;Mn.prototype.set=Hj;var ho=Jr(fn,"Map");function Vj(){this.size=0,this.__data__={hash:new Ur,map:new(ho||Mn),string:new Ur}}function zj(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function pu(t,e){var n=t.__data__;return zj(e)?n[typeof e=="string"?"string":"hash"]:n.map}function qj(t){var e=pu(this,t).delete(t);return this.size-=e?1:0,e}function Wj(t){return pu(this,t).get(t)}function Gj(t){return pu(this,t).has(t)}function Kj(t,e){var n=pu(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Fn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Fn.prototype.clear=Vj;Fn.prototype.delete=qj;Fn.prototype.get=Wj;Fn.prototype.has=Gj;Fn.prototype.set=Kj;var Yj="Expected a function";function Vh(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Yj);var n=function(){var r=arguments,s=e?e.apply(this,r):r[0],i=n.cache;if(i.has(s))return i.get(s);
47var o=t.apply(this,r);return n.cache=i.set(s,o)||i,o};return n.cache=new(Vh.Cache||Fn),n}Vh.Cache=Fn;var Jj=500;function Xj(t){var e=Vh(t,function(r){return n.size===Jj&&n.clear(),r}),n=e.cache;return e}var Zj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qj=/\\(\\)?/g,eU=Xj(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Zj,function(n,r,s,i){e.push(s?i.replace(Qj,"$1"):r||n)}),e});function No(t){return t==null?"":JE(t)}function sw(t,e){return Vt(t)?t:Hh(t,e)?[t]:eU(No(t))}function gu(t){if(typeof t=="string"||Vs(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function zh(t,e){e=sw(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[gu(e[n++])];return n&&n==r?t:void 0}function tU(t,e,n){var r=t==null?void 0:zh(t,e);return r===void 0?n:r}function iw(t,e){for(var n=-1,r=e.length,s=t.length;++n<r;)t[s+n]=e[n];return t}var V_=dn?dn.isConcatSpreadable:void 0;function nU(t){return Vt(t)||fu(t)||!!(V_&&t&&t[V_])}function rU(t,e,n,r,s){var i=-1,o=t.length;for(n||(n=nU),s||(s=[]);++i<o;){var a=t[i];n(a)?iw(s,a):r||(s[s.length]=a)}return s}function sU(t,e,n){var r=-1,s=t.length;e<0&&(e=-e>s?0:s+e),n=n>s?s:n,n<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(s);++r<s;)i[r]=t[r+e];return i}function iU(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:sU(t,e,n)}var oU="\\ud800-\\udfff",aU="\\u0300-\\u036f",lU="\\ufe20-\\ufe2f",uU="\\u20d0-\\u20ff",cU=aU+lU+uU,dU="\\ufe0e\\ufe0f",fU="\\u200d",hU=RegExp("["+fU+oU+cU+dU+"]");function ow(t){return hU.test(t)}function pU(t){return t.split("")}var aw="\\ud800-\\udfff",gU="\\u0300-\\u036f",mU="\\ufe20-\\ufe2f",_U="\\u20d0-\\u20ff",vU=gU+mU+_U,yU="\\ufe0e\\ufe0f",bU="["+aw+"]",df="["+vU+"]",ff="\\ud83c[\\udffb-\\udfff]",SU="(?:"+df+"|"+ff+")",lw="[^"+aw+"]",uw="(?:\\ud83c[\\udde6-\\uddff]){2}",cw="[\\ud800-\\udbff][\\udc00-\\udfff]",EU="\\u200d",dw=SU+"?",fw="["+yU+"]?",wU="(?:"+EU+"(?:"+[lw,uw,cw].join("|")+")"+fw+dw+")*",xU=fw+dw+wU,TU="(?:"+[lw+df+"?",df,uw,cw,bU].join("|")+")",IU=RegExp(ff+"(?="+ff+")|"+TU+xU,"g");function OU(t){return t.match(IU)||[]}function kU(t){return ow(t)?OU(t):pU(t)}function CU(t){return function(e){e=No(e);var n=ow(e)?kU(e):void 0,r=n?n[0]:e.charAt(0),s=n?iU(n,1).join(""):e.slice(1);return r[t]()+s}}var RU=CU("toUpperCase");function AU(t){return RU(No(t).toLowerCase())}function PU(t,e,n,r){for(var s=-1,i=t==null?0:t.length;++s<i;)n=e(n,t[s],s,t);return n}function DU(t){return function(e){return t==null?void 0:t[e]}}var NU={Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"}
47,LU=DU(NU),MU=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,FU="\\u0300-\\u036f",$U="\\ufe20-\\ufe2f",jU="\\u20d0-\\u20ff",UU=FU+$U+jU,BU="["+UU+"]",HU=RegExp(BU,"g");function VU(t){return t=No(t),t&&t.replace(MU,LU).replace(HU,"")}var zU=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function qU(t){return t.match(zU)||[]}var WU=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function GU(t){return WU.test(t)}var hw="\\ud800-\\udfff",KU="\\u0300-\\u036f",YU="\\ufe20-\\ufe2f",JU="\\u20d0-\\u20ff",XU=KU+YU+JU,pw="\\u2700-\\u27bf",gw="a-z\\xdf-\\xf6\\xf8-\\xff",ZU="\\xac\\xb1\\xd7\\xf7",QU="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eB="\\u2000-\\u206f",tB=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",mw="A-Z\\xc0-\\xd6\\xd8-\\xde",nB="\\ufe0e\\ufe0f",_w=ZU+QU+eB+tB,vw="['â]",z_="["+_w+"]",rB="["+XU+"]",yw="\\d+",sB="["+pw+"]",bw="["+gw+"]",Sw="[^"+hw+_w+yw+pw+gw+mw+"]",iB="\\ud83c[\\udffb-\\udfff]",oB="(?:"+rB+"|"+iB+")",aB="[^"+hw+"]",Ew="(?:\\ud83c[\\udde6-\\uddff]){2}",ww="[\\ud800-\\udbff][\\udc00-\\udfff]",fs="["+mw+"]",lB="\\u200d",q_="(?:"+bw+"|"+Sw+")",uB="(?:"+fs+"|"+Sw+")",W_="(?:"+vw+"(?:d|ll|m|re|s|t|ve))?",G_="(?:"+vw+"(?:D|LL|M|RE|S|T|VE))?",xw=oB+"?",Tw="["+nB+"]?",cB="(?:"+lB+"(?:"+[aB,Ew,ww].join("|")+")"+Tw+xw+")*",dB="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fB="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",hB=Tw+xw+cB,pB="(?:"+[sB,Ew,ww].join("|")+")"+hB,gB=RegExp([fs+"?"+bw+"+"+W_+"(?="+[z_,fs,"$"].join("|")+")",uB+"+"+G_+"(?="+[z_,fs+q_,"$"].join("|")+")",fs+"?"+q_+"+"+W_,fs+"+"+G_,fB,dB,yw,pB].join("|"),"g");function mB(t){return t.match(gB)||[]}function _B(t,e,n){return t=No(t),e=e,e===void 0?GU(t)?mB(t):qU(t):t.match(e)||[]}var vB="['â]",yB=RegExp(vB,"g");function Iw(t){return function(e){return PU(_B(VU(e).replace(yB,"")),t,"")}}var qh=Iw(function(t,e,n){return e=e.toLowerCase(),t+(n?AU(e):e)});function bB(){this.__data__=new Mn,this.size=0}function SB(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function EB(t){return this.__data__.get(t)}function wB(t){return this.__data__.has(t)}var xB=200;function TB(t,e){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!ho||r.length<xB-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fn(r)}return n.set(t,e),this.size=n.size,this}function Pn(t){var e=this.__data__=new Mn(t);this.size=e.size}Pn.prototype.clear=bB;Pn.prototype.delete=SB;Pn.prototype.get=EB;Pn.prototype.has=wB;Pn.prototype.set=TB;function IB(t,e){for(var n=-1,r=t==null?0:t.length,s=0,i=[];++n<r;){var o=t[n];e(o,n,t)&&(i[s++]=o)}return i}function OB(){return[]}var kB=Object.prototype,CB=kB.propertyIsEnumerable,K_=Object.getOwnPropertySymbols,RB=K_?function(t){return t==null?[]:(t=Object(t),IB(K_(t),function(e){return CB.call(t,e)}))}:OB;function AB(t,e,n){var r=e(t);return Vt(t)?r:iw(r,n(t))}function Y_(t){return AB(t,Bh,RB)}var hf=Jr(fn,"DataView"),pf=Jr(fn,"Promise"),gf=Jr(fn,"Set"),J_="[object Map]",PB="[object Object]",X_="[object Promise]",Z_="[object Set]",Q_="[object WeakMap]",ev="[object DataView]",DB=Yr(hf),NB=Yr(ho),LB=Yr(pf),MB=Yr(gf),FB=Yr(cf),xn=ni;(hf&&xn(new hf(new ArrayBuffer(1)))!=ev||ho&&xn(new ho)!=J_||pf&&xn(pf.resolve())!=X_||gf&&xn(new gf)!=Z_||cf&&xn(new cf)!=Q_)&&(xn=function(t){var e=ni(t),n=e==PB?t.constructor:void 0,r=n?Yr(n):"";if(r)switch(r){case DB:return ev;case NB:return J_;case LB:return X_;case MB:return Z_;case FB:return Q_}return e});var tv=fn.Uint8Array,$B="__lodash_hash_undefined__";function jB(t){return this.__data__.set(t,$B),this}function UB(t){return this.__data__.has(t)}function $l(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Fn;++e<n;)this.add(t[e])}$l.prototype.add=$l.prototype.push=jB;$l.prototype.has=UB;function BB(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function HB(t,e){return t.has(e)}var VB=1,zB=2;function Ow(t,e,n,r,s,i){var o=n&VB,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var u=i.get(t),c=i.get(e);if(u&&c)return u==e&&c==t;var d=-1,f=!0,p=n&zB?new $l:void 0;for(i.set(t,e),i.set(e,t);++d<a;){var h=t[d],g=e[d];if(r)var _=o?r(g,h,d,e,t,i):r(h,g,d,t,e,i);if(_!==void 0){if(_)continue;f=!1;break}
vendor: 2,288 bytes, line 47
47if(p){if(!BB(e,function(m,y){if(!HB(p,y)&&(h===m||s(h,m,n,r,i)))return p.push(y)})){f=!1;break}}else if(!(h===g||s(h,g,n,r,i))){f=!1;break}}return i.delete(t),i.delete(e),f}function qB(t){var e=-1,n=Array(t.size);return t.forEach(function(r,s){n[++e]=[s,r]}),n}function WB(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var GB=1,KB=2,YB="[object Boolean]",JB="[object Date]",XB="[object Error]",ZB="[object Map]",QB="[object Number]",e3="[object RegExp]",t3="[object Set]",n3="[object String]",r3="[object Symbol]",s3="[object ArrayBuffer]",i3="[object DataView]",nv=dn?dn.prototype:void 0,kc=nv?nv.valueOf:void 0;function o3(t,e,n,r,s,i,o){switch(n){case i3:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case s3:return!(t.byteLength!=e.byteLength||!i(new tv(t),new tv(e)));case YB:case JB:case QB:return $h(+t,+e);case XB:return t.name==e.name&&t.message==e.message;case e3:case n3:return t==e+"";case ZB:var a=qB;case t3:var l=r&GB;if(a||(a=WB),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;r|=KB,o.set(t,e);var c=Ow(a(t),a(e),r,s,i,o);return o.delete(t),c;case r3:if(kc)return kc.call(t)==kc.call(e)}return!1}var a3=1,l3=Object.prototype,u3=l3.hasOwnProperty;function c3(t,e,n,r,s,i){var o=n&a3,a=Y_(t),l=a.length,u=Y_(e),c=u.length;if(l!=c&&!o)return!1;for(var d=l;d--;){var f=a[d];if(!(o?f in e:u3.call(e,f)))return!1}var p=i.get(t),h=i.get(e);if(p&&h)return p==e&&h==t;var g=!0;i.set(t,e),i.set(e,t);for(var _=o;++d<l;){f=a[d];var m=t[f],y=e[f];if(r)var E=o?r(y,m,f,e,t,i):r(m,y,f,t,e,i);if(!(E===void 0?m===y||s(m,y,n,r,i):E)){g=!1;break}_||(_=f=="constructor")}if(g&&!_){var T=t.constructor,I=e.constructor;T!=I&&"constructor"in t&&"constructor"in e&&!(typeof T=="function"&&T instanceof T&&typeof I=="function"&&I instanceof I)&&(g=!1)}return i.delete(t),i.delete(e),g}var d3=1,rv="[object Arguments]",sv="[object Array]",_a="[object Object]",f3=Object.prototype,iv=f3.hasOwnProperty;function h3(t,e,n,r,s,i){var o=Vt(t),a=Vt(e),l=o?sv:xn(t),u=a?sv:xn(e);l=l==rv?_a:l,u=u==rv?_a:u;var c=l==_a,d=u==_a,f=l==u;if(f&&Fl(t)){if(!Fl(e))return!1;o=!0,c=!1}if(f&&!c)return i||(i=new Pn),o||Uh(t)?Ow(t,e,n,r,s,i):o3(t,e,l,n,r,s,i);if(!(n&d3)){var p=c&&iv.call(t,"__wrapped__"),h=d&&iv.call(e,"__wrapped__");
47if(p||h){var g=p?t.value():t,_=h?e.value():e;return i||(i=new Pn),s(g,_,n,r,i)}}return f?(i||(i=new Pn),c3(t,e,n,r,s,i)):!1}function Wh(t,e,n,r,s){return t===e?!0:t==null||e==null||!Hs(t)&&!Hs(e)?t!==t&&e!==e:h3(t,e,n,r,Wh,s)}var p3=1,g3=2;function m3(t,e,n,r){var s=n.length,i=s;if(t==null)return!i;for(t=Object(t);s--;){var o=n[s];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++s<i;){o=n[s];var a=o[0],l=t[a],u=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var c=new Pn,d;if(!(d===void 0?Wh(u,l,p3|g3,r,c):d))return!1}}return!0}function kw(t){return t===t&&!jr(t)}function _3(t){for(var e=Bh(t),n=e.length;n--;){var r=e[n],s=t[r];e[n]=[r,s,kw(s)]}return e}function Cw(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function v3(t){var e=_3(t);return e.length==1&&e[0][2]?Cw(e[0][0],e[0][1]):function(n){return n===t||m3(n,t,e)}}function y3(t,e){return t!=null&&e in Object(t)}function b3(t,e,n){e=sw(e,t);for(var r=-1,s=e.length,i=!1;++r<s;){var o=gu(e[r]);if(!(i=t!=null&&n(t,o)))break;t=t[o]}return i||++r!=s?i:(s=t==null?0:t.length,!!s&&jh(s)&&Fh(o,s)&&(Vt(t)||fu(t)))}function S3(t,e){return t!=null&&b3(t,e,y3)}var E3=1,w3=2;function x3(t,e){return Hh(t)&&kw(e)?Cw(gu(t),e):function(n){var r=tU(n,t);return r===void 0&&r===e?S3(n,t):Wh(e,r,E3|w3)}}function T3(t){return function(e){return e==null?void 0:e[t]}}function I3(t){return function(e){return zh(e,t)}}function O3(t){return Hh(t)?T3(gu(t)):I3(t)}function k3(t){return typeof t=="function"?t:t==null?du:typeof t=="object"?Vt(t)?x3(t[0],t[1]):v3(t):O3(t)}function C3(t){return function(e,n,r){for(var s=-1,i=Object(e),o=r(e),a=o.length;a--;){var l=o[++s];if(n(i[l],l,i)===!1)break}return e}}var R3=C3();function A3(t,e){return t&&R3(t,e,Bh)}function P3(t,e){return function(n,r){if(n==null)return n;if(!Do(n))return t(n,r);for(var s=n.length,i=-1,o=Object(n);++i<s&&r(o[i],i,o)!==!1;);return n}}var D3=P3(A3),Cc=function(){return fn.Date.now()},N3="Expected a function",L3=Math.max,M3=Math.min;function F3(t,e,n){var r,s,i,o,a,l,u=0,c=!1,d=!1,f=!0;if(typeof t!="function")throw new TypeError(N3);e=D_(e)||0,jr(n)&&(c=!!n.leading,d="maxWait"in n,i=d?L3(D_(n.maxWait)||0,e):i,f="trailing"in n?!!n.trailing:f);function p(x){var R=r,C=s;return r=s=void 0,u=x,o=t.apply(C,R),o}function h(x){return u=x,a=setTimeout(m,e),c?p(x):o}function g(x){var R=x-l,C=x-u,S=e-R;return d?M3(S,i-C):S}function _(x){var R=x-l,C=x-u;return l===void 0||R>=e||R<0||d&&C>=i}function m(){var x=Cc();if(_(x))return y(x);a=setTimeout(m,g(x))}function y(x){return a=void 0,f&&r?p(x):(r=s=void 0,o)}function E(){a!==void 0&&clearTimeout(a),u=0,r=l=s=a=void 0}function T(){return a===void 0?o:y(Cc())}function I(){var x=Cc(),R=_(x);if(r=arguments,s=this,l=x,R){if(a===void 0)return h(l);if(d)return clearTimeout(a),a=setTimeout(m,e),p(l)}return a===void 0&&(a=setTimeout(m,e)),o}return I.cancel=E,I.flush=T,I}function $3(t,e){var n=-1,r=Do(t)?Array(t.length):[];return D3(t,function(s,i,o){r[++n]=e(s,i,o)}),r}var j3="[object Map]",U3="[object Set]",B3=Object.prototype,H3=B3.hasOwnProperty;function an(t){if(t==null)return!0;if(Do(t)&&(Vt(t)||typeof t=="string"||typeof t.splice=="function"||Fl(t)||Uh(t)||fu(t)))return!t.length;var e=xn(t);if(e==j3||e==U3)return!t.size;if(ZE(t))return!rw(t).length;for(var n in t)if(H3.call(t,n))return!1;return!0}var V3=Iw(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()});function z3(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function q3(t,e){if(t!==e){var n=t!==void 0,r=t===null,s=t===t,i=Vs(t),o=e!==void 0,a=e===null,l=e===e,u=Vs(e);if(!a&&!u&&!i&&t>e||i&&o&&l&&!a&&!u||r&&o&&l||!n&&l||!s)return 1;if(!r&&!i&&!u&&t<e||u&&n&&s&&!r&&!i||a&&n&&s||!o&&s||!l)return-1}return 0}function W3(t,e,n){for(var r=-1,s=t.criteria,i=e.criteria,o=s.length,a=n.length;++r<o;){var l=q3(s[r],i[r]);if(l){if(r>=a)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return t.index-e.index}function G3(t,e,n){e.length?e=Va(e,function(i){return Vt(i)?function(o){return zh(o,i.length===1?i[0]:i)}:i}):e=[du];var r=-1;e=Va(e,tw(k3));var s=$3(t,function(i,o,a){var l=Va(e,function(u){return u(i)});return{criteria:l,index:++r,value:i}});return z3(s,function(i,o){return W3(i,o,n)})}var K3=N$(function(t,e){if(t==null)return[];var n=e.length;return n>1&&F_(t,e[0],e[1])?e=[]:n>2&&F_(e[0],e[1],e[2])&&(e=[e[0]]),G3(t,rU(e),[])});function Rw(t,e){return function(){return t.apply(e,arguments)}}const{toString:Y3}=Object.prototype,{getPrototypeOf:zs}=Object,{iterator:Lo,toStringTag:Aw}=Symbol,jl=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),po=(t,e)=>{let n=t;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),jl(n,e))return!0;n=zs(n)}return!1},J3=(t,e)=>t!=null&&po(t,e)?t[e]:void 0,Gh=(t=>e=>{const n=Y3.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jt=t=>(t=t.toLowerCase(),e=>Gh(e)===t),mu=t=>e=>typeof e===t,{isArray:Br}=Array,Hr=mu("undefined");function ri(t){return t!==null&&!Hr(t)&&t.constructor!==null&&!Hr(t.constructor)&&Lt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Pw=Jt("ArrayBuffer");function X3(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Pw(t.buffer),e}const Z3=mu("string"),Lt=mu("function"),Dw=mu("number"),si=t=>t!==null&&typeof t=="object",Q3=t=>t===!0||t===!1,za=t=>{if(!si(t))return!1;const e=zs(t);return(e===null||e===Object.prototype||zs(e)===null)&&!po(t,Aw)&&!po(t,Lo)},e5=t=>{if(!si(t)||ri(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},t5=Jt("Date"),n5=Jt("File"),r5=t=>!!(t&&typeof t.uri<"u"),s5=t=>t&&typeof t.getParts<"u",i5=Jt("Blob"),o5=Jt("FileList"),a5=Jt("Set"),l5=t=>si(t)&&Lt(t.pipe);function u5(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ov=u5(),av=typeof ov.FormData<"u"?ov.FormData:void 0,c5=t=>{if(!t)return!1;if(av&&t instanceof av)return!0;const e=zs(t);if(!e||e===Object.prototype||!Lt(t.append))return!1;const n=Gh(t);return n==="formdata"||n==="object"&&Lt(t.toString)&&t.toString()==="[object FormData]"},d5=Jt("URLSearchParams"),[f5,h5,p5,g5]=["ReadableStream","Request","Response","Headers"].map(Jt),m5=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mo(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),Br(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(ri(t))return;const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,t[a],a,t)}}function Nw(t,e){if(ri(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const Cr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Lw=t=>!Hr(t)&&t!==Cr;function mf(...t){const{caseless:e,skipUndefined:n}=Lw(this)&&this||{},r={},s=(i,o)=>
vendor: 4,104 bytes, line 47
47{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const a=e&&typeof o=="string"&&Nw(r,o)||o,l=jl(r,a)?r[a]:void 0;za(l)&&za(i)?r[a]=mf(l,i):za(i)?r[a]=mf({},i):Br(i)?r[a]=i.slice():(!n||!Hr(i))&&(r[a]=i)};for(let i=0,o=t.length;i<o;i++){const a=t[i];if(!a||ri(a)||(Mo(a,s),typeof a!="object"||Br(a)))continue;const l=Object.getOwnPropertySymbols(a);for(let u=0;u<l.length;u++){const c=l[u];k5.call(a,c)&&s(a[c],c)}}return r}const _5=(t,e,n,{allOwnKeys:r}={})=>(Mo(e,(s,i)=>{n&&Lt(s)?Object.defineProperty(t,i,{__proto__:null,value:Rw(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),v5=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),y5=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},b5=(t,e,n,r)=>{let s,i,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&zs(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},S5=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},E5=t=>{if(!t)return null;if(Br(t))return t;let e=t.length;if(!Dw(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},w5=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&zs(Uint8Array)),x5=(t,e)=>{const r=(t&&t[Lo]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},T5=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},I5=Jt("HTMLFormElement"),O5=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:k5}=Object.prototype,C5=Jt("RegExp"),Mw=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Mo(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},R5=t=>{Mw(t,(e,n)=>{if(Lt(t)&&["arguments","caller","callee"].includes(n))return!1;const r=t[n];if(Lt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},A5=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Br(t)?r(t):r(String(t).split(e)),n},P5=()=>{},D5=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function N5(t){return!!(t&&Lt(t.append)&&t[Aw]==="FormData"&&t[Lo])}const L5=t=>{const e=new WeakSet,n=r=>{if(si(r)){if(e.has(r))return;if(ri(r))return r;if(!("toJSON"in r)){e.add(r);let s;if(a5(r)){s=[];for(const i of r){const o=n(i);!Hr(o)&&s.push(o)}}else s=Br(r)?[]:{},Mo(r,(i,o)=>{const a=n(i);!Hr(a)&&(s[o]=a)});return e.delete(r),s}}return r};return n(t)},M5=Jt("AsyncFunction"),F5=t=>t&&(si(t)||Lt(t))&&Lt(t.then)&&Lt(t.catch),Fw=((t,e)=>t?setImmediate:e?((n,r)=>(Cr.addEventListener("message",({source:s,data:i})=>{s===Cr&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Cr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Lt(Cr.postMessage)),$5=typeof queueMicrotask<"u"?queueMicrotask.bind(Cr):typeof process<"u"&&process.nextTick||Fw,$w=t=>t!=null&&Lt(t[Lo]),j5=t=>t!=null&&po(t,Lo)&&$w(t),k={isArray:Br,isArrayBuffer:Pw,isBuffer:ri,isFormData:c5,isArrayBufferView:X3,isString:Z3,isNumber:Dw,isBoolean:Q3,isObject:si,isPlainObject:za,isEmptyObject:e5,isReadableStream:f5,isRequest:h5,isResponse:p5,isHeaders:g5,isUndefined:Hr,isDate:t5,isFile:n5,isReactNativeBlob:r5,isReactNative:s5,isBlob:i5,isRegExp:C5,isFunction:Lt,isStream:l5,isURLSearchParams:d5,isTypedArray:w5,isFileList:o5,forEach:Mo,merge:mf,extend:_5,trim:m5,stripBOM:v5,inherits:y5,toFlatObject:b5,kindOf:Gh,kindOfTest:Jt,endsWith:S5,toArray:E5,forEachEntry:x5,matchAll:T5,isHTMLForm:I5,hasOwnProperty:jl,hasOwnProp:jl,hasOwnInPrototypeChain:po,getSafeProp:J3,reduceDescriptors:Mw,freezeMethods:R5,toObjectSet:A5,toCamelCase:O5,noop:P5,toFiniteNumber:D5,findKey:Nw,global:Cr,
47isContextDefined:Lw,isSpecCompliantForm:N5,toJSONObject:L5,isAsyncFn:M5,isThenable:F5,setImmediate:Fw,asap:$5,isIterable:$w,isSafeIterable:j5},U5=k.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"]),B5=t=>{const e={};let n,r,s;return t&&t.split(` 48`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim();const a=k.hasOwnProp(e,n);!n||a&&k.hasOwnProp(U5,n)||(n==="set-cookie"?a?e[n].push(r):e[n]=[r]:e[n]=a?e[n]+", "+r:r)}),e};function H5(t){let e=0,n=t.length;for(;e<n;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=t.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}const V5=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),z5=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Kh(t,e){return k.isArray(t)?t.map(n=>Kh(n,e)):H5(String(t).replace(e,""))}const q5=t=>Kh(t,V5),W5=t=>Kh(t,z5);function jw(t){const e=Object.create(null);return k.forEach(t.toJSON(),(n,r)=>{e[r]=W5(n)}),e}const lv=Symbol("internals");function Ei(t){return t&&String(t).trim().toLowerCase()}function qa(t){return t===!1||t==null?t:k.isArray(t)?t.map(qa):q5(String(t))}function G5(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const K5=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Rc(t){let e=0,n=t.length;for(;e<n;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=t.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}function Y5(t){const e=t.length-1;if(e<1||t.charCodeAt(0)!==34||t.charCodeAt(e)!==34)return t;let n="";for(let r=1;r<e;r++){const s=t.charCodeAt(r);if(s===34||s===92&&(r+=1,r>=e))return t;n+=t[r]}return n}function J5(t){const e=Object.create(null),n=String(t);let r=0,s=!1,i=!1;function o(a){const l=Rc(n.slice(r,a)),u=l.indexOf("=");if(u<1)return;const c=Rc(l.slice(0,u));if(!K5.test(c))return;const d=c.toLowerCase();if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=Rc(l.slice(u+1));e[d]=Y5(f)}for(let a=0;a<n.length;a++){const l=n.charCodeAt(a);s?i?i=!1:l===92?i=!0:l===34&&(s=!1):l===34?s=!0:(l===44||l===59)&&(o(a),r=a+1)}return o(n.length),e}const X5=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ac(t,e,n,r,s){if(k.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!k.isString(e)){if(k.isString(r))return e.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(e)}}function Z5(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Q5(t,e){const n=k.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{__proto__:null,value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}let Et=class{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function i(a,l,u){const c=Ei(l);if(!c)return;const d=k.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=qa(a))}const o=(a,l)=>k.forEach(a,(u,c)=>i(u,c,l));if(k.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(k.isString(e)&&(e=e.trim())&&!X5(e))o(B5(e),n);else if(k.isObject(e)&&k.isSafeIterable(e)){let a=Object.create(null),l,u;for(const c of e){if(!k.isArray(c))throw new TypeError("Object iterator must return a key-value pair");u=c[0],k.hasOwnProp(a,u)?(l=a[u],a[u]=k.isArray(l)?[...l,c[1]]:[l,c[1]]):a[u]=c[1]}o(a,n)}else e!=null&&i(n,e,r);return this}get(e,n){if(e=Ei(e),e){const r=k.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return G5(s);if(k.isFunction(n))return n.call(this,s,r);if(k.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ei(e),e){const r=k.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ac(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(o){if(o=Ei(o),o){const a=k.findKey(r,o);a&&(!n||Ac(r,r[a],a,n))&&(delete r[a],s=!0)}}return k.isArray(e)?e.forEach(i):i(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!e||Ac(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const n=this,r={};
48return k.forEach(this,(s,i)=>{const o=k.findKey(r,i);if(o){n[o]=qa(s),delete n[i];return}const a=e?Z5(i):String(i).trim();a!==i&&delete n[i],n[a]=qa(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return k.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&k.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` 49`)}getSetCookie(){const e=this.get("set-cookie");return k.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return J5(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[lv]=this[lv]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Ei(o);r[a]||(Q5(s,o),r[a]=!0)}return k.isArray(e)?e.forEach(i):i(e),this}};Et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(Et.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});k.freezeMethods(Et);const Ul="[REDACTED ****]";function eH(t){if(k.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(k.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function tH(t,e){const n=new Set(e.map(i=>String(i).toLowerCase())),r=[],s=i=>{if(i===null||typeof i!="object"||k.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof Et&&(i=i.toJSON()),r.push(i);let o;if(k.isArray(i))o=[],i.forEach((a,l)=>{const u=s(a);k.isUndefined(u)||(o[l]=u)});else{if(!k.isPlainObject(i)&&eH(i))return r.pop(),i;o=Object.create(null);for(const[a,l]of Object.entries(i)){const u=n.has(a.toLowerCase())?Ul:s(l);k.isUndefined(u)||(o[a]=u)}}return r.pop(),o};return s(t)}function uv(t){try{return String(t)}catch{return""}}function nH(t){return t.errors.map(n=>{try{return n&&n.message?uv(n.message):uv(n)}catch{return""}}).filter(Boolean).join("; ")||t.name||"AggregateError"}
vendor: 5,036 bytes, line 49
49let G=class Uw extends Error{static from(e,n,r,s,i,o){let a=e.message;!a&&k.isArray(e.errors)&&e.errors.length&&(a=nH(e));const l=new Uw(a,n||e.code,r,s,i);return Object.defineProperty(l,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),l.name=e.name,e.status!=null&&l.status==null&&(l.status=e.status),o&&Object.assign(l,o),l}constructor(e,n,r,s,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){const e=this.config,n=e&&k.hasOwnProp(e,"redact")?e.redact:void 0,r=k.isArray(n)&&n.length>0?tH(e,n):k.toJSONObject(e);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:r,code:this.code,status:this.status}}};G.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";G.ERR_BAD_OPTION="ERR_BAD_OPTION";G.ECONNABORTED="ECONNABORTED";G.ETIMEDOUT="ETIMEDOUT";G.ECONNREFUSED="ECONNREFUSED";G.ERR_NETWORK="ERR_NETWORK";G.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";G.ERR_DEPRECATED="ERR_DEPRECATED";G.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";G.ERR_BAD_REQUEST="ERR_BAD_REQUEST";G.ERR_CANCELED="ERR_CANCELED";G.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";G.ERR_INVALID_URL="ERR_INVALID_URL";G.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const rH=null,Bw=100;function _f(t){return k.isPlainObject(t)||k.isArray(t)}function Hw(t){return k.endsWith(t,"[]")?t.slice(0,-2):t}function Pc(t,e,n){return t?t.concat(e).map(function(s,i){return s=Hw(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function sH(t){return k.isArray(t)&&!t.some(_f)}const iH=k.toFlatObject(k,{},null,function(e){return/^is[A-Z]/.test(e)});function _u(t,e,n){if(!k.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,E){return!k.isUndefined(E[y])});const r=n.metaTokens,s=n.visitor||h,i=n.dots,o=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?Bw:n.maxDepth,u=a&&k.isSpecCompliantForm(e),c=[];if(!k.isFunction(s))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(k.isDate(m))return m.toISOString();if(k.isBoolean(m))return m.toString();if(!u&&k.isBlob(m))throw new G("Blob is not supported. Use a Buffer instead.");if(k.isArrayBuffer(m)||k.isTypedArray(m)){if(u&&typeof a=="function")return new a([m]);throw new G("Blob is not supported. Use a Buffer instead.",G.ERR_NOT_SUPPORT)}return m}function f(m){if(m>l)throw new G("Object is too deeply nested ("+m+" levels). Max depth: "+l,G.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(m,y){if(l===1/0)return JSON.stringify(m);const E=[];return JSON.stringify(m,function(I,x){if(!k.isObject(x))return x;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(x),f(y+E.length-1),x})}function h(m,y,E){let T=m;if(k.isReactNative(e)&&k.isReactNativeBlob(m))return e.append(Pc(E,y,i),d(m)),!1;if(m&&!E&&typeof m=="object"){if(k.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=p(m,1);else if(k.isArray(m)&&sH(m)||(k.isFileList(m)||k.endsWith(y,"[]"))&&(T=k.toArray(m)))return y=Hw(y),T.forEach(function(x,R){!(k.isUndefined(x)||x===null)&&e.append(o===!0?Pc([y],R,i):o===null?y:y+"[]",d(x))}),!1}return _f(m)?!0:(e.append(Pc(E,y,i),d(m)),!1)}const g=Object.assign(iH,{defaultVisitor:h,convertValue:d,isVisitable:_f});function _(m,y,E=0){if(!k.isUndefined(m)){if(f(E),c.indexOf(m)!==-1)throw new Error("Circular reference detected in "+y.join("."));c.push(m),k.forEach(m,function(I,x){(!(k.isUndefined(I)||I===null)&&s.call(e,I,k.isString(x)?x.trim():x,y,g))===!0&&_(I,y?y.concat(x):[x],E+1)}),c.pop()}}if(!k.isObject(t))throw new TypeError("data must be an object");return _(t),e}function cv(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Yh(t,e){this._pairs=[],t&&_u(t,this,e)}const Vw=Yh.prototype;Vw.append=function(e,n){this._pairs.push([e,n])};Vw.toString=function(e){const n=e?r=>e.call(this,r,cv):cv;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function oH(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zw(t,e,n){if(!e)return t;t=t||"";const r=k.isFunction(n)?{serialize:n}:n,s=k.getSafeProp(r,"encode")||oH,i=k.getSafeProp(r,"serialize");let o;if(i?o=i(e,r):o=k.isURLSearchParams(e)?e.toString():new Yh(e,r).toString(s),o){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class dv{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}
vendor: 2,818 bytes, line 49
49forEach(e){k.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Jh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},aH=typeof URLSearchParams<"u"?URLSearchParams:Yh,lH=typeof FormData<"u"?FormData:null,uH=typeof Blob<"u"?Blob:null,cH={isBrowser:!0,classes:{URLSearchParams:aH,FormData:lH,Blob:uH},protocols:["http","https","file","blob","url","data"]},Xh=typeof window<"u"&&typeof document<"u",vf=typeof navigator=="object"&&navigator||void 0,dH=Xh&&(!vf||["ReactNative","NativeScript","NS"].indexOf(vf.product)<0),fH=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hH=Xh&&window.location.href||"http://localhost",pH=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xh,hasStandardBrowserEnv:dH,hasStandardBrowserWebWorkerEnv:fH,navigator:vf,origin:hH},Symbol.toStringTag,{value:"Module"})),ft={...pH,...cH};function gH(t,e){return _u(t,new ft.classes.URLSearchParams,{visitor:function(n,r,s,i){return ft.isNode&&k.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}const fv=Bw;function qw(t){if(t>fv)throw new G("FormData field is too deeply nested ("+t+" levels). Max depth: "+fv,G.ERR_FORM_DATA_DEPTH_EXCEEDED)}function mH(t){const e=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(t))!==null;)qw(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function _H(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function Ww(t){function e(n,r,s,i){qw(i);let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&k.isArray(s)?s.length:o,l?(k.hasOwnProp(s,o)?s[o]=k.isArray(s[o])?s[o].concat(r):[s[o],r]:s[o]=r,!a):((!k.hasOwnProp(s,o)||!k.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&k.isArray(s[o])&&(s[o]=_H(s[o])),!a)}if(k.isFormData(t)&&k.isFunction(t.entries)){const n={};return k.forEachEntry(t,(r,s)=>{e(mH(r),s,n,0)}),n}return null}const os=(t,e)=>t!=null&&k.hasOwnProp(t,e)?t[e]:void 0;function vH(t,e,n){if(k.isString(t))try{return(e||JSON.parse)(t),k.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Fo={transitional:Jh,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=k.isObject(e);if(i&&k.isHTMLForm(e)&&(e=new FormData(e)),k.isFormData(e))return s?JSON.stringify(Ww(e)):e;if(k.isArrayBuffer(e)||k.isBuffer(e)||k.isStream(e)||k.isFile(e)||k.isBlob(e)||k.isReadableStream(e))return e;if(k.isArrayBufferView(e))return e.buffer;if(k.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;
vendor: 4,434 bytes, line 49
49if(i){const l=os(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return gH(e,l).toString();if((a=k.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=os(this,"env"),c=u&&u.FormData;return _u(a?{"files[]":e}:e,c&&new c,l)}}return i||s?(n.setContentType("application/json",!1),vH(e)):e}],transformResponse:[function(e){const n=os(this,"transitional")||Fo.transitional,r=n&&n.forcedJSONParsing,s=os(this,"responseType"),i=s==="json";if(k.isResponse(e)||k.isReadableStream(e))return e;if(e&&k.isString(e)&&(r&&!s||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e,os(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?G.from(l,G.ERR_BAD_RESPONSE,this,null,os(this,"response")):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch","query"],t=>{Fo.headers[t]={}});function Dc(t,e){const n=this||Fo,r=e||n,s=Et.from(r.headers);let i=r.data;return k.forEach(t,function(a){i=a.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function Gw(t){return!!(t&&t.__CANCEL__)}let $o=class extends G{constructor(e,n,r){super(e??"canceled",G.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Kw(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new G("Request failed with status code "+n.status,n.status>=400&&n.status<500?G.ERR_BAD_REQUEST:G.ERR_BAD_RESPONSE,n.config,n.request,n))}function yH(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function bH(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[s]=l,r[s]=u;let d=i,f=0;for(;d!==s;)f+=n[d++],d=d%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),u-o<e)return;const p=c&&u-c;return p?Math.round(f*1e3/p):void 0}}function SH(t,e){let n=0,r=1e3/e,s,i;const o=(u,c=Date.now())=>{n=c,s=null,i&&(clearTimeout(i),i=null),t(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const Bl=(t,e,n=3)=>{let r=0;const s=bH(50,250);return SH(i=>{if(!i||typeof i.loaded!="number")return;const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=Math.max(0,a!=null?Math.min(o,a):o),u=Math.max(0,l-r),c=s(u);r=Math.max(r,l);const d={loaded:l,total:a,progress:a?l/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a?(a-l)/c:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},n)},hv=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},pv=(t,e=k.asap)=>(...n)=>e(()=>t(...n)),EH=ft.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,ft.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>!0,wH=ft.hasStandardBrowserEnv?{write(t,e,n,r,s,i,o){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];k.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),k.isString(r)&&a.push(`path=${r}`),k.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),k.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const r=e[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===t)try{return decodeURIComponent(r.slice(s+1))}catch{return r.slice(s+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function xH(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function TH(t,e){if(!e)return t;let n=t.length;for(;n>0&&t.charCodeAt(n-1)===47;)n--;return t.slice(0,n)+"/"+e.replace(/^\/+/,"")}const IH=/^https?:(?!\/\/)/i,OH=/[\t\n\r]/g;function kH(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function CH(t){return kH(t).replace(OH,"")}function RH(t){return t&&t.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,n,r="")=>`${n}${r}${Ul}`)}function AH(t){const e=t.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Ul}@`),n=e.indexOf("#"),s=(n===-1?e:e.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Ul}`);return n===-1?s:`${s}#${RH(e.slice(n+1))}`}
49function gv(t,e){if(typeof t=="string"){const n=CH(t);if(IH.test(n))throw new G(`Invalid URL ${JSON.stringify(AH(n))}: missing "//" after protocol`,G.ERR_INVALID_URL,e)}}function Yw(t,e,n,r){gv(e,r);let s=!xH(e);return t&&(s||n===!1)?(gv(t,r),TH(t,e)):e}const mv=t=>t instanceof Et?{...t}:t,PH=t=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(t).concat(Object.getOwnPropertySymbols(t).filter(e=>Object.getOwnPropertyDescriptor(t,e).enumerable)):Object.keys(t);function Vr(t,e){t=t||{},e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,d,f,p){return k.isPlainObject(c)&&k.isPlainObject(d)?k.merge.call({caseless:p},c,d):k.isPlainObject(d)?k.merge({},d):k.isArray(d)?d.slice():d}function s(c,d,f,p){if(k.isUndefined(d)){if(!k.isUndefined(c))return r(void 0,c,f,p)}else return r(c,d,f,p)}function i(c,d){if(!k.isUndefined(d))return r(void 0,d)}function o(c,d){if(k.isUndefined(d)){if(!k.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function a(c){const d=k.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!k.isUndefined(d))if(k.isPlainObject(d)){if(k.hasOwnProp(d,c))return d[c]}else return;const f=k.hasOwnProp(t,"transitional")?t.transitional:void 0;if(k.isPlainObject(f)&&k.hasOwnProp(f,c))return f[c]}function l(c,d,f){if(k.hasOwnProp(e,f))return r(c,d);if(k.hasOwnProp(t,f))return r(void 0,c)}const u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:l,headers:(c,d,f)=>s(mv(c),mv(d),f,!0)};return k.forEach(PH({...t,...e}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=k.hasOwnProp(u,d)?u[d]:s,p=k.hasOwnProp(t,d)?t[d]:void 0,h=k.hasOwnProp(e,d)?e[d]:void 0,g=f(p,h,d);k.isUndefined(g)&&f!==l||(n[d]=g)}),k.hasOwnProp(e,"validateStatus")&&k.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(k.hasOwnProp(t,"validateStatus")?n.validateStatus=r(void 0,t.validateStatus):delete n.val
vendor: 15,933 bytes, lines 49-55
49idateStatus),n}const DH=["content-type","content-length"];function NH(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([r,s])=>{DH.includes(r.toLowerCase())&&t.set(r,s)})}const LH=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function Jw(t){const e=Vr({},t),n=f=>k.hasOwnProp(e,f)?e[f]:void 0,r=n("data");let s=n("withXSRFToken");const i=n("xsrfHeaderName"),o=n("xsrfCookieName");let a=n("headers");const l=n("auth"),u=n("baseURL"),c=n("allowAbsoluteUrls"),d=n("url");if(e.headers=a=Et.from(a),e.url=zw(Yw(u,d,c,e),n("params"),n("paramsSerializer")),l){const f=k.getSafeProp(l,"username")||"",p=k.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(f+":"+(p?LH(p):"")))}catch(h){throw G.from(h,G.ERR_BAD_OPTION_VALUE,t)}}if(k.isFormData(r)&&(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv||k.isReactNative(r)?a.setContentType(void 0):k.isFunction(r.getHeaders)&&NH(a,r.getHeaders(),n("formDataHeaderPolicy"))),ft.hasStandardBrowserEnv&&(k.isFunction(s)&&(s=s(e)),s===!0||s==null&&EH(e.url))){const p=i&&o&&wH.read(o);p&&a.set(i,p)}return e}const MH=typeof XMLHttpRequest<"u",FH=MH&&function(t){return new Promise(function(n,r){const s=Jw(t);let i=s.data;const o=Et.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,p,h;function g(){p&&p(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let _=new XMLHttpRequest;_.open(s.method.toUpperCase(),s.url,!0),_.timeout=s.timeout;function m(){if(!_)return;const E=Et.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),I={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:E,config:t,request:_};Kw(function(R){n(R),g()},function(R){r(R),g()},I),_=null}"onloadend"in _?_.onloadend=m:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.startsWith("file:"))||setTimeout(m)},_.onabort=function(){_&&(r(new G("Request aborted",G.ECONNABORTED,t,_)),g(),_=null)},_.onerror=function(T){const I=T&&T.message?T.message:"Network Error",x=new G(I,G.ERR_NETWORK,t,_);x.event=T||null,r(x),g(),_=null},_.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const I=s.transitional||Jh;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new G(T,I.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,t,_)),g(),_=null},i===void 0&&o.setContentType(null),"setRequestHeader"in _&&k.forEach(jw(o),function(T,I){_.setRequestHeader(I,T)}),k.isUndefined(s.withCredentials)||(_.withCredentials=!!s.withCredentials),a&&a!=="json"&&(_.responseType=s.responseType),u&&([f,h]=Bl(u,!0),_.addEventListener("progress",f)),l&&_.upload&&([d,p]=Bl(l),_.upload.addEventListener("progress",d),_.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(c=E=>{_&&(r(!E||E.type?new $o(null,t,_):E),_.abort(),g(),_=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const y=yH(s.url);if(y&&!ft.protocols.includes(y)){r(new G("Unsupported protocol "+y+":",G.ERR_BAD_REQUEST,t)),g();return}_.send(i||null)})},$H=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,o();const u=l instanceof Error?l:this.reason;n.abort(u instanceof G?u:new $o(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{i=null,s(new G(`timeout of ${e}ms exceeded`,G.ETIMEDOUT))},e);const o=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),t=null)};t.forEach(l=>{if(!r){if(l.aborted){s.call(l);return}l.addEventListener("abort",s,{once:!0})}});const{signal:a}=n;return a.unsubscribe=()=>k.asap(o),a},jH=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},UH=async function*(t,e){for await(const n of BH(t))yield*jH(n,e)},BH=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},_v=(t,e,n,r)=>{const s=UH(t,e);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},vv=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,Xw=(t,e,n)=>e+2<n&&vv(t.charCodeAt(e+1))&&vv(t.charCodeAt(e+2)),yv=t=>t<=57?t-48:(t&223)-55,HH=t=>t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===43||t===47||t===45||t===95,VH=t=>t===9||t===10||t===12||t===13||t===32,zH=t=>{const e=Math.floor(t/4),n=t%4;return e*3+(n===2?1:n===3?2:0)},qH=t=>{const e=t.length;let n=0;return e>0&&t.charCodeAt(e-1)===61&&(n++,e>1&&t.charCodeAt(e-2)===61&&n++),Math.floor((e-n)*3/4)},WH=t=>{const e=t.length;let n=0,r=0,s=!1;for(let i=0;i<e;i++){let o=t.charCodeAt(i);if(o===37&&Xw(t,i,e)&&(o=yv(t.charCodeAt(i+1))*16+yv(t.charCodeAt(i+2)),i+=2),!VH(o)){if(o===61){r++;continue}if(!HH(o)||r>0){s=!0;continue}n++}}return s||r>2||r>0&&(n+r)%4!==0||n%4===1?qH(t):zH(n)},GH=(t,e)=>{if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const n=t.indexOf(",");if(n<0)return 0;const r=t.slice(5,n),s=t.slice(n+1);if(/;base64/i.test(r))return e(s);let o=0;for(let a=0,l=s.length;a<l;a++){const u=s.charCodeAt(a);if(u===37&&Xw(s,a,l))o+=1,a+=2;else if(u<128)o+=1;else if(u<2048)o+=2;else if(u>=55296&&u<=56319&&a+1<l){const c=s.charCodeAt(a+1);c>=56320&&c<=57343?(o+=4,a++):o+=3}else o+=3}return o};function KH(t){const e=typeof t=="string"?t.indexOf("#"):-1;return GH(e===-1?t:t.slice(0,e),WH)}const Zh="1.19.0",bv=64*1024,{isFunction:va}=k,YH=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),Sv=t=>{if(!k.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Ev=(t,...e)=>{try{return!!t(...e)}catch{return!1}},JH=t=>{const e=t.indexOf("://");let n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},XH=t=>{const e=k.global!==void 0&&k.global!==null?k.global:globalThis,{ReadableStream:n,TextEncoder:r}=e;t=k.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:s,Request:i,Response:o}=t,a=s?va(s):typeof fetch=="function",l=va(i),u=va(o);if(!a)return!1;const c=a&&va(n),d=a&&(typeof r=="function"?(m=>y=>m.encode(y))(new r):async m=>new Uint8Array(await new i(m).arrayBuffer())),f=l&&c&&Ev(()=>{let m=!1;const y=new i(ft.origin,{body:new n,method:"POST",get duplex(){return m=!0,"half"}}),E=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),m&&!E}),p=u&&c&&Ev(()=>k.isReadableStream(new o("").body)),h={stream:p&&(m=>m.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!h[m]&&(h[m]=(y,E)=>{let T=y&&y[m];if(T)return T.call(y);throw new G(`Response type '${m}' is not supported`,G.ERR_NOT_SUPPORT,E)})});const g=async m=>{if(m==null)return 0;if(k.isBlob(m))return m.size;if(k.isSpecCompliantForm(m))return(await new i(ft.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(k.isArrayBufferView(m)||k.isArrayBuffer(m))return m.byteLength;if(k.isURLSearchParams(m)&&(m=m+""),k.isString(m))return(await d(m)).byteLength},_=async(m,y)=>{const E=k.toFiniteNumber(m.getContentLength());return E??g(y)};return async m=>{let{url:y,method:E,data:T,signal:I,cancelToken:x,timeout:R,onDownloadProgress:C,onUploadProgress:S,responseType:w,headers:A,withCredentials:P="same-origin",fetchOptions:O,maxContentLength:N,maxBodyLength:V}=Jw(m);const L=k.isNumber(N)&&N>-1,W=k.isNumber(V)&&V>-1,q=ae=>k.hasOwnProp(m,ae)?m[ae]:void 0;let ie=s||fetch;w=w?(w+"").toLowerCase():"text";let ce=$H([I,x&&x.toAbortSignal()],R),Z=null;const Ee=ce&&ce.unsubscribe&&(()=>{ce.unsubscribe()});let de,_e=null;const Ie=()=>new G("Request body larger than maxBodyLength limit",G.ERR_BAD_REQUEST,m,Z);try{let ae;const We=q("auth");if(We){const Y=k.getSafeProp(We,"username")||"",Ze=k.getSafeProp(We,"password")||"";ae={username:Y,password:Ze}}if(JH(y)){const Y=new URL(y,ft.origin);if(!ae&&(Y.username||Y.password)){const Ze=Sv(Y.username),rt=Sv(Y.password);ae={username:Ze,password:rt}}(Y.username||Y.password)&&(Y.username="",Y.password="",y=Y.href)}if(ae&&(A.delete("authorization"),A.set("Authorization","Basic "+btoa(YH((ae.username||"")+":"+(ae.password||""))))),L&&typeof y=="string"&&y.startsWith("data:")&&KH(y)>N)throw new G("maxContentLength size of "+N+" exceeded",G.ERR_BAD_RESPONSE,m,Z);if(W&&E!=="get"&&E!=="head"){const Y=await g(T);if(typeof Y=="number"&&isFinite(Y)&&(de=Y,Y>V))throw Ie()}const Se=W&&(k.isReadableStream(T)||k.isStream(T)),ct=(Y,Ze,rt)=>_v(Y,bv,lt=>{if(W&<>V)throw _e=Ie();Ze&&Ze(lt)},rt);if(f&&E!=="get"&&E!=="head"&&(S||Se)){if(de=de??await _(A,T),de!==0||Se){let Y=new i(y,{method:"POST",body:T,duplex:"half"}),Ze;if(k.isFormData(T)&&(Ze=Y.headers.get("content-type"))&&A.setContentType(Ze),Y.body){const[rt,lt]=S&&hv(de,Bl(pv(S)))||[];T=ct(Y.body,rt,lt)}}}else if(Se&&!l&&c&&E!=="get"&&E!=="head")T=ct(T);else if(Se&&l&&!f&&E!=="get"&&E!=="head")throw new G("Stream request bodies are not supported by the current fetch implementation",G.ERR_NOT_SUPPORT,m,Z);k.isString(P)||(P=P?"include":"omit");const wt=l&&"credentials"in i.prototype;if(k.isFormData(T)){const Y=A.getContentType();Y&&/^multipart\/form-data/i.test(Y)&&!/boundary=/i.test(Y)&&A.delete("content-type")}A.set("User-Agent","axios/"+Zh,!1);const Xt={...O,signal:ce,method:E.toUpperCase(),headers:jw(A.normalize()),body:T,duplex:"half",credentials:wt?P:void 0};Z=l&&new i(y,Xt);let Ge=await(l?ie(Z,O):ie(y,Xt));const it=Et.from(Ge.headers);if(L){const Y=k.toFiniteNumber(it.getContentLength());if(Y!=null&&Y>N)throw new G("maxContentLength size of "+N+" exceeded",G.ERR_BAD_RESPONSE,m,Z)}const mt=p&&(w==="stream"||w==="response");if(p&&Ge.body&&(C||L||mt&&Ee)){const Y={};["status","statusText","headers"].forEach(le=>{Y[le]=Ge[le]});const Ze=k.toFiniteNumber(it.getContentLength()),[rt,lt]=C&&hv(Ze,Bl(pv(C),!0))||[];let he=0;const _t=le=>{if(L&&(he=le,he>N))throw new G("maxContentLength size of "+N+" exceeded",G.ERR_BAD_RESPONSE,m,Z);rt&&rt(le)};Ge=new o(_v(Ge.body,bv,_t,()=>{lt&<(),Ee&&Ee()}),Y)}w=w||"text";let Xe=await h[k.findKey(h,w)||"text"](Ge,m);if(L&&!p&&!mt){let Y;if(Xe!=null&&(typeof Xe.byteLength=="number"?Y=Xe.byteLength:typeof Xe.size=="number"?Y=Xe.size:typeof Xe=="string"&&(Y=typeof r=="function"?new r().encode(Xe).byteLength:Xe.length)),typeof Y=="number"&&Y>N)throw new G("maxContentLength size of "+N+" exceeded",G.ERR_BAD_RESPONSE,m,Z)}return!mt&&Ee&&Ee(),await new Promise((Y,Ze)=>{Kw(Y,Ze,{data:Xe,headers:Et.from(Ge.headers),status:Ge.status,statusText:Ge.statusText,config:m,request:Z})})}catch(ae){if(Ee&&Ee(),ce&&ce.aborted&&ce.reason instanceof G){const We=ce.reason;throw We.config=m,Z&&(We.request=Z),ae!==We&&Object.defineProperty(We,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),We}if(_e)throw Z&&!_e.request&&(_e.request=Z),_e;if(ae instanceof G)throw Z&&!ae.request&&(ae.request=Z),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const We=new G("Network Error",G.ERR_NETWORK,m,Z,ae&&ae.response);throw Object.defineProperty(We,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),We}throw G.from(ae,ae&&ae.code,m,Z,ae&&ae.response)}}},ZH=new Map,Zw=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:s}=e,i=[r,s,n];let o=i.length,a=o,l,u,c=ZH;for(;a--;)l=i[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:XH(e)),c=u;return u};Zw();const Qh={http:rH,xhr:FH,fetch:{get:Zw}};k.forEach(Qh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const wv=t=>`- ${t}`,QH=t=>k.isFunction(t)||t===null||t===!1;function e4(t,e){t=k.isArray(t)?t:[t];const{length:n}=t;let r,s;const i={};for(let o=0;o<n;o++){r=t[o];let a;if(s=r,!QH(r)&&(s=Qh[(a=String(r)).toLowerCase()],s===void 0))throw new G(`Unknown adapter '${a}'`);if(s&&(k.isFunction(s)||(s=s.get(e))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since : 50`+o.map(wv).join(` 51`):" "+wv(o[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+a,G.ERR_NOT_SUPPORT)}return s}const Qw={getAdapter:e4,adapters:Qh};function Nc(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new $o(null,t)}function Lc(t){return Nc(t),t.headers=Et.from(t.headers),t.data=Dc.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Qw.getAdapter(t.adapter||Fo.adapter,t)(t).then(function(r){Nc(t),t.response=r;try{r.data=Dc.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=Et.from(r.headers),r},function(r){if(!Gw(r)&&(Nc(t),r&&r.response)){t.response=r.response;try{r.response.data=Dc.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=Et.from(r.response.headers)}return Promise.reject(r)})}const vu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{vu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const xv={};vu.transitional=function(e,n,r){function s(i,o){return"[Axios v"+Zh+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(e===!1)throw new G(s(o," has been removed"+(n?" in "+n:"")),G.ERR_DEPRECATED);return n&&!xv[o]&&(xv[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,o,a):!0}};vu.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function t4(t,e,n){if(typeof t!="object"||t===null)throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],o=Object.prototype.hasOwnProperty.call(e,i)?e[i]:void 0;if(o){const a=t[i],l=a===void 0||o(a,i,t);if(l!==!0)throw new G("option "+i+" must be "+l,G.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new G("Unknown option "+i,G.ERR_BAD_OPTION)}}const Wa={assertOptions:t4,validators:vu},vt=Wa.validators;let Lr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new dv,response:new dv}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=(()=>{if(!s.stack)return"";const o=s.stack.indexOf(` 52`);return o===-1?"":s.stack.slice(o+1)})();try{if(!r.stack)r.stack=i;else if(i){const o=i.indexOf(` 53`),a=o===-1?-1:i.indexOf(` 54`,o+1),l=a===-1?"":i.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=` 55`+i)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Vr(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Wa.assertOptions(r,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean),legacyInterceptorReqResOrdering:vt.transitional(vt.boolean),advertiseZstdAcceptEncoding:vt.transitional(vt.boolean),validateStatusUndefinedResolves:vt.transitional(vt.boolean)},!1),s!=null&&(k.isFunction(s)?n.paramsSerializer={serialize:s}:Wa.assertOptions(s,{encode:vt.function,serialize:vt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Wa.assertOptions(n,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&k.merge(i.common,i[n.method]);
55i&&k.forEach(["delete","get","head","post","put","patch","query","common"],h=>{delete i[h]}),n.headers=Et.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const _=n.transitional||Jh;_&&_.legacyInterceptorReqResOrdering?a.unshift(g.fulfilled,g.rejected):a.push(g.fulfilled,g.rejected)});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,f;if(!l){const h=[Lc.bind(this),void 0];for(h.unshift(...a),h.push(...u),f=h.length,c=Promise.resolve(n);d<f;)c=c.then(h[d++],h[d++]);return c}f=a.length;let p=n;for(;d<f;){const h=a[d++],g=a[d++];try{p=h?h(p):p}catch(_){if(!g){c=Promise.reject(_);break}try{const m=g.call(this,_);k.isThenable(m)&&(c=Promise.resolve(m).then(()=>Lc.call(this,p)))}catch(m){c=Promise.reject(m)}break}}if(!c)try{c=Lc.call(this,p)}catch(h){c=Promise.reject(h)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=Vr(this.defaults,e);const n=Yw(e.baseURL,e.url,e.allowAbsoluteUrls,e);return zw(n,e.params,e.paramsSerializer)}};
vendor: 1,715 bytes, line 55
55k.forEach(["delete","get","head","options"],function(e){Lr.prototype[e]=function(n,r){return this.request(Vr(r||{},{method:e,url:n,data:r&&k.hasOwnProp(r,"data")?r.data:void 0}))}});k.forEach(["post","put","patch","query"],function(e){function n(r){return function(i,o,a){return this.request(Vr(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Lr.prototype[e]=n(),e!=="query"&&(Lr.prototype[e+"Form"]=n(!0))});let n4=class ex{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},e(function(i,o,a){r.reason||(r.reason=new $o(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new ex(function(s){e=s}),cancel:e}}};function r4(t){return function(n){return t.apply(null,n)}}function s4(t){return k.isObject(t)&&t.isAxiosError===!0}const yf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
55alContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(yf).forEach(([t,e])=>{yf[e]=t});function tx(t){const e=new Lr(t),n=Rw(Lr.prototype.request,e);return k.extend(n,Lr.prototype,e,{allOwnKeys:!0}),k.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return tx(Vr(t,s))},n}const tt=tx(Fo);tt.Axios=Lr;tt.CanceledError=$o;tt.CancelToken=n4;tt.isCancel=Gw;tt.VERSION=Zh;tt.toFormData=_u;tt.AxiosError=G;tt.Cancel=tt.CanceledError;tt.all=function(e){return Promise.all(e)};tt.spread=r4;tt.isAxiosError=s4;tt.mergeConfig=Vr;tt.AxiosHeaders=Et;tt.formToJSON=t=>Ww(k.isHTMLForm(t)?new FormData(t):t);tt.getAdapter=Qw.getAdapter;tt.HttpStatusCode=yf;tt.default=tt;const{Axios:bW,AxiosError:SW,CanceledError:EW,isCancel:wW,CancelToken:xW,VERSION:TW,all:IW,Cancel:OW,isAxiosError:kW,spread:CW,toFormData:RW,AxiosHeaders:AW,HttpStatusCode:PW,formToJSON:DW,getAdapter:NW,mergeConfig:LW,create:MW}=tt,ya=new Map,i4=new Set(["save-work","duplicate-work","duplicate-practice","create-session","duplicate-session"]),bf=t=>Array.isArray(t)?t.map(bf):t&&typeof t=="object"?Object.fromEntries(Object.keys(t).sort().filter(e=>e!=="cloud_id").map(e=>[e,bf(t[e])])):t,ba=()=>{try{return globalThis.sessionStorage}catch{return null}};async function o4(t,e,n,r){var l,u;const s=t.split("?")[0].split("/").pop();if(String(e).toUpperCase()!=="POST"||!i4.has(s)||!n||s==="save-work"&&Number(n.work_id)||n.creation_request_id)return{data:n,complete(){}};if(r==null||r==="")throw new Error("Your account is still loading. Please retry the creation.");const i=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(JSON.stringify([String(r),s,bf(n)]))),o="studio-creation-v1:"+[...new Uint8Array(i)].map(c=>c.toString(16).padStart(2,"0")).join("");let a=ya.get(o);if(!a){try{a=JSON.parse(((l=ba())==null?void 0:l.getItem(o))||"null")}catch{}(!a||typeof a.id!="string"||!/^[a-zA-Z0-9_-]{8,128}$/.test(a.id))&&(a={id:crypto.randomUUID(),...n.cloud_id&&{cloudId:n.cloud_id}}),ya.set(o,a);try{(u=ba())==null||u.setItem(o,JSON.stringify(a))}catch{}}return{data:{...n,creation_request_id:a.id,...a.cloudId&&{cloud_id:a.cloudId}},complete(){var c,d,f;((c=ya.get(o))==null?void 0:c.id)===a.id&&ya.delete(o);try{const p=JSON.parse(((d=ba())==null?void 0:d.getItem(o))||"null");(p==null?void 0:p.id)===a.id&&((f=ba())==null||f.removeItem(o))}catch{}}}}const a4=async(t={})=>{var n,r,s;const e=await o4(t.url||"",t.method,t.data,(n=uf.getState().user.userDetail)==null?void 0:n.id);try{const i=await tt({...t,url:`https://api.touchtight.com/api${t.url}`,data:e.data,headers:{...t.headers,Accept:"application/json"},withCredentials:!0});return(r=i.data)!=null&&r.success&&(e.complete(),(s=e.data)!=null&&s.creation_request_id&&typeof window<"u"&&window.dispatchEvent(new Event("studio:creation-saved"))),i}catch(i){throw tt.isAxiosError(i)&&i.response&&i.response.status>=400&&i.response.status<500&&e.complete(),i}},Tv={width:40,height:40,borderRadius:"50%",border:"3.6px solid transparent",borderTopColor:"currentColor",borderRightColor:"currentColor",animation:"tt-loader-spin 1s linear infinite"},Iv={display:"flex",flexDirection:"column",gap:8,justifyContent:"center",alignItems:"center",color:"#2F80ED"},ep=({backdrop:t=!1,showText:e=!1,text:n="",height:r="100%"})=>v.jsx(b.Fragment,{children:t?v.jsx("div",{role:"progressbar","aria-label":"Loading",style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",zIndex:1201},children:v.jsxs("div",{style:{...Iv,height:"100%"},children:[v.jsx("span",{style:Tv}),n!==""&&v.jsx("p",{style:{margin:0},children:n})]})}):v.jsxs("div",{role:"progressbar","aria-label":"Loading",style:{...Iv,height:r},children:[v.jsx("span",{style:Tv}),e&&v.jsx("p",{style:{margin:0},children:n||"Loading..."})]})}),go={GENERAL_SIGNIN:"General_SignIn",GENERAL_LOGOUT:"General_Logout",GENERAL_USER_LANDED:"General_User_Landed",GENERAL_USER_ROLE_CREATED:"General_User_Role_Created",GENERAL_SUBSCRIPTION_CREATED:"General_Subscription_Created",GENERAL_SUBSCRIPTION_UPGRADED:"General_Subscription_Upgraded",GENERAL_SUBSCRIPTION_DOWNGRADED:"General_Subscription_Downgraded",GENERAL_SUBSCRIPTION_CANCELED_PENDING:"General_Subscription_Canceled_Pending",GENERAL_SUBSCRIPTION_CANCELLED_CHURNED:"General_Subscription_Cancelled_Churned",GENERAL_OAUTH_SIGNUP_INITIATED:"General_OAuth_SignUp_Initiated",GENERAL_OAUTH_SIGNIN_INITIATED:"General_OAuth_SignIn_Initiated",GENERAL_OAUTH_SIGNUP_COMPLETED:"General_OAuth_SignUp_Completed",G
55ENERAL_OAUTH_SIGNIN_COMPLETED:"General_OAuth_SignIn_Completed",GENERAL_OAUTH_FAILED:"General_OAuth_Failed",DUGOUT_ADDED_CLUB:"Dugout_Added_Club",DUGOUT_ADDED_TEAM:"Dugout_Added_Team",DUGOUT_PLAYERS_REPORT_CREATED:"Dugout_Players_Report_Created",DUGOUT_MATCH_REPORT_CREATED:"Dugout_Match_Report_Created",DUGOUT_MATCH_PLANNER_CREATED:"Dugout_Match_Planner_Created",DUGOUT_PLAYERS_ADDED:"Dugout_Players_Added",DUGOUT_COACHES_INVITED:"Dugout_Coaches_Invited",DUGOUT_SEASONPLAN_ADDED:"Dugout_SeasonPlan_Added",DUGOUT_SESSION_CREATED:"Dugout_Session_Created",DUGOUT_SESSION_PDF_CREATED:"Dugout_Session_PDF_Created",DUGOUT_SESSION_VIDEO_WATCHED:"Dugout_Session_Video_Watched",DUGOUT_SESSION_VIDEO_PROGRESS:"Dugout_Session_Video_Progress",DUGOUT_FOLDERS_ADDED_TO_CLUB_DOCUMENTS:"Dugout_Folders_Added_to_Club_Documents",DUGOUT_CALENDAR_ACCESSED:"Dugout_Calendar_Accessed",DUGOUT_DOCUMENTS_ACCESSED:"Dugout_Documents_Accessed",DUGOUT_FIXTURES_VIEWED:"Dugout_Fixtures_Viewed",DUGOUT_ADDED_FIXTURE:"Dugout_Added_Fixture",DUGOUT_DUPLICATE_FIXTURE:"Dugout_Duplicate_Fixture",DUGOUT_QUICK_SCORE:"Dugout_Quick_Score",DUGOUT_FIXTURE_REPORT_FILED:"Dugout_Fixture_Report_Filed",ENGINE_ROOM_VIDEO_WATCHED:"EngineRoom_Video_Watched",ENGINE_ROOM_PLAYLIST_ADDED:"EngineRoom_Playlist_Added",ENGINE_ROOM_VIDEO_COMPLETED:"EngineRoom_Video_Completed",SESSION_PLANNER_ACCESSED:"SessionPlanner_Accessed",SESSION_PLANNER_VIDEO_GENERATED:"SessionPlanner_Video_Generated",SESSION_PLANNER_IMAGES_GENERATED:"SessionPlanner_Images_Generated",SESSION_PLANNER_SESSION_CREATED:"SessionPlanner_Session_Created",SESSION_PLANNER_SESSION_PDF_CREATED:"SessionPlanner_Session_PDF_Created",GAFFER_SESSION_GENERATED:"Gaffer_Session_Generated",GAFFER_SESSION_ACCEPTED:"Gaffer_Session_Accepted",PAYWALL_HIT:"Paywall_Hit",PRICING_PAGE_VIEWED:"Pricing_Page_Viewed",CHECKOUT_STARTED:"Checkout_Started",UPGRADE_MODAL_VIEWED:"Upgrade_Modal_Viewed",CANCELLATION_FLOW_STARTED:"Cancellation_Flow_Started",TRIAL_CTA_CLICKED:"Trial_CTA_Clicked",TRAILER_WATCHED:"Trailer_Watched"};function l4(t){return t.user.userDetail??{}}function yu(){return Oe(l4)}function u4(){const t=Co(),e=yu();b.useEffect(()=>{var s,i,o,a,l;if(!(e!=null&&e.id))return;const n=((i=(s=e.email)==null?void 0:s.split("@")[1])==null?void 0:i.toLowerCase())||null,r={userId:e.id,fullName:`${e.username} ${e.lastname}`,firstName:e.username,lastName:e.lastname,isActive:e.isActive,isAdmin:e.isAdmin,roles:((a=(o=e.userRolesPermissions)==null?void 0:o.roles)==null?void 0:a.map(u=>u.name))||[],emailDomain:n};t.identify(e.id,r),t.capture(go.GENERAL_USER_LANDED,r),(l=window.fbq)==null||l.call(window,"trackCustom",go.GENERAL_USER_LANDED,r)},[e==null?void 0:e.id,t])}const nx=()=>async t=>{try{await t({type:"RESET_APPLICATION"})}catch{}},FW=t=>async e=>await e({type:"SET_DATA_VIEW",payload:t}),$W=t=>async e=>await e({type:"SET_LAST_VIEWED_VIDEO",payload:t}),jW=t=>async e=>await e({type:"CATEGORY_SUB_MENU_LOADING",payload:t}),UW=t=>async e=>await e({type:"SET_MOBILE_NAVIGATION_COLLAPSE",payload:t}),BW=t=>async e=>await e({type:"SET_NAVIGATION_SUB_MENU",payload:t}),HW=t=>async e=>await e({type:"SET_OPEN_DUGOUT_ADD_PRACTICE_MODAL",payload:t}),VW=t=>async e=>await e({type:"SET_OPEN_ENGINE_ROOM_HOME_QUICK_DRAWER",payload:t}),zW=t=>async e=>await e({type:"SET_OPEN_ENGINE_ROOM_HOME_QUICK_DRAWER_COLLECTION",payload:t}),qW=t=>async e=>await e({type:"SET_SESSION_AUTO_FILTERS",payload:t}),WW=t=>async e=>await e({type:"SET_DUGOUT_SESSION_CURRENT_TAB",payload:t}),Kn=t=>async e=>{try{const n=await e({type:"SET_USER_INFO",payload:t});return await localStorage.setItem("user",t.id),n}catch{}},GW=t=>async e=>{try{const n=await e({type:"UPDATE_USER_INFO",payload:t});return await localStorage.setItem("user",n),n}catch{}},Mr=t=>async e=>{try{return await e({type:"SET_CLUB_INFO",payload:t})}catch{}},Yn=t=>async e=>{try{return await e({type:"SET_USER_PERMISSION",payload:t})}catch{}},KW=t=>async e=>{try{return await e({type:"SET_TIER_USER_LIMIT",payload:t})}catch{}},YW=t=>async e=>{try{return await e({type:"SET_USER_IN_PROGRESS_TRANSACTION",payload:t})}catch{}};class c4 extends Error{}c4.prototype.name="InvalidTokenError";const Ov=3,d4=t=>{const e=Number(t);return Number.isFinite(e)?Math.min(10,Math.max(0,e)):0},f4=t=>Array.from({length:Ov},(n,r)=>d4(t==null?void 0:t[r])).reduce((n,r)=>n+r,0)/Ov,rx=t=>Number(f4(t).toFixed(2)).toString(),JW=t=>`${rx(t)} / 10`,tp="tt-impersonation";function XW(t){try{localStorage.setItem(tp,JSON.stringify({userId:(t==null?void 0:t.id)??null,
55name:(t==null?void 0:t.username)||(t==null?void 0:t.name)||(t==null?void 0:t.email)||"this user",since:Date.now()}))}catch{}}function kv(){try{const t=localStorage.getItem(tp);return t?JSON.parse(t):null}catch{return null}}function sx(){try{localStorage.removeItem(tp)}catch{}}Js.extend(cT);const ZW=t=>{let e=t==null?void 0:t.parentElement;for(;e;){const n=window.getComputedStyle(e);if(/(auto|scroll)/.test(n.overflowY)&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.scrollingElement||document.documentElement},QW=(t,e=k1.MonthDayYear)=>Js(t?new Date(t):new Date).format(e),eG=t=>{const e=Js.utc(t);return new Date(e.year(),e.month(),e.date(),0,0,0,0)},tG=t=>{const e=Js.utc(t);return new Date(e.year(),e.month(),e.date(),23,59,59,999)},nG=t=>{const e=[t==null?void 0:t.session_organization_score,t==null?void 0:t.player_engagement_score,t==null?void 0:t.coach_behaviors_score];return e.every(n=>n==null)?null:rx(e)},rG=t=>{let e;switch(t){case 1:e="Starter";break;case 2:e="Pro";break;case 3:e="Growth";break;case 4:e="Bundle";break;default:e="Unknown Plan";break}return e},sG=t=>Js(t).format("h:mm A"),iG=t=>new Date(t).getTime(),oG=(t,e)=>Object.keys(t).some(n=>e[n]),aG=t=>!t||t.length===0?-1:t.every(r=>r.score>=8)?1:t.every(r=>r.score<6)?0:2,lG=(t="start")=>t==="start"?`© ${new Date().getFullYear()} Toughtight Coaching`:`© Toughtight Coaching ${new Date().getFullYear()}`,uG=(t,e,n,r)=>{const s=e-n;return s>0?t.win[r]:s<0?t.loss[r]:t.yellow[r]},cG=t=>t==null?void 0:t.map(e=>e.id),dG=(t,e)=>{switch(e){case 1:return t.available;case 2:return t.unavailable;case 3:return t.testing;case 4:return t.other;default:return t.disabled}},fG=(t,e)=>{switch(e){case"complete":return t.complete;default:return t.incomplete}},hG=(t,e)=>{switch(e){case 1:return t.available;case 2:return t.unavailable;default:return t.unavailable}},pG=(t,e)=>{switch(e){case 10:return t.outstanding;case 9:return t.excellent;case 8:return t.veryGood;case 7:return t.good;case 6:return t.fair;case 5:return t.notGreat;case 4:return t.poor;default:return t.poor}},gG=(t,e)=>{switch(e){case 1:return t.yellow;case 2:return t.red;default:return t.gray}},mG=t=>t?t>7?xu.green:t>5?xu.yellow:xu.red:"",_G=(t,e)=>{switch(e){case 1:return t.available;case 2:return t.testing;case 3:return t.unavailable;default:return t.available}},vG=t=>{switch(t){case 1:return"Available";case 2:return"Unavailable (Injured)";case 3:return"Undecided (Testing)";case 4:return"Unavailable (Other)";default:return"N/A"}},h4=(t,e)=>{const n=t.find(r=>r.id===e);return n?n.position_name:"Not Selected"},p4={GK:"Goalkeeper",RB:"Right Back",LB:"Left Back",CB:"Centre Back",RCB:"Right Centre Back",LCB:"Left Centre Back",SW:"Sweeper",RWB:"Right Wing Back",LWB:"Left Wing Back",CDM:"Central Defensive Midfielder",CM:"Central Midfielder",RCM:"Right Central Midfielder",LCM:"Left Central Midfielder",RM:"Right Midfielder",LM:"Left Midfielder",RAM:"Right Attacking Midfielder",LAM:"Left Attacking Midfielder",CAM:"Central Attacking Midfielder",RW:"Right Winger",LW:"Left Winger",ST:"Striker"},yG=t=>!t||t==="Not Selected"||t==="N/A"?null:p4[t]||t,bG=t=>{const e=R1.find(n=>+n.id===t);return e?e.name:"No Type"},SG=t=>{const e=+t;return e>=1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:e>=1024?`${(e/1024).toFixed(2)} KB`:`${e} Bytes`},EG=(t,e,n)=>t.filter(r=>{var s;return r.toLowerCase()!==((s=h4(n,e))==null?void 0:s.toLowerCase())}),wG=t=>{const e=t.split("@")[0];return e.charAt(0).toUpperCase()+e.slice(1)},xG=(t,e)=>K3(e,n=>{const r=vp.indexOf(n[t]);return r!==-1?r:vp.length}),TG=t=>{if(t===1)return 1;if(t>1&&t<6)return 5;if(t>5&&t<11)return 10;if(t>10&&t<21)return 20;if(t>20&&t<51)return 50;if(t>50&&t<101)return 100;if(t>100&&t<201)return 200;if(t>200)return 201},IG=t=>Math.round(t),OG=t=>{switch(t){case 0:return"";case"succeeded":case 1:return"Completed";case 2:return"Pending";case"failed":case"cancelled":case 3:return"Failed";default:return"Pending"}},kG=(t,e=!1)=>{for(const n in gp)if(gp[n].find(s=>s.id===t)){if(e)switch(n){case"goalkeepers":return"GK";case"defenders":return"DEF";case"midfielders":return"MF";default:return"ATT"}return n}return""},CG=t=>{if(typeof t=="object"){let e=!1;for(const n of t)if(e=_p.includes(n),e)return e;return e}else return _p.includes(t)},RG=t=>{if(t==null)return"";const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n.toString().padStart(2,"0")}`},AG=t=>t==null?"0":t>=1e6?(t/1e6).toFixed(1).replace(/\.0$/,"")+"M":t>=1e3?(t/1e3).toFixed(1).replace(/\.0$/,"")+"K":t.toString(),PG=async(t,e)=>{const r=await(await fetch(t)).blob(),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(s.href)},DG=async(t,e,n)=>{const{default:r}=await j(async()=>{const{default:l}=await import("./jszip.min-Be-umpX2.js").then(u=>u.j);return{default:l}},__vite__mapDeps([0,1])),s=new r,i=t.map(async(l,u)=>{const d=await(await fetch(`${e}/${l}`)).arrayBuffer(),f=`image${u+1}.png`;s.file(f,d)});await Promise.all(i);const o=await s.generateAsync({type:"blob"}),a=document.createElement("a");a.href=URL.createObjectURL(o),a.download=`${n}
55.zip`,a.click()};let Dn=!1;const qs=async(t,e=!0)=>{var i;Dn=!0;const n=new bE;let r=!1;const s=async()=>{try{return await jy.signOut(),!0}catch(o){return console.error("Better Auth sign out error:",o),!1}};if(r=await s(),r||(r=await s()),!r)try{const o=["__Secure-better-auth.session_token","better-auth.session_token","__Secure-better-auth.state","better-auth.state"];for(const a of o)document.cookie=`${a}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;`,document.cookie=`${a}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; secure;`}catch{}n.remove("accessToken",$y),typeof sessionStorage<"u"&&sessionStorage.removeItem(Qt),sx();try{(i=ut==null?void 0:ut.reset)==null||i.call(ut)}catch{}return t(nx()),setTimeout(()=>{Dn=!1},500),r},NG=t=>{const e=Js();switch(t){case"thisWeek":const n=e.startOf("week").toISOString(),r=e.endOf("week").toISOString();return[n,r];case"lastWeek":const s=e.subtract(1,"week").startOf("week").toISOString(),i=e.subtract(1,"week").endOf("week").toISOString();return[s,i];case"last7Days":const o=e.subtract(7,"days").toISOString(),a=e.toISOString();return[o,a];case"currentMonth":const l=e.startOf("month").toISOString(),u=e.endOf("month").toISOString();return[l,u];case"nextMonth":const c=e.add(1,"month").startOf("month").toISOString(),d=e.add(1,"month").endOf("month").toISOString();return[c,d];default:return[]}},LG=(t,e)=>{const n={duplicate:"add",removePlayer:"delete",inviteParent:"manage",addPractice:"manage",addPeriod:"manage",playerReport:"manage",quickSelection:"manage",quickSubstitution:"manage",saveNewMatchTemplate:"manage",loadMatchTemplate:"manage",clearFixture:"manage",addToTeamSession:"manage",share:"add",exportPdf:"manage",matchReport:"manage",matchPlanner:"manage",addNewTeamSession:"add",addNewClubSession:"add",copyToClubSessions:"manage"},r=(e==null?void 0:e.isReadOnlySeason)||!1;return t.filter(i=>{const o=qh(i.name);if(o==="view"||o==="saveForLater")return!0;const a=n[o];return a?!r&&(e==null?void 0:e[a])===Gt.YES:!r&&(e==null?void 0:e[o])===Gt.YES})},MG=(t,e,n,r=[])=>{if(n.isSuperAdmin||n.isAdmin)return!0;const s=r.some(i=>+i===n.id);switch(t[e]){case Gt.YES:return!0;case Gt.LIMITED:return s;default:return!1}},FG=(t,e,n,r)=>{if(n.isSuperAdmin||n.isAdmin)return t;const s=r.some(o=>o.id===n.id);return t.filter(o=>{const a=qh(o.name);if(a==="move")return e.manage===Gt.YES;switch(e[a]){case Gt.YES:return!0;case Gt.LIMITED:return s;default:return!1}})},$G=(t,e,n)=>an(e)?t:t.filter(r=>{const s=qh(r.name);return s==="saveForLater"||s==="mediaSharing"&&(e==null?void 0:e[s])===Gt.YES||n&&["manage","delete","download","duplicate"].includes(s)?!0:e[s]===Gt.LIMITED?n:e[s]===Gt.YES}),g4=(t={},e)=>{const n=D1.find(r=>e.includes(r));return t.dashboard.view===Gt.YES&&n?!0:!(t.dashboard.view===Gt.NO&&n)},m4=(t={},e)=>{switch(P1.find(r=>e.includes(r))||"other"){case"dugout":const{dugout:r}=t;if(r){const c=t.permissions.dugout;return g4(c,e)}return!1;case"engine-room":const{engine_room:s}=t;return s;case"session-planner":const{session_planner:i}=t;return!!i;case"replay":const{replay:o}=t;return o||t.engine_room;case"users":const{manage_users:a}=t;return a;case"account":const{club_settings:l}=t;return l;case"billing":case"upgrade-subscription":case"playmaker-upgrade":const{billing:u}=t;return u;default:return!0}},jG=(t,e)=>{if(t&&e.length)switch(!0){case t<9:return e.find(({formation_name:n})=>n==="1121").id;case t<11:return e.find(({formation_name:n})=>n==="1231").id;case t<13:return e.find(({formation_name:n})=>n==="1431").id;default:return e.find(({formation_name:n})=>n==="433").id}return""},UG=(t,e)=>{if(t&&e.length){const n={periods:2,sessionFocus:t<12?1:2};switch(!0){case t<9:return{format:e.find(({formate_type:r})=>r==="5 v 5").id,matchDuration:Xr.find(r=>r.id===40).id,...n};case t<11:return{format:e.find(({formate_type:r})=>r==="7 v 7").id,matchDuration:Xr.find(r=>r.id===50).id,...n};case t<13:return{format:e.find(({formate_type:r})=>r==="9 v 9").id,matchDuration:Xr.find(r=>r.id===60).id,...n};case t<15:return{format:e.find(({formate_type:r})=>r==="11 v 11").id,matchDuration:Xr.find(r=>r.id===70).id,...n};case t<17:return{format:e.find(({formate_type:r})=>r==="11 v 11").id,matchDuration:Xr.find(r=>r.id===80).id,...n};default:return{format:e.find(({formate_type:r})=>r==="11 v 11").id,matchDuration:Xr.find(r=>r.id===90).id,...n}}}return{}},BG=(t="")=>(t==null?void 0:t.trim().replace(/\s+/g," ")).split(" ",2).map(r=>{var s;return(s=r[0])==null?void 0:s.toUpperCase()}).join(""),Cv=[{color:"#5B9BD5",backgroundColor:"#BBDEFB"},{color:"#4DB6AC",backgroundColor:"#B2DFDB"},{color:"#66BB6A",backgroundColor:"#C8E6C9"},{color:"#E57399",backgroundColor:"#F8BBD0"},{color:"#AB7DC0",backgroundColor:"#E1BEE7"},{color:"#FFAB6B",backgroundColor:"#FFE0B2"}
55,{color:"#7986CB",backgroundColor:"#C5CAE9"},{color:"#A1887F",backgroundColor:"#D7CCC8"},{color:"#4DD0E1",backgroundColor:"#B2EBF2"},{color:"#EF8A8A",backgroundColor:"#FFCDD2"},{color:"#64B5F6",backgroundColor:"#B3E5FC"},{color:"#9CCC65",backgroundColor:"#DCEDC8"}],HG=(t="")=>{if(!t)return{color:"#FFFFFF",backgroundColor:"#9E9E9E"};const e=t.split("").reduce((n,r)=>n+r.charCodeAt(0),0);return Cv[e%Cv.length]},_4=(t,e,n)=>{t/=255,e/=255,n/=255;const r=Math.max(t,e,n),s=Math.min(t,e,n);let i,o,a=(r+s)/2;if(r===s)i=o=0;else{const l=r-s;switch(o=a>.5?l/(2-r-s):l/(r+s),r){case t:i=((e-n)/l+(e<n?6:0))/6;break;case e:i=((n-t)/l+2)/6;break;case n:i=((t-e)/l+4)/6;break}}return[i,o,a]},Rv=(t,e,n)=>{let r,s,i;if(e===0)r=s=i=n;else{const o=(u,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?u+(c-u)*6*d:d<.5?c:d<.6666666666666666?u+(c-u)*(.6666666666666666-d)*6:u),a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=o(l,a,t+1/3),s=o(l,a,t),i=o(l,a,t-1/3)}return[Math.round(r*255),Math.round(s*255),Math.round(i*255)]},VG=(t,e="")=>{if(!t)return null;const n=t.replace("#",""),r=parseInt(n.substring(0,2),16),s=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16),[o,a]=_4(r,s,i),l=e?(e.split("").reduce((E,T)=>E+T.charCodeAt(0),0)%20-10)/360:0,u=(o+l+1)%1,c=Math.max(a,.35),[d,f,p]=Rv(u,c,.88),h=Math.max(a,.4),[g,_,m]=Rv(u,h,.45),y=E=>Math.max(0,Math.min(255,E)).toString(16).padStart(2,"0");return{backgroundColor:`#${y(d)}${y(f)}${y(p)}`,color:`#${y(g)}${y(_)}${y(m)}`}},v4=t=>V3(t).trim().replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/-+/g,"-"),zG=t=>{for(const e in mp)if(mp[e].label===t)return e==="star"?"topPlayer":e==="clean"?"cleanSheets":e==="appearances"?"totalFixtures":e;return null},y4=t=>{const e=n=>{const r=n.match(/\d+/g);return r?r.map(Number).reduce((s,i)=>s+i,0):0};return t.sort((n,r)=>{const s=e(n.name),i=e(r.name);return i!==s?i-s:n.name.localeCompare(r.name)})},b4=t=>{const e=r=>r.replace(/\D/g,"").split("").reduce((s,i)=>s+parseInt(i,10),0),n=r=>{const s=r.match(/\d/);return s?parseInt(s[0],10):0};return t.sort((r,s)=>{const i=e(r.name),o=e(s.name);if(o!==i)return o-i;const a=n(r.name),l=n(s.name);return l!==a?l-a:r.name.localeCompare(s.name)})},S4=t=>{const e=n=>{const r=n.match(/(\d+)\/(\d+)/);if(r){const s=parseInt(r[1],10),i=parseInt(r[2],10);return s/i}return Number.MAX_VALUE};return t.sort((n,r)=>{const s=e(n.name),i=e(r.name);return s-i})},E4=t=>{const e=n=>{const r=n.match(/^Under (\d+)$/);if(r)return parseInt(r[1],10)-1;const s=n.match(/^(\d+)-(\d+)$/);if(s)return parseInt(s[1],10);const i=n.match(/^(\d+)\+$/);return i?parseInt(i[1],10):1/0};return t.sort((n,r)=>{const s=e(n.name),i=e(r.name);return s-i})},w4=t=>{const e=n=>{const r=n.match(/^(\d+)-(\d+)$/);return r?parseInt(r[1],10):Number.MAX_VALU};return t.sort((n,r)=>{const s=e(n.name),i=e(r.name);return s-i})},qG=(t,e)=>{switch(e){case"Format":return y4(t);case"Formation":return b4(t);case"Pitch Area Needed":return S4(t);case"Age Group":return E4(t);case"Number of Players":return w4(t);default:return t.sort((n,r)=>n.name.localeCompare(r.name))}},x4=(t,e)=>e?t.reduce((n,r)=>{const s=r.name.toLowerCase().includes(e.toLowerCase()),i=r.items&&r.items.length>0?x4(r.items,e):[];return(s||i.length>0)&&n.push({...r,items:i}),n},[]):t,WG=(t,e)=>{if(t==null||e==null||t<1||t>e)return{standingPercentage:0,bucket:"Unknown",bracket:"Unknown"};const n=((1-(t-1)/e)*100).toFixed(2),r=n>=50?"Top":"Lower";let s=Math.ceil(100-n);return s===0?s=1:r==="Lower"&&s>50&&(s=100-s),{standingPercentage:n,bucket:s,bracket:r}},GG=(t,e,n)=>{var u;const r=new Map,s=new Set(["yellowCards","redCards","sessionsMissedByInjury","sessionsAttendedLate"]),i=t==null?void 0:t.filter(({playerStats:c})=>n==null?void 0:n.some(d=>c==null?void 0:c[d])),o=(()=>{const c=t==null?void 0:t.find(d=>d.playerId===e);return c!=null&&c.playerStats?n.filter(d=>c.playerStats.hasOwnProperty(d)).length:0})();i==null||i.forEach(({playerId:c,playerStats:d})=>{const f=r.get(c)||{};n.forEach(p=>{const h=(d==null?void 0:d[p])||{};Object.entries(h).forEach(([g,_])=>{var m;g==="mostPlayedPositions"?(f[g]=f[g]||[],_==null||_.forEach(y=>{const E=f[g].find(T=>T.position_id===y.position_id);E?E.positionCount+=y.positionCount:f[g].push({...y})})):g==="biggestLoss"||g==="biggestWin"?f[g]=!f[g]||_.difference>(((m=f[g])==null?void 0:m.difference)||0)?{..._}:f[g]:f[g]=(f[g]||0)+(_||0)})}),r.set(c,f)});const a=r.get(e);(u=a==null?void 0:a.mostPlayedPositions)!=null&&u.length&&(a.mostPlayedPositions.sort((c,d)=>d.positionCount-c.positionCount),a.mostPlayedPositions=[a.mostPlayedPositions[0]]);const l={};return r.forEach((c,d)=>
55{Object.entries(c).forEach(([f,p])=>{if(Array.isArray(p)||typeof p=="object"){d===e&&(l[f]=p);return}const h=s.has(f)?1:-1,g=[...r.entries()].sort(([,_],[,m])=>h*(((_==null?void 0:_[f])||0)-((m==null?void 0:m[f])||0))).map(([_])=>Number(_));d===e&&(l[f]={value:f==="rating"||f==="sessionsAttendancePercentage"||f==="averageRating"?p/(o||1):p,rank:{value:g.indexOf(e)+1,total:g.length}})})}),l},KG=(t,e)=>{switch(e){case 1:return t.performance.excellent;case 0:return t.performance.notGreat;case-1:return t.card.darkGray;default:return t.performance.good}},YG=(t,e)=>{switch(e){case 1:return t.performance.excellent;case 2:return t.performance.good;case 3:return t.performance.notGreat;default:return""}},JG=(t,e)=>{switch(e){case"met":return t.performance.excellent;case"inProgress":return t.performance.good;case"notMet":return t.performance.notGreat;default:return""}},Hl=t=>{const e=new Date(t);return e.setDate(e.getDate()+1),e.toISOString().replace(/-|:|\.\d+/g,"")},XG=t=>{const e=Hl(t.startTime),n=Hl(t.endTime);return`https://www.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(t.title)}&dates=${e}/${n}&details=${encodeURIComponent(t.description)}&location=${encodeURIComponent(t.location)}&sprop=&sprop=name:`},ZG=t=>{const e=Hl(t.startTime),n=Hl(t.endTime),r=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",`DTSTAMP:${new Date().toISOString().replace(/-|:|\.\d+/g,"")}`,`UID:${Date.now()}@yourapp`,`DTSTART:${e}`,`DTEND:${n}`,`SUMMARY:${t.title}`,`DESCRIPTION:${t.description}`,`LOCATION:${t.location}`,"END:VEVENT","END:VCALENDAR"].join(` 56`),s=new Blob([r],{type:"text/calendar;charset=utf-8"}),i=URL.createObjectURL(s),o=document.createElement("a");o.href=i,o.setAttribute("download","event.ics"),document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(i)},Av=(t="",e,n,r)=>`v=${encodeURIComponent(v4(t))}&id=${e}-${n}-${r==="collection"?"c":"v"}`,QG=t=>{if(!t)return{id:null,collectionId:null,contentType:"video"};const[e,n,r]=t.split("-");return{id:parseInt(e,10),collectionId:parseInt(n,10),contentType:r==="c"?"collection":"video"}},e7=(t,e,n)=>`p${t}u${e}d${n==="yearly"?2:1}`,T4=t=>{if(!t)return null;const e=t.match(/p(\d+)/),n=t.match(/u(\d+)/),r=t.match(/d(\d+)/);return{planId:e?Number(e[1]):null,userCount:n?Number(n[1]):null,duration:r?Number(r[1])===1?"monthly":"yearly":null}},t7=t=>t*.75,n7=(t,e=72,n=!1)=>new Promise(r=>{if(!t)return r(null);const s=new window.Image;s.crossOrigin="anonymous",s.onload=()=>{const i=document.createElement("canvas"),o=Math.min(e/s.width,e/s.height,1);i.width=Math.round(s.width*o),i.height=Math.round(s.height*o);const a=i.getContext("2d");if(n){const l=Math.min(i.width,i.height)/2;a.beginPath(),a.arc(i.width/2,i.height/2,l,0,Math.PI*2),a.closePath(),a.clip()}a.drawImage(s,0,0,i.width,i.height),r(i.toDataURL("image/png"))},s.onerror=()=>r(null),s.src=t}),r7=t=>{const e=T4(t);if(!e)return!1;const{planId:n,userCount:r,duration:s}=e,i=s==="monthly"?1:2;return wu.VALID_PLAN_IDS.includes(n)&&wu.VALID_USER_COUNTS.includes(r)&&wu.VALID_DURATIONS.includes(i)},s7=t=>t.includes("replay")?!1:t.includes("engine-room")||t.includes("collection")||t.includes("playlist")||t.includes("categories"),i7=t=>{switch(t){case"Sessions":return"Team Sessions";default:return t}},o7=t=>{try{const e=A1,n=(s,i)=>{for(const o in i)if(Array.isArray(i[o])){if(!s[o]||!i[o].every(a=>s[o][a]!==void 0))return!1}else if(!s[o]||!n(s[o],i[o]))return!1;return!0};return n(t.permissions,e.nested)?e.global.every(i=>i in t):!1}catch(e){return console.error("Incomplete user permissions",e),!0}},a7=(t,e)=>t&&e?C1?t||"":e||"":e||t||"",l7=t=>{if(!t||typeof t!="object")return 0;const e=Object.values(t).flatMap(n=>Object.values(n).flatMap(r=>r));return e.sort((n,r)=>n-r),e.reduce((n,r,s)=>n+r*(s+1),0)},u7=t=>Object.values(t).every(e=>e==null||Array.isArray(e)&&e.length===0),c7=t=>{window!=null&&window.dataLayer||(window.dataLayer=[]),window.dataLayer.push({ecommerce:null}),window.dataLayer.push(t)},d7=(t,e)=>{if(!Vt(e))return"Not Selected";const n=t.filter(r=>e.includes(r.position_id)).map(r=>r.position_name);return n.length?n.join(", "):"-"},f7=t=>{t=t.replace("#","");const e=parseInt(t.substr(0,2),16),n=parseInt(t.substr(2,2),16),r=parseInt(t.substr(4,2),16);return(e*299+n*587+r*114)/1e3<128},h7=t=>t?t.replace(/[\r\n]+/g," "):"",I4=t=>String(t||"").replace(/[\\/:*?"<>|]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""),p7=({teamName:t,opposition:e,fixtureDateTime:n,reportLabel:r="Match-Report"}={})=>{const s=String(t||"").trim(),i=String(e||"").trim(),o=String(r||"Match-Report").trim()||"Match-Report",a=n!=null?new Date(n):null,l=a&&!Number.isNaN(a.getTime())?a:new Date,u=`${l.getFullYear()}
56-${String(l.getMonth()+1).padStart(2,"0")}-${String(l.getDate()).padStart(2,"0")}`,c=s&&i?`${s}-vs-${i}`:s||i,d=c?`${c}-${u}-${o}`:`${u}-${o}`;return`${I4(d)||"Match-Report"}.pdf`},g7=(t,e=320)=>{if(!t)return[];const n=String(t).split(/\n\s*\n+/).map(s=>s.replace(/\s+/g," ").trim()).filter(Boolean),r=[];return n.forEach(s=>{const i=s.match(/[^.!?]+[.!?]+(?:["')\]]+)?|[^.!?]+$/g)||[s];let o="";i.forEach(a=>{const l=a.trim();l&&(o=o?`${o} ${l}`:l,o.length>=e&&(r.push(o),o=""))}),o&&r.push(o)}),r.length?r:[String(t).replace(/\s+/g," ").trim()]},m7=(t,e,n)=>{const r=Array.isArray(t)?t:[t],s=[Eu.WEEK_PLANS_46,Eu.SEASON_PLANS];return r.some(i=>s.includes(i))?e==="collection"&&n==="yes":r.some(i=>i===Eu.FULL_SESSIONS)||e==="video"},_7=(t,e)=>{const n=[];let r=null,s=null,i=0;for(const o of t)if(o.type==="divider"&&/week/i.test(o.divider))r!==null&&r.length>0&&(n.push({divider:s,practices:r}),i=0),r=[],s=o.divider;else if(o.type==="video"&&r!==null){const{video:a,collection_id:l}=o;if(a!=null&&a.title&&a.title.toLowerCase().includes("trailer"))continue;r.push({...a,source:"ENGINE_ROOM",collectionId:l,videoAdded:i<e}),i++}return r!==null&&r.length>0&&n.push({divider:s,practices:r}),n},bu=t=>{var e;return an(t)?!0:new Date((e=t==null?void 0:t.session)==null?void 0:e.expiresAt)<new Date},O4=(t,e=null)=>{if(!t||typeof t!="string")return null;const n=/U(\d+)/i,r=t.match(n);if(r){const d=parseInt(r[1],10)+1;return t.replace(n,`U${d}`)}const s=/(\d+)s\b/i,i=t.match(s);if(i){const d=parseInt(i[1],10)+1;return t.replace(s,`${d}s`)}const o=/Under\s+(\d+)/i,a=t.match(o);if(a){const d=parseInt(a[1],10)+1;return t.replace(o,`Under ${d}`)}const l=/(^|\s)(\d{1,2})(\s|$)/,u=t.match(l);if(u){const c=parseInt(u[2],10);if(c>=5&&c<=30){const d=c+1;return t.replace(l,`$1${d}$3`)}}return null},v7=t=>!t||!Array.isArray(t)?[]:t.map(e=>{const n=O4(e.name,e.age_group);return n?{team_id:e.id,currentName:e.name,suggestedName:n}:null}).filter(e=>e!==null);function k4(){const t=Po(),{data:e,isPending:n}=vo(),r=Oe(i=>{var o;return(o=i.user.userDetail)==null?void 0:o.id}),s=b.useRef(null);b.useLayoutEffect(()=>{var u,c;if(n||Dn||sessionStorage.getItem(Qt))return;const i=e==null?void 0:e.user;if(!(i!=null&&i.id)||bu(e))return;const o=!!((c=(u=i.userRolesPermissions)==null?void 0:u.roles)!=null&&c.length);if(!i.club_id||!o)return;const a=String(i.id);if(s.current===a)return;const l=r!=null?String(r):null;if(l===a){s.current=a,t(Kn(i)),i.UserActivePlan&&t(Yn(i.UserActivePlan)),i.clubDetails&&Object.keys(i.clubDetails).length>0&&t(Mr(i.clubDetails));return}if(s.current=a,l!==null)try{Ar("session-redux-identity-repaired",{level:"warning",tags:{event_type:"auth_state_mismatch",surface:"app-root"},extra:{reduxUserId:l,sessionUserId:a}})}catch{}t(nx()),t(Kn(i)),i.UserActivePlan&&t(Yn(i.UserActivePlan)),i.clubDetails&&Object.keys(i.clubDetails).length>0&&t(Mr(i.clubDetails))},[t,n,e,r])}function C4({isAuthenticated:t,hasActiveOrTrialingSubscription:e}){return t&&e}function R4({isPlaymaker:t,modules:e}){return t?"/session-planner/club-library":e.engine_room?"/dugout/dashboard":e.dugout?"/dugout/players":"/session-planner/club-library"}const A4=new Set(["active","trialing"]);function P4({sessionPlan:t,sessionPlanIsActive:e=!1,reduxPlan:n,isSameIdentity:r=!1}){const s=!!(e&&(t!=null&&t.planStatus)&&A4.has(t.planStatus.toLowerCase()));return{hasCompletedCheckout:!!(t!=null&&t.hasCompletedInitialCheckout||s||r&&(n!=null&&n.hasCompletedInitialCheckout)),hasActiveOrTrialingSubscription:s}}function np(){const{data:t,isPending:e}=vo(),n=Oe(u=>u.user.userDetail),r=Oe(u=>u.user.userPermission),s=t==null?void 0:t.user,i=!!(s!=null&&s.id)&&!bu(t),o=s==null?void 0:s.userRolesPermissions,a=!!o,l=b.useRef(null);return b.useEffect(()=>{if(e||!a||!(s!=null&&s.id)||sessionStorage.getItem(Qt))return;const u=String(s.id);if(l.current===u)return;l.current=u;const c=(n==null?void 0:n.id)!=null?String(n.id):null;if(!(c===null||c===u))try{Ar("session-redux-identity-mismatch",{level:"warning",tags:{event_type:"auth_state_mismatch",surface:"v2-public"},extra:{reduxUserId:c,sessionUserId:u}})}catch{}},[e,a,s,n]),b.useMemo(()=>{var I,x;const u=s==null?void 0:s.UserActivePlan,c=(s==null?void 0:s.id)!=null?String(s.id):null,d=(n==null?void 0:n.id)!=null?String(n.id):null,f=c!==null&&c===d,{hasCompletedCheckout:p,hasActiveOrTrialingSubscription:h}=P4({sessionPlan:a?u:null,sessionPlanIsActive:!!(s!=null&&s.isAdminPlanActive),isSameIdentity:f,reduxPlan:n==null?void 0:n.UserActivePlan}),g=(a?u==null?void 0:u.planId:r==null?void 0:r.planId)??null,_=a||!!(n!=null&&n.userRolesPermissions),m=a?o:n==null?void 0:n.userRolesPermissions,y=_?!!(m!=null&&m.billing)||!!(m!=null&&m.manage_users):!0,E=(I=u==null?void 0:u.Plan)==null?void 0:I.title,T=(E==="Playmaker"||E==="Playmaker Free")&&!!(s!=null&&s.isAdminPlanActive);return{isPending:e,isAuthenticated:i,userId:(s==null?void 0:s.id)!=null?Number(s.id):null,isEnriched:a,hasCompletedCheckout:p,hasActiveOrTrialingSubscription:h,planId:g,canManageBilling:y,needsProfileCompletion:a&&(!(s!=null&&s.club_id)||!(((x=o==null?void 0:o.roles)==null?void 0:x.length)??0)),isPlaymaker:T,modules:{dugout:!!(m!=null&&m.dugout),engine_room:!!(m!=null&&m.engine_room),session_planner:!!(m!=null&&m.session_planner)}}},[e,i,a,o,s,n,r])}const ix=b.createContext({activeSeason:null,currentSeason:null,allSeasons:[],setCurrentSeason:()=>{},refreshSeasons:()=>{},notifySessionsCopied:()=>{},sessionsCopiedTrigger:0,loading:!1,isArchived:!1,isAllSeasonSelected:!1,isUpcomingSeason:!1,isReadOnlyMode:!1,hasNoActiveSeason:!1}),D4=()=>{const t=b.useContext(ix);if(!t)throw new Error("useSeasonContext must be used within a SeasonProvider");return t},Pv=({children:t})=>{var C,S;const e=Oe(w=>w==null?void 0:w.club),n=e==null?void 0:e.id;Uy();const[r,s]=b.useState(null),[i,o]=b.useState([]),[a,l]=b.useState(0),{data:u,loading:c,refetch:d}=Kc(N1,{variables:{club_id:n},skip:!n,fetchPolicy:"cache-and-network",onError:w=>{console.error("[SeasonContext] GET_SEASONS error",w)}}),{data:f,loading:p,refetch:h}=Kc(L1,{variables:{club_id:n},skip:!n,fetchPolicy:"cache-and-network",onError:w=>{console.error("[SeasonContext] GET_CURRENT_SEASON error",w)}});b.useEffect(()=>{var w;if((w=u==null?void 0:u.getSeasons)!=null&&w.seasons){const A=u.getSeasons.seasons;let P=null,O=null;if(A.length>0){const V=A.map(q=>({start:new Date(q.start_date).getTime(),end:new Date(q.end_date).getTime()})),L=Math.min(...V.map(q=>q.start)),W=Math.max(...V.map(q=>q.end));P=new Date(L).toISOString(),O=new Date(W).toISOString()}const N=[{id:"all",name:"All Seasons",start_date:P,end_date:O,status:""},...A];o(N)}},[u]),b.useEffect(()=>{var A,P,O,N;if(!n||c||p)return;if(!((A=u==null?void 0:u.getSeasons)!=null&&A.seasons)||u.getSeasons.seasons.length===0){s(null);return}if(i.length===0)return;const w=localStorage.getItem(`currentSeasonId_${n}`);if(w){const V=w==="all"?"all":parseInt(w),L=i.find(W=>W.id===V);if(L&&L.status==="archived")localStorage.removeItem(`currentSeasonId_${n}`);else if(L){s(L);return}}if((P=f==null?void 0:f.getCurrentSeason)!=null&&P.success&&((N=(O=f==null?void 0:f.getCurrentSeason)==null?void 0:O.season)!=null&&N.id)){const V=i.find(L=>L.id===f.getCurrentSeason.season.id);if(V){s(V);return}}i.length>1&&s(i[1])},[n,i,f,c,p,u]);const g=b.useCallback(w=>{w&&n&&(s(w),localStorage.setItem(`currentSeasonId_${n}`,w.id.toString()))},[n]),_=b.useCallback(async()=>{await Promise.all([d(),h()])},[d,h]),m=b.useCallback(()=>
56{l(w=>w+1)},[]),y=(r==null?void 0:r.status)==="archived",E=(r==null?void 0:r.id)==="all",T=(r==null?void 0:r.status)==="upcoming",I=y||E||T,x=!c&&!p&&n&&(!((C=f==null?void 0:f.getCurrentSeason)!=null&&C.success)||!((S=f==null?void 0:f.getCurrentSeason)!=null&&S.season))&&i.length>0&&!i.some(w=>w.status==="active"&&w.id!=="all"),R=b.useMemo(()=>{var w;return{activeSeason:((w=f==null?void 0:f.getCurrentSeason)==null?void 0:w.season)||null,currentSeason:r,allSeasons:i,setCurrentSeason:g,refreshSeasons:_,notifySessionsCopied:m,sessionsCopiedTrigger:a,isAllSeasonSelected:E,isUpcomingSeason:T,isArchived:y,isReadOnlyMode:I,hasNoActiveSeason:x,loading:c||p}},[f,r,i,g,_,m,a,E,T,c,p,y,I,x]);return v.jsx(ix.Provider,{value:R,children:t})},N4=["/account","/profile","/billing","/upgrade-subscription","/users","/extend-season"],L4=({children:t})=>{const{hasNoActiveSeason:e,loading:n}=D4(),r=Mt(),s=Oe(a=>{var l;return(l=a.user)==null?void 0:l.userDetail}),i=s==null?void 0:s.isSuperAdmin;return n?v.jsx(v.Fragment,{children:t}):e?i?v.jsx(v.Fragment,{children:t}):N4.some(a=>r.pathname===a||r.pathname.startsWith(a))?v.jsx(v.Fragment,{children:t}):v.jsx(Le,{to:"/extend-season",replace:!0}):v.jsx(v.Fragment,{children:t})};function ox(t){return Oe(e=>{var n;return!!((n=e.club)!=null&&n[t])})}const ax=b.createContext({module:null,openUpgradeModal:()=>{},closeUpgradeModal:()=>{}}),y7=({children:t})=>{const[e,n]=b.useState(null),r=b.useCallback(o=>{o&&n(o)},[]),s=b.useCallback(()=>{n(null)},[]),i=b.useMemo(()=>({module:e,openUpgradeModal:r,closeUpgradeModal:s}),[e,r,s]);return v.jsx(ax.Provider,{value:i,children:t})},M4=()=>b.useContext(ax),_n={engineRoom:"engineRoom",replay:"replay",globalLibrary:"globalLibrary",dugoutHome:"dugoutHome",dugoutFixtures:"dugoutFixtures",dugoutClubDocuments:"dugoutClubDocuments",dugoutCalendar:"dugoutCalendar",dugoutTeams:"dugoutTeams",dugoutPlayers:"dugoutPlayers",dugoutSessions:"dugoutSessions",sessionPlannerBuildSession:"sessionPlannerBuildSession"},F4=[{module:_n.engineRoom,test:t=>/^\/engine-room(\/|$)/.test(t)||/^\/categories(\/|$)/.test(t)||/^\/collections(\/|$)/.test(t)||/^\/playlists(\/|$)/.test(t)},{module:_n.replay,test:t=>/^\/replay(\/|$)/.test(t)},{module:_n.globalLibrary,test:t=>/^\/global-library(\/|$)/.test(t)},{module:_n.dugoutHome,test:t=>t==="/dugout/dashboard"||t==="/dugout"},{module:_n.dugoutFixtures,test:t=>t==="/dugout/fixtures"||/^\/dugout\/fixture(\/|$)/.test(t)},{module:_n.dugoutClubDocuments,test:t=>t==="/dugout/club-documents"},{module:_n.dugoutCalendar,test:t=>t==="/dugout/calendar"},{module:_n.dugoutTeams,test:t=>/^\/dugout\/team(\/|$)/.test(t)},{module:_n.dugoutPlayers,test:t=>/^\/dugout\/player(\/|$)/.test(t)}],jo=t=>{if(!t)return null;const e=F4.find(({test:n})=>n(t));return e?e.module:null},ii=()=>{const t=Oe(n=>{var r,s;return(s=(r=n.user.userPermission)==null?void 0:r.Plan)==null?void 0:s.title}),e=Oe(n=>{var r;return(r=n.user.userDetail)==null?void 0:r.isAdminPlanActive});return(t==="Playmaker"||t==="Playmaker Free")&&e},b7=()=>{const t=Oe(n=>{var r,s;return(s=(r=n.user.userPermission)==null?void 0:r.Plan)==null?void 0:s.title}),e=Oe(n=>{var r;return(r=n.user.userDetail)==null?void 0:r.isAdminPlanActive});return t==="Playmaker Free"&&e},S7=()=>{const t=ii(),{module:e,openUpgradeModal:n,closeUpgradeModal:r}=M4(),s=b.useCallback(o=>t?jo(o):null,[t]),i=b.useCallback(o=>s(o)!==null,[s]);return b.useMemo(()=>({isPlaymaker:t,module:e,openUpgradeModal:n,closeUpgradeModal:r,getLockedModule:s,isPathLocked:i}),[t,e,n,r,s,i])},$4=t=>async e=>await e({type:"SET_REGISTER_DATA",payload:t}),E7=()=>async t=>await t({type:"RESET_REGISTER_DATA"});/** 57 * @license lucide-react v1.31.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const j4=[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]],U4=zt("calendar-days",j4);
61/** 62 * @license lucide-react v1.31.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const B4=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["path",{d:"M20 12v5",key:"12wsvk"}],["path",{d:"M20 21h.01",key:"1p6o6n"}],["path",{d:"M21.25 8.2A10 10 0 1 0 16 21.16",key:"17fp9f"}]],H4=zt("clock-alert",B4);/** 67 * @license lucide-react v1.31.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const V4=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],z4=zt("corner-down-left",V4);/** 72 * @license lucide-react v1.31.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const q4=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],W4=zt("eye",q4);/** 77 * @license lucide-react v1.31.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const G4=[["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"}]],K4=zt("layers",G4);/** 82 * @license lucide-react v1.31.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const Y4=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],J4=zt("search",Y4);/** 87 * @license lucide-react v1.31.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const X4=[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]],Z4=zt("swords",X4);/** 92 * @license lucide-react v1.31.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const Q4=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],eV=zt("user-cog",Q4);/** 97 * @license lucide-react v1.31.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const tV=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],nV=zt("user",tV);/** 102 * @license lucide-react v1.31.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const rV=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],sV=zt("users",rV);/** 107 * @license lucide-react v1.31.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const iV=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],oV=zt("video",iV);/** 112 * @license lucide-react v1.31.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const aV=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}
116],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],lV=zt("wifi-off",aV);/** 117 * @license lucide-react v1.31.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const uV=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],cV=zt("wifi",uV),dV=t=>b.createElement("svg",{width:180,height:38,viewBox:"0 0 1653.75 350.24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},b.createElement("g",null,b.createElement("path",{d:"M149.38,87.53c102.64,12.42,158.12,69.43,174.19,92.45,8.4-70.13-52.85-95.86-81.03-101.32-47.12-9.13-93.17,8.87-93.17,8.87Z",fill:"#3F4160"}),b.createElement("path",{d:"M188.25,113.04c31.23,6.16,48.63,16.99,60,24.52,6.16,14.38,20.27,62.05,10.14,103.42s-38.9,84.11-93.15,101.92c51.16-53.13,57.18-105.48,57.18-134.06s-8.16-70.65-34.16-95.8Z",fill:"#3F4160"}),b.createElement("path",{d:"M.84,200.43C-8.06,121.21,54.3,62.04,174.16,104.3,44.2,117.95,21.01,171.65.84,200.43Z",fill:"#3F4160"}),b.createElement("path",{d:"M65.46,157.3c12.96-16.2,49.15-29.28,56.93-29.28-24.57,32.35-41.14,101.04,25.21,192.37-117.72-54.08-83.66-151.07-82.14-163.08Z",fill:"#3F4160"}),b.createElement("circle",{cx:62.17,cy:320.39,r:29.86,fill:"#3F4160"}),b.createElement("circle",{cx:115.7,cy:47,r:31.09,fill:"#3F4160"}),b.createElement("circle",{cx:196.33,cy:31.09,r:31.09,fill:"#3F4160"})),b.createElement("g",null,b.createElement("path",{d:"M437.47,125.7h-36.75v-37.39h118.9v37.39h-36.55v161.5h-45.6V125.7Z",fill:"#3F4160"}),b.createElement("path",{d:"M653.14,186.49c0,72.89-19.89,104.45-69.32,104.45-46.09,0-66.54-32.1-66.54-105.45s22.74-100.83,68.41-100.83,67.45,32.64,67.45,101.83ZM565,185.51c0,49.09,4.43,69.52,20.11,69.52,16.55,0,20.3-19,20.3-69.52,0-47.21-3.94-64.74-20.3-64.74s-20.11,18.38-20.11,64.74Z",fill:"#3F4160"}),b.createElement("path",{d:"M708.9,88.32v139.26c0,12.95,2.71,27.56,18.86,27.56s18.46-12.59,18.46-27.37V88.32h45.91v137.97c0,40.5-19.83,64.66-65.37,64.66s-63.56-23.94-63.56-65.06V88.32h45.7Z",fill:"#3F4160"}),b.createElement("path",{d:"M932.44,224.87c-.57,20.58-7.94,66.07-63.33,66.07s-66.47-40.03-66.47-103.49c0-71.97,22.84-102.68,68.32-102.68,53.07,0,60.9,40.6,61.47,64.32h-45.53c-.38-11.12-.68-28.31-16.64-28.31s-19.71,18.17-19.71,66.84c0,42.73,2.4,67.72,19.14,67.72,15.58,0,16.55-18.52,17.12-30.46h45.62Z",fill:"#3F4160"}),b.createElement("path",{d:"M939.05,88.32h45.7v75.18h34.46v-75.18h45.91v198.89h-45.91v-85.27h-34.46v85.27h-45.7V88.32Z",fill:"#3F4160"}),b.createElement("path",{d:"M1108.65,125.7h-36.75v-37.39h118.9v37.39h-36.55v161.5h-45.6V125.7Z",fill:"#3F4160"}),b.createElement("path",{d:"M1243.62,88.32v198.89h-45.7V88.32h45.7Z",fill:"#3F4160"}),b.createElement("path",{d:"M1388.06,287.2h-33.59c-.78-5.25-1.47-10.2-1.66-15.7-8.6,15.47-23.43,19.44-39.05,19.44-39.68,0-57.86-29.76-57.86-101.92,0-78.8,27.19-104.26,70.59-104.26,56.2,0,60.69,44.43,61.18,59.94h-45.73c-.49-9.69-1.84-23.94-16.93-23.94-17.04,0-21.18,22.28-21.18,68.57s4.08,65.69,20.51,65.69c13.88,0,18.02-11.63,18.02-33.07v-12.73h-19.55v-35.88h65.27v113.85Z",fill:"#3F4160"}),b.createElement("path",{d:"M1402,88.32h45.7v75.18h34.46v-75.18h45.91v198.89h-45.91v-85.27h-34.46v85.27h-45.7V88.32Z",fill:"#3F4160"}),b.createElement("path",{d:"M1571.61,125.7h-36.75v-37.39h118.9v37.39h-36.55v161.5h-45.6V125.7Z",fill:"#3F4160"}))),fV='"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';function hV({reason:t}){const e=async()=>{await jy.signOut(),window.location.assign("/login")};return v.jsx("main",{style:{minHeight:"100dvh",display:"grid",placeItems:"center",background:"#06080c",color:"#f7f7fb",paddingInline:16,fontFamily:fV,boxSizing:"border-box"},children:v.jsxs("div",{style:{width:"min(100%, 560px)",borderRadius:12,border:"1px solid rgba(255,255,255,0.12)",background:"#11151d",color:"inherit",padding:"clamp(24px, 5vw, 40px)",textAlign:"center",boxSizing:"border-box"},children:[v.jsx(dV,{"aria-label":"Touchtight",width:180,height:"auto"}),v.jsx("div",{style:{margin:"24px auto",width:52,height:52,borderRadius:"50%",display:"grid",placeItems:"center",background:"rgba(245,158,11,0.14)",color:"#fbbf24",boxSizing:"border-box"},children:v.jsx(H4,{"aria-hidden":"true"})}),v.jsx("h1",{style:{margin:0,fontSize:"clamp(26px, 4vw, 32px)",fontWeight:750},children:"Account temporarily paused"}
121),v.jsx("p",{style:{margin:"16px 0 0",color:"rgba(247,247,251,0.76)",fontSize:16,lineHeight:1.6},children:t||"Payment is overdue. Please contact your account administrator."}),v.jsx("p",{style:{margin:"16px 0 0",color:"rgba(247,247,251,0.56)",fontSize:14,lineHeight:1.55},children:"Your club data is safe. Access can be restored immediately once payment has been confirmed."}),v.jsx("button",{type:"button",onClick:e,style:{marginTop:24,minWidth:64,padding:"5px 15px",borderRadius:4,border:"1px solid rgba(255,255,255,0.28)",background:"transparent",color:"#f7f7fb",fontFamily:"inherit",fontSize:"0.875rem",fontWeight:500,lineHeight:1.75,letterSpacing:"0.02857em",textTransform:"uppercase",cursor:"pointer",boxSizing:"border-box"},children:"Sign out"})]})})}const pV=()=>{const[t,e]=b.useState({msg:"",variant:"default",autoHideDuration:3e3}),{enqueueSnackbar:n,closeSnackbar:r}=f2(),s=b.useCallback(i=>v.jsx("button",{type:"button","aria-label":"Dismiss",onClick:()=>{r(i)},style:{padding:2,marginLeft:4,flexShrink:0,height:28,width:28,display:"inline-flex",alignItems:"center",justifyContent:"center",background:"transparent",border:0,borderRadius:"50%",color:"#fff",cursor:"pointer"},children:v.jsx(jf,{size:16,"aria-hidden":!0})}),[r]);return b.useEffect(()=>{let i=!0;return t!=null&&t.msg&&n(t.msg,{variant:t.variant,autoHideDuration:t.autoHideDuration,anchorOrigin:{horizontal:"right",vertical:"top"},action:s,onClose:()=>{i&&e({msg:"",variant:void 0})}}),()=>{i=!1}},[t,n,s]),[e]},Dv=b.lazy(()=>j(()=>import("./index-Cq3Thd2G.js"),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85])).then(t=>({default:t.Layout}))),gV=b.lazy(()=>j(()=>import("./ClubMessagesApp-0WSCd3TZ.js"),__vite__mapDeps([86,1,12,11,5,6,13,73,74,67,87,71,43,61,88,19,89]))),mV=b.lazy(()=>j(()=>import("./index-C4N0y56H.js"),__vite__mapDeps([90,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,107,108,109]))),_V=b.lazy(()=>j(()=>import("./index-DcaTyaMB.js"),__vite__mapDeps([110,1,4,5,6,111,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,112,107,113,114]))),vV=b.lazy(()=>j(()=>import("./UpgradeSubscription-D7OwODQr.js"),__vite__mapDeps([115,1,111,5,6,91,8,4,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,116,117,118]))),yV=b.lazy(()=>j(()=>import("./index-Dr_1fSfs.js"),__vite__mapDeps([119,1,4,5,6,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,120,121,29,122,40,123,124,125,126,127,27,128,42,129]))),bV=b.lazy(()=>j(()=>import("./index-DyhJ0sX7.js"),__vite__mapDeps([130,1,131,132,133,53,54,102,9,4,5,6,7,91,8,3,10,11,18,12,13,92,52,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,103,104,105,41,106,134,135,118,121,122]))),SV=b.lazy(()=>j(()=>import("./index-BieZYjyx.js"),__vite__mapDeps([136,1,4,5,6,19,3,29,124,137,125,138,91,8,9,7,10,11,18,12,13,92,52,53,54,55,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,127,139,140,121,141,142,143,144,145,146,122,147,148,149,150,151,152,153]))),EV=b.lazy(()=>j(()=>import("./index-BqWD01wt.js"),__vite__mapDeps([154,1,4,5,6,19,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,127,107,155,141,156,157,158,159,160,124,125,149,40,161,162,133,129,163,29,164,165,166,167,128,168,169,170,37,126,123,171,145,146,172,148,151,137,173]))),wV=b.lazy(()=>j(()=>import("./index-BKM4Qh-q.js"),__vite__mapDeps([174,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,175,139,132,133,121,141,144,145,146,122,131,29,176,124,137,125,30,27,177,178,179,109,180,161,181,182,183,184,31,185,186,129]))),xV=b.lazy(()=>j(()=>import("./index-B4TbUxhL.js"),__vite__mapDeps([187,1,4,5,6,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,175,107,155,141,156,157,158,159,160,124,125,161,185,177,178,179,109,27,182,140,183,188,129,29,146,145,127,189,190,139,142,118,170,163,191,186,128,37,126,123,135,173,167]))),TV=b.lazy(()=>j(()=>import("./index--h0_iZ8e.js"),__vite__mapDeps([192,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,121,107,193,194,30,29,39,127,139,140,141,142,143,144,145,146,122,147,195,196,197,46,47,48,83,61,198,66,64,199,200,201,70,69,202,203,204,205,206,35,207,208,124,137,125,209,210,211,212,163,181,213,214,215,173,216,151,152,153,186,217,218,219,220,178,171,172,133,17]))),IV=b.lazy(()=>j(()=>import("./index-D0Nw2OIB.js"),__vite__mapDeps([221,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,127,222,145,107,142,223,143,211,224,118,225,172,133,141,155,156,157,158,159,160,124,125,195,196,199,200,201,70,69,202,161,40,203,129,226,162,126,123,151,163,37,14,15,16,219,227,228,229,46,47,48,56,57,58,51,68,61,197,83,198,66,64,230,67,44,231,232,233,234,209,235,236,186,208,207,137,173,213]))),OV=b.lazy(()=>j(()=>import("./index-Br7it_tE.js"),__vite__mapDeps([237,1,4,5,6,3,21,22,23,24,25,29,238,124,137,125,91,8,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,96,97,98,99,100,101,102,103,104,105,41,106,127,140,121,141,14,15,16,143,144,145,146,27,239,240,241,242,178,109,142,37,118,243,151,188]))),lx=b.lazy(()=>j(()=>import("./TeamsV2-zCvZf9XT.js"),__vite__mapDeps([244,1,3,245,12,11,5,6,13,21,22,23,24,25,131,27,10,18,105,239,69,59,60,61,62,246,83,47,48,247,248,51,46,249,250,63,64,231,251,252,253,254,255,256,243,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,92,273,274,275,71,276,277,278,67,279,280,281,282,283,284,285,98,286,287,4,288,289,19]))),ux=b.lazy(()=>j(()=>import("./PlayersV2-ClPk3X0l.js"),__vite__mapDeps([290,1,131,27,3,10,11,18,12,5,6,13,161,59,60,61,62,176,245,285,98,286,283,284,246,83,47,48,247,248,51,46,249,250,63,64,231,251,252,253,254,255,291,274,261,262,292,293,294,295,275,71,276,277,278,67,296,280,279,281,282,297,298,272,92,263,264,265,266,267,271,258,69,273,299,257,259,260,185,300,186,96,287,4,288,289,301,302,19]))),cx=b.lazy(()=>j(()=>import("./FixturesV2-DK19qzdG.js"),__vite__mapDeps([303,1,147,10,11,18,12,5,6,13,246,83,47,48,61,247,248,51,46,249,245,250,63,64,231,251,255,138,274,261,262,295,294,304,59,60,62,276,277,278,67,279,3
12105,57,306,58,307,308,69,257,258,309,264,265,266,267,260,310,311,312,19,253,254,313,314,271,272,92,273,268,3,315,291,302,316,275,71,317,256,152,54,153,96,287,318]))),dx=b.lazy(()=>j(()=>import("./SessionsV2-BAGhqq8s.js"),__vite__mapDeps([319,1,193,12,11,5,6,13,320,18,321,287,67,19]))),fx=b.lazy(()=>j(()=>import("./DashboardV2-DEoBUZz9.js"),__vite__mapDeps([322,1,12,11,5,6,13,323,34,250,324,103,19,325,261,47,48,262,305,57,306,58,51,46,307,64,257,258,263,248,61,63,69,318,267,326,327,328,329,87,246,83,247,249,245,231,251,285,98,286,68,259,260,269,270,266,330,320,18,321,79,80,10,81,331,88,131,332,52,53,54,55,198,66,230,44,71,333,272,92,334,335,78,336,337,50,338]))),kV=b.lazy(()=>j(()=>import("./SessionDetailV2-Bizl1Plg.js"),__vite__mapDeps([339,1,340,229,341,12,11,5,6,13,342,98,343,91,8,4,3,9,7,10,18,92,52,53,54,55,19,93,94,95,25,96,97,23,24,99,100,101,22,102,103,104,105,41,106,247,248,47,48,61,51,301,49,344,62,66,68,46,345,346,304,347,64,63,245,348,274,261,262,349,266,350,67,278,351,352,263,59,60,201,70,153,213,353]))),CV=b.lazy(()=>j(()=>import("./TemplateStarterV2-Be9ExJJR.js"),__vite__mapDeps([354,1,19,343,12,11,5,6,13]))),RV=b.lazy(()=>j(()=>import("./SessionPlannerLibraryV2-DhSowAxq.js"),__vite__mapDeps([355,1,343,348,345,346,12,11,5,6,13,304,347,64,92,91,8,4,3,9,7,10,18,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,274,261,47,48,262,349,266,350,67,356,313,245,60,288,334,224,61,251,357,358,78,62,359,302,344,323,34,360,361,321,59,83,69,314,228,229,46,56,57,58,51,225,68,197,198,66,230,44,231,232,362,363,234,141,235,364,330]))),hx=b.lazy(()=>j(()=>import("./PlayerDetailV2-4FY68vrZ.js"),__vite__mapDeps([365,1,298,366,12,11,5,6,13,301,251,367,368,10,161,56,46,47,48,57,58,51,68,61,369,159,370,247,248,62,246,83,249,245,250,63,64,231,269,270,361,371,158,278,277,59,60,18,105,372,185,373,177,4,52,53,54,55,91,8,3,9,7,92,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,41,106,178,179,109,27,321,69,374,197,198,66,70,170,190,29,124,125,127,139,141,142,183,188,129,167,252,253,254,317,257,258,309,260,259,312,375,44,266,267,326,261,262,274,376,49,377,324,378,379,76,325,265,380,381,328,341,78,382,67,255,263,383,384,304,294,364,314,385,88,295,386]))),px=b.lazy(()=>j(()=>import("./SessionDetailV2-QzK3xzxt.js"),__vite__mapDeps([387,1,12,11,5,6,13,366,301,251,367,368,10,161,56,46,47,48,57,58,51,68,61,369,159,370,247,248,62,246,83,249,245,250,63,64,231,269,270,361,371,158,278,277,321,59,60,283,284,388,98,200,91,8,4,3,9,7,18,92,52,53,54,55,19,93,94,95,25,96,97,23,24,99,100,101,22,102,103,104,105,41,106,201,70,69,213,222,145,107,142,223,143,211,224,118,225,172,133,389,198,66,390,230,263,262,197,391,236,341,228,229,67,44,232,392,274,261,266,350,314,272,286,281,282,351,304,347,393,302,394,296,226,162,299,129,151,395,396,397,398,294,399,37,65,383,400,342,73,340,401,402,403,404,334,357,405,360,406,407,49,408,409,330,410,411,412,413,414,75,72]))),gx=b.lazy(()=>j(()=>import("./ClubDocumentsV2-cpw-uNdF.js"),__vite__mapDeps([415,1,0,18,12,11,5,6,13,246,83,47,48,61,247,248,51,46,249,245,250,63,64,231,251,259,261,262,263,3,67,295,198,66,105,10,397,98,398,294,399,304,361,274,59,60,62,283,284,313,27,4,310,416,360,19]))),mx=b.lazy(()=>j(()=>import("./TeamDetailV2-DZAlHvz9.js"),__vite__mapDeps([417,1,3,12,11,5,6,13,369,58,159,370,247,248,47,48,61,51,251,301,62,246,83,46,249,245,250,63,64,231,269,270,361,371,158,278,277,59,60,283,284,263,262,10,239,372,18,21,22,23,24,25,105,69,242,4,52,53,54,55,91,8,9,7,92,19,93,94,95,96,97,98,99,100,101,102,103,104,41,106,178,109,142,37,118,418,419,66,68,410,198,67,286,56,57,161,368,420,202,258,366,367,378,379,257,376,274,261,76,328,327,131,285,252,253,254,297,298,272,264,265,266,267,271,273,299,259,260,185,300,280,147,308,309,310,311,312,313,314,268,315,291,302,316,421,197,390,321,44,422,375,216,411,412,423,388,424,320,330,425,426,226,364,389,230,391,188,427,72]))),_x=b.lazy(()=>j(()=>import("./FixtureDetailV2-NusZHCNJ.js"),__vite__mapDeps([428,1,12,11,5,6,13,105,10,247,248,47,48,61,51,59,60,62,369,58,159,370,251,301,246,83,46,249,245,250,63,64,231,269,270,361,371,158,278,277,258,3,314,349,295,66,18,263,262,321,69,67,394,302,274,261,37,341,315,380,267,326,328,161,429,168,169,97,23,24,165,19,166,4,104,281,378,379,304,151,294,421,197,198,390,68,56,57,44,424,311,430,431]))),AV=b.lazy(()=>j(()=>import("./LiveStatsV2-CCEgr7-9.js"),__vite__mapDeps([432,1,3,258,314,12,11,5,6,13,69,433,18,10,434,377,429,59,60,61,62,321,379,44,435,292,383,436,68,46,47,48,430,19]))),vx=b.lazy(()=>j(()=>import("./BillingV2-BuVBAltL.js"),__vite__mapDeps([437,1,113,18,12,11,5,6,13,270,274,261,47,48,262,438,114,61,250,439,367,64,10,349,364,294,111,41,19]))),yx=b.lazy(()=>j(()=>import("./UpgradeSubscriptionV2-CU0GKFAm.js"),__vite__mapDeps([440,1,111,5,6,12,11,13,438,114,61,270,250,18,439,117,10,118,71,19]))),PV=b.lazy(()=>j(()=>import("./AccountV2-DjAPG888.js"),__vite__mapDeps([441,1,12,11,5,6,13,372,341,419,66,68,46,47,48,61,442,274,261,262,69,295,62,52,53,54,55,10,18,105,19]))),DV=b.lazy(()=>j(()=>import("./ProfileV2-B_yjJyIC.js"),__vite__mapDeps([443,1,444,70,12,11,5,6,13,445,337,372,341,18,69,295,62,419,66,68,46,47,48,61,442,446,65,274,261,262,67,81,56,57,58,51,52,53,54,55,26,27,3,10,250,44,49,447,77,105,19]))),NV=b.lazy(()=>j(()=>import("./index-CP9V4tYe.js"),__vite__mapDeps([448,1,3,21,22,23,24,25,40,91,8,4,5,6,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,96,97,98,99,100,101,102,103,104,105,41,106,127,107,14,15,16,155,141,156,157,158,159,160,124,125,239,449,147,149,199,202,145,36,188,242,178,109,142,37,118,29,140,148,129,420,132,133,161,131,184,31,185,194,137,203,151,134,175,189]))),LV=b.lazy(()=>j(()=>import("./index-Ddh2CaBP.js"),__vite__mapDeps([450,1,4,5,6,28,191,451,145,452,12,11,13,453,454,91,8,3,9,7,10,18,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,455,196,29,40,224,107,171,146,172,133,219,42,456,152,213,14,15,16,457,458,143,459,35,228,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,460,461,209,126,212,205,206,163,181,214,218,220,142,178,127,462,463,118]))),MV=b.lazy(()=>j(()=>import("./index-BWQ867dj.js"),__vite__mapDeps([464,1,28,191,228,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,465,466,407,467,409,398,404,272,349,266,350,49,405,406,281,282,408,283,284,338,81,468,403,334,296,357,360,469,62,359,470,69,218,219,220,142,178,143,127,107,171,145,146,172,133,471,361,263,248,262,63,245,472,473,247,60,318,50,474,475,435,286,265,476,70,213,477,401,462,463,478,479,480,118]))),FV=b.lazy(()=>j(()=>import("./index-BsiPhTjw.js").then(t=>t.i),__vite__mapDeps([481,1,5,6,482,28,191,12,11,13,164,452,483,453,455,91,8,4,3,9,7,10,18,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,196,29,40,224,107,171,145,146,172,133,219,42,484,456,152,213,14,15,16,458,122,228,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,460,461,209,459,35,126,212,205,206,454,163,181,214,218,220,142,178,143,127,485]))),bx=b.lazy(()=>j(()=>import("./index-V1oGvfYd.js"),__vite__mapDeps([486,1,228,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,465,332,306,80,81,71,333,272,334,335,313,245,409,467,398,407,404,349,266,350,49,405,406,281,282,408,485,461,191,487,479,403,296,357,360,249,337,470,69,330,469,62,359,63,466,468,482,445,367,84]))),$V=b.lazy(()=>j(()=>import("./index-BI3lZdag.js"),__vite__mapDeps([488,1,4,5,6,163,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,455,196,29,40,224,107,171,145,146,172,133,219,42,454,209,14,15,16,459,35,228,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,126,27,236,489,490,218,220,142,178,143,127,205,206,485,461,118]))),Sx=b.lazy(()=>j(()=>import("./index-Bb3P8DjQ.js"),__vite__mapDeps([491,1,341,12,11,5,6,13,490,91,8,4,3,9,7,10,18,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,474,475,44,435,472,58,51,228,229,46,47,48,56,57,225,68,61,197,83,198,66,64,230,67,231,232,470,272,69,403,404,334,296,357,405,360,406,407,350,49,266,283,284,320,321,250,478,492,314,59,60,62,493,27,461,485,26,218,219,220,142,178,143,127,107,171,145,146,172,133,471,361,263,248,262,63,245,473,409,247,318,50,286,265,476,70,213,477,236,494,304,307,359,294,495,302,402,392]))),jV=b.lazy(()=>j(()=>import("./index-DPtTR-nh.js"),__vite__mapDeps([496,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,15,16,284,61]))),UV=b.lazy(()=>j(()=>import("./index-bxBTb9x5.js"),__vite__mapDeps([497,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,127,171,145,146,172,133,14,15,16,219,458,143,29,228,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,191,455,196,40,224,107,42,124,137,125,498,499,452,483,453,218,220,142,178,451]))),BV=b.lazy(()=>j(()=>import("./index-CgPQXOhI.js"),__vite__mapDeps([500,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,127,453,171,145,146,172,133,14,15,16,457,219,143,228,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,455,196,29,40,224,107,42,499,218,220,142,178,137,125,498,452,483]))),Ex=b.lazy(()=>j(()=>import("./index-DThcSrQY.js"),__vite__mapDeps([501,1,12,11,5,6,13,18,10,191,478,407,69,403,404,334,272,92,46,47,48,296,357,405,67,360,406,61,350,49,266,91,8,4,3,9,7,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,251,58,51,59,60,62,283,284,470,68,64,502,314,228,229,56,57,225,197,83,198,66,230,44,231,232,465,468,275,71,279]))),wx=b.lazy(()=>j(()=>import("./PlaylistDetailV2-Ikh_R2Wt.js"),__vite__mapDeps([503,1,12,11,5,6,13,409,492,58,18,10,69,46,47,48,59,60,61,62,283,284,470,272,92,8,4,3,9,7,68,64,403,404,334,296,357,405,67,360,406,407,350,49,266,502,314,228,91,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,56,57,51,225,197,83,198,66,230,44,231,232,465,468,251,279]))),HV=b.lazy(()=>j(()=>import("./index-iDptPIbJ.js"),__vite__mapDeps([504,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,484,505,506,33,219,42]))),xx=b.lazy(()=>j(()=>import("./index-DiXv24_A.js"),__vite__mapDeps([507,1,45,12,11,5,6,13,58,51,466,407,18,487,272,92,349,479,44,266,403,404,334,46,47,48,296,357,405,67,360,406,61,350,49,249,472,409,508,446,509,41,100,281,19]))),VV=b.lazy(()=>j(()=>import("./WelcomeFreeTrail-C0DN2mPc.js"),__vite__mapDeps([510,1,4,5,6,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,511,38,512]))),zV=b.lazy(()=>j(()=>import("./index-XVpM6OAF.js"),__vite__mapDeps([513,1,505,506,7,4,5,6,33,12,11,13,514,19]))),qV=b.lazy(()=>j(()=>import("./index-D-7OxtnH.js"),__vite__mapDeps([515,1,444,70,12,11,5,6,13,445,337,108,91,8,4,3,9,7,10,18,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,178,109,26,27]))),WV=b.lazy(()=>j(()=>import("./index-DJs8H3J2.js"),__vite__mapDeps([516,1,4,5,6,52,53,54,55,91,8,3,9,7,10,11,18,12,13,92,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,26,27,517,506,518,519,520,521]))),GV=b.lazy(()=>j(()=>import("./index-C3INZBW7.js"),__vite__mapDeps([522,1,98,6,20,91,8,4,5,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,99,100,101,22,102,103,104,105,41,106,107,14,15,16,122,523,212,263,248,47,48,262,64,61,63,34,215,524,525,124,137,125,126,498,163,208,127,171,145,146,172,133,142,223,227,228,229,46,56,57,58,51,225,68,197,83,198,66,230,67,44,231,232,363,224,234,141,235,32,526,206,205,207,209,210,211,166,181,527,201,170,173,153,213,214,528]))),KV=b.lazy(()=>j(()=>import("./index-Brk9TV9m.js"),__vite__mapDeps([529,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,15,524]))),Tx=b.lazy(()=>j(()=>import("./index-B2JnbMCF.js"),__vite__mapDeps([530,1,98,6,4,5,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,99,100,101,22,102,103,104,105,41,106,127,523,212,263,248,47,48,262,64,61,63,107,209,14,15,16,142,228,229,46,56,57,58,51,225,68,197,83,198,66,230,67,44,231,232,20,524,528,171,145,146,172,133,223,227,211,363,224,234,141,235,124,137,125,126,498,163,208]))),YV=b.lazy(()=>j(()=>import("./index-g7wN3pfn.js"),__vite__mapDeps([531,1,98,6,20,524,124,137,125,173,12,11,5,13,498,163,91,8,4,3,9,7,10,18,92,52,53,54,55,19,93,94,95,25,96,97,23,24,99,100,101,22,102,103,104,105,41,106,208,127,107,14,15,16,142,228,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,528,171,145,146,172,133,223,227,211,120,29,40,123,126,128,27,42,129,527,201,170,226,352,340,263,248,262,63,233,234,209,153,213]))),JV=b.lazy(()=>j(()=>import("./index-CMDSwVek.js"),__vite__mapDeps([532,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106]))),XV=b.lazy(()=>j(()=>import("./index-DEafmvIz.js"),__vite__mapDeps([533,1,52,53,54,55,5,6,12,11,13,263,248,47,48,262,64,61,63,257,258,10,18,69,534,27,3,535,536,453,518,519,520,19]))),ZV=b.lazy(()=>j(()=>import("./index-D0nNECsh.js"),__vite__mapDeps([537,1,505,506,7,4,5,6,33,12,11,13,514,19]))),QV=b.lazy(()=>j(()=>import("./index-CixUk5ZJ.js"),__vite__mapDeps([538,1,481,5,6,482,28,191,12,11,13,164,452,483,453,455,91,8,4,3,9,7,10,18,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,196,29,40,224,107,171,145,146,172,133,219,42,484,456,152,213,14,15,16,458,122,228,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,460,461,209,459,35,126,212,205,206,454,163,181,214,218,220,142,178,143,127,485]))),e6=b.lazy(()=>j(()=>import("./index-DdlKOfO4.js"),__vite__mapDeps([539,1,29,40,4,5,6,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,127,179,121,107,14,15,16,142,39,182,27,540,129,188,118]))),t6=b.lazy(()=>j(()=>import("./UsersV2-C1xHq9ot.js"),__vite__mapDeps([541,1,10,11,18,12,5,6,13,69,374,197,46,47,48,83,61,198,66,64,68,19,246,247,248,51,249,245,250,63,231,251,257,258,261,262,263,266,330,55,53,54,95,25,102,27,3,540,60,284,283,59,62,321,67,72,118]))),n6=b.lazy(()=>j(()=>import("./index-j9ogpTHv.js"),__vite__mapDeps([542,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106]))),r6=b.lazy(()=>j(()=>import("./index-DDQrogoH.js"),__vite__mapDeps([543,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106]))),s6=b.lazy(()=>j(()=>import("./index-DF0hmEnw.js"),__vite__mapDeps([449,1,19,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,127,147,149,199,202,145,124,36,188]))),Ix=b.lazy(()=>j(()=>import("./CalendarV2-BzHoAYYK.js").then(t=>t.a),__vite__mapDeps([423,1,19,10,11,18,12,5,6,13,147,388,69,421,197,46,47,48,83,61,198,66,64,390,68,56,57,58,51,321,44,60,424,311,411,412,59,62,320,247,248,361,274,261,262,330,67,425,426,226,24,99,100,364,302,301,52,53,54,55,389,230,263,63,391,188,427]))),i6=b.lazy(()=>j(()=>import("./index-CdVEKITW.js"),__vite__mapDeps([544,1,545,52,53,54,55,5,6,91,8,4,3,9,7,10,11,18,12,13,92,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,546,536,453,517,506,547,381,26,27,512,178,196,111,116,117,118,511,38,114,535,518,519,521])));b.lazy(()=>j(()=>import("./SignUpSimplified-fKlvhIPa.js"),__vite__mapDeps([545,1,52,53,54,55,5,6,91,8,4,3,9,7,10,11,18,12,13,92,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,546,536,453,517,506,547,381,26,27,512])));const o6=b.lazy(()=>j(()=>import("./index-B06k-gnX.js"),__vite__mapDeps([548,1,163,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,35,126,452,505,506,33,489,490,172,133]))),a6=b.lazy(()=>j(()=>import("./index-Bx4VfgFG.js"),__vite__mapDeps([549,1,8,4,5,6,3,9,7,10,11,91,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,475,44,435,508,446,509,472,272,392,495,61,266,357,493,466,407,304,250,1
12172,133]))),l6=b.lazy(()=>j(()=>import("./index-B1qSdxD9.js"),__vite__mapDeps([550,1,4,5,6,547,12,11,13,381,10,26,27,3,18,91,8,9,7,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,112,517,506,114]))),u6=b.lazy(()=>j(()=>import("./PricingV2-CBpvbDLJ.js"),__vite__mapDeps([551,1,547,12,11,5,6,13,381,10,26,27,3,18,509,114,19]))),c6=b.lazy(()=>j(()=>import("./PrivateRoute-k0UsZ7e9.js"),__vite__mapDeps([552,1,7,4,5,6,12,11,13,19])));b.lazy(()=>j(()=>import("./index-CjlL2ryl.js"),__vite__mapDeps([553,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,15,85])));const d6=b.lazy(()=>j(()=>import("./index-CgWquTh6.js"),__vite__mapDeps([554,1,555,52,53,54,55,5,6,458,4,228,91,8,3,9,7,10,11,18,12,13,92,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,127,171,145,146,172,133,142,124,125,163,137,224,363,234,141,235,204,205,206,35,207,208,107,209,210,211,212,200,201,70,69,195,196,181,213,214,526,126,498,523,263,248,262,63,14,15,16,524,166,527,170,20,173,153,556,460,461,459,455,29,40,219,42,454]))),f6=b.lazy(()=>j(()=>import("./index-DRk1o1EO.js"),__vite__mapDeps([557,1,555,52,53,54,55,5,6,458,4,228,91,8,3,9,7,10,11,18,12,13,92,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,127,171,145,146,172,133,142,124,125,163,137,224,363,234,141,235,204,205,206,35,207,208,107,209,210,211,212,200,201,70,69,195,196,181,213,214,526,126,498,523,263,248,262,63,14,15,16,524,166,527,170,20,173,153,556,460,461,459,455,29,40,219,42,454]))),h6=b.lazy(()=>j(()=>import("./index-CA7V2Ofn.js"),__vite__mapDeps([558,1,555,52,53,54,55,5,6,458,4,228,91,8,3,9,7,10,11,18,12,13,92,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,127,171,145,146,172,133,142,124,125,163,137,224,363,234,141,235,204,205,206,35,207,208,107,209,210,211,212,200,201,70,69,195,196,181,213,214,526,126,498,523,263,248,262,63,14,15,16,524,166,527,170,20,173,153,556,460,461,459,455,29,40,219,42,454]))),Nv=b.lazy(()=>j(()=>import("./index-B0TTZV-Y.js"),__vite__mapDeps([559,1,52,53,54,55,5,6,91,8,4,3,9,7,10,11,18,12,13,92,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,171,145,146,172,133,215,556]))),p6=b.lazy(()=>j(()=>import("./index-Cc-mj5yh.js"),__vite__mapDeps([560,1,555,52,53,54,55,5,6,458,4,228,91,8,3,9,7,10,11,18,12,13,92,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,127,171,145,146,172,133,142,124,125,163,137,224,363,234,141,235,204,205,206,35,207,208,107,209,210,211,212,200,201,70,69,195,196,181,213,214,526,126,498,523,263,248,262,63,14,15,16,524,166,527,170,20,173,153,556,460,461,459,455,29,40,219,42,454]))),g6=b.lazy(()=>j(()=>import("./GlobalHomeV2-D9pGVPZy.js"),__vite__mapDeps([561,1,562,12,11,5,6,13,18,356,313,245,60,288,334,92,224,274,261,47,48,262,61,266,350,251,357,64,43,49,62,67,358,302,72,563,10,495,272,91,8,4,3,9,7,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,349,364,58,51,204,205,206,35,207,208,124,137,125,127,107,209,142,210,211,212,200,201,70,69,195,196,163,181,213,214,526,126,498,523,263,248,63,14,15,16,228,229,46,56,57,225,68,197,83,198,66,230,44,231,232,524,363,234,141,235,166,527,170,20,173,153,460,461,459,455,29,40,171,145,146,172,133,219,42,454,343,345,346,304,347,360,59,330]))),m6=b.lazy(()=>j(()=>import("./ActivitiesAndDrillsV2-BPYvwad3.js"),__vite__mapDeps([564,1,562,12,11,5,6,13,18,356,313,245,60,288,334,92,224,274,261,47,48,262,61,266,350,251,357,64,43,49,62,67,358,302,72,563,10,495,272,91,8,4,3,9,7,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,349,364,58,51,204,205,206,35,207,208,124,137,125,127,107,209,142,210,211,212,200,201,70,69,195,196,163,181,213,214,526,126,498,523,263,248,63,14,15,16,228,229,46,56,57,225,68,197,83,198,66,230,44,231,232,524,363,234,141,235,166,527,170,20,173,153,460,461,459,455,29,40,171,145,146,172,133,219,42,454,343,345,346,304,347,360,59,330]))),_6=b.lazy(()=>j(()=>import("./SessionsV2-BlM0ixh-.js"),__vite__mapDeps([565,1,562,12,11,5,6,13,18,356,313,245,60,288,334,92,224,274,261,47,48,262,61,266,350,251,357,64,43,49,62,67,358,302,72,563,10,495,272,91,8,4,3,9,7,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,349,364,58,51,204,205,206,35,207,208,124,137,125,127,107,209,142,210,211,212,200,201,70,69,195,196,163,181,213,214,526,126,498,523,263,248,63,14,15,16,228,229,46,56,57,225,68,197,83,198,66,230,44,231,232,524,363,234,141,235,166,527,170,20,173,153,460,461,459,455,29,40,171,145,146,172,133,219,42,454,343,345,346,304,347,360,59,330]))),v6=b.lazy(()=>j(()=>import("./MySubmissionsV2-BhSa6nWX.js"),__vite__mapDeps([566,1,562,12,11,5,6,13,18,356,313,245,60,288,334,92,224,274,261,47,48,262,61,266,350,251,357,64,43,49,62,67,358,302,72,563,10,495,272,91,8,4,3,9,7,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,349,364,58,51,204,205,206,35,207,208,124,137,125,127,107,209,142,210,211,212,200,201,70,69,195,196,163,181,213,214,526,126,498,523,263,248,63,14,15,16,228,229,46,56,57,225,68,197,83,198,66,230,44,231,232,524,363,234,141,235,166,527,170,20,173,153,460,461,459,455,29,40,171,145,146,172,133,219,42,454,343,345,346,304,347,360,59,330]))),y6=b.lazy(()=>j(()=>import("./index-CEhQmK3V.js"),__vite__mapDeps([567,1,228,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,127,171,145,146,172,133,122,224,215,525,363,234,141,235,556,118]))),Ox=b.lazy(()=>j(()=>import("./index-Djf2KDSF.js"),__vite__mapDeps([568,1,18,12,11,5,6,13,10,228,91,8,4,3,9,7,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,362,363,224,234,141,235,59,60,62,3
12161,358,272,334,296,357,351,266,49,71,277]))),b6=b.lazy(()=>j(()=>import("./index-CaJUb-Kn.js"),__vite__mapDeps([569,1,4,5,6,29,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,14,15,16,456,152,213,171,145,146,172,133,457,219,223,227,143,107,209,142,211,205,451]))),S6=b.lazy(()=>j(()=>import("./index-BLD3P1xf.js"),__vite__mapDeps([570,1,4,5,6,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,127,456,152,213,453,171,145,146,172,133,14,15,16,457,219,143,459,35,228,229,46,47,48,56,57,58,51,225,68,61,197,83,198,66,64,230,67,44,231,232,455,196,29,40,224,107,42,460,461,209,126,212,205,206,454,163,181,214,451,124,125]))),E6=b.lazy(()=>j(()=>import("./index-B8CpV2Y8.js"),__vite__mapDeps([571,1,12,11,5,6,13,69,572]))),w6=b.lazy(()=>j(()=>import("./BuildSessionV2-DGYagh7W.js"),__vite__mapDeps([573,1,225,400,18,12,11,5,6,13,229,64,401,342,98,321,409,197,46,47,48,83,61,198,66,361,247,248,51,275,71,403,404,334,272,92,296,357,405,67,360,406,407,350,49,266,468,101,44,340,341,52,53,54,55,8,4,3,9,7,10,286,63,231,62,346,70,304,347,245,473,574,572,91,19,93,94,95,25,96,97,23,24,99,100,22,102,103,104,105,41,106,201,476,69,65,320,388,293,330,279,292]))),x6=b.lazy(()=>j(()=>import("./MySessionV2-Ansitm3k.js"),__vite__mapDeps([575,1,12,11,5,6,13,409,247,248,47,48,61,51,283,284,59,60,62,272,92,228,91,8,4,3,9,7,10,18,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,229,46,56,57,58,225,68,197,83,198,66,64,230,67,44,231,232,470,69,403,404,334,296,357,405,360,406,407,350,49,266,469,359,480,576,361,274,261,262,320,321,459,35,14,15,16,204,205,206,207,208,124,137,125,127,107,209,142,210,211,212,200,201,70,195,196,163,181,213,214,563,495,349,364,275,71,388,279,301]))),Mc=b.lazy(()=>j(()=>import("./AutoBuilderCanvas-BA5OSZDR.js"),__vite__mapDeps([577,1,98,6,12,11,5,13,10,18,225,283,284,474,91,8,4,3,9,7,92,52,53,54,55,19,93,94,95,25,96,97,23,24,99,100,101,22,102,103,104,105,41,106,475,44,435,472,58,51,388,263,248,47,48,262,64,61,63,274,261,286,67,333,272,334,357,43,60,46,250,398,251,62,245,382,361,198,66,576,320,321,81,338,371,578]))),T6=b.lazy(()=>j(()=>import("./index-C4mohiZX.js"),__vite__mapDeps([579,1,12,11,5,6,13,4,19]))),I6=b.lazy(()=>j(()=>import("./index-CBKEYBKm.js"),__vite__mapDeps([580,1,4,5,6,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,145,141,159,581,160,124,125,158,127,582,157]))),O6=b.lazy(()=>j(()=>import("./ReplayHubV2-WhtUIbV2.js"),__vite__mapDeps([583,1,159,11,330,12,5,6,13,278,277,67,361,371,64,51,158,581,59,60,61,62,370,247,248,47,48,251,301,246,83,46,249,245,250,63,231,269,270,534,584,68,447,82,157,4,91,8,3,9,7,10,18,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106]))),k6=b.lazy(()=>j(()=>import("./index-A19xdhQu.js"),__vite__mapDeps([585,1,586,4,5,6,124,125,91,8,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,127,159,158,587,48,588,145,404,582]))),C6=b.lazy(()=>j(()=>import("./ReplayVideoDetailV2-bleGZqMd.js"),__vite__mapDeps([589,1,361,12,11,5,6,13,371,159,18,158,59,60,61,62,590,586,404,292,383,284,247,248,47,48,51,393,66,587,91,8,4,3,9,7,10,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106,588,145,277,197,46,83,198,64,301,357,251,359,314,69,582,584,68,67,447,382,406,71,435,384]))),R6=b.lazy(()=>j(()=>import("./ReplayReelViewV2-CER2CPHP.js"),__vite__mapDeps([591,1,159,11,590,586,404,435,12,5,6,13,357,592,71]))),A6=b.lazy(()=>j(()=>import("./PlaylistDetailV2-Cz1zTPWG.js"),__vite__mapDeps([593,1,159,11,158,59,12,5,6,13,60,61,62,590,586,404,584,68,46,47,48,435,357,592,494,50,71,301,63,64,19]))),P6=b.lazy(()=>j(()=>import("./index-DJ6G58M6.js"),__vite__mapDeps([156,1,91,8,4,5,6,3,9,7,10,11,18,12,13,92,52,53,54,55,19,93,94,95,25,96,97,23,24,98,99,100,101,22,102,103,104,105,41,106]))),D6=b.lazy(()=>j(()=>import("./ReplayPlanRequiredV2-e9wU42zY.js"),__vite__mapDeps([594,1]))),N6=b.lazy(()=>j(()=>import("./ReplayPublicViewer-CCIZtgGG.js"),__vite__mapDeps([595,1,590,586,404,159,11,12,5,6,13]))),L6=b.lazy(()=>j(()=>import("./index-D4U9KIoR.js"),__vite__mapDeps([596,1,4,5,6,18,12,11,13,10,19]))),M6=b.lazy(()=>j(()=>import("./ThreadView-C8AfLqyG.js"),__vite__mapDeps([597,1,4,5,6,18,12,11,13,10,19]))),F6=b.lazy(()=>j(()=>import("./index-Bl7SSNHp.js"),__vite__mapDeps([598,1,18,12,11,5,6,13,10,69,263,248,47,48,262,64,61,63,314,245,19]))),$6=b.lazy(()=>j(()=>import("./ThreadView-CQhCnvdo.js"),__vite__mapDeps([599,1,18,12,11,5,6,13,10,245,71,88,19]))),Lv=b.lazy(()=>j(()=>import("./LegacyTeamMessagesNotice-o-KBn4Yu.js"),__vite__mapDeps([600,1,245,12,11,5,6,13,385]))),j6=b.lazy(()=>j(()=>import("./ErrorPage-Bb2huUCI.js"),__vite__mapDeps([601,1,7,4,5,6,12,11,13,19]))),U6=b.lazy(()=>j(()=>import("./index-C7qUfoab.js"),__vite__mapDeps([602,1,4,5,6,7,12,11,13])));function Fc({children:t}){var x,R;const e=yo(),n=Mt(),r=Po(),s=yu(),i=Oe(C=>C.club),{data:o,isPending:a,error:l}=vo(),u=Oe(C=>{var S;return(S=C.user.userDetail)==null?void 0:S.userRolesPermissions}),c=u!=null,d=Uy(),f=b.useRef(!1),p=b.useRef(!1),[h,g]=b.useState(!1),_=(x=o==null?void 0:o.user)==null?void 0:x.id;b.useEffect(()=>{p.current=!1,f.current=!1},[_]),b.useEffect(()=>{if(a||Dn)return;const C=!!(o!=null&&o.user),S=!!s.id,w=i!=null&&typeof i=="object"&&Object.keys(i).length>0,A=()=>{n.pathname.includes("collection")?e(`/trailer${n.search}`):e("/")},P=()=>{f.current||Dn||(f.current=!0,qs(r,!0).finally(()=>{f.current=!1}),A())};if(!(C&&S&&w)){if(!C){if(l)return;S?P():A();return}if(!S||!w){if(p.current){S||P();return}p.current=!0,g(!0);const O=o.user,N=O.club_id||s.club_id;(async()=>{var L;if(O.clubDetails&&typeof O.clubDetails=="object"&&Object.keys(O.clubDetails).length>0)return r(Kn(O)),r(Mr(O.clubDetails)),O.UserActivePlan&&r(Yn(O.UserActivePlan)),!0;if(N){const W=()=>d.query({query:$1,variables:{club_id:N},fetchPolicy:"no-cache"});let q;try{({data:q}=await W())}catch{await new Promise(ce=>setTimeout(ce,1e3));try{({data:q}=await W())}catch(ce){return console.error("AuthGuard: club info re-fetch failed",ce),!1}}return(L=q==null?void 0:q.clubInfo)!=null&&L.success?(S||(r(Kn(O)),O.UserActivePlan&&r(Yn(O.UserActivePlan))),r(Mr(JSON.parse(q.clubInfo.data))),!0):!1}return S||(r(Kn(O)),O.UserActivePlan&&r(Yn(O.UserActivePlan))),!0})().then(L=>{g(!1),!L&&!S&&P()}).catch(()=>{g(!1),S||P()})}}},[e,r,o,i,s.id,s.club_id,n.search,a,n.pathname,d]);const m=new URLSearchParams(n.search),y=m.get("setup")==="true"||m.get("session_id"),E=n.pathname==="/engine-room/home"||n.pathname==="/dugout/dashboard";if(a||h)return v.jsx("div",{});const T=((R=o==null?void 0:o.user)==null?void 0:R.clubDetails)||i||(s==null?void 0:s.clubDetails);return(T==null?void 0:T.access_status)==="payment_hold"?v.jsx(hV,{reason:T.access_hold_reason}):o!=null&&o.user&&!(s!=null&&s.id)?v.jsx("div",{}):!(s!=null&&s.id)||!(s!=null&&s.club_id)&&!(y&&E)?v.jsx(Le,{to:"/"}):c?m4(u,Mh(n.pathname))?v.jsx(v.Fragment,{children:t}):v.jsx(Le,{to:"/restricted"}):v.jsx("div",{})}function B6({children:t}){const e=Oe(l=>l.user.userDetail),n=Oe(l=>l.user.userPermission),r=ii(),s=Mt(),i=Co(),o=jo(s.pathname),a=!!o&&
121!r&&!(e!=null&&e.isAdminPlanActive)&&n.planId<3;return b.useEffect(()=>{var l;a&&(i==null||i.capture(go.PAYWALL_HIT,{customData:{feature:"engine_room",currentPlan:((l=n==null?void 0:n.Plan)==null?void 0:l.title)??(n==null?void 0:n.planName)??null}}))},[a]),o?r?v.jsx(Le,{to:`/playmaker-upgrade?module=${o}`,replace:!0}):e!=null&&e.isAdminPlanActive?v.jsx(v.Fragment,{children:t}):n.planId<3?v.jsx(Le,{to:"/engine-room/plan-required"}):v.jsx(v.Fragment,{children:t}):v.jsx(v.Fragment,{children:t})}function Mv({children:t}){const e=Mt(),n=Oe(f=>f.user.userDetail),{isPending:r,hasCompletedCheckout:s}=np(),i=(n==null?void 0:n.planExpired)===!0,o=s,a=new URLSearchParams(e.search),l=a.get("session_id")!==null,u=a.get("setup")==="true",d=["/pricing","/upgrade-subscription","/billing","/on-boarding"].some(f=>e.pathname.startsWith(f));return r?v.jsx(ep,{}):i&&!d?v.jsxs(v.Fragment,{children:[t,M(U6)]}):!o&&!d&&!l&&!u?v.jsx(Le,{to:"/pricing"}):v.jsx(v.Fragment,{children:t})}function H6({children:t}){const e=ox("replay_enabled"),n=Mt(),r=Oe(o=>o.user.userPermission),s=Co(),i=n.pathname.includes("replay")&&!e;return b.useEffect(()=>{var o;i&&(s==null||s.capture(go.PAYWALL_HIT,{customData:{feature:"replay",currentPlan:((o=r==null?void 0:r.Plan)==null?void 0:o.title)??(r==null?void 0:r.planName)??null}}))},[i]),i?v.jsx(Le,{to:"/dugout/dashboard",replace:!0}):v.jsx(v.Fragment,{children:t})}function V6({children:t}){const e=Oe(a=>a.user.userDetail),n=Oe(a=>a.user.userPermission),r=ii(),s=Mt(),i=Co(),o=s.pathname.includes("session-planner")&&n.planId<4&&!(e!=null&&e.isAdminPlanActive)&&!r;return b.useEffect(()=>{var a;o&&(i==null||i.capture(go.PAYWALL_HIT,{customData:{feature:"session_planner",currentPlan:((a=n==null?void 0:n.Plan)==null?void 0:a.title)??(n==null?void 0:n.planName)??null}}))},[o]),o?v.jsx(Le,{to:"/session-planner/plan-required"}):v.jsx(v.Fragment,{children:t})}function z6(){const t=ii(),e=Mt(),n=jo(e.pathname);return t&&n?v.jsx(Le,{to:`/playmaker-upgrade?module=${n}`,replace:!0}):v.jsx(Le,{to:"/engine-room/home",replace:!0})}function q6({children:t}){const e=ii(),n=Mt(),r=jo(Mh(n.pathname));return e&&r?v.jsx(Le,{to:`/playmaker-upgrade?module=${r}`,replace:!0}):v.jsx(v.Fragment,{children:t})}function W6({children:t}){const e=ii(),n=Mt();if(!e)return v.jsx(v.Fragment,{children:t});const r=jo(n.pathname);return r?v.jsx(Le,{to:`/playmaker-upgrade?module=${r}`,replace:!0}):v.jsx(v.Fragment,{children:t})}function G6(t,e){const{engine_room:n,dugout:r}=t==null?void 0:t.userRolesPermissions;return n?e:r?"/dugout/players":"/session-planner/club-library"}function $c({children:t,redirectTo:e,state:n={},requireCompletedOnboarding:r=!1}){var I,x,R,C;const s=Po(),i=yo(),o=Mt(),a=yu(),l=Oe(S=>S.user.userDetail),{data:u,isPending:c,error:d}=vo(),f=Oe(S=>S.club),p=Oe(S=>S.user.userDetail),h=Oe(S=>S.user.userPermission),g=bu(u),[_]=pV();b.useEffect(()=>{var A,P;if(c)return;const S=sessionStorage.getItem(Qt);if(!S)return;const w=O=>{sessionStorage.removeItem(Qt),_({msg:O,variant:"error"}),qs(s,!0),i("/",{replace:!0})};try{const O=JSON.parse(S);if(O.flow==="signInWithSocial"&&(u!=null&&u.user)){const{user:N}=u;if(s(Kn(N)),N.clubDetails&&N.UserActivePlan)s(Mr(N.clubDetails)),s(Yn(N.UserActivePlan)),sessionStorage.removeItem(Qt);else{const V={duration:!1,planDuration:"monthly",billingAmount:0,discountCoupon:null,registerData:{flow:"getStarted",plan:{},duration:"",userCount:"",email:N.email,password:"",userId:N.id},timestamp:Date.now(),selectedStep:1,returnPath:"/register",flow:"signUpWithSocial",provider:"social"};sessionStorage.setItem(Qt,JSON.stringify(V)),i("/register")}return}if(O.flow==="signUpWithSocial"&&O.returnPath&&(O.inviteToken||an(a))&&(u!=null&&u.user)){const N=u.user;if(N.clubDetails&&N.UserActivePlan){sessionStorage.removeItem(Qt),s(Kn(N)),s(Mr(N.clubDetails)),s(Yn(N.UserActivePlan));return}if(O.inviteToken&&((A=u==null?void 0:u.user)!=null&&A.email))try{const L=JSON.parse(atob(O.inviteToken.split(".")[1]));if(u.user.email!==L.email){w("You are not authorized to access this resource. Please sign in with the invited email.");return}}catch{w("Invalid invitation token");return}else!O.inviteToken&&!an((P=u==null?void 0:u.user)==null?void 0:P.clubDetails)&&
121(s(Kn(u.user)),u.user.clubDetails&&s(Mr(u.user.clubDetails)),u.user.UserActivePlan&&s(Yn(u.user.UserActivePlan)));s($4(O.registerData));const V=O.inviteToken?O.returnPath:"/pricing";i(V,{replace:!0})}}catch(O){console.error("Error processing OAuth state:",O),sessionStorage.removeItem(Qt)}},[c,u,a,s,i,_,f]);const m=b.useRef(!1),y=!!(u!=null&&u.user);b.useEffect(()=>{c||y||d||an(a==null?void 0:a.userRolesPermissions)||Dn||sessionStorage.getItem(Qt)||m.current||(m.current=!0,Ar("stale-auth-state-cleared",{level:"warning",tags:{event_type:"auth_state_mismatch",route:o.pathname}}),qs(s,!0))},[c,y,d,a,s,o.pathname]);let E=!1;if(o.pathname==="/register"&&e==="/pricing"){const S=sessionStorage.getItem(Qt);if(S)try{const w=JSON.parse(S);(w==null?void 0:w.flow)==="signUpWithSocial"&&((x=(I=w==null?void 0:w.registerData)==null?void 0:I.plan)!=null&&x.planId)&&(E=!0)}catch{}}if(new URLSearchParams(o.search).get("redirect_to")&&!g&&(a!=null&&a.club_id)&&!an(a==null?void 0:a.userRolesPermissions)&&!r)return t;if(!E&&!c&&y&&!g&&!an(a==null?void 0:a.userRolesPermissions)&&e){const S=u==null?void 0:u.user,w=!!(S!=null&&S.userRolesPermissions),A=w?S:a,P=!!(A!=null&&A.club_id&&((R=w?S.UserActivePlan:l==null?void 0:l.UserActivePlan)!=null&&R.hasCompletedInitialCheckout));if(r?P:!0){const V=((C=h==null?void 0:h.Plan)==null?void 0:C.title)==="Playmaker"&&(p==null?void 0:p.isAdminPlanActive)?"/session-planner/club-library":G6(A,e);if(o.pathname!==V)return v.jsx(Le,{to:V,state:n})}}return t}function M(t,e){return v.jsx(b.Suspense,{fallback:v.jsx("div",{}),children:v.jsx(t,{...e})})}function Ss(t,e){return v.jsx(b.Suspense,{fallback:v.jsx("div",{style:{minHeight:"100vh",backgroundColor:"#06080c"}}),children:v.jsx(t,{...e})})}function K6(){const t=ue("v2-engine-room"),e=ue("dugout_dashboard_v2"),n=Mt(),r=new URLSearchParams(n.search).get("session_id")!==null;return e&&r?v.jsx(Le,{to:`/dugout/dashboard${n.search}`,replace:!0}):M(t?bx:FV)}function Y6({children:t}){const{isPending:e,isAuthenticated:n,isEnriched:r,hasCompletedCheckout:s}=np();return!e&&n&&r&&!s?v.jsx(Le,{to:"/pricing",replace:!0}):t}function J6(){return ue("v2-landing")?Ss(xx):M(HV)}function Fv(){return ue("v2-landing")?Ss(a6):M(o6)}function X6(){return ue("v2-engine-room-category")?v.jsx(kx,{}):M(LV)}function kx(){const{id:t=""}=Uf();return v.jsx(b.Suspense,{fallback:v.jsx("div",{style:{minHeight:"100vh",backgroundColor:"#06080c"}}),children:v.jsx(MV,{},t)})}function $v(){return ue("engine_room_media_detail_v2")?M(Sx):M($V)}function Z6(){const t=ue("v2-pricing"),{isPending:e,isAuthenticated:n,hasActiveOrTrialingSubscription:r,isPlaymaker:s,modules:i}=np(),o=R4({isPlaymaker:s,modules:i});return e?v.jsx(ep,{}):C4({isAuthenticated:n,hasActiveOrTrialingSubscription:r})?v.jsx(Le,{to:o,replace:!0}):M(t?u6:l6)}function Q6(){return ue("v2-build-session")?M(w6):M(b6)}function ez(){return ue("v2-build-session")?M(x6):M(S6)}function tz({setActiveTab:t}){return ue("dugout_teams_v2")?M(lx):M(OV,{setActiveTab:t})}function nz({setActiveTab:t}){return ue("dugout_players_v2")?M(ux):M(wV,{setActiveTab:t})}function rz({setActiveTab:t}){return ue("dugout_parent_messages_v2")?M(F6):M(L6,{setActiveTab:t})}function sz({setActiveTab:t}){return ue("dugout_parent_messages_v2")?M($6):M(M6,{setActiveTab:t})}function Sa(){return ue("v2-replay-hub")?M(O6):M(I6)}function iz(){return ue("v2-replay-hub")?M(D6):M(P6)}function oz(){return ue("v2-replay-detail")?M(C6):M(k6)}function az({setActiveTab:t}){return ue("users-access-v2")?M(t6,{setActiveTab:t}):M(e6,{setActiveTab:t})}function lz(){return ue("v2-engine-room-playlists")?M(Ex):M(UV)}function uz(){return ue("v2-engine-room-playlists")?M(wx):M(BV)}function cz({setActiveTab:t}){return ue("dugout_fixtures_v2")?M(cx):M(SV,{setActiveTab:t})}function dz({setActiveTab:t}){return ue("dugout_sessions_v2")?M(dx,{setActiveTab:t}):M(TV,{setActiveTab:t})}function fz({setActiveTab:t}){return ue("dugout_dashboard_v2")?M(fx,{setActiveTab:t}):M(bV,{setActiveTab:t})}function hz({setActiveTab:t}){return ue("dugout_saved_content_v2")?M(Ox,{setActiveTab:t}):M(y6,{setActiveTab:t})}function pz({setActiveTab:t}){return ue("dugout_calendar_v2")?M(Ix):M(s6,{setActiveTab:t})}function gz(){const t=ue("v2-session-planner-library"),{type:e}=Uf();if(t){if(e==="global-library")return v.jsx(Le,{to:"/global-library/home",replace:!0});if(["club-library","my-library","shared","draft","drafts"].includes(e))return M(RV)}return M(GV)}function mz(){return ue("v2-session-planner")?M(kV):M(YV)}
121function _z(){return ue("v2-session-planner")?v.jsx(vz,{}):M(Tx)}function vz(){const{id:t}=Uf(),e=yo(),[n,r]=b.useState(!1);return b.useEffect(()=>{let s=!1;return(async()=>{var i,o,a,l,u;try{const c=await a4({url:`/single-work/${Number(t)}?session=true`,method:"GET"});if(s)return;const d=(i=c==null?void 0:c.data)==null?void 0:i.data,f=(d==null?void 0:d.session_planner_session_id)||((a=(o=d==null?void 0:d.session_planner_session_works)==null?void 0:o[0])==null?void 0:a.session_planner_session_id)||((u=(l=d==null?void 0:d.dugout_session_practices)==null?void 0:l[0])==null?void 0:u.training_session_id)||null;if(f){e(`/session-planner/session-detail/${f}?expandDrill=${t}`,{replace:!0});return}r(!0)}catch{s||r(!0)}})(),()=>{s=!0}},[t,e]),n?M(Tx):v.jsx(ep,{text:"Opening editorâ¦"})}function yz(){return ue("dugout_player_detail_v2")?M(hx):M(xV)}function bz({setActiveTab:t}){return ue("dugout_session_detail_v2")?M(px):M(IV,{setActiveTab:t})}function Sz({setActiveTab:t}){return ue("dugout_club_documents_v2")?M(gx,{setActiveTab:t}):M(yV,{setActiveTab:t})}function Ez({setActiveTab:t}){return ue("dugout_team_detail_v2")?M(mx):M(NV,{setActiveTab:t})}function wz({setActiveTab:t}){return ue("dugout_fixture_detail_v2")?M(_x,{setActiveTab:t}):M(EV,{setActiveTab:t})}function jv(){return ue("v2-library")?M(g6):M(d6)}function Uv(){return ue("v2-library")?M(m6):M(f6)}function Bv(){return ue("v2-library")?M(_6):M(h6)}function Hv(){return ue("v2-library")?M(v6):M(p6)}function xz({setActiveTab:t}){return ue("billing_v2")?M(vx,{setActiveTab:t}):M(_V,{setActiveTab:t})}function Tz({setActiveTab:t}){return ue("billing_v2")?M(yx,{setActiveTab:t}):M(vV,{setActiveTab:t})}function Iz({setActiveTab:t}){return ue("v2-account-profile")?M(PV):M(mV,{setActiveTab:t})}function Oz({setActiveTab:t}){return ue("v2-account-profile")?M(DV):M(qV,{setActiveTab:t})}function kz(){const{pathname:t}=Mt(),e=F1();return b.useLayoutEffect(()=>{if(e!=="POP"||t!=="/")return;const n=window.history.scrollRestoration;window.history.scrollRestoration="manual",window.scrollTo(0,0);const r=window.requestAnimationFrame(()=>window.scrollTo(0,0)),s=window.setTimeout(()=>{window.scrollTo(0,0),window.history.scrollRestoration=n},750);return()=>{window.cancelAnimationFrame(r),window.clearTimeout(s),window.history.scrollRestoration=n}},[t,e]),b.useEffect(()=>{e!=="POP"&&window.scrollTo(0,0)},[t,e]),null}const Cz=({activeTab:t,setActiveTab:e})=>{const n=Oe(u=>{var c,d;return((d=(c=u==null?void 0:u.user)==null?void 0:c.userPermission)==null?void 0:d.inProgressTransaction)??{}}),r=Oe(u=>u.register),s=yo(),i=Mt(),o=yu(),a=ox("parent_portal");k4(),u4(),b.useEffect(()=>{if(!an(n)){const u={plan:JSON.parse(n==null?void 0:n.plan),duration:(n==null?void 0:n.duration)!=="month",userSliderCount:parseInt(n==null?void 0:n.userCount)};s("/upgrade-subscription",{state:u})}},[i.pathname]);const l=()=>{var u;switch(r==null?void 0:r.flow){case"pricing":return{path:"",state:{}};case"getStarted":return an(r.plan)?{path:"/pricing",state:{}}:((u=r==null?void 0:r.plan)==null?void 0:u.id)===1&&{path:"",state:{}};default:return{path:"/engine-room/home",state:{}}}};return v.jsxs(v.Fragment,{children:[v.jsx(kz,{}),v.jsxs(M1,{children:[v.jsx($,{path:"*",element:v.jsx(Le,{to:"/engine-room/home",replace:!0})}),v.jsx($,{path:"error",element:M(j6)}),[{path:"terms-and-conditions",target:ZV},{path:"privacy-policy",target:zV},{path:"verify-email",target:n6},{path:"tutorial-videos",target:JV}].map(({path:u,target:c})=>v.jsx($,{path:u,element:M(c)},u)),v.jsx($,{path:"trailer",element:v.jsx(Fv,{})}),v.jsx($,{path:"trailer/:title",element:v.jsx(Fv,{})}),v.jsx($,{path:"pricing",element:v.jsx(Z6,{})}),v.jsx($,{path:"auth/impersonate",element:M(r6)}),v.jsx($,{path:"r/:token",element:M(N6)}),!1,v.jsx($,{path:"",element:v.jsx($c,{redirectTo:"/dugout/dashboard",requireCompletedOnboarding:!0,children:v.jsx(Y6,{children:v.jsx(J6,{})})})}),v.jsx($,{path:"v2-preview",element:Ss(xx)}),v.jsx($,{path:"restricted",element:M(c6)}),v.jsx($,{path:"register",element:v.jsx($c,{redirectTo:l().path,state:l().state,children:M(i6)})}),["login","reset-password"].map(u=>v.jsx($,{path:u,element:v.jsx($c,{redirectTo:o.club_id?"/engine-room/home":"/on-boarding",children:M(u==="login"?XV:WV)})},u)),v.jsx($,{path:"on-boarding",element:v.jsx(Fc,{children:M(VV)})}),["messages","messages/:conversationId"].map(u=>v.jsx($,{element:v.jsx(Fc,{children:v.jsx(Mv,{children:v.jsx(Pv,{children:M(Dv,{activeTab:t})})})}),children:v.jsx($,{path:u,element:Ss(gV)})},u)),v.jsxs($,{path:"/",element:v.jsx(Fc,{children:v.jsx(Mv,{children:v.jsx(Pv,{children:v.jsx(L4,{children:M(Dv,{activeTab:t})})})})}),children:[v.jsx($,{path:"/",element:v.jsx(Le,{replace:!0,to:an(o)?"/":"/engine-room/home"})}),v.jsx($,{path:"dashboard",element:v.jsx(Le,{replace:!0,to:"/dugout/dashboard"})}),v.jsx($,{path:"dugout",element:v.jsx(Le,{replace:!0,to:"/dugout/dashboard"})}),v.jsxs($,{path:"/",element:v.jsx(W6,{children:v.jsx(gr,{})}),children:[v.jsx($,{path:"live-stats/:id?",element:M(AV)}
121),v.jsx($,{path:"dugout/fixture/:id",element:v.jsx(wz,{setActiveTab:e})}),v.jsx($,{path:"dugout/fixture/:id/v2",element:M(_x,{setActiveTab:e})}),v.jsx($,{path:"dugout/dashboard",element:v.jsx(fz,{setActiveTab:e})}),v.jsx($,{path:"dugout/dashboard/v2",element:M(fx,{setActiveTab:e})}),v.jsx($,{path:"dugout/calendar",element:v.jsx(pz,{setActiveTab:e})}),v.jsx($,{path:"dugout/calendar/v2",element:M(Ix)}),v.jsx($,{path:"dugout/teams",element:v.jsx(tz,{setActiveTab:e})}),v.jsx($,{path:"dugout/teams/v2",element:M(lx)}),v.jsx($,{path:"dugout/players",element:v.jsx(nz,{setActiveTab:e})}),v.jsx($,{path:"dugout/players/v2",element:M(ux)}),v.jsx($,{path:"dugout/fixtures",element:v.jsx(cz,{setActiveTab:e})}),v.jsx($,{path:"dugout/fixtures/v2",element:M(cx)}),v.jsx($,{path:"dugout/sessions",element:v.jsx(dz,{setActiveTab:e})}),v.jsx($,{path:"dugout/sessions/v2",element:M(dx,{setActiveTab:e})}),v.jsx($,{path:"dugout/session/:id",element:v.jsx(bz,{setActiveTab:e})}),v.jsx($,{path:"dugout/session/:id/v2",element:M(px)}),v.jsx($,{path:"dugout/player/:id",element:v.jsx(yz,{})}),v.jsx($,{path:"dugout/player/:id/v2",element:M(hx)}),v.jsx($,{path:"dugout/club-documents",element:v.jsx(Sz,{setActiveTab:e})}),v.jsx($,{path:"dugout/club-documents/v2",element:M(gx,{setActiveTab:e})}),v.jsx($,{path:"dugout/team/:id",element:v.jsx(Ez,{setActiveTab:e})}),v.jsx($,{path:"dugout/team/:id/v2",element:M(mx)}),a&&v.jsx($,{path:"dugout/parent-messages",element:v.jsx(rz,{setActiveTab:e})}
121),a&&v.jsx($,{path:"dugout/parent-messages/:threadId",element:v.jsx(sz,{setActiveTab:e})}),v.jsx($,{path:"dugout/team-messages",element:Ss(Lv)}),v.jsx($,{path:"dugout/team-messages/:teamId",element:Ss(Lv)})]}),v.jsx($,{path:"engine-room/plan-required",element:v.jsx(jV,{})}),v.jsxs($,{path:"/",element:v.jsx(B6,{children:v.jsx(gr,{})}),children:[v.jsx($,{path:"engine-room",element:v.jsx(Le,{replace:!0,to:"/engine-room/home"})}),v.jsx($,{path:"engine-room/home",element:v.jsx(K6,{})}),v.jsx($,{path:"engine-room/home/v2",element:M(bx)}),v.jsx($,{path:"categories/:id",element:v.jsx(X6,{})}),v.jsx($,{path:"categories/:id/v2",element:v.jsx(kx,{})}),["personal","club","shared"].map(u=>v.jsx($,{path:`/playlists/${u}`,element:v.jsx(lz,{})},u)),["personal","club","shared"].map(u=>v.jsx($,{path:`/playlists/${u}/v2`,element:M(Ex)},`${u}-v2`)),v.jsx($,{path:"collections",element:v.jsx($v,{})}),v.jsx($,{path:"collections/:title",element:v.jsx($v,{})}),v.jsx($,{path:"collections/v2/preview",element:M(Sx)}),v.jsx($,{path:"playlists/:id",element:v.jsx(uz,{})}),v.jsx($,{path:"playlists/:id/v2",element:M(wx)}),v.jsx($,{path:"engine-room/build-session",element:v.jsx(Q6,{})}),v.jsx($,{path:"engine-room/my-sessions",element:v.jsx(ez,{})}),v.jsx($,{path:"engine-room/shared-session/:id",element:M(E6)}),v.jsx($,{path:"engine-room/auto-builder/v2",element:M(Mc)}),v.jsx($,{path:"the-gaffer",element:M(Mc)}),v.jsx($,{path:"the-gaffer/templates",element:M(Mc)})]}),v.jsxs($,{path:"/",element:v.jsx(H6,{children:v.jsx(gr,{})}),children:[v.jsx($,{path:"replay/plan-required",element:v.jsx(iz,{})}),v.jsx($,{path:"replay",element:v.jsx(Le,{replace:!0,to:"/replay/home"})}),v.jsx($,{path:"replay/home",element:v.jsx(Sa,{})}),v.jsx($,{path:"replay/shared",element:v.jsx(Sa,{})}),v.jsx($,{path:"replay/library",element:v.jsx(Sa,{})}),v.jsx($,{path:"replay/video/:id",element:v.jsx(oz,{})}),v.jsx($,{path:"replay/reel/:playerId",element:M(R6)}),v.jsx($,{path:"replay/playlists",element:v.jsx(Sa,{})}),v.jsx($,{path:"replay/playlist/:id",element:M(A6)})]}),v.jsx($,{path:"session-planner/plan-required",element:M(KV)}),v.jsxs($,{path:"/",element:v.jsx(V6,{children:v.jsx(gr,{})}),children:[v.jsx($,{path:"session-planner",element:v.jsx(Le,{replace:!0,to:"/session-planner/my-library"})}),v.jsx($,{path:"session-planner/new",element:M(CV)}),v.jsx($,{path:"session-planner/:type",element:v.jsx(gz,{})}),v.jsx($,{path:"session-planner/practice-detail/:id",element:v.jsx(_z,{})}),v.jsx($,{path:"session-planner/session-detail/:id",element:v.jsx(mz,{})})]}),v.jsx($,{path:"/",element:v.jsx(q6,{children:v.jsx(gr,{})}),children:v.jsxs($,{element:v.jsx(HF,{}),children:[v.jsx($,{path:"global-library/home",element:v.jsx(jv,{})}),v.jsx($,{path:"global-library/activities-drills",element:v.jsx(Uv,{})}),v.jsx($,{path:"global-library/sessions/:type",element:v.jsx(Bv,{})}),v.jsx($,{path:"global-library/more-content",element:M(Nv)}),v.jsx($,{path:"global-library/my-submission",element:v.jsx(Hv,{})}),v.jsx($,{path:"engine-room/library",element:v.jsx(Le,{replace:!0,to:"/engine-room/library/home"})}),v.jsx($,{path:"engine-room/library/home",element:v.jsx(jv,{})}),v.jsx($,{path:"engine-room/library/activities-drills",element:v.jsx(Uv,{})}),v.jsx($,{path:"engine-room/library/sessions/:type",element:v.jsx(Bv,{})}),v.jsx($,{path:"engine-room/library/more-content",element:M(Nv)}),v.jsx($,{path:"engine-room/library/my-submission",element:v.jsx(Hv,{})})]})}),v.jsx($,{path:"replay/*",element:v.jsx(z6,{})}),v.jsx($,{path:"profile",element:v.jsx(Oz,{setActiveTab:e})}),v.jsx($,{path:"saved",element:v.jsx(hz,{setActiveTab:e})}),v.jsx($,{path:"saved/v2/preview",element:M(Ox,{setActiveTab:e})}),v.jsx($,{path:"overview",element:M(QV,{setActiveTab:e})}),v.jsx($,{path:"extend-season",element:M(T6)}),v.jsx($,{path:"playmaker-upgrade",element:v.jsx(Le,{replace:!0,to:"/dugout/dashboard"})}),v.jsxs($,{path:"/",element:v.jsx(gr,{}),children:[v.jsx($,{path:"users",element:v.jsx(az,{setActiveTab:e})}),v.jsx($,{path:"account",element:v.jsx(Iz,{setActiveTab:e})}),v.jsx($,{path:"billing",element:v.jsx(xz,{setActiveTab:e})}),v.jsx($,{path:"billing/v2",element:M(vx,{setActiveTab:e})}),v.jsx($,{path:"upgrade-subscription",element:v.jsx(Tz,{setActiveTab:e})}),v.jsx($,{path:"upgrade-subscription/v2",element:M(yx,{setActiveTab:e})})]})]})]})]})},Rz=[{key:"teamplayer",label:"Players",enum:"PLAYER",Icon:nV},{key:"team",label:"Teams",enum:"TEAM",Icon:sV},{key:"fixture",label:"Fixtures",enum:"FIXTURE",Icon:Z4},{key:"session",label:"Sessions",enum:"SESSION",Icon:U4},{key:"user",label:"Coaches",enum:"COACH",Icon:eV},{key:"video",label:"Videos",enum:"VIDEO",Icon:oV},{key:"collection",label:"Collections",enum:"COLLECTION",Icon:K4}],Az=(t,e)=>{switch(t){case"teamplayer":return`${e.player_name} ${e.player_surname}`;case"team":return e.name||e.searchTitle||"";case"fixture":return e.opposition?`vs ${e.opposition}`:e.searchTitle||"";case"session":return e.session_name||e.searchTitle||"";case"user":return e.username||e.searchTitle||"";default:return e.searchTitle||""}},Vv=(t,e)=>{switch(t){case"teamplayer":return e.searchTitle||"";case"fixture":return e.searchTitle||"";case"session":return e.searchTitle||"";case"user":return e.searchTitle||"";default:return""}};function Pz(t){return{id:t.id,name:t.player_name,surname:t.player_surname,teamIds:t.team_id!=null?[t.team_id]:[]}}const Dz=(t,e)=>{switch(t){case"team":return`/dugout/team/${e.id}`;case"fixture":return`/dugout/fixture/${e.id}`;case"session":return`/dugout/session/${e.id}`;case"user":return"/users";case"video":return`/collections?${Av(e.title||e.searchTitle||"",e.id,e.id,"video")}`;case"collection":return`/collections?${Av(e.title||e.searchTitle||"",e.id,e.id,e.content_type||"collection")}`;default:return null}},Nz=()=>{var C;const[t,e]=b.useState(!1),[n,r]=b.useState(""),[s,i]=b.useState(0),o=b.useRef(null),a=b.useRef(null),l=yo(),u=Oe(S=>S==null?void 0:S.club),c=(u==null?void 0:u.club_id)??(u==null?void 0:u.id),{data:d}=Kc(j1,{variables:{club_id:c?Number(c):0},skip:!c,fetchPolicy:"cache-first"}),f=b.useMemo(()=>{var S;if(!((S=d==null?void 0:d.getPositions)!=null&&S.success))return[];try{const w=d.getPositions.data;return typeof w=="string"?JSON.parse(w)||[]:w||[]}catch{return[]}},[d]),[p,{data:h,loading:g}]=nT(U1,{fetchPolicy:"no-cache",errorPolicy:"ignore"});b.useEffect(()=>{const S=A=>{(A.metaKey||A.ctrlKey)&&A.key==="k"&&(A.preventDefault(),e(!0))},w=()=>e(!0);return window.addEventListener("keydown",S),window.addEventListener("open-global-search",w),()=>{window.removeEventListener("keydown",S),window.removeEventListener("open-global-search",w)}},[]),b.useEffect(()=>{t||(r(""),i(0))},[t]);const _=b.useCallback(F3(S=>{S.trim().length<2||!(u!=null&&u.id)||p({variables:{searchInput:{keyWord:S.trim(),club_id:u.id,searchIn:["PLAYER","TEAM","FIXTURE","SESSION","COACH","VIDEO","COLLECTION"],limit:5}}})},300),[u==null?void 0:u.id,p]),m=S=>{const w=S.target.value;r(w),i(0),_(w)},y=[];if((C=h==null?void 0:h.keyWordsSearch)!=null&&C.success&&n.trim().length>=2){const S=h.keyWordsSearch.data;Rz.forEach(w=>{const A=S==null?void 0:S[w.key];A!=null&&A.length&&A.forEach(P=>{y.push({...P,_category:w.key,_catLabel:w.label,_Icon:w.Icon})})})}const E=b.useCallback(S=>{if(S._category==="teamplayer"){const A=Pz(S);l(`/dugout/player/${A.id}`,{state:{player:A,positions:f}}),e(!1);return}const w=Dz(S._category,S);w&&(l(w),e(!1))},[l,f]),T=S=>{S.key==="ArrowDown"?(S.preventDefault(),i(w=>Math.min(w+1,y.length-1))):S.key==="ArrowUp"?(S.preventDefault(),i(w=>Math.max(w-1,0))):S.key==="Enter"&&y[s]?(S.preventDefault(),E(y[s])):S.key==="Escape"&&e(!1)};b.useEffect(()=>{if(a.current){const S=a.current.querySelector(`[data-index="${s}"]`);S==null||S.scrollIntoView({block:"nearest"})}},[s]);const I={};
121y.forEach((S,w)=>{I[S._category]||(I[S._category]={label:S._catLabel,Icon:S._Icon,items:[]}),I[S._category].items.push({...S,_flatIndex:w})});const x=y.length>0,R=n.trim().length>=2&&!g;return v.jsx(B1,{open:t,onOpenChange:e,children:v.jsxs(H1,{showClose:!1,"aria-describedby":void 0,onOpenAutoFocus:S=>{var w;S.preventDefault(),(w=o.current)==null||w.focus()},className:"top-[12%] left-[50%] translate-x-[-50%] translate-y-0 w-[calc(100%-2rem)] max-w-[580px] max-h-[70vh] gap-0 p-0 overflow-hidden rounded-sm border-hairline bg-card-hi font-body",children:[v.jsx(V1,{className:"sr-only",children:"Search"}),v.jsxs("div",{className:"flex items-center gap-3 px-4 h-14 border-b border-hairline",children:[g?v.jsx(z1,{className:"h-4 w-4 text-subtle animate-spin shrink-0"}):v.jsx(J4,{className:"h-4 w-4 text-subtle shrink-0"}),v.jsx("input",{ref:o,type:"text",placeholder:"Search players, teams, fixtures, sessions...",value:n,onChange:m,onKeyDown:T,autoComplete:"off",className:"flex-1 bg-transparent border-0 outline-none font-body text-[15px] text-fg placeholder:text-subtle"}),n?v.jsx("button",{type:"button",onClick:()=>{var S;r(""),(S=o.current)==null||S.focus()},"aria-label":"Clear search",className:"text-subtle hover:text-fg bg-transparent border-0 cursor-pointer outline-none shrink-0",children:v.jsx(jf,{className:"h-4 w-4"})}):null]}),v.jsx("div",{ref:a,className:"overflow-y-auto",style:{maxHeight:"calc(70vh - 112px)"},children:n.trim().length<2?v.jsx("div",{className:"py-10 px-4 text-center",children:v.jsx("p",{className:"font-body text-[13px] text-muted",children:"Type at least 2 characters to search"})}):R&&!x?v.jsx("div",{className:"py-10 px-4 text-center",children:v.jsxs("p",{className:"font-body text-[13px] text-muted",children:["No results found for â",n,"â"]})}):v.jsx("div",{className:"py-2",children:Object.entries(I).map(([S,w])=>v.jsxs("div",{children:[v.jsx("div",{className:"px-4 pt-3 pb-1 font-mono text-[10px] uppercase tracking-wide12 text-subtle",children:w.label}),w.items.map(A=>{const P=w.Icon,O=A._flatIndex===s;return v.jsxs("button",{type:"button","data-index":A._flatIndex,onClick:()=>E(A),className:yp("w-full flex items-center gap-3 mx-0 px-4 py-2.5 text-left bg-transparent border-0 cursor-pointer outline-none",O?"bg-row-hover":"hover:bg-row-hover"),children:[v.jsx(P,{className:yp("h-4 w-4 shrink-0",O?"text-accent-2":"text-subtle")}),v.jsxs("span",{className:"flex flex-col flex-1 min-w-0",children:[v.jsx("span",{className:"font-body font-semibold text-[14px] text-fg truncate",children:Az(S,A)}),Vv(S,A)?v.jsx("span",{className:"font-body text-[12px] text-muted truncate",children:Vv(S,A)}):null]}),O&&v.jsx(z4,{className:"h-3.5 w-3.5 text-subtle shrink-0"})]},`${S}-${A.id}`)})]},S))})}),v.jsxs("div",{className:"flex items-center gap-1.5 px-4 py-2.5 border-t border-hairline",children:[v.jsx("kbd",{className:"font-mono text-[10px] text-subtle bg-bg-raised border border-hairline rounded-[3px] px-1.5 py-0.5",children:"ââ"}),v.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wide10 text-subtle",children:"navigate"}),v.jsx("kbd",{className:"font-mono text-[10px] text-subtle bg-bg-raised border border-hairline rounded-[3px] px-1.5 py-0.5 ml-2",children:"âµ"}),v.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wide10 text-subtle",children:"select"}),v.jsx("kbd",{className:"font-mono text-[10px] text-subtle bg-bg-raised border border-hairline rounded-[3px] px-1.5 py-0.5 ml-2",children:"esc"}),v.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wide10 text-subtle",children:"close"})]})]})})},Lz=b.lazy(()=>j(()=>import("./GlobalSearch-BTGixg00.js"),__vite__mapDeps([603,1,4,5,6,12,11,13,19])));function Mz(){return ue("v2-shell")?v.jsx(Nz,{}):v.jsx(b.Suspense,{fallback:null,children:v.jsx(Lz,{})})}const Fz=aT({palette:{primary:{main:"#2F80ED",dark:"#2059a5",light:"#5899f0"},divider:"#919EAB3d",text:{primary:"#212B36",secondary:"#637381",tertiary:"#13335F",quaternary:"#C4CDD5"}},typography:{fontFamily:'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},border:"#919EAB52",legend:"#919EAB",sidebar:{text:"#232b35",svg:"#667380"},button:{backgroundColor:{primary:"#919eab14",secondary:"#919eab33"},color:{primary:"#003768"},borderColor:{primary:"#2f80ed7a"}},backgroundColor:{light:"#fff",topBar:"#292F4C",chip:"#F9FAFB",body:"#F4F6F8",ticker:"#4E5C71",table:"#2f80ed14",tooltip:"#1A222F",skeleton:"#DFE3
121E8"},availability:{testing:"#FDBC40",available:"#66BB6A",unavailable:"#EF9A9A",other:"#ef681a",disabled:"#BDBDBD"},status:{complete:"#66BB6A",incomplete:"#EF9A9A"},performance:{outstanding:"#205823",excellent:"#2E7D32",veryGood:"#ABCBAD",good:"#FDBC40",fair:"#FEE4B3",notGreat:"#F44336",poor:"#AB2F26"},playerCategories:{goalkeepers:{color:"#00008B",backgroundColor:"#ADD8E63d"},defenders:{color:"#154f30",backgroundColor:"#90EE903d"},midfielders:{color:"#FFA500",backgroundColor:"#FFBF003d"},attackers:{color:"#FF0000",backgroundColor:"#FFC0CB3d"}},buttonSelect:{primary:{backgroundColor:"#2f80ed29"},secondary:{backgroundColor:"#FAE4BF"}},chip:{win:{color:"#205823",backgroundColor:"#2e7d3229"},loss:{color:"#AB2F26",backgroundColor:"#f4433629"},draw:{color:"#215AA6",backgroundColor:"#2f80ed29"},away:{color:"#212B36",backgroundColor:"#919EAB29"},trap:{color:"#1D2135",backgroundColor:"#292f4c29"},attack:{color:"#006C9C",backgroundColor:"#00b8d929"},admin:{color:"#fff",backgroundColor:"#292F4C"},pending:{color:"#B1842D",backgroundColor:"#fdbc4029"},failed:{color:"#AB2F26",backgroundColor:"#f4433629"},red:{color:"#AB2F26",backgroundColor:"#f4433629"},green:{color:"#205823",backgroundColor:"#2e7d3229"},gray:{color:"#212B36",backgroundColor:"#919EAB29"},blue:{color:"#215AA6",backgroundColor:"#2f80ed29"},yellow:{color:"#B1842D",backgroundColor:"#fdbc4029"},green_minimal:{color:"#007867",backgroundColor:"#D5F3E2"},yellow_minimal:{color:"#855e17",backgroundColor:"#FBE1B7"},blue_minimal:{color:"#006C9C",backgroundColor:"#D5F1F7"},red_minimal:{color:"#B71D18",backgroundColor:"#FBE1DB"},orange:{color:"#EF681A",backgroundColor:"#FEE4B3"},parent:{color:"#6B2FAB",backgroundColor:"#9c27b029"}},progress:{green_minimal:{color:"#2AA76F",backgroundColor:"#C2E7DB"},yellow_minimal:{color:"#FBAB00",backgroundColor:"#FCE8C9"},blue_minimal:{color:"#2FB8D9",backgroundColor:"#C2EBF4"},red_minimal:{color:"#F95630",backgroundColor:"#FCD4CD"}},card:{yellow:"#FDBC40",red:"#F44336",gray:"#e0e0e0",darkGray:"#bdbdbd"},error:{container:{backgroundColor:"#FBB4AF"},text:{primaryColor:"#621B16",secondaryColor:"#AB2F26"},button:{backgroundColor:"#F44336"}},primary:{lighter:"#D0E4FF",darker:"#00367F"}});function $z(){b.useEffect(()=>{const t=()=>{if(document.body.style.pointerEvents!=="none")return;document.querySelector('[data-radix-popper-content-wrapper],[data-state="open"][role="dialog"],[data-state="open"][role="alertdialog"],[data-state="open"][role="menu"],[data-state="open"][role="listbox"]')||(document.body.style.pointerEvents="")};return window.addEventListener("pointermove",t,!0),window.addEventListener("pointerdown",t,!0),window.addEventListener("focus",t,!0),document.addEventListener("visibilitychange",t,!0),()=>{window.removeEventListener("pointermove",t,!0),window.removeEventListener("pointerdown",t,!0),window.removeEventListener("focus",t,!0),document.removeEventListener("visibilitychange",t,!0)}},[])}function jz(){return!Oe(t=>{var e;return!!((e=t.club)!=null&&e.v3_disabled)})}const Uz=()=>{const t=jz();return b.useEffect(()=>{if(t)return document.documentElement.setAttribute("data-v3","true"),()=>{document.documentElement.removeAttribute("data-v3")}},[t]),t},Bz=By(Ph)(()=>({fontFamily:'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px","&.notistack-MuiContent-success":{backgroundColor:"#36873D"},"&.notistack-MuiContent-error":{backgroundColor:"#B62916"},"&.notistack-MuiContent-warning":{backgroundColor:"#B7791F"},"&.notistack-MuiContent-info":{backgroundColor:"#2B6CB0"},"&.notistack-MuiContent-default":{backgroundColor:"#2D3748"}})),Hz=By(Ph)(()=>({fontFamily:"var(--font-body)",fontSize:"14px",flexWrap:"nowrap","@media (max-width: 640px)":{minWidth:"auto",padding:"6px 8px 6px 14px"},"&.notistack-MuiContent-success":{backgroundColor:"var(--ok)",color:"#ffffff"},"&.notistack-MuiContent-error":{backgroundColor:"var(--danger)",color:"#ffffff"},"&.notistack-MuiContent-warning":{backgroundColor:"var(--warn)",color:"#0a0810"},"&.notistack-MuiContent-info":{backgroundColor:"var(--accent-2)",color:"#0a0810"},"&.notistack-MuiContent-default":{backgroundColor:"var(--bg-raised)",color:"var(--fg)"}}));function Vz(){const[t,e]=b.useState(()=>window.location.href);$z(),Uz();const r=ue("v2-shell")?Hz:Bz;return v.jsx(lT,{theme:Fz,children:v.jsxs(d2,{maxSnack:1,style:{},Components:{success:r,error:r,warning:r,info:r,default:r},children:[v.jsx(Cz,{activeTab:t,setActiveTab:e}),v.jsx(Mz,{})]})})}function zz(t,e){if(t.startsWith("relative-")){const n=t.split("-")[1],s=Yz(e).getBoundingClientRect();if(n==="top")return{position:"absolute",top:s.top-10,left:s.left+s.width/2,transform:"translate(-50%, -100%)"};if(n==="bottom")return{position:"absolute",top:s.bottom+10,left:s.left+s.width/2,transform:"translateX(-50%)"};if(n==="left")return{position:"absolute",top:s.top+s.height/2,left:s.left-10,transform:"translate(-100%, -50%)"};if(n==="right")return{position:"absolute",top:s.top+s.height/2,left:s.right+10,transform:"translateY(-50%)"};throw new Error(`Unknown relative location: ${n}`)}else{if(t==="absolute-center")return{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"};if(t==="absolute-top-center")return{position:"absolute",top:"10px",left:"50%",transform:"translateX(-50%)"};if(t==="absolute-bottom-right")return{position:"absolute",bottom:"10px",right:"10px"};if(t==="absolute-bottom-left")return{position:"absolute",bottom:"10px",left:"10px"};if(t==="absolute-top-right")return{position:"absolute",top:"10px",right:"10px"};if(t==="absolute-top-left")return{position:"absolute",top:"10px",left:"10px"};throw new Error(`Unknown location: ${t}`)}}function qz(t){if(t.startsWith("relative-")){const e=t.split("-")[1];if(e==="top")return{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",borderLeft:"10px solid transparent",borderRight:"10px solid transparent",borderTop:"10
121px solid white"};if(e==="bottom")return{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",borderLeft:"10px solid transparent",borderRight:"10px solid transparent",borderBottom:"10px solid white"};if(e==="left")return{position:"absolute",top:"50%",left:"100%",transform:"translateY(-50%)",borderTop:"10px solid transparent",borderBottom:"10px solid transparent",borderLeft:"10px solid white"};if(e==="right")return{position:"absolute",top:"50%",right:"100%",transform:"translateY(-50%)",borderTop:"10px solid transparent",borderBottom:"10px solid transparent",borderRight:"10px solid white"};throw new Error(`Unknown relative location: ${e}`)}}function Wz(t){return`ph-popup-${t}`}function Gz(t){return!localStorage.getItem(Wz(t))}function Kz(t,e,n,r,s=null){s?r.capture(t,{popupFlag:e,popupPayload:n,popupButtonPressed:s}):r.capture(t,{flag:e,payload:n})}function zv(t,e,n,r,s){n(!1),e.primaryButtonURL&&r==="primary"&&window.open(e.primaryButtonURL,"_blank")}function Yz(t){const e=document.querySelector(t);if(!e)throw new Error(`Could not find element with CSS selector: ${t}`);return e}function Jz(t,e,n,r,s,i,o){if(!(!t||!t.location)){n(t);try{s(zz(t.location,t.locationCSSSelector))}catch(a){console.error(a);return}Gz(e)&&(r(e),i(!0),Kz("popup shown",e,t,o))}}function Xz(){const[t,e]=b.useState(!1),[n,r]=b.useState({}),[s,i]=b.useState({}),[o,a]=b.useState(null),l=Co(),u=OM();return b.useEffect(()=>{if(u){for(const c of u)if(c.startsWith("popup-")&&(l!=null&&l.isFeatureEnabled(c))){const d=l==null?void 0:l.getFeatureFlagPayload(c);Jz(d,c,r,a,i,e,l);return}}},[u,l]),v.jsxs("div",{className:"popup",style:{display:t?"flex":"none",...s},children:[v.jsxs("div",{className:"contents",children:[(n==null?void 0:n.title)&&v.jsx("h2",{className:"title",children:n.title}),(n==null?void 0:n.body)&&v.jsx("div",{className:"body",dangerouslySetInnerHTML:{__html:n.body}})]}),v.jsx("div",{className:"bottom-section",children:v.jsxs("div",{className:"buttons",style:{justifyContent:n.primaryButtonText?"space-between":"center"},children:[(n==null?void 0:n.secondaryButtonText)&&v.jsx("button",{className:"popup-book-button",onClick:()=>zv(o,n,e,"secondary"),children:n.secondaryButtonText}),n.primaryButtonText&&v.jsx("button",{className:"popup-book-button",onClick:()=>zv(o,n,e,"primary"),children:n.primaryButtonText})]})}),(n==null?void 0:n.location)&&v.jsx("div",{style:{...qz(n.location)}})]})}var jc={};const re=t=>typeof t=="string",wi=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},qv=t=>t==null?"":""+t,Zz=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},Qz=/###/g,Wv=t=>t&&t.indexOf("###")>-1?t.replace(Qz,"."):t,Gv=t=>!t||re(t),Ki=(t,e,n)=>{const r=re(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Gv(t))return{};const i=Wv(r[s]);!t[i]&&n&&(t[i]=new n),Object.prototype.hasOwnProperty.call(t,i)?t=t[i]:t={},++s}return Gv(t)?{}:{obj:t,k:Wv(r[s])}},Kv=(t,e,n)=>{const{obj:r,k:s}=Ki(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=Ki(t,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=Ki(t,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},e8=(t,e,n,r)=>{const{obj:s,k:i}=Ki(t,e,Object);s[i]=s[i]||[],s[i].push(n)},Vl=(t,e)=>{const{obj:n,k:r}=Ki(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},t8=(t,e,n)=>{const r=Vl(t,n);return r!==void 0?r:Vl(e,n)},Cx=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?re(t[r])||t[r]instanceof String||re(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):Cx(t[r],e[r],n):t[r]=e[r]);return t},pr=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var n8={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const r8=t=>re(t)?t.replace(/[&<>"'\/]/g,e=>n8[e]):t;class s8{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const i8=[" ",",","?","!",";"],o8=new s8(20),a8=(t,e,n)=>{e=e||"",n=n||"";const r=i8.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=o8.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(t);if(!i){const o=t.indexOf(n);o>0&&!s.test(t.substring(0,o))&&(i=!0)}return i},Sf=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let s=t;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let l=i;l<r.length;++l)if(l!==i&&(a+=n),a+=r[l],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<r.length-1)continue;i+=l-i+1;break}s=o}return s},mo=t=>t==null?void 0:t.replace(/_/g,"-"),l8={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var n,r;(r=(n=console==null?void 0:console[t])==null?void 0:n.apply)==null||r.call(n,console,e)}};class zl{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||l8,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}
vendor: 3,910 bytes, line 121
121forward(e,n,r,s){return s&&!this.debug?null:(re(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new zl(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new zl(this.logger,e)}}var cn=new zl;class Su{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s.apply(s,[e,...n])})}}class Yv extends Su{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,s={}){var u,c;const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,n],r&&(Array.isArray(r)?a.push(...r):re(r)&&i?a.push(...r.split(i)):a.push(r)));const l=Vl(this.data,a);return!l&&!n&&!r&&e.indexOf(".")>-1&&(e=a[0],n=a[1],r=a.slice(2).join(".")),l||!o||!re(r)?l:Sf((c=(u=this.data)==null?void 0:u[e])==null?void 0:c[n],r,i)}addResource(e,n,r,s,i={silent:!1}){const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,n];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."),s=n,n=a[1]),this.addNamespaces(n),Kv(this.data,a,s),i.silent||this.emit("added",e,n,r,s)}addResources(e,n,r,s={silent:!1}){for(const i in r)(re(r[i])||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,i,o={silent:!1,skipCopy:!1}){let a=[e,n];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let l=Vl(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Cx(l,r,i):l={...l,...r},Kv(this.data,a,l),o.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Rx={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(i=>{var o;e=((o=this.processors[i])==null?void 0:o.process(e,n,r,s))??e}),e}};const Ax=Symbol("i18next/PATH_KEY");function u8(){const t=[],e=Object.create(null);let n;return e.get=(r,s)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),s===Ax?t:(t.push(s),n=Proxy.revocable(r,e),n.proxy)},Proxy.revocable(Object.create(null),e).proxy}function xs(t,e){const{[Ax]:n}=t(u8()),r=(e==null?void 0:e.keySeparator)??".",s=(e==null?void 0:e.nsSeparator)??":";if(n.length>1&&s){const i=e==null?void 0:e.ns,o=Array.isArray(i)?i:null;if(o&&o.length>1&&o.slice(1).includes(n[0]))return`${n[0]}${s}${n.slice(1).join(r)}`}return n.join(r)}const Jv={},Uc=t=>!re(t)&&typeof t!="boolean"&&typeof t!="number";class ql extends Su{constructor(e,n={}){super(),Zz(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
121i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=cn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const s=this.resolve(e,r);if((s==null?void 0:s.res)===void 0)return!1;const i=Uc(s.res);return!(r.returnObjects===!1&&i)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!a8(e,r,s);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:re(i)?[i]:i};const u=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(s)}return{key:e,namespaces:re(i)?[i]:i}}translate(e,n,r){let s=typeof n=="object"?{...n}:n;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=xs(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]),e=e.map(O=>typeof O=="function"?xs(O,{...this.options,...s}):String(O));const i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],s),u=l[l.length-1];let c=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const d=s.lng||this.language,f=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return f?i?{res:`${u}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:a;const p=this.resolve(e,s);let h=p==null?void 0:p.res;const g=(p==null?void 0:p.usedKey)||a,_=(p==null?void 0:p.exactUsedKey)||a,m=["[object Number]","[object Function]","[object RegExp]"],y=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,T=s.count!==void 0&&!re(s.count),I=ql.hasDefaultValue(s),x=T?this.pluralResolver.getSuffix(d,s.count,s):"",R=s.ordinal&&T?this.pluralResolver.getSuffix(d,s.count,{ordinal:!1}):"",C=T&&!s.ordinal&&s.count===0,S=C&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${x}`]||s[`defaultValue${R}`]||s.defaultValue;let w=h;E&&!h&&I&&(w=S);const A=Uc(w),P=Object.prototype.toString.apply(w);if(E&&w&&A&&m.indexOf(P)<0&&!(re(y)&&Array.isArray(w))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,w,{...s,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(p.res=O,p.usedParams=this.getUsedParamsDetails(s),p):O}if(o){const O=Array.isArray(w),N=O?[]:{},V=O?_:g;for(const L in w)if(Object.prototype.hasOwnProperty.call(w,L)){const W=`${V}${o}${L}`;I&&!h?N[L]=this.translate(W,{...s,defaultValue:Uc(S)?S[L]:void 0,joinArrays:!1,ns:l}):N[L]=this.translate(W,{...s,joinArrays:!1,ns:l}),N[L]===W&&(N[L]=w[L])}h=N}}else if(E&&re(y)&&Array.isArray(h))h=h.join(y),h&&(h=this.extendTranslation(h,e,s,r));else{let O=!1,N=!1;!this.isValidLookup(h)&&I&&(O=!0,h=S),this.isValidLookup(h)||(N=!0,h=a);const L=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:h,W=I&&S!==h&&this.options.updateMissing;if(N||O||W){if(this.logger.log(W?"updateKey":"missingKey",d,u,a,W?S:h),o){const Z=this.resolve(a,{...s,keySeparator:!1});Z&&Z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let q=[];const ie=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ie&&ie[0])for(let Z=0;Z<ie.length;Z++)q.push(ie[Z]);else this.options.saveMissingTo==="all"?q=this.languageUtils.toResolveHierarchy(s.lng||this.language):q.push(s.lng||this.language);const ce=(Z,Ee,de)=>{var Ie;const _e=I&&de!==h?de:L;this.options.missingKeyHandler?this.options.missingKeyHandler(Z,u,Ee,_e,W,s):(Ie=this.backendConnector)!=null&&Ie.saveMissing&&this.backendConnector.saveMissing(Z,u,Ee,_e,W,s),this.emit
vendor: 4,325 bytes, line 121
121("missingKey",Z,u,Ee,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?q.forEach(Z=>{const Ee=this.pluralResolver.getSuffixes(Z,s);C&&s[`defaultValue${this.options.pluralSeparator}zero`]&&Ee.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ee.push(`${this.options.pluralSeparator}zero`),Ee.forEach(de=>{ce([Z],a+de,s[`defaultValue${de}`]||S)})}):ce(q,a,S))}h=this.extendTranslation(h,e,s,p,r),N&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${u}${c}${a}`),(N||O)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${a}`:a,O?h:void 0,s))}return i?(p.res=h,p.usedParams=this.getUsedParamsDetails(s),p):h}extendTranslation(e,n,r,s,i){var l,u;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=re(e)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const p=e.match(this.interpolator.nestingRegexp);d=p&&p.length}let f=r.replace&&!re(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,r.lng||this.language||s.usedLng,r),c){const p=e.match(this.interpolator.nestingRegexp),h=p&&p.length;d<h&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...p)=>(i==null?void 0:i[0])===p[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),r)),r.interpolation&&this.interpolator.reset()}const o=r.postProcess||this.options.postProcess,a=re(o)?[o]:o;return e!=null&&(a!=null&&a.length)&&r.applyPostProcessor!==!1&&(e=Rx.handle(a,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,s,i,o,a;return re(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?xs(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;s=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!re(n.count),p=f&&!n.ordinal&&n.count===0,h=n.context!==void 0&&(re(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(_=>{var m,y;this.isValidLookup(r)||(a=_,!Jv[`${g[0]}-${_}`]&&((m=this.utils)!=null&&m.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(a))&&(Jv[`${g[0]}-${_}`]=!0,this.logger.warn(`key "${s}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(E=>{var x;if(this.isValidLookup(r))return;o=E;const T=[c];if((x=this.i18nFormat)!=null&&x.addLookupKeys)this.i18nFormat.addLookupKeys(T,c,E,_,n);else{let R;f&&(R=this.pluralResolver.getSuffix(E,n.count,n));const C=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&R.indexOf(S)===0&&T.push(c+R.replace(S,this.options.pluralSeparator)),T.push(c+R),p&&T.push(c+C)),h){const w=`${c}${this.options.contextSeparator||"_"}${n.context}`;T.push(w),f&&(n.ordinal&&R.indexOf(S)===0&&T.push(w+R.replace(S,this.options.pluralSeparator)),T.push(w+R),p&&T.push(w+C))}}let I;for(;I=T.pop();)this.isValidLookup(r)||(i=I,r=this.getResource(E,_,I,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,s={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}
vendor: 15,005 bytes, line 121
121getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!re(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class Xv{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=cn.create("languageUtils")}getScriptPartFromCode(e){if(e=mo(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=mo(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(re(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return n=s;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),re(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return re(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):re(e)&&i(this.formatLanguageCode(e)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}const Zv={zero:0,one:1,two:2,few:3,many:4,other:5},Qv={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class c8{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=cn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=mo(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Qv;if(!e.match(/-|_/))return Qv;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,n)}return this.pluralRulesCache[i]=o,o}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Zv[s]-Zv[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,n,r={}){const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const ey=(t,e,n,r=".",s=!0)=>{let i=t8(t,e,n);return!i&&s&&re(n)&&(i=Sf(t,n,r),i===void 0&&(i=Sf(e,n,r))),i},Bc=t=>t.replace(/\$/g,"$$$$");class ty{constructor(e={}){var n;this.logger=cn.create("interpolator"),this.options=e,this.format=((n=e==null?void 0:e.interpolation)==null?void 0:n.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:_,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=n!==void 0?n:r8,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?pr(i):o||"{{",this.suffix=a?pr(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?pr(f):p||pr("$t("),this.nestingSuffix=h?pr(h):g||pr(")"),this.nestingOptionsSeparator=_||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,r,s){var p;let i,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=h=>{if(h.indexOf(this.formatSeparator)<0){const y=ey(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...s,...n,interpolationkey:h}):y}const g=h.split(this.formatSeparator),_=g.shift().trim(),m=g.join(this.formatSeparator).trim();return this.format(ey(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...s,...n,interpolationkey:_})};this.resetRegExp();const c=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=s==null?void 0:s.interpolation)==null?void 0:p.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>Bc(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Bc(this.escape(h)):Bc(h)}].forEach(h=>{for(a=0;i=h.regex.exec(e);){const g=i[1].trim();if(o=u(g),o===void 0)if(typeof c=="function"){const m=c(e,i,s);o=re(m)?m:""}else if(s&&Object.prototype.hasOwnProperty.call(s,g))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),o="";else!re(o)&&!this.useRawValueToEscape&&(o=qv(o));const _=h.safeValue(o);if(e=e.replace(i[0],_),d?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=i[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,n,r={}){let s,i,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${pr(c)}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,o);const p=f.match(/'/g),h=f.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!h||((h==null?void 0:h.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${c}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];o={...r},o=o.replace&&!re(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(l=s[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&!re(i))return i;re(i)||(i=qv(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),l.length&&(i=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}const d8=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},ny=t=>{const e={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=e[o];return a||(a=t(mo(r),s),e[o]=a),a(n)}},f8=t=>(e,n,r)=>t(mo(n),r)(e);class h8{constructor(e={}){this.logger=cn.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?ny:f8;this.formats={number:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i});return a=>o.format(a)}),currency:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i,style:"currency"});return a=>o.format(a)}),datetime:r((s,i)=>{const o=new Intl.DateTimeFormat(s,{...i});return a=>o.format(a)}),relativetime:r((s,i)=>{const o=new Intl.RelativeTimeFormat(s,{...i});return a=>o.format(a,i.range||"day")}),list:r((s,i)=>{const o=new Intl.ListFormat(s,{...i});return a=>o.format(a)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=ny(n)}format(e,n,r,s={}){const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,l)=>{var d;const{formatName:u,formatOptions:c}=d8(l);if(this.formats[u]){let f=a;try{const p=((d=s==null?void 0:s.formatParams)==null?void 0:d[s.interpolationkey])||{},h=p.locale||p.lng||s.locale||s.lng||r;f=this.formats[u](a,h,{...c,...s,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}const p8=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class g8 extends Su{constructor(e,n,r,s={}){var i,o;super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=cn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(e,n,r,s){const i={},o={},a={},l={};return e.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,c=!1,o[f]===void 0&&(o[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const s=e.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),!n&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const a={};this.queue.forEach(l=>{e8(l.loaded,[i],o),p8(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,s=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,i*2,o)},i);return}o(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,n,a)}prepareLoading(e,n,r={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();re(e)&&(e=this.languageUtils.toResolveHierarchy(e)),re(n)&&(n=[n]);const i=this.queueLoad(e,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,n,r,s,i,o={},a=()=>{}){var l,u,c,d,f;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const p={...o,isUpdate:i},h=this.backend.create.bind(this.backend);if(h.length<6)try{let g;h.length===5?g=h(e,n,r,s,p):g=h(e,n,r,s),g&&typeof g.then=="function"?g.then(_
121=>a(null,_)).catch(a):a(null,g)}catch(g){a(g)}else h(e,n,r,s,a,p)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const Hc=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),re(t[1])&&(e.defaultValue=t[1]),re(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ry=t=>{var e,n;return re(t.ns)&&(t.ns=[t.ns]),re(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),re(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((n=(e=t.supportedLngs)==null?void 0:e.indexOf)==null?void 0:n.call(e,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},Ea=()=>{},m8=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})},Px="__i18next_supportNoticeShown",_8=()=>!!(typeof globalThis<"u"&&globalThis[Px]||typeof process<"u"&&jc&&jc.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&jc),v8=()=>{typeof globalThis<"u"&&(globalThis[Px]=!0)},y8=t=>{var e,n,r,s,i,o,a,l,u,c,d,f,p;return!!(((r=(n=(e=t==null?void 0:t.modules)==null?void 0:e.backend)==null?void 0:n.name)==null?void 0:r.indexOf("Locize"))>0||((a=(o=(i=(s=t==null?void 0:t.modules)==null?void 0:s.backend)==null?void 0:i.constructor)==null?void 0:o.name)==null?void 0:a.indexOf("Locize"))>0||(u=(l=t==null?void 0:t.options)==null?void 0:l.backend)!=null&&u.backends&&t.options.backend.backends.some(h=>{var g,_,m;return((g=h==null?void 0:h.name)==null?void 0:g.indexOf("Locize"))>0||((m=(_=h==null?void 0:h.constructor)==null?void 0:_.name)==null?void 0:m.indexOf("Locize"))>0})||(d=(c=t==null?void 0:t.options)==null?void 0:c.backend)!=null&&d.projectId||(p=(f=t==null?void 0:t.options)==null?void 0:f.backend)!=null&&p.backendOptions&&t.options.backend.backendOptions.some(h=>h==null?void 0:h.projectId))};class Yi extends Su{constructor(e={},n){if(super(),this.options=ry(e),this.services={},this.logger=cn,this.modules={external:[]},m8(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(re(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=Hc();this.options={...r,...this.options,...ry(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!y8(this)&&!_8()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("ð i18next is made possible by our own product, Locize â consider powering your project with managed localization (AI, CDN, integrations): https://locize.com ð"),v8());const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?cn.init(s(this.modules.logger),this.options):cn.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=h8;const c=new Xv(this.options);this.store=new Yv(this.options.resources,this.options);const d=this.services;d.logger=cn,d.resourceStore=this.store,d.languageUtils=c,d.pluralResolver=new c8(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(d.formatter=s(u),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new ty(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new g8(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(p,...h)=>
vendor: 4,499 bytes, line 121
121{this.emit(p,...h)}),this.modules.languageDetector&&(d.languageDetector=s(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=s(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new ql(this.services,this.options),this.translator.on("*",(p,...h)=>{this.emit(p,...h)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ea),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const a=wi(),l=()=>{const u=(c,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(c,d)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,n=Ea){var i,o;let r=n;const s=re(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&a.indexOf(d)<0&&a.push(d)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,u=>l(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,n,r){const s=wi();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=Ea),this.services.backendConnector.reload(e,n,i=>{s.resolve(),r(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Rx.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=wi();this.emit("languageChanging",e);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(a,(...u)=>this.t(...u))},o=a=>{var c,d;!e&&!a&&this.services.languageDetector&&(a=[]);const l=re(a)?a:a&&a[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(re(a)?[a]:a);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),
vendor: 3,474 bytes, line 121
121(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{i(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,n,r){const s=(i,o,...a)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([i,o].concat(a)):l={...o},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=xs(l.keyPrefix,u));const c=this.options.keySeparator||".";let d;return l.keyPrefix&&Array.isArray(i)?d=i.map(f=>(typeof f=="function"&&(f=xs(f,u)),`${l.keyPrefix}${c}${f}`)):(typeof i=="function"&&(i=xs(i,u)),d=l.keyPrefix?`${l.keyPrefix}${c}${i}`:i),this.t(d,l)};return re(e)?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=r,s}t(...e){var n;return(n=this.translator)==null?void 0:n.translate(...e)}exists(...e){var n;return(n=this.translator)==null?void 0:n.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!s||o(i,e)))}loadNamespaces(e,n){const r=wi();return this.options.ns?(re(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=wi();re(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(e){var s,i;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new Xv(Hc());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={}
121,n){const r=new Yi(e,n);return r.createInstance=Yi.createInstance,r}cloneInstance(e={},n=Ea){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new Yi(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,d)=>(c[d]={...l[u][d]},c),l[u]),l),{});i.store=new Yv(a,s),i.services.resourceStore=i.store}if(e.interpolation){const l={...Hc().interpolation,...this.options.interpolation,...e.interpolation},u={...s,interpolation:l};i.services.interpolator=new ty(u)}return i.translator=new ql(i.services,s),i.translator.on("*",(a,...l)=>{i.emit(a,...l)}),i.init(s,n),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ze=Yi.createInstance();ze.createInstance;ze.dir;ze.init;ze.loadResources;ze.reloadResources;ze.use;ze.changeLanguage;ze.getFixedT;ze.t;ze.exists;ze.setDefaultNamespace;ze.hasLoadedNamespace;ze.loadNamespaces;ze.loadLanguages;const b8=(t,e,n,r)=>{var i,o,a,l;const s=[n,{code:e,...r||{}}];if((o=(i=t==null?void 0:t.services)==null?void 0:i.logger)!=null&&o.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);zr(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(l=(a=t==null?void 0:t.services)==null?void 0:a.logger)!=null&&l.warn?t.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},sy={},Ef=(t,e,n,r)=>{zr(n)&&sy[n]||(zr(n)&&(sy[n]=new Date),b8(t,e,n,r))},Dx=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},wf=(t,e,n)=>{t.loadNamespaces(e,Dx(t,n))},iy=(t,e,n,r)=>{if(zr(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return wf(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,Dx(t,r))},S8=(t,e,n={})=>!e.languages||!e.languages.length?(Ef(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,t))return!1}}),zr=t=>typeof t=="string",E8=t=>typeof t=="object"&&t!==null,w8=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,x8={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},T8=t=>x8[t],I8=t=>t.replace(w8,T8);let xf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:I8,transDefaultProps:void 0};const O8=(t={})=>{xf={...xf,...t}},k8=()=>xf;let Nx;const C8=t=>{Nx=t},R8=()=>Nx,A8={type:"3rdParty",init(t){O8(t.options.react),C8(t)}},P8=b.createContext();class D8{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const N8=(t,e)=>{if(zr(e))return e;if(E8(e)&&zr(e.defaultValue))return e.defaultValue;if(typeof t=="function")return"";if(Array.isArray(t)){const n=t[t.length-1];return typeof n=="function"?"":n}return t},L8={t:N8,ready:!1},M8=()=>()=>{},F8=(t,e={})=>{var S,w,A;const{i18n:n}=e,{i18n:r,defaultNS:s}=b.useContext(P8)||{},i=n||r||R8();i&&!i.reportNamespaces&&(i.reportNamespaces=new D8),i||Ef(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=b.useMemo(()=>{var P;return{...k8(),...(P=i==null?void 0:i.options)==null?void 0:P.react,...e}},[i,e]),{useSuspense:a,keyPrefix:l}=o,u=t||s||((S=i==null?void 0:i.options)==null?void 0:S.defaultNS),c=zr(u)?[u]:u||["translation"],d=b.useMemo(()=>c,c);(A=(w=i==null?void 0:i.reportNamespaces)==null?void 0:w.addUsedNamespaces)==null||A.call(w,d);const f=b.useRef(0),p=b.useCallback(P=>{if(!i)return M8;const{bindI18n:O,bindI18nStore:N}=o,V=()=>{f.current+=1,P()};return O&&i.on(O,V),N&&i.store.on(N,V),()=>{O&&O.split(" ").forEach(L=>i.off(L,V)),N&&N.split(" ").forEach(L=>i.store.off(L,V))}},[i,o]),h=b.useRef(),g=b.useCallback(()=>
121{if(!i)return L8;const P=!!(i.isInitialized||i.initializedStoreOnce)&&d.every(q=>S8(q,i,o)),O=e.lng||i.language,N=f.current,V=h.current;if(V&&V.ready===P&&V.lng===O&&V.keyPrefix===l&&V.revision===N)return V;const W={t:i.getFixedT(O,o.nsMode==="fallback"?d:d[0],l),ready:P,lng:O,keyPrefix:l,revision:N};return h.current=W,W},[i,d,l,o,e.lng]),[_,m]=b.useState(0),{t:y,ready:E}=uT.useSyncExternalStore(p,g,g);b.useEffect(()=>{if(i&&!E&&!a){const P=()=>m(O=>O+1);e.lng?iy(i,e.lng,d,P):wf(i,d,P)}},[i,e.lng,d,E,a,_]);const T=i||{},I=b.useRef(null),x=b.useRef(),R=P=>{const O=Object.getOwnPropertyDescriptors(P);O.__original&&delete O.__original;const N=Object.create(Object.getPrototypeOf(P),O);if(!Object.prototype.hasOwnProperty.call(N,"__original"))try{Object.defineProperty(N,"__original",{value:P,writable:!1,enumerable:!1,configurable:!1})}catch{}return N},C=b.useMemo(()=>{const P=T,O=P==null?void 0:P.language;let N=P;P&&(I.current&&I.current.__original===P?x.current!==O?(N=R(P),I.current=N,x.current=O):N=I.current:(N=R(P),I.current=N,x.current=O));const V=!E&&!a?(...W)=>(Ef(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),y(...W)):y,L=[V,N,E];return L.t=V,L.i18n=N,L.ready=E,L},[y,T,E,T.resolvedLanguage,T.language,T.languages]);if(i&&a&&!E)throw new Promise(P=>{const O=()=>P();e.lng?iy(i,e.lng,d,O):wf(i,d,O)});return C},Lx=new Set;function $8(){window.addEventListener("error",t=>{const e=t.target;if(!(e instanceof HTMLLinkElement)||e.rel!=="modulepreload")return;const n=new URL(e.href,window.location.href);n.origin===window.location.origin&&/^\/assets\/[^/]+\.js$/.test(n.pathname)&&Lx.add(n.href)},!0)}async function j8(){const t=[...Lx];if(!t.length)return!1;const e=new AbortController,n=window.setTimeout(()=>e.abort(),3e3);try{await Promise.allSettled(t.map(async r=>{await(await fetch(r,{cache:"reload",credentials:"same-origin",signal:e.signal})).arrayBuffer()}))}finally{window.clearTimeout(n)}return!0}function oy({error:t}){const{t:e}=F8("common"),n=b.useRef(!1),[r,s]=b.useState(!1);b.useEffect(()=>{t&&console.error("Error encountered:",t)},[t]);const i=typeof bp=="function"?bp():void 0,o=async()=>{if(!n.current){n.current=!0,s(!0);try{await j8()}finally{window.location.reload()}}},a=()=>{window.location.href=window.location.origin};return v.jsxs("div",{className:"min-h-screen w-full min-w-0 overflow-x-hidden bg-bg text-fg font-body flex flex-col items-center justify-center px-6 text-center",children:[v.jsx("span",{className:"mb-4 font-mono text-[11px] uppercase tracking-wide10 text-accent-2",children:"Error"}),v.jsx("h1",{className:"font-head text-[48px] font-bold uppercase leading-[0.95] tracking-wide2 text-fg sm:text-[64px]",children:e("errorPage.title")}),v.jsxs("p",{className:"mt-4 w-full min-w-0 max-w-[460px] break-words font-body text-[14px] leading-relaxed text-muted",children:[e("errorPage.mainMessage"),v.jsx("br",{}),e("errorPage.subMessage")]}),v.jsxs("div",{className:"mt-8 flex items-center gap-3",children:[v.jsx(Sp,{disabled:r,onClick:o,className:"font-head uppercase tracking-wide2",children:e("errorPage.refresh")}),v.jsx(Sp,{variant:"outline",onClick:a,className:"font-head uppercase tracking-wide2",children:"Home"})]}),i?v.jsxs("span",{className:"mt-6 font-mono text-[10px] uppercase tracking-wide10 text-subtle",children:["Reference: ",i]}):null]})}const U8=()=>{const[t,e]=b.useState(navigator.onLine),[n,r]=b.useState(!1),[s,i]=b.useState(!1);return b.useEffect(()=>{const o=()=>{e(!0),s&&(r(!0),i(!1),setTimeout(()=>r(!1),3e3))},a=()=>{e(!1),r(!0),i(!0)};window.addEventListener("online",o),window.addEventListener("offline",a);const l=setInterval(()=>{!navigator.onLine&&t?a():navigator.onLine&&!t&&o()},5e3);return()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a),clearInterval(l)}},[t,s]),t&&!n?null:v.jsxs(v.Fragment,{children:[!t&&v.jsxs("div",{style:{position:"fixed",top:0,left:0,right:0,zIndex:9999,background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"white",padding:"12px 24px",display:"flex",alignItems:"center",justifyContent:"center",gap:16,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",boxSizing:"border-box"},children:[v.jsx(lV,{size:20,"aria-hidden":!0}),v.jsx("p",{style:{margin:0,fontSize:"0.875rem",fontWeight:500},children:"You're offline. Please check your internet connection."}),v.jsx("button",{type:"button",onClick:()=>window.location.reload(),style:{font:"inherit",fontSize:"0.8125rem",fontWeight:500,textTransform:"uppercase",letterSpacing:"0.02857em",color:"white",background:"transparent",border:"1px solid rgba(255,255,255,0.7)",borderRadius:4,padding:"3px 9px",cursor:"pointer"},children:"Retry"})]}),n&&t&&v.jsxs("div",{role:"alert",style:{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",zIndex:1400,display:"flex",alignItems:"center",gap:12,minWidth:288,padding:"6px 16px",borderRadius:4,background:"#edf7ed",color:"#1e4620",fontSize:"0.875rem",boxShadow:"0 3px 5px -1px rgba(0,0,0,0.2), 0 6px 10px 0 rgba(0,0,0,0.14)",boxSizing:"border-box"},children:[v.jsx(cV,{size:22,color:"#2e7d32","aria-hidden":!0}),v.jsx("span",{style:{flex:1,padding:"8px 0"},children:"Back online! Your connection has been restored."}),v.jsx("button",{type:"button","aria-label":"Close",onClick:()=>r(!1),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:30,width:30,padding:0,background:"transparent",border:0,borderRadius:"50%",color:"inherit",curs
121or:"pointer"},children:v.jsx(jf,{size:18,"aria-hidden":!0})})]})]})},B8=()=>{const t=Po(),[e,n]=b.useState(()=>kv()),[r,s]=b.useState(!1);if(b.useEffect(()=>{const o=a=>{(a.key===null||a.key==="tt-impersonation")&&n(kv())};return window.addEventListener("storage",o),()=>window.removeEventListener("storage",o)},[]),!e)return null;const i=async()=>{s(!0),await qs(t),sx(),window.location.assign("/")};return v.jsxs("div",{style:{position:"fixed",top:0,left:0,right:0,zIndex:1e4,background:"#1a1a1a",color:"#fff",padding:"10px 24px",display:"flex",alignItems:"center",justifyContent:"center",gap:16,borderBottom:"2px solid #f59e0b",boxSizing:"border-box"},children:[v.jsx(W4,{size:20,color:"#f59e0b","aria-hidden":!0}),v.jsxs("p",{style:{margin:0,fontSize:"0.875rem",fontWeight:500},children:["You're viewing as ",v.jsx("strong",{children:e.name})]}),v.jsx("button",{type:"button",disabled:r,onClick:i,style:{font:"inherit",fontSize:"0.8125rem",fontWeight:500,textTransform:"uppercase",letterSpacing:"0.02857em",color:"#fff",background:"transparent",border:"1px solid #f59e0b",borderRadius:4,padding:"3px 9px",cursor:r?"default":"pointer",opacity:r?.5:1},children:"End impersonation"})]})},H8=6e4,V8="getClubTeamsLite";let hs=null,Tf=0;function w7(){Tf+=1,hs=null}const z8=new Za((t,e)=>{if(t.operationName!==V8)return e(t);const n=JSON.stringify(t.variables);if(hs&&hs.variablesKey===n&&Date.now()-hs.timestamp<H8){const r=hs.response;return new Qa(s=>{s.next(r),s.complete()})}return new Qa(r=>{const s=Tf,i=e(t).subscribe({next:o=>{!o.errors&&s===Tf&&(hs={variablesKey:n,response:o,timestamp:Date.now()}),r.next(o)},error:o=>r.error(o),complete:()=>r.complete()});return()=>i.unsubscribe()})}),q8=3e3;function Mx(t,e=q8){if(typeof window>"u")return()=>{};if(typeof window.requestIdleCallback=="function"){const r=window.requestIdleCallback(()=>t(),{timeout:e});return()=>{var s;return(s=window.cancelIdleCallback)==null?void 0:s.call(window,r)}}const n=window.setTimeout(t,Math.min(e,1500));return()=>window.clearTimeout(n)}function W8(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=G8(t))||e){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(u){throw u},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 122In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return o=u.done,u},e:function(u){a=!0,i=u},f:function(){try{o||n.return==null||n.return()}finally{if(a)throw i}}}}function G8(t,e){if(t){if(typeof t=="string")return ay(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ay(t,e):void 0}}function ay(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function If(t){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},If(t)}var Fx=["__proto__","constructor","prototype"];function $x(t){return!(typeof t!="string"||t.length===0||t.length>128||Fx.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function jx(t){return!(!$x(t)||t.indexOf("/")>-1)}function K8(t){return $x(t)}var Y8={lng:jx,ns:K8};function wa(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function J8(t){if(typeof t!="string"||t.length===0)return t;try{var e=new URL(t);return e.username||e.password?(e.username="",e.password="",e.toString()):t}catch{return t.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function Ux(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":If(XMLHttpRequest))==="object"}function X8(t){return!!t&&typeof t.then=="function"}function Z8(t){return X8(t)?t:Promise.resolve(t)}var Q8=/\{\{(.+?)\}\}/g;function ly(t,e){var n=!1,r=t.replace(Q8,function(s,i){var o=i.trim();if(Fx.indexOf(o)>-1)return s;var a=e[o];if(a==null)return s;var l=Y8[o]||jx,u=String(a).split("+"),c=W8(u),d;try{for(c.s();!(d=c.n()).done;){var f=d.value;if(!l(f))return n=!0,s}}catch(p){c.e(p)}finally{c.f()}return u.join("+")});return n?null:r}function uy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function cy(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
122e%2?uy(Object(n),!0).forEach(function(r){eq(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):uy(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function eq(t,e,n){return(e=tq(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tq(t){var e=nq(t,"string");return qr(e)=="symbol"?e:e+""}function nq(t,e){if(qr(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(qr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qr(t){"@babel/helpers - typeof";return qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qr(t)}var rr=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?rr=global.fetch:typeof window<"u"&&window.fetch&&(rr=window.fetch);var _o;Ux()&&(typeof global<"u"&&global.XMLHttpRequest?_o=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(_o=window.XMLHttpRequest));var Wl;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Wl=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Wl=window.ActiveXObject));typeof rr!="function"&&(rr=void 0);if(!rr&&!_o&&!Wl)try{j(()=>import("./browser-ponyfill-CeUhObmB.js").then(t=>t.b),__vite__mapDeps([604,1])).then(function(t){rr=t.default}).catch(function(){})}catch{}var Bx=["__proto__","constructor","prototype"],Of=function(e,n){if(n&&qr(n)==="object"){for(var r="",s=0,i=Object.keys(n);s<i.length;s++){var o=i[s];Bx.indexOf(o)>-1||(r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},dy=function(e,n,r,s){var i=function(l){if(!l.ok)return r(l.statusText||"Error",{status:l.status});l.text().then(function(u){r(null,{status:l.status,data:u})}).catch(r)};if(s){var o=s(e,n);if(o instanceof Promise){o.then(i).catch(r);return}}
122typeof fetch=="function"?fetch(e,n).then(i).catch(r):rr(e,n).then(i).catch(r)},rq=function(e,n,r,s){e.queryStringParams&&(n=Of(n,e.queryStringParams));var i=cy({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var o=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,a=cy({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:i},e._omitFetchOptions?{}:o),l=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{dy(n,a,s,l)}catch(u){if(!o||Object.keys(o).length===0||!u.message||u.message.indexOf("not implemented")<0)return s(u);try{Object.keys(o).forEach(function(c){delete a[c]}),dy(n,a,s,l),e._omitFetchOptions=!0}catch(c){s(c)}}},sq=function(e,n,r,s){r&&qr(r)==="object"&&(r=Of("",r).slice(1)),e.queryStringParams&&(n=Of(n,e.queryStringParams));try{var i=_o?new _o:new Wl("MSXML2.XMLHTTP.3.0");i.open(r?"POST":"GET",n,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var o=e.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a=0,l=Object.keys(o);a<l.length;a++){var u=l[a];Bx.indexOf(u)>-1||i.setRequestHeader(u,o[u])}i.onreadystatechange=function(){i.readyState>3&&s(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(c){console&&console.log(c)}},iq=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},rr&&n.indexOf("file:")!==0)return rq(e,n,r,s);if(Ux()||typeof ActiveXObject=="function")return sq(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function Ws(t){"@babel/helpers - typeof";return Ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ws(t)}function fy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Vc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fy(Object(n),!0).forEach(function(r){Hx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fy(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function oq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function aq(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Vx(r.key),r)}}function lq(t,e,n){return e&&aq(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hx(t,e,n){return(e=Vx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vx(t){var e=uq(t,"string");return Ws(e)=="symbol"?e:e+""}function uq(t,e){if(Ws(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ws(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var cq=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,s){return Hx({},r,s||"")},parseLoadPayload:function(n,r){},request:iq,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},zx=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};oq(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return lq(t,[{key:"init",value:function(n){var r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Vc(Vc(Vc({},cq()),this.options||{}),s),this.allOptions=i,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);Ws(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(n,r,s){this._readAny(n,n,r,r,s)}},{key:"read",value:function(n,r,s){this._readAny([n],n,[r],r,s)}},{key:"_readAny",value:function(n,r,s,i,o){var a=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,s)),l=Z8(l),l.then(function(u){if(!u)return o(null,{});var c=ly(u,{lng:n.join("+"),ns:s.join("+")});if(c==null){var d=n.map(wa).join(", "),f=s.map(wa).join(", ");return o(new Error("i18next-http-backend: unsafe lng/ns value â refusing to build request URL for languages=["+d+"] namespaces=["+f+"]"),!1)}a.loadUrl(c,o,r,i)})}},{key:"loadUrl",value:function(n,r,s,i){var o=this,a=typeof s=="string"?[s]:s,l=typeof i=="string"?[i]:i,u=this.options.parseLoadPayload(a,l),c=wa(J8(n));this.options.request(this.options,n,u,function(d,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+c+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+c+"; status code: "+f.status,!1);if(!f&&d&&d.message){var p=d.message.toLowerCase(),h=["failed","fetch","network","load"].find(function(m){return p.indexOf(m)>-1});if(h)return r("failed loading "+c+": "+wa(d.message),!0)}if(d)return r(d,!1);var g,_;
122try{typeof f.data=="string"?g=o.options.parse(f.data,s,i):g=f.data}catch{_="failed parsing "+c+" to json"}if(_)return r(_,!1);r(null,g)})}},{key:"create",value:function(n,r,s,i,o){var a=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,s,i),u=0,c=[],d=[];n.forEach(function(f){var p=a.options.addPath;typeof a.options.addPath=="function"&&(p=a.options.addPath(f,r));var h=ly(p,{lng:f,ns:r});if(h==null){u+=1,o&&u===n.length&&o(c,d);return}a.options.request(a.options,h,l,function(g,_){u+=1,c.push(g),d.push(_),u===n.length&&typeof o=="function"&&o(c,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,s=r.backendConnector,i=r.languageUtils,o=r.logger,a=s.language;if(!(a&&a.toLowerCase()==="cimode")){var l=[],u=function(d){var f=i.toResolveHierarchy(d);f.forEach(function(p){l.indexOf(p)<0&&l.push(p)})};u(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),l.forEach(function(c){n.allOptions.ns.forEach(function(d){s.read(c,d,"read",null,null,function(f,p){f&&o.warn("loading namespace ".concat(d," for language ").concat(c," failed"),f),!f&&p&&o.log("loaded namespace ".concat(d," for language ").concat(c),p),s.loaded("".concat(c,"|").concat(d),f,p)})})})}}}])})();zx.type="backend";const{slice:dq,forEach:fq}=[];function hq(t){return fq.call(dq.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}
vendor: 6,616 bytes, line 122
122function pq(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const hy=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,gq=function(t,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e);let i=`${t}=${s}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!hy.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!hy.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},py={create(t,e,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=gq(t,e,s)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var mq={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return py.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:i}=e;n&&typeof document<"u"&&py.create(n,t,r,s,i)}},_q={name:"querystring",lookup(t){var r;let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const o=s.substring(1).split("&");for(let a=0;a<o.length;a++){const l=o[a].indexOf("=");l>0&&o[a].substring(0,l)===e&&(n=o[a].substring(l+1))}}return n}},vq={name:"hash",lookup(t){var s;let{lookupHash:e,lookupFromHashIndex:n}=t,r;if(typeof window<"u"){const{hash:i}=window.location;if(i&&i.length>2){const o=i.substring(1);if(e){const a=o.split("&");for(let l=0;l<a.length;l++){const u=a[l].indexOf("=");u>0&&a[l].substring(0,u)===e&&(r=a[l].substring(u+1))}}if(r)return r;if(!r&&n>-1){const a=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(s=a[typeof n=="number"?n:0])==null?void 0:s.replace("/",""):void 0}}}return r}};let as=null;const gy=()=>{if(as!==null)return as;try{if(as=typeof window<"u"&&window.localStorage!==null,!as)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{as=!1}return as};var yq={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&gy())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&gy()&&window.localStorage.setItem(n,t)}};let ls=null;const my=()=>{if(ls!==null)return ls;try{if(ls=typeof window<"u"&&window.sessionStorage!==null,!ls)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{ls=!1}return ls};var bq={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&my())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&my()&&window.sessionStorage.setItem(n,t)}},Sq={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let i=0;i<n.length;i++)e.push(n[i]);r&&e.push(r),s&&e.push(s)}return e.length>0?e:void 0}},Eq={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},wq={name:"path",lookup(t){var s;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof e=="number"?e:0])==null?void 0:s.replace("/",""):void 0}},xq={name:"subdomain",lookup(t){var s,i;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&((i=(s=window.location)==null?void 0:s.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let qx=!1;try{document.cookie,qx=!0}catch{}const Wx=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];qx||Wx.splice(1,1);const Tq=()=>({order:Wx,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class Gx{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=hq(n,this.options||{},Tq()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(mq),this.addDetector(_q),this.addDetector(yq),this.addDetector(bq),this.addDetector(Sq),this.addDetector(Eq),this.addDetector(wq),this.addDetector(xq),this.addDetector(vq)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!pq(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}
122cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}Gx.type="languageDetector";const Iq=["common","layout","auth","public","dugout","engineRoom","sessionPlanner","globalLibrary","billing","profile","replay"];ze.use(zx).use(Gx).use(A8).init({fallbackLng:"en",load:"languageOnly",supportedLngs:["en"],defaultNS:"common",ns:[...Iq],interpolation:{escapeValue:!1},backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["localStorage","navigator"],lookupLocalStorage:"i18nextLng",caches:["localStorage"]}});const Sr=t=>{try{const e=document.cookie.split(";").map(n=>n.trim()).find(n=>n.startsWith(`${t}=`));return e&&decodeURIComponent(e.slice(t.length+1))||null}catch{return null}};function Oq(){try{const t=window.Cookiebot;if(t!=null&&t.consent)return{marketing:t.consent.marketing===!0,statistics:t.consent.statistics===!0};const e=Sr("CookieConsent");if(e)return{marketing:/marketing:true/.test(e),statistics:/statistics:true/.test(e)}}catch{}return{marketing:!1,statistics:!1}}function _y(t){if(!t)return null;const e=t.split(".");return e.length>=3&&e.slice(2).join(".")||null}function kq(t){if(!t)return null;const e=t.split(".");return e.length>=4?e.slice(2).join("."):null}function Cq(t=Oq()){const e=t.marketing;return{fbp:e?Sr("_fbp"):null,fbc:e?Sr("_fbc"):null,gclid_cookie:e?_y(Sr("_gcl_aw")):null,gbraid_cookie:e?_y(Sr("_gcl_gb")):null,ga_client_id:t.statistics?kq(Sr("_ga")):null,hubspotutk:e?Sr("hubspotutk"):null,marketing_consent:e}}function Rq(t,e){return{...t,gclid:t.gclid||e.gclid_cookie,gbraid:t.gbraid||e.gbraid_cookie,fbp:e.fbp,fbc:e.fbc,ga_client_id:e.ga_client_id,hubspotutk:e.hubspotutk,marketing_consent:e.marketing_consent}}const Kx="dugout_acquisition_context_v1",Aq=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],Pq=["fbclid","gclid","gbraid","wbraid"],Dq=()=>{try{return`${window.location.origin}${window.location.pathname}`}catch{return""}},Nq=90,Lq=Nq*24*60*60*1e3,Yx=t=>{const e=new Date(t.captured_at).getTime();return Number.isNaN(e)?!0:Date.now()-e>Lq},Jx=()=>{try{const t=localStorage.getItem(Kx);return t?JSON.parse(t):null}catch{return null}},vy=t=>{try{localStorage.setItem(Kx,JSON.stringify(t))}catch{}},kf=()=>{var t,e;try{return(t=ut==null?void 0:ut._isIdentified)!=null&&t.call(ut)?null:((e=ut==null?void 0:ut.get_distinct_id)==null?void 0:e.call(ut))||null}catch{return null}};function Mq(){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search),e=[...Aq,...Pq].some(i=>t.get(i)),n=Dq(),r=(()=>{const i=Jx();return i&&!Yx(i)?i:null})(),s=new Date().toISOString();if(!r){vy({anonymous_id:kf(),first_landing_page:n,last_landing_page:n,utm_source:t.get("utm_source"),utm_medium:t.get("utm_medium"),utm_campaign:t.get("utm_campaign"),utm_content:t.get("utm_content"),utm_term:t.get("utm_term"),fbclid:t.get("fbclid"),gclid:t.get("gclid"),gbraid:t.get("gbraid"),wbraid:t.get("wbraid"),captured_at:s});return}vy({...r,anonymous_id:r.anonymous_id||kf(),last_landing_page:n,utm_source:t.get("utm_source")||r.utm_source,utm_medium:t.get("utm_medium")||r.utm_medium,utm_campaign:t.get("utm_campaign")||r.utm_campaign,utm_content:t.get("utm_content")||r.utm_content,utm_term:t.get("utm_term")||r.utm_term,fbclid:t.get("fbclid")||r.fbclid,gclid:t.get("gclid")||r.gclid||null,gbraid:t.get("gbraid")||r.gbraid||null,wbraid:t.get("wbraid")||r.wbraid||null,captured_at:e?s:r.captured_at})}function x7(){const t=Jx();return!t||Yx(t)?null:Rq({...t,anonymous_id:t.anonymous_id||kf()},Cq())}{const t=/iP(hone|ad|od)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;Mx(()=>{ut.init("phc_HL8qhpbV2ZtiY7GkU7rnwBOd0rHiZwypxb9AtmQZYJQ",{api_host:"https://us.i.posthog.com",person_profiles:"identified_only",disable_session_recording:t,capture_performance:{web_vitals:!0,network_timing:!1},capture_dead_clicks:!1})})}Mq();const Fq=new bE,$q=5e3;let xi=null;const jq=()=>xi||(xi=(async()=>{var t;try{const e=await Promise.race([W1({query:{disableCookieCache:!0}}),new Promise((n,r)=>setTimeout(()=>
122r(new Error("session-verify-timeout")),$q))]);return e!=null&&e.error?"check-failed":(t=e==null?void 0:e.data)!=null&&t.user?"alive":"dead"}catch{return"check-failed"}})().finally(()=>{xi=null}),xi),Uq={error:"#d32f2f",warning:"#ed6c02",info:"#0288d1"},Bq=()=>{const[t,e]=b.useState(null),n=Po();b.useEffect(()=>{if(!t)return;const c=window.setTimeout(()=>e(null),3e3);return()=>window.clearTimeout(c)},[t]);const{data:r,isPending:s}=vo(),i=b.useRef(r||null),o=b.useRef(s),a=b.useRef(!1);b.useEffect(()=>{i.current=r,o.current=s;try{r!=null&&r.user?Ep({id:String(r.user.id),email:r.user.email,username:r.user.name}):s||Ep(null)}catch{}},[r,s]),b.useEffect(()=>{r!=null&&r.user&&a.current&&(a.current=!1)},[r]),b.useEffect(()=>{Fq.set("betterAuth","true",$y)},[]),b.useEffect(()=>{if(r!=null&&r.user)return Mx(()=>void j(()=>import("./index-Cq3Thd2G.js"),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85])).catch(()=>{}))},[r==null?void 0:r.user]);const l=b.useMemo(()=>{const c=oT(({graphQLErrors:p,networkError:h,response:g,operation:_,forward:m})=>{var I,x,R,C,S,w,A,P,O;const y=!!((x=(I=_==null?void 0:_.getContext)==null?void 0:I.call(_))!=null&&x.silentErrors),E=N=>{y||e(N)},T=(...N)=>{y?console.debug(...N):console.error(...N)};if(h){const N=((R=h.message)==null?void 0:R.toLowerCase())||"",V=navigator.onLine&&(N.includes("failed to fetch")||N.includes("network request failed")||N.includes("networkerror"));if(!(h.name==="AbortError"||((C=h.message)==null?void 0:C.includes("aborted"))||((S=h.message)==null?void 0:S.includes("signal is aborted"))||V)){T("Network error:",h);const W=(h==null?void 0:h.statusCode)||((w=h==null?void 0:h.result)==null?void 0:w.status)||((A=h==null?void 0:h.response)==null?void 0:A.status);if(W)if(W===401){if(!a.current&&!Dn&&!wp.includes(window.location.pathname)){const q=ie=>{try{Ar("apollo-401-trigger",{level:"warning",tags:{event_type:"apollo_401",gql_operation:(_==null?void 0:_.operationName)||"AnonymousOperation",verdict:ie}})}catch{}};return o.current?(q("boot-pending"),_.getContext().retriedAfter401?void 0:(_.setContext({retriedAfter401:!0}),Tp(new Promise(ie=>setTimeout(ie,1e3))).flatMap(()=>m(_)))):Tp(jq()).flatMap(ie=>
122{if(ie==="alive"){if(!_.getContext().retriedAfter401)return q("recovered-alive"),_.setContext({retriedAfter401:!0}),m(_);try{Ar("apollo-401-with-live-session",{level:"warning",tags:{event_type:"apollo_401",gql_operation:(_==null?void 0:_.operationName)||"AnonymousOperation"}})}catch{}throw h}throw ie==="dead"?(!a.current&&!Dn&&(a.current=!0,q("confirmed-dead"),e({message:ze.t("common:errors.sessionExpired"),severity:"info"}),qs(n)),h):(q("session-check-failed"),h)})}}else{if(a.current)return;W===403?E({message:ze.t("common:errors.accessDenied"),severity:"error"}):W===404?E({message:ze.t("common:errors.notFound"),severity:"error"}):W===400?E({message:ze.t("common:errors.badRequest"),severity:"error"}):W>=500?E({message:ze.t("common:errors.serverError"),severity:"error"}):E(W===408||W===504?{message:ze.t("common:errors.timeout"),severity:"warning"}:{message:ze.t("common:errors.statusCode",{code:W}),severity:"error"})}else{if(a.current)return;const q=((P=h.message)==null?void 0:P.toLowerCase())||"";q.includes("failed to fetch")||q.includes("network request failed")||q.includes("networkerror")?E({message:ze.t("common:errors.connectionFailed"),severity:"warning"}):q.includes("timeout")?E({message:ze.t("common:errors.timeout"),severity:"warning"}):E({message:ze.t("common:errors.networkError"),severity:"warning"})}}}!a.current&&(p!=null&&p.length)&&(T("GraphQL errors:",p),E({message:p[0].message,severity:"error"})),!a.current&&g&&((O=g==null?void 0:g.errors)!=null&&O.length)&&(T("Response errors:",g.errors),E({message:g==null?void 0:g.errors[0].message,severity:"error"}))}),d=ZD({uri:"https://api.touchtight.com/graphql",headers:{"keep-alive":"true"},credentials:"include"}),f=new Za((p,h)=>{var _,m;const g=i.current;if(g!=null&&g.user&&bu(g)&&!o.current&&!wp.includes(window.location.pathname)&&!a.current&&!Dn){a.current=!0;const E=(_=g==null?void 0:g.session)==null?void 0:_.expiresAt;try{Ar("authlink-session-expired-context",{level:"info",tags:{event_type:"session_expiry_check",expires_at_present:String(!!E)},extra:{expiresAtRaw:E?String(E):null,secondsPastExpiry:E?Math.round((Date.now()-new Date(E).getTime())/1e3):null,sessionUserId:((m=g==null?void 0:g.user)==null?void 0:m.id)??null}})}catch{}qs(n,!0)}return h(p)});return new rT({link:Za.from([c,f,z8,d]),cache:new sT})},[n]),[u]=b.useState(()=>q1([{path:"/*",element:v.jsx(Vz,{}),errorElement:v.jsx(oy,{})}]));return v.jsxs(v.Fragment,{children:[v.jsx(iT,{client:l,children:v.jsx(TM,{client:ut,children:v.jsxs(WD,{FallbackComponent:oy,onError:(c,d)=>{try{Ff(c,{tags:{event_type:"react_error_boundary"},contexts:{react:{componentStack:(d==null?void 0:d.componentStack)??null}}})}catch{}},children:[v.jsx(U8,{}),v.jsx(B8,{}),v.jsx(AM,{router:u}),v.jsx(Xz,{})]})})}),t&&v.jsx("div",{role:"alert",onClick:()=>e(null),style:{position:"fixed",top:24,right:24,zIndex:1400,display:"flex",alignItems:"center",minWidth:288,maxWidth:"calc(100vw - 48px)",padding:"6px 16px",borderRadius:4,background:Uq[t.severity],color:"#fff",fontSize:"0.875rem",lineHeight:1.43,boxShadow:"0 3px 5px -1px rgba(0,0,0,0.2), 0 6px 10px 0 rgba(0,0,0,0.14)",boxSizing:"border-box",cursor:"pointer"},children:v.jsx("span",{style:{padding:"8px 0"},children:t.message})})]})};function Ga(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(n){return typeof n}:Ga=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ga(t)}function Hq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vq(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zq(t,e,n){return e&&Vq(t.prototype,e),t}function qq(t,e){return e&&(Ga(e)==="object"||typeof e=="function")?e:Ka(t)}function Cf(t){return Cf=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Cf(t)}function Ka(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wq(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Rf(t,e)}function Rf(t,e){return Rf=Object.setPrototypeOf||function(r,s){return r.__proto__=s,r},Rf(t,e)}function Ya(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xx=(function(t){Wq(e,t);function e(){var n,r;Hq(this,e);for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];return r=qq(this,(n=Cf(e)).call.apply(n,[this].concat(i))),Ya(Ka(r),"state",{bootstrapped:!1}),Ya(Ka(r),"_unsubscribe",void 0),Ya(Ka(r),"handlePersistorState",function(){var a=r.props.persistor,l=a.getState(),u=l.bootstrapped;u&&(r.props.onBeforeLift?Promise.resolve(r.props.onBeforeLift()).finally(function(){return r.setState({bootstrapped:!0})}):r.setState({bootstrapped:!0}),r._unsubscribe&&r._unsubscribe())}),r}
122return zq(e,[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),e})(b.PureComponent);Ya(Xx,"defaultProps",{children:null,loading:null});const Gq=({children:t})=>v.jsx(_2,{store:uf,children:v.jsx(Xx,{persistor:J2(uf),children:t})}),Kq=b.createContext(),Yq=({children:t})=>{const[e,n]=b.useState("GBP"),[r,s]=b.useState(!1),i=$E(c=>{var d;return(d=c.user)==null?void 0:d.user}),o=[{code:"GBP",symbol:"£",name:"British Pound"}];b.useEffect(()=>{var c;(c=i==null?void 0:i.UserActivePlan)!=null&&c.billing_currency?(n(i.UserActivePlan.billing_currency),s(!0),console.log("[CurrencyContext] Currency locked to billing currency:",i.UserActivePlan.billing_currency)):i!=null&&i.preferred_currency?(n(i.preferred_currency),s(!1),console.log("[CurrencyContext] Using user preferred currency:",i.preferred_currency)):(n("GBP"),localStorage.setItem("selectedCurrency","GBP"),console.log("[CurrencyContext] Defaulting to GBP (multi-currency disabled)"),s(!1))},[i]);const u={currency:e,setCurrency:c=>r?(console.warn("[CurrencyContext] Currency is locked after subscription"),!1):o.find(d=>d.code===c)?(console.log("[CurrencyContext] Changing currency to:",c),n(c),localStorage.setItem("selectedCurrency",c),!0):(console.error("[CurrencyContext] Invalid currency code:",c),!1),availableCurrencies:o,isLocked:r,currencyInfo:(c=>o.find(d=>d.code===c)||o[0])(e)};return v.jsx(Kq.Provider,{value:u,children:t})},Jq={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ANIMATION_TOOL_URL:"https://studio.touchtight.com",VITE_API_URL:"https://api.touchtight.com",VITE_BETTER_AUTH_BASE_PATH:"/api/auth",VITE_CATEGORY_COACHING_THEMES:"10",VITE_CATEGORY_FAVORITES:"100",VITE_CATEGORY_FORMATIONS_TACTICS:"5",VITE_CATEGORY_FULL_SESSIONS:"52",VITE_CATEGORY_POSITION_SPECIFIC:"101",VITE_CATEGORY_PRACTICE_AND_DRILLS:"51",VITE_CATEGORY_PRE_SEASON:"77",VITE_CATEGORY_SEASON_PLANS:"106",VITE_CATEGORY_WEEK_PLANS_46:"9",VITE_CLUB_DOMAIN:"touchtight.com",VITE_CLUB_MESSAGES_ENABLED:"true",VITE_CLUB_MESSAGING_CONTROLS_ENABLED:"true",VITE_COACH_LIBRARY_ENABLED:"true",VITE_COACH_VOICE_SHELL:"",VITE_CONTACT_SALES_EMAIL_ID:"[email protected]",VITE_ENABLE_BETTER_AUTH:"true",VITE_ENVIRONMENT:"production",VITE_GTM_ID:"GTM-NG6XKGT",VITE_LEGACY_ANIMATION_TOOL_URL:"https://tool.touchtight.com",VITE_MATCH_RECORDER_ENABLED:"true",VITE_PAYPAL_CLIENT_ID:"ATlOMZ6DG-N09m2Le8Y8gtbCKAPwk5XnrD7c6rGq9tHlijn7OyoNVCsGkt85QUthcOUTnz60lRB2wNNN",VITE_PUBLIC_POSTHOG_HOST:"https://us.i.posthog.com",VITE_PUBLIC_POSTHOG_KEY:"phc_HL8qhpbV2ZtiY7GkU7rnwBOd0rHiZwypxb9AtmQZYJQ",VITE_PUBLIC_POSTHOG_PROFILE:"identified_only",VITE_S3_BASE_URL:"https://touch-tight-club-logo-upload-prod-us-east-1.s3.us-east-1.amazonaws.com",VITE_S3_BUCKET:"touch-tight-club-logo-upload-prod-us-east-1",VITE_S3_CLOUDFRONT_DOMAIN:"https://d2n2ufephfz6d1.cloudfront.net",VITE_S3_MEDIA_BUCKET:"tt-stream-videos",VITE_SEEDED_SESSION_FILL:"true",VITE_SHARED_SESSION_BUILDER:"true",VITE_STRIPE_PUBLISH_KEY:"pk_live_bKNDVbtiZQ0O23KxCW0KpWiJ",VITE_STUDIO_CREATION_CREDITS_ENABLED:"",VITE_SYNCFUSION_LICENSE_KEY:"Mgo+DSMBaFt+QHJqVk1hXk5Hd0BLVGpAblJ3T2ZQdVt5ZDU7a15RRnVfRF1hSX9WdkdjWX5ddA==;Mgo+DSMBPh8sVXJ1S0R+X1pFdEBBXHxAd1p/VWJYdVt5flBPcDwsT3RfQF5jT35RdkRmWX1ecHdVQg==;ORg4AjUWIQA/Gnt2VFhiQlJPd11dXmJWd1p/THNYflR1fV9DaUwxOX1dQl9gSXhTdEViXH9ccHRRQ2Q=;MjI4OTYwN0AzMjMxMmUzMDJlMzBkMWxzcm9ISG5pdEVISUVrNXRRTWEwaWlqVWc0RVd3OFBlMWFFM0pZSzhNPQ==;MjI4OTYwOEAzMjMxMmUzMDJlMzBpOFMvdkQrbk0yS2s4cHg5YWJ0aTlXZExQNUFaUGRoYWFPdkpaUmxvdE1rPQ==;NRAiBiAaIQQuGjN/V0d+Xk9HfV5AQmBIYVp/TGpJfl96cVxMZVVBJAtUQF1hSn5VdkdjWHpecnRURGdY;MjI4OTYxMEAzMjMxMmUzMDJlMzBlM1RkUlNKVVVHUWVtdndEVkMwalhaeTNjVkppN3A4NVNRODI0MUlFZXhZPQ==;MjI4OTYxMUAzMjMxMmUzMDJlMzBaQnVVWHpScEd5ZU1iSWxCdXdRNmhuOWdzU01oOXZoZDNCVmNzR1Q1SjJNPQ==;Mgo+DSMBMAY9C3t2VFhiQlJPd11dXmJWd1p/THNYflR1fV9DaUwxOX1dQl9gSXhTdEViXH9ccHZUQmQ=;MjI4OTYxM0AzMjMxMmUzMDJlMzBqeVZZMW5ZRE1FNU1ZazNqeldHWnArUkJXQkd5K0xrV1BDTFExclk5cU9ZPQ==;MjI4OTYxNEAzMjMxMmUzMDJlMzBvcW1VSEhhQ3JSUXFaT1Z1YTNNbm1hQTVBcDFKOCsvRm9SdGpobmhueEtBPQ==;MjI4OTYxNUAzMjMxMmUzMDJlMzBlM1RkUlNKVVVHUWVtdndEVkMwalhaeTNjVkppN3A4NVNRODI0MUlFZXhZPQ==",VITE_TUTORIAL_COLLECTION_ID:"7324",VITE_V2_ENABLED:"",VITE_VOICE_CONSENT_POLICY_VERSION:"",VITE_VOICE_STAGING_APPLICATION:"",VITE_WEEKLY_PERSONALISED_SESSION:"true"},Xq={VITE_ENVIRONMENT:{required:!0,oneOf:["development","production","staging"]},VITE_CLUB_DOMAIN:{required:!0},VITE_API_URL:{required:!0,format:"uri"},VITE_ANIMATION_TOOL_URL:{required:!0,format:"uri"},VITE_LEGACY_ANIMATION_TOOL_URL:{required:!0,format:"uri"},VITE_S3_BUCKET:{required:!0},VITE_S3_MEDIA_BUCKET:{required:!0},VITE_S3_CLOUDFRONT_DOMAIN:{required:!0},VITE_S3_BASE_URL:{required:!0,format:"uri"},VITE_STRIPE_PUBLISH_KEY:{required:!0},VITE_PAYPAL_CLIENT_ID:{required:!0},VITE_CONTACT_SALES_EMAIL_ID:{required:!0,format:"email"},VITE_SYNCFUSION_LICENSE_KEY:{required:!0},VITE_PUBLIC_POSTHOG_KEY:{required:!1},VITE_PUBLIC_POSTHOG_HOST:{required:!1,format:"uri"},VITE_PUBLIC_POSTHOG_PROFILE:{required:!1,oneOf:["identified_only","anonymous","untracked"]},VITE_GTM_ID:{required:!1}},Zq=t=>{try{return new URL(t),!0}catch{return!1}},Qq=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),eW=(t,e,n)=>e==null?n.required?`"${t}" is required`:null:typeof e!="string"?`"${t}" must be a string`:e===""?n.required?`"${t}" is not allowed to be empty`:null:n.oneOf&&!n.oneOf.includes(e)?`"${t}" must be one of [${n.oneOf.join(", ")}]`:n.format==="uri"&&!Zq(e)?`"${t}" must be a valid uri`:n.format==="email"&&!Qq(e)?`"${t}" must be a valid email`:null,tW=Jq;let Ji=null;for(const[t,e]of Object.entries(Xq))if(Ji=eW(t,tW[t],e),Ji)break;if(Ji)throw console.error(`Environment variable validation error: ${Ji}`),alert("Application configuration incomplete"),new Error(`Environment variable validation error: ${Ji}`);$8();const nW="production",zc="tt:preload-reload-at",rW=6e4;window.addEventListener("vite:preloadError",t=>{let e=!1;try{const n=Number(sessionStorage.getItem(zc)||0),r=Date.now();if(!(n>0&&r-n<rW)){const i=String(r);sessionStorage.setItem(zc,i),e=sessionStorage.getItem(zc)===i}}catch{}try{Ar("vite-preload-error",{level:e?"warning":"error",tags:{event_type:"vite_preload_error",reloaded:String(e)},extra:{failedPayload:String((t==null?void 0:t.payload)??""),path:window.location.pathname}})}catch{}e&&(t.preventDefault(),window.location.reload())});window.addEventListener("pagehide",t=>
122{t.persisted||document.querySelectorAll("video").forEach(e=>{try{for(e.pause(),e.removeAttribute("src");e.firstChild;)e.removeChild(e.firstChild);e.load()}catch{}})});const sW=(()=>{try{return localStorage.getItem("@touchtight:react-scan")==="true"}catch{return!1}})();zD({dsn:"https://f357d49bcc55020e111bc8e86b2a9b51@o4507924294205440.ingest.de.sentry.io/4507924298465360",integrations:[vD(),VD(),oD()],tracesSampleRate:.1,profilesSampleRate:.1,environment:nW,replaysSessionSampleRate:.01,replaysOnErrorSampleRate:1});const iW=v.jsx(b.StrictMode,{children:v.jsx(Gq,{children:v.jsx(Yq,{children:v.jsx(Bq,{})})})}),yy=()=>{K1.createRoot(document.getElementById("root")).render(iW),typeof window.__removeAppLoader=="function"&&window.__removeAppLoader()};sW?j(async()=>{const{scan:t}=await import("./index-__UXMj9V.js");return{scan:t}},__vite__mapDeps([605,1])).then(({scan:t})=>t({enabled:!1,showToolbar:!0})).catch(()=>{}).finally(yy):yy();export{x4 as $,GW as A,jW as B,bE as C,go as D,nV as E,pV as F,v7 as G,U4 as H,QW as I,ue as J,UF as K,jF as L,gW as M,sV as N,mW as O,jz as P,Mh as Q,y7 as R,J4 as S,Mr as T,_n as U,oG as V,Yn as W,TG as X,OG as Y,tU as Z,j as _,rU as a,ni as a$,ep as a0,MG as a1,FG as a2,kG as a3,BG as a4,uG as a5,sG as a6,nG as a7,GG as a8,zG as a9,Kn as aA,W4 as aB,tt as aC,x7 as aD,G3 as aE,Vt as aF,uf as aG,c7 as aH,$4 as aI,sx as aJ,ze as aK,Wh as aL,$l as aM,HB as aN,Va as aO,tw as aP,Hs as aQ,Do as aR,Vs as aS,eU as aT,No as aU,gu as aV,jr as aW,$h as aX,ZE as aY,vj as aZ,yj as a_,bG as aa,F3 as ab,LG as ac,FW as ad,Bh as ae,hG as af,NG as ag,gG as ah,h4 as ai,pG as aj,HG as ak,K3 as al,$E as am,p7 as an,SG as ao,EG as ap,IG as aq,xG as ar,yG as as,KG as at,JG as au,WG as av,WW as aw,aG as ax,JW as ay,VG as az,N$ as b,AU as b$,fn as b0,RB as b1,OB as b2,iw as b3,AB as b4,tv as b5,dn as b6,xn as b7,B_ as b8,Fl as b9,XE as bA,R3 as bB,D_ as bC,BB as bD,R$ as bE,D$ as bF,zh as bG,sU as bH,sw as bI,gf as bJ,WB as bK,Kq as bL,YW as bM,KW as bN,S3 as bO,A3 as bP,lG as bQ,f7 as bR,d7 as bS,qG as bT,RG as bU,mG as bV,IB as bW,_7 as bX,n7 as bY,S2 as bZ,qW as b_,Pn as ba,Y_ as bb,L_ as bc,k3 as bd,du as be,D3 as bf,b3 as bg,Fh as bh,a7 as bi,AG as bj,m7 as bk,bu as bl,VW as bm,zW as bn,vG as bo,YG as bp,t7 as bq,g7 as br,h7 as bs,fG as bt,iG as bu,HW as bv,$3 as bw,F_ as bx,Uh as by,fu as bz,yu as c,Iw as c0,RU as c1,w7 as c2,UG as c3,jG as c4,Mx as c5,oV as c6,pW as c7,bi as c8,K4 as c9,XG as ca,ZG as cb,_G as cc,u7 as cd,f2 as ce,QG as cf,$W as cg,E7 as ch,np as ci,dV as cj,$G as ck,PG as cl,DG as cm,i7 as cn,wG as co,XW as cp,r7 as cq,T4 as cr,rG as cs,CG as ct,e7 as cu,BF as cv,WD as cw,xc as cx,hW as cy,ZW as cz,D4 as d,F8 as e,tG as f,Po as g,dG as h,S7 as i,b7 as j,ox as k,l7 as l,an as m,s7 as n,a4 as o,ii as p,UW as q,qs as r,BW as s,eG as t,Oe as u,Av as v,qh as w,Co as x,o7 as y,cG as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.