hardwater-ui-microfrontend 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/dist/DailyMotion-BwpAgR-V.js +1 -0
- package/dist/DailyMotion-DLZygJVj.mjs +135 -0
- package/dist/Facebook-BLJ6JTv_.js +1 -0
- package/dist/Facebook-C93Qgsot.mjs +120 -0
- package/dist/FilePlayer-DJHWbLcD.js +1 -0
- package/dist/FilePlayer-DYy9XerI.mjs +201 -0
- package/dist/Kaltura-B-pnIuKt.js +1 -0
- package/dist/Kaltura-CR4IE6JY.mjs +120 -0
- package/dist/Mixcloud-B8Vzd6Te.js +1 -0
- package/dist/Mixcloud-DUpwZ8OV.mjs +112 -0
- package/dist/Mux-DnGUsZf_.mjs +164 -0
- package/dist/Mux-DxeB-oUm.js +1 -0
- package/dist/Preview-B6JRCY5f.mjs +127 -0
- package/dist/Preview-BaBBV6Br.js +1 -0
- package/dist/SoundCloud-3R2aIdUg.js +1 -0
- package/dist/SoundCloud-BcgEw6hR.mjs +122 -0
- package/dist/Streamable-COL4hBFv.js +1 -0
- package/dist/Streamable-DRiRQhSA.mjs +114 -0
- package/dist/Twitch-C38Ew4Tp.mjs +116 -0
- package/dist/Twitch-CYscPCZR.js +1 -0
- package/dist/Vidyard-B1Dr9_bu.mjs +112 -0
- package/dist/Vidyard-D1vZHm1b.js +1 -0
- package/dist/Vimeo-Be31RVkU.mjs +145 -0
- package/dist/Vimeo-DdBHVpAB.js +1 -0
- package/dist/Wistia-CiLiibvT.js +1 -0
- package/dist/Wistia-DoeQgYov.mjs +123 -0
- package/dist/YouTube-Dx2BhB3o.mjs +175 -0
- package/dist/YouTube-uQuz_KMN.js +1 -0
- package/dist/chatpers_list.json.d.ts +964 -0
- package/dist/components/Atoms/AssistantImageModal/ImageModal.d.ts +6 -0
- package/dist/components/Atoms/BottomInput/BottomInput.d.ts +2 -0
- package/dist/components/Atoms/BottomNavButton/BottomNavButton.d.ts +2 -0
- package/dist/components/Atoms/BottomNavMenu/BottomNavMenu.d.ts +2 -0
- package/dist/components/Atoms/BottomNavMenu/MobileBottomNavMenu.d.ts +2 -0
- package/dist/components/Atoms/BottomNavToast/BottomNavToast.d.ts +2 -0
- package/dist/components/Atoms/BottomTopicChapter/BottomTopicChapter.d.ts +1 -0
- package/dist/components/Atoms/Button/Button.d.ts +9 -0
- package/dist/components/Atoms/Button/ButtonConstants.d.ts +44 -0
- package/dist/components/Atoms/Button/Buttons.d.ts +44 -0
- package/dist/components/Atoms/Checkbox/Checkbox.d.ts +8 -0
- package/dist/components/Atoms/CustmBtn/CustmBtn.d.ts +10 -0
- package/dist/components/Atoms/CustmBtn/GradientButton.style.d.ts +59 -0
- package/dist/components/Atoms/CustomButton/ButtonTheme.d.ts +2 -0
- package/dist/components/Atoms/CustomButton/CustomButton.d.ts +2 -0
- package/dist/components/Atoms/Dropdown/Dropdown.d.ts +2 -0
- package/dist/components/Atoms/ExtractedDiagramView/ExtractedDiagramView.d.ts +4 -0
- package/dist/components/Atoms/GlobalButton/ButtonUtils.d.ts +89 -0
- package/dist/components/Atoms/GlobalButton/GlobalButton.d.ts +15 -0
- package/dist/components/Atoms/GlobalButtonV2/GlobalButtonV2.d.ts +18 -0
- package/dist/components/Atoms/GlobalButtonV2/GlobalButtonV2.styles.d.ts +118 -0
- package/dist/components/Atoms/GlobalButtonV2/getButtonStyles.d.ts +15 -0
- package/dist/components/Atoms/Input/Input.d.ts +7 -0
- package/dist/components/Atoms/LatexRenderView/LatexRenderView.d.ts +1 -0
- package/dist/components/Atoms/MenuNavbar/MenuNavbar.d.ts +2 -0
- package/dist/components/Atoms/Modal/Modal.d.ts +12 -0
- package/dist/components/Atoms/Pagination/Pagination.d.ts +2 -0
- package/dist/components/Atoms/Pagination/TablePagination.d.ts +2 -0
- package/dist/components/Atoms/PrivacyTouchPoint/PrivacyTouchPoint.d.ts +1 -0
- package/dist/components/Atoms/PrivacyTouchPoint/PrivacyTouchPoint.stories.d.ts +40 -0
- package/dist/components/Atoms/Radio/Radio.d.ts +8 -0
- package/dist/components/Atoms/Select/Select.d.ts +9 -0
- package/dist/components/Atoms/Spinner/Spinner.d.ts +8 -0
- package/dist/components/Atoms/SummaryLine.d.ts +3 -0
- package/dist/components/Atoms/Switch/Switch.d.ts +8 -0
- package/dist/components/Atoms/TextArea/TextArea.d.ts +7 -0
- package/dist/components/Atoms/Toast/Toast.d.ts +7 -0
- package/dist/components/Atoms/TranscriptionImagePreview/ImageAnnotation.d.ts +4 -0
- package/dist/components/Atoms/TranscriptionImagePreview/ImageTranscriptionStyles.d.ts +1 -0
- package/dist/components/Atoms/TranscriptionImagePreview/TranscriptionImagePreview.d.ts +1 -0
- package/dist/components/Atoms/Typography/Typography.d.ts +8 -0
- package/dist/components/Atoms/Typography/TypographyConstants.d.ts +53 -0
- package/dist/components/Atoms/imageModal.d.ts +2 -0
- package/dist/components/Atoms/useCustomToast.d.ts +6 -0
- package/dist/components/Molecules/AccordianPay4/Accordian.d.ts +5 -0
- package/dist/components/Molecules/AccordianPay4/Accordian.styles.d.ts +117 -0
- package/dist/components/Molecules/ActivityBanner/ActivityBanner.d.ts +1 -0
- package/dist/components/Molecules/ActivityBanner/activityBannerStyles.d.ts +75 -0
- package/dist/components/Molecules/AddPostCard/AddPostCard.d.ts +2 -0
- package/dist/components/Molecules/AddPostCard/addPostStyles.d.ts +86 -0
- package/dist/components/Molecules/BottomNav/BottomNav.d.ts +2 -0
- package/dist/components/Molecules/BottomNav/BottomNavStyles.d.ts +52 -0
- package/dist/components/Molecules/DashPlayer/DashPlayer.d.ts +4 -0
- package/dist/components/Molecules/DashPlayer/ShakaPlayer.d.ts +3 -0
- package/dist/components/Molecules/Descriptive/DescriptiveLabel.d.ts +6 -0
- package/dist/components/Molecules/Descriptive/descriptiveStyles.d.ts +68 -0
- package/dist/components/Molecules/DescriptiveAnswer/DescriptiveAnswerV1.d.ts +2 -0
- package/dist/components/Molecules/FactualCard/FactualCard.d.ts +46 -0
- package/dist/components/Molecules/FactualCard/FactualCard.style.d.ts +64 -0
- package/dist/components/Molecules/FloatingButton/FloatingButton.d.ts +11 -0
- package/dist/components/Molecules/FloatingButton/FloatingButton.styles.d.ts +21 -0
- package/dist/components/Molecules/HighChart/HighChart.d.ts +2 -0
- package/dist/components/Molecules/HighChart/HighChartPie.d.ts +2 -0
- package/dist/components/Molecules/ImageView/ImageModal.d.ts +2 -0
- package/dist/components/Molecules/InvalidSession/InvalidSession.d.ts +7 -0
- package/dist/components/Molecules/InvalidSession/InvalidSession.styles.d.ts +15 -0
- package/dist/components/Molecules/LatexRender/DefaultRender.d.ts +4 -0
- package/dist/components/Molecules/LatexRender/LatexRender.d.ts +2 -0
- package/dist/components/Molecules/LatexRender/MarkdownRender.d.ts +4 -0
- package/dist/components/Molecules/MediaModal/MediaModal.d.ts +16 -0
- package/dist/components/Molecules/MediaModal/MediaModal.style.d.ts +8 -0
- package/dist/components/Molecules/Pay4Use/ExecutionModal.d.ts +18 -0
- package/dist/components/Molecules/Pay4Use/ExecutionModalStyles.d.ts +344 -0
- package/dist/components/Molecules/Pay4Use/PayToUsePrompt.d.ts +2 -0
- package/dist/components/Molecules/Pay4Use/PayToUsePromptStyles.d.ts +108 -0
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.d.ts +26 -0
- package/dist/components/Molecules/PerformanceScreen/QuizResult.styles.d.ts +32 -0
- package/dist/components/Molecules/PostCard/PostCard.d.ts +2 -0
- package/dist/components/Molecules/PostCard/PostImageGallary.d.ts +1 -0
- package/dist/components/Molecules/PostCard/postCardStyles.d.ts +152 -0
- package/dist/components/Molecules/RecapNode/ContentView.d.ts +2 -0
- package/dist/components/Molecules/RecapNode/SectionView.d.ts +7 -0
- package/dist/components/Molecules/RecapNode/VideoView.d.ts +8 -0
- package/dist/components/Molecules/RequestSent/RequestSent.d.ts +10 -0
- package/dist/components/Molecules/RequestSent/RequestSent.styles.d.ts +3 -0
- package/dist/components/Molecules/RevisionCompleteCard/RevisionCompleteCard.d.ts +16 -0
- package/dist/components/Molecules/RevisionCompleteCard/RevisionCompleteCard.styles.d.ts +22 -0
- package/dist/components/Molecules/RevisionIntroCard/RevisionCard.styles.d.ts +10 -0
- package/dist/components/Molecules/RevisionIntroCard/RevisionIntro.d.ts +13 -0
- package/dist/components/Molecules/SmartLearn/SmartLearn.d.ts +5 -0
- package/dist/components/Molecules/SmartLearn/SmartLearn.styles.d.ts +385 -0
- package/dist/components/Molecules/SmartLearn/types.d.ts +31 -0
- package/dist/components/Molecules/SortMenu/SortMenu.d.ts +2 -0
- package/dist/components/Molecules/SortMenu/sortMenuStyles.d.ts +32 -0
- package/dist/components/Molecules/StaticscreensLearnmore/Staticback.d.ts +20 -0
- package/dist/components/Molecules/StaticscreensLearnmore/Staticback.styles.d.ts +238 -0
- package/dist/components/Molecules/TableCustomizer/CellEditor.d.ts +12 -0
- package/dist/components/Molecules/TableCustomizer/HTMLImporter.d.ts +4 -0
- package/dist/components/Molecules/TableCustomizer/MarkdownImporter.d.ts +4 -0
- package/dist/components/Molecules/TableCustomizer/TableHeader.d.ts +11 -0
- package/dist/components/Molecules/TableCustomizer/TablePreview.d.ts +8 -0
- package/dist/components/Molecules/TableCustomizer/TableStructureControls.d.ts +5 -0
- package/dist/components/Molecules/TableCustomizer/hooks/useTableGenerator.d.ts +8 -0
- package/dist/components/Molecules/TableCustomizer/hooks/useTableState.d.ts +27 -0
- package/dist/components/Molecules/TableCustomizer/index.d.ts +4 -0
- package/dist/components/Molecules/TableCustomizer/utils/htmlTableParser.d.ts +9 -0
- package/dist/components/Molecules/TableCustomizer/utils/markdownTableParser.d.ts +9 -0
- package/dist/components/Molecules/TermsAndPrivacy/PrivacyPolicy.d.ts +2 -0
- package/dist/components/Molecules/TermsAndPrivacy/TermsAndConditions.d.ts +2 -0
- package/dist/components/Molecules/TermsAndPrivacy/components/ContactCard.d.ts +7 -0
- package/dist/components/Molecules/TermsAndPrivacy/components/NestedList.d.ts +7 -0
- package/dist/components/Molecules/TermsAndPrivacy/helpers/ParentHelper.d.ts +40 -0
- package/dist/components/Molecules/TermsAndPrivacy/helpers/RefundAndCancellationHelper.d.ts +12 -0
- package/dist/components/Molecules/TermsAndPrivacy/helpers/SchoolHelper.d.ts +31 -0
- package/dist/components/Molecules/TermsAndPrivacy/helpers/StudentHelper.d.ts +44 -0
- package/dist/components/Molecules/TermsAndPrivacy/helpers/TeacherHelper.d.ts +40 -0
- package/dist/components/Molecules/TimerClock/TimerClock.d.ts +12 -0
- package/dist/components/Molecules/Tutor/Assistant/Assistant.d.ts +2 -0
- package/dist/components/Molecules/Tutor/Assistant/Assistant.styles.d.ts +537 -0
- package/dist/components/Molecules/Tutor/Assistant/AssistantV2.d.ts +14 -0
- package/dist/components/Molecules/Tutor/Assistant/AssistantV2.styles.d.ts +109 -0
- package/dist/components/Molecules/Tutor/Assistant/TutorAssistant.d.ts +2 -0
- package/dist/components/Molecules/Tutor/BubbleLoader.d.ts +1 -0
- package/dist/components/Molecules/Tutor/TutorSummary/TutorSummary.d.ts +1 -0
- package/dist/components/Molecules/Tutor/User/User.d.ts +1 -0
- package/dist/components/Molecules/VideoView/VideoModal.d.ts +2 -0
- package/dist/components/Molecules/WallBanner/WallBanner.d.ts +2 -0
- package/dist/components/Molecules/WallBanner/wallBannerStyles.d.ts +1 -0
- package/dist/components/Molecules/WallCard/WallCard.d.ts +1 -0
- package/dist/components/Molecules/comprehension/ComprehensionLayout.d.ts +37 -0
- package/dist/components/Molecules/comprehension/ComprehensionStyles.d.ts +21 -0
- package/dist/components/Molecules/comprehension/SubQuestionLayout.d.ts +45 -0
- package/dist/components/Molecules/optionLayouts/fibtemp.d.ts +2 -0
- package/dist/components/Molecules/optionLayouts/mcqtemp.d.ts +2 -0
- package/dist/components/Molecules/optionLayouts/scqStudent.d.ts +2 -0
- package/dist/components/Molecules/optionLayouts/scqtemp.d.ts +2 -0
- package/dist/components/Molecules/questionLayouts/AnswerLayouts.d.ts +1 -0
- package/dist/components/Molecules/questionLayouts/QuestionsLayout.d.ts +1 -0
- package/dist/components/Organisms/ActivityList/ActivityList.d.ts +2 -0
- package/dist/components/Organisms/ChatView/ChatView.d.ts +1 -0
- package/dist/components/Organisms/FlashCardNode/FlashCardNode.d.ts +3 -0
- package/dist/components/Organisms/FlashCardNode/FlashcardContainer.d.ts +30 -0
- package/dist/components/Organisms/FlashCardNode/IconBar.d.ts +7 -0
- package/dist/components/Organisms/FlashCardNode/MobileAccordionView.d.ts +12 -0
- package/dist/components/Organisms/FlashCardNode/NodeHandles.d.ts +3 -0
- package/dist/components/Organisms/ISEditor-V2/EditableDiv.d.ts +4 -0
- package/dist/components/Organisms/ISEditor-V2/Editor.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V2/EditorConstants.d.ts +14 -0
- package/dist/components/Organisms/ISEditor-V2/EditorContext.d.ts +8 -0
- package/dist/components/Organisms/ISEditor-V2/ISEditor.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V2/LatexBlock.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V2/LatexCopyModal.d.ts +6 -0
- package/dist/components/Organisms/ISEditor-V2/LatexModal.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V2/LatexView.d.ts +5 -0
- package/dist/components/Organisms/ISEditor-V2/MathSymbolButton.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/MathToolBar.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V2/NewTableCustomisation.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/RawMathModal.d.ts +6 -0
- package/dist/components/Organisms/ISEditor-V2/RowColumnModal.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockEight.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockEleven.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockFive.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockFour.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockNine.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockOne.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockSeven.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockSix.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockTen.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockThree.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockTwelve.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/Symbols/MathFormulasBlockTwo.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V2/TableBlock.d.ts +13 -0
- package/dist/components/Organisms/ISEditor-V2/TableModal.d.ts +5 -0
- package/dist/components/Organisms/ISEditor-V2/ToolBar.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V2/editor.types.d.ts +24 -0
- package/dist/components/Organisms/ISEditor-V2/tableBlockStyles.d.ts +48 -0
- package/dist/components/Organisms/ISEditor-V3/EditableDiv.d.ts +4 -0
- package/dist/components/Organisms/ISEditor-V3/Editor.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V3/EditorConstants.d.ts +14 -0
- package/dist/components/Organisms/ISEditor-V3/EditorContext.d.ts +8 -0
- package/dist/components/Organisms/ISEditor-V3/ISEditor.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V3/LatexBlock.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V3/LatexCopyModal.d.ts +6 -0
- package/dist/components/Organisms/ISEditor-V3/LatexModal.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V3/LatexView.d.ts +5 -0
- package/dist/components/Organisms/ISEditor-V3/MathSymbolButton.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/MathToolBar.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V3/NewTableCustomisation.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/RawMathModal.d.ts +6 -0
- package/dist/components/Organisms/ISEditor-V3/RowColumnModal.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockEight.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockEleven.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockFive.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockFour.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockNine.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockOne.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockSeven.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockSix.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockTen.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockThree.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockTwelve.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/Symbols/MathFormulasBlockTwo.d.ts +1 -0
- package/dist/components/Organisms/ISEditor-V3/TableBlock.d.ts +13 -0
- package/dist/components/Organisms/ISEditor-V3/TableModal.d.ts +5 -0
- package/dist/components/Organisms/ISEditor-V3/ToolBar.d.ts +2 -0
- package/dist/components/Organisms/ISEditor-V3/editor.types.d.ts +24 -0
- package/dist/components/Organisms/ISEditor-V3/tableBlockStyles.d.ts +48 -0
- package/dist/components/Organisms/LiveStreaming/LiveStreaming.d.ts +1 -0
- package/dist/components/Organisms/PostDetails/ImageGallery.d.ts +1 -0
- package/dist/components/Organisms/PostDetails/PostDetails.d.ts +2 -0
- package/dist/components/Organisms/PostDetails/PostInfo.d.ts +1 -0
- package/dist/components/Organisms/PostDetails/postDetailStyles.d.ts +35 -0
- package/dist/components/Organisms/PostsList/PostList.d.ts +2 -0
- package/dist/components/Organisms/ProgressView/ProgressView.d.ts +2 -0
- package/dist/components/Organisms/ProgressView/ProgressView.stories.d.ts +685 -0
- package/dist/components/Organisms/ProgressView/ProgressViewPresenter.d.ts +9 -0
- package/dist/components/Organisms/ProgressView/ProgressViewStyles.d.ts +174 -0
- package/dist/components/Organisms/RecapGraph/Reactgraphflow.d.ts +13 -0
- package/dist/components/Organisms/RecapGraph/useRecapGraphLogic.d.ts +29 -0
- package/dist/components/Organisms/ReviewComponent/ChatPresenter.d.ts +1 -0
- package/dist/components/Organisms/ReviewComponent/KeyTakeAway.d.ts +4 -0
- package/dist/components/Organisms/ReviewComponent/MoreQuestions.d.ts +2 -0
- package/dist/components/Organisms/ReviewComponent/MoreQuestions.stories.d.ts +13 -0
- package/dist/components/Organisms/ReviewComponent/MoreQuestionsStyles.d.ts +31 -0
- package/dist/components/Organisms/ReviewComponent/Review.d.ts +52 -0
- package/dist/components/Organisms/ReviewComponent/ReviewPresenter.d.ts +49 -0
- package/dist/components/Organisms/ReviewComponent/ReviewPresenter.stories.d.ts +181 -0
- package/dist/components/Organisms/ReviewComponent/ReviewStyles.d.ts +77 -0
- package/dist/components/Organisms/ReviewComponent/reviewUtils.d.ts +1913 -0
- package/dist/components/Organisms/ReviewComponent/selectionUtils.d.ts +3002 -0
- package/dist/components/Organisms/StudentEditor/components/EditorComponent.d.ts +4 -0
- package/dist/components/Organisms/StudentEditor/components/EditorStyles.d.ts +41 -0
- package/dist/components/Organisms/StudentEditor/components/MathElement.d.ts +7 -0
- package/dist/components/Organisms/StudentEditor/components/MathKeyboard.d.ts +9 -0
- package/dist/components/Organisms/StudentEditor/components/MathKeyboardSME.d.ts +9 -0
- package/dist/components/Organisms/StudentEditor/components/MathModal.d.ts +9 -0
- package/dist/components/Organisms/StudentEditor/components/MathModalSME.d.ts +10 -0
- package/dist/components/Organisms/StudentEditor/components/Shortcuts.d.ts +4 -0
- package/dist/components/Organisms/StudentEditor/components/ShortcutsSME.d.ts +4 -0
- package/dist/components/Organisms/StudentEditor/components/TextEditor.d.ts +2 -0
- package/dist/components/Organisms/StudentEditor/components/mathModalStyles.d.ts +210 -0
- package/dist/components/Organisms/StudentEditor/utils/keyboard-config.d.ts +2132 -0
- package/dist/components/Organisms/StudentEditor/utils/keyboardConstants.d.ts +1779 -0
- package/dist/components/Organisms/StudentEditor/utils/slate-conversions.d.ts +19 -0
- package/dist/components/Organisms/StudentEditor/utils/slate-plugins.d.ts +1 -0
- package/dist/components/Organisms/StudentInsights/GaugeChart.d.ts +9 -0
- package/dist/components/Organisms/StudentInsights/InsightsComponent.d.ts +14 -0
- package/dist/components/Organisms/StudentInsights/InsightsComponent.stories.d.ts +334 -0
- package/dist/components/Organisms/StudentInsights/PieChart.d.ts +8 -0
- package/dist/components/Organisms/StudentInsights/insights.styles.d.ts +177 -0
- package/dist/components/Organisms/StudentInsights/text.d.ts +7 -0
- package/dist/components/Organisms/TableComponent/TableComponent.d.ts +2 -0
- package/dist/components/Organisms/TutorFeedback/TutorFeedback.d.ts +2 -0
- package/dist/components/themes/Theme.d.ts +61 -0
- package/dist/favicon.ico +0 -0
- package/dist/index-DIcS8zy8.js +1988 -0
- package/dist/index-DXcjyaIP.mjs +144104 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.esm.js +72 -0
- package/dist/index.html +47 -0
- package/dist/index.js +1 -0
- package/dist/logo192.png +0 -0
- package/dist/logo512.png +0 -0
- package/dist/manifest.json +25 -0
- package/dist/mathlive.min-BtrrwzrH.js +3179 -0
- package/dist/mathlive.min-Cv3GrIcG.mjs +14907 -0
- package/dist/robots.txt +3 -0
- package/dist/shaka-player.compiled-C3nrKFca.js +98 -0
- package/dist/shaka-player.compiled-DRdm8ZDU.mjs +22982 -0
- package/dist/utils/Helper.d.ts +23 -0
- package/dist/utils/LearningPathUtils.d.ts +60 -0
- package/dist/utils/RecapData.d.ts +694 -0
- package/dist/utils/ReviewPresenterUtils.d.ts +9 -0
- package/dist/utils/TutorConstants.d.ts +78 -0
- package/dist/utils/accordion/accordionHelper.d.ts +7 -0
- package/dist/utils/accordion/accordion_images.d.ts +31 -0
- package/dist/utils/accordionConstants.d.ts +17 -0
- package/dist/utils/battery-customisation.d.ts +36 -0
- package/dist/utils/common-utils.d.ts +54 -0
- package/dist/utils/constants.d.ts +762 -0
- package/dist/utils/contentUtils.d.ts +40 -0
- package/dist/utils/crypto.d.ts +2 -0
- package/dist/utils/customTheme.d.ts +1 -0
- package/dist/utils/dateUtils.d.ts +1 -0
- package/dist/utils/emotionalLottieConstants.d.ts +6 -0
- package/dist/utils/emotionalScriptConstants.d.ts +15 -0
- package/dist/utils/emotions.d.ts +4 -0
- package/dist/utils/excludeSubject.d.ts +2 -0
- package/dist/utils/math-images.d.ts +6 -0
- package/dist/utils/pagination/Pagination.d.ts +11 -0
- package/dist/utils/presentationModes.d.ts +117 -0
- package/dist/utils/subject-icons.d.ts +9 -0
- package/dist/utils/taskUtils.d.ts +1 -0
- package/dist/utils/testingutils.d.ts +3110 -0
- package/dist/utils/tutor-utils.d.ts +1 -0
- package/dist/utils/wall/wall-constants.d.ts +41 -0
- package/dist/utils/wall/wall-imges.d.ts +64 -0
- package/dist/utils/wall/wall-message-bank.d.ts +28 -0
- package/dist/utils/wall-constants.d.ts +136 -0
- package/dist/utils/wall-images.d.ts +64 -0
- package/package.json +148 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";const fx=require("./index-DIcS8zy8.js");function pk(Bo,Vo){for(var er=0;er<Vo.length;er++){const Di=Vo[er];if(typeof Di!="string"&&!Array.isArray(Di)){for(const F in Di)if(F!=="default"&&!(F in Bo)){const Lr=Object.getOwnPropertyDescriptor(Di,F);Lr&&Object.defineProperty(Bo,F,Lr.get?Lr:{enumerable:!0,get:()=>Di[F]})}}}return Object.freeze(Object.defineProperty(Bo,Symbol.toStringTag,{value:"Module"}))}var rh={};/*
|
|
2
|
+
@license
|
|
3
|
+
Shaka Player
|
|
4
|
+
Copyright 2016 Google LLC
|
|
5
|
+
SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/(function(Bo){(function(){var Vo=typeof window<"u"?window:fx.commonjsGlobal,er={};(function(F,Lr,mk){var d;function oh(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var hu=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function dx(e){e=[typeof globalThis=="object"&&globalThis,e,typeof F=="object"&&F,typeof self=="object"&&self,typeof Lr=="object"&&Lr];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}var ni=dx(this);function Ze(e,t){if(t)e:{var n=ni;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}e=e[e.length-1],i=n[e],t=t(i),t!=i&&t!=null&&hu(n,e,{configurable:!0,writable:!0,value:t})}}Ze("Symbol",function(e){function t(o){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(i+(o||"")+"_"+r++,o)}function n(o,s){this.g=o,hu(this,"description",{configurable:!0,writable:!0,value:s})}if(e)return e;n.prototype.toString=function(){return this.g};var i="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return t}),Ze("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var i=ni[t[n]];typeof i=="function"&&typeof i.prototype[e]!="function"&&hu(i.prototype,e,{configurable:!0,writable:!0,value:function(){return sh(oh(this))}})}return e});function sh(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}function g(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if(typeof e.length=="number")return{next:oh(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function H(e){if(!(e instanceof Array)){e=g(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}var px=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},nc;if(typeof Object.setPrototypeOf=="function")nc=Object.setPrototypeOf;else{var ic;e:{var hx={a:!0},uh={};try{uh.__proto__=hx,ic=uh.a;break e}catch{}ic=!1}nc=ic?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var ah=nc;function et(e,t){if(e.prototype=px(t.prototype),e.prototype.constructor=e,ah)ah(e,t);else for(var n in t)if(n!="prototype")if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.zm=t.prototype}function gu(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function rc(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}gu.prototype.s=function(e){this.h=e};function oc(e,t){e.i={Sh:t,di:!0},e.g=e.m||e.j}gu.prototype.return=function(e){this.i={return:e},this.g=this.j};function T(e,t,n){return e.g=n,{value:t}}gu.prototype.u=function(e){this.g=e};function K(e){e.g=0}function ue(e,t,n){e.m=t,n!=null&&(e.j=n)}function ii(e,t){e.m=0,e.j=t||0}function ce(e,t,n){e.g=t,e.m=n||0}function ae(e,t){return e.m=t||0,t=e.i.Sh,e.i=null,t}function on(e){e.A=[e.i],e.m=0,e.j=0}function sn(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.di?e.g=e.m||e.j:n.u!=null&&e.j<n.u?(e.g=n.u,e.i=null):e.g=e.j:e.g=t}function gx(e){this.g=new gu,this.h=e}function mx(e,t){rc(e.g);var n=e.g.l;return n?sc(e,"return"in n?n.return:function(i){return{value:i,done:!0}},t,e.g.return):(e.g.return(t),Ho(e))}function sc(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.o=!1,r;var o=r.value}catch(s){return e.g.l=null,oc(e.g,s),Ho(e)}return e.g.l=null,i.call(e.g,o),Ho(e)}function Ho(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(n){e.g.h=void 0,oc(e.g,n)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.di)throw t.Sh;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function vx(e){this.next=function(t){return rc(e.g),e.g.l?t=sc(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=Ho(e)),t},this.throw=function(t){return rc(e.g),e.g.l?t=sc(e,e.g.l.throw,t,e.g.s):(oc(e.g,t),t=Ho(e)),t},this.return=function(t){return mx(e,t)},this[Symbol.iterator]=function(){return this}}function yx(e){function t(i){return e.next(i)}function n(i){return e.throw(i)}return new Promise(function(i,r){function o(s){s.done?i(s.value):Promise.resolve(s.value).then(t,n).then(o,r)}o(e.next())})}function k(e){return yx(new vx(new gx(e)))}function pt(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}Ze("Promise",function(e){function t(s){this.h=0,this.i=void 0,this.g=[],this.o=!1;var u=this.j();try{s(u.resolve,u.reject)}catch(a){u.reject(a)}}function n(){this.g=null}function i(s){return s instanceof t?s:new t(function(u){u(s)})}if(e)return e;n.prototype.h=function(s){if(this.g==null){this.g=[];var u=this;this.i(function(){u.l()})}this.g.push(s)};var r=ni.setTimeout;n.prototype.i=function(s){r(s,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var s=this.g;this.g=[];for(var u=0;u<s.length;++u){var a=s[u];s[u]=null;try{a()}catch(l){this.j(l)}}}this.g=null},n.prototype.j=function(s){this.i(function(){throw s})},t.prototype.j=function(){function s(l){return function(c){a||(a=!0,l.call(u,c))}}var u=this,a=!1;return{resolve:s(this.F),reject:s(this.l)}},t.prototype.F=function(s){if(s===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(s instanceof t)this.H(s);else{e:switch(typeof s){case"object":var u=s!=null;break e;case"function":u=!0;break e;default:u=!1}u?this.C(s):this.m(s)}},t.prototype.C=function(s){var u=void 0;try{u=s.then}catch(a){this.l(a);return}typeof u=="function"?this.I(u,s):this.m(s)},t.prototype.l=function(s){this.s(2,s)},t.prototype.m=function(s){this.s(1,s)},t.prototype.s=function(s,u){if(this.h!=0)throw Error("Cannot settle("+s+", "+u+"): Promise already settled in state"+this.h);this.h=s,this.i=u,this.h===2&&this.G(),this.A()},t.prototype.G=function(){var s=this;r(function(){if(s.B()){var u=ni.console;typeof u<"u"&&u.error(s.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var s=ni.CustomEvent,u=ni.Event,a=ni.dispatchEvent;return typeof a>"u"?!0:(typeof s=="function"?s=new s("unhandledrejection",{cancelable:!0}):typeof u=="function"?s=new u("unhandledrejection",{cancelable:!0}):(s=ni.document.createEvent("CustomEvent"),s.initCustomEvent("unhandledrejection",!1,!0,s)),s.promise=this,s.reason=this.i,a(s))},t.prototype.A=function(){if(this.g!=null){for(var s=0;s<this.g.length;++s)o.h(this.g[s]);this.g=null}};var o=new n;return t.prototype.H=function(s){var u=this.j();s.Le(u.resolve,u.reject)},t.prototype.I=function(s,u){var a=this.j();try{s.call(u,a.resolve,a.reject)}catch(l){a.reject(l)}},t.prototype.then=function(s,u){function a(p,h){return typeof p=="function"?function(m){try{l(p(m))}catch(y){c(y)}}:h}var l,c,f=new t(function(p,h){l=p,c=h});return this.Le(a(s,l),a(u,c)),f},t.prototype.catch=function(s){return this.then(void 0,s)},t.prototype.Le=function(s,u){function a(){switch(l.h){case 1:s(l.i);break;case 2:u(l.i);break;default:throw Error("Unexpected state: "+l.h)}}var l=this;this.g==null?o.h(a):this.g.push(a),this.o=!0},t.resolve=i,t.reject=function(s){return new t(function(u,a){a(s)})},t.race=function(s){return new t(function(u,a){for(var l=g(s),c=l.next();!c.done;c=l.next())i(c.value).Le(u,a)})},t.all=function(s){var u=g(s),a=u.next();return a.done?i([]):new t(function(l,c){function f(m){return function(y){p[m]=y,h--,h==0&&l(p)}}var p=[],h=0;do p.push(void 0),h++,i(a.value).Le(f(p.length-1),c),a=u.next();while(!a.done)})},t});function bn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Ze("WeakMap",function(e){function t(a){if(this.g=(u+=Math.random()+1).toString(),a){a=g(a);for(var l;!(l=a.next()).done;)l=l.value,this.set(l[0],l[1])}}function n(){}function i(a){var l=typeof a;return l==="object"&&a!==null||l==="function"}function r(a){if(!bn(a,s)){var l=new n;hu(a,s,{value:l})}}function o(a){var l=Object[a];l&&(Object[a]=function(c){return c instanceof n?c:(Object.isExtensible(c)&&r(c),l(c))})}if(function(){if(!e||!Object.seal)return!1;try{var a=Object.seal({}),l=Object.seal({}),c=new e([[a,2],[l,3]]);return c.get(a)!=2||c.get(l)!=3?!1:(c.delete(a),c.set(l,4),!c.has(a)&&c.get(l)==4)}catch{return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var u=0;return t.prototype.set=function(a,l){if(!i(a))throw Error("Invalid WeakMap key");if(r(a),!bn(a,s))throw Error("WeakMap key fail: "+a);return a[s][this.g]=l,this},t.prototype.get=function(a){return i(a)&&bn(a,s)?a[s][this.g]:void 0},t.prototype.has=function(a){return i(a)&&bn(a,s)&&bn(a[s],this.g)},t.prototype.delete=function(a){return i(a)&&bn(a,s)&&bn(a[s],this.g)?delete a[s][this.g]:!1},t}),Ze("Map",function(e){function t(){var u={};return u.sc=u.next=u.head=u}function n(u,a){var l=u[1];return sh(function(){if(l){for(;l.head!=u[1];)l=l.sc;for(;l.next!=l.head;)return l=l.next,{done:!1,value:a(l)};l=null}return{done:!0,value:void 0}})}function i(u,a){var l=a&&typeof a;l=="object"||l=="function"?o.has(a)?l=o.get(a):(l=""+ ++s,o.set(a,l)):l="p_"+a;var c=u[0][l];if(c&&bn(u[0],l))for(u=0;u<c.length;u++){var f=c[u];if(a!==a&&f.key!==f.key||a===f.key)return{id:l,list:c,index:u,entry:f}}return{id:l,list:c,index:-1,entry:void 0}}function r(u){if(this[0]={},this[1]=t(),this.size=0,u){u=g(u);for(var a;!(a=u.next()).done;)a=a.value,this.set(a[0],a[1])}}if(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var u=Object.seal({x:4}),a=new e(g([[u,"s"]]));if(a.get(u)!="s"||a.size!=1||a.get({x:4})||a.set({x:4},"t")!=a||a.size!=2)return!1;var l=a.entries(),c=l.next();return c.done||c.value[0]!=u||c.value[1]!="s"?!1:(c=l.next(),!(c.done||c.value[0].x!=4||c.value[1]!="t"||!l.next().done))}catch{return!1}}())return e;var o=new WeakMap;r.prototype.set=function(u,a){u=u===0?0:u;var l=i(this,u);return l.list||(l.list=this[0][l.id]=[]),l.entry?l.entry.value=a:(l.entry={next:this[1],sc:this[1].sc,head:this[1],key:u,value:a},l.list.push(l.entry),this[1].sc.next=l.entry,this[1].sc=l.entry,this.size++),this},r.prototype.delete=function(u){return u=i(this,u),u.entry&&u.list?(u.list.splice(u.index,1),u.list.length||delete this[0][u.id],u.entry.sc.next=u.entry.next,u.entry.next.sc=u.entry.sc,u.entry.head=null,this.size--,!0):!1},r.prototype.clear=function(){this[0]={},this[1]=this[1].sc=t(),this.size=0},r.prototype.has=function(u){return!!i(this,u).entry},r.prototype.get=function(u){return(u=i(this,u).entry)&&u.value},r.prototype.entries=function(){return n(this,function(u){return[u.key,u.value]})},r.prototype.keys=function(){return n(this,function(u){return u.key})},r.prototype.values=function(){return n(this,function(u){return u.value})},r.prototype.forEach=function(u,a){for(var l=this.entries(),c;!(c=l.next()).done;)c=c.value,u.call(a,c[1],c[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var s=0;return r}),Ze("Set",function(e){function t(n){if(this.g=new Map,n){n=g(n);for(var i;!(i=n.next()).done;)this.add(i.value)}this.size=this.g.size}return function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var n=Object.seal({x:4}),i=new e(g([n]));if(!i.has(n)||i.size!=1||i.add(n)!=i||i.size!=1||i.add({x:4})!=i||i.size!=2)return!1;var r=i.entries(),o=r.next();return o.done||o.value[0]!=n||o.value[1]!=n?!1:(o=r.next(),o.done||o.value[0]==n||o.value[0].x!=4||o.value[1]!=o.value[0]?!1:r.next().done)}catch{return!1}}()?e:(t.prototype.add=function(n){return n=n===0?0:n,this.g.set(n,n),this.size=this.g.size,this},t.prototype.delete=function(n){return n=this.g.delete(n),this.size=this.g.size,n},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(n){return this.g.has(n)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(n,i){var r=this;this.g.forEach(function(o){return n.call(i,o,o,r)})},t)});function uc(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var o=n++;return{value:t(o,e[o]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}Ze("Array.prototype.values",function(e){return e||function(){return uc(this,function(t,n){return n})}}),Ze("Array.from",function(e){return e||function(t,n,i){n=n??function(u){return u};var r=[],o=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if(typeof o=="function"){t=o.call(t);for(var s=0;!(o=t.next()).done;)r.push(n.call(i,o.value,s++))}else for(o=t.length,s=0;s<o;s++)r.push(n.call(i,t[s],s));return r}}),Ze("Array.prototype.keys",function(e){return e||function(){return uc(this,function(t){return t})}}),Ze("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),Ze("Array.prototype.includes",function(e){return e||function(t,n){var i=this;i instanceof String&&(i=String(i));var r=i.length;for(n=n||0,0>n&&(n=Math.max(n+r,0));n<r;n++){var o=i[n];if(o===t||Object.is(o,t))return!0}return!1}});function mu(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}Ze("String.prototype.includes",function(e){return e||function(t,n){return mu(this,t,"includes").indexOf(t,n||0)!==-1}}),Ze("String.fromCodePoint",function(e){return e||function(t){for(var n="",i=0;i<arguments.length;i++){var r=Number(arguments[i]);if(0>r||1114111<r||r!==Math.floor(r))throw new RangeError("invalid_code_point "+r);65535>=r?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(r>>>10&1023|55296),n+=String.fromCharCode(r&1023|56320))}return n}});function lh(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var o=e[r];if(t.call(n,o,r,e))return{ai:r,v:o}}return{ai:-1,v:void 0}}Ze("Array.prototype.findIndex",function(e){return e||function(t,n){return lh(this,t,n).ai}}),Ze("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=g(n);for(var i;!(i=n.next()).done;)this.add(i.value)}}return function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),i=Object.seal({}),r=new e([n]);return!r.has(n)||r.has(i)?!1:(r.delete(n),r.add(i),!r.has(n)&&r.has(i))}catch{return!1}}()?e:(t.prototype.add=function(n){return this.g.set(n,!0),this},t.prototype.has=function(n){return this.g.has(n)},t.prototype.delete=function(n){return this.g.delete(n)},t)}),Ze("Array.prototype.find",function(e){return e||function(t,n){return lh(this,t,n).v}}),Ze("String.prototype.startsWith",function(e){return e||function(t,n){var i=mu(this,t,"startsWith"),r=i.length,o=t.length;n=Math.max(0,Math.min(n|0,i.length));for(var s=0;s<o&&n<r;)if(i[n++]!=t[s++])return!1;return s>=o}}),Ze("Object.entries",function(e){return e||function(t){var n=[],i;for(i in t)bn(t,i)&&n.push([i,t[i]]);return n}});var Tx=typeof Object.assign=="function"?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)bn(i,r)&&(e[r]=i[r])}return e};Ze("Object.assign",function(e){return e||Tx}),Ze("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(n){return Promise.resolve(t()).then(function(){return n})},function(n){return Promise.resolve(t()).then(function(){throw n})})}}),Ze("Array.prototype.entries",function(e){return e||function(){return uc(this,function(t,n){return[t,n]})}}),Ze("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),Ze("String.prototype.repeat",function(e){return e||function(t){var n=mu(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var i="";t;)t&1&&(i+=n),(t>>>=1)&&(n+=n);return i}}),Ze("Number.EPSILON",function(){return Math.pow(2,-52)}),Ze("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),Ze("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),Ze("Object.values",function(e){return e||function(t){var n=[],i;for(i in t)bn(t,i)&&n.push(t[i]);return n}}),Ze("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),Ze("String.prototype.endsWith",function(e){return e||function(t,n){var i=mu(this,t,"endsWith");n===void 0&&(n=i.length),n=Math.max(0,Math.min(n|0,i.length));for(var r=t.length;0<r&&0<n;)if(i[--n]!=t[--r])return!1;return 0>=r}}),Ze("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||t===0)return t;var n=Math.floor(Math.abs(t));return 0>t?-n:n}});var xx=this||self;function W(e,t){e=e.split(".");var n=xx;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||t===void 0?n[i]&&n[i]!==Object.prototype[i]?n=n[i]:n=n[i]={}:n[i]=t}function Nr(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}Nr.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)};function vu(e){return e.h/(1-Math.pow(e.g,e.i))}function Go(){this.h=new Nr(2),this.j=new Nr(5),this.g=0,this.i=128e3,this.l=16e3}Go.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},Go.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},Go.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(vu(this.h),vu(this.j))};function Sx(){}function zn(){}function Ae(){}function tr(e){var t=pt.apply(1,arguments);ch.has(e)||(ch.add(e),Ae.apply(Sx,H(t)))}function wx(){}function vk(){}function yk(){}var ch=new Set;F.console&&(new Map().set(1,function(){return console.error.apply(console,H(pt.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,H(pt.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,H(pt.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,H(pt.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,H(pt.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,H(pt.apply(0,arguments)))}),Ae=function(){return console.warn.apply(console,H(pt.apply(0,arguments)))},zn=function(){console.error.apply(console,H(pt.apply(0,arguments)))});function yu(){this.g=new Map}d=yu.prototype,d.push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},d.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},d.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(i){return i!=t});this.g.set(e,n),n.length||this.g.delete(e)}},d.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},d.size=function(){return this.g.size},d.keys=function(){return Array.from(this.g.keys())};function Me(){this.g=new yu}d=Me.prototype,d.release=function(){this.Ra(),this.g=null},d.D=function(e,t,n,i){this.g&&(e=new fh(e,t,n,i),this.g.push(t,e))},d.Aa=function(e,t,n,i){function r(s){o.Ja(e,t,r),n(s)}var o=this;this.D(e,t,r,i)},d.Ja=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=g(i);for(var r=i.next();!r.done;r=i.next())r=r.value,r.target!=e||n!=r.listener&&n||(r.Ja(),this.g.remove(t,r))}},d.Ra=function(){if(this.g){for(var e=[],t=g(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,H(n.value));for(e=g(e),t=e.next();!t.done;t=e.next())t.value.Ja();this.g.g.clear()}},W("shaka.util.EventManager",Me),Me.prototype.removeAll=Me.prototype.Ra,Me.prototype.unlisten=Me.prototype.Ja,Me.prototype.listenOnce=Me.prototype.Aa,Me.prototype.listen=Me.prototype.D,Me.prototype.release=Me.prototype.release;function fh(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=Ax(e,i),this.target.addEventListener(t,n,this.g)}fh.prototype.Ja=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function Ax(e,t){if(t==null)return!1;if(typeof t=="boolean")return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(i){return!n.has(i)}),Ex(e)?t:t.capture||!1}function Ex(e){var t=dh;if(t==null){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),i=function(){},e.addEventListener("test",i,n),e.removeEventListener("test",i,n)}catch{t=!1}dh=t}return t||!1}var dh=void 0;W("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function St(e){this.h=e,this.g=void 0}St.prototype.value=function(){return this.g===void 0&&(this.g=this.h()),this.g};/*
|
|
7
|
+
@license
|
|
8
|
+
Shaka Player
|
|
9
|
+
Copyright 2025 Google LLC
|
|
10
|
+
SPDX-License-Identifier: Apache-2.0
|
|
11
|
+
*/function ye(){return Ix.value()}var Fn=null,ac=null,Ix=new St(function(){var e=void 0;return Fn&&(e=Fn()),!e&&ac&&(e=ac()),e});function lc(e,t){this.g=e,this.h=t}lc.prototype.toString=function(){return"v"+this.g+"."+this.h};function Ee(e,t){var n=new lc(5,0),i=ph,r=i.g,o=n.h-r.h;(0<(n.g-r.g||o)?i.i:i.h)(i.g,n,e,t)}function Cx(e,t,n,i){Ae([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function Mx(e,t,n,i){zn([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}var ph=null;/*
|
|
12
|
+
@license
|
|
13
|
+
Copyright 2008 The Closure Library Authors
|
|
14
|
+
SPDX-License-Identifier: Apache-2.0
|
|
15
|
+
*/var kx=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
|
16
|
+
@license
|
|
17
|
+
Copyright 2006 The Closure Library Authors
|
|
18
|
+
SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
*/function nt(e){var t;e instanceof nt?(Tu(this,e.cc),this.ed=e.ed,xu(this,e.Cb),cc(this,e.vd),this.ob=e.ob,nr(this,e.g.clone()),this.Nc=e.Nc):e&&(t=String(e).match(kx))?(Tu(this,t[1]||"",!0),this.ed=jr(t[2]||""),xu(this,t[3]||"",!0),cc(this,t[4]),this.ob=jr(t[5]||"",!0),nr(this,t[6]||"",!0),this.Nc=jr(t[7]||"")):this.g=new Ur(null)}d=nt.prototype,d.cc="",d.ed="",d.Cb="",d.vd=null,d.ob="",d.Nc="",d.toString=function(){var e=[],t=this.cc;if(t&&e.push(Ko(t,hh,!0),":"),t=this.Cb){e.push("//");var n=this.ed;n&&e.push(Ko(n,hh,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.vd,t!=null&&e.push(":",String(t))}return(t=this.ob)&&(this.Cb&&t.charAt(0)!="/"&&e.push("/"),e.push(Ko(t,t.charAt(0)=="/"?Px:Rx,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Nc)&&e.push("#",Ko(t,Nx)),e.join("")},d.resolve=function(e){var t=this.clone();t.cc==="data"&&(t=new nt);var n=!!e.cc;n?Tu(t,e.cc):n=!!e.ed,n?t.ed=e.ed:n=!!e.Cb,n?xu(t,e.Cb):n=e.vd!=null;var i=e.ob;if(n)cc(t,e.vd);else if(n=!!e.ob){if(i.charAt(0)!="/")if(this.Cb&&!this.ob)i="/"+i;else{var r=t.ob.lastIndexOf("/");r!=-1&&(i=t.ob.substr(0,r+1)+i)}if(i==".."||i==".")i="";else if(i.indexOf("./")!=-1||i.indexOf("/.")!=-1){r=i.lastIndexOf("/",0)==0,i=i.split("/");for(var o=[],s=0;s<i.length;){var u=i[s++];u=="."?r&&s==i.length&&o.push(""):u==".."?((1<o.length||o.length==1&&o[0]!="")&&o.pop(),r&&s==i.length&&o.push("")):(o.push(u),r=!0)}i=o.join("/")}}return n?t.ob=i:n=e.g.toString()!=="",n?nr(t,e.g.clone()):n=!!e.Nc,n&&(t.Nc=e.Nc),t},d.clone=function(){return new nt(this)};function Tu(e,t,n){e.cc=n?jr(t,!0):t,e.cc&&(e.cc=e.cc.replace(/:$/,""))}function xu(e,t,n){e.Cb=n?jr(t,!0):t}function cc(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.vd=t}else e.vd=null}function nr(e,t,n){t instanceof Ur?e.g=t:(n||(t=Ko(t,Lx)),e.g=new Ur(t))}function jr(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Ko(e,t,n){return e!=null?(e=encodeURI(e).replace(t,Dx),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Dx(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var hh=/[#\/\?@]/g,Rx=/[#\?:]/g,Px=/[#\?]/g,Lx=/[#\?@]/g,Nx=/#/g;function Ur(e){this.g=e||null}function Su(e){if(!e.fb&&(e.fb=new Map,e.Ld=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(0<=i){var o=t[n].substring(0,i);r=t[n].substring(i+1)}else o=t[n];o=decodeURIComponent(o.replace(/\+/g," ")),r=r||"",e.add(o,decodeURIComponent(r.replace(/\+/g," ")))}}d=Ur.prototype,d.fb=null,d.Ld=null;function gh(e){return Su(e),e.Ld}d.add=function(e,t){Su(this),this.g=null;var n=this.fb.has(e)?this.fb.get(e):null;return n||this.fb.set(e,n=[]),n.push(t),this.Ld++,this},d.set=function(e,t){return Su(this),this.g=null,this.fb.has(e)?this.fb.set(e,[t]):this.add(e,t),this},d.get=function(e){return Su(this),this.fb.get(e)||[]},d.toString=function(){if(this.g)return this.g;if(!this.fb||!this.fb.size)return"";for(var e=[],t=g(this.fb.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.fb.get(i);for(var r=0;r<i.length;r++){var o=n;i[r]!==""&&(o+="="+encodeURIComponent(i[r])),e.push(o)}}return this.g=e.join("&")},d.clone=function(){var e=new Ur;if(e.g=this.g,this.fb){for(var t=new Map,n=g(this.fb),i=n.next();!i.done;i=n.next()){var r=g(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.fb=t,e.Ld=this.Ld}return e};function Or(){}function ri(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=se(e);t=se(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function gn(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function se(e,t,n){return n=n===void 0?1/0:n,fc(e,t===void 0?0:t,n,Uint8Array)}function mh(e,t,n){return n=n===void 0?1/0:n,fc(e,t===void 0?0:t,n,Uint16Array)}function Ht(e,t,n){return n=n===void 0?1/0:n,fc(e,t===void 0?0:t,n,DataView)}function fc(e,t,n,i){var r=ArrayBuffer.isView(e)?e.buffer:e,o=1;"BYTES_PER_ELEMENT"in i&&(o=i.BYTES_PER_ELEMENT);var s=((e.byteOffset||0)+e.byteLength)/o;return e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/o,s))),new i(r,e,Math.floor(Math.min(e+Math.max(n,0),s))-e)}W("shaka.util.BufferUtils",Or),Or.toDataView=Ht,Or.toUint16=mh,Or.toUint8=se,Or.toArrayBuffer=gn,Or.equal=ri;function M(e,t,n){var i=pt.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(r){this.stack=r.stack}}M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},W("shaka.util.Error",M),M.Severity={RECOVERABLE:1,CRITICAL:2},M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},M.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function ir(){}function ze(e){if(!e)return"";if(e=se(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),F.TextDecoder&&!ye().ph())return e=new TextDecoder().decode(e),e.includes("�")&&zn('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var i=65533;if(e[n]&128?e.length>=n+2&&(e[n]&224)==192&&(e[n+1]&192)==128?(i=(e[n]&31)<<6|e[n+1]&63,n+=1):e.length>=n+3&&(e[n]&240)==224&&(e[n+1]&192)==128&&(e[n+2]&192)==128?(i=(e[n]&15)<<12|(e[n+1]&63)<<6|e[n+2]&63,n+=2):e.length>=n+4&&(e[n]&241)==240&&(e[n+1]&192)==128&&(e[n+2]&192)==128&&(e[n+3]&192)==128&&(i=(e[n]&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63,n+=3):i=e[n],65535>=i)t+=String.fromCharCode(i);else{i-=65536;var r=i&1023;t+=String.fromCharCode(55296+(i>>10)),t+=String.fromCharCode(56320+r)}}return t}function Ri(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new M(2,2,2004);n=Math.floor(e.byteLength/2);var i=new Uint16Array(n);e=Ht(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return pc(i)}function Yn(e){function t(i){return n.byteLength<=i||9<=n[i]&&126>=n[i]}if(!e)return"";var n=se(e);if(n[0]==239&&n[1]==187&&n[2]==191)return ze(n);if(n[0]==254&&n[1]==255)return Ri(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return Ri(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return Ri(e,!1);if(n[1]==0&&n[3]==0)return Ri(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return ze(e);throw new M(2,2,2003)}function Dn(e){if(F.TextEncoder&&!ye().ph()){var t=new TextEncoder;return gn(t.encode(e))}e=encodeURIComponent(e),e=unescape(e),t=new Uint8Array(e.length);for(var n=0;n<e.length;n++)t[n]=e[n].charCodeAt(0);return gn(t)}function dc(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=0;r<e.length;++r)i.setUint16(2*r,e.charCodeAt(r),t);return n}function pc(e){return vh.value()(e)}function Gt(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":" ","‎":"","‏":""},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return r[1]=="#"?(r=r[2]=="x"||r[2]=="X"?parseInt(r.substring(3),16):parseInt(r.substring(2),10),0<=r&&1114111>=r?String.fromCodePoint(r):""):t[r]||"'"}):e||""}W("shaka.util.StringUtils",ir),ir.resetFromCharCode=function(){vh.g=void 0},ir.toUTF16=dc,ir.toUTF8=Dn,ir.fromBytesAutoDetect=Yn,ir.fromUTF16=Ri,ir.fromUTF8=ze;var vh=new St(function(){function e(n){try{var i=new Uint8Array(n);return 0<String.fromCharCode.apply(null,i).length}catch{return!1}}for(var t={Hc:65536};0<t.Hc;t={Hc:t.Hc},t.Hc/=2)if(e(t.Hc))return function(n){return function(i){for(var r="",o=0;o<i.length;o+=n.Hc)r+=String.fromCharCode.apply(null,i.subarray(o,o+n.Hc));return r}}(t);return null});function It(){}function wu(e){return e=pc(se(e)),btoa(e)}function oi(e,t){return t=t??!0,e=wu(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function mn(e){e=F.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}function rr(e){for(var t=e.length/2,n=new Uint8Array(t),i=0;i<t;i++)n[i]=F.parseInt(e.substr(2*i,2),16);return n}function si(e){var t=se(e);e="",t=g(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n=n.toString(16),n.length==1&&(n="0"+n),e+=n;return e}function tt(){for(var e=pt.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var i=n=0;i<e.length;++i){var r=e[i];ArrayBuffer.isView(r)&&r.BYTES_PER_ELEMENT===1?t.set(r,n):t.set(se(r),n),n+=r.byteLength}return t}W("shaka.util.Uint8ArrayUtils",It),It.concat=tt,It.toHex=si,It.fromHex=rr,It.fromBase64=mn,It.toBase64=oi,It.toStandardBase64=wu;function ht(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;if(e.length==1&&t.length==1){var i=new nt(e[0]);return t=new nt(t[0]),t=i.resolve(t),n&&nr(t,n),[t.toString()]}t=t.map(function(u){return new nt(u)}),i=[],e=g(e);for(var r=e.next();!r.done;r=e.next()){r=new nt(r.value);for(var o=g(t),s=o.next();!s.done;s=o.next())s=r.resolve(s.value),n&&nr(s,n),i.push(s.toString())}return i}function ui(e,t,n,i){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},i&&(e.keySystemUris=new Set([i])),e}function yh(e,t){t=t===void 0?"cenc":t;var n=[],i=[],r=[];e.forEach(function(s,u){var a=u;a.length!=22&&(a=oi(rr(u),!1));var l=s;l.length!=22&&(l=oi(rr(s),!1)),s={kty:"oct",kid:a,k:l},n.push(s),i.push(s.kid),r.push(u)}),e=JSON.stringify({keys:n});var o=JSON.stringify({kids:i});return o=[{initData:se(Dn(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+F.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(r)}}function _r(e,t){if(t.length==1)return t[0];if(e=Kt(e,t),e!=null)return e;throw new M(2,4,4025,t)}function Kt(e,t){var n=xh.get(e);n=g(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;for(var r=g(t),o=r.next();!o.done;o=r.next())if(o=o.value,i.test(o.trim()))return o.trim()}return e==pe?"":null}function hc(e,t){var n=[];e=xh.get(e),e=g(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=g(t),o=r.next();!o.done;o=r.next())o=o.value,i.test(o.trim())&&n.push(o.trim())}return n}var pe="text",gt={Ca:"video",ea:"audio",Ta:pe,Tf:"image",hl:"application"},Th=1/15,xh=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Xo(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.o=i,this.j=!1;e:{if(typeof libDPIModule>"u"&&Ae("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u")this.h=LCEVCdec;else if(typeof LcevcDil<"u")this.h=LcevcDil,this.j=!0,Ee("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ae("Could not find LCEVC Library on this page"),e=!1;break e}typeof this.h.SupportObject>"u"?(Ae("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||Ae(this.h.SupportObject.SupportError),e=typeof this.h<"u"&&typeof libDPIModule<"u"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function gc(e,t,n,i){i.type!=="video"||e.o&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.o)}function Sh(e){e.g&&e.i.classList.add("shaka-hidden")}Xo.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function wh(e){return e&&typeof LCEVCdec<"u"?e.codecs=="lvc1":!1}W("shaka.lcevc.Dec",Xo),Xo.prototype.release=Xo.prototype.release;function Pt(e){if(mc.has(e))return mc.get(e);var t=F.ManagedMediaSource||F.MediaSource;return t?(t=t.isTypeSupported(e),mc.set(e,t),t):!1}function br(){var e=F.ManagedSourceBuffer||F.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType}function Ah(){var e=F.ManagedMediaSource||F.MediaSource;return e&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1}var mc=new Map;function Wo(){}Wo.prototype.extract=function(){},Wo.prototype.decode=function(){return[]},Wo.prototype.clear=function(){},Wo.prototype.getStreams=function(){return[]};function vc(){}vc.prototype.init=function(){},vc.prototype.parse=function(){return[]};function Eh(){}d=Eh.prototype,d.init=function(){},d.vf=function(){},d.Fd=function(){},d.remove=function(){},d.Uf=function(){},W("shaka.media.IClosedCaptionParser",Eh);function Bn(e){this.h=new Map,this.i=0,this.j=new vc,(e=Ih(e.toLowerCase()))&&(this.j=e()),this.g=new Wo,(e=or)&&(this.g=e(),this.h.set(this.i,this.g))}d=Bn.prototype,d.init=function(e,t,n){if(t=t===void 0?!1:t,n=n===void 0?-1:n,n!=-1&&this.i!=n){t=n;var i=this.h.get(t);this.h.set(this.i,this.g),i?this.g=i:((i=or)&&(this.g=i()),this.h.set(t,this.g))}else t||this.Fd();this.j.init(e),n!=-1&&(this.i=n)},d.vf=function(e){e=this.j.parse(e),e=g(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=se(t.packet);0<n.length&&this.g.extract(n,t.pts)}return this.g.decode()},d.Fd=function(){this.g.clear()},d.remove=function(e){e=e===void 0?[]:e,e=new Set(e);for(var t=g(this.h.keys()),n=t.next();!n.done;n=t.next())if(n=n.value,!e.has(n)){var i=this.h.get(n);i&&i.clear(),this.h.delete(n)}},d.Uf=function(){return this.g.getStreams()};function yc(e,t){Tc.set(e,t)}function Ih(e){return Tc.get(e)}W("shaka.media.ClosedCaptionParser",Bn),Bn.findDecoder=function(){return or},Bn.unregisterDecoder=function(){or=null},Bn.registerDecoder=function(e){or=e},Bn.findParser=Ih,Bn.unregisterParser=function(e){Tc.delete(e)},Bn.registerParser=yc;var Tc=new Map,or=null;function sr(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=qt,this.scroll=Ch}W("shaka.text.CueRegion",sr);var qt=1;sr.units={PX:0,PERCENTAGE:qt,LINES:2};var Ch="";sr.scrollMode={NONE:Ch,UP:"up"};function Mh(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function Rn(e,t){t=e.indexOf(t),-1<t&&e.splice(t,1)}function xc(e,t,n){if(n||(n=Mh),e.length!=t.length)return!1;t=t.slice(),e=g(e);for(var i=e.next(),r={};!i.done;r={ei:void 0},i=e.next()){if(r.ei=i.value,i=t.findIndex(function(o){return function(s){return n(o.ei,s)}}(r)),i==-1)return!1;t[i]=t[t.length-1],t.pop()}return t.length==0}function zo(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=Mh),e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function Fr(e){this.h=e||"",this.g=0}function Br(e){ur(e,/[ \t]+/gm)}function ur(e,t){return t.lastIndex=e.g,t=t.exec(e.h),t=t==null?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||t==null||t.position!=e.g?null:(e.g+=t.length,t.results)}function ar(e){return e.g==e.h.length?null:(e=ur(e,/[^ \t\n]*/gm))?e[0]:null}function Yo(e){if(e=ur(e,jx),e==null)return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function Vr(e){return e?Yo(new Fr(e)):null}var jx=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Au(){}function Pn(e){function t(i){switch(typeof i){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return i;default:if(!i||ArrayBuffer.isView(i))return i;if(n.has(i))return null;var r=Array.isArray(i);if(i.constructor!=Object&&!r)return null;n.add(i);var o=r?[]:{},s;for(s in i)o[s]=t(i[s]);return r&&(o.length=i.length),o}}var n=new WeakSet;return t(e)}function Pi(e){var t={},n;for(n in e)t[n]=e[n];return t}function Eu(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var i=n.toString(),r=e[n];r!==void 0&&(r=Eu(r))&&t.push(i+":"+r)}e="["+t.join(",")+"]"}else if(typeof e=="function")e="";else if(e instanceof Object){for(n=Object.keys(e),n.sort(),t=[],n=g(n),i=n.next();!i.done;i=n.next())r=i.value,i=JSON.stringify(r),r=e[r],r!==void 0&&(r=Eu(r))&&t.push(i+":"+r);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}W("shaka.util.ObjectUtils",Au),Au.alphabeticalKeyOrderStringify=Eu,Au.shallowCloneObject=Pi,Au.cloneObject=Pn;/*
|
|
20
|
+
@license
|
|
21
|
+
tXml
|
|
22
|
+
Copyright 2015 Tobias Nickel
|
|
23
|
+
SPDX-License-Identifier: MIT
|
|
24
|
+
*/function qo(e,t){var n=n===void 0?!1:n;return e=Yn(e),lr(e,t,n)}function lr(e,t,n){return e=Ux(e,n===void 0?!1:n),!t&&e.length?e[0]:(e=e.find(function(i){return t.split(",").includes(i.tagName)}))?e:null}function Sc(e){return Ac.has(e)?Ac.get(e):""}function Ux(e,t){function n(o,s){s=s===void 0?!1:s;for(var u=[];e[r];)if(e.charCodeAt(r)==60){if(e.charCodeAt(r+1)===47){s=r+2,r=e.indexOf(">",r),s=e.substring(s,r);var a=s.indexOf(o);if(a==-1){var l=o.indexOf(".");0<l&&(a=s.indexOf(o.substring(0,l)))}if(a==-1)throw o=e.substring(0,r).split(`
|
|
25
|
+
`),Error(`Unexpected close tag
|
|
26
|
+
Line: `+(o.length-1)+`
|
|
27
|
+
Column: `+(o[o.length-1].length+1)+`
|
|
28
|
+
Char: `+e[r]);r+1&&(r+=1);break}else if(e.charCodeAt(r+1)===33){if(e.charCodeAt(r+2)==45){for(;r!==-1&&(e.charCodeAt(r)!==62||e.charCodeAt(r-1)!=45||e.charCodeAt(r-2)!=45||r==-1);)r=e.indexOf(">",r+1);r===-1&&(r=e.length)}else if(e.charCodeAt(r+2)===91&&e.charCodeAt(r+8)===91&&e.substr(r+3,5).toLowerCase()==="cdata"){a=e.indexOf("]]>",r),a==-1?(u.push(e.substr(r+9)),r=e.length):(u.push(e.substring(r+9,a)),r=a+3);continue}r++;continue}e:{l=s,r++;var c=i(),f={};for(a=[];e.charCodeAt(r)!==62&&e[r];){var p=e.charCodeAt(r);if(64<p&&91>p||96<p&&123>p){p=i();for(var h=e.charCodeAt(r);h&&h!==39&&h!==34&&!(64<h&&91>h||96<h&&123>h)&&h!==62;)r++,h=e.charCodeAt(r);var m=r+1;if(r=e.indexOf(e[r],m),m=e.slice(m,r),h===39||h===34){if(r===-1){if(l={tagName:c,attributes:f,children:a,parent:null},t)for(c=0;c<a.length;c++)typeof a[c]!="string"&&(a[c].parent=l);a=l;break e}}else m=null,r--;if(p.startsWith("xmlns:")){h=m;var y=p.split(":")[1];Ac.set(h,y),Ec.set(y,h)}c==="tt"&&p==="xml:space"&&m==="preserve"&&(l=!0),f[p]=m}r++}for(e.charCodeAt(r-1)!==47?(r++,a=n(c,l)):r++,l={tagName:c,attributes:f,children:a,parent:null},c=a.length,f=0;f<c;f++)p=a[f],typeof p!="string"?t&&(p.parent=l):f==c-1&&p==`
|
|
29
|
+
`&&a.pop();a=l}if(u.push(a),typeof a=="string")break;a.tagName[0]==="?"&&a.children&&(u.push.apply(u,H(a.children)),a.children=[])}else a=r,r=e.indexOf("<",r)-1,r===-2&&(r=e.length),a=e.slice(a,r+1),s?0<a.length&&u.push(a):(u.length&&a.length==1&&a[0]==`
|
|
30
|
+
`||0<a.trim().length)&&u.push(a),r++;return u}function i(){for(var o=r;`\r
|
|
31
|
+
>/= `.indexOf(e[r])===-1&&e[r];)r++;return e.slice(o,r)}var r=0;return n("")}function Iu(e){return typeof e=="string"}function kh(e){var t=[];if(!e.children)return[];e=g(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function Ne(e,t){var n=[];if(!e.children)return[];e=g(e.children);for(var i=e.next();!i.done;i=e.next())i=i.value,i.tagName===t&&n.push(i);return n}function ot(e){return typeof e=="string"?Gt(e):(e=e.children.reduce(function(t,n){return typeof n=="string"?t+n:t},""),e===""?null:Gt(e))}function $t(e){return Array.from(e.children).every(function(t){return typeof t=="string"})?((e=ot(e))&&(e=e.trim()),e):null}function Vn(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=g(e.children);for(var i=e.next();!i.done;i=e.next())Vn(i.value,t,n)}return n}function Ye(e,t){return e=Ne(e,t),e.length!=1?null:e[0]}function Ln(e,t,n){return e=Dh(e,t,n),e.length!=1?null:e[0]}function oe(e,t,n,i){i=i===void 0?null:i;var r=null;return e=e.attributes[t],e!=null&&(r=n(e)),r??i}function ai(e,t,n){return t=Sc(t),e.attributes[t+":"+n]||null}function Dh(e,t,n){var i=Sc(t);if(t=[],e.children)for(n=i?i+":"+n:n,e=g(e.children),i=e.next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function qn(e,t,n){t=g(t);for(var i=t.next();!i.done;i=t.next())if(i=ai(e,i.value,n))return i;return null}function li(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function $n(e){return!e||(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e),!e)?null:(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null)}function Cu(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return!t||(e=Number(t[1]),!isFinite(e))?null:(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null)}function yt(e){return e=Number(e),e%1===0?e:null}function ci(e){return e=Number(e),e%1===0&&0<e?e:null}function wt(e){return e=Number(e),e%1===0&&0<=e?e:null}function Mu(e){return e=Number(e),isNaN(e)?null:e}function ku(e){return e?e.toLowerCase()==="true":!1}function Ox(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function Du(e){var t=[];e=Gt(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=g(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i=n.match(/^([\w]+)/);if(i){var r=n.match(/(@id='(.*?)')/),o=n.match(/(@t='(\d+)')/),s=n.match(/(@n='(\d+)')/),u=n.match(/\[(\d+)\]/);t.push({name:i[0],id:r?r[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:o?Number(o[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:s?Number(s[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:u?Number(u[1])-1:null,wc:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].wc=n.slice(1))}return t}function Rh(e,t){var n=Du(t.attributes.sel||"");if(n.length){var i=n[n.length-1],r=t.attributes.pos||null;n=i.position,n==null&&(i.t!==null&&(n=Ph(e,"t",i.t)),i.n!==null&&(n=Ph(e,"n",i.n))),n===null?n=r==="prepend"?0:e.length:r==="prepend"?--n:r==="after"&&++n,r=t.tagName,(i=i.wc)&&e[n]?Lh(e[n],r,i,$t(t)||""):(r!=="remove"&&r!=="replace"||e.splice(n,1),r!=="add"&&r!=="replace"||e.splice.apply(e,[n,0].concat(H(t.children))))}}function Ph(e,t,n){var i=0;e=g(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function Lh(e,t,n,i){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=i)}function Nh(e){var t="",n=e.tagName.split(":");0<n.length&&(t=n[0],t=Ec.has(t)?Ec.get(t):""),t=document.createElementNS(t,e.tagName);for(var i in e.attributes)t.setAttribute(i,e.attributes[i]);for(e=g(e.children),i=e.next();!i.done;i=e.next())i=i.value,n=void 0,typeof i=="string"?n=new Text(i):n=Nh(i),t.appendChild(n);return t}function wc(e){if(!e)return null;var t={tagName:e.tagName,attributes:Pi(e.attributes),children:[],parent:null};e=g(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=wc(n),n.parent=t),t.children.push(n);return t}var Ac=new Map,Ec=new Map;function Be(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new sr,this.position=null,this.positionAlign=Lu,this.size=0,this.textAlign=Qn,this.direction=Jo,this.writingMode=cr,this.lineInterpretation=Zo,this.line=null,this.lineHeight="",this.lineAlign=fr,this.displayAlign=Qo,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Bh,this.fontStyle=Mc,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={Lc:32,rows:15}}function jh(e,t){return e=new Be(e,t,""),e.lineBreak=!0,e}Be.prototype.clone=function(){var e=new Be(0,0,""),t;for(t in this)e[t]=this[t],Array.isArray(e[t])&&(e[t]=e[t].slice());return e};function Ru(e,t){if(e.payload!=t.payload||!(.001>Math.abs(e.startTime-t.startTime)&&.001>Math.abs(e.endTime-t.endTime)))return!1;for(var n in e)if(n!="startTime"&&n!="endTime"&&n!="payload"){if(n=="nestedCues"){if(!zo(e.nestedCues,t.nestedCues,Ru))return!1}else if(n=="region"||n=="cellResolution"){for(var i in e[n])if(e[n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!zo(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function Pu(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&Uh(t);var i=n;n=[];for(var r=-1,o=0;o<i.length;o++)i[o]==="<"?r=o+1:i[o]===">"&&0<r&&(r=i.substr(r,o-r),r.match(bx)&&n.push(r),r=-1);for(n=g(n),o=n.next();!o.done;o=n.next())o=o.value,i=i.replace("<"+o+">",'<div time="'+o+'">'),i+="</div>";e:{o=i,r=[];var s=-1;n="",i=!1;for(var u=0;u<o.length;u++)if(o[u]==="/"){var a=o.indexOf(">",u);if(a===-1){n=o;break e}if((a=o.substring(u+1,a))&&a=="v"){i=!0;var l=null;if(r.length&&(l=r[r.length-1]),l){if(l===a)n+="/"+a+">";else{if(!l.startsWith("v")){n+=o[u];continue}n+="/"+l+">"}u+=a.length+1}else n+=o[u]}else n+=o[u]}else o[u]==="<"?(s=u+1,o[s]!="v"&&(s=-1)):o[u]===">"&&0<s&&(r.push(o.substr(s,u-s)),s=-1),n+=o[u];for(o=g(r),r=o.next();!r.done;r=o.next())r=r.value,s=r.replace(" ",".voice-"),n=n.replace("<"+r+">","<"+s+">"),n=n.replace("</"+r+">","</"+s+">"),i||(n+="</"+s+">")}n=_x(n),e.payload="";try{var c=lr("<span>"+n+"</span>","span")}catch{}if(c)if(c=c.children,c.length!=1||c[0].tagName)for(c=g(c),n=c.next();!n.done;n=c.next())Oh(n.value,e,t);else e.payload=Gt(n);else e.payload=Gt(n)}else e.payload=Gt(n)}function Uh(e){for(var t=g(Object.entries(bh)),n=t.next();!n.done;n=t.next()){var i=g(n.value);n=i.next().value,i=i.next().value;var r=new Be(0,0,"");r.color=i,e.set("."+n,r)}for(t=g(Object.entries(Fh)),n=t.next();!n.done;n=t.next())i=g(n.value),n=i.next().value,i=i.next().value,r=new Be(0,0,""),r.backgroundColor=i,e.set("."+n,r)}function _x(e){var t={"< ":""," >":" >"},n=/(< +>|<\s|\s>)/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return t[r]||""}):e||""}function Oh(e,t,n){var i=t.clone();if(i.nestedCues=[],i.payload="",i.rubyTag="",i.line=null,i.region=new sr,i.position=null,i.size=0,i.textAlign=Qn,e.tagName)for(var r=g(e.tagName.split(/(?=[ .])+/g)),o=r.next();!o.done;o=r.next()){var s=o=o.value;if(s.startsWith(".voice-")){var u=s.split("-").pop();s='v[voice="'+u+'"]',n.has(s)||(s="v[voice="+u+"]")}switch(n.has(s)&&(u=i,s=n.get(s))&&(u.backgroundColor=$o(s.backgroundColor,u.backgroundColor),u.color=$o(s.color,u.color),u.fontFamily=$o(s.fontFamily,u.fontFamily),u.fontSize=$o(s.fontSize,u.fontSize),u.textShadow=$o(s.textShadow,u.textShadow),u.fontWeight=s.fontWeight,u.fontStyle=s.fontStyle,u.opacity=s.opacity,u.rubyTag=s.rubyTag,u.textCombineUpright=s.textCombineUpright,u.wrapLine=s.wrapLine),o){case"br":i=jh(i.startTime,i.endTime),t.nestedCues.push(i);return;case"b":i.fontWeight=Hr;break;case"i":i.fontStyle=Gr;break;case"u":i.textDecoration.push(fi);break;case"font":(o=e.attributes.color)&&(i.color=o);break;case"div":if(o=e.attributes.time,!o)break;(o=Vr(o))&&(i.startTime=o);break;case"ruby":case"rp":case"rt":i.rubyTag=o}}if(r=e.children,Iu(e)||r.length==1&&Iu(r[0]))for(n=ot(e).split(`
|
|
32
|
+
`),e=!0,n=g(n),r=n.next();!r.done;r=n.next())r=r.value,e||(e=jh(i.startTime,i.endTime),t.nestedCues.push(e)),0<r.length&&(e=i.clone(),e.payload=Gt(r),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(i),t=g(r),e=t.next();!e.done;e=t.next())Oh(e.value,i,n)}function $o(e,t){return e&&0<e.length?e:t}W("shaka.text.Cue",Be),Be.parseCuePayload=Pu,Be.equal=Ru,Be.prototype.clone=Be.prototype.clone;var Lu="auto";Be.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Lu};var Qn="center",Ic={LEFT:"left",RIGHT:"right",CENTER:Qn,START:"start",END:"end"};Be.textAlign=Ic;var Qo="after",_h={BEFORE:"before",CENTER:"center",AFTER:Qo};Be.displayAlign=_h;var Jo="ltr";Be.direction={HORIZONTAL_LEFT_TO_RIGHT:Jo,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var cr="horizontal-tb";Be.writingMode={HORIZONTAL_TOP_TO_BOTTOM:cr,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Zo=0;Be.lineInterpretation={LINE_NUMBER:Zo,PERCENTAGE:1};var fr="start",Cc={CENTER:"center",START:fr,END:"end"};Be.lineAlign=Cc;var bh={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Be.defaultTextColor=bh;var Fh={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Be.defaultTextBackgroundColor=Fh;var Bh=400,Hr=700;Be.fontWeight={NORMAL:Bh,BOLD:Hr};var Mc="normal",Gr="italic",Vh={NORMAL:Mc,ITALIC:Gr,OBLIQUE:"oblique"};Be.fontStyle=Vh;var fi="underline";Be.textDecoration={UNDERLINE:fi,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var bx=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Li(){}Li.prototype.destroy=function(){};function di(e,t,n){kc.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,wf:t})}function Kr(e,t){for(var n=e.toLowerCase().split(";")[0],i=g([Hh,Rc,Dc,Ni]),r=i.next();!r.done;r=i.next())if(r=kc.get(n+"-"+r.value)){var o=r.wf(),s=o.isSupported(e,t);if(o.destroy(),s)return r.wf}return null}W("shaka.transmuxer.TransmuxerEngine",Li),Li.findTransmuxer=Kr,Li.unregisterTransmuxer=function(e,t){kc.delete(e.toLowerCase().split(";")[0]+"-"+t)},Li.registerTransmuxer=di,Li.prototype.destroy=Li.prototype.destroy;var kc=new Map,Ni=1,Dc=2,Rc=3,Hh=4;Li.PluginPriority={FALLBACK:Ni,PREFERRED_SECONDARY:Dc,PREFERRED:Rc,APPLICATION:Hh};function Pc(){}function rt(e,t){var n=e;return t&&!Ui.includes(e)&&(n+='; codecs="'+t+'"'),n}function Nu(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Lc(e,t,n){var i=rt(e,t);return t=Nu(e,t),Kr(t)?(e=Kr(t))?(e=e(),n=e.convertCodecs(n,t),e.destroy()):n=t:n=e!="video/mp2t"&&n=="audio"?i.replace("video","audio"):i,n}function ju(e){return e.split(";")[0].split("/")[1]}function Ot(e){var t=Gh(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case(e==="mp4a"&&t==="69"):case(e==="mp4a"&&t==="6b"):case(e==="mp4a"&&t==="40.34"):return"mp3";case(e==="mp4a"&&t==="66"):case(e==="mp4a"&&t==="67"):case(e==="mp4a"&&t==="68"):case(e==="mp4a"&&t==="40.2"):case(e==="mp4a"&&t==="40.02"):case(e==="mp4a"&&t==="40.5"):case(e==="mp4a"&&t==="40.05"):case(e==="mp4a"&&t==="40.29"):case(e==="mp4a"&&t==="40.42"):return"aac";case(e==="mp4a"&&t==="a5"):case e==="ac3":case e==="ac-3":return"ac-3";case(e==="mp4a"&&t==="a6"):case e==="eac3":case e==="ec-3":return"ec-3";case e==="ac-4":return"ac-4";case(e==="mp4a"&&t==="b2"):return"dtsx";case(e==="mp4a"&&t==="a9"):return"dtsc";case e==="vp09":case e==="vp9":return"vp9";case e==="avc1":case e==="avc3":return"avc";case e==="hvc1":case e==="hev1":return"hevc";case e==="vvc1":case e==="vvi1":return"vvc";case e==="dvh1":case e==="dvhe":return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case e==="dvav":case e==="dva1":return"dovi-avc";case e==="dav1":return"dovi-av1";case e==="dvc1":case e==="dvi1":return"dovi-vvc"}return e}function ji(e){var t=[];e=g(e.split(","));for(var n=e.next();!n.done;n=e.next())n=Gh(n.value),t.push(n[0]);return t.sort().join(",")}function un(e){return e.split(";")[0]}function vn(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function es(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"}function Gh(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}W("shaka.util.MimeUtils",Pc),Pc.getFullTypeWithAllCodecs=Nu,Pc.getFullType=rt,new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Ui=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function pi(e){this.i=null,this.j=e,this.B=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function At(e,t){is.set(e,t)}function ts(e){return is.get(e)}function ns(e){return is.has(e)?!0:e=="application/cea-608"||e=="application/cea-708"?!!or:!1}pi.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()};function Fx(e,t,n,i,r){var o,s,u,a,l,c,f;return k(function(p){if(p.g==1)return T(p,Promise.resolve(),2);if(!e.i||!e.j)return p.return();if(n==null||i==null)return e.i.parseInit(se(t)),p.return();for(o=e.B?n:e.s,s={periodStart:e.s,segmentStart:n,segmentEnd:i,vttOffset:o},u=e.i.parseMedia(se(t),s,r,[]),a=g(u),l=a.next();!l.done;l=a.next())c=l.value,e.A(c,r||null,s);f=u.filter(function(h){return h.startTime>=e.l&&h.startTime<e.m}),e.j.append(f),e.g==null&&(e.g=Math.max(n,e.l)),e.h=Math.min(i,e.m),K(p)})}pi.prototype.remove=function(e,t){var n=this;return k(function(i){if(i.g==1)return T(i,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||n.g==null||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),K(i)})};function Bx(e,t,n){e.l=t,e.m=n}function Kh(e,t,n){if(e.C=t,t=e.o.get(t))for(var i=g(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter(function(o){return o.endTime<=n}))&&e.j.append(r)}function Xh(e,t,n){t.startTime+=n,t.endTime+=n,t=g(t.nestedCues);for(var i=t.next();!i.done;i=t.next())Xh(e,i.value,n)}function Vx(e,t,n,i,r){var o=n+" "+i,s=new Map;t=g(t);for(var u=t.next();!u.done;u=t.next()){var a=u.value;u=a.stream,a=a.cue,s.has(u)||s.set(u,new Map),s.get(u).has(o)||s.get(u).set(o,[]),Xh(e,a,r),a.startTime>=e.l&&a.startTime<e.m&&(s.get(u).get(o).push(a),u==e.C&&e.j.append([a]))}for(r=g(s.keys()),o=r.next();!o.done;o=r.next())for(o=o.value,e.o.has(o)||e.o.set(o,new Map),t=g(s.get(o).keys()),u=t.next();!u.done;u=t.next())u=u.value,a=s.get(o).get(u),e.o.get(o).set(u,a);e.g=e.g==null?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}W("shaka.text.TextEngine",pi),pi.prototype.destroy=pi.prototype.destroy,pi.findParser=ts,pi.unregisterParser=function(e){is.delete(e)},pi.registerParser=At;var is=new Map;function rs(e){this.h=e,this.g=null}rs.prototype.ia=function(e){var t=this;this.stop();var n=!0,i=null;return this.g=function(){F.clearTimeout(i),n=!1},i=F.setTimeout(function(){n&&t.h()},1e3*e),this},rs.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Te(e){this.h=e,this.g=null}Te.prototype.Jb=function(){return this.stop(),this.h(),this},Te.prototype.ia=function(e){var t=this;return this.stop(),this.g=new rs(function(){t.h()}).ia(e),this},Te.prototype.Fa=function(e){var t=this;return this.stop(),this.g=new rs(function(){t.g.ia(e),t.h()}).ia(e),this},Te.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},W("shaka.util.Timer",Te),Te.prototype.stop=Te.prototype.stop,Te.prototype.tickEvery=Te.prototype.Fa,Te.prototype.tickAfter=Te.prototype.ia,Te.prototype.tickNow=Te.prototype.Jb;function Hx(e,t){return e.concat(t)}function Gx(){}function Oi(e){return e!=null}function os(e,t){return Promise.race([t,new Promise(function(n,i){new Te(i).ia(e)})])}function Nn(){}function Xr(e,t){return e=ke(e),t=ke(t),e.split("-")[0]==t.split("-")[0]}function ss(e,t){return e=ke(e),t=ke(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function Nc(e,t){return e=ke(e),t=ke(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function ke(e){e=g(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=g(t.split("-"));return t=n.next().value,t=t===void 0?"":t,n=n.next().value,n=n===void 0?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=Wh.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function dr(e,t){return e=ke(e),t=ke(t),t==e?4:ss(t,e)?3:Nc(t,e)?2:ss(e,t)?1:0}function Uu(e){var t=e.indexOf("-");return e=0<=t?e.substring(0,t):e,e=e.toLowerCase(),e=Wh.get(e)||e}function jc(e){return e.language?ke(e.language):e.audio&&e.audio.language?ke(e.audio.language):e.video&&e.video.language?ke(e.video.language):"und"}function Ou(e,t){e=ke(e);var n=new Set;t=g(t);for(var i=t.next();!i.done;i=t.next())n.add(ke(i.value));for(t=g(n),i=t.next();!i.done;i=t.next())if(i=i.value,i==e)return i;for(t=g(n),i=t.next();!i.done;i=t.next())if(i=i.value,ss(i,e))return i;for(t=g(n),i=t.next();!i.done;i=t.next())if(i=i.value,Nc(i,e))return i;for(n=g(n),t=n.next();!t.done;t=n.next())if(t=t.value,ss(e,t))return t;return null}W("shaka.util.LanguageUtils",Nn),Nn.findClosestLocale=Ou,Nn.getLocaleForVariant=jc,Nn.getLocaleForText=function(e){return ke(e.language||"und")},Nn.getBase=Uu,Nn.relatedness=dr,Nn.areSiblings=function(e,t){var n=Uu(e),i=Uu(t);return e!=n&&t!=i&&n==i},Nn.normalize=ke,Nn.isSiblingOf=Nc,Nn.isParentOf=ss,Nn.areLanguageCompatible=Xr,Nn.areLocaleCompatible=function(e,t){return e=ke(e),t=ke(t),e==t};var Wh=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function zh(){}function Yh(e,t,n,i,r){function o(x){var S=String(x.width||"")+String(x.height||"")+String(Math.round(x.frameRate||0))+(x.hdr||"")+x.fastSwitching;return x.dependencyStream&&(S+=x.dependencyStream.baseOriginalId||""),S}function s(x){var S=x.language+(x.channelsCount||0)+(x.audioSamplingRate||0)+x.roles.join(",")+x.label+x.groupId+x.fastSwitching;return x.dependencyStream&&(S+=x.dependencyStream.baseOriginalId||""),S}if(r.length){var u=e.textStreams;r=g(r);for(var a=r.next(),l={};!a.done;l={xh:void 0},a=r.next())if(l.xh=a.value,a=u.filter(function(x){return function(S){return!!(S.codecs.startsWith(x.xh)||S.mimeType.startsWith(x.xh))}}(l)),a.length){u=a;break}e.textStreams=u}if(u=e.variants,(t.length||n.length)&&(u=Kx(u,t,n)),i.length){for(t=new yu,n=g(u),u=n.next();!u.done;u=n.next())u=u.value,t.push(String(u.video.width||0),u);var c=[];t.forEach(function(x,S){x=0;var w=[];S=g(S);for(var A=S.next(),D={};!A.done;D={Rf:void 0},A=S.next())D.Rf=A.value,A=i.filter(function(E){return function(I){return E.Rf.decodingInfos[0][I]}}(D)).length,A>x?(x=A,w=[D.Rf]):A==x&&w.push(D.Rf);c.push.apply(c,H(w))}),u=c}for(n=new Set,t=new Set,u=g(u),r=u.next();!r.done;r=u.next())r=r.value,r.audio&&n.add(r.audio),r.video&&t.add(r.video);u=Array.from(n).sort(function(x,S){return x.bandwidth-S.bandwidth});var f=[];for(n=new Map,u=g(u),r=u.next();!r.done;r=u.next()){if(r=r.value,a=s(r),l=n.get(a)||[],l.length){var p=l[l.length-1],h=Ot(p.codecs),m=Ot(r.codecs);h!=m||r.bandwidth&&p.bandwidth&&!(r.bandwidth>p.bandwidth)||(l.push(r),f.push(r.id))}else l.push(r),f.push(r.id);n.set(a,l)}var y={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};u=Array.from(t).sort(function(x,S){if(!x.bandwidth||!S.bandwidth||x.bandwidth==S.bandwidth){if(x.codecs&&S.codecs&&x.codecs!=S.codecs&&x.width==S.width){var w=Ot(x.codecs),A=Ot(S.codecs);if(w!=A)return(y[w]||1)-(y[A]||1)}return x.width-S.width}return x.bandwidth-S.bandwidth}),t=br();var v=[];for(n=new Map,u=g(u),r=u.next();!r.done;r=u.next()){if(r=r.value,a=o(r),l=n.get(a)||[],l.length){if(p=l[l.length-1],!t&&(h=Ot(p.codecs),m=Ot(r.codecs),h!==m))continue;h=Ot(p.codecs),m=Ot(r.codecs),h!=m||r.bandwidth&&p.bandwidth&&!(r.bandwidth>p.bandwidth)||(l.push(r),v.push(r.id))}else l.push(r),v.push(r.id);n.set(a,l)}e.variants=e.variants.filter(function(x){var S=x.audio;return x=x.video,!(S&&!f.includes(S.id)||x&&!v.includes(x.id))})}function Kx(e,t,n){t=g(t);for(var i=t.next(),r={};!i.done;r={videoCodec:void 0},i=t.next())if(r.videoCodec=i.value,i=e.filter(function(o){return function(s){return s.video&&s.video.codecs.startsWith(o.videoCodec)}}(r)),i.length){e=i;break}for(n=g(n),t=n.next(),i={};!t.done;i={audioCodec:void 0},t=n.next())if(i.audioCodec=t.value,t=e.filter(function(o){return function(s){return s.audio&&s.audio.codecs.startsWith(o.audioCodec)}}(i)),t.length){e=t;break}return e}function Xx(e,t,n){e.variants=e.variants.filter(function(i){return _u(i,t,n)})}function _u(e,t,n){function i(u,a,l){return u>=a&&u<=l}var r=e.video;if(r&&r.width&&r.height){var o=r.width,s=r.height;if(s>o&&(s=g([s,o]),o=s.next().value,s=s.next().value),!i(o,t.minWidth,Math.min(t.maxWidth,n.width))||!i(s,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!i(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!i(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function Wx(e,t,n,i){return n=n===void 0?[]:n,i=i===void 0?{}:i,k(function(r){return r.g==1?T(r,qh(e,t,0<t.offlineSessionIds.length,n,i),2):($x(t),T(r,Qx(t),0))})}function qh(e,t,n,i,r){var o,s;return k(function(u){if(u.g==1)return ye().Pi()&&zx(t.variants),T(u,Qh(t.variants,n,!1,i),2);o=null,e&&(s=e.g)&&(o=s.keySystem),t.variants=t.variants.filter(function(a){var l=Yx(a,o,r);if(!l){var c=[];a.audio&&c.push(ig(a.audio)),a.video&&c.push(ig(a.video))}return l}),K(u)})}function zx(e){var t=new Map().set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=g(e);for(var i=e.next();!i.done;i=e.next())i=i.value,i.video&&n.add(i.video);for(n=g(n),e=n.next();!e.done;e=n.next()){e=e.value,i=g(t);for(var r=i.next();!r.done;r=i.next()){var o=g(r.value);if(r=o.next().value,o=o.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,o);break}}}}function Yx(e,t,n){if(!e.decodingInfos.some(function(a){return!(!a.supported||t&&(a=a.keySystemAccess)&&(n[a.keySystem]||a.keySystem)!=t)}))return!1;var i=ye(),r=i.Ob()==="Xbox";i=i.La()==="MOBILE"&&i.Da()==="GECKO";var o=e.video,s=o&&o.width||0,u=o&&o.height||0;return r&&o&&(1920<s||1080<u)&&(o.codecs.includes("avc1.")||o.codecs.includes("avc3."))||(r=o&&o.dependencyStream)&&!wh(r)?!1:(e=e.audio,!(i&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}function $h(e,t){var n,i,r,o,s,u,a;return k(function(l){if(l.g==1){for(n=function(c,f){if(c){var p=Pi(c);return p.supported=c.supported&&f.supported,p.powerEfficient=c.powerEfficient&&f.powerEfficient,p.smooth=c.smooth&&f.smooth,f.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=f.keySystemAccess),p}return f},i=null,r=[],o=g(t),s=o.next(),u={};!s.done;u={cache:void 0,Ke:void 0},s=o.next())a=s.value,u.Ke=Eu(a),u.cache=Hu,u.cache.has(u.Ke)?i=n(i,u.cache.get(u.Ke)):r.push(qx(a).then(function(c){return function(f){var p=null;f=g(f||[]);for(var h=f.next();!h.done;h=f.next())p=n(p,h.value);p&&(c.cache.set(c.Ke,p),i=n(i,p))}}(u)));return T(l,Promise.all(r),2)}i&&e.decodingInfos.push(i),K(l)})}function qx(e){var t=[""];e.video&&(t=vn(e.video.contentType).split(","));var n=[""];e.audio&&(n=vn(e.audio.contentType).split(","));var i=[];t=g(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var o=g(n),s=o.next(),u={};!s.done;u={Mc:void 0},s=o.next())s=s.value,u.Mc=Pn(e),e.video&&(u.Mc.video.contentType=rt(un(u.Mc.video.contentType),r)),e.audio&&(u.Mc.audio.contentType=rt(un(u.Mc.audio.contentType),s)),i.push(new Promise(function(a){return function(l,c){(ye().La()=="MOBILE"?os(5,navigator.mediaCapabilities.decodingInfo(a.Mc)):navigator.mediaCapabilities.decodingInfo(a.Mc)).then(function(f){l(f)}).catch(c)}}(u)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})}function Qh(e,t,n,i){var r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D;return k(function(E){switch(E.g){case 1:if(e.some(function(I){return I.decodingInfos.length}))return E.return();r=g(i),o=r.next(),s={};case 2:if(o.done){E.u(4);break}s.ui=o.value,u=!1,a=g(e),l=a.next();case 5:if(l.done){E.u(7);break}c=l.value,f=Jh(c,t,n).filter(function(I){return function(C){return C=C[0],(C.keySystemConfiguration&&C.keySystemConfiguration.keySystem)===I.ui}}(s)),p=g(f),h=p.next();case 8:if(h.done){E.u(10);break}return m=h.value,T(E,$h(c,m),9);case 9:h=p.next(),E.u(8);break;case 10:c.decodingInfos.some(function(I){return I.supported})&&(u=!0),l=a.next(),E.u(5);break;case 7:if(u)return E.return();s={ui:void 0},o=r.next(),E.u(2);break;case 4:y=g(e),v=y.next();case 12:if(v.done){E.u(0);break}x=v.value,S=Jh(x,t,n).filter(function(I){return I=I[0],I=I.keySystemConfiguration&&I.keySystemConfiguration.keySystem,!I||!i.includes(I)}),w=g(S),A=w.next();case 15:if(A.done){v=y.next(),E.u(12);break}return D=A.value,T(E,$h(x,D),16);case 16:A=w.next(),E.u(15)}})}function Jh(e,t,n){var i=e.audio,r=e.video,o=[],s=[];if(r)for(var u=g(r.fullMimeTypes),a=u.next();!a.done;a=u.next()){a=a.value;var l=vn(a);if(l.includes(",")&&!i){var c=l.split(","),f=un(a);l=_r("video",c),c=_r("audio",c),c=bu(c,f),f=Lc(f,c,"audio"),s.push({contentType:f,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(l=Zh(l),a={contentType:Lc(un(a),l,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||30},r.hdr)switch(r.hdr){case"PQ":a.transferFunction="pq";break;case"HLG":a.transferFunction="hlg"}r.colorGamut&&(a.colorGamut=r.colorGamut),o.push(a)}if(i)for(u=g(i.fullMimeTypes),a=u.next();!a.done;a=u.next())l=a.value,a=un(l),l=bu(vn(l),a),a=Lc(a,l,"audio"),s.push({contentType:a,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio});for(u=[],o.length==0&&o.push(null),s.length==0&&s.push(null),o=g(o),a=o.next();!a.done;a=o.next())for(a=a.value,l=g(s),f=l.next();!f.done;f=l.next())f=f.value,c={type:n?"file":"media-source"},a&&(c.video=a),f&&(c.audio=f),u.push(c);if(s=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!s.length)return[u];for(e=[],n=new Map,s=g(s),o=s.next();!o.done;o=s.next())o=o.value,n.get(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o);for(s=t?"required":"optional",t=t?["persistent-license"]:["temporary"],o=g(n.keys()),a=o.next();!a.done;a=o.next()){for(a=a.value,f=n.get(a),l=new Map,f=g(f),c=f.next();!c.done;c=f.next()){c=c.value;var p=c.videoRobustness+","+c.audioRobustness;l.get(p)||l.set(p,[]),l.get(p).push(c)}for(l=g(l.values()),f=l.next();!f.done;f=l.next()){f=f.value,c=[],p=g(u);for(var h=p.next();!h.done;h=p.next()){h=Object.assign({},h.value);for(var m={keySystem:a,initDataType:"cenc",persistentState:s,distinctiveIdentifier:"optional",sessionTypes:t},y=g(f),v=y.next();!v.done;v=y.next()){if(v=v.value,v.initData&&v.initData.length){for(var x=new Set,S=g(v.initData),w=S.next();!w.done;w=S.next())x.add(w.value.initDataType);m.initDataType=v.initData[0].initDataType}v.distinctiveIdentifierRequired&&(m.distinctiveIdentifier="required"),v.persistentStateRequired&&(m.persistentState="required"),v.sessionType&&(m.sessionTypes=[v.sessionType]),i&&(m.audio?(v.encryptionScheme&&(m.audio.encryptionScheme=m.audio.encryptionScheme||v.encryptionScheme),m.audio.robustness=m.audio.robustness||v.audioRobustness):(m.audio={robustness:v.audioRobustness},v.encryptionScheme&&(m.audio.encryptionScheme=v.encryptionScheme)),m.audio.robustness==""&&delete m.audio.robustness),r&&(m.video?(v.encryptionScheme&&(m.video.encryptionScheme=m.video.encryptionScheme||v.encryptionScheme),m.video.robustness=m.video.robustness||v.videoRobustness):(m.video={robustness:v.videoRobustness},v.encryptionScheme&&(m.video.encryptionScheme=v.encryptionScheme)),m.video.robustness==""&&delete m.video.robustness)}h.keySystemConfiguration=m,c.push(h)}e.push(c)}}return e}function bu(e,t){var n=ye();return e.toLowerCase()=="flac"?n.Da()!="WEBKIT"?"flac":"fLaC":e.toLowerCase()==="opus"?n.Da()!="WEBKIT"?"opus":ju(t)=="mp4"?"Opus":"opus":e.toLowerCase()=="ac-3"&&n.ee()?"ec-3":e}function Zh(e){if(e.includes("avc1")){var t=e.split(".");if(t.length==3)return e=t.shift()+".",e+=parseInt(t.shift(),10).toString(16),e+=("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if(e=="vp9")return"vp09.00.41.08";return e}function $x(e){e.textStreams=e.textStreams.filter(function(t){return t=rt(t.mimeType,t.codecs),ns(t)})}function Qx(e){var t,n,i,r,o,s,u;return k(function(a){switch(a.g){case 1:t=[],n=g(e.imageStreams),i=n.next();case 2:if(i.done){a.u(4);break}if(r=i.value,o=r.mimeType,o=="application/mp4"&&r.codecs=="mjpg"&&(o="image/jpg"),Gu.has(o)){a.u(5);break}if(s=eS.get(o),!s){Gu.set(o,!1),a.u(5);break}return T(a,Jx(s),7);case 7:u=a.h,Gu.set(o,u);case 5:Gu.get(o)&&t.push(r),i=n.next(),a.u(2);break;case 4:e.imageStreams=t,K(a)}})}function Jx(e){return new Promise(function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then(function(){t(!0)}).catch(function(){t(!1)}):n.onload=n.onerror=function(){t(n.height===2)}})}function pr(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,o=t?t.codecs:null,s=n?n.codecs:null,u=t?t.groupId:null,a=[];n&&a.push(n.mimeType),t&&a.push(t.mimeType),a=a[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var c=new Set;if(t)for(var f=g(t.roles),p=f.next();!p.done;p=f.next())c.add(p.value);if(n)for(f=g(n.roles),p=f.next();!p.done;p=f.next())c.add(p.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:a,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:o,videoCodec:s,primary:e.primary,roles:Array.from(c),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:u,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,(i=n.dependencyStream)&&(e.width=i.width||e.width,e.height=i.height||e.height,e.videoCodec=i.codecs||e.videoCodec),s.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,n=s.split(",");try{e.videoCodec=_r("video",n),e.audioCodec=_r("audio",n)}catch{}}return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,t=t.dependencyStream)&&(e.audioCodec=t.codecs||e.audioCodec),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function hr(e){return{id:e.id,active:!1,type:pe,bandwidth:e.bandwidth||0,language:e.language,label:e.label,kind:e.kind||null,mimeType:e.mimeType,codecs:e.codecs||null,primary:e.primary,roles:e.roles,accessibilityPurpose:e.accessibilityPurpose,forced:e.forced,originalTextId:e.originalId,originalLanguage:e.originalLanguage}}function Uc(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=Gn(e.segmentIndex));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&t!=null&&(t/=Number(r.split("x")[0])),r&&n!=null&&(n/=Number(r.split("x")[1])),{id:e.id,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:r||null,originalImageId:e.originalId}}function Fu(e){return e.__shaka_id||(e.__shaka_id=Zx++),e.__shaka_id}function eg(e){var t={id:Fu(e),active:e.mode!="disabled",type:pe,bandwidth:0,language:ke(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:e.kind=="forced",originalTextId:e.id,originalLanguage:e.language};return e.kind=="captions"&&(t.mimeType="unknown"),e.kind=="subtitles"&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function Bu(e,t){var n=e?e.language:null;if(n={id:Fu(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:ke(n||"und"),label:e?e.label:null,kind:e?e.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:e?e.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:t?t.id:null,originalAudioId:e?e.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:n},e&&e.kind&&(n.roles=[e.kind],n.audioRoles=[e.kind]),e&&e.configuration&&(e.configuration.codec&&(n.audioCodec=e.configuration.codec,n.codecs=n.audioCodec),e.configuration.bitrate&&(n.audioBandwidth=e.configuration.bitrate,n.bandwidth+=n.audioBandwidth),e.configuration.sampleRate&&(n.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(n.channelsCount=e.configuration.numberOfChannels)),t&&t.configuration&&(t.configuration.codec&&(n.videoCodec=t.configuration.codec,n.codecs=n.codecs?n.codecs+(","+n.videoCodec):n.videoCodec),t.configuration.bitrate&&(n.videoBandwidth=t.configuration.bitrate,n.bandwidth+=n.videoBandwidth),t.configuration.framerate&&(n.frameRate=t.configuration.framerate),t.configuration.width&&(n.width=t.configuration.width),t.configuration.height&&(n.height=t.configuration.height),t.configuration.colorSpace&&t.configuration.colorSpace.transfer))switch(t.configuration.colorSpace.transfer){case"pq":n.hdr="PQ";break;case"hlg":n.hdr="HLG";break;case"bt709":n.hdr="SDR"}return n}function us(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function Vu(e){return e.filter(function(t){return us(t)})}function Wr(e,t,n,i){var r=e,o=e.filter(function(a){return a.primary});o.length&&(r=o);var s=r.length?r[0].language:"";if(r=r.filter(function(a){return a.language==s}),t){var u=Ou(ke(t),e.map(function(a){return a.language}));u&&(r=e.filter(function(a){return ke(a.language)==u}))}if(r=r.filter(function(a){return a.forced==i}),n){if(e=tg(r,n),e.length)return e}else if(e=r.filter(function(a){return a.roles.length==0}),e.length)return e;return e=r.map(function(a){return a.roles}).reduce(Hx,[]),e.length?tg(r,e[0]):r}function tg(e,t){return e.filter(function(n){return n.roles.includes(t)})}function ng(e,t){t.length&&(t=t.filter(function(n){return Ot(e.codecs)==Ot(n.codecs)}).sort(function(n,i){return n.bandwidth&&i.bandwidth&&n.bandwidth!=i.bandwidth?n.bandwidth-i.bandwidth:(n.width||0)-(i.width||0)}),e.trickModeVideo=t[0],1<t.length&&(t=t.find(function(n){return e.width==n.width&&e.height==n.height})))&&(e.trickModeVideo=t)}function ig(e){return e.type=="audio"?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:e.type=="video"?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function rg(e,t,n){if(n.autoShowText==0)return!1;if(n.autoShowText==1)return!0;var i=ke(n.preferredTextLanguage);return t=ke(t.language),n.autoShowText==2?Xr(t,i):n.autoShowText==3?e?(e=ke(e.language),Xr(t,i)&&!Xr(e,t)):!1:(Ae("Invalid autoShowText setting!"),!1)}function og(e){var t={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};e=g(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n?un(n):"",codecs:n?vn(n):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};i.fullMimeTypes.add(rt(i.mimeType,i.codecs)),n.startsWith("audio/")?(i.type="audio",t.audio=i):t.video=i}return t}W("shaka.util.StreamUtils",zh),zh.meetsRestrictions=_u;var Hu=new Map,Zx=0,Gu=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),eS=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Qe(){var e=this;this.G=null,this.o=!1,this.m=new Go,this.j=new Me,navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(e.o&&e.g.useNetworkInformation){e.m=new Go,e.g&&e.m.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.F=[],this.H=1,this.I=!1,this.h=this.l=this.g=this.s=null,this.A=new Te(function(){if(e.o&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.B=F,"documentPictureInPicture"in F&&this.j.D(F.documentPictureInPicture,"enter",function(){e.B=F.documentPictureInPicture.window,e.A&&e.A.Jb(),e.j.Aa(e.B,"pagehide",function(){e.B=F,e.A&&e.A.Jb()})}),this.C=this.i=null}d=Qe.prototype,d.stop=function(){this.G=null,this.o=!1,this.F=[],this.H=1,this.l=this.s=null,this.h&&(this.h.disconnect(),this.h=null),this.A.stop(),this.C=this.i=null},d.release=function(){this.j.release(),this.A=null},d.init=function(e){this.G=e},d.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;e=this.B.screen.height*n,t=this.B.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var i=this.l.clientHeight,r=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(i=this.i.height,r=this.i.width),e=Math.min(e,i*n),t=Math.min(t,r*n)}if(n=this.F.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)}),n.length||(n=this.F),i=n,n.length!=this.F.length&&(i=this.F.filter(function(l){return l&&!!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)})),n=Oc(this,this.g.restrictions,i,1/0,1/0),e!=1/0||t!=1/0){for(n=tS(n),n=g(n),r=n.next();!r.done;r=n.next())if(r=r.value,r.height>=e&&r.width>=t){e=r.height,t=r.width;break}n=Oc(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=Oc(this,null,i,1/0,1/0),n=[n[0]]),t=n[0]||null,i=0;i<n.length;i++){r=n[i];for(var o=isNaN(this.H)?1:Math.abs(this.H),s=o*r.bandwidth/this.g.bandwidthDowngradeTarget,u={bandwidth:1/0},a=i+1;a<n.length;a++)if(r.bandwidth!=n[a].bandwidth){u=n[a];break}o=o*u.bandwidth/this.g.bandwidthUpgradeTarget,e>=s&&e<=o&&(t.bandwidth!=r.bandwidth||t.bandwidth==r.bandwidth&&t.video&&r.video&&(t.video.width<r.video.width||t.video.height<r.video.height))&&(t=r)}return this.s=Date.now(),t},d.enable=function(){this.o=!0},d.disable=function(){this.o=!1},d.segmentDownloaded=function(e,t,n,i){var r=e;this.g.removeLatencyFromFirstPacketTime&&i&&i.packetNumber===1&&i.timeToFirstByte&&(r=e-i.timeToFirstByte),r>=this.g.cacheLoadThreshold&&this.m.sample(r,t),n&&this.s!=null&&this.o&&sg(this)},d.trySuggestStreams=function(){this.s!=null&&this.o&&sg(this)},d.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.m.getBandwidthEstimate(e),this.C?this.C.getBandwidthEstimate(e):e)},d.setVariants=function(e){this.F=e},d.playbackRateChanged=function(e){this.H=e},d.setMediaElement=function(e){function t(){n.A.ia(nS)}var n=this;this.l=e,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in F&&(this.h=new ResizeObserver(t),this.h.observe(this.l)),this.j.D(e,"enterpictureinpicture",function(i){i.pictureInPictureWindow&&(n.i=i.pictureInPictureWindow,n.j.D(n.i,"resize",t))}),this.j.D(e,"leavepictureinpicture",function(){n.i&&n.j.Ja(n.i,"resize",t),n.i=null})},d.setCmsdManager=function(e){this.C=e},d.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)};function sg(e){if(!e.I){var t=e.m;if(!(t.g>=t.i))return;e.I=!0,e.s-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.s<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function Oc(e,t,n,i,r){if(e.C){var o=e.C.Yh();o&&(n=n.filter(function(s){return s.bandwidth&&o?s.bandwidth<=o:!0}))}return t&&(n=n.filter(function(s){return _u(s,t,{width:r,height:i})})),n.sort(function(s,u){return s.bandwidth-u.bandwidth})}function tS(e){var t=[];e=g(e);for(var n=e.next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(i,r){return i.width-r.width})}W("shaka.abr.SimpleAbrManager",Qe),Qe.prototype.configure=Qe.prototype.configure,Qe.prototype.setCmsdManager=Qe.prototype.setCmsdManager,Qe.prototype.setMediaElement=Qe.prototype.setMediaElement,Qe.prototype.playbackRateChanged=Qe.prototype.playbackRateChanged,Qe.prototype.setVariants=Qe.prototype.setVariants,Qe.prototype.getBandwidthEstimate=Qe.prototype.getBandwidthEstimate,Qe.prototype.trySuggestStreams=Qe.prototype.trySuggestStreams,Qe.prototype.segmentDownloaded=Qe.prototype.segmentDownloaded,Qe.prototype.disable=Qe.prototype.disable,Qe.prototype.enable=Qe.prototype.enable,Qe.prototype.chooseVariant=Qe.prototype.chooseVariant,Qe.prototype.init=Qe.prototype.init,Qe.prototype.release=Qe.prototype.release,Qe.prototype.stop=Qe.prototype.stop;var nS=1;W("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function ug(e,t){if(e===t||!e.length||!t.length)return!0;e=g(e);for(var n=e.next();!n.done;n=e.next()){if(n=n.value,Xu(n))return!0;for(var i=g(t),r=i.next();!r.done;r=i.next())if(r=r.value,n.keySystem===r.keySystem||Xu(r))return!0}return!1}function ag(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=g(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=g(t),o=r.next();!o.done;o=r.next())if(o=o.value,i.keySystem==o.keySystem){r=new Map;for(var s=g((i.initData||[]).concat(o.initData||[])),u=s.next();!u.done;u=s.next())u=u.value,r.set(u.keyId,u);r=Array.from(r.values()),s=i.keyIds&&o.keyIds?new Set([].concat(H(i.keyIds),H(o.keyIds))):i.keyIds||o.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||o.persistentStateRequired,videoRobustness:i.videoRobustness||o.videoRobustness,audioRobustness:i.audioRobustness||o.audioRobustness,serverCertificate:i.serverCertificate||o.serverCertificate,serverCertificateUri:i.serverCertificateUri||o.serverCertificateUri,initData:r,keyIds:s});break}else Xu(i)?n.push(i):Xu(o)&&n.push(o)}return n}function _c(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Ku(e){return e?!!e.match(/^com\.apple\.fps/):!1}function Xu(e){return(e=e.licenseServerUri)?e.startsWith("data:application/json;base64,"):!1}var Wu=new St(function(){return gn(new Uint8Array([0]))}),zr=new Map;function lg(e,t){var n=Hn();this.l=e.maxAttempts==null?n.maxAttempts:e.maxAttempts,this.j=e.baseDelay==null?n.baseDelay:e.baseDelay,this.o=e.fuzzFactor==null?n.fuzzFactor:e.fuzzFactor,this.m=e.backoffFactor==null?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=t===void 0?!1:t)&&(this.g=1)}function cg(e){var t,n;return k(function(i){if(i.g==1){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new M(2,7,1010);return t=e.g,e.g++,t==0?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),T(i,new Promise(function(r){new Te(r).ia(n/1e3)}),2))}e.h*=e.m,K(i)})}function Hn(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function je(){var e,t,n=new Promise(function(i,r){e=i,t=r});return n.resolve=e,n.reject=t,n}je.prototype.resolve=function(){},je.prototype.reject=function(){};function it(e,t){this.promise=e,this.i=t,this.g=null}function gr(e){return new it(Promise.reject(e),function(){return Promise.resolve()})}function bc(){var e=Promise.reject(new M(2,7,7001));return e.catch(function(){}),new it(e,function(){return Promise.resolve()})}function Yr(e){return new it(Promise.resolve(e),function(){return Promise.resolve()})}function fg(e){return new it(e,function(){return e.catch(function(){})})}it.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function dg(e){return new it(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}it.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},it.prototype.Va=function(e,t){function n(u){return function(a){if(r.g&&u)o.reject(s);else{var l=u?e:t;l?i=iS(l,a,o):(u?o.resolve:o.reject)(a)}}}function i(){return o.reject(s),r.abort()}var r=this,o=new je;o.catch(function(){});var s=new M(2,7,7001);return this.promise.then(n(!0),n(!1)),new it(o,function(){return i()})};function iS(e,t,n){try{var i=e(t);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then(function(){},function(){})})}catch(r){return n.reject(r),function(){return Promise.resolve()}}}ni.Object.defineProperties(it.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),W("shaka.util.AbortableOperation",it),it.prototype.chain=it.prototype.Va,it.prototype.finally=it.prototype.finally,it.all=dg,it.prototype.abort=it.prototype.abort,it.notAbortable=fg,it.completed=Yr,it.aborted=bc,it.failed=gr;function G(e,t){if(t)if(t instanceof Map)for(var n=g(t.keys()),i=n.next();!i.done;i=n.next())i=i.value,Object.defineProperty(this,i,{value:t.get(i),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=F.performance&&F.performance.now?F.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function pg(e){var t=new G(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}G.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},G.prototype.stopImmediatePropagation=function(){this.g=!0},G.prototype.stopPropagation=function(){},W("shaka.util.FakeEvent",G);var zu={jl:"abrstatuschanged",kl:"adaptation",ll:"audiotrackchanged",ol:"audiotrackschanged",ql:"boundarycrossed",rl:"buffering",ul:"canupdatestarttime",vl:"complete",wl:"currentitemchanged",xl:"downloadcompleted",yl:"downloadfailed",zl:"downloadheadersreceived",Al:"drmsessionupdate",Cl:"emsg",Il:"itemsinserted",Jl:"itemsremoved",Zl:"prft",Error:"error",Dl:"expirationupdated",El:"firstquartile",Fl:"gapjumped",Kl:"keystatuschanged",Ol:"loaded",Pl:"loading",Rl:"manifestparsed",Sl:"manifestupdated",Tl:"mediaqualitychanged",Ul:"mediasourcerecovered",Vl:"metadataadded",Metadata:"metadata",Wl:"midpoint",Xl:"nospatialvideoinfo",Yl:"onstatechange",$l:"ratechange",cm:"segmentappended",dm:"sessiondata",em:"spatialvideoinfo",fm:"stalldetected",gm:"started",hm:"statechanged",im:"streaming",jm:"textchanged",lm:"texttrackvisibility",mm:"thirdquartile",nm:"timelineregionadded",om:"timelineregionenter",pm:"timelineregionexit",qm:"trackschanged",sm:"unloading",um:"variantchanged"};function De(){this.Ya=new yu,this.ze=this}De.prototype.addEventListener=function(e,t){this.Ya&&this.Ya.push(e,t)},De.prototype.removeEventListener=function(e,t){this.Ya&&this.Ya.remove(e,t)},De.prototype.dispatchEvent=function(e){if(!this.Ya)return!0;var t=this.Ya.get(e.type)||[],n=this.Ya.get("All");for(n&&(t=t.concat(n)),t=g(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.ze,e.currentTarget=this.ze;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},De.prototype.release=function(){this.Ya=null};function qr(){this.g=[]}function mr(e,t){e.g.push(t.finally(function(){Rn(e.g,t)}))}qr.prototype.destroy=function(){for(var e=[],t=g(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)};function Ge(e,t,n,i,r,o,s){De.call(this),this.i=null,this.j=!1,this.s=new qr,this.g=new Set,this.h=new Set,this.o=e||null,this.m=t||null,this.A=n||null,this.B=i||null,this.C=r||null,this.G=o||null,this.F=s||null,this.l=new Map}et(Ge,De),d=Ge.prototype,d.configure=function(e){this.i=e};function hi(e,t,n,i){i=i===void 0?!1:i,n=n||yg;var r=qu.get(e);(!r||n>=r.priority)&&qu.set(e,{priority:n,wf:t,Ak:i})}function hg(e,t){for(var n=g(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(e=g(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}d.Dk=function(e){this.g.add(e)},d.Zk=function(e){this.g.delete(e)},d.kj=function(){this.g.clear()},d.Ek=function(e){this.h.add(e)},d.$k=function(e){this.h.delete(e)},d.lj=function(){this.h.clear()},d.Mh=function(){this.l.clear()};function lt(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:n===void 0?null:n}}d.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),De.prototype.release.call(this),this.s.destroy()},d.request=function(e,t,n){var i=this,r=new vg;if(this.j){var o=Promise.reject(new M(2,7,7001));return o.catch(function(){}),new Yu(o,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Pn(t.retryParameters):Hn(),t.uris=Pn(t.uris),o=rS(this,e,t,n);var s=o.Va(function(){return gg(i,e,t,n,new lg(t.retryParameters,!1),0,null,r)}),u=s.Va(function(p){return oS(i,e,p,n)}),a=Date.now(),l=0;o.promise.then(function(){l=Date.now()-a},function(){});var c=0;s.promise.then(function(){c=Date.now()},function(){});var f=u.Va(function(p){var h=Date.now()-c,m=p.response;return m.timeMs+=l,m.timeMs+=h,p.$j||!i.o||m.fromCache||t.method=="HEAD"||e!=jn||i.o(m.timeMs,m.data.byteLength,mg(n),t,n),i.F&&i.F(e,m,n),m},function(p){throw p&&(p.severity=2),p});return o=new Yu(f.promise,function(){return f.abort()},r),mr(this.s,o),o};function rS(e,t,n,i){function r(u){o=o.Va(function(){return n.body&&(n.body=gn(n.body)),u(t,n,i)})}var o=Yr(void 0);e.C&&r(e.C),e=g(e.g);for(var s=e.next();!s.done;s=e.next())r(s.value);return o.Va(void 0,function(u){throw u instanceof M&&u.code==7001?u:new M(2,1,1006,u)})}function gg(e,t,n,i,r,o,s,u){e.i.forceHTTP&&(n.uris[o]=n.uris[o].replace("https://","http://")),e.i.forceHTTPS&&(n.uris[o]=n.uris[o].replace("http://","https://")),0<o&&e.G&&e.G(t,i,n.uris[o],n.uris[o-1]);var a=new nt(n.uris[o]),l=a.cc,c=!1;l||(l=location.protocol,l=l.slice(0,-1),Tu(a,l),n.uris[o]=a.toString()),l=l.toLowerCase();var f=(l=qu.get(l))?l.wf:null;if(!f)return gr(new M(2,1,1e3,a));var p=l.Ak;(a=e.l.get(a.Cb))&&(n.headers["common-access-token"]=a);var h=null,m=null,y=!1,v=!1,x;return fg(cg(r)).Va(function(){if(e.j)return bc();x=Date.now();var S=0;n.requestStartTime=Date.now();var w=f(n.uris[o],n,t,function(E,I,C){h&&h.stop(),m&&m.ia(D/1e3),e.o&&t==jn&&(S++,n.packetNumber=S,e.o(E,I,mg(i),n,i),c=!0,u.g=C)},function(E){v=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.m&&e.m(E,n,t)},{minBytesForProgressEvents:e.i.minBytesForProgressEvents});if(!p)return w;var A=n.retryParameters.connectionTimeout;A&&(h=new Te(function(){y=!0,w.abort()}),h.ia(A/1e3));var D=n.retryParameters.stallTimeout;return D&&(m=new Te(function(){y=!0,w.abort()})),w}).Va(function(S){h&&h.stop(),m&&m.stop(),S.timeMs==null&&(S.timeMs=Date.now()-x);var w=S.headers["common-access-token"];if(w){var A=new nt(S.uri);e.l.set(A.Cb,w)}return w={response:S,$j:c},!v&&e.m&&e.m(S.headers,n,t),e.A&&e.A(n,S),w},function(S){if(h&&h.stop(),m&&m.stop(),e.B){var w=null,A=0;S instanceof M&&(w=S,S.code==1001&&(A=S.data[1])),e.B(n,w,A,y)}if(e.j)return bc();if(y&&(S=new M(1,1,1003,n.uris[o],t)),S instanceof M){if(S.code==7001)throw S;if(S.code==1010)throw s;if(S.severity==1){if(w=new Map().set("error",S),w=new G("retry",w),w.cancelable=!0,e.dispatchEvent(w),w.defaultPrevented)throw S;return o=(o+1)%n.uris.length,gg(e,t,n,i,r,o,S,u)}}throw S})}function oS(e,t,n,i){var r=Yr(void 0);e=g(e.h);for(var o=e.next(),s={};!o.done;s={Di:void 0},o=e.next())s.Di=o.value,r=r.Va(function(u){return function(){var a=n.response;return a.data&&(a.data=gn(a.data)),(0,u.Di)(t,a,i)}}(s));return r.Va(function(){return n},function(u){var a=2;if(u instanceof M){if(u.code==7001)throw u;a=u.severity}throw new M(a,1,1007,u)})}function mg(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}W("shaka.net.NetworkingEngine",Ge),Ge.prototype.request=Ge.prototype.request,Ge.prototype.destroy=Ge.prototype.destroy,Ge.makeRequest=lt,Ge.defaultRetryParameters=function(){return Hn()},Ge.prototype.clearCommonAccessTokenMap=Ge.prototype.Mh,Ge.prototype.clearAllResponseFilters=Ge.prototype.lj,Ge.prototype.unregisterResponseFilter=Ge.prototype.$k,Ge.prototype.registerResponseFilter=Ge.prototype.Ek,Ge.prototype.clearAllRequestFilters=Ge.prototype.kj,Ge.prototype.unregisterRequestFilter=Ge.prototype.Zk,Ge.prototype.registerRequestFilter=Ge.prototype.Dk,Ge.unregisterScheme=function(e){qu.delete(e)},Ge.registerScheme=hi,Ge.prototype.configure=Ge.prototype.configure;function vg(){this.g=0}Ge.NumBytesRemainingClass=vg;function Yu(e,t,n){it.call(this,e,t),this.h=n}et(Yu,it),Ge.PendingRequest=Yu;var jn=1;Ge.RequestType={MANIFEST:0,SEGMENT:jn,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},Ge.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var yg=3;Ge.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:yg};var qu=new Map;function $r(e){this.g=!1,this.h=new je,this.i=e}$r.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))};function Ve(e,t){if(e.g)throw t instanceof M&&t.code==7003?t:new M(2,7,7003,t)}function Fc(e,t){var n=[];e=g(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function sS(e,t){e=g(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function Qr(e){for(var t=new Map,n=g(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function Bc(e){var t={};return e.forEach(function(n,i){t[i]=n}),t}function He(e,t){this.h=Ht(e),this.i=t==Tg,this.g=0}d=He.prototype,d.Ga=function(){return this.g<this.h.byteLength},d.Ma=function(){return this.g},d.getLength=function(){return this.h.byteLength},d.X=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw gi()}},d.Ba=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw gi()}},d.T=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw gi()}},d.Yg=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw gi()}},d.yd=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch{throw gi()}if(2097151<t)throw new M(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},d.Ub=function(e){if(this.g+e>this.h.byteLength)throw gi();var t=se(this.h,this.g,e);return this.g+=e,t},d.skip=function(e){if(this.g+e>this.h.byteLength)throw gi();this.g+=e},d.Ei=function(e){if(this.g<e)throw gi();this.g-=e},d.seek=function(e){if(0>e||e>this.h.byteLength)throw gi();this.g=e},d.Vc=function(){for(var e=this.g;this.Ga()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=se(this.h,e,this.g-e),this.g+=1,ze(e)};function gi(){return new M(2,3,3e3)}W("shaka.util.DataViewReader",He),He.prototype.readTerminatedString=He.prototype.Vc,He.prototype.seek=He.prototype.seek,He.prototype.rewind=He.prototype.Ei,He.prototype.skip=He.prototype.skip,He.prototype.readBytes=He.prototype.Ub,He.prototype.readUint64=He.prototype.yd,He.prototype.readInt32=He.prototype.Yg,He.prototype.readUint32=He.prototype.T,He.prototype.readUint16=He.prototype.Ba,He.prototype.readUint8=He.prototype.X,He.prototype.getLength=He.prototype.getLength,He.prototype.getPosition=He.prototype.Ma,He.prototype.hasMoreData=He.prototype.Ga;var Tg=1;He.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Tg};function Ue(){this.i=new Map,this.h=new Map,this.g=!1}d=Ue.prototype,d.box=function(e,t){return e=xg(e),this.i.set(e,uS),this.h.set(e,t),this},d.R=function(e,t){return e=xg(e),this.i.set(e,Sg),this.h.set(e,t),this},d.stop=function(){this.g=!0},d.parse=function(e,t,n){for(e=new He(e,0),this.g=!1;e.Ga()&&!this.g;)this.td(0,e,t,n)},d.td=function(e,t,n,i){var r=t.Ma();if(i&&r+8>t.getLength())this.g=!0;else{var o=t.T(),s=t.T(),u=Qu(s),a=!1;switch(o){case 0:o=t.getLength()-r;break;case 1:if(i&&t.Ma()+8>t.getLength()){this.g=!0;return}o=t.yd(),a=!0}var l=this.h.get(s);if(l){var c=null,f=null;if(this.i.get(s)==Sg){if(i&&t.Ma()+4>t.getLength()){this.g=!0;return}f=t.T(),c=f>>>24,f&=16777215}s=r+o,n&&s>t.getLength()&&(s=t.getLength()),i&&s>t.getLength()?this.g=!0:(s-=t.Ma(),t=0<s?t.Ub(s):new Uint8Array(0),t=new He(t,0),l({name:u,parser:this,partialOkay:n||!1,stopOnPartial:i||!1,version:c,flags:f,reader:t,size:o,start:r+e,has64BitSize:a}))}else t.skip(Math.min(r+o-t.Ma(),t.getLength()-t.Ma()))}};function le(e){for(var t=_i(e);e.reader.Ga()&&!e.parser.g;)e.parser.td(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function mi(e){for(var t=_i(e),n=e.reader.T(),i=0;i<n&&(e.parser.td(e.start+t,e.reader,e.partialOkay,e.stopOnPartial),!e.parser.g);i++);}function Qt(e){var t=_i(e);for(e.reader.skip(78);e.reader.Ga()&&!e.parser.g;)e.parser.td(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function $u(e){var t=_i(e);e.reader.skip(8);var n=e.reader.Ba();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.Ga()&&!e.parser.g;)e.parser.td(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Jr(e){return function(t){e(t.reader.Ub(t.reader.getLength()-t.reader.Ma()))}}function xg(e){var t=0;e=g(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function Qu(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function _i(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}W("shaka.util.Mp4Parser",Ue),Ue.headerSize=_i,Ue.typeToString=Qu,Ue.allData=Jr,Ue.audioSampleEntry=$u,Ue.visualSampleEntry=Qt,Ue.sampleDescription=mi,Ue.children=le,Ue.prototype.parseNext=Ue.prototype.td,Ue.prototype.parse=Ue.prototype.parse,Ue.prototype.stop=Ue.prototype.stop,Ue.prototype.fullBox=Ue.prototype.R,Ue.prototype.box=Ue.prototype.box;var uS=0,Sg=1;function Vc(e){var t=this;this.g=[],this.h=[],this.data=[],new Ue().box("moov",le).box("moof",le).R("pssh",function(n){if(!(1<n.version)){var i=se(n.reader.h,-12,n.size);if(t.data.push(i),t.g.push(si(n.reader.Ub(16))),0<n.version){i=n.reader.T();for(var r=0;r<i;r++){var o=si(n.reader.Ub(16));t.h.push(o)}}}}).parse(e)}function Ju(e,t,n,i){var r=e.length,o=t.length+16+r;0<i&&(o+=4+16*n.size);var s=new Uint8Array(o),u=Ht(s),a=0;if(u.setUint32(a,o),a+=4,u.setUint32(a,1886614376),a+=4,1>i?u.setUint32(a,0):u.setUint32(a,16777216),a+=4,s.set(t,a),a+=t.length,0<i)for(u.setUint32(a,n.size),a+=4,t=g(n),n=t.next();!n.done;n=t.next())n=rr(n.value),s.set(n,a),a+=n.length;return u.setUint32(a,r),s.set(e,a+4),s}function Zu(e){var t=this;this.C=e,this.j=this.A=null,this.na=this.P=!1,this.I=0,this.g=null,this.o=new Me,this.i=new Map,this.U=[],this.B=new Map,this.K=!1,this.l=new je,this.h=null,this.s=function(n){n.severity==2&&t.l.reject(n),e.onError(n)},this.ba=new Map,this.ka=new Map,this.L=new Te(function(){return yS(t)}),this.N=!1,this.M=[],this.W=!1,this.F=new Te(function(){xS(t)}),this.l.catch(function(){}),this.m=new $r(function(){return aS(t)}),this.ha=!1,this.G=this.H=null,this.S=function(){return!1}}d=Zu.prototype,d.destroy=function(){return this.m.destroy()};function aS(e){return k(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.l.reject(),e.F.stop(),e.F=null,e.L.stop(),e.L=null,T(t,ls(e),2);case 2:if(!e.j){t.u(3);break}return ue(t,4),T(t,e.j.setMediaKeys(null),6);case 6:ce(t,5);break;case 4:ae(t);case 5:e.j=null;case 3:e.g=null,e.A=null,e.B=new Map,e.h=null,e.s=function(){},e.C=null,e.ha=!1,e.H=null,K(t)}})}d.configure=function(e,t){this.h=e,t&&(this.S=t),this.F&&this.P&&this.g&&this.F.Fa(this.h.updateExpirationTime)};function lS(e,t,n){return e.na=!0,e.B=new Map,e.N=n,Ag(e,t,!1)}function wg(e,t,n,i){i=i===void 0?!0:i,e.B=new Map,n=g(n);for(var r=n.next();!r.done;r=n.next())e.B.set(r.value,{initData:null,initDataType:null});for(n=g(e.h.persistentSessionsMetadata),r=n.next();!r.done;r=n.next())r=r.value,e.B.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.N=0<e.B.size,Ag(e,t,i)}function cS(e,t,n,i,r,o){function s(a){return a=ui(t,a,null),a.licenseServerUri=n,a.serverCertificate=i,a.persistentStateRequired=!0,a.sessionType="persistent-license",a}var u=[];return o.length&&u.push(o[0].contentType),r.length&&u.push(r[0].contentType),u=og(u),u.video&&(o=s(o[0].encryptionScheme||""),u.video.drmInfos.push(o)),u.audio&&(r=s(r[0].encryptionScheme||""),u.audio.drmInfos.push(r)),Mg(e,[u])}function Ag(e,t,n){var i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A;return k(function(D){if(D.g==1){for(Ng(e.h.clearKeys,t),i=t.some(function(E){return!!(E.video&&E.video.drmInfos.length||E.audio&&E.audio.drmInfos.length)}),r=Qr(e.h.servers),o=Qr(e.h.advanced||{}),!i&&n&&wS(t,r),s=new WeakSet,u=g(t),a=u.next();!a.done;a=u.next())for(l=a.value,c=Lg(l),f=g(c),p=f.next();!p.done;p=f.next())h=p.value,s.has(h)||(s.add(h),ES(h,r,o,e.h.keySystemsMapping));for(m=function(E,I){var C=[];E=g(E);for(var R=E.next();!R.done;R=E.next()){R=R.value;var N=R[I]||o.has(R.keySystem)&&o.get(R.keySystem)[I]||"",L;if((L=N=="")&&(L=(L=R.keySystem)?!!L.match(/^com\.widevine\.alpha/):!1),L&&(I=="audioRobustness"?N=[e.h.defaultAudioRobustnessForWidevine]:I=="videoRobustness"&&(N=[e.h.defaultVideoRobustnessForWidevine])),typeof N=="string")C.push(R);else if(Array.isArray(N))for(N.length===0&&(N=[""]),N=g(N),L=N.next();!L.done;L=N.next()){var P={};C.push(Object.assign({},R,(P[I]=L.value,P)))}}return C},y=new WeakSet,v=g(t),x=v.next();!x.done;x=v.next())S=x.value,S.video&&!y.has(S.video)&&(S.video.drmInfos=m(S.video.drmInfos,"videoRobustness"),S.video.drmInfos=m(S.video.drmInfos,"audioRobustness"),y.add(S.video)),S.audio&&!y.has(S.audio)&&(S.audio.drmInfos=m(S.audio.drmInfos,"videoRobustness"),S.audio.drmInfos=m(S.audio.drmInfos,"audioRobustness"),y.add(S.audio));return T(D,Qh(t,e.N,e.ha,e.h.preferredKeySystems),2)}return Ve(e.m),w=i||0<r.size,w?(A=Mg(e,t),D.return(i?A:A.catch(function(){}))):(e.P=!0,D.return(Promise.resolve()))})}function Eg(e){var t;return k(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.H){n.u(2);break}return T(n,e.H,3);case 3:return Ve(e.m),n.return();case 2:return ue(n,4),e.H=e.j.setMediaKeys(e.A),T(n,e.H,6);case 6:ce(n,5);break;case 4:t=ae(n),e.s(new M(2,6,6003,t.message));case 5:Ve(e.m),K(n)}})}function fS(e,t){return k(function(n){if(n.g==1)return T(n,Eg(e),2);as(e,t.initDataType,se(t.initData)),K(n)})}d.fc=function(e){var t=this,n;return k(function(i){if(i.g==1)return t.j===e?i.return():t.A?(t.j=e,t.o.Aa(t.j,"play",function(){for(var r=g(t.M),o=r.next();!o.done;o=r.next())Gc(t,o.value);t.W=!0,t.M=[]}),t.j.remote?(t.o.D(t.j.remote,"connect",function(){return ls(t)}),t.o.D(t.j.remote,"connecting",function(){return ls(t)}),t.o.D(t.j.remote,"disconnect",function(){return ls(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.j&&t.o.D(t.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return ls(t)}),t.G=t.g&&t.g.initData.find(function(r){return 0<r.initData.length})||null,n=t.g.keySystem,ye().Qg(n)||!(t.G||t.B.size||t.h.parseInbandPsshEnabled)?(t.o.D(t.j,"encrypted",function(r){return fS(t,r)}),i.u(2)):T(i,Eg(t),2)):(t.o.Aa(e,"encrypted",function(){t.s(new M(2,6,6010))}),i.return());Ig(t).catch(function(){}),K(i)})};function dS(e){var t,n,i,r,o;return k(function(s){switch(s.g){case 1:if(!e.A||!e.g)return s.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){s.u(2);break}return t=lt([e.g.serverCertificateUri],e.h.retryParameters),ue(s,3),n=e.C.pc.request(5,t,{isPreload:e.S()}),T(s,n.promise,5);case 5:i=s.h,e.g.serverCertificate=se(i.data),ce(s,4);break;case 3:throw r=ae(s),new M(2,6,6017,r);case 4:if(e.m.g)return s.return();case 2:return!e.g.serverCertificate||!e.g.serverCertificate.length?s.return():(ue(s,6),T(s,e.A.setServerCertificate(e.g.serverCertificate),8));case 8:ce(s,0);break;case 6:throw o=ae(s),new M(2,6,6004,o.message)}})}function pS(e,t){var n,i,r;return k(function(o){if(o.g==1)return T(o,Dg(e,t,{initData:null,initDataType:null}),2);if(o.g!=3)return n=o.h,n?(i=[],(r=e.i.get(n))&&(r.Kb=new je,i.push(r.Kb)),i.push(n.remove()),T(o,Promise.all(i),3)):o.return();e.i.delete(n),K(o)})}function Ig(e){var t,n,i,r,o;return k(function(s){if(s.g==1)return e.B.size?(e.B.forEach(function(u,a){Dg(e,a,u)}),T(s,e.l,3)):s.u(2);if(s.g!=2){if(t=e.g&&e.g.keyIds||new Set([]),0<t.size&&SS(e))return s.return(e.l);e.K=!1,e.l=new je,e.l.catch(function(){})}for(n=(e.g?e.g.initData:[])||[],i=g(n),r=i.next();!r.done;r=i.next())o=r.value,as(e,o.initDataType,o.initData);return cs(e)&&e.l.resolve(),s.return(e.l)})}function as(e,t,n){if(n.length){if(e.h.ignoreDuplicateInitData){var i=e.i.values();i=g(i);for(var r=i.next();!r.done;r=i.next())if(ri(n,r.value.initData))return;var o=!1;if(e.B.forEach(function(s){!o&&ri(n,s.initData)&&(o=!0)}),o)return}e.K=!0,0<e.i.size&&cs(e)&&(e.l.resolve(),e.K=!1,e.l=new je,e.l.catch(function(){})),mS(e,t,n,e.g.sessionType)}}function Cg(e){return e=e.i.keys(),e=Fc(e,function(t){return t.sessionId}),Array.from(e)}d.Eg=function(){var e=this,t=this.i.keys();return t=Fc(t,function(n){var i=e.i.get(n);return{sessionId:n.sessionId,sessionType:i.type,initData:i.initData,initDataType:i.initDataType}}),Array.from(t)},d.Pd=function(){var e=1/0,t=this.i.keys();t=g(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e};function hS(e){return e.I?e.I:NaN}d.Te=function(){return Bc(this.ka)};function Mg(e,t){var n,i,r,o,s,u,a;return k(function(l){switch(l.g){case 1:if(n=new Map,i=gS(e,t,n),!i)throw navigator.requestMediaKeySystemAccess?new M(2,6,6001):new M(2,6,6020);Ve(e.m),ue(l,2),i.getConfiguration();var c=r=e.h.keySystemsMapping[i.keySystem]||i.keySystem,f=n.get(r),p=[],h=[],m=[],y=[],v=[],x=new Set,S=new Set;AS(f,p,h,y,m,v,x,S);var w=e.N?"persistent-license":"temporary";for(c={keySystem:c,encryptionScheme:p[0],licenseServerUri:h[0],distinctiveIdentifierRequired:f[0].distinctiveIdentifierRequired,persistentStateRequired:f[0].persistentStateRequired,sessionType:f[0].sessionType||w,audioRobustness:f[0].audioRobustness||"",videoRobustness:f[0].videoRobustness||"",serverCertificate:y[0],serverCertificateUri:m[0],initData:v,keyIds:x},0<S.size&&(c.keySystemUris=S),f=g(f),S=f.next();!S.done;S=f.next())S=S.value,S.distinctiveIdentifierRequired&&(c.distinctiveIdentifierRequired=S.distinctiveIdentifierRequired),S.persistentStateRequired&&(c.persistentStateRequired=S.persistentStateRequired);if(e.g=c,!e.g.licenseServerUri)throw new M(2,6,6012,e.g.keySystem);return T(l,i.createMediaKeys(),4);case 4:if(o=l.h,Ve(e.m),e.A=o,!(e.h.minHdcpVersion!=""&&"getStatusForPolicy"in e.A)){l.u(5);break}return ue(l,6),T(l,e.A.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),8);case 8:if(s=l.h,s!="usable")throw new M(2,6,6018);Ve(e.m),ce(l,5,2);break;case 6:throw u=ae(l,2),u instanceof M?u:new M(2,6,6019,u.message);case 5:return e.P=!0,e.F.Fa(e.h.updateExpirationTime),T(l,dS(e),9);case 9:Ve(e.m),ce(l,0);break;case 2:throw a=ae(l),Ve(e.m,a),e.g=null,a instanceof M?a:new M(2,6,6002,a.message)}})}function gS(e,t,n){for(var i=g(t),r=i.next();!r.done;r=i.next()){r=g(Lg(r.value));for(var o=r.next();!o.done;o=r.next())o=o.value,n.has(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o)}if(n.size==1&&n.has(""))throw new M(2,6,6e3);i=e.h.preferredKeySystems,i.length||(r=Qr(e.h.servers),r.size==1&&(i=Array.from(r.keys()))),r=g(i);var s=r.next();for(o={};!s.done;o={wi:void 0},s=r.next()){o.wi=s.value,s=g(t);for(var u=s.next();!u.done;u=s.next())if(u=u.value.decodingInfos.find(function(f){return function(p){return p.supported&&p.keySystemAccess!=null&&p.keySystemAccess.keySystem==f.wi}}(o)))return u.keySystemAccess}for(r=g([!0,!1]),o=r.next();!o.done;o=r.next())for(o=o.value,s=g(t),u=s.next();!u.done;u=s.next()){u=g(u.value.decodingInfos);for(var a=u.next();!a.done;a=u.next())if(a=a.value,a.supported&&a.keySystemAccess){var l=a.keySystemAccess.keySystem;if(!i.includes(l)){var c=n.get(l);for(!c&&e.h.keySystemsMapping[l]&&(c=n.get(e.h.keySystemsMapping[l])),l=g(c),c=l.next();!c.done;c=l.next())if(!!c.value.licenseServerUri==o)return a.keySystemAccess}}}return null}function Hc(e){cs(e)&&e.l.resolve()}function kg(e,t){new Te(function(){t.loaded=!0,Hc(e)}).ia(CS)}function Dg(e,t,n){var i,r,o,s,u,a,l;return k(function(c){switch(c.g){case 1:try{i=e.A.createSession("persistent-license")}catch(f){return r=new M(2,6,6005,f.message),e.s(r),c.return(Promise.reject(r))}return e.o.D(i,"message",function(f){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(f):Gc(e,f)}),e.o.D(i,"keystatuseschange",function(f){return Rg(e,f)}),o={initData:n.initData,initDataType:n.initDataType,loaded:!1,Tg:1/0,Kb:null,type:"persistent-license"},e.i.set(i,o),ue(c,2),T(c,i.load(t),4);case 4:return s=c.h,Ve(e.m),s||(e.i.delete(i),u=e.h.persistentSessionOnlinePlayback?1:2,e.s(new M(u,6,6013)),o.loaded=!0),kg(e,o),Hc(e),c.return(i);case 2:a=ae(c),Ve(e.m,a),e.i.delete(i),l=e.h.persistentSessionOnlinePlayback?1:2,e.s(new M(l,6,6005,a.message)),o.loaded=!0,Hc(e);case 3:return c.return(Promise.resolve())}})}function mS(e,t,n,i){try{var r=e.A.createSession(i)}catch(o){e.s(new M(2,6,6005,o.message));return}e.o.D(r,"message",function(o){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(o):Gc(e,o)}),e.o.D(r,"keystatuseschange",function(o){return Rg(e,o)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Tg:1/0,Kb:null,type:i});try{n=e.h.initDataTransform(n,t,e.g)}catch(o){t=o,o instanceof M||(t=new M(2,6,6016,o)),e.s(t);return}e.h.logLicenseExchange&&oi(n),r.generateRequest(t,n).catch(function(o){if(!e.m.g){e.i.delete(r);var s=o.errorCode;if(s&&s.systemCode){var u=s.systemCode;0>u&&(u+=Math.pow(2,32)),u="0x"+u.toString(16)}e.s(new M(2,6,6006,o.message,o,u))}})}function vS(e){return k(function(t){return t.g==1?e.K?T(t,e.l,3):t.u(0):T(t,Promise.all(e.U.map(function(n){return n.promise})),0)})}function Gc(e,t){var n,i,r,o,s,u,a,l,c,f,p,h,m,y;k(function(v){switch(v.g){case 1:if(n=t.target,e.h.logLicenseExchange&&oi(t.message),i=e.i.get(n),r=e.g.licenseServerUri,o=e.h.advanced[e.g.keySystem],t.messageType=="individualization-request"&&o&&o.individualizationServer&&(r=o.individualizationServer),s=lt([r],e.h.retryParameters),s.body=t.message,s.method="POST",s.licenseRequestType=t.messageType,s.sessionId=n.sessionId,s.drmInfo=e.g,i&&(s.initData=i.initData,s.initDataType=i.initDataType),o&&o.headers)for(u in o.headers)s.headers[u]=o.headers[u];if(e.g.keySystem==="org.w3.clearkey"){var x=s,S=e.g;try{var w=Yn(x.body);if(w){var A=JSON.parse(w);A.type||(A.type=S.sessionType,x.body=Dn(JSON.stringify(A)))}}catch{}}if(_c(e.g.keySystem))if(x=Ri(s.body,!0,!0),x.includes("PlayReadyKeyMessage")){for(x=lr(x,"PlayReadyKeyMessage"),S=Vn(x,"HttpHeader"),S=g(S),w=S.next();!w.done;w=S.next())A=w.value,w=Vn(A,"name")[0],A=Vn(A,"value")[0],s.headers[ot(w)]=ot(A);x=Vn(x,"Challenge")[0],s.body=mn(ot(x))}else s.headers["Content-Type"]="text/xml; charset=utf-8";return a=Date.now(),ue(v,2),c=e.C.pc.request(2,s,{isPreload:e.S()}),e.U.push(c),T(v,c.promise,4);case 4:l=v.h,Rn(e.U,c),ce(v,3);break;case 2:return f=ae(v),e.m.g||(p=new M(2,6,6007,f),e.i.size==1?(e.s(p),i&&i.Kb&&i.Kb.reject(p)):(i&&i.Kb&&i.Kb.reject(p),e.i.delete(n),cs(e)&&(e.l.resolve(),e.L.ia(.1)))),v.return();case 3:return e.m.g?v.return():(e.I+=(Date.now()-a)/1e3,e.h.logLicenseExchange&&oi(l.data),ue(v,5),T(v,n.update(l.data),7));case 7:ce(v,6);break;case 5:return h=ae(v),m=new M(2,6,6008,h.message),e.s(m),i&&i.Kb&&i.Kb.reject(m),v.return();case 6:if(e.m.g)return v.return();y=new G("drmsessionupdate"),e.C.onEvent(y),i&&(i.Kb&&i.Kb.resolve(),kg(e,i)),K(v)}})}function Rg(e,t){t=t.target;var n=e.i.get(t),i=!1;t.keyStatuses.forEach(function(o,s){if(typeof s=="string"){var u=s;s=o,o=u}if(u=ye(),_c(e.g.keySystem)&&s.byteLength==16&&u.fh()){u=Ht(s);var a=u.getUint32(0,!0),l=u.getUint16(4,!0),c=u.getUint16(6,!0);u.setUint32(0,a,!1),u.setUint16(4,l,!1),u.setUint16(6,c,!1)}o!="status-pending"&&(n.loaded=!0),o=="expired"&&(i=!0),s=si(s).slice(0,32),e.ba.set(s,o)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.Kb&&(e.i.delete(t),Pg(t)),cs(e)&&(e.l.resolve(),e.L.ia(MS))}function yS(e){var t=e.ba,n=e.ka;n.clear(),t.forEach(function(i,r){return n.set(r,i)}),t=Array.from(n.values()),t.length&&t.every(function(i){return i=="expired"})&&e.s(new M(2,6,6014)),e.C.rf(Bc(n))}function TS(){var e,t,n,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j,O,B,V;return k(function(q){if(q.g==1){if(e="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(F.MediaKeys&&F.navigator&&F.navigator.requestMediaKeySystemAccess&&F.MediaKeySystemAccess&&F.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=g(e),i=n.next();!i.done;i=n.next())r=i.value,t[r]=null;return q.return(t)}for(o="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),s=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],u=["150","2000","3000"],a={"com.widevine.alpha":s,"com.widevine.alpha.experiment":s,"com.microsoft.playready.recommendation":u},l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],f={videoCapabilities:l,audioCapabilities:c,initDataTypes:["cenc","sinf","skd","keyids"]},p=[null,"cenc","cbcs"],h=new Map,m=ye(),y=function(X,Ce){var he,xe,ve,me,Pe,de,fe,ge,Xe,We,$e,at,ut;return k(function(Le){switch(Le.g){case 1:return ue(Le,2),T(Le,Ce.createMediaKeys(),5);case 5:he=Le.h;case 4:ce(Le,3);break;case 2:return ae(Le),Le.return();case 3:if(ve=(xe=Ce.getConfiguration().sessionTypes)?xe.includes("persistent-license"):!1,m.mi()&&(ve=!1),me=Ce.getConfiguration().videoCapabilities,Pe=Ce.getConfiguration().audioCapabilities,de={persistentState:ve,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},h.has(X)&&h.get(X)?de=h.get(X):h.set(X,de),(fe=me[0].encryptionScheme)&&!de.encryptionSchemes.includes(fe)&&de.encryptionSchemes.push(fe),(ge=me[0].robustness)&&!de.videoRobustnessLevels.includes(ge)&&de.videoRobustnessLevels.push(ge),(Xe=Pe[0].robustness)&&!de.audioRobustnessLevels.includes(Xe)&&de.audioRobustnessLevels.push(Xe),"getStatusForPolicy"in he){for(We=[],$e=g(o),at=$e.next(),ut={};!at.done;ut={Td:void 0},at=$e.next())ut.Td=at.value,de.minHdcpVersions.includes(ut.Td)||We.push(he.getStatusForPolicy({minHdcpVersion:ut.Td}).then(function($i){return function(Wn){Wn!="usable"||de.minHdcpVersions.includes($i.Td)||de.minHdcpVersions.push($i.Td)}}(ut)));return T(Le,Promise.all(We),0)}Le.u(0)}})},v=function(X,Ce,he,xe){var ve,me,Pe,de,fe,ge,Xe,We,$e,at,ut;return k(function(Le){switch(Le.g){case 1:for(ue(Le,2),ve=Pn(f),me=g(ve.videoCapabilities),Pe=me.next();!Pe.done;Pe=me.next())de=Pe.value,de.encryptionScheme=Ce,de.robustness=he;for(fe=g(ve.audioCapabilities),ge=fe.next();!ge.done;ge=fe.next())Xe=ge.value,Xe.encryptionScheme=Ce,Xe.robustness=xe;return We=Pn(ve),We.persistentState="required",We.sessionTypes=["persistent-license"],$e=[We,ve],ut=ye(),ut.La()=="MOBILE"?T(Le,os(5,navigator.requestMediaKeySystemAccess(X,$e)),7):T(Le,navigator.requestMediaKeySystemAccess(X,$e),6);case 6:at=Le.h,Le.u(5);break;case 7:at=Le.h;case 5:return T(Le,y(X,at),8);case 8:ce(Le,0);break;case 2:ae(Le),K(Le)}})},x=function(X,Ce,he,xe){var ve,me,Pe,de;return k(function(fe){switch(fe.g){case 1:return ue(fe,2),ve={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:c[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:X,video:{encryptionScheme:Ce,robustness:he},audio:{encryptionScheme:Ce,robustness:xe}}},Pe=ye(),Pe.La()=="MOBILE"?T(fe,os(5,navigator.mediaCapabilities.decodingInfo(ve)),7):T(fe,navigator.mediaCapabilities.decodingInfo(ve),6);case 6:me=fe.h,fe.u(5);break;case 7:me=fe.h;case 5:return de=me.keySystemAccess,T(fe,y(X,de),8);case 8:ce(fe,0);break;case 2:ae(fe),K(fe)}})},S=g(e),w=S.next();!w.done;w=S.next())A=w.value,h.set(A,null);for(D=function(X){return!(ye().Da()==="WEBKIT"&&X==="org.w3.clearkey")},E=[],I=g(p),C=I.next();!C.done;C=I.next())for(R=C.value,N=g(e),L=N.next();!L.done;L=N.next())P=L.value,D(P)&&(E.push(v(P,R,"","")),E.push(x(P,R,"","")));for(b=g(e),U=b.next();!U.done;U=b.next())for(j=U.value,O=g(a[j]||[]),B=O.next();!B.done;B=O.next())V=B.value,D(j)&&(E.push(v(j,null,V,"")),E.push(v(j,null,"",V)),E.push(x(j,null,V,"")),E.push(x(j,null,"",V)));return T(q,Promise.all(E),2)}return q.return(Bc(h))})}function Pg(e){return k(function(t){if(t.g==1)return ue(t,2),T(t,os(IS,Promise.all([e.close().catch(function(){}),e.closed])),4);if(t.g!=2)return ce(t,0);ae(t),K(t)})}function ls(e){var t;return k(function(n){return t=Array.from(e.i.entries()),e.i.clear(),T(n,Promise.all(t.map(function(i){i=g(i);var r=i.next().value,o=i.next().value;return k(function(s){if(s.g==1)return ue(s,2),e.na||e.B.has(r.sessionId)||o.type!=="persistent-license"||e.h.persistentSessionOnlinePlayback?T(s,Pg(r),5):T(s,r.remove(),5);if(s.g!=2)return ce(s,0);ae(s),K(s)})})),0)})}function Lg(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function xS(e){e.i.forEach(function(t,n){var i=t.Tg,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.Tg=r)})}function cs(e){return e=e.i.values(),sS(e,function(t){return t.loaded})}function SS(e){for(var t=g(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.ba.get(n.value)!=="usable")return!1;return!0}function wS(e,t){var n=[];for(t.forEach(function(i,r){n.push({keySystem:r,licenseServerUri:i,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=g(e),t=e.next();!t.done;t=e.next())t=t.value,t.video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}function AS(e,t,n,i,r,o,s,u){var a=[];e=g(e);for(var l=e.next(),c={};!l.done;c={Ha:void 0},l=e.next()){if(c.Ha=l.value,t.includes(c.Ha.encryptionScheme)||t.push(c.Ha.encryptionScheme),c.Ha.keySystem=="org.w3.clearkey"&&c.Ha.licenseServerUri.startsWith("data:application/json;base64,")?a.includes(c.Ha.licenseServerUri)||a.push(c.Ha.licenseServerUri):n.includes(c.Ha.licenseServerUri)||n.push(c.Ha.licenseServerUri),r.includes(c.Ha.serverCertificateUri)||r.push(c.Ha.serverCertificateUri),c.Ha.serverCertificate&&(i.some(function(h){return function(m){return ri(m,h.Ha.serverCertificate)}}(c))||i.push(c.Ha.serverCertificate)),c.Ha.initData){l=g(c.Ha.initData);for(var f=l.next(),p={};!f.done;p={Kg:void 0},f=l.next())p.Kg=f.value,o.some(function(h){return function(m){var y=h.Kg;return m.keyId&&m.keyId==y.keyId?!0:m.initDataType==y.initDataType&&ri(m.initData,y.initData)}}(p))||o.push(p.Kg)}if(c.Ha.keyIds)for(l=g(c.Ha.keyIds),f=l.next();!f.done;f=l.next())s.add(f.value);if(c.Ha.keySystemUris&&u)for(c=g(c.Ha.keySystemUris),l=c.next();!l.done;l=c.next())u.add(l.value)}if(a.length==1)n.push(a[0]);else if(0<a.length){for(t=[],a=g(a),i=a.next();!i.done;i=a.next())i=F.atob(i.value.split("data:application/json;base64,").pop()),i=JSON.parse(i),t.push.apply(t,H(i.keys));a=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+F.btoa(a))}}function ES(e,t,n,i){var r=e.keySystem;r&&(r!="org.w3.clearkey"||!e.licenseServerUri)&&(t.size&&t.get(r)&&(t=t.get(r),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(r))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=n.persistentStateRequired),e.serverCertificate||(e.serverCertificate=n.serverCertificate),n.sessionType&&(e.sessionType=n.sessionType),e.serverCertificateUri||(e.serverCertificateUri=n.serverCertificateUri)),i[r]&&(e.keySystem=i[r]),F.cast&&F.cast.__platform__&&r=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function Ng(e,t){if(e=Qr(e),e.size!=0){e=yh(e),t=g(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}var IS=1,CS=5,MS=.5;function ea(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=g(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}ea.prototype.add=function(e,t){var n=this.h;t=t===void 0?!0:t;var i;if(!(i=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(i=n.audio&&e.audio)){i=n.audio;var r=e.audio;i=!(!((!i.channelsCount||!r.channelsCount||2<i.channelsCount||2<r.channelsCount)&&i.channelsCount!=r.channelsCount||i.spatialAudio!==r.spatialAudio||t&&!jg(i,r))&&Ug(i.roles,r.roles)&&i.groupId===r.groupId)}return!i&&(i=n.video&&e.video)&&(n=n.video,i=e.video,i=!((!t||jg(n,i))&&Ug(n.roles,i.roles))),i?!1:(this.g.add(e),!0)},ea.prototype.values=function(){return this.g.values()};function jg(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(i){return ji(i)}),t=t.codecs.split(",").map(function(i){return ji(i)}),e.length!=t.length))return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Ug(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=g(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}W("shaka.media.AdaptationSet",ea),W("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function ta(){}ta.prototype.create=function(){},ta.prototype.configure=function(){},ta.prototype.getConfiguration=function(){},W("shaka.media.AdaptationSetCriteria",ta);function kS(){this.g=fs,this.i=new Map().set(fs,2).set(Zr,1),this.h=0}var Zr=0,fs=1;/*
|
|
33
|
+
@license
|
|
34
|
+
Shaka Player
|
|
35
|
+
Copyright 2023 Google LLC
|
|
36
|
+
SPDX-License-Identifier: Apache-2.0
|
|
37
|
+
*/function Kc(e,t,n){this.g=e,this.i=t,this.h=n}function Og(e,t){return k(function(n){if(n.g==1)return T(n,Wx(e.h,t,e.g.drm.preferredKeySystems,e.g.drm.keySystemsMapping),2);if(e.g.streaming.dontChooseCodecs||Yh(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(us))throw new M(2,4,4032);return n.return(bg(e,t))})}function _g(e,t){var n=e.g.restrictions;e=e.i;var i=!1;t=g(t.variants);for(var r=t.next();!r.done;r=t.next()){r=r.value;var o=r.allowedByApplication;r.allowedByApplication=_u(r,n,e),o!=r.allowedByApplication&&(i=!0)}return i}function bg(e,t){var n=_g(e,t);if(t){var i=e.h?e.h.g:null;if(i&&e.h.A){for(var r=new Set,o=g(t.variants),s=o.next();!s.done;s=o.next())s=s.value,s.audio&&r.add(s.audio),s.video&&r.add(s.video);for(r=g(r),o=r.next();!o.done;o=r.next())Fg(e,i.keySystem,o.value)}Bg(e,t)}return n}function Fg(e,t,n){n=g(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if(i=i.value,i.keySystem==t){i=g(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,as(e.h,r.initDataType,r.initData)}}function Bg(e,t){e=e.h?e.h.Te():{};var n=Object.keys(e);n=n.length&&n[0]=="00";var i=!1,r=!1,o=new Set,s=new Set,u=new Set;t=g(t.variants);for(var a=t.next();!a.done;a=t.next())a=a.value,a.audio&&u.add(a.audio),a.video&&u.add(a.video),a.allowedByApplication?a.allowedByKeySystem&&(i=!0):r=!0;for(u=g(u),t=u.next();!t.done;t=u.next())if(t=t.value,t.keyIds.size)for(t=g(t.keyIds),a=t.next();!a.done;a=t.next()){a=a.value;var l=e[n?"00":a];l?Xc.includes(l)&&s.add(l):o.add(a)}if(!i)throw e={hasAppRestrictions:r,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(s)},new M(2,4,4012,e)}var Xc=["output-restricted","internal-error"];function ds(){}function vr(e,t){eo.set(e,t)}function DS(){var e={};if(ye(),Zn())for(var t=g(eo.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(t=g(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]),n=t.next();!n.done;n=t.next())n=n.value,e[n]=Zn()?eo.has(n):xr().canPlayType(n)!="";return e}function Vg(e,t){if(t){var n=eo.get(t.toLowerCase());if(n)return n}throw new M(2,4,4e3,e,t)}W("shaka.media.ManifestParser",ds),ds.unregisterParserByMime=function(e){eo.delete(e)},ds.registerParserByMime=vr,ds.registerParserByExtension=function(){Ee("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},ds.AccessibilityPurpose={tm:"visually impaired",Gl:"hard of hearing",bm:"spoken subtitles"};var eo=new Map;function na(e,t){var n=null,i=null,r=null,o=null,s=e.T();return t&1&&(r=e.yd()),t&2&&(o=e.T()),t&8&&(n=e.T()),t&16&&(i=e.T()),{trackId:s,Md:n,Nd:i,gj:r,Fi:o}}function ia(e,t){return t==1?(t=e.T(),e=e.T(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.T()}}function ra(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.T(),e.skip(4),e=e.Ba(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function oa(e,t,n){var i=e.T(),r=[],o=null;n&1&&(o=e.Yg()),n&4&&e.skip(4);for(var s=0;s<i;s++){var u={hh:null,sampleSize:null,Bf:null};n&256&&(u.hh=e.T()),n&512&&(u.sampleSize=e.T()),n&1024&&e.skip(4),n&2048&&(u.Bf=t==0?e.T():e.Yg()),r.push(u)}return{ym:i,gh:r,mg:o}}function Hg(e){e.skip(6),e.skip(2),e.skip(8);var t=e.Ba();return e.skip(2),e.skip(2),e.skip(2),e=e.Ba()+e.Ba()/65536,{channelCount:t,sampleRate:e}}function Wc(e){return e=e.T(),{codec:Qu(e)}}function RS(e){var t=null,n=null,i=e.Ub(4),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),r+=String.fromCharCode(i[3]),r==="nclx"){switch(e.Ba()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(i=e.Ba(),e.Ba(),i){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,oe:n}}function ps(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function Jt(e){return(10>e?"0":"")+e}function yr(e){if(!zg){zg=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);sa=we("ftyp",t,i,t,n),t=we("dref",VS),zc=we("dinf",t)}this.g=e}function to(e){for(var t=[],n=g(e.g),i=n.next();!i.done;i=n.next()){var r=t,o=r.push,s=i.value;i=we;var u=s.id+1,a=s.stream.width||0,l=s.stream.height||0;s.type=="audio"&&(l=a=0);var c=s.duration*s.timescale,f=Math.floor(c/(bi+1));switch(c=Math.floor(c%(bi+1)),u=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(H(qe(u,4)),[0,0,0,0],H(qe(f,4)),H(qe(c,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],H(qe(a,2)),[0,0],H(qe(l,2)),[0,0])),u=we("tkhd",u),a=we,f=s.duration*s.timescale,l=Math.floor(f/(bi+1)),f=Math.floor(f%(bi+1)),c=s.stream.language,c=c.charCodeAt(0)-96<<10|c.charCodeAt(1)-96<<5|c.charCodeAt(2)-96,l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(H(qe(s.timescale,4)),H(qe(l,4)),H(qe(f,4)),H(qe(c,2)),[0,0])),l=we("mdhd",l),f=s,c=new Uint8Array([]),f.type){case"video":c=LS;break;case"audio":c=NS}f=we("hdlr",c);e:{switch(s.type){case"video":s=we("minf",we("vmhd",bS),zc,Gg(s));break e;case"audio":s=we("minf",we("smhd",FS),zc,Gg(s));break e}s=new Uint8Array([])}s=a("mdia",l,f,s),i=i("trak",u,s),o.call(r,i)}for(t=tt.apply(It,H(t)),o=e.g[0],n=we,i=o.duration*o.timescale,r=Math.floor(i/(bi+1)),i=Math.floor(i%(bi+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(H(qe(o.timescale,4)),H(qe(r,4)),H(qe(i,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255])),r=we("mvhd",r),i=[],e=g(e.g),a=e.next();!a.done;a=e.next())s=i,u=s.push,a=new Uint8Array([0,0,0,0].concat(H(qe(a.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=we("trex",a),u.call(s,a);if(e=tt.apply(It,H(i)),e=we("mvex",e),i=[],o.encrypted){for(o=g(o.stream.drmInfos),s=o.next();!s.done;s=o.next())if(s=s.value,s.initData)for(s=g(s.initData),u=s.next();!u.done;u=s.next())i.push(u.value.initData);o=tt.apply(It,H(i))}else o=new Uint8Array([]);return e=n("moov",r,t,e,o),t=new Uint8Array(sa.byteLength+e.byteLength),t.set(sa),t.set(e,sa.byteLength),t}function Gg(e){var t=we,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=ye().ee()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var i=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(n=e.stream.width||0,i=e.stream.height||0,0<e.Na.byteLength)var r=we("avcC",e.Na);else{r=we;for(var o=7,s=[],u=[],a=0,l=0,c=0,f=0;f<e.Ab.length;f++){var p=Xg(e.Ab[f]);switch(p[0]&31){case 7:s.push(p),o+=p.length+2;break;case 8:u.push(p),o+=p.length+2}}for(0<s.length&&(a=s[0][1],c=s[0][2],l=s[0][3]),o=new Uint8Array(o),f=0,o[f++]=1,o[f++]=a,o[f++]=c,o[f++]=l,o[f++]=255,o[f++]=224|s.length,a=0;a<s.length;a++)o[f++]=(s[a].length&65280)>>8,o[f++]=s[a].length&255,o.set(s[a],f),f+=s[a].length;for(o[f++]=u.length,s=0;s<u.length;s++)o[f++]=(u[s].length&65280)>>8,o[f++]=u[s].length&255,o.set(u[s],f),f+=u[s].length;r=r("avcC",o)}n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(H(qe(n,2)),H(qe(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="avc1",u=Kg(e),s=new Uint8Array([]),e.encrypted&&(s=Tr(0,e.stream,e.codecs),i="encv"),i=we(i,n,r,u,s)}else e.codecs.includes("hvc1")&&(i=e.stream.width||0,r=e.stream.height||0,n=new Uint8Array([]),0<e.Na.byteLength&&(n=we("hvcC",e.Na)),i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(H(qe(i,2)),H(qe(r,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),r="hvc1",u=Kg(e),s=new Uint8Array([]),e.encrypted&&(s=Tr(0,e.stream,e.codecs),r="encv"),i=we(r,i,n,u,s));break;case"audio":n=="mp3"?e=we(".mp3",hs(e)):n=="ac-3"?(n=we("dac3",e.Ea),i="ac-3",r=new Uint8Array([]),e.encrypted&&(r=Tr(0,e.stream,e.codecs),i="enca"),e=we(i,hs(e),n,r)):n=="ec-3"?(n=we("dec3",e.Ea),i="ec-3",r=new Uint8Array([]),e.encrypted&&(r=Tr(0,e.stream,e.codecs),i="enca"),e=we(i,hs(e),n,r)):n=="opus"?(n=we("dOps",e.Ea),i="Opus",r=new Uint8Array([]),e.encrypted&&(r=Tr(0,e.stream,e.codecs),i="enca"),e=we(i,hs(e),n,r)):(0<e.Ea.byteLength?n=we("esds",e.Ea):(n=we,i=e.id+1,r=e.stream.channelsCount||2,s=e.stream.audioSamplingRate||44100,a=_r("audio",e.codecs.split(",")),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},u=l[s],(a==="mp4a.40.5"||a==="mp4a.40.29")&&(u=l[2*s]),s=parseInt(a.split(".").pop(),10),i=new Uint8Array([0,0,0,0,3,25].concat(H(qe(i,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,s<<3|u>>>1,u<<7|r<<3,6,1,2])),n=n("esds",i)),i="mp4a",r=new Uint8Array([]),e.encrypted&&(r=Tr(0,e.stream,e.codecs),i="enca"),e=we(i,hs(e),n,r)),i=e}return e=we("stsd",BS,i),t("stbl",e,we("stts",jS),we("stsc",US),we("stsz",_S),we("stco",OS))}function Kg(e){if(!e.Wa&&!e.Xa)return new Uint8Array([]);var t=e.Xa;return e=new Uint8Array([].concat(H(qe(e.Wa,4)),H(qe(t,4)))),we("pasp",e)}function hs(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(H(qe(e.stream.audioSamplingRate||44100,2)),[0,0]))}function Tr(e,t,n){e=we,n=new Uint8Array([].concat(H(qe(Wg(n.split(".")[0]),4)))),n=we("frma",n);var i="cenc",r=t.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=new Uint8Array([0,0,0,0].concat(H(qe(Wg(i),4)),[0,1,0,0])),i=we("schm",i),r=we;var o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t=g(t.drmInfos);for(var s=t.next();!s.done;s=t.next())if((s=s.value)&&s.keyIds&&s.keyIds.size){s=g(s.keyIds);for(var u=s.next();!u.done;u=s.next())o=Xg(u.value)}return t=new Uint8Array([0,0,0,0,0,0,1,8]),t=we("tenc",t,o),e("sinf",n,i,r("schi",t))}function gs(e){var t=[];e=g(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i=t.push,r=i.apply,o=we,s=new Uint8Array([0,0,0,0].concat(H(qe(n.data?n.data.Vb:0,4))));s=we("mfhd",s);var u,a=n.data?n.data.yb:[],l=new Uint8Array(4+a.length);for(u=0;u<a.length;u++){var c=a[u].flags;l[u+4]=c.ib<<4|c.kb<<2|c.jb}a=we("sdtp",l);var f=a.length+92;l=we,u=new Uint8Array([0,0,0,58].concat(H(qe(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),u=we("tfhd",u),c=n.data?n.data.baseMediaDecodeTime:0;var p=Math.floor(c%(bi+1));c=new Uint8Array([1,0,0,0].concat(H(qe(Math.floor(c/(bi+1)),4)),H(qe(p,4)))),c=we("tfdt",c);var h=f;f=n.data?n.data.yb:[],p=f.length;var m=12+16*p,y=new Uint8Array(m);for(h+=8+m,y.set([n.type==="video"?1:0,0,15,1].concat(H(qe(p,4)),H(qe(h,4))),0),h=0;h<p;h++){var v=f[h];m=qe(v.duration,4);var x=qe(v.size,4),S=v.flags;v=qe(v.rb,4),y.set([].concat(H(m),H(x),[S.wb<<2|S.ib,S.kb<<6|S.jb<<4|S.xb,S.hb&61440,S.hb&15],H(v)),12+16*h)}f=we("trun",y),a=l("traf",u,c,f,a),o=o("moof",s,a),r.call(i,t,[o,PS(n)])}return tt.apply(It,H(t))}function PS(e){return e=(e.data?e.data.yb:[]).map(function(t){return t.data}),e=tt.apply(It,H(e)),we("mdat",e)}function qe(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function Xg(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function Wg(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function we(e){var t=pt.apply(1,arguments),n=Yg.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],Yg.set(e,n));for(var i=8,r=t.length-1;0<=r;r--)i+=t[r].byteLength;for(r=new Uint8Array(i),r[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=i&255,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}var zg=!1,bi=Math.pow(2,32)-1,Yg=new Map,LS=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),NS=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),jS=new Uint8Array([0,0,0,0,0,0,0,0]),US=new Uint8Array([0,0,0,0,0,0,0,0]),OS=new Uint8Array([0,0,0,0,0,0,0,0]),_S=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),bS=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),FS=new Uint8Array([0,0,0,0,0,0,0,0]),BS=new Uint8Array([0,0,0,0,0,0,0,1]),sa=new Uint8Array([]),VS=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),zc=new Uint8Array([]);function HS(e){e=se(e);var t=null;return new Ue().box("moov",le).box("trak",le).box("mdia",le).box("minf",le).box("stbl",le).R("stsd",mi).box("enca",function(n){return t=n.reader.h,$u(n)}).box("sinf",le).box("frma",function(n){n.parser.stop(),Wc(n.reader).codec==="ec-3"&&t&&t.getUint16(16)!==2&&t.setUint16(16,2)}).parse(e),e}function GS(e,t,n){function i(h){f.push({box:h,oi:1701733217})}function r(h){f.push({box:h,oi:1701733238})}function o(h){a=!0,h.parser.stop()}function s(h){c.push(h),le(h)}var u=t=se(t),a=!1,l,c=[],f=[];if(new Ue().box("moov",s).box("trak",s).box("mdia",s).box("minf",s).box("stbl",s).R("stsd",function(h){l=h,c.push(h),mi(h)}).R("encv",o).R("enca",o).R("dvav",r).R("dva1",r).R("dvh1",r).R("dvhe",r).R("dvc1",r).R("dvi1",r).R("hev1",r).R("hvc1",r).R("avc1",r).R("avc3",r).R("ac-3",i).R("ec-3",i).R("ac-4",i).R("Opus",i).R("fLaC",i).R("mp4a",i).parse(t),a)return t;if(f.length==0||!l)throw si(t),new M(2,3,3019,n);f.reverse(),n=g(f);for(var p=n.next();!p.done;p=n.next())p=p.value,u=WS(e,u,l,p.box,c,p.oi);return ye().Ai()?(e=new Uint8Array(t.byteLength+u.byteLength),e.set(u),e.set(t,u.byteLength),e):u}function KS(e){e=se(e);var t=[];new Ue().box("mdat",function(s){t.push(s)}).parse(e);for(var n=[],i=0;i<t.length;i++){var r=t[i-1],o=t[i];n.push(XS(e.subarray(r?r.start+r.size:0,o.start+o.size)))}return tt.apply(It,H(n))}function XS(e){function t(f){s.push(f),le(f)}var n,i,r,o,s=[];if(new Ue().box("moof",t).box("traf",t).R("tfhd",function(f){n=f,r=na(f.reader,f.flags)}).R("trun",function(f){i=f,o=oa(f.reader,f.version,f.flags)}).parse(e),r&&r.Fi!==2){var u=n.start+_i(n)+4+(r.gj!==null?8:0),a=Ht(e);if(r.Fi!==null)a.setUint32(u,2);else{ua(e,n.start,n.size+4);var l=a.getUint32(n.start+8);a.setUint32(n.start+8,l|2),o&&o.mg!==null&&a.setInt32(i.start+_i(i)+4,o.mg+4),l=e.subarray(0,u),a=e.subarray(u),e=new Uint8Array(e.byteLength+4),e.set(l),l=[];for(var c=3;0<=c;c--)l.push(2>>8*c&255);for(e.set(new Uint8Array(l),u),e.set(a,u+4),u=g(s),a=u.next();!a.done;a=u.next())a=a.value,ua(e,a.start,a.size+4)}}return e}function WS(e,t,n,i,r,o){var s=Tr(new yr([]),e,i.name),u=t.subarray(i.start,i.start+i.size);for(e=new Uint8Array(i.size+s.byteLength),e.set(u,0),Ht(e).setUint32(4,o),e.set(s,i.size),ua(e,0,e.byteLength),o=new Uint8Array(t.byteLength+e.byteLength),i=ye().$e()?i.start:i.start+i.size,s=t.subarray(i),o.set(t.subarray(0,i)),o.set(e,i),o.set(s,i+e.byteLength),t=g(r),r=t.next();!r.done;r=t.next())r=r.value,ua(o,r.start,r.size+e.byteLength);return e=Ht(o,n.start),n=_i(n),t=e.getUint32(n),e.setUint32(n,t+1),o}function ua(e,t,n){e=Ht(e,t),t=e.getUint32(0),t!=0&&(t==1?(e.setUint32(8,n>>32),e.setUint32(12,n&4294967295)):e.setUint32(0,n))}function zS(e){function t(r){i.push({start:r.start,size:r.size}),le(r)}var n=se(e),i=[];return new Ue().box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(r){i.push({start:r.start,size:r.size});for(var o=Ht(n,r.start),s=0;s<r.size-3;s++){var u=o.getUint32(s);u==1633889587?o.setUint32(s,1700998451):u==1684103987&&o.setUint32(s,1684366131)}}).parse(n),n}function Xt(e,t,n,i,r,o,s,u){this.O=e,this.startByte=t,this.endByte=n,this.rd=i===void 0?null:i,this.timescale=r===void 0?null:r,this.h=o===void 0?null:o,this.aesKey=s===void 0?null:s,this.g=this.mimeType=this.codecs=null,this.encrypted=u===void 0?!1:u}Xt.prototype.Bc=function(){return this.startByte},Xt.prototype.zc=function(){return this.endByte},Xt.prototype.ge=function(e){this.h=e},Xt.prototype.Yb=function(){return this.h};function ms(e,t){return e===t?!0:e&&t?e.Bc()==t.Bc()&&e.zc()==t.zc()&&zo(e.O().sort(),t.O().sort())&&ri(e.Yb(),t.Yb()):e==t}W("shaka.media.InitSegmentReference",Xt),Xt.prototype.getEndByte=Xt.prototype.zc,Xt.prototype.getStartByte=Xt.prototype.Bc;function Z(e,t,n,i,r,o,s,u,a,l,c,f,p,h,m,y){for(l=l===void 0?[]:l,h=h===void 0?vi:h,this.startTime=e,this.j=this.endTime=t,this.C=n,this.startByte=i,this.endByte=r,this.Y=o,this.timestampOffset=s,this.appendWindowStart=u,this.appendWindowEnd=a,this.g=l,this.tilesLayout=c===void 0?"":c,this.B=f===void 0?null:f,this.h=p===void 0?null:p,this.status=h,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=m===void 0?null:m,this.thumbnailSprite=null,this.i=-1,this.A=y===void 0?!1:y,this.F=this.o=!1,e=g(this.g),t=e.next();!t.done;t=e.next())t.value.ki();this.A&&this.g.length&&this.g[this.g.length-1].ji(),this.s=this.bandwidth=this.mimeType=this.codecs=null,this.G=!1}d=Z.prototype,d.O=function(){return this.C()},d.getStartTime=function(){return this.startTime},d.zj=function(){return this.endTime},d.Bc=function(){return this.startByte},d.zc=function(){return this.endByte},d.Vj=function(){return this.tilesLayout},d.Uj=function(){return this.B},d.Cc=function(){return this.status},d.qk=function(){this.status=$g},d.Pg=function(){this.preload=!0},d.isPreload=function(){return this.preload},d.qd=function(){this.l=!1},d.fk=function(){return this.l},d.ki=function(){this.o=!0},d.hk=function(){return this.o},d.ji=function(){this.F=!0},d.gk=function(){return this.F},d.ii=function(){this.m=!0},d.bk=function(){return this.m},d.Hf=function(e){this.thumbnailSprite=e},d.Sj=function(){return this.thumbnailSprite},d.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=g(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},d.vh=function(e){this.h==null?zn("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},d.ge=function(e,t){this.s=e,this.G=t===void 0?!1:t},d.Yb=function(e){var t=this.s;return(e===void 0||e)&&this.G&&(this.s=null),t};function qg(e,t){e.Y=t,e=g(e.g);for(var n=e.next();!n.done;n=e.next())qg(n.value,t)}W("shaka.media.SegmentReference",Z),Z.prototype.getSegmentData=Z.prototype.Yb,Z.prototype.setSegmentData=Z.prototype.ge,Z.prototype.syncAgainst=Z.prototype.vh,Z.prototype.offset=Z.prototype.offset,Z.prototype.getThumbnailSprite=Z.prototype.Sj,Z.prototype.setThumbnailSprite=Z.prototype.Hf,Z.prototype.hasByterangeOptimization=Z.prototype.bk,Z.prototype.markAsByterangeOptimization=Z.prototype.ii,Z.prototype.isLastPartial=Z.prototype.gk,Z.prototype.markAsLastPartial=Z.prototype.ji,Z.prototype.isPartial=Z.prototype.hk,Z.prototype.markAsPartial=Z.prototype.ki,Z.prototype.isIndependent=Z.prototype.fk,Z.prototype.markAsNonIndependent=Z.prototype.qd,Z.prototype.isPreload=Z.prototype.isPreload,Z.prototype.markAsPreload=Z.prototype.Pg,Z.prototype.markAsUnavailable=Z.prototype.qk,Z.prototype.getStatus=Z.prototype.Cc,Z.prototype.getTileDuration=Z.prototype.Uj,Z.prototype.getTilesLayout=Z.prototype.Vj,Z.prototype.getEndByte=Z.prototype.zc,Z.prototype.getStartByte=Z.prototype.Bc,Z.prototype.getEndTime=Z.prototype.zj,Z.prototype.getStartTime=Z.prototype.getStartTime,Z.prototype.getUris=Z.prototype.O;var vi=0,$g=1;Z.Status={il:vi,rm:$g,Ql:2};function vs(e){return e.length==1&&1e-4>e.end(0)-e.start(0)}function Yc(e){return!e||vs(e)?null:e.length?e.end(e.length-1):null}function qc(e,t){return!e||!e.length||vs(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function Qg(e,t){if(!e||!e.length||vs(e))return 0;var n=0;e=g(yi(e));for(var i=e.next();!i.done;i=e.next()){var r=i.value;i=r.start,r=r.end,r>t&&(n+=r-Math.max(i,t))}return n}function YS(e,t,n){return!e||!e.length||vs(e)?null:(e=yi(e).findIndex(function(i,r,o){return i.start>t&&(r==0||o[r-1].end-t<=n)}),0<=e?e:null)}function yi(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function $c(){}function Jg(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function aa(e){for(var t=!1,n=e.getElementsByTagName("source"),i=n.length-1;0<=i;--i)e.removeChild(n[i]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function ys(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function xr(){return no||(Qc||(Qc=new Te(function(){no=null})),(no=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(no=document.createElement("video")),Qc.ia(1),no)}function qS(e,t){var n,i,r,o,s;return k(function(u){if(u.g==1)return"fonts"in document&&"FontFace"in F?T(u,document.fonts.ready,2):u.return();if(!("entries"in document.fonts))return u.return();for(n=function(a){a=a.entries();for(var l=[],c=a.next();c.done===!1;)l.push(c.value),c=a.next();return l},i=g(n(document.fonts)),r=i.next();!r.done;r=i.next())if(o=r.value,o.family===e&&o.display==="swap")return u.return();s=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(s),K(u)})}W("shaka.util.Dom",$c),$c.removeAllChildren=ys,$c.clearSourceFromVideo=aa;var Qc=null,no=null;/*
|
|
38
|
+
@license
|
|
39
|
+
Shaka Player
|
|
40
|
+
Copyright 2022 Google LLC
|
|
41
|
+
SPDX-License-Identifier: Apache-2.0
|
|
42
|
+
*/function Jc(){}function Zg(e,t){return t+10<=e.length&&e[t]===73&&e[t+1]===68&&e[t+2]===51&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function em(e,t){return t+10<=e.length&&e[t]===51&&e[t+1]===68&&e[t+2]===73&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function Zc(e,t){var n=(e[t]&127)<<21;return n|=(e[t+1]&127)<<14,n|=(e[t+2]&127)<<7,n|=e[t+3]&127}function $S(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.type==="APIC"){if(2>e.size||e.data[0]!==3)return null;var n=e.data.subarray(1).indexOf(0);if(n===-1)return null;var i=ze(se(e.data,1,n)),r=e.data[2+n],o=e.data.subarray(3+n).indexOf(0);if(o===-1)return null;var s=ze(se(e.data,3+n,o)),u;return i==="-->"?u=ze(se(e.data,4+n+o)):u=gn(e.data.subarray(4+n+o)),t.mimeType=i,t.pictureType=r,t.description=s,t.data=u,t}return e.type==="TXXX"?2>e.size||e.data[0]!==3||(i=e.data.subarray(1).indexOf(0),i===-1)?null:(n=ze(se(e.data,1,i)),e=ze(se(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="WXXX"?2>e.size||e.data[0]!==3||(i=e.data.subarray(1).indexOf(0),i===-1)?null:(n=ze(se(e.data,1,i)),e=ze(se(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="PRIV"?2>e.size||(n=e.data.indexOf(0),n===-1)?null:(n=ze(se(e.data,0,n)),t.description=n,n=="com.apple.streaming.transportStreamTimestamp"?(n=e.data.subarray(n.length+1),e=n[3]&1,n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=4772185884e-2),t.data=n):(e=gn(e.data.subarray(n.length+1)),t.data=e),t):e.type[0]==="T"?2>e.size||e.data[0]!==3?null:(e=ze(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):e.type[0]==="W"?(e=ze(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=gn(e.data),t):null}function Sr(e){for(var t=0,n=[];Zg(e,t);){var i=Zc(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,i=t+i;t+10<i;){var r=e.subarray(t),o=Zc(r,4);r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:o,data:r.subarray(10,10+o)},(o=$S(r))&&n.push(o),t+=r.size+10}em(e,t)&&(t+=10)}return n}function io(e,t){for(var n=t=t===void 0?0:t,i=0;Zg(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=Zc(e,t+6),em(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}W("shaka.util.Id3Utils",Jc),Jc.getID3Data=io,Jc.getID3Frames=Sr;function tm(e){return new Date(Date.UTC(1900,0,1,0,0,0,0)+e).getTime()}function Ti(e,t){if(this.j=e,t!==void 0&&t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)2<=i&&e[i]==3&&e[i-1]==0&&e[i-2]==0||(t[n]=e[i],n++);this.j=se(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function ef(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),i=Math.min(4,e.i);i!==0&&(n.set(e.j.subarray(t,t+i)),e.h=new He(n,0).T(),e.g=8*i,e.i-=i)}function Zt(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,ef(e)}e.h<<=t,e.g-=t}function Se(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&ef(e),n=t-n,0<n?i<<n|Se(e,n):i}function tf(e){var t;for(t=0;t<e.g;++t)if(e.h&2147483648>>>t)return e.h<<=t,e.g-=t,t;return ef(e),t+tf(e)}function Wt(e){Zt(e,1+tf(e))}function z(e){var t=tf(e);return Se(e,t+1)-1}function ro(e){return e=z(e),1&e?1+e>>>1:-1*(e>>>1)}function Q(e){return Se(e,1)===1}function Re(e){return Se(e,8)}function la(e,t){for(var n=8,i=8,r=0;r<t;r++)i!==0&&(i=ro(e),i=(n+i+256)%256),n=i===0?n:i}function QS(e){return Re(e),z(e),z(e)}W("shaka.util.ExpGolomb",Ti);function Fe(){this.H=null,this.I=!1,this.m=this.K=null,this.j=[],this.g=[],this.B=this.C=null,this.i=[],this.h=[],this.F=null,this.l=[],this.A=this.G=this.o=this.s=null}d=Fe.prototype,d.clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},d.Ff=function(e){this.A!=null&&this.A!=e&&(this.o=this.s=null),this.A=e},d.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,rf(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(e[r]==71){var o=!!(e[r+1]&64),s=((e[r+1]&31)<<8)+e[r+2];if(1<(e[r+3]&48)>>4){var u=r+5+e[r+4];if(u==r+188)continue}else u=r+4;switch(s){case 0:o&&(u+=e[u]+1),this.H=(e[u+10]&31)<<8|e[u+11];break;case 17:case 8191:break;case this.H:o&&(u+=e[u]+1),o=e,s={audio:-1,video:-1,Ye:-1,audioCodec:"",videoCodec:""};var a=u+3+((o[u+1]&15)<<8|o[u+2])-4;for(u+=12+((o[u+10]&15)<<8|o[u+11]);u<a;){var l=(o[u+1]&31)<<8|o[u+2],c=(o[u+3]&15)<<8|o[u+4];switch(o[u]){case 6:if(0<c)for(var f=u+5,p=c;2<p;){var h=o[f+1]+2;switch(o[f]){case 5:var m=pc(o.subarray(f+2,f+h));s.audio==-1&&m==="Opus"?(s.audio=l,s.audioCodec="opus"):s.video==-1&&m==="AV01"&&(s.video=l,s.videoCodec="av1");break;case 106:s.audio==-1&&(s.audio=l,s.audioCodec="ac3");break;case 122:s.audio==-1&&(s.audio=l,s.audioCodec="ec3");break;case 124:s.audio==-1&&(s.audio=l,s.audioCodec="aac");break;case 127:s.audioCodec=="opus"&&(m=null,o[f+2]===128&&(m=o[f+3]),m!=null&&(this.G={channelCount:m&15?m&15:2,jj:m,sampleRate:48e3}))}f+=h,p-=h}break;case 15:s.audio==-1&&(s.audio=l,s.audioCodec="aac");break;case 17:s.audio==-1&&(s.audio=l,s.audioCodec="aac-loas");break;case 21:s.Ye==-1&&(s.Ye=l);break;case 27:s.video==-1&&(s.video=l,s.videoCodec="avc");break;case 3:case 4:s.audio==-1&&(s.audio=l,s.audioCodec="mp3");break;case 36:s.video==-1&&(s.video=l,s.videoCodec="hvc");break;case 129:s.audio==-1&&(s.audio=l,s.audioCodec="ac3");break;case 132:case 135:s.audio==-1&&(s.audio=l,s.audioCodec="ec3")}u+=c+5}o=s,o.video!=-1&&(this.K=o.video,this.m=o.videoCodec),o.audio!=-1&&(this.C=o.audio,this.B=o.audioCodec),o.Ye!=-1&&(this.F=o.Ye),i&&!this.I&&(i=!1,r=t-188),this.I=!0;break;case this.K:u=e.subarray(u,r+188),o?this.j.push([u]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(u);break;case this.C:u=e.subarray(u,r+188),o?this.i.push([u]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(u);break;case this.F:u=e.subarray(u,r+188),o?this.l.push([u]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(u);break;default:i=!0}}return this};function nf(e,t){if((t[0]<<16|t[1]<<8|t[2])!==1)return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var i=t[7];if(i&192){var r=536870912*(t[9]&14)+4194304*(t[10]&255)+16384*(t[11]&254)+128*(t[12]&255)+(t[13]&254)/2;e.s==null&&(e.s=r),n.pts=im(r,e.s),e.s=n.pts,n.dts=n.pts,i&64&&(i=536870912*(t[14]&14)+4194304*(t[15]&255)+16384*(t[16]&254)+128*(t[17]&255)+(t[18]&254)/2,e.o==null&&(e.o=i),n.dts=n.pts!=r?im(i,e.o):i),e.o=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}d.zk=function(e){return Ee("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Vg(e,{Zd:null,state:null})},d.Vg=function(e,t){var n=e.pts?e.pts/9e4:null;e=e.data;var i=e.byteLength,r=1;this.m=="hvc"&&(r=2);var o=t.state||0,s=o,u=0,a=[],l=-1,c=0;for(o==-1&&(l=0,c=this.m=="hvc"?e[0]>>1&63:e[0]&31,o=0,u=1);u<i;){var f=e[u++];o?o===1?o=f?0:2:f?f==1?(f=u-o-1,0<=l?a.push({data:e.subarray(l+r,f),fullData:e.subarray(l,f),type:c,time:n,state:null}):(o=a.length?a[a.length-1]:t.Zd)&&(s&&u<=4-s&&o.state&&(o.data=o.data.subarray(0,o.data.byteLength-s),o.fullData=o.fullData.subarray(0,o.fullData.byteLength-s)),0<f&&(f=e.subarray(0,f),o.data=tt(o.data,f),o.fullData=tt(o.fullData,f),o.state=0)),u<i?(c=this.m=="hvc"?e[u]>>1&63:e[u]&31,l=u,o=0):o=-1):o=0:o=3:o=f?0:1}return 0<=l&&0<=o&&a.push({data:e.subarray(l+r,i),fullData:e.subarray(l,i),type:c,time:n,state:o}),!a.length&&t.Zd&&(n=a.length?a[a.length-1]:t.Zd)&&(n.data=tt(n.data,e),n.fullData=tt(n.fullData,e)),t.state=o,a},d.getMetadata=function(){for(var e=[],t=g(this.l),n=t.next();!n.done;n=t.next())n=tt.apply(It,H(n.value)),(n=nf(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:Sr(n.data),dts:n.dts,pts:n.pts});return e},d.sb=function(){if(this.i.length&&!this.h.length)for(var e=g(this.i),t=e.next();!t.done;t=e.next()){var n=tt.apply(It,H(t.value)),i=nf(this,n);t=this.h.length?this.h[this.h.length-1]:null,i&&i.pts!=null&&i.dts!=null&&(!t||t.pts!=i.pts&&t.dts!=i.dts)?this.h.push(i):this.h.length&&(n=i?i.data:n)&&(t=this.h.pop(),t.data=tt(t.data,n),this.h.push(t))}return this.h},d.Rc=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=g(this.j),n=t.next();!n.done;n=t.next()){var i=tt.apply(It,H(n.value)),r=nf(this,i);n=this.g.length?this.g[this.g.length-1]:null,r&&r.pts!=null&&r.dts!=null&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?this.g.push(r):this.g.length&&(i=r?r.data:i)&&(n=this.g.pop(),n.data=tt(n.data,i),this.g.push(n))}if(e){for(t={Zd:null,state:null},n=[],i=g(this.g),r=i.next();!r.done;r=i.next())r=r.value,r.nalus=this.Vg(r,t),r.nalus.length&&(n.push(r),t.Zd=r.nalus[r.nalus.length-1]);this.g=n}}return e?this.g:(e=this.g,this.g=[],e)},d.getStartTime=function(e){if(e=="audio"){e=null;var t=this.sb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return e=="video"?(e=null,t=this.Rc(!1),t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},d.Od=function(){return{audio:this.B,video:this.m}},d.Xe=function(){for(var e=[],t=g(this.Rc()),n=t.next();!n.done;n=t.next())e.push.apply(e,H(n.value.nalus));return e},d.Yj=function(){Ee("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Ig();return{height:e.height,width:e.width}},d.Ig=function(){return this.m=="hvc"?ZS(this):JS(this)};function nm(e){var t=e.Rc();return 1<t.length&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(1/(t-e)*9e4):null}function JS(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Xe();if(!n.length||(n=n.find(function(h){return h.type==7}),!n))return t;n=new Ti(n.data);var i=Re(n),r=Re(n),o=Re(n);if(Wt(n),ew.includes(i)){var s=z(n);if(s===3&&Zt(n,1),Wt(n),Wt(n),Zt(n,1),Q(n)){s=s!==3?8:12;for(var u=0;u<s;u++)Q(n)&&(6>u?la(n,16):la(n,64))}}if(Wt(n),s=z(n),s===0)z(n);else if(s===1)for(Zt(n,1),Wt(n),Wt(n),s=z(n),u=0;u<s;u++)Wt(n);Wt(n),Zt(n,1),s=z(n),u=z(n);var a=Se(n,1);a===0&&Zt(n,1),Zt(n,1);var l=0,c=0,f=0,p=0;return Q(n)&&(l=z(n),c=z(n),f=z(n),p=z(n)),t.height=String((2-a)*(u+1)*16-2*f-2*p),t.width=String(16*(s+1)-2*l-2*c),t.codec="avc1."+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+o.toString(16).toUpperCase()).slice(-2),t.frameRate=nm(e),t}function ZS(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Xe();if(!n.length||(n=n.find(function(D){return D.type==33}),!n))return t;var i=new Ti(n.fullData,!0);Re(i),Re(i),Se(i,4);var r=Se(i,3);Q(i);var o=Se(i,2),s=Se(i,1),u=Se(i,5),a=Se(i,32);n=Re(i);for(var l=Re(i),c=Re(i),f=Re(i),p=Re(i),h=Re(i),m=Re(i),y=[],v=[],x=0;x<r;x++)y.push(Q(i)),v.push(Q(i));if(0<r)for(x=r;8>x;x++)Se(i,2);for(x=0;x<r;x++)y[x]&&Se(i,88),v[x]&&Re(i);z(i),r=z(i),r==3&&Se(i,1),y=z(i),v=z(i);var S=x=0,w=0,A=0;return Q(i)&&(x+=z(i),S+=z(i),w+=z(i),A+=z(i)),t.width=String(y-(x+S)*(r===1||r===2?2:1)),t.height=String(v-(w+A)*(r===1?2:1)),i=function(D){for(var E=0,I=0;32>I;I++)E|=(D>>I&1)<<31-I;return E>>>0}(a),s=s==1?"H":"L",o="hvc1"+("."+["","A","B","C"][o]+u),o+="."+i.toString(16).toUpperCase(),o+="."+s+m,h&&(o+="."+h.toString(16).toUpperCase()),p&&(o+="."+p.toString(16).toUpperCase()),f&&(o+="."+f.toString(16).toUpperCase()),c&&(o+="."+c.toString(16).toUpperCase()),l&&(o+="."+l.toString(16).toUpperCase()),n&&(o+="."+n.toString(16).toUpperCase()),t.codec=o,t.frameRate=nm(e),t}function im(e,t){var n=1;for(e>t&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function oo(e){return!(0>rf(e))}function rf(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(e[n]==71&&e[n+188]==71&&e[n+376]==71)return n;n++}return-1}W("shaka.util.TsParser",Fe),Fe.syncOffset=rf,Fe.probe=oo,Fe.prototype.getVideoInfo=Fe.prototype.Ig,Fe.prototype.getVideoResolution=Fe.prototype.Yj,Fe.prototype.getVideoNalus=Fe.prototype.Xe,Fe.prototype.getCodecs=Fe.prototype.Od,Fe.prototype.getStartTime=Fe.prototype.getStartTime,Fe.prototype.getVideoData=Fe.prototype.Rc,Fe.prototype.getAudioData=Fe.prototype.sb,Fe.prototype.getMetadata=Fe.prototype.getMetadata,Fe.prototype.parseNalus=Fe.prototype.Vg,Fe.prototype.parseAvcNalus=Fe.prototype.zk,Fe.prototype.parse=Fe.prototype.parse,Fe.prototype.setDiscontinuitySequence=Fe.prototype.Ff,Fe.prototype.clearData=Fe.prototype.clearData,Fe.Timescale=9e4;var ew=[100,110,122,244,44,83,86,118,128,138,139,134];function rm(e,t,n,i,r){var o=this;this.g=e,this.N=n,this.A=i,this.ha=t,this.l=new Map,this.C=new Map,this.Oa=new Map,this.h=null,this.Ka=!1,this.M=r||null,this.o=new Map,this.s=new Me,this.j=new Map,this.I=null,this.K=new je,this.za="",this.eb=!1,this.ya=!0,this.L=!1,this.B=this.P=null,this.i=of(this,this.K),this.Ya=this.F=!1,this.H=new $r(function(){return iw(o)}),this.G=!1,this.W="UNKNOWN",this.Za=this.ab=!1,this.Pa=new je,this.m=!1,this.wa=null,this.ba=new Map,this.na=this.S=this.va=this.U=null,this.ka=new je,this.g.remote&&(this.L=this.g.remote.state!="disconnected",this.s.D(this.g.remote,"connect",function(){o.L=o.g.remote.state!="disconnected"}),this.s.D(this.g.remote,"connecting",function(){o.L=o.g.remote.state!="disconnected"}),this.s.D(this.g.remote,"disconnect",function(){o.L=o.g.remote.state!="disconnected"}))}function of(e,t){if(e.ya=!0,F.ManagedMediaSource){e.B||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.s.D(n,"startstreaming",function(){e.ya=!0}),e.s.D(n,"endstreaming",function(){e.ya=!1})}else n=new MediaSource;return e.s.Aa(n,"sourceopen",function(){URL.revokeObjectURL(e.za),t.resolve()}),e.s.Aa(e.g,"playing",function(){e.eb=!0}),e.za=lf(n),e.A.useSourceElements?(e.g.removeAttribute("src"),e.P&&e.g.removeChild(e.P),e.B&&e.g.removeChild(e.B),e.P=Jg(e.za),e.g.appendChild(e.P),e.B&&e.g.appendChild(e.B),e.g.load()):e.g.src=e.za,n}function tw(e,t,n){e.g&&F.ManagedMediaSource&&e.i&&e.A.useSourceElements&&(e.B&&e.g.removeChild(e.B),e.B=Jg(t,n),e.g.appendChild(e.B),e.g.disableRemotePlayback=!1)}function nw(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(H(Ui)),t={};ye(),e=g(e);for(var n=e.next();!n.done;n=e.next()){n=n.value,ns(n)?t[n]=!0:t[n]=Zn()?Pt(n)||!!Kr(n):xr().canPlayType(n)!="";var i=n.split(";")[0];t[i]=t[i]||t[n]}return t}d=rm.prototype,d.destroy=function(){return this.H.destroy()};function iw(e){var t,n,i,r,o,s,u,a,l,c,f,p,h,m,y;return k(function(v){if(v.g==1){for(t=[],n=g(e.o),i=n.next();!i.done;i=n.next())for(r=i.value,o=g(r),s=o.next().value,u=o.next().value,a=u[0],l=s,e.o.set(l,u.slice(0,1)),a&&t.push(a.p.catch(Gx)),c=g(u.slice(1)),f=c.next();!f.done;f=c.next())p=f.value,p.p.reject(new M(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),T(v,Promise.all(t),2)}for(h=g(e.j.values()),m=h.next();!m.done;m=h.next())y=m.value,y.destroy();e.s&&(e.s.release(),e.s=null),e.g&&e.B&&e.g.removeChild(e.B),e.g&&e.P&&(e.g.removeChild(e.P),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.P=null,e.B=null,e.A=null,e.i=null,e.h=null,e.ha=null,e.l.clear(),e.Oa.clear(),e.j.clear(),e.I=null,e.o.clear(),e.M=null,e.ba.clear(),e.N=null,K(v)})}d.init=function(e,t,n,i){t=t===void 0?!1:t,n=n===void 0?"UNKNOWN":n,i=i===void 0?!1:i;var r=this,o,s,u,a,l,c;return k(function(f){if(f.g==1)return o=gt,T(f,r.K,2);if(f.g!=3)return!wr(r)&&!so(r)?f.u(3):(zn("Expected MediaSource to be open during init(); reopening the media source."),r.K=new je,r.i=of(r,r.K),T(f,r.K,3));for(r.G=t,r.W=n,r.ab=i,r.Za=!r.G&&r.W=="HLS"&&!r.ab,r.ba.clear(),r.U=null,r.va=null,r.S=null,r.na=null,r.ka=new je,s=g(e.keys()),u=s.next();!u.done;u=s.next())a=u.value,l=e.get(a),ca(r,a,l,l.codecs),r.m?(r.o.set(o.ea,[]),r.o.set(o.Ca,[])):r.o.set(a,[]);(c=e.get(o.ea))&&c.isAudioMuxedInVideo&&(r.m=!0),K(f)})};function ca(e,t,n,i){t=="audio"&&i&&(i=bu(i,n.mimeType));var r=rt(n.mimeType,i);if(t==pe)fa(e,r,e.G,n.external);else{var o=e.A.forceTransmux;(!Pt(r)||!e.G&&Ui.includes(r))&&(o=!0);var s=Nu(n.mimeType,i);if(o){if(o=Kt("audio",(i||"").split(",")),i=Kt("video",(i||"").split(",")),o&&i){e.m=!0,ca(e,"audio",n,o),ca(e,"video",n,i);return}(i=Kr(s))&&(r=i(),e.j.set(t,r),r=r.convertCodecs(t,s))}s=r+e.A.addExtraFeaturesToSourceBuffer(r),Ve(e.H);try{var u=e.i.addSourceBuffer(s)}catch(a){throw new M(2,3,3015,a,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.G&&(u.mode=mw),e.s.D(u,"error",function(){var a=e.o.get(t)[0];a.p.reject(new M(2,3,3014,e.g.error?e.g.error.code:0,a.uri))}),e.s.D(u,"updateend",function(){return Fi(e,t)}),e.l.set(t,u),e.C.set(t,r),e.Oa.set(t,!!n.drmInfos.length)}}d.configure=function(e){this.A=e,this.h&&(this.h.A=e.modifyCueCallback)};function om(e){return e.ya&&!e.L&&!e.F}function fa(e,t,n,i){e.h||(e.h=new pi(e.ha),e.h&&(e.h.A=e.A.modifyCueCallback));var r=e.h;i=i||e.Ka,e=e.W,t=="application/cea-608"||t=="application/cea-708"?r.i=null:(r.i=is.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):Ee("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):Ee("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.B=i)}function wr(e){return e.F?!1:e.i?e.i.readyState=="ended":!0}function so(e){return e.F?!1:e.i?e.i.readyState=="closed":!0}function sf(e,t){return e.l.size?t==pe?e=e.h.g:(e=ao(e,t),e=!e||vs(e)?null:e.length==1&&0>e.start(0)?0:e.length?e.start(0):null):e=null,e}function uo(e,t){return e.l.size?t==pe?e.h.h:Yc(ao(e,t)):null}function rw(e,t,n){return t==pe?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=ao(e,t),Qg(e,n))}d.Nb=function(){var e={total:this.F?[]:yi(this.g.buffered),audio:yi(ao(this,"audio")),video:yi(ao(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;t!=null&&n!=null&&e.text.push({start:t,end:n})}return e};function ao(e,t){if(e.F||e.L)return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function ow(e,t,n,i,r,o){var s=null,u=[],a=se(n);if(Ui.includes(o))t=Sr(a),t.length&&i&&((n=t.find(function(h){return h.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof n.data=="number"&&(s=Math.round(n.data)/1e3),e.N.onMetadata([{cueTime:i.startTime,data:a,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(o.includes("/mp4")&&i&&i.Y&&i.Y.timescale){var l=i.Y.timescale;if(!isNaN(l)){var c=r.emsgSchemeIdUris!=null&&0<r.emsgSchemeIdUris.length||e.A.dispatchAllEmsgBoxes,f=0,p=!1;a=new Ue,c&&a.R("emsg",function(h){var m=r.emsgSchemeIdUris;if(h.version===0)var y=h.reader.Vc(),v=h.reader.Vc(),x=h.reader.T(),S=h.reader.T(),w=h.reader.T(),A=h.reader.T(),D=i.startTime+S/x;else x=h.reader.T(),D=h.reader.yd()/x+i.timestampOffset,S=D-i.startTime,w=h.reader.T(),A=h.reader.T(),y=h.reader.Vc(),v=h.reader.Vc();h=h.reader.Ub(h.reader.getLength()-h.reader.Ma()),(m&&m.includes(y)||e.A.dispatchAllEmsgBoxes)&&(y=="urn:mpeg:dash:event:2012"?e.N.yk():(m=D+w/x,e.N.wk({startTime:D,endTime:m,schemeIdUri:y,value:v,timescale:x,presentationTimeDelta:S,eventDuration:w,id:A,messageData:h}),(y=="https://aomedia.org/emsg/ID3"||y=="https://developer.apple.com/streaming/emsg-id3")&&(x=Sr(h),x.length&&e.N.onMetadata([{cueTime:D,data:h,frames:x,dts:D,pts:D}],0,m))))}),a.R("prft",function(h){var m=h.reader,y=h.version;m.T(),h=m.T();var v=m.T();h=1e3*h+v/Math.pow(2,32)*1e3,y===0?m=m.T():(y=m.T(),m=m.T(),m=y*Math.pow(2,32)+m),h=tm(h),m=new Map().set("detail",{wallClockTime:h,programStartDate:new Date(h-m/l*1e3)}),m=new G("prft",m),e.N.onEvent(m)}).box("moof",le).box("traf",le).R("tfdt",function(h){p||(f=ia(h.reader,h.version).baseMediaDecodeTime/l,p=!0,c||h.parser.stop())}).parse(n,!0),p&&i.timestampOffset==0&&(s=f)}}else o.includes("/mp4")||o.includes("/webm")||!oo(a)||(e.ba.has(t)||e.ba.set(t,new Fe),u=e.ba.get(t),u.clearData(),u.Ff(i.i),u.parse(a),a=u.getStartTime(t),a!=null&&(s=a),u=u.getMetadata());return{timestamp:s,metadata:u}}function da(e,t,n,i,r,o,s,u,a,l,c){s=s===void 0?!1:s,u=u===void 0?!1:u,a=a===void 0?!1:a,l=l===void 0?!1:l;var f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L;return k(function(P){switch(P.g){case 1:if(f=gt,t!=f.Ta){P.u(2);break}if(e.W!="HLS"){P.u(3);break}return T(P,e.Pa,4);case 4:p=P.h,e.h.s=p;case 3:return T(P,Fx(e.h,n,i?i.startTime:null,i?i.endTime:null,i?i.O()[0]:null),5);case 5:return P.return();case 2:if(l||!e.m){P.u(6);break}return T(P,da(e,f.ea,n,i,r,o,s,u,a,!0),7);case 7:return T(P,da(e,f.Ca,n,i,r,o,s,u,a,!0),8);case 8:return P.return();case 6:if(!e.l.has(t))return P.return();if(h=e.l.get(t).timestampOffset,m=e.C.get(t),e.j.has(t)&&(m=e.j.get(t).getOriginalMimeType()),i&&(y=ow(e,t,n,i,r,m),v=y.timestamp,x=y.metadata,v!=null&&(e.U==null&&t==f.Ca&&(e.U=v,e.va=i.startTime,e.S!=null&&(S=0,e.va==e.na&&(S=e.U-e.S),e.ka.resolve(S))),e.S==null&&t==f.ea&&(e.S=v,e.na=i.startTime,e.U!=null&&(w=0,e.va==e.na&&(w=e.U-e.S),e.ka.resolve(w))),A=v,D=Ui,!e.G&&D.includes(e.C.get(t))&&(A=0),E=i.startTime-A,I=Math.abs(h-E),(.001<=I||s||u)&&(!a||0<E||!h)&&(h=E,e.Za&&(mt(e,t,function(){return lo(e,t)},null),mt(e,t,function(){return co(e,t,h)},null))),(t==f.Ca||!e.l.has(f.Ca))&&e.Pa.resolve(h)),x.length)&&e.N.onMetadata(x,h,i?i.endTime:null),o&&t==f.Ca&&(e.h||fa(e,"application/cea-608",e.G,!1),e.I||(C=m.split(";",1)[0],e.I=new Bn(C)),i?(R=e.I.vf(n),R.length&&Vx(e.h,R,i.startTime,i.endTime,h)):e.I.init(n,u,c)),!e.j.has(t)){P.u(9);break}return T(P,e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=P.h;case 9:if(n=fw(e,r,n,i,t),!i||!e.G||t==f.Ta){P.u(11);break}if(!s&&!u){P.u(11);break}if(N=i.startTime,e.W!="HLS"||e.m||t!=f.ea||!e.l.has(f.Ca)){P.u(13);break}return T(P,e.ka,14);case 14:L=P.h,.15<Math.abs(L)&&(N-=L);case 13:mt(e,t,function(){return lo(e,t)},null),mt(e,t,function(){return co(e,t,N)},null);case 11:return T(P,mt(e,t,function(){var b=n;e.M&&gc(e.M,b,h,r),e.l.get(t).appendBuffer(b)},i?i.O()[0]:null),15);case 15:K(P)}})}function sw(e,t){var n=uo(e,"video")||0;Kh(e.h,t,n)}function uw(e){e.h&&Kh(e.h,"",0)}d.remove=function(e,t,n,i){var r=this,o;return k(function(s){return s.g==1?(o=gt,e==o.Ca&&r.I&&r.I.remove(i),e==o.Ta?T(s,r.h.remove(t,n),0):n>t?T(s,mt(r,e,function(){return pa(r,e,t,n)},null),5):s.u(0)):r.m?T(s,mt(r,o.ea,function(){return pa(r,o.ea,t,n)},null),0):s.u(0)})};function sm(e,t){var n;return k(function(i){return i.g==1?(n=gt,t==n.Ta?e.h?T(i,e.h.remove(0,1/0),0):i.return():T(i,mt(e,t,function(){return pa(e,t,0,e.i.duration)},null),4)):e.m?T(i,mt(e,n.ea,function(){return pa(e,n.ea,0,e.i.duration)},null),0):i.u(0)})}d.flush=function(e){var t=this,n;return k(function(i){return i.g==1?(n=gt,e==n.Ta?i.return():T(i,mt(t,e,function(){t.g.currentTime-=.001,Fi(t,e)},null),2)):t.m?T(i,mt(t,n.ea,function(){var r=n.ea;t.g.currentTime-=.001,Fi(t,r)},null),0):i.u(0)})};function um(e,t,n,i,r,o,s,u,a){var l,c,f;return k(function(p){return p.g==1?(l=gt,t==l.Ta?(o||(e.h.s=n),Bx(e.h,i,r),p.return()):(c=[],T(p,hw(e,t,s,u,a),2))):(f=p.h,f||(c.push(mt(e,t,function(){return lo(e,t)},null)),e.m&&c.push(mt(e,l.ea,function(){return lo(e,l.ea)},null))),o||(c.push(mt(e,t,function(){return co(e,t,n)},null)),e.m&&c.push(mt(e,l.ea,function(){return co(e,l.ea,n)},null))),(i!=0||r!=1/0)&&(c.push(mt(e,t,function(){return am(e,t,i,r)},null)),e.m&&c.push(mt(e,l.ea,function(){return am(e,l.ea,i,r)},null))),c.length?T(p,Promise.all(c),0):p.u(0))})}function aw(e,t,n){var i,r;return k(function(o){return o.g==1?(i=gt,t==i.Ta||(t==i.Ca&&(e.Pa=new je),!e.G||(r=uo(e,t))&&.15>Math.abs(r-n))?o.return():(mt(e,t,function(){return lo(e,t)},null),e.m&&mt(e,i.ea,function(){return lo(e,i.ea)},null),T(o,mt(e,t,function(){return co(e,t,n)},null),2))):e.m?T(o,mt(e,i.ea,function(){return co(e,i.ea,n)},null),0):o.u(0)})}d.endOfStream=function(e){var t=this;return k(function(n){return T(n,Ts(t,function(){wr(t)||so(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},d.pb=function(e){var t=this;return k(function(n){return T(n,Ts(t,function(){if(t.A.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var i=g(t.l.keys()),r=i.next();!r.done;r=i.next()){r=r.value;var o={start:function(){},p:new je,uri:null};t.o.get(r).unshift(o)}t.i.duration=e,t.wa=e}),0)})},d.getDuration=function(){return this.i.duration};function lw(e,t,n){k(function(i){return e.H.g||e.g.error||e.L||e.F||wr(e)||so(e)?i.return():T(i,Ts(e,function(){wr(e)||so(e)||e.i.setLiveSeekableRange(t,n)}),0)})}function uf(e){k(function(t){return e.H.g||e.g.error||e.L||e.F||wr(e)||so(e)?t.return():T(t,Ts(e,function(){wr(e)||so(e)||e.i.clearLiveSeekableRange()}),0)})}function pa(e,t,n,i){i<=n?Fi(e,t):e.l.get(t).remove(n,i)}function lo(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,Fi(e,t)}function co(e,t,n){0>n&&(n+=.001),e.l.get(t).timestampOffset=n,Fi(e,t)}function am(e,t,n,i){var r=e.l.get(t);(r.appendWindowEnd!==i||r.appendWindowStart!==n)&&(r.appendWindowStart=0,r.appendWindowEnd=i,r.appendWindowStart=n),Fi(e,t)}function Fi(e,t){if(e.F||e.H.g){var n=e.o.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.o.set(t,[]))}else(n=e.o.get(t)[0])&&(n.p.resolve(),af(e,t))}function mt(e,t,n,i){return Ve(e.H),n={start:n,p:new je,uri:i},e.o.get(t).push(n),e.o.get(t).length==1&&lm(e,t),n.p}function Ts(e,t){var n,i,r,o,s,u,a,l,c,f,p,h,m;return k(function(y){switch(y.g){case 1:for(Ve(e.H),n=[],i=Array.from(e.l.keys()),r=g(i),o=r.next(),s={};!o.done;s={ready:void 0},o=r.next())u=o.value,s.ready=new je,a={start:function(v){return function(){return v.ready.resolve()}}(s),p:s.ready,uri:null},l=e.o.get(u),l.push(a),n.push(s.ready),l.length==1&&a.start();return ue(y,2),T(y,Promise.all(n),4);case 4:ce(y,3);break;case 2:throw c=ae(y),c;case 3:return ue(y,5,6),T(y,t(),6);case 6:for(on(y),f=g(i),p=f.next();!p.done;p=f.next())h=p.value,af(e,h);sn(y,0);break;case 5:throw m=ae(y),new M(2,3,3015,m,e.g.error||"No error in the media element",null)}})}function af(e,t){e.o.get(t).shift(),lm(e,t)}function lm(e,t){var n=e.o.get(t)[0];if(n)try{n.start()}catch(i){i.name=="QuotaExceededError"?n.p.reject(new M(2,3,3017,t)):om(e)?n.p.reject(new M(2,3,3015,i,e.g.error||"No error in the media element",n.uri)):n.p.reject(new M(2,3,3024,t)),af(e,t)}}function cw(e,t){e.ha=t,e.h&&(e.h.j=t)}function fw(e,t,n,i,r){if(ju(e.C.get(r))!="mp4")return n;var o=i===null,s=e.Oa.get(r),u=e.N.Ej(),a=!1;i&&i.Y&&(a=i.Y.encrypted),i=i?i.O()[0]:null;var l=ye();return e.A.correctEc3Enca&&o&&r==="audio"&&(n=HS(n)),e.A.insertFakeEncryptionInInit&&s&&l.fe(u,r)&&(o?n=GS(t,n,i):!a&&l.Bi(r)&&(n=KS(n))),o&&l.ee()&&(n=zS(n)),n}function dw(e,t,n,i){return mt(e,t,function(){if(t!==pe){if(e.C.get(t),br()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),i&&e.j.set(t,i);var r=n+e.A.addExtraFeaturesToSourceBuffer(n);e.l.get(t).changeType(r),e.C.set(t,n)}Fi(e,t)}},null)}function pw(e,t){var n,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D;return k(function(E){if(E.g==1){if(e.F||e.L)return E.return();for(n=gt,e.F=!0,e.m=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.Ya=!0),e.eb&&(e.g.autoplay=!1),ii(E,2),e.s.Ra(),o=g(e.j.values()),s=o.next();!s.done;s=o.next())u=s.value,u.destroy();for(a=g(e.l.values()),l=a.next();!l.done;l=a.next()){c=l.value;try{e.i.removeSourceBuffer(c)}catch{}}return e.j.clear(),e.l.clear(),f=e.i.duration,e.K=new je,e.i=of(e,e.K),T(E,e.K,4)}if(E.g!=2){for(!isNaN(f)&&f?e.i.duration=f:!isNaN(e.wa)&&e.wa&&(e.i.duration=e.wa),p=new je,h=e.i.sourceBuffers,m=t.size,y=0,v=function(){y++,y===m&&(p.resolve(),e.s.Ja(h,"addsourcebuffer",v))},e.s.D(h,"addsourcebuffer",v),x=g(t.keys()),S=x.next();!S.done;S=x.next())w=S.value,A=t.get(w),ca(e,w,A,A.codecs);return(D=t.get(n.ea))&&D.isAudioMuxedInVideo&&(e.m=!0),e.m&&!e.o.has(n.ea)&&e.o.set(n.ea,[]),e.g.currentTime=i,T(E,p,2)}return on(E),e.F=!1,Ve(e.H),e.s.Aa(e.g,"canplaythrough",function(){e.H.g||(e.g.autoplay=r,e.Ya&&(e.Ya=!1,e.g.play()))}),sn(E,0)})}function cm(e,t){return Ts(e,function(){return pw(e,t)})}function fm(e,t,n,i){var r=!1,o=Kt("audio",(i||"").split(",")),s=Kt("video",(i||"").split(",")),u=s;t=="audio"&&(u=o),u||(u=i),i=rt(n,u);var a=un(e.C.get(t)),l=e.A.forceTransmux;if(!Pt(i)||!e.G&&Ui.includes(i)?l=!0:l||n==a||(l=ye().Da()==="WEBKIT"&&Ui.includes(n)),l&&(e=Nu(n,u),n=Kr(e))){var c=n();o&&s&&(r=!0),i=c.convertCodecs(t,e)}return t=Ot(vn(i)),{ec:c,Xk:r,Jh:un(i),codec:t,mimeType:i}}function dm(e,t,n,i,r){if(t==pe)return{type:cf,nf:n,ec:null};var o=Ot(vn(e.C.get(t))),s=un(e.C.get(t)),u=fm(e,t,n,i),a=u.ec,l=u.Xk,c=u.Jh,f=u.codec;u=u.mimeType;var p=!0;return l&&e.C.has("audio")&&(n=fm(e,"audio",n,i),i=Ot(vn(e.C.get("audio"))),p=un(e.C.get("audio")),p=i==n.codec&&p==n.Jh,n.ec&&n.ec.destroy()),o===f&&s===c&&p?{type:cf,nf:u,ec:a}:(o=!0,(e.m&&!r.has("audio")||l&&a&&!e.j.has(t))&&(o=!1),o&&e.A.codecSwitchingStrategy==="smooth"&&br()?{type:pm,nf:u,ec:a}:(a&&a.destroy(),{type:ff,nf:u,ec:null}))}function hw(e,t,n,i,r){var o,s,u,a,l,c;return k(function(f){return f.g==1?(o=gt,s=dm(e,t,n,i,r),u=s.type,a=s.ec,l=s.nf,(c=r.get(o.ea))&&(e.m=c.isAudioMuxedInVideo),u==cf?(e.j.has(t)&&!a?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&a?e.j.set(t,a):a&&(e.j.has(t)&&e.j.get(t).transmux!==a.transmux?(e.j.get(t).destroy(),e.j.set(t,a)):a.destroy()),f.return(!1)):u==pm?T(f,dw(e,t,l,a),3):u!=ff?f.u(3):(a&&a.destroy(),T(f,cm(e,r),3))):f.return(!0)})}function gw(e,t,n,i,r){return e=dm(e,t,n,i,r),e.ec&&e.ec.destroy(),e.type==ff}var lf=F.URL.createObjectURL,mw="sequence",cf="none",ff="reset",pm="changeType";function re(e,t,n){this.i=e,this.C=t,this.s=this.l=1/0,this.h=1,this.g=this.j=null,this.A=0,this.B=!0,this.I=!1,this.H=0,this.F=n===void 0?!0:n,this.G=0,this.o=!1,this.m=e}d=re.prototype,d.getDuration=function(){return this.l},d.Hj=function(){return this.h},d.Li=function(e){this.i=e},d.pb=function(e){this.l=e},d.Nj=function(){return this.i},d.Ki=function(e){this.A=e},d.Zc=function(e){e&&!this.B&&(this.I=!0),this.B=e},d.Gf=function(e){this.s=e},d.We=function(){return this.s},d.lh=function(e){this.C=e},d.yj=function(){return this.C},d.si=function(e,t){if(e.length!=0){var n=(Date.now()+this.A)/1e3;if(e=e.filter(function(r){return r.start+t<n}),e.length!=0){var i=e[e.length-1].end+t;this.pf(e[0].start+t),this.h=e.reduce(function(r,o){return Math.max(r,o.end-o.start)},this.h),this.g=Math.max(this.g,i),this.i!=null&&this.F&&!this.o&&(this.i=n-this.g-this.h)}}},d.$d=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.A)/1e3;e=g(e);for(var r=e.next();!r.done;r=e.next())r=r.value,i<r.startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.h=Math.max(this.h,r.endTime-r.startTime));this.pf(t),this.g=Math.max(this.g,n),this.i!=null&&this.F&&!this.o&&(this.i=i-this.g-this.h)}},d.ri=function(e,t){this.pf(e),t==1/0||this.V()||(this.g=Math.max(this.g,t))},d.Ij=function(){return this.g},d.hf=function(){this.o=!0},d.ik=function(){return this.o},d.mh=function(e){this.m=e},d.Dj=function(){return this.m},d.pf=function(e){this.j==null?this.j=e:this.I||(this.j=Math.min(this.j,e))},d.Rg=function(e){this.h=Math.max(this.h,e)},d.offset=function(e){this.j!=null&&(this.j+=e),this.g!=null&&(this.g+=e)},d.V=function(){return this.l==1/0&&!this.B},d.Tc=function(){return this.l!=1/0&&!this.B},d.Gb=function(){return Math.max(this.H,this.Ac()-this.s)},d.Ni=function(e){this.H=e},d.Ac=function(){return this.V()||this.Tc()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l},d.Qd=function(e){var t=Math.max(this.j,this.H);return this.s==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Ac()-this.s+e,this.Fb()))},d.Xb=function(){return this.Qd(0)},d.Fb=function(){return Math.max(0,this.Ac()-(this.V()||this.Tc()?this.C:0))},d.Zi=function(){return!(this.i==null||this.g!=null&&this.F)},d.Ji=function(e){this.G=e},d.tj=function(){return this.G},W("shaka.media.PresentationTimeline",re),re.prototype.getAvailabilityTimeOffset=re.prototype.tj,re.prototype.setAvailabilityTimeOffset=re.prototype.Ji,re.prototype.usingPresentationStartTime=re.prototype.Zi,re.prototype.getSeekRangeEnd=re.prototype.Fb,re.prototype.getSeekRangeStart=re.prototype.Xb,re.prototype.getSafeSeekRangeStart=re.prototype.Qd,re.prototype.getSegmentAvailabilityEnd=re.prototype.Ac,re.prototype.setUserSeekStart=re.prototype.Ni,re.prototype.getSegmentAvailabilityStart=re.prototype.Gb,re.prototype.isInProgress=re.prototype.Tc,re.prototype.isLive=re.prototype.V,re.prototype.offset=re.prototype.offset,re.prototype.notifyMaxSegmentDuration=re.prototype.Rg,re.prototype.notifyMinSegmentStartTime=re.prototype.pf,re.prototype.getInitialProgramDateTime=re.prototype.Dj,re.prototype.setInitialProgramDateTime=re.prototype.mh,re.prototype.isStartTimeLocked=re.prototype.ik,re.prototype.lockStartTime=re.prototype.hf,re.prototype.getMaxSegmentEndTime=re.prototype.Ij,re.prototype.notifyPeriodDuration=re.prototype.ri,re.prototype.notifySegments=re.prototype.$d,re.prototype.notifyTimeRange=re.prototype.si,re.prototype.getDelay=re.prototype.yj,re.prototype.setDelay=re.prototype.lh,re.prototype.getSegmentAvailabilityDuration=re.prototype.We,re.prototype.setSegmentAvailabilityDuration=re.prototype.Gf,re.prototype.setStatic=re.prototype.Zc,re.prototype.setClockOffset=re.prototype.Ki,re.prototype.getPresentationStartTime=re.prototype.Nj,re.prototype.setDuration=re.prototype.pb,re.prototype.setPresentationStartTime=re.prototype.Li,re.prototype.getMaxSegmentDuration=re.prototype.Hj,re.prototype.getDuration=re.prototype.getDuration;function df(e,t,n,i){var r=this;this.s=i,this.g=e,this.B=t,this.h=n,this.o=new Me,this.l=!1,this.F=e.readyState,this.G=this.C=this.j=0,this.m=vw(this),this.A=!1,this.o.D(e,"waiting",function(){return xs(r)}),this.i=new Te(function(){xs(r)}).Fa(this.h.gapJumpTimerTime)}df.prototype.release=function(){this.o&&(this.o.release(),this.o=null),this.i!=null&&(this.i.stop(),this.i=null),this.m&&(this.m.release(),this.m=null),this.g=this.B=this.s=null},df.prototype.tf=function(){this.A=!0,this.i&&this.i.Fa(this.h.gapJumpTimerTime),xs(this)};function xs(e){if(e.g.readyState!=0){if(e.g.seeking){if(!e.l)return}else e.l=!1;if(!e.g.paused||e.g.currentTime==e.j&&(e.g.autoplay||e.g.currentTime!=e.j)){e.g.readyState!=e.F&&(e.F=e.g.readyState);var t;if(!(t=!e.m)){t=e.m;var n=t.h,i=mm(n),r=n.g.currentTime,o=Date.now()/1e3;(t.g!=r||t.m!=i)&&(t.l=o,t.g=r,t.m=i,t.i=!1),r=o-t.l,(i=r>=t.o&&i&&!t.i)&&(t.j&&t.j(t.g,r),t.i=!0,t.g=n.g.currentTime),t=!i}t&&(t=e.g.currentTime,n=e.g.buffered,i=YS(n,t,e.h.gapDetectionThreshold),i==null||i==0&&!e.A||(r=n.start(i),(o=e.h.gapPadding)&&(r=Math.ceil(100*(r+o))/100),r>=e.B.Fb()||.001>r-t||(i!=0&&n.end(i-1),e.g.currentTime=r,t==e.j&&(e.j=r),e.C++,e.s(new G("gapjumped")))))}}}function vw(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new hm(new gm(e.g),t,function(){var i;return k(function(r){if(r.g==1)return i=yi(e.g.buffered),i.length?n?(e.g.currentTime+=n,r.u(2)):T(r,e.g.play(),3):r.return();if(r.g!=2){if(!e.g)return r.return();e.g.pause(),e.g.play()}e.G++,e.s(new G("stalldetected")),K(r)})})}function hm(e,t,n){this.h=e,this.m=mm(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.i=!1,this.o=t,this.j=n}hm.prototype.release=function(){this.h&&this.h.release(),this.j=this.h=null};function gm(e){var t=this;this.g=e,this.h=new Me,this.i=!1,this.h.D(this.g,"audiofocuspaused",function(){t.i=!0}),this.h.D(this.g,"audiofocusgranted",function(){t.i=!1}),this.h.D(this.g,"audiofocuslost",function(){t.i=!0})}function mm(e){if(e.g.paused||e.g.playbackRate==0||e.i||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=g(yi(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(n=n.value,!(t<n.start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}gm.prototype.release=function(){this.h&&this.h.release(),this.h=null};function fo(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=yw.value().get(t),n.Aa(e,t,i))}var yw=new St(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function vm(e,t,n,i){var r=this;this.g=e,this.m=t,this.s=n,this.l=null,this.j=function(){return r.l==null&&(r.l=i()),r.l},this.o=!1,this.h=new Me,this.i=new Sm(e),fo(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Tm(r,r.j())})}vm.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i!=null&&(this.i.release(),this.i=null),this.m=function(){},this.g=null};function pf(e){return e.o?e.g.currentTime:e.j()}function ym(e,t){0<e.g.readyState?wm(e.i,t):fo(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){Tm(e,e.j())})}function Tm(e,t){.001>Math.abs(e.g.currentTime-t)?xm(e):(e.h.Aa(e.g,"seeking",function(){xm(e)}),wm(e.i,e.g.currentTime&&e.g.currentTime!=0?e.g.currentTime:t))}function xm(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.s(e.g.currentTime)}function Sm(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new Te(function(){0>=t.i||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}Sm.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null};function wm(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Fa(.1)}function Am(e){this.g=e,this.i=!1,this.h=null,this.j=new Me}d=Am.prototype,d.ready=function(){function e(){if(t.h==null||t.h==0&&t.g.duration!=1/0)t.i=!0;else{var n=t.g.currentTime,i=null;if(typeof t.h=="number")i=t.h;else if(t.h instanceof Date){var r=Em(t);r!==null&&(i=t.h.getTime()/1e3-r,i=Im(t,i))}i==null?t.i=!0:(0>i&&(i=Math.max(0,n+i)),n!=i?(t.j.Aa(t.g,"seeking",function(){t.i=!0}),t.g.currentTime=i):t.i=!0)}}var t=this;fo(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){e()})},d.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},d.Vf=function(e){this.h=this.i?this.h:e},d.De=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=e.getTime()/1e3-(Em(this)||0),e=Im(this,e)),e||0},d.Eh=function(){return 0},d.Dh=function(){return 0},d.pi=function(){},d.ci=function(){var e=Yc(this.g.buffered);return e!=null&&e>=this.g.duration-1};function Em(e){return e.g.getStartDate&&(e=e.g.getStartDate().getTime(),!isNaN(e))?e/1e3:null}function Im(e,t){return e=e.g.seekable,0<e.length&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function Cm(e,t,n,i,r,o){var s=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.s=r,this.o=null,this.j=new df(e,t.presentationTimeline,n,o),this.i=new vm(e,function(){e:{var u=s.j;u.l=!0,u.A=!1,u.i&&u.i.Fa(u.h.gapJumpTimerTime),xs(u);var a=pf(s.i);if(u=Dm(s,a),!Ah()&&.001<Math.abs(u-a)){a=!1;var l=ye().Gi();if(l){var c=Date.now()/1e3;(!s.o||s.o<c-l)&&(s.o=c,a=!0)}else a=!0;if(a){ym(s.i,u),u=void 0;break e}}s.s(),u=void 0}return u},function(u){var a=s.j;a.g.seeking&&!a.l&&(a.l=!0,a.j=u),a.i&&a.i.Fa(a.h.gapJumpTimerTime),xs(a)},function(){return Mm(s,i)}),this.m=new Te(function(){if(s.h.readyState!=0&&!s.h.paused){var u=pf(s.i),a=s.g.Xb(),l=s.g.Fb();3>l-a&&(a=l-3),u<a&&(u=Dm(s,u),s.h.currentTime=u)}})}d=Cm.prototype,d.ready=function(){this.m.Fa(.25)},d.release=function(){this.i&&(this.i.release(),this.i=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.h=this.i=this.g=this.l=null,this.s=function(){}},d.Vf=function(e){ym(this.i,Mm(this,e))},d.De=function(){var e=pf(this.i);return 0<this.h.readyState&&!this.h.paused?Rm(this,e):e},d.Eh=function(){return this.j.G},d.Dh=function(){return this.j.C};function Mm(e,t){return t==null?t=1/0>e.g.getDuration()?e.g.Xb():e.g.Fb():t instanceof Date?t=t.getTime()/1e3-(e.g.m||e.g.i):0>t&&(t=e.g.Fb()+t),km(e,Rm(e,t))}d.pi=function(){this.j.tf()},d.ci=function(){if(this.g.V()){var e=this.g.Ac(),t=Yc(this.h.buffered);if(t!=null&&t>=e)return!0}return!1};function km(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function Dm(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Xb(),o=e.g.Fb(),s=e.g.getDuration();3>o-r&&(r=o-3);var u=e.g.Qd(n),a=e.g.Qd(i);return n=e.g.Qd(n+i),t>=s?km(e,t):t>o?o-e.l.safeSeekEndOffset:t<r?e.g.V()&&e.l.returnToEndOfLiveWindowWhenOutside?o-e.l.safeSeekEndOffset:qc(e.h.buffered,a)?a:n:t>=u||qc(e.h.buffered,t)?t:n}function Rm(e,t){var n=e.g.Xb();return t<n?n:(e=e.g.Fb(),t>e?e:t)}function Ie(e){this.g=e,this.m=null,this.i=0,this.o=!1}d=Ie.prototype,d.getNumReferences=function(){return this.g.length},d.getNumEvicted=function(){return this.i},d.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},d.rk=function(){this.o=!0},d.Eb=function(e){for(var t=g(this.g),n=t.next();!n.done;n=t.next())e(n.value)};function Gn(e){return e.g[0]||null}d.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var i=this.g[n],r=n<t?this.g[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},d.get=function(e){return this.g.length==0?null:(e-=this.i,0>e||e>=this.g.length?null:this.g[e])},d.offset=function(e){if(!this.o)for(var t=g(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},d.kf=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(n){return Math.round(1e3*n.startTime)/1e3<t}),this.g.push.apply(this.g,H(e))}},d.Yd=function(e,t){var n=this;e=e.filter(function(i){return i.endTime>t&&(n.g.length==0||i.endTime>n.g[0].startTime)}),this.kf(e),this.$a(t)},d.$a=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(n){return n.endTime>e}),this.i+=t-this.g.length}},d.ld=function(e,t,n){if(n=n===void 0?!1:n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;this.g.length!=0&&(e=this.g[this.g.length-1],t=new Z(e.startTime,t,e.C,e.startByte,e.endByte,e.Y,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.B,e.h,e.status,e.aesKey),t.mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},d.Lf=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new Te(function(){var i=t();i?n.g.push.apply(n.g,H(i)):(n.m.stop(),n.m=null)}),this.m.Fa(e))},Ie.prototype[Symbol.iterator]=function(){return this.Wb(0)},Ie.prototype.Wb=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?!1:n;var i=this.find(e);if(i==null)return null;var r=this.get(i);n?i++:i--;var o=-1;if(r&&0<r.g.length)for(var s=r.g.length-1;0<=s;--s){var u=r.g[s];if(e>=u.startTime&&e<u.endTime){if(!t){for(;s&&!u.l;)s--,u=r.g[s];if(!u.l)return zn("No independent partial segment found!"),null}n?i--:i++,o=s-1;break}}return new yn(this,i,o,n)},Ie.prototype.Pe=function(){return-1};function ha(e,t,n){return e=new Z(e,e+t,function(){return n},0,null,null,e,e,e+t),new Ie([e])}W("shaka.media.SegmentIndex",Ie),Ie.forSingleSegment=ha,Ie.prototype.getIteratorForTime=Ie.prototype.Wb,Ie.prototype.updateEvery=Ie.prototype.Lf,Ie.prototype.fit=Ie.prototype.ld,Ie.prototype.evict=Ie.prototype.$a,Ie.prototype.mergeAndEvict=Ie.prototype.Yd,Ie.prototype.offset=Ie.prototype.offset,Ie.prototype.get=Ie.prototype.get,Ie.prototype.find=Ie.prototype.find,Ie.prototype.markImmutable=Ie.prototype.rk,Ie.prototype.release=Ie.prototype.release,Ie.prototype.getNumEvicted=Ie.prototype.getNumEvicted,Ie.prototype.getNumReferences=Ie.prototype.getNumReferences;function yn(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}d=yn.prototype,d.Dd=function(e){this.reverse=e},d.oj=function(){return this.h},d.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.A&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e},d.next=function(){var e=this.i.get(this.h);return this.reverse?e&&0<e.g.length?(this.g--,0>this.g&&(this.h--,this.g=(e=this.i.get(this.h))&&0<e.g.length?e.g.length-1:0)):(this.h--,this.g=0):e&&0<e.g.length?(this.g++,e.A&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),e=this.current(),{value:e,done:!e}},d.dh=function(){var e=this.current();if(e.o&&!e.l&&(e=this.i.get(this.h))&&0<e.g.length)for(var t=e.g[this.g];t.l&&!(0>=this.g);)this.g--,t=e.g[this.g]},W("shaka.media.SegmentIterator",yn),yn.prototype.resetToLastIndependent=yn.prototype.dh,yn.prototype.next=yn.prototype.next,yn.prototype.current=yn.prototype.current,yn.prototype.currentPosition=yn.prototype.oj,yn.prototype.setReverse=yn.prototype.Dd;function Je(){Ie.call(this,[]),this.h=[]}et(Je,Ie),d=Je.prototype,d.clone=function(){var e=new Je;return e.h=this.h.slice(),e.i=this.i,e},d.release=function(){for(var e=g(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},d.Eb=function(e){for(var t=g(this.h),n=t.next();!n.done;n=t.next())n.value.Eb(e)};function Tw(e,t){e=g(e.h);for(var n=e.next();!n.done;n=e.next())t(n.value)}d.find=function(e){for(var t=this.i,n=g(this.h),i=n.next();!i.done;i=n.next()){i=i.value;var r=i.find(e);if(r!=null)return r+t;t+=i.getNumEvicted()+i.getNumReferences()}return null};function xw(e,t){e=g(e.h);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.find(t)!=null)return n.Pe();return-1}d.get=function(e){for(var t=this.i,n=g(this.h),i=n.next();!i.done;i=n.next()){i=i.value;var r=i.get(e-t);if(r)return r;r=i.getNumReferences(),t+=i.getNumEvicted()+r}return null},d.offset=function(){},d.kf=function(){},d.$a=function(e){for(var t=g(this.h),n=t.next();!n.done;n=t.next())n.value.$a(e);for(;1<this.h.length&&this.h[0].getNumReferences()==0;)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},d.Yd=function(){},d.ld=function(){},d.Lf=function(){},W("shaka.media.MetaSegmentIndex",Je),Je.prototype.updateEvery=Je.prototype.Lf,Je.prototype.fit=Je.prototype.ld,Je.prototype.mergeAndEvict=Je.prototype.Yd,Je.prototype.evict=Je.prototype.$a,Je.prototype.merge=Je.prototype.kf,Je.prototype.offset=Je.prototype.offset,Je.prototype.get=Je.prototype.get,Je.prototype.find=Je.prototype.find,Je.prototype.forEachTopLevelReference=Je.prototype.Eb,Je.prototype.release=Je.prototype.release;function Ss(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Ve(),this.h=new Te(function(){t.g.ni(.25*t.i)})}Ss.prototype.release=function(){this.set(this.Pc()),this.h&&(this.h.stop(),this.h=null),this.g=null},Ss.prototype.set=function(e){this.i=e,hf(this)},Ss.prototype.Pc=function(){return this.g.Pc()};function hf(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.Ve()!=t&&e.g.nh(t);return}catch{}e.h.Fa(.25),e.g.Ve()!=0&&e.g.nh(0)}function gf(e){var t=this;this.j=e,this.h=new Me,this.g=new Set,this.i=new Te(function(){Pm(t,!1)}).Jb(),e.paused||this.i.Fa(.25),this.h.D(e,"playing",function(){t.i.Jb().Fa(.25)}),this.h.D(e,"pause",function(){t.i.stop()})}gf.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=g(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function Pm(e,t){var n=e.j.currentTime;e=g(e.g);for(var i=e.next();!i.done;i=e.next())i.value.j(n,t)}function ga(e){De.call(this),this.g=new Map,this.h=e}et(ga,De),ga.prototype.release=function(){this.g.clear(),De.prototype.release.call(this)};function Sw(e,t){var n=e.g.get(t);return n||(n={ce:[],lg:null,contentType:t},e.g.set(t,n)),n}function ww(e,t,n){var i=Sw(e,t.contentType);Aw(e,i),e={rd:t,position:n},i=i.ce,t=i.findIndex(function(r){return r.position>=n}),0<=t?i.splice(t,i[t].position==n?1:0,e):i.push(e)}ga.prototype.j=function(e){for(var t=g(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var i=n.lg;e:{for(var r=n.ce,o=r.length-1;0<=o;o--){var s=r[o];if(s.position<=e){r=s.rd;break e}}r=null}o=r&&!(i===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width),s=r&&i&&r.label&&i.label&&i.label!==r.label;var u=r&&i&&r.language&&i.language&&i.language!==r.language;i=r&&i&&r.roles&&i.roles&&!zo(i.roles,r.roles),(s||u||i)&&Lm(this,e,r.contentType)&&(n.lg=r,i=new G("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),o&&Lm(this,e,r.contentType)&&(n.lg=r,JSON.stringify(r),n=new G("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}};function Lm(e,t,n){return!!((e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function Aw(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,i=e[e.length-1].end,r=t.ce;t.ce=r.filter(function(o,s){return!(o.position<=n&&s+1<r.length&&r[s+1].position<=n||o.position>=i)})}else t.ce=[]}function ma(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return e.type=="video"&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),e.type=="audio"&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function ws(e){De.call(this),this.h=new Map,this.i=e,this.g=null}et(ws,De),ws.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),De.prototype.release.call(this)};function mf(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+(t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1));e.h.has(n)||(e.h.set(n,t),t=new G("regionadd",new Map([["region",t]])),e.dispatchEvent(t),Ew(e))}function Ew(e){e.g||(e.g=new Te(function(){for(var t=e.i(),n=g(e.h),i=n.next();!i.done;i=n.next()){var r=g(i.value);i=r.next().value,r=r.next().value,r.endTime<t.start&&(e.h.delete(i),i=new G("regionremove",new Map([["region",r]])),e.dispatchEvent(i))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).Fa(2))}function va(e,t,n,i){this.m=e,this.i=t,this.l=n,this.h=new Map,this.j=new Map,this.g=null,this.o=i}function Iw(e,t){e.l=t,e=g(e.h.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function As(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Wb(t,!0,e.o)),!e.g))return Promise.resolve();for(n&&e.g.next(),t=[];e.h.size<e.m&&(n=e.g.next().value,!!n);){var i=!0;n.isPreload()&&n.endByte!=null&&(i=!1),n.Cc()==2&&(i=!1),n.Yb(!1)&&(i=!1),i&&n.Y&&t.push(Nm(e,n.Y)),i&&!e.h.has(n)&&(i=new yf(e.l),t.push(Om(i,n,e.i)),e.h.set(n,i))}return vf(e),Promise.all(t)}function Nm(e,t){if(!e.i.segmentIndex||t.Yb()||Array.from(e.j.keys()).some(function(r){return ms(r,t)}))return Promise.resolve();var n=new yf(e.l),i=Om(n,t,e.i);return e.j.set(t,n),i}function jm(e,t){t=g(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&Es(e,n)}function Kn(e){jm(e,e.h),jm(e,e.j),e.g=null}va.prototype.$a=function(e,t){t=t===void 0?!1:t;for(var n=g(this.h.keys()),i=n.next();!i.done;i=n.next())i=i.value,e>i.endTime&&Es(this,i);t&&vf(this)},va.prototype.Dd=function(e){this.o=e,this.g&&this.g.Dd(e)};function vf(e){for(var t=Array.from(e.h.keys()),n=g(e.j.keys()),i=n.next(),r={};!i.done;r={Lg:void 0},i=n.next())r.Lg=i.value,t.some(function(o){return function(s){return ms(s.Y,o.Lg)}}(r))||Es(e,r.Lg)}function Um(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&Es(e,i)}vf(e)}function Cw(e,t){t&&t!==e.i&&(Kn(e),e.i=t)}function Es(e,t){var n=e.h;t instanceof Xt&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function yf(e){this.g=e,this.ae=this.sh=null}function Om(e,t,n){var i=new Uint8Array(0);return e.ae=e.g(t,n,function(r){return k(function(o){if(o.g==1)return 0<i.byteLength?i=tt(i,r):i=r,e.sh?T(o,e.sh(i),3):o.u(0);i=new Uint8Array(0),K(o)})}),e.ae.promise.catch(function(r){return r instanceof M&&r.code==7001?Promise.resolve():Promise.reject(r)})}yf.prototype.abort=function(){this.ae&&this.ae.abort()};function Tf(e){var t=un(e),n=t.split("/")[0];return e=vn(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,oe:null,colorGamut:null,frameRate:null}}function Mw(e,t,n){function i(I){x=I.name;var C=I.reader;C.skip(24);var R=C.Ba(),N=C.Ba();C.skip(50),p=String(R),f=String(N),I.reader.Ga()&&le(I)}function r(I){var C=Hg(I.reader);h=C.channelCount,m=C.sampleRate,o(I.name)}function o(I){switch(I=I.toLowerCase(),I){case"avc1":case"avc3":u.push(I+".42E01E"),l=!0;break;case"hev1":case"hvc1":u.push(I+".1.6.L93.90"),l=!0;break;case"dvh1":case"dvhe":u.push(I+".05.04"),l=!0;break;case"vp09":u.push(I+".00.10.08"),l=!0;break;case"av01":u.push(I+".0.01M.08"),l=!0;break;case"mp4a":s.push("mp4a.40.2"),a=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(I),a=!0;break;case"apac":s.push("apac.31.00"),a=!0}}var s=[],u=[],a=!1,l=!1,c=null,f=null,p=null,h=null,m=null,y=null,v=null,x;if(new Ue().box("moov",le).box("trak",le).box("mdia",le).R("mdhd",function(I){c=ra(I.reader,I.version).language}).box("minf",le).box("stbl",le).R("stsd",mi).box("mp4a",function(I){var C=Hg(I.reader);h=C.channelCount,m=C.sampleRate,I.reader.Ga()?le(I):o(I.name)}).box("esds",function(I){I=I.reader;for(var C="mp4a",R,N;I.Ga();){R=I.X();for(var L=I.X();L&128;)L=I.X();if(R==3)I.Ba(),L=I.X(),L&128&&I.Ba(),L&64&&I.skip(I.X()),L&32&&I.Ba();else if(R==4)N=I.X(),I.skip(12);else if(R==5)break}N&&(C+="."+ps(N),R==5&&I.Ga()&&(R=I.X(),N=(R&248)>>3,N===31&&I.Ga()&&(N=32+((R&7)<<3)+((I.X()&224)>>5)),C+="."+N)),s.push(C),a=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("apac",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(I){var C=x||"";switch(x){case"dvav":C="avc3";break;case"dva1":C="avc1"}I=I.reader,I.skip(1),I=C+"."+ps(I.X())+ps(I.X())+ps(I.X()),u.push(I),l=!0}).box("hvcC",function(I){var C=x||"";switch(x){case"dvh1":C="hvc1";break;case"dvhe":C="hev1"}var R=I.reader;R.skip(1),I=R.X();var N=["","A","B","C"][I>>6],L=I&31,P=R.T(),b=(I&32)>>5?"H":"L";I=[R.X(),R.X(),R.X(),R.X(),R.X(),R.X()],R=R.X();for(var U=0,j=0;32>j&&(U|=P&1,j!=31);j++)U<<=1,P>>=1;for(C=C+("."+N+L)+("."+ps(U,!0)),C+="."+b+R,N="",L=I.length;L--;)((b=I[L])||N)&&(N="."+b.toString(16).toUpperCase()+N);C+=N,u.push(C),l=!0}).box("dvcC",function(I){var C=x||"";switch(x){case"hvc1":C="dvh1";break;case"hev1":C="dvhe";break;case"avc1":C="dva1";break;case"avc3":C="dvav";break;case"av01":C="dav1"}var R=I.reader;R.skip(2),I=R.X(),R=R.X(),u.push(C+"."+Jt(I>>1&127)+"."+Jt(I<<5&32|R>>3&31)),l=!0}).box("dvvC",function(I){var C=x||"";switch(x){case"hvc1":C="dvh1";break;case"hev1":C="dvhe";break;case"avc1":C="dva1";break;case"avc3":C="dvav";break;case"av01":C="dav1"}var R=I.reader;R.skip(2),I=R.X(),R=R.X(),u.push(C+"."+Jt(I>>1&127)+"."+Jt(I<<5&32|R>>3&31)),l=!0}).R("vpcC",function(I){var C=x||"",R=I.reader;I=R.X();var N=R.X();R=R.X()>>4&15,u.push(C+"."+Jt(I)+"."+Jt(N)+"."+Jt(R)),l=!0}).box("av1C",function(I){var C=x||"";switch(x){case"dav1":C="av01"}var R=I.reader;R.skip(1),I=R.X(),R=R.X();var N=I>>>5,L=(R&64)>>6;u.push(C+"."+N+"."+Jt(I&31)+(R>>>7?"H":"M")+"."+Jt(N===2&&L?(R&32)>>5?12:10:L?10:8)+"."+((R&16)>>4)+"."+((R&8)>>3)+((R&4)>>2)+(R&3)+"."+Jt(1)+"."+Jt(1)+"."+Jt(1)+".0"),l=!0}).box("enca",$u).box("encv",Qt).box("sinf",le).box("frma",function(I){I=Wc(I.reader).codec,o(I)}).box("colr",function(I){u=u.map(function(N){if(N.startsWith("av01.")){var L=I.reader,P=L.Ma(),b=L.Ub(4),U=String.fromCharCode(b[0]);if(U+=String.fromCharCode(b[1]),U+=String.fromCharCode(b[2]),U+=String.fromCharCode(b[3]),U==="nclx"){b=L.Ba(),U=L.Ba();var j=L.Ba(),O=L.X()>>7,B=N.split(".");B.length==10&&(B[6]=Jt(b),B[7]=Jt(U),B[8]=Jt(j),B[9]=String(O),N=B.join("."))}L.seek(P)}return N});var C=RS(I.reader),R=C.colorGamut;y=C.oe,v=R}).parse(e||t,!0,!0),!s.length&&!u.length)return null;var S=a&&!l,w=new Map;if(l&&!n){n=new Bn("video/mp4"),e&&n.init(e);try{n.vf(t);for(var A=g(n.Uf()),D=A.next();!D.done;D=A.next()){var E=D.value;w.set(E,E)}}catch{}n.Fd()}return{type:S?"audio":"video",mimeType:S?"audio/mp4":"video/mp4",codecs:xf(s.concat(u)).join(", "),language:c,height:f,width:p,channelCount:h,sampleRate:m,closedCaptions:w,oe:y,colorGamut:v,frameRate:null}}function xf(e){var t=new Set,n=[];e=g(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r=ji(i);t.has(r)||(n.push(i),t.add(r))}return t=hc("audio",n),i=hc("video",n),e=hc(pe,n),i=kw(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function kw(e){if(1>=e.length)return e;var t=e.find(function(n){return n.startsWith("dvav.")||n.startsWith("dva1.")||n.startsWith("dvh1.")||n.startsWith("dvhe.")||n.startsWith("dav1.")||n.startsWith("dvc1.")||n.startsWith("dvi1.")});return t?Pt('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function Dw(e){var t=null;return new Ue().box("moov",le).box("trak",le).box("mdia",le).box("minf",le).box("stbl",le).R("stsd",mi).box("encv",Qt).box("enca",$u).box("sinf",le).box("schi",le).R("tenc",function(n){n=n.reader,n.X(),n.X(),n.X(),n.X(),t=si(n.Ub(16))}).parse(e,!0),t}function Sf(e,t,n){var i,r,o,s,u;return k(function(a){if(a.g==1)return i=t,i.cryptoKey?a.u(2):T(a,i.fetchKey(),3);if(r=i.iv,!r)for(r=se(new ArrayBuffer(16)),o=i.firstMediaSequenceNumber+n,s=r.byteLength-1;0<=s;s--)r[s]=o&255,o>>=8;return t.blockCipherMode=="CBC"?u={name:"AES-CBC",iv:r}:u={name:"AES-CTR",counter:r,length:64},a.return(F.crypto.subtle.decrypt(u,i.cryptoKey,e))})}function Is(e,t,n,i,r){return e=lt(e,i,r),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function _m(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.K=new Map,this.C=1,this.A=this.o=null,this.P=0,this.h=new Map,this.I=!1,this.S=null,this.B=!1,this.l=new $r(function(){return Rw(n)}),this.M=Date.now()/1e3,this.m=new Map,this.N={projection:null,hfov:null},this.W=0,this.U=1/0,this.F=null,this.L=[],this.s=new Te(function(){if(n.j&&n.g)if(n.j.presentationTimeline.V()){var i=n.j.presentationTimeline.Xb(),r=n.j.presentationTimeline.Fb();1<r-i?lw(n.g.Z,i,r):uf(n.g.Z)}else uf(n.g.Z),n.s&&n.s.stop();else n.s&&n.s.stop()}),this.G=null,this.H=new Te(function(){var i=n.g.video;!i.ended&&n.G&&(i.currentTime=n.G,n.G=null)})}d=_m.prototype,d.destroy=function(){return this.l.destroy()};function Rw(e){var t,n,i,r,o,s,u;return k(function(a){if(a.g==1){for(e.s&&e.s.stop(),e.s=null,e.H&&e.H.stop(),e.H=null,t=[],n=g(e.h.values()),i=n.next();!i.done;i=n.next())r=i.value,Bi(r),t.push(ho(r)),r.$&&(Kn(r.$),r.$=null);for(o=g(e.m.values()),s=o.next();!s.done;s=o.next())u=s.value,Kn(u);return T(a,Promise.all(t),2)}e.h.clear(),e.m.clear(),e.g=null,e.j=null,e.i=null,e.G=null,K(a)})}d.configure=function(e){if(this.i=e,this.S=new lg({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor},!0),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.$&&(Kn(t.$),t.$=null),t=g(this.m.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,Kn(this.m.get(n)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(pe))&&t.$&&(Kn(t.$),t.$=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.$&&(Kn(t.$),t.$=null),t=g(this.h.keys()),n=t.next();!n.done;n=t.next())n=this.h.get(n.value),n.$?(Um(n.$,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(Kn(n.$),n.$=null)):0<e.segmentPrefetchLimit&&(n.$=wf(this,n.stream));e.disableAudioPrefetch||_w(this)};function Pw(e,t,n){e.j.presentationTimeline.V()||(e.W=t,e.U=n)}d.start=function(e){var t=this;return k(function(n){if(n.g==1)return T(n,Ow(t,e||new Map),2);Ve(t.l),t.I=!0,K(n)})};function Lw(e,t){var n,i,r,o,s,u;k(function(a){switch(a.g){case 1:return n=gt,e.P++,i=e.P,ue(a,2),T(a,sm(e.g.Z,n.Ta),4);case 4:ce(a,3);break;case 2:r=ae(a),e.g&&e.g.onError(r);case 3:o=rt(t.mimeType,t.codecs),fa(e.g.Z,o,e.j.sequenceMode,t.external),s=e.g.Z.ha,(s.isTextVisible()||e.i.alwaysStreamText)&&e.P==i&&(u=Ta(e,t),e.h.set(n.Ta,u),_t(e,u,0)),K(a)}})}function Nw(e){var t=e.h.get(pe);t&&(Bi(t),ho(t).catch(function(){}),e.F=e.h.get(pe),e.h.delete(pe),t.stream&&t.stream.closeSegmentIndex&&t.stream.closeSegmentIndex()),e.A=null}function bm(e,t){for(var n=0>e.g.ub(),i=g(e.h.values()),r=i.next();!r.done;r=i.next())r=r.value,r.sa&&r.sa.Dd(n),r.$&&r.$.Dd(n);for(i=g(e.m.values()),r=i.next();!r.done;r=i.next())r.value.Dd(n);(n=e.h.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.Fc&&(po(e,t,!1,0,!1),n.Fc=i):(t=n.Fc)&&(n.Fc=null,po(e,t,!0,0,!1)))}function Fm(e,t,n,i,r,o){n=n===void 0?!1:n,i=i===void 0?0:i,r=r===void 0?!1:r,o=o===void 0?!1:o,e.o=t,e.I&&(t.video&&po(e,t.video,n,i,r,o),t.audio&&po(e,t.audio,n,i,r,o))}function ya(e,t){k(function(n){if(n.g==1)return e.F=null,e.A=t,e.I?t.segmentIndex?n.u(2):T(n,t.createSegmentIndex(),2):n.return();po(e,t,!0,0,!1),K(n)})}function jw(e){var t=e.h.get(pe);t&&po(e,t.stream,!0,0,!0)}function Uw(e,t){for(var n=g(e.K.entries()),i=n.next();!i.done;i=n.next()){var r=g(i.value);i=r.next().value,r=r.next().value,i.includes(t.type)&&(r(),e.K.delete(i))}}function po(e,t,n,i,r,o){var s=e.h.get(t.type);s||t.type!=pe?s&&(s.Fc&&(t.trickModeVideo?(s.Fc=t,t=t.trickModeVideo):s.Fc=null),s.stream!=t||r)&&(e.m.has(t)?s.$=e.m.get(t):s.$&&Cw(s.$,t),t.type==pe&&s.stream!=t&&(r=rt(t.mimeType,t.codecs),fa(e.g.Z,r,e.j.sequenceMode,t.external)),!e.m.has(s.stream)&&s.stream.closeSegmentIndex&&(s.Qa?(r="("+s.type+":"+s.stream.id+")",e.K.has(r)||e.K.set(r,s.stream.closeSegmentIndex)):s.stream.closeSegmentIndex()),r=s.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,s.stream=t,s.sa=null,s.ag=!!o,t.dependencyStream?s.yc=Ta(e,t.dependencyStream):s.yc=null,r&&(s.mb=null,s.lc=null,s.kc=null,t.isAudioMuxedInVideo&&(t=null,s.type==="video"?t=e.h.get("audio"):s.type==="audio"&&(t=e.h.get("video")),t&&(ho(t).catch(function(){}),t.mb=null,t.lc=null,t.kc=null,Cs(e,t),Bm(e,t).catch(function(u){e.g&&e.g.onError(u)})))),n?s.Kc?s.Sf=!0:s.Qa?(s.Ic=!0,s.Oe=i,s.Sf=!0):(Bi(s),Cf(e,s,!0,i).catch(function(u){e.g&&e.g.onError(u)})):s.Qa||s.zb||_t(e,s,0),Bm(e,s).catch(function(u){e.g&&e.g.onError(u)})):Lw(e,t)}function Bm(e,t){var n,i,r;return k(function(o){if(o.g==1)return t.Hb?(n=t.stream,i=t.Hb,n.segmentIndex?o.u(2):T(o,n.createSegmentIndex(),2)):o.return();if(o.g!=4)return r=n.dependencyStream,!r||r.segmentIndex?o.u(4):T(o,r.createSegmentIndex(),4);if(t.Hb!=i||t.stream!=n)return o.return();var s=e.g.Qc(),u=uo(e.g.Z,t.type),a=t.stream.segmentIndex.find(t.Ia?t.Ia.endTime:s),l=a==null?null:t.stream.segmentIndex.get(a);a=l&&l.endByte?l.endByte-l.startByte:null,l&&!a&&(a=(l.endTime-l.getStartTime())*(t.stream.bandwidth||0)/8),a?((l=l.Y)&&(a+=(l.endByte?l.endByte-l.startByte:null)||0),l=e.g.getBandwidthEstimate(),s=8*a/l<(u||0)-s-e.i.rebufferingGoal||t.Hb.h.g>a):s=!1,s&&t.Hb.abort(),K(o)})}d.Yc=function(){if(this.g){for(var e=this.g.Qc(),t=g(this.h.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.h.get(i);var r=this.g.Z;if(i==pe?(r=r.h,r=r.g==null||r.h==null?!1:e>=r.g&&e<r.h):(r=ao(r,i),r=qc(r,e)),!r){if(this.M=0,n.$&&(n.$.g=null),n.type==="audio"){r=g(this.m.values());for(var o=r.next();!o.done;o=r.next())o.value.g=null}n.sa=null,(uo(this.g.Z,i)!=null||n.Qa)&&Cs(this,n),n.Hb&&(n.Hb.abort(),n.Hb=null),i===pe&&(i=this.g.Z,i.I&&i.I.Fd()),n.Yc=!0}}Sa(this)&&Df(this)}};function Cs(e,t){t.Kc||t.Ic||(t.Qa?(t.Ic=!0,t.Oe=0):sf(e.g.Z,t.type)==null?t.zb==null&&_t(e,t,0):(Bi(t),Cf(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function Ow(e,t){var n,i,r,o,s,u,a,l;return k(function(c){if(c.g==1){if(!e.o)throw new M(2,5,5006);return n=wa(e,!0),i=e.g.Z,T(c,i.init(n,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(Ve(e.l),e.updateDuration(),r=g(n.keys()),o=r.next();!o.done;o=r.next())s=o.value,u=n.get(s),e.h.has(s)||(a=Ta(e,u),t.has(u.id)&&(l=t.get(u.id),Iw(l,function(f,p,h){return xa(f,p,h||null,e.i.retryParameters,e.g.pc)}),a.$=l),e.h.set(s,a),_t(e,a,0));K(c)})}function Ta(e,t){var n={stream:t,type:t.type,sa:null,$:wf(e,t),Ia:null,mb:null,gf:null,lc:null,kc:null,df:null,ef:null,Fc:null,endOfStream:!1,Qa:!1,zb:null,Ic:!1,Oe:0,Sf:!1,Kc:!1,Yc:!0,ag:!1,$g:!1,Sd:!1,Hb:null,yc:null};return t.dependencyStream&&(n.yc=Ta(e,t.dependencyStream)),n}function wf(e,t){if(t.type==="video"&&e.i.disableVideoPrefetch||t.type==="audio"&&e.i.disableAudioPrefetch||t.type===pe&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===pe&&e.i.disableTextPrefetch)return null;if(e.m.has(t))return e.m.get(t);var n=e.h.get(t.type);return(n=n&&n.$)&&t===n.i?n:0<e.i.segmentPrefetchLimit?new va(e.i.segmentPrefetchLimit,t,function(i,r,o){return xa(i,r,o||null,e.i.retryParameters,e.g.pc)},0>e.g.ub()):null}function _w(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,i=g(e.j.variants),r=i.next(),o={};!r.done;o={Mb:void 0},r=i.next())if(o.Mb=r.value,o.Mb.audio)if(e.m.has(o.Mb.audio)){if(r=e.m.get(o.Mb.audio),Um(r,t),!(0<t&&n.some(function(u){return function(a){return Xr(u.Mb.audio.language,a)}}(o)))){var s=e.h.get(o.Mb.audio.type);r!==(s&&s.$)&&Kn(r),e.m.delete(o.Mb.audio)}}else 0>=t||!n.some(function(u){return function(a){return Xr(u.Mb.audio.language,a)}}(o))||!(r=wf(e,o.Mb.audio))||(o.Mb.audio.segmentIndex||o.Mb.audio.createSegmentIndex(),e.m.set(o.Mb.audio,r))}d.updateDuration=function(){var e=Ah(),t=this.j.presentationTimeline.getDuration();1/0>t?(e&&(this.s&&this.s.stop(),uf(this.g.Z)),this.g.Z.pb(t)):e?(this.s&&this.s.Fa(.5),this.g.Z.pb(1/0)):this.g.Z.pb(Math.pow(2,32))};function bw(e,t){var n,i,r,o,s,u,a,l,c;return k(function(f){switch(f.g){case 1:if(Ve(e.l),n=gt,t.Qa||t.zb==null||t.Kc)return f.return();if(t.zb=null,!t.Ic){f.u(2);break}return T(f,Cf(e,t,t.Sf,t.Oe),3);case 3:return f.return();case 2:if(Uw(e,t),t.stream.segmentIndex){f.u(4);break}return i=t.stream,ue(f,5),T(f,t.stream.createSegmentIndex(),7);case 7:ce(f,6);break;case 5:return r=ae(f),T(f,Mf(e,t,r),8);case 8:return f.return();case 6:if(i!=t.stream)return i.closeSegmentIndex&&i.closeSegmentIndex(),t.Qa||t.zb||_t(e,t,0),f.return();case 4:if(!t.yc){f.u(9);break}if(t.yc.stream.segmentIndex){f.u(9);break}return ue(f,11),T(f,t.yc.stream.createSegmentIndex(),13);case 13:ce(f,9);break;case 11:ae(f);case 9:ue(f,14),o=Fw(e,t),o!=null&&(_t(e,t,o),t.Sd=!1),ce(f,15);break;case 14:return s=ae(f),T(f,Mf(e,t,s),16);case 16:return f.return();case 15:if(t.type===n.Ta)return f.return();if(u=[t],a=t.type===n.ea?n.Ca:n.ea,(l=e.h.get(a))&&u.push(l),!e.I||!u.every(function(p){return p.endOfStream})){f.u(0);break}return T(f,e.g.Z.endOfStream(),18);case 18:Ve(e.l),c=e.g.Z.getDuration(),c!=0&&c<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.pb(c),K(f)}})}function Fw(e,t){if(If(t))return sw(e.g.Z,t.stream.originalId||""),null;if(t.type==pe&&uw(e.g.Z),t.stream.isAudioMuxedInVideo)return null;var n=e.i.updateIntervalSeconds/Math.max(1,Math.abs(e.g.ub()));if(!om(e.g.Z)&&t.type!=pe)return n/2;var i=e.g.Qc();if(t.type==="audio")for(var r=g(e.m.keys()),o=r.next();!o.done;o=r.next())o=e.m.get(o.value),o.$a(i,!0),As(o,i);r=t.Ia?t.Ia.endTime:i;var s=rw(e.g.Z,t.type,i);o=Math.max(1,Math.max(e.i.rebufferingGoal,e.i.bufferingGoal)*e.C);var u=e.j.presentationTimeline.getDuration()-r,a=uo(e.g.Z,t.type);if(1e-6>u&&a)return t.endOfStream=!0,t.type=="video"&&(e=e.h.get(pe))&&If(e)&&(e.endOfStream=!0),null;if(t.endOfStream=!1,s>=o)return n/2;if(u=!t.sa,a=Bw(e,t,i,a),!a)return n;s=t.mb;var l=a.Y;s&&l&&ms(l,s)&&(s.g=l.g),s=!1,u&&t.ag&&(s=!0,t.ag=!1),u=1/0,l=Array.from(e.h.values()),l=g(l);for(var c=l.next();!c.done;c=l.next())c=c.value,If(c)||c.sa&&!c.sa.current()||(u=Math.min(u,c.Ia?c.Ia.endTime:i));return r>=u+e.j.presentationTimeline.h?n:(t.$&&t.sa&&!e.m.has(t.stream)&&(t.$.$a(a.startTime+.001),As(t.$,a.startTime).catch(function(){})),Sa(e)&&Xw(e,t,a)||(Vw(e,t,i,a,s).catch(function(){}),t.yc&&Vm(e,t.yc,i,o)),null)}function Bw(e,t,n,i){if(t.sa)return(n=t.sa.current())&&t.Ia&&.001>Math.abs(t.Ia.startTime-n.startTime)&&(n=t.sa.next().value),n;if(t.Ia||i)return n=t.Ia?t.Ia.endTime:i,e=0>e.g.ub(),t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Wb(n,!1,e)),t.sa&&t.sa.next().value;i=e.j.sequenceMode||Sa(e)?0:e.i.inaccurateManifestTolerance;var r=Math.max(n-i,0);e=0>e.g.ub();var o=null;return i&&(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Wb(r,!1,e)),o=t.sa&&t.sa.next().value),o||(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Wb(n,!1,e)),o=t.sa&&t.sa.next().value),o}function Vw(e,t,n,i,r){var o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D;return k(function(E){switch(E.g){case 1:if(o=gt,s=t.stream,u=t.sa,t.Qa=!0,ue(E,2),i.Cc()==2)throw new M(1,1,1011);return T(E,Gw(e,t,i,r),4);case 4:return Ve(e.l),e.B?E.return():(a=s.mimeType=="video/mp4"||s.mimeType=="audio/mp4",l=F.ReadableStream,e.i.lowLatencyMode&&e.j.isLowLatency&&l&&a&&(e.j.type!="HLS"||i.m)?(p=new Uint8Array(0),m=h=!1,v=function(I){var C,R,N;return k(function(L){switch(L.g){case 1:if(h||(m=!0,Ve(e.l),e.B))return L.return();if(ue(L,2),p=tt(p,I),C=!1,R=0,new Ue().box("mdat",function(P){R=P.size+P.start,C=!0}).parse(p,!1,!0),!C){L.u(4);break}return N=p.subarray(0,R),p=p.subarray(R),T(L,Af(e,t,n,s,i,N,!0,r),5);case 5:t.$&&t.sa&&As(t.$,i.startTime,!0);case 4:ce(L,0);break;case 2:y=ae(L),K(L)}})},T(E,Ms(e,t,i,v),9)):(c=Ms(e,t,i),T(E,c,7)));case 7:return f=E.h,Ve(e.l),e.B?E.return():(Ve(e.l),t.Ic?(t.Qa=!1,_t(e,t,0),E.return()):T(E,Af(e,t,n,s,i,f,!1,r),6));case 9:if(x=E.h,y)throw y;if(m){E.u(10);break}return h=!0,Ve(e.l),e.B?E.return():t.Ic?(t.Qa=!1,_t(e,t,0),E.return()):T(E,Af(e,t,n,s,i,x,!1,r),10);case 10:t.$&&t.sa&&As(t.$,i.startTime,!0);case 6:if(Ve(e.l),e.B)return E.return();t.Ia=i,u.next(),t.Qa=!1,t.$g=!1,S=e.g.Z.Nb(),w=S[t.type],JSON.stringify(w),t.Ic||(A=null,t.type===o.Ca?A=e.h.get(o.ea):t.type===o.ea&&(A=e.h.get(o.Ca)),A&&A.type==o.ea?e.g.tf(i,t.stream,A.stream.isAudioMuxedInVideo):e.g.tf(i,t.stream,t.stream.codecs.includes(","))),_t(e,t,0),ce(E,0);break;case 2:if(D=ae(E),Ve(e.l,D),e.B)return E.return();if(t.Qa=!1,D.code==7001)t.Qa=!1,Bi(t),_t(e,t,0),E.u(0);else if(t.type==o.Ta&&e.i.ignoreTextStreamFailures)e.h.delete(o.Ta),E.u(0);else return D.code==3017?T(E,Hw(e,t,D),0):(t.Sd=!0,D.category==1&&t.$&&Es(t.$,i),D.severity=2,T(E,Mf(e,t,D),0))}})}function Vm(e,t,n,i){var r,o,s,u,a,l,c,f,p,h,m;return k(function(y){switch(y.g){case 1:for(r=t.stream,u=(s=(o=r.segmentIndex)&&o.Wb(n))&&s.next().value;u&&e.L.includes(u.startTime);)u=s&&s.next().value;if(!u){y.u(0);break}if(a=u.Y,!a||ms(a,t.mb)){y.u(3);break}return t.mb=a,ue(y,4),T(y,Ms(e,t,a),6);case 6:l=y.h;var v=e.g.Z;v.M&&gc(v.M,l,0,r),e.L=[],ce(y,3);break;case 4:throw c=ae(y),t.mb=null,c;case 3:if(t.Ia&&t.Ia==u){y.u(0);break}return t.Ia=u,ue(y,8),T(y,Ms(e,t,u),10);case 10:f=y.h,v=e.g.Z,v.M&&gc(v.M,f,0,r),e.L.push(u.startTime),ce(y,9);break;case 8:throw p=ae(y),t.Ia=null,p;case 9:if(h=Math.max.apply(Math,[0].concat(H(e.L))),m=e.g.Qc(),m+i>h)return T(y,Vm(e,t,u.startTime,i),0);y.u(0)}})}function Hw(e,t,n){var i,r,o,s;return k(function(u){if(u.g==1){if(i=Array.from(e.h.values()),i.some(function(a){return a!=t&&a.$g}))return u.u(2);if(r=e.i.maxDisabledTime===0&&n.code==1011?1:e.i.maxDisabledTime,e.g.disableStream(t.stream,r))return u.return();if(e.i.avoidEvictionOnQuotaExceededError)return _t(e,t,4),u.return();if(o=Math.round(100*e.C),20<o)e.C-=.2;else if(4<o)e.C-=.04;else return t.Sd=!0,e.B=!0,e.g.onError(n),u.return();return t.$g=!0,s=e.g.Qc(),T(u,Ef(e,t,s),2)}_t(e,t,4),K(u)})}function Gw(e,t,n,i){var r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w;return k(function(A){switch(A.g){case 1:if(r=gt,o=t.Ia==null,s=[],u=Math.max(0,Math.max(n.appendWindowStart,e.W)-.1),a=Math.min(n.appendWindowEnd,e.U)+.1,l=n.codecs||t.stream.codecs,c=ji(l),f=un(n.mimeType||t.stream.mimeType),p=n.timestampOffset,p==t.gf&&u==t.lc&&a==t.kc&&c==t.df&&f==t.ef){A.u(2);break}if(h=t.df&&t.ef&&gw(e.g.Z,t.type,f,l,wa(e)),!h){A.u(3);break}if(m=null,t.type===r.Ca?m=e.h.get(r.ea):t.type===r.ea&&(m=e.h.get(r.Ca)),!m){A.u(3);break}return T(A,ho(m).catch(function(){}),5);case 5:m.mb=null,m.lc=null,m.kc=null,Cs(e,m);case 3:return T(A,Hm(e,t,p,u,a,n,c,f),2);case 2:return ms(n.Y,t.mb)||(t.mb=n.Y,n.l&&n.Y&&(y=Ms(e,t,n.Y),v=function(){var D,E,I,C,R,N,L,P,b;return k(function(U){switch(U.g){case 1:return ue(U,2),T(U,y,4);case 4:return D=U.h,Ve(e.l),E=null,I=new Map,C={projection:null,hfov:null},R=new Ue,R.box("moov",le).box("trak",le).box("mdia",le).R("mdhd",function(j){E=ra(j.reader,j.version).timescale}).box("hdlr",function(j){switch(j=j.reader,j.skip(8),j.Vc()){case"soun":I.set(r.ea,E);break;case"vide":I.set(r.Ca,E)}E=null}),t.type===r.Ca&&R.box("minf",le).box("stbl",le).R("stsd",mi).box("encv",Qt).box("avc1",Qt).box("avc3",Qt).box("hev1",Qt).box("hvc1",Qt).box("dvav",Qt).box("dva1",Qt).box("dvh1",Qt).box("dvhe",Qt).box("dvc1",Qt).box("dvi1",Qt).box("vexu",le).box("proj",le).R("prji",function(j){j=j.reader.Vc(),C.projection=j}).box("hfov",function(j){j=j.reader.T()/1e3,C.hfov=j}),R.parse(D,!0,!0),t.type===r.Ca&&Kw(e,C),I.has(t.type)?n.Y.timescale=I.get(t.type):E!=null&&(n.Y.timescale=E),N=t.stream.segmentIndex,N instanceof Je&&(L=xw(N,n.startTime)),P=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,T(U,e.g.Kh(t.type,D),5);case 5:return T(U,da(e.g.Z,t.type,D,null,t.stream,P,t.Yc,i,!1,!1,L),6);case 6:ce(U,0);break;case 2:throw b=ae(U),t.mb=null,b}})},x=n.startTime,o&&(S=uo(e.g.Z,t.type),S!=null&&(x=S)),e.g.xk(x,n.Y),s.push(v()))),w=t.Ia?t.Ia.i:-1,n.i!=w&&s.push(aw(e.g.Z,t.type,n.startTime)),T(A,Promise.all(s),0)}})}function Hm(e,t,n,i,r,o,s,u){var a,l,c,f,p;return k(function(h){switch(h.g){case 1:if(a=gt,l=wa(e),ue(h,2),t.lc=i,t.kc=r,s&&(t.df=s),u&&(t.ef=u),t.gf=n,c=e.j.sequenceMode||e.j.type=="HLS",f=null,t.type===a.Ca?f=e.h.get(a.ea):t.type===a.ea&&(f=e.h.get(a.Ca)),!(f&&f.stream&&f.stream.isAudioMuxedInVideo)){h.u(4);break}return T(h,um(e.g.Z,f.type,n,i,r,c,f.stream.mimeType,f.stream.codecs,l),4);case 4:return T(h,um(e.g.Z,t.type,n,i,r,c,o.mimeType||t.stream.mimeType,o.codecs||t.stream.codecs,l),6);case 6:ce(h,0);break;case 2:throw p=ae(h),t.lc=null,t.kc=null,t.df=null,t.ef=null,t.gf=null,p}})}function Af(e,t,n,i,r,o,s,u){s=s===void 0?!1:s,u=u===void 0?!1:u;var a,l,c,f;return k(function(p){switch(p.g){case 1:return a=i.closedCaptions&&0<i.closedCaptions.size,e.i.shouldFixTimestampOffset&&(l=i.mimeType=="video/mp4"||i.mimeType=="audio/mp4",c=null,r.Y&&(c=r.Y.timescale),l&&c&&i.type==="video"&&e.j.type=="DASH"&&new Ue().box("moof",le).box("traf",le).R("tfdt",function(h){var m,y,v,x,S,w;return k(function(A){return m=ia(h.reader,h.version),y=m.baseMediaDecodeTime,y?(v=-y/c,x=Number(t.gf)||0,x<v?(S=t.lc,w=t.kc,T(A,Hm(e,t,v,S,w,r),0)):A.u(0)):A.return()})}).parse(o,!1,s)),T(p,Ef(e,t,n),2);case 2:return Ve(e.l),f=t.Yc,t.Yc=!1,T(p,e.g.Kh(t.type,o),3);case 3:return T(p,da(e.g.Z,t.type,o,r,i,a,f,u,s),4);case 4:Ve(e.l),K(p)}})}function Ef(e,t,n){var i,r,o,s,u,a,l,c,f;return k(function(p){if(p.g==1)return i=t.stream.segmentIndex,i instanceof Je&&(i.$a(e.j.presentationTimeline.Gb()),r=[],Tw(i,function(h){r.push(h.Pe())})),o=Math.max(e.i.bufferBehind*e.C,e.j.presentationTimeline.h),s=sf(e.g.Z,t.type),s==null?(e.F==t&&(e.F=null),p.return()):(u=n-s,a=e.i.evictionGoal,l=e.j.presentationTimeline.Xb(),c=e.j.presentationTimeline.Fb(),f=u-o,c-l>a&&(f=Math.max(u-o,l-a-s)),f<=a?p.return():T(p,e.g.Z.remove(t.type,s,s+f,r),2));if(p.g!=4)return Ve(e.l),e.F?T(p,Ef(e,e.F,n),4):p.u(0);Ve(e.l),K(p)})}function If(e){return e&&e.type==pe&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function Ms(e,t,n,i){var r,o,s,u,a;return k(function(l){switch(l.g){case 1:if(r=n.Yb())return l.return(r);if(o=null,t.$){var c=t.$,f=c.h;n instanceof Xt&&(f=c.j),f.has(n)?(c=f.get(n),i&&(c.sh=i),o=c.ae):o=null}return o||(o=xa(n,t.stream,i||null,e.i.retryParameters,e.g.pc)),s=0,t.sa&&(s=t.sa.h),t.Hb=o,T(l,o.promise,2);case 2:if(u=l.h,t.Hb=null,a=u.data,!n.aesKey){l.u(3);break}return T(l,Sf(a,n.aesKey,s),4);case 4:a=l.h;case 3:return l.return(a)}})}function xa(e,t,n,i,r,o){o=o===void 0?!1:o;var s=e instanceof Z?e:void 0,u=s?1:0;return e=Is(e.O(),e.startByte,e.endByte,i,n),e.contentType=t.type,r.request(jn,e,{type:u,stream:t,segment:s,isPreload:o})}function Cf(e,t,n,i){var r,o;return k(function(s){if(s.g==1)return t.Ic=!1,t.Sf=!1,t.Oe=0,t.Kc=!0,t.Ia=null,t.sa=null,t.$&&!e.m.has(t.stream)&&Kn(t.$),i?(r=e.g.Qc(),o=e.g.Z.getDuration(),T(s,e.g.Z.remove(t.type,r+i,o),3)):T(s,sm(e.g.Z,t.type),4);if(s.g!=3)return Ve(e.l),n?T(s,e.g.Z.flush(t.type),3):s.u(3);Ve(e.l),t.Kc=!1,t.endOfStream=!1,t.Qa||t.zb||_t(e,t,0),K(s)})}function _t(e,t,n){var i=t.type;(i!=pe||e.h.has(i))&&(t.zb=new rs(function(){var r;return k(function(o){if(o.g==1)return ue(o,2),T(o,bw(e,t),4);if(o.g!=2)return ce(o,0);r=ae(o),e.g&&e.g.onError(r),K(o)})}).ia(n))}function Bi(e){e.zb!=null&&(e.zb.stop(),e.zb=null)}function ho(e){return k(function(t){return e.Hb?T(t,e.Hb.abort(),0):t.u(0)})}function Mf(e,t,n){var i;return k(function(r){if(r.g==1)return n.code==3024?(t.Qa=!1,Bi(t),_t(e,t,0),r.return()):T(r,cg(e.S),2);if(Ve(e.l),n.category===1&&n.code!=1003){if(t.Fc)return bm(e,!1),r.return();i=e.i.maxDisabledTime===0&&n.code==1011?1:e.i.maxDisabledTime,n.handled=e.g.disableStream(t.stream,i),n.handled&&(n.severity=1)}(!n.handled||n.code!=1011)&&e.g.onError(n),n.handled||e.i.failureCallback(n),K(r)})}function kf(e,t){t=t===void 0?!1:t;var n=n===void 0?!0:n,i,r,o,s,u;return k(function(a){if(a.g==1){if(i=Date.now()/1e3,r=e.i.minTimeBetweenRecoveries,!t){if(!e.i.allowMediaSourceRecoveries||i-e.M<r)return a.return(!1);e.M=i}return o=gt,(s=e.h.get(o.ea))&&(s.mb=null,s.lc=null,s.kc=null,n&&Cs(e,s),ho(s).catch(function(){}),s.sa&&s.sa.dh(),Bi(s)),(u=e.h.get(o.Ca))&&(u.mb=null,u.lc=null,u.kc=null,n&&Cs(e,u),ho(u).catch(function(){}),u.sa&&u.sa.dh(),Bi(u)),T(a,cm(e.g.Z,wa(e)),2)}return!u||u.Kc||u.Qa||u.zb||_t(e,u,0),!s||s.Kc||s.Qa||s.zb||_t(e,s,0),a.return(!0)})}function Kw(e,t){if(e.N.projection!=t.projection||e.N.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new G("spatialvideoinfo",n)}else n=new G("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.N=t}}function Sa(e){return e.i.crossBoundaryStrategy!=="keep"}function Df(e){if(Sa(e)){e.H.stop();var t=e.g.Qc(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.mb)&&n.g!==null&&(t=n.g-t,0>t||1<t||(e.G=n.g+.1,e.H.ia(t)))}}function Xw(e,t,n){if(t.type===pe)return!1;var i=t.mb;if(!i)return!1;var r=n.Y;if(n=i.g!==r.g,e.i.crossBoundaryStrategy==="reset_to_encrypted"&&(i.encrypted||r.encrypted||(n=!1),i.encrypted&&(e.i.crossBoundaryStrategy="keep")),e.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&i.encrypted==r.encrypted&&(n=!1),n&&t.Yc){var o=e.g.video,s=o.paused;kf(e,!0).then(function(){var u=new Map().set("oldEncrypted",i.encrypted).set("newEncrypted",r.encrypted);e.g.onEvent(new G("boundarycrossed",u)),s||o.play()})}return n}function wa(e,t){t=t===void 0?!1:t;var n=new Map;return e.o.audio&&n.set("audio",e.o.audio),e.o.video&&n.set("video",e.o.video),t&&e.A&&n.set(pe,e.A),n}function Aa(){}function Rf(e,t,n,i,r){var o=r in i,s=o?n.constructor==Object&&Object.keys(i).length==0:n.constructor==Object&&Object.keys(n).length==0,u=o||s,a=!0,l;for(l in t){var c=r+"."+l,f=o?i[r]:n[l];u||l in n?t[l]===void 0?f===void 0||u?delete e[l]:e[l]=Pn(f):s?e[l]=t[l]:f.constructor==Object&&t[l]&&t[l].constructor==Object?(e[l]||(e[l]=Pn(f)),c=Rf(e[l],t[l],f,i,c),a=a&&c):typeof t[l]!=typeof f||t[l]==null||typeof t[l]!="function"&&t[l].constructor!=f.constructor?(zn("Invalid config, wrong type for "+c),a=!1):typeof n[l]=="function"&&n[l].length!=t[l].length?(Ae("Unexpected number of arguments for "+c),e[l]=t[l]):e[l]=Array.isArray(e[l])?t[l].slice():t[l]:(zn("Invalid config, unrecognized key "+c),a=!1)}return a}function Ea(e,t){for(var n={},i=n,r=0,o=0;r=e.indexOf(".",r),!(0>r);)(r==0||e[r-1]!="\\")&&(o=e.substring(o,r).replace(/\\\./g,"."),i[o]={},i=i[o],o=r+1),r+=1;return i[e.substring(o).replace(/\\\./g,".")]=t,n}function go(e,t){return e&&t}function Gm(e,t){function n(o){for(var s=g(Object.keys(o)),u=s.next();!u.done;u=s.next())if(u=u.value,!(o[u]instanceof HTMLElement))if(r(o[u])&&Object.keys(o[u]).length===0)delete o[u];else{var a=o[u];Array.isArray(a)&&a.length===0||typeof o[u]=="function"?delete o[u]:r(o[u])&&(n(o[u]),Object.keys(o[u]).length===0&&delete o[u])}}function i(o,s){return Object.keys(o).reduce(function(u,a){var l=o[a];return s.hasOwnProperty(a)?l instanceof HTMLElement&&s[a]instanceof HTMLElement?l.isEqualNode(s[a])||(u[a]=l):r(l)&&r(s[a])?(l=i(l,s[a]),(0<Object.keys(l).length||!r(l))&&(u[a]=l)):Array.isArray(l)&&Array.isArray(s[a])?xc(l,s[a])||(u[a]=l):Number.isNaN(l)&&Number.isNaN(s[a])||l!==s[a]&&(u[a]=l):u[a]=l,u},{})}function r(o){return o&&typeof o=="object"&&!Array.isArray(o)}return e=i(e,t),n(e),e}W("shaka.util.ConfigUtils",Aa),Aa.getDifferenceFromConfigObjects=Gm,Aa.convertToConfigObject=Ea,Aa.mergeConfigObjects=Rf,W("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function zt(){}function Km(e){return e=Yn(e),new nt(e).Cb}function ks(e,t,n){function i(u){Ht(o).setUint32(s,u.byteLength,!0),s+=4,o.set(se(u),s),s+=u.byteLength}if(!n||!n.byteLength)throw new M(2,6,6015);var r;typeof t=="string"?r=dc(t,!0):r=t,e=Yn(e),e=dc(e,!0);var o=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),s=0;return i(e),i(r),i(n),o}function Pf(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=Yn(e).split("skd://").pop(),ks(e,n,t))}function Ia(e,t){e===2&&(e=t.drmInfo)&&Ku(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}W("shaka.drm.FairPlay",zt),zt.commonFairPlayResponse=function(e,t){if(e===2&&(e=t.originalRequest.drmInfo)&&Ku(e.keySystem)){try{var n=ze(t.data)}catch{return}if(e=!1,n=n.trim(),n.substr(0,5)==="<ckc>"&&n.substr(-6)==="</ckc>"&&(n=n.slice(5,-6),e=!0),!e)try{var i=JSON.parse(n);i.ckc&&(n=i.ckc,e=!0),i.CkcMessage&&(n=i.CkcMessage,e=!0),i.License&&(n=i.License,e=!0)}catch{}e&&(t.data=gn(mn(n)))}},zt.muxFairPlayRequest=function(e,t){Ia(e,t)},zt.expressplayFairPlayRequest=function(e,t){if(e===2){var n=t.drmInfo;n&&Ku(n.keySystem)&&Ia(e,t)}},zt.conaxFairPlayRequest=function(e,t){Ia(e,t)},zt.ezdrmFairPlayRequest=function(e,t){Ia(e,t)},zt.verimatrixFairPlayRequest=function(e,t){e===2&&(e=t.drmInfo)&&Ku(e.keySystem)&&(e=se(t.body),e=oi(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Dn("spc="+e))},zt.muxInitDataTransform=function(e,t,n){return Pf(e,t,n)},zt.expressplayInitDataTransform=function(e,t,n){return Pf(e,t,n)},zt.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=Yn(e).split("skd://").pop().split("?").shift(),n=F.atob(n);var i=new ArrayBuffer(2*n.length);i=mh(i);for(var r=0,o=n.length;r<o;r++)i[r]=n.charCodeAt(r);return ks(e,i,t)},zt.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=Yn(e).split(";").pop(),ks(e,n,t))},zt.verimatrixInitDataTransform=function(e,t,n){return Pf(e,t,n)},zt.initDataTransform=ks,zt.defaultGetContentId=Km,zt.isFairPlaySupported=function(){var e;return k(function(t){return t.g==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ue(t,2),T(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.g!=2?t.return(!0):(ae(t),t.return(!1))})};function Ca(){this.g=null}Ca.prototype.configure=function(e){this.g=e},Ca.prototype.getConfiguration=function(){return this.g},Ca.prototype.create=function(e){var t;if(this.g.language){var n=Ww(e,this.g.language);n.length&&(t=n)}t||(t=e.filter(function(o){return o.primary}),t=t.length?t:e),e=zw(t,this.g.role),e.length&&(t=e),this.g.videoLayout&&(e=Jw(t,this.g.videoLayout),e.length&&(t=e)),this.g.Ec&&(e=Qw(t,this.g.Ec),e.length&&(t=e));var i=[this.g.channelCount,this.g.preferredAudioChannelCount];if(e=i.filter(function(o,s){return o&&i.indexOf(o)===s}),e.length){for(e=g(e),n=e.next();!n.done;n=e.next())if(n=$w(t,n.value),n.length){t=n;break}}this.g.Jc&&(e=Yw(t,this.g.Jc),e.length&&(t=e)),this.g.Ed&&(e=qw(t,this.g.Ed),e.length&&(t=e)),e=Zw(t,this.g.spatialAudio),e.length&&(t=e);var r=[this.g.audioCodec,this.g.Gd].concat(H(this.g.preferredAudioCodecs));if(e=r.filter(function(o,s){return o&&r.indexOf(o)===s}),e.length){for(e=g(e),n=e.next();!n.done;n=e.next())if(n=eA(t,n.value),n.length){t=n;break}}return new ea(t[0],t,!(this.g.codecSwitchingStrategy=="smooth"&&br()))};function Ww(e,t){t=ke(t);var n=Ou(t,e.map(function(i){return jc(i)}));return n?e.filter(function(i){return n==jc(i)}):[]}function zw(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function Yw(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function qw(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function $w(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount>t)}).sort(function(n,i){return n.audio||i.audio?n.audio?i.audio?(i.audio.channelsCount||0)-(n.audio.channelsCount||0):1:-1:0})}function Qw(e,t){if(t=="AUTO"){var n=e.some(function(i){return!!(i.video&&i.video.hdr&&i.video.hdr=="HLG")});t=x0(n)}return e.filter(function(i){return!(i.video&&i.video.hdr&&i.video.hdr!=t)})}function Jw(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function Zw(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function eA(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function Ma(){}function mo(){var e=1/0,t=ye();navigator.connection&&navigator.connection.saveData&&(e=360);var n={retryParameters:Hn(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(u,a,l){return F.shakaMediaKeysPolyfill==="apple"&&a=="skd"&&(a=l.serverCertificate,l=Km(u),u=ks(u,l,a)),u},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},i="reload",r=!1;br()&&t.cd()&&(i="smooth",r=!0),r={retryParameters:Hn(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:ka,manifestPreprocessorTXml:Da,sequenceMode:!1,multiTypeVariantsAllowed:r,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:t.bd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:ka,manifestPreprocessorTXml:Da,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var o={trackSelectionCallback:function(u){return k(function(a){return a.return(u)})},downloadSizeCallback:function(u){var a;return k(function(l){return l.g==1?navigator.storage&&navigator.storage.estimate?T(l,navigator.storage.estimate(),3):l.return(!0):(a=l.h,l.return(a.usage+u<.95*a.quota))})},progressCallback:function(u,a){return go([u,a])},usePersistentLicense:!0,numberOfParallelDownloads:5},s={drm:n,manifest:r,streaming:{retryParameters:Hn(),failureCallback:function(u){return go([u])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3},mediaSource:{codecSwitchingStrategy:i,addExtraFeaturesToSourceBuffer:function(u){return go([u],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(u,a){return go([u,a])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:o,abrFactory:function(){return new Qe},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(Ca,[null].concat(H(pt.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:30,repeatMode:0}};return o.trackSelectionCallback=function(u){return k(function(a){return a.return(tA(u,s.preferredAudioLanguage,s.preferredVideoHdrLevel))})},t.Ua(s)}function Xm(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function xi(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Rf(e,t,n||mo(),i,"")}function tA(e,t,n){var i=n;i=="AUTO"&&(n=e.some(function(u){return!!(u.hdr&&u.hdr=="HLG")}),i=x0(n));var r=e.filter(function(u){return!(u.type!="variant"||u.hdr&&u.hdr!=i)});n=[];var o=Ou(t,r.map(function(u){return u.language}));o&&(n=r.filter(function(u){return ke(u.language)==o})),n.length==0&&(n=r.filter(function(u){return u.primary})),n.length==0&&(r.map(function(u){return u.language}),n=r);var s=n.filter(function(u){return u.height&&480>=u.height});for(s.length&&(s.sort(function(u,a){return a.height-u.height}),n=s.filter(function(u){return u.height==s[0].height})),t=[],n.length&&(r=Math.floor(n.length/2),n.sort(function(u,a){return u.bandwidth-a.bandwidth}),t.push(n[r])),e=g(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=pe&&n.type!="image"||t.push(n);return t}function ka(e){return go([e],e)}function Da(e){return go([e],e)}W("shaka.util.PlayerConfiguration",Ma),Ma.mergeConfigObjects=xi,Ma.createDefaultForLL=Xm,Ma.createDefault=mo;function nA(){this.g=null,this.h=[]}function Lf(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=g(e.h);for(var i=e.next();!i.done;i=e.next())i=i.value,n+=i.state==t?i.duration:0;return n}function iA(e){function t(o){return{timestamp:o.timestamp,state:o.state,duration:o.duration}}for(var n=[],i=g(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}function rA(){this.i=this.h=null,this.g=[]}function Nf(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Ra(){this.B=this.W=NaN,this.l="",this.j=this.gi=this.s=this.A=this.K=this.C=this.o=this.m=this.I=this.F=this.i=this.S=this.U=this.M=this.N=this.P=NaN,this.L=0,this.G=this.H=NaN,this.g=new nA,this.h=new rA}function oA(e,t,n){e.P=t,e.N=n}function Wm(e,t,n){e.W=t,e.B=n}function sA(e,t){e.i=isNaN(e.i)?t:Math.max(e.i,t)}function zm(e,t){e.j=isNaN(e.j)?t:e.j+t}function uA(e){var t=e.W,n=e.B,i=e.l,r=e.A,o=e.N,s=e.P,u=e.M,a=e.U,l=e.S,c=e.s,f=e.i,p=e.F,h=e.I,m=e.m,y=Lf(e.g,"playing"),v=Lf(e.g,"paused"),x=Lf(e.g,"buffering"),S=e.o,w=e.C,A=e.K,D=e.gi,E=e.j,I=e.L,C=e.H,R=e.G,N=iA(e.g),L=[];e=g(e.h.g);for(var P=e.next();!P.done;P=e.next())P=P.value,L.push({timestamp:P.timestamp,id:P.id,type:P.type,fromAdaptation:P.fromAdaptation,bandwidth:P.bandwidth});return{width:t,height:n,currentCodecs:i,streamBandwidth:r,decodedFrames:o,droppedFrames:s,corruptedFrames:u,stallsDetected:a,gapsJumped:l,estimatedBandwidth:c,completionPercent:f,loadLatency:p,manifestTimeSeconds:h,drmTimeSeconds:m,playTime:y,pauseTime:v,bufferingTime:x,licenseTime:S,liveLatency:w,maxSegmentDuration:A,manifestSizeBytes:D,bytesDownloaded:E,nonFatalErrorCount:I,manifestPeriodCount:C,manifestGapCount:R,stateHistory:N,switchHistory:L}}function Tn(e,t,n,i){De.call(this),this.N=e,this.W=t,this.Oa=i.networkingEngine,this.m=n,this.A=null,this.Ka=0,this.ab=i.hd,this.F=i.nk,this.eb=i.pk,this.g=i.config,this.l=this.G=this.h=null,this.wa=!1,this.H=i.Ck,this.ya=!1,this.i=null,this.na=!1,this.j=this.C=null,this.ha=!1,this.M=new Map,this.za=!1,this.Pa=i.Bk,this.ba=new Ra,this.va=new je,this.s=new je,this.P=null,this.o=!1,this.ka=i.ej,this.U=this.K=null,this.Za=i.dj,this.S=!1,this.L=[],this.I=[],this.B=!0}et(Tn,De);function Ds(e,t,n){(e=t?e.I:e.L)?e.push(n):n()}function aA(e){if(e.I)for(var t=g(e.I),n=t.next();!n.done;n=t.next())n=n.value,n();e.I=null}function Ym(e,t){if(e.P=t,e.S=!0,e.L){t=g(e.L);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.L=null}d=Tn.prototype,d.getStartTime=function(){return this.m},d.nd=function(){return this.N},d.Fg=function(){return this.h};function lA(e){return e.ha=!0,e.j}function cA(e){return e.ya=!0,e.H}d.getStats=function(){return this.ba};function fA(e){return e.na=!0,e.i}d.Mj=function(){return this.K?pr(this.K):null},d.Lj=function(){return this.U?hr(this.U):null};function dA(e){return e.za=!0,e.M}function pA(e,t,n){e.j=t,e.C=n}d.start=function(){var e=this;(function(){var t;return k(function(n){switch(n.g){case 1:return T(n,Promise.resolve(),2);case 2:return ue(n,3),T(n,hA(e),5);case 5:return Vi(e),T(n,gA(e),6);case 6:if(Vi(e),F.shakaMediaKeysPolyfill==="webkit"){n.u(7);break}return T(n,qm(e),8);case 8:Vi(e);case 7:if(!e.ka){n.u(9);break}return T(n,mA(e),10);case 10:Vi(e);case 9:if(!e.ka||!e.i){n.u(11);break}return T(n,vS(e.i),12);case 12:Vi(e);case 11:e.s.resolve(),ce(n,0);break;case 3:t=ae(n),t instanceof M&&(t.code==7001||t.code==7003)||e.s.reject(t),K(n)}})})()},d.dispatchEvent=function(e){return this.P?this.P.dispatchEvent(e):De.prototype.dispatchEvent.call(this,e)},d.onError=function(e){e.severity===2&&(this.s.reject(e),this.destroy());var t=new Map().set("detail",e);t=new G("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function Vi(e){if(e.o)throw new M(2,7,7003)}function jf(e,t){e.dispatchEvent(new G("onstatechange",new Map().set("state",t)))}function hA(e){var t,n,i,r,o,s;return k(function(u){switch(u.g){case 1:if(jf(e,"manifest-parser"),e.l||(e.G=Vg(e.N,e.W),e.l=e.G(),e.l.configure(e.g.manifest,function(){return e.B})),t=Date.now()/1e3,jf(e,"manifest"),e.h){u.u(2);break}return T(u,e.l.start(e.N,e.eb),3);case 3:e.h=u.h;case 2:return e.va.resolve(),n=new G("manifestparsed",void 0),T(u,Promise.resolve(),4);case 4:if(e.dispatchEvent(n),e.h.variants.length==0)throw new M(2,4,4036);if(vA(e.h),i=_g(e.F,e.h),!i){u.u(5);break}return r=new G("trackschanged",void 0),T(u,Promise.resolve(),6);case 6:Vi(e),e.dispatchEvent(r);case 5:o=Date.now()/1e3,s=o-t,e.ba.I=s,K(u)}})}function qm(e,t){var n,i,r,o;return k(function(s){switch(s.g){case 1:return!e.h||e.i?s.return():(jf(e,"drm-engine"),e.Ka=Date.now()/1e3,e.i=e.ab(),e.F.h=e.i,e.i.configure(e.g.drm,function(){return e.B}),n=Vu(e.h.variants),i=!0,e.h&&e.h.presentationTimeline&&(i=e.h.presentationTimeline.V()),T(s,wg(e.i,n,e.h.offlineSessionIds,i),2));case 2:if(Vi(e),!t){s.u(3);break}return T(s,e.i.fc(t),4);case 4:Vi(e);case 3:return T(s,Og(e.F,e.h),5);case 5:if(r=s.h,!r){s.u(0);break}return o=new G("trackschanged",void 0),T(s,Promise.resolve(),7);case 7:e.dispatchEvent(o),K(s)}})}d.configure=function(e,t){e=Ea(e,t),xi(this.g,e)},d.getConfiguration=function(){return Pn(this.g)};function gA(e){var t,n,i,r,o,s;return k(function(u){if(e.A||(e.A=e.g.adaptationSetCriteriaFactory(),e.A.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredVariantRole,channelCount:e.g.preferredAudioChannelCount,Ec:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,Jc:e.g.preferredAudioLabel,Ed:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Gd:"",Fe:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount})),e.Za&&(t=e.g.abrFactory,e.C=t,e.j=t(),e.j.configure(e.g.abr)),n=$m(e),!n||e.h.variants.length!=1&&e.h.type!="HLS")return u.u(0);for(i=[],r=g([n.video,n.audio]),o=r.next();!o.done;o=r.next())(s=o.value)&&!s.segmentIndex&&i.push(s.createSegmentIndex());return 0<i.length?T(u,Promise.all(i),0):u.u(0)})}function mA(e){var t,n,i,r;return k(function(o){return t=$m(e),t?(n=e.h.presentationTimeline.V(),i=[],e.K=t,t.video&&i.push(Uf(e,t.video,n)),t.audio&&i.push(Uf(e,t.audio,n)),(r=Wr(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&rg(t.audio,r,e.g)&&(i.push(Uf(e,r,n)),e.U=r),T(o,Promise.all(i),0)):o.u(0)})}function $m(e){var t=Vu(e.h.variants);return t=e.A.create(t),e.j.configure(e.g.abr),e.j.setVariants(Array.from(t.values())),e.j.chooseVariant()}function Uf(e,t,n){var i,r,o,s,u;return k(function(a){return a.g==1?(i=e.g.streaming.segmentPrefetchLimit||2,r=new va(i,t,function(l,c,f){return xa(l,c,f||null,e.g.streaming.retryParameters,e.Oa,e.B)},!1),e.M.set(t.id,r),t.segmentIndex?a.u(2):T(a,t.createSegmentIndex(),2)):(o=typeof e.m=="number"?e.m:0,s=t.segmentIndex.Wb(o),u=null,s&&(u=s.current(),u||(u=s.next().value)),u||(u=Gn(t.segmentIndex)),u?n?u.Y?T(a,Nm(r,u.Y),0):a.u(0):T(a,As(r,u.startTime),0):a.u(0))})}d.fl=function(){return this.s},d.destroy=function(){var e=this,t,n,i;return k(function(r){switch(r.g){case 1:if(e.o=!0,!e.l||e.wa){r.u(2);break}return T(r,e.l.stop(),2);case 2:if(!e.j||e.ha){r.u(4);break}return T(r,e.j.stop(),4);case 4:if(e.H&&!e.ya&&e.H.release(),!e.i||e.na){r.u(6);break}return T(r,e.i.destroy(),6);case 6:if(0<e.M.size&&!e.za)for(t=g(e.M.values()),n=t.next();!n.done;n=t.next())i=n.value,Kn(i);K(r)}})};function vA(e){function t(n){return n.video&&n.audio||n.video&&n.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}W("shaka.media.PreloadManager",Tn),Tn.prototype.destroy=Tn.prototype.destroy,Tn.prototype.waitForFinish=Tn.prototype.fl,Tn.prototype.getPrefetchedTextTrack=Tn.prototype.Lj,Tn.prototype.getPrefetchedVariantTrack=Tn.prototype.Mj;function Ar(e,t){De.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{gd:null,fd:vo,Sc:function(i,r){return Si(n,"enter",i,r)}},{gd:Rs,fd:vo,Sc:function(i,r){return Si(n,"enter",i,r)}},{gd:Ps,fd:vo,Sc:function(i,r){return Si(n,"enter",i,r)}},{gd:vo,fd:Rs,Sc:function(i,r){return Si(n,"exit",i,r)}},{gd:vo,fd:Ps,Sc:function(i,r){return Si(n,"exit",i,r)}},{gd:Rs,fd:Ps,Sc:function(i,r){r?Si(n,"skip",i,r):(Si(n,"enter",i,r),Si(n,"exit",i,r))}},{gd:Ps,fd:Rs,Sc:function(i,r){return Si(n,"skip",i,r)}}],this.h=new Me,this.h.D(this.i,"regionremove",function(i){n.g.delete(i.region)})}et(Ar,De),Ar.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,De.prototype.release.call(this)},Ar.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=g(this.i.h.values()),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),o=e<i.startTime?Rs:e>i.endTime?Ps:vo;this.g.set(i,o);for(var s=g(this.m),u=s.next();!u.done;u=s.next())u=u.value,u.gd==r&&u.fd==o&&u.Sc(i,t)}}};function Si(e,t,n,i){t=new G(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}var Rs=1,vo=2,Ps=3;function Er(e,t,n){var i,r,o,s,u,a,l;return k(function(c){switch(c.g){case 1:var f=new nt(e).ob.split("/").pop().split(".");return i=f.length==1?"":f.pop().toLowerCase(),(r=yA.get(i))?c.return(r):(o=0,s=lt([e],n),ue(c,2),s.method="HEAD",T(c,t.request(o,s).promise,4));case 4:u=c.h,r=u.headers["content-type"],ce(c,3);break;case 2:if(a=ae(c),!a||a.code!=1002&&a.code!=1001){c.u(3);break}return s.method="GET",T(c,t.request(o,s).promise,6);case 6:l=c.h,r=l.headers["content-type"];case 3:return c.return(r?r.toLowerCase().split(";").shift():"")}})}var yA=new Map().set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv","text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");/*
|
|
43
|
+
@license
|
|
44
|
+
Copyright 2013 Ali Al Dallal
|
|
45
|
+
|
|
46
|
+
Licensed under the MIT license.
|
|
47
|
+
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
49
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
50
|
+
in the Software without restriction, including without limitation the rights
|
|
51
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
52
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
53
|
+
furnished to do so, subject to the following conditions:
|
|
54
|
+
|
|
55
|
+
The above copyright notice and this permission notice shall be included in
|
|
56
|
+
all copies or substantial portions of the Software.
|
|
57
|
+
|
|
58
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
59
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
60
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
61
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
62
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
63
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
64
|
+
SOFTWARE.
|
|
65
|
+
*/for(var Hi={ach:"Lwo",ady:"Адыгэбзэ",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"Tɕɥi",ar:"العربية","ar-AR":"العربية","ar-MA":"العربية","ar-SA":"العربية (السعودية)","ay-BO":"Aymar aru",az:"Azərbaycan dili","az-AZ":"Azərbaycan dili","be-BY":"Беларуская",bg:"Български","bg-BG":"Български",bn:"বাংলা","bn-IN":"বাংলা (ভারত)","bn-BD":"বাংলা(বাংলাদেশ)","bs-BA":"Bosanski",ca:"Català","ca-ES":"Català",cak:"Maya Kaqchikel","ck-US":"ᏣᎳᎩ (tsalagi)",cs:"Čeština","cs-CZ":"Čeština",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (Österreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserbšćina",el:"Ελληνικά","el-GR":"Ελληνικά",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)","en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Español","es-AR":"Español (Argentine)","es-419":"Español (Latinoamérica)","es-CL":"Español (Chile)","es-CO":"Español (Colombia)","es-EC":"Español (Ecuador)","es-ES":"Español (España)","es-LA":"Español (Latinoamérica)","es-NI":"Español (Nicaragua)","es-MX":"Español (México)","es-US":"Español (Estados Unidos)","es-VE":"Español (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"فارسی","fa-IR":"فارسی","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"Føroyskt",fr:"Français","fr-CA":"Français (Canada)","fr-FR":"Français (France)","fr-BE":"Français (Belgique)","fr-CH":"Français (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Avañe'ẽ","gu-IN":"ગુજરાતી","gx-GR":"Ἑλληνική ἀρχαία",he:"עברית","he-IL":"עברית",hi:"हिन्दी","hi-IN":"हिन्दी",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserbšćina",ht:"Kreyòl",hu:"Magyar","hu-HU":"Magyar","hy-AM":"Հայերեն",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"Íslenska","is-IS":"Íslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"日本語","ja-JP":"日本語","jv-ID":"Basa Jawa","ka-GE":"ქართული","kk-KZ":"Қазақша",km:"ភាសាខ្មែរ","km-KH":"ភាសាខ្មែរ",kab:"Taqbaylit",kn:"ಕನ್ನಡ","kn-IN":"ಕನ್ನಡ (India)",ko:"한국어","ko-KR":"한국어 (韩国)",ku:"Kurdî","ku-TR":"Kurdî",la:"Latin","la-VA":"Latin",lb:"Lëtzebuergesch","li-NL":"Lèmbörgs",lt:"Lietuvių","lt-LT":"Lietuvių",lv:"Latviešu","lv-LV":"Latviešu",mai:"मैथिली, মৈথিলী","mg-MG":"Malagasy",mk:"Македонски","mk-MK":"Македонски (Македонски)",ml:"മലയാളം","ml-IN":"മലയാളം","mn-MN":"Монгол",mr:"मराठी","mr-IN":"मराठी",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"ဗမာစကာ",nb:"Norsk (bokmål)","nb-NO":"Norsk (bokmål)",ne:"नेपाली","ne-NP":"नेपाली",nl:"Nederlands","nl-BE":"Nederlands (België)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"ଓଡ଼ିଆ",pa:"ਪੰਜਾਬੀ","pa-IN":"ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)",pl:"Polski","pl-PL":"Polski","ps-AF":"پښتو",pt:"Português","pt-BR":"Português (Brasil)","pt-PT":"Português (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Română","ro-RO":"Română",ru:"Русский","ru-RU":"Русский","sa-IN":"संस्कृतम्","se-NO":"Davvisámegiella","si-LK":"පළාත",sk:"Slovenčina","sk-SK":"Slovenčina (Slovakia)",sl:"Slovenščina","sl-SI":"Slovenščina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"Српски","sr-RS":"Српски (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"தமிழ்","ta-IN":"தமிழ்",te:"తెలుగు","te-IN":"తెలుగు",tg:"забо́ни тоҷикӣ́","tg-TJ":"тоҷикӣ",th:"ภาษาไทย","th-TH":"ภาษาไทย (ประเทศไทย)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"Türkçe","tr-TR":"Türkçe","tt-RU":"татарча",uk:"Українська","uk-UA":"Українська",ur:"اردو","ur-PK":"اردو",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Tiếng Việt","vi-VN":"Tiếng Việt","xh-ZA":"isiXhosa",yi:"ייִדיש","yi-DE":"ייִדיש (German)",zh:"中文","zh-HANS":"中文简体","zh-HANT":"中文繁體","zh-CN":"中文(中国)","zh-HK":"中文(香港)","zh-SG":"中文(新加坡)","zh-TW":"中文(台灣)","zu-ZA":"isiZulu"},Qm=g(Object.keys(Hi)),Of=Qm.next();!Of.done;Of=Qm.next()){var Jm=Of.value;Hi[Jm.toLowerCase()]=Hi[Jm]}function Zm(e,t){if(e.lineBreak)return`
|
|
66
|
+
`;if(e.nestedCues.length)return e.nestedCues.map(function(s){return Zm(s,e)}).join("");if(!e.payload)return e.payload;var n=[],i=e.fontWeight>=Hr,r=e.fontStyle==Gr,o=e.textDecoration.includes(fi);return i&&n.push(["b"]),r&&n.push(["i"]),o&&n.push(["u"]),r=e.color,r==""&&t&&(r=t.color),i="",(r=ev(r))&&(i+="."+r),r=e.backgroundColor,r==""&&t&&(r=t.backgroundColor),(t=ev(r))&&(i+=".bg_"+t),i&&n.push(["c",i]),n.reduceRight(function(s,u){var a=g(u);return u=a.next().value,a=a.next().value,"<"+u+(a===void 0?"":a)+">"+s+"</"+u+">"},e.payload)}function ev(e){e=e.toLowerCase();var t=e.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(parseInt(t[1],10)|256).toString(16).slice(1)+(parseInt(t[2],10)|256).toString(16).slice(1)+(parseInt(t[3],10)|256).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function _f(e,t){var n=[];e=g(tv(e));for(var i=e.next();!i.done;i=e.next())if(i=i.value,i.isContainer)n.push.apply(n,H(_f(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=Zm(i,t),n.push(r)}return n}function tv(e){var t=[];e=g(e);for(var n=e.next(),i={};!n.done;i={ig:void 0},n=e.next())i.ig=n.value,t.some(function(r){return function(o){return Ru(r.ig,o)}}(i))||t.push(i.ig);return t}function TA(e){function t(i){for(var r=5381,o=i.length;o;)r=33*r^i.charCodeAt(--o);return(r>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch{}return e.textAlign=="center"&&n.align!="center"&&(n.align="middle"),e.writingMode=="vertical-lr"?n.vertical="lr":e.writingMode=="vertical-rl"&&(n.vertical="rl"),e.lineInterpretation==1&&(n.snapToLines=!1),e.line!=null&&(n.line=e.line),e.position!=null&&(n.position=e.position),n}function nv(e,t){var n=_f(t),i=[];t=e.cues?Array.from(e.cues):[],n=g(n);for(var r=n.next(),o={};!r.done;o={pd:void 0},r=n.next())o.pd=r.value,!t.some(function(s){return function(u){return u.startTime==s.pd.startTime&&u.endTime==s.pd.endTime&&u.text==s.pd.payload}}(o))&&o.pd.payload&&(r=TA(o.pd))&&i.push(r);for(t=i.slice().sort(function(s,u){return s.startTime!=u.startTime?s.startTime-u.startTime:s.endTime!=u.endTime?s.endTime-u.startTime:"line"in VTTCue.prototype?i.indexOf(u)-i.indexOf(s):i.indexOf(s)-i.indexOf(u)}),t=g(t),n=t.next();!n.done;n=t.next())e.addCue(n.value)}function bf(e,t){var n=!1;e.mode==="disabled"&&(n=!0,e.mode="hidden");for(var i=0;i<e.cues.length;){var r=e.cues[i];t(r)?e.removeCue(r):i++}n&&(e.mode="disabled")}function ct(e){var t=this;this.i=e,this.l=new Me,this.j=null,this.h=new Map,this.g=-1,this.s=!1,this.o=null,this.B=function(){t.l.Ja(t.i,"textchanged",t.m),t.l.Ja(t.j.textTracks,"change",t.A);for(var n=g(t.h.values()),i=n.next();!i.done;i=n.next())i.value.remove();t.h.clear(),t.g=-1,t.j=null},this.m=function(){var n=new Map,i=t.i.Dc();i=g(i);for(var r=i.next();!r.done;r=i.next()){if(r=r.value,t.h.has(r.id)){var o=t.h.get(r.id);r.active||o.track.mode==="disabled"||(o.track.mode="disabled"),t.h.delete(r.id)}else{o=t.j.ownerDocument.createElement("track"),o.kind=xA(r);var s=o,u=void 0;if(r.label)u=r.label;else if(r.language)if(r.language in Hi)u=Hi[r.language];else{var a=Uu(r.language);a in Hi&&(u=Hi[a]+" ("+r.language+")")}u||(u=r.originalTextId,r.language&&r.language!==r.originalTextId&&(u+=" ("+r.language+")")),s.label=u,r.language in Hi&&(o.srclang=r.language),ye().Da()==="CHROMIUM"&&(o.src="data:,WEBVTT"),o.track.mode="disabled",t.j.appendChild(o)}n.set(r.id,o),r.active&&(t.g=r.id)}for(i=g(t.h.values()),r=i.next();!r.done;r=i.next())r.value.remove();-1<t.g&&(n.has(t.g)?(i=n.get(t.g).track,i.mode==="disabled"&&(i.mode=t.s?"showing":"hidden")):t.g=-1),t.h=n},this.A=function(){if(!t.o){var n=t.j;t.o=new Te(function(){if(t.o=null,t.j===n){var i=-1,r=!1;if(t.h.has(t.g)){var o=t.h.get(t.g);o.track.mode==="showing"?(i=t.g,r=!0):o.track.mode==="hidden"&&(i=t.g)}if(!r)for(r=g(t.h),o=r.next();!o.done;o=r.next()){var s=g(o.value);if(o=s.next().value,s=s.next().value,s.track.mode==="showing"){i=o;break}else 0>i&&s.track.mode==="hidden"&&(i=o)}for(r=g(t.h),o=r.next();!o.done;o=r.next())s=g(o.value),o=s.next().value,s=s.next().value,o!==i&&s.track.mode!=="disabled"&&(s.track.mode="disabled");t.g!==i&&(t.g=i,-1<i&&t.i.jh({id:i})),t.i.oh(-1<i&&t.h.get(i).track.mode==="showing")}}).ia(0)}},this.l.D(e,"loaded",function(){return t.enableTextDisplayer()}),this.enableTextDisplayer()}d=ct.prototype,d.configure=function(){},d.remove=function(e,t){if(this.i)this.h.has(this.g)&&bf(this.h.get(this.g).track,function(n){return n.startTime<t&&n.endTime>e});else return!1;return!0},d.append=function(e){this.h.has(this.g)&&nv(this.h.get(this.g).track,e)},d.destroy=function(){return this.i&&(this.j&&this.B(),this.i=null),this.l&&(this.l.release(),this.l=null),Promise.resolve()},d.isTextVisible=function(){return this.s},d.setTextVisibility=function(e){if(this.s=e,this.h.has(this.g)){var t=this.h.get(this.g).track;t.mode!=="disabled"&&(e=e?"showing":"hidden",t.mode!==e&&(t.mode=e))}else if(this.i&&this.i.m===3)if(t=Array.from(this.i.h.textTracks).filter(function(i){return["captions","subtitles","forced"].includes(i.kind)}),e){e=null,t=g(t);for(var n=t.next();!n.done;n=t.next())if(n=n.value,n.mode==="showing"){e=null;break}else e||n.mode!=="hidden"||(e=n);e&&(e.mode="showing")}else for(e=g(t),t=e.next();!t.done;t=e.next())t=t.value,t.mode==="showing"&&(t.mode="hidden")},d.setTextLanguage=function(){},d.enableTextDisplayer=function(){!this.j&&this.i&&this.i.m===2&&(this.j=this.i.h,this.l.Aa(this.i,"unloading",this.B),this.l.D(this.i,"textchanged",this.m),this.l.D(this.j.textTracks,"change",this.A),this.m())};function xA(e){var t=ye();return e.forced&&t.Da()==="WEBKIT"?"forced":e.kind==="caption"||e.roles&&e.roles.some(function(n){return n.includes("transcribes-spoken-dialog")})&&e.roles.some(function(n){return n.includes("describes-music-and-sound")})?"captions":"subtitles"}W("shaka.text.NativeTextDisplayer",ct),ct.prototype.enableTextDisplayer=ct.prototype.enableTextDisplayer,ct.prototype.setTextLanguage=ct.prototype.setTextLanguage,ct.prototype.setTextVisibility=ct.prototype.setTextVisibility,ct.prototype.isTextVisible=ct.prototype.isTextVisible,ct.prototype.destroy=ct.prototype.destroy,ct.prototype.append=ct.prototype.append,ct.prototype.remove=ct.prototype.remove,ct.prototype.configure=ct.prototype.configure;function Ct(e,t){for(Ee("SimpleTextDisplayer","Please migrate to NativeTextDisplayer"),this.h=e,this.i=t,this.g=null,e=g(Array.from(this.h.textTracks)),t=e.next();!t.done;t=e.next())t=t.value,t.kind!=="metadata"&&t.kind!=="chapters"&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}d=Ct.prototype,d.configure=function(){},d.remove=function(e,t){return this.g?(bf(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0):!1},d.append=function(e){this.g&&nv(this.g,e)},d.destroy=function(){return this.g&&(bf(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},d.isTextVisible=function(){return this.g?this.g.mode=="showing":!1},d.setTextVisibility=function(e){e&&!this.g&&iv(this),this.g&&(this.g.mode=e?"showing":"hidden")},d.setTextLanguage=function(){},d.enableTextDisplayer=function(){iv(this)};function iv(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}W("shaka.text.SimpleTextDisplayer",Ct),Ct.prototype.enableTextDisplayer=Ct.prototype.enableTextDisplayer,Ct.prototype.setTextLanguage=Ct.prototype.setTextLanguage,Ct.prototype.setTextVisibility=Ct.prototype.setTextVisibility,Ct.prototype.isTextVisible=Ct.prototype.isTextVisible,Ct.prototype.destroy=Ct.prototype.destroy,Ct.prototype.append=Ct.prototype.append,Ct.prototype.remove=Ct.prototype.remove,Ct.prototype.configure=Ct.prototype.configure;function Mt(){}d=Mt.prototype,d.configure=function(){},d.remove=function(){},d.append=function(){},d.destroy=function(){},d.isTextVisible=function(){return!1},d.setTextVisibility=function(){},d.setTextLanguage=function(){},d.enableTextDisplayer=function(){},W("shaka.text.StubTextDisplayer",Mt),Mt.prototype.enableTextDisplayer=Mt.prototype.enableTextDisplayer,Mt.prototype.setTextLanguage=Mt.prototype.setTextLanguage,Mt.prototype.setTextVisibility=Mt.prototype.setTextVisibility,Mt.prototype.isTextVisible=Mt.prototype.isTextVisible,Mt.prototype.destroy=Mt.prototype.destroy,Mt.prototype.append=Mt.prototype.append,Mt.prototype.remove=Mt.prototype.remove,Mt.prototype.configure=Mt.prototype.configure;function kt(e,t){var n=this;this.m=!1,this.h=[],this.j=e,this.o=t,this.B=this.s=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.A=new Te(function(){n.j.paused||Gi(n)}),Ls(this),this.l=new Map,this.i=new Me,this.i.D(document,"fullscreenchange",function(){Gi(n,!0)}),this.i.D(this.j,"seeking",function(){Gi(n,!0)}),this.i.D(this.j,"ratechange",function(){Ls(n)}),this.i.D(this.j,"resize",function(){var i=n.j,r=i.videoWidth;i=i.videoHeight,r&&i?n.s=r/i:n.s=null}),this.C=null,"ResizeObserver"in F&&(this.C=new ResizeObserver(function(){Gi(n,!0)}),this.C.observe(this.g)),this.F=new Map}d=kt.prototype,d.configure=function(e){this.B=e,Ls(this),Gi(this,!0)},d.append=function(e){var t=[].concat(H(this.h));e=g(tv(e));for(var n=e.next(),i={};!n.done;i={jg:void 0},n=e.next())i.jg=n.value,t.some(function(r){return function(o){return Ru(o,r.jg)}}(i))||this.h.push(i.jg);this.h.length&&Ls(this),Gi(this)},d.destroy=function(){return this.g&&(this.g.parentElement&&this.o.removeChild(this.g),this.g=null,this.m=!1,this.h=[],this.A&&(this.A.stop(),this.A=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.C&&(this.C.disconnect(),this.C=null)),Promise.resolve()},d.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(i){return i.startTime<e||i.endTime>=t}),Gi(this,n>this.h.length),this.h.length||Ls(this),!0},d.isTextVisible=function(){return this.m},d.setTextVisibility=function(e){(this.m=e)?(this.g.parentElement||this.o.appendChild(this.g),Gi(this,!0)):this.g.parentElement&&this.o.removeChild(this.g)},d.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},d.enableTextDisplayer=function(){};function Ls(e){e.A&&(e.h.length?e.A.Fa((e.B?e.B.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.A.stop())}function SA(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function rv(e,t,n,i,r){var o=!1,s=[],u=[];t=g(t);for(var a=t.next();!a.done;a=t.next()){a=a.value,r.push(a);var l=e.l.get(a),c=a.startTime<=i&&a.endTime>i,f=l?l.aj:null;l&&(s.push(l.kg),l.Xc&&s.push(l.Xc),c||(o=!0,e.l.delete(a),l=null)),c&&(u.push(a),l?SA(e,f)||(o=!0):(wA(e,a,r),l=e.l.get(a),f=l.aj,o=!0)),0<a.nestedCues.length&&f&&rv(e,a.nestedCues,f,i,r),r.pop()}if(o){for(i=g(s),r=i.next();!r.done;r=i.next())r=r.value,r.parentElement&&r.parentElement.removeChild(r);for(u.sort(function(p,h){return p.startTime!=h.startTime?p.startTime-h.startTime:p.endTime-h.endTime}),u=g(u),i=u.next();!i.done;i=u.next())i=e.l.get(i.value),i.Xc?(i.Xc.contains(n)&&i.Xc.removeChild(n),n.appendChild(i.Xc),i.Xc.appendChild(i.kg)):n.appendChild(i.kg)}}function Gi(e,t){if(e.g){var n=e.j.currentTime;if(!e.m||t!==void 0&&t){t=g(e.F.values());for(var i=t.next();!i.done;i=t.next())ys(i.value);ys(e.g),e.l.clear(),e.F.clear()}e.m&&rv(e,e.h,e.g,n,[])}}function wA(e,t,n){var i=1<n.length,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&0<t.nestedCues.length;var o=document.createElement(r);if(r!="br"&&EA(e,o,t,n,i),n=null,t.region&&t.region.id){var s=t.region,u=e.s===4/3?2.5:1.9;if(n=s.id+"_"+s.width+"x"+s.height+(s.heightUnits==qt?"%":"px")+"-"+s.viewportAnchorX+"x"+s.viewportAnchorY+(s.viewportAnchorUnits==qt?"%":"px"),e.F.has(n))n=e.F.get(n);else{r=document.createElement("span");var a=s.heightUnits==qt?"%":"px",l=s.widthUnits==qt?"%":"px",c=s.viewportAnchorUnits==qt?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var f=s.height,p=s.width;s.heightUnits===2&&(f=5.33*s.height,a="%"),s.widthUnits===2&&(p=s.width*u,l="%"),r.style.height=f+a,r.style.width=p+l,s.viewportAnchorUnits===2?(u=s.viewportAnchorY/75*100,a=s.viewportAnchorX/(e.s===4/3?160:210)*100,u-=s.regionAnchorY*f/100,a-=s.regionAnchorX*p/100,r.style.top=u+"%",r.style.left=a+"%"):(r.style.top=s.viewportAnchorY-s.regionAnchorY*f/100+c,r.style.left=s.viewportAnchorX-s.regionAnchorX*p/100+c),s.heightUnits!==0&&s.widthUnits!==0&&s.viewportAnchorUnits!==0&&(s=Math.max(0,Math.min(100-(parseInt(r.style.width.slice(0,-1),10)||0),parseInt(r.style.left.slice(0,-1),10)||0)),r.style.top=Math.max(0,Math.min(100-(parseInt(r.style.height.slice(0,-1),10)||0),parseInt(r.style.top.slice(0,-1),10)||0))+"%",r.style.left=s+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent=t.displayAlign=="before"?"flex-start":t.displayAlign=="center"?"center":"flex-end",e.F.set(n,r),n=r}}r=o,i&&(r=document.createElement("span"),r.classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",o.appendChild(r)),e.l.set(t,{kg:o,aj:r,Xc:n})}function AA(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==Lu?n:e==="left"||e==="start"&&t===Jo||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===Jo?"line-right":"center"}function EA(e,t,n,i,r){var o=t.style,s=n.nestedCues.length==0,u=1<i.length;o.whiteSpace="pre-wrap";var a=n.payload.replace(/\s+$/g,function(c){return" ".repeat(c.length)});if(o.webkitTextStrokeColor=n.textStrokeColor,o.webkitTextStrokeWidth=n.textStrokeWidth,o.color=n.color,o.direction=n.direction,o.opacity=n.opacity,o.paddingLeft=Ff(n.linePadding,n,e.o),o.paddingRight=Ff(n.linePadding,n,e.o),o.textCombineUpright=n.textCombineUpright,o.textShadow=n.textShadow,n.backgroundImage)o.backgroundImage="url('"+n.backgroundImage+"')",o.backgroundRepeat="no-repeat",o.backgroundSize="contain",o.backgroundPosition="center",n.backgroundColor&&(o.backgroundColor=n.backgroundColor),o.width="100%",o.height="100%";else{if(n.nestedCues.length)var l=t;else l=document.createElement("span"),t.appendChild(l);n.border&&(l.style.border=n.border),r||((t=IA(i,function(c){return c.backgroundColor}))?l.style.backgroundColor=t:a&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)")),a&&(l.setAttribute("translate","no"),l.textContent=a)}u&&!i[i.length-1].isContainer?o.display="inline":(o.display="flex",o.flexDirection="column",o.alignItems="center",n.textAlign=="left"||n.textAlign=="start"?(o.width="100%",o.alignItems="start"):(n.textAlign=="right"||n.textAlign=="end")&&(o.width="100%",o.alignItems="end"),o.justifyContent=n.displayAlign=="before"?"flex-start":n.displayAlign=="center"?"center":"flex-end"),s||(o.margin="0"),o.fontFamily=n.fontFamily,o.fontWeight=n.fontWeight.toString(),o.fontStyle=n.fontStyle,o.letterSpacing=n.letterSpacing,o.fontSize=Ff(n.fontSize,n,e.o,e.B?e.B.fontScaleFactor:1),i=n.line,i!=null&&(s=n.lineInterpretation,s==Zo&&(s=1,u=16,e.s&&1>e.s&&(u=32),i=0>i?100+i/u*100:i/u*100),s==1&&(o.position="absolute",n.writingMode==cr?(o.width="100%",n.lineAlign==fr?o.top=i+"%":n.lineAlign=="end"&&(o.bottom=100-i+"%")):n.writingMode=="vertical-lr"?(o.height="100%",n.lineAlign==fr?o.left=i+"%":n.lineAlign=="end"&&(o.right=100-i+"%")):(o.height="100%",n.lineAlign==fr?o.right=i+"%":n.lineAlign=="end"&&(o.left=100-i+"%")))),o.lineHeight=n.lineHeight,e=AA(n),e=="line-left"?(o.cssFloat="left",n.position!==null&&(o.position="absolute",n.writingMode==cr?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%")):e=="line-right"?(o.cssFloat="right",n.position!==null&&(o.position="absolute",n.writingMode==cr?(o.right=100-n.position+"%",o.width="auto"):o.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(o.position="absolute",n.writingMode==cr?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%"),o.textAlign=n.textAlign,o.textDecoration=n.textDecoration.join(" "),o.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&o.writingMode==n.writingMode||(o.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==cr?o.width=n.size+"%":o.height=n.size+"%")}function Ff(e,t,n,i){i=i===void 0?1:i;var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;switch(e=r.unit,i*=r.value,e){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return i+e}}function IA(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||i===0)return i}return null}W("shaka.text.UITextDisplayer",kt),kt.prototype.enableTextDisplayer=kt.prototype.enableTextDisplayer,kt.prototype.setTextLanguage=kt.prototype.setTextLanguage,kt.prototype.setTextVisibility=kt.prototype.setTextVisibility,kt.prototype.isTextVisible=kt.prototype.isTextVisible,kt.prototype.remove=kt.prototype.remove,kt.prototype.destroy=kt.prototype.destroy,kt.prototype.append=kt.prototype.append,kt.prototype.configure=kt.prototype.configure;function CA(e,t){function n(o){for(var s=o,u=g(t),a=u.next();!a.done;a=u.next())a=a.value,a.end&&a.start<o&&(s+=a.end-a.start);return o=Math.floor(s/3600),u=Math.floor(s/60%60),a=Math.floor(s%60),s=Math.floor(1e3*s%1e3),(10>o?"0":"")+o+":"+(10>u?"0":"")+u+":"+(10>a?"0":"")+a+"."+(100>s?10>s?"00":"0":"")+s}var i=_f(e);e=`WEBVTT
|
|
67
|
+
|
|
68
|
+
`,i=g(i);for(var r=i.next();!r.done;r=i.next())r=r.value,e+=n(r.startTime)+" --> "+n(r.endTime)+function(o){var s=[];switch(o.textAlign){case"left":s.push("align:left");break;case"right":s.push("align:right");break;case Qn:s.push("align:middle");break;case"start":s.push("align:start");break;case"end":s.push("align:end")}switch(o.writingMode){case"vertical-lr":s.push("vertical:lr");break;case"vertical-rl":s.push("vertical:rl")}return s.length?" "+s.join(" "):""}(r)+`
|
|
69
|
+
`,e+=r.payload+`
|
|
70
|
+
|
|
71
|
+
`;return e}W("shaka.text.WebVttGenerator",function(){});function Bf(e,t){this.h=e,this.g=t,this.i=void 0,this.s=!1,this.F=!0,this.l=this.B=!1,this.o=this.m=void 0,this.A=0,this.G=!1,this.C=new Me,this.j=null}Bf.prototype.setMediaElement=function(e){this.j=e,PA(this)},Bf.prototype.configure=function(e){this.g=e};function MA(e){e.s=!1,e.F=!0,e.B=!1,e.l=!1,e.m=0,e.o=0,e.A=0,e.G=!1,e.j=null,e.C.Ra()}function kA(e,t){e.l=t,e.l?e.i==Oa?e.i=_a:e.i==ba&&(e.i=Fa):e.i==_a?e.i=Oa:e.i==Fa&&(e.i=ba)}function DA(e,t){if(e.g&&e.g.enabled&&e.g.version==uv&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.A=t}).catch(function(){e.A=0})}}function RA(e,t,n){try{if(!e.g.enabled)return t;var i=Vf(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var r=La;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=ja;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r=sv;break e}r=void 0}i.ot=r,i.su=!0;var o=Pa(i);return Hf(t,o)}catch(s){return tr("CMCD_SRC_ERROR","Could not generate src CMCD data.",s),t}}function PA(e){e.C.Aa(e.j,"play",function(){e.m||(e.m=Date.now())}),e.C.Aa(e.j,"playing",function(){e.o||(e.o=Date.now())})}function Vf(e){return e.g.sessionId||(e.g.sessionId=F.crypto.randomUUID()),{v:e.g.version,sf:e.i,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.h.getBandwidthEstimate()/1e3}}function yo(e,t,n){n=n===void 0?{}:n;var i=i===void 0?e.g.useHeaders:i;if(e.g.enabled)if(e=OA(e,n),i)i=_A(e),Object.keys(i).length&&Object.assign(t.headers,i);else{var r=Pa(e);r&&(t.uris=t.uris.map(function(o){return Hf(o,r)}))}}function LA(e,t){var n=e.g.includeKeys;return n.length?Object.keys(t).reduce(function(i,r){return n.includes(r)&&(i[r]=t[r]),i},{}):t}function NA(e){if(e.type===0)return bA;if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?ja:Na;if(t=="audio")return La;if(t=="text")return e.mimeType==="application/mp4"?Ua:Gf}}function jA(e,t){if(t=e.h.Nb()[t],!t.length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):NaN}function ov(e,t){if(t=e.h.Nb()[t],!t.length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):0}function UA(e,t){var n=e.h.Qb();if(!n.length)return NaN;e=n[0],n=g(n);for(var i=n.next();!i.done;i=n.next())i=i.value,i.type==="variant"&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case Na:return e.videoBandwidth||NaN;case La:return e.audioBandwidth||NaN;default:return e.bandwidth}}function OA(e,t){t=t===void 0?{}:t,Object.assign(t,Vf(e)),t.pr=e.h.ub();var n=t.ot===Na||t.ot===ja;return e.B&&n&&(t.bs=!0,t.su=!0,e.B=!1),t.su==null&&(t.su=e.F),t.v===uv&&(e.h.V()&&(t.ltc=e.h.Ue()),n=!e.G&&e.o&&e.m?e.o-(e.A||e.m):void 0,n!=null&&(t.msd=n,e.G=!0)),LA(e,t)}function Pa(e){function t(f){return 100*n(f/100)}function n(f){return Math.round(f)}function i(f){return!Number.isNaN(f)&&f!=null&&f!==""&&f!==!1}var r=[],o={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(f){return encodeURIComponent(f)},rtp:t,tb:n},s=Object.keys(e||{}).sort();s=g(s);for(var u=s.next();!u.done;u=s.next()){u=u.value;var a=e[u];if(i(a)&&(u!=="v"||a!==1)&&(u!="pr"||a!==1)){var l=o[u];l&&(a=l(a)),l=typeof a;var c=void 0;c=l==="string"&&u!=="ot"&&u!=="sf"&&u!=="st"?u+"="+JSON.stringify(a):l==="boolean"?u:l==="symbol"?u+"="+a.description:u+"="+a,r.push(c)}}return r.join(",")}function _A(e){var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};t=g(t);for(var s=t.next();!s.done;s=t.next())s=s.value,r[o[s]!=null?o[s]:1][s]=e[s];for(e=0;e<r.length;e++)(o=Pa(r[e]))&&(n["CMCD-"+i[e]]=o);return n}function Hf(e,t){return!t||e.includes("offline:")?e:(e=new nt(e),e.g.set("CMCD",t),e.toString())}var sv="m",La="a",Na="v",ja="av",bA="i",Gf="c",Ua="tt",uv=2,Oa="d",_a="ld",ba="h",Fa="lh";W("shaka.util.CmcdManager.StreamingFormat",{DASH:Oa,Ml:_a,HLS:ba,Nl:Fa,am:"s",OTHER:"o"});function xn(e){this.h=e,this.g=null}d=xn.prototype,d.configure=function(e){this.h=e},d.Yh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(cv)?1e3*this.g.get(cv):null},d.Wh=function(){return this.h.enabled&&this.g&&this.g.has(lv)?1e3*this.g.get(lv):null},d.Oj=function(){return this.h.enabled&&this.g&&this.g.has(fv)?this.g.get(fv):null},d.Pj=function(){return this.h.enabled&&this.g&&this.g.has(dv)?this.g.get(dv):null},d.getBandwidthEstimate=function(e){var t=this.Wh();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e};function av(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}W("shaka.util.CmsdManager",xn),xn.prototype.getBandwidthEstimate=xn.prototype.getBandwidthEstimate,xn.prototype.getRoundTripTime=xn.prototype.Pj,xn.prototype.getResponseDelay=xn.prototype.Oj,xn.prototype.getEstimatedThroughput=xn.prototype.Wh,xn.prototype.getMaxBitrate=xn.prototype.Yh;var lv="etp",cv="mb",fv="rd",dv="rtt";function pv(){this.g=null,this.h=[]}function Kf(e,t){return k(function(n){if(n.g==1)return e.g?T(n,new Promise(function(i){return e.h.push(i)}),2):n.u(2);e.g=t,K(n)})}pv.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function _(e,t,n){t=t===void 0?null:t,De.call(this);var i=this;this.m=Xa,this.h=null,this.we=t,this.ba=!1,this.Be=new Me,this.pe=new Me,this.j=new Me,this.bc=new Me,this.wd=new Me,this.F=this.G=this.C=this.I=null,this.Ce=0,this.ka=new pv,this.N=this.ha=this.W=this.i=this.qc=this.H=this.l=this.le=this.S=this.Gh=this.va=this.L=this.ab=this.ya=this.me=this.P=this.Ka=this.K=this.Zb=null,this.Oa=!1,this.Za=this.s=null,this.ve=1e9,this.Ae=[],this.eb=[],this.Wf=-1,this.g=Xn(this),this.Yf=Xm(),this.U=null,this.Ee=-1,this.$b=null,this.wa={width:1/0,height:1/0},this.ue=new Kc(this.g,this.wa,null),this.ye=[],this.A=null,this.M=this.g.adaptationSetCriteriaFactory(),this.M.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:0,Ec:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Jc:this.g.preferredAudioLabel,Ed:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Gd:"",Fe:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount}),this.xd=this.g.preferredTextLanguage,this.se=this.g.preferredTextRole,this.re=this.g.preferForcedSubs,this.qe=[],n&&n(this),this.L=ZA(this),this.va=new xn(this.g.cmsd),this.I=xv(this),this.zd=this.na=this.za=this.B=null,this.$f=!1,this.Xf=[],this.Zf=new Te(function(){return k(function(r){if(r.g==1)return i.na?T(r,i.fc(i.zd,!0),3):r.u(0);if(r.g!=4)return T(r,i.load(i.na),4);i.$f?i.zd.pause():i.zd.play(),i.na=null,i.$f=!1,K(r)})}),Wa&&(this.B=Wa(),this.B.configure(this.g.ads),this.wd.D(this.B,"ad-content-pause-requested",function(r){var o;return k(function(s){if(s.g==1)return i.Zf.stop(),i.na?s.u(0):(i.zd=i.h,i.$f=i.Wd(),o=r.saveLivePosition||!1,T(s,i.Qh(!0,o),3));i.na=s.h,K(s)})}),this.wd.D(this.B,"ad-content-resume-requested",function(r){if(r=r.offset||0,i.na){var o=i.na;o.m&&r&&(typeof o.m=="number"?o.m+=r:o.m.setTime(o.m.getTime()+1e3*r))}i.Zf.ia(.1)}),this.wd.D(this.B,"ad-content-attach-requested",function(){return k(function(r){return i.h||!i.zd?r.u(0):T(r,i.fc(i.zd,!0),0)})})),za&&(this.za=za(this),this.za.configure(this.g.queue)),this.Be.D(F,"online",function(){Zf(i),i.eh()}),this.xe=new Te(function(){for(var r=Date.now()/1e3,o=!1,s=!0,u=g(i.i.variants),a=u.next();!a.done;a=u.next())a=a.value,0<a.disabledUntilTime&&a.disabledUntilTime<=r&&(a.disabledUntilTime=0,o=!0),0<a.disabledUntilTime&&(s=!1);s&&i.xe.stop(),o&&Ir(i,!1,void 0,!1,!1)}),this.Pa=null,e&&(Ee("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.fc(e,!0)),this.o=null}et(_,De);function Ba(e){e.S!=null&&(Sh(e.S),e.S.release(),e.S=null)}function FA(e,t,n){n||t.lcevc.enabled?(Ba(e),e.S==null&&(e.S=new Xo(e.h,e.Gh,t.lcevc,n),e.G&&(e.G.M=e.S))):Ba(e)}function be(e,t){return new G(e,t)}d=_.prototype,d.destroy=function(){var e=this,t;return k(function(n){switch(n.g){case 1:return e.m==Un?n.return():(Ba(e),t=e.detach(),e.m=Un,T(n,t,2));case 2:return T(n,e.ng(),3);case 3:if(e.Be&&(e.Be.release(),e.Be=null),e.pe&&(e.pe.release(),e.pe=null),e.j&&(e.j.release(),e.j=null),e.bc&&(e.bc.release(),e.bc=null),e.wd&&(e.wd.release(),e.wd=null),e.Za=null,e.g=null,e.A=null,e.we=null,e.L=null,e.va=null,!e.I){n.u(4);break}return T(n,e.I.destroy(),5);case 5:e.I=null;case 4:e.s&&(e.s.release(),e.s=null),e.za&&(e.za.destroy(),e.za=null),De.prototype.release.call(e),K(n)}})};function hv(e,t){Vv.set(e,t)}function To(e,t){e.dispatchEvent(be("onstatechange",new Map().set("state",t)))}d.fc=function(e,t){t=t===void 0?!0:t;var n=this,i,r,o;return k(function(s){switch(s.g){case 1:if(n.m==Un)throw new M(2,7,7e3);if(i=n.h&&n.h==e,!n.h||n.h==e){s.u(2);break}return T(s,n.detach(),2);case 2:return T(s,Xf(n,"attach"),4);case 4:if(s.h)return s.return();if(ue(s,5,6),i||(To(n,"attach"),r=function(){var u=ed(n,!1);u&&xo(n,u)},n.pe.D(e,"error",r),n.h=e,n.L&&n.L.setMediaElement(e)),ye(),!t||!Zn()||n.G){s.u(6);break}return T(s,zf(n),6);case 6:on(s),n.ka.release(),sn(s,0);break;case 5:return o=ae(s),T(s,n.detach(),10);case 10:throw o}})},d.fj=function(e){this.Gh=e},d.detach=function(e){e=e===void 0?!1:e;var t=this;return k(function(n){if(n.g==1){if(t.m==Un)throw new M(2,7,7e3);return T(n,t.vc(!1,e),2)}if(n.g!=3)return T(n,Xf(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.pe.Ra(),t.h=null),To(t,"detach"),t.B&&!e&&t.B.release()}finally{t.ka.release()}K(n)})};function Xf(e,t){var n;return k(function(i){return i.g==1?(n=++e.Ce,T(i,Kf(e.ka,t),2)):n!=e.Ce?(e.ka.release(),i.return(!0)):i.return(!1)})}d.vc=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,i,r,o,s,u,a,l,c,f,p,h,m,y;return k(function(v){switch(v.g){case 1:return n.m!=Un&&(n.m=Xa),T(v,Xf(n,"unload"),2);case 2:return v.h?v.return():(ii(v,3),n.Oa=!1,To(n,"unload"),Ba(n),i=n.qe.map(function(x){return x()}),n.qe=[],T(v,Promise.all(i),5));case 5:if(n.dispatchEvent(be("unloading")),n.me&&(n.me.release(),n.me=null),n.ya&&(n.ya.release(),n.ya=null),n.ab&&(n.ab.release(),n.ab=null),n.h&&(n.j.Ra(),n.bc.Ra()),n.xe.stop(),n.Zb&&(n.Zb.release(),n.Zb=null),n.Ka&&(n.Ka.stop(),n.Ka=null),!n.H){v.u(6);break}return T(v,n.H.stop(),7);case 7:n.H=null,n.qc=null;case 6:if(!n.s){v.u(8);break}return T(v,n.s.stop(),8);case 8:if(!n.l){v.u(10);break}return T(v,n.l.destroy(),11);case 11:n.l=null;case 10:if(n.K&&(n.K.release(),n.K=null),n.F&&(n.F.release(),n.F=null),F.shakaMediaKeysPolyfill!=="webkit"||!n.C){v.u(12);break}return T(v,n.C.destroy(),13);case 13:n.C=null;case 12:if(!n.G){v.u(14);break}return T(v,n.G.destroy(),15);case 15:n.G=null;case 14:if(n.B&&!t&&n.B.onAssetUnload(),n.na&&!t&&(n.na.destroy(),n.na=null),t||n.Zf.stop(),n.L&&MA(n.L),n.va&&(n.va.g=null),!n.o){v.u(16);break}return T(v,n.o.destroy(),17);case 17:n.o=null;case 16:if(n.ba=!1,n.h){for(r=g(n.Xf),o=r.next();!o.done;o=r.next())s=o.value,s.src.startsWith("blob:")&&URL.revokeObjectURL(s.src),s.remove();n.Xf=[],aa(n.h)&&n.h.load()}if(!n.C){v.u(18);break}return T(v,n.C.destroy(),19);case 19:n.C=null;case 18:if(n.Pa&&n.W!=n.Pa.nd()&&(n.Pa.o||n.Pa.destroy(),n.Pa=null),n.W=null,n.ha=null,n.P=null,n.i){for(u=g(n.i.variants),a=u.next();!a.done;a=u.next())for(l=a.value,c=g([l.audio,l.video]),f=c.next();!f.done;f=c.next())(p=f.value)&&p.segmentIndex&&p.segmentIndex.release();for(h=g(n.i.textStreams),m=h.next();!m.done;m=h.next())y=m.value,y.segmentIndex&&y.segmentIndex.release()}n.g&&n.g.streaming.clearDecodingCache&&(Hu.clear(),zr.clear()),n.i=null,n.A=new Ra,n.Fh=null,n.$b=null,n.U=null,n.Ee=-1,n.Ae=[],n.eb=[],n.Wf=-1,n.I&&n.I.Mh(),Ga(n);case 3:on(v),n.ka.release(),sn(v,4);break;case 4:if(ye(),e&&Zn()&&!n.G&&n.h)return T(v,zf(n),0);v.u(0)}})},d.cl=function(e){this.N=e},d.load=function(e,t,n){t=t===void 0?null:t;var i=this,r,o,s,u,a,l,c,f,p,h,m,y,v,x;return k(function(S){switch(S.g){case 1:if(i.m==Un)throw new M(2,7,7e3);if(r=null,o="",e instanceof Tn){if(e.o)throw new M(2,7,7006);r=e,o=r.nd()||""}else o=e||"";return T(S,Kf(i.ka,"load"),2);case 2:if(i.ka.release(),!i.h)throw new M(2,7,7002);if(!i.W){S.u(3);break}return i.W=o,T(S,i.vc(!1),3);case 3:if(s=++i.Ce,u=function(){return k(function(w){if(w.g==1)return i.Ce==s?w.u(0):r?T(w,r.destroy(),3):w.u(3);throw new M(2,7,7e3)})},a=function(w,A){return k(function(D){switch(D.g){case 1:return ii(D,2),T(D,Kf(i.ka,A),4);case 4:return T(D,u(),5);case 5:return T(D,w(),6);case 6:return T(D,u(),7);case 7:r&&i.g&&(r.g=i.g);case 2:on(D),i.ka.release(),sn(D,0)}})},ue(S,5,6),t==null&&r&&(t=r.getStartTime()),i.N=t,i.Oa=!1,i.dispatchEvent(be("loading")),r){n=r.W,S.u(8);break}if(n){S.u(8);break}return T(S,a(function(){return k(function(w){if(w.g==1)return T(w,yv(i,o),2);n=w.h,K(w)})},"guessMimeType_"),8);case 8:if(l=!!r,r){Ym(r,i),i.A=r.getStats(),S.u(11);break}return T(S,mv(i,o,t,n,!0,i.g),12);case 12:(r=S.h)?(r.B=!1,Ym(r,i),i.A=r.getStats(),r.start(),r.s.catch(function(){})):i.A=new Ra;case 11:return c=!r,f=Date.now()/1e3,i.A=r?r.getStats():new Ra,i.W=o,i.ha=n||null,Ga(i),p=function(){var w=i.Nb(),A={start:0,end:0};if(w.total.length){A.start=1/0,w=g(w.total);for(var D=w.next();!D.done;D=w.next())D=D.value,D.start<A.start&&(A.start=D.start),D.end>A.end&&(A.end=D.end)}return A},i.ya=new ws(p),i.ya.addEventListener("regionadd",function(w){Yf(i,w.region,"metadataadded")}),c?T(S,a(function(){return k(function(w){return T(w,GA(i,n),0)})},"initializeSrcEqualsDrmInner_"),23):(i.ab=new ws(p),T(S,a(function(){return k(function(w){if(w.g==1)return T(w,Promise.race([r.va,r.s]),2);i.qc=r.G;var A=r;A.wa=!0,i.H=A.l,i.i=r.Fg(),K(w)})},"waitForFinish"),15));case 15:if(i.G){S.u(16);break}return T(S,a(function(){return k(function(w){return T(w,zf(i),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return i.i&&i.i.textStreams.length&&(i.o.enableTextDisplayer?i.o.enableTextDisplayer():Ee("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),T(S,a(function(){return k(function(w){return T(w,r.s,0)})},"waitForFinish"),18);case 18:if(i.g=r.getConfiguration(),i.ue=r.F,i.H&&i.H.setMediaElement&&i.h&&i.H.setMediaElement(i.h),i.me=cA(r),i.le=r.Pa,(h=r.A)&&(i.M=h),l&&i.h&&i.h.nodeName==="AUDIO"&&(BA(i),i.configure("manifest.disableVideo",!0)),r.i){S.u(19);break}return T(S,a(function(){return k(function(w){return T(w,qm(r,i.h),0)})},"drmEngine_.init"),19);case 19:return i.C=fA(r),T(S,a(function(){return k(function(w){return T(w,i.C.fc(i.h),0)})},"drmEngine_.attach"),21);case 21:return!(m=r.C)||i.Za&&i.Za==m||(i.s=lA(r),i.Za=r.C,typeof i.s.setMediaElement!="function"&&(Ee("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),i.s.setMediaElement=function(){}),typeof i.s.setCmsdManager!="function"&&(Ee("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),i.s.setCmsdManager=function(){}),typeof i.s.trySuggestStreams!="function"&&(Ee("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),i.s.trySuggestStreams=function(){})),y=dA(r),v=r.K,T(S,a(function(){return k(function(w){return T(w,HA(i,f,v,y),0)})},"loadInner_"),22);case 22:aA(r),i.ha&&ye().Wi()&&es(i.ha)&&tw(i.G,i.W,i.ha),S.u(14);break;case 23:return T(S,a(function(){return k(function(w){return T(w,KA(i,f,n),0)})},"srcEqualsInner_"),14);case 14:i.dispatchEvent(be("loaded"));case 6:if(on(S),!r){S.u(25);break}return T(S,r.destroy(),25);case 25:i.Pa=null,sn(S,0);break;case 5:if(x=ae(S),!x||x.code==7e3){S.u(27);break}return T(S,i.vc(!1),27);case 27:throw x}})};function BA(e){for(var t=g(e.i.variants),n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(i){return i.audio})}d.Yk=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,i;return k(function(r){return r.g==1?T(r,gv(n),2):r.g!=3?(i=r.h,T(r,n.vc(e,t),3)):r.return(i)})},d.Qh=function(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n=this,i;return k(function(r){return r.g==1?T(r,gv(n,t),2):r.g!=3?(i=r.h,T(r,n.detach(e),3)):r.return(i)})};function gv(e,t){t=t===void 0?!1:t;var n,i;return k(function(r){if(r.g==1)return n=null,e.i&&e.H&&e.qc&&e.W&&e.g?(i=e.h.currentTime,e.V()&&!t&&(i=null),T(r,vv(e,e.W,i,e.ha,e.g,!0,!1,!1),3)):r.u(2);if(r.g!=2){n=r.h,e.ye.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var o=n,s=e.H,u=e.qc;o.h=e.i,o.l=s,o.G=u,n.A=e.M,n.start(),e.i=null,e.H=null,e.qc=null,e.s=null,e.Za=null}return r.return(n)})}d.preload=function(e,t,n,i){t=t===void 0?null:t;var r=this,o,s;return k(function(u){return u.g==1?(o=Xn(r),xi(o,i||r.g,Xn(r)),T(u,mv(r,e,t,n,!1,o),2)):((s=u.h)?s.start():xo(r,new M(2,7,7005)),u.return(s))})},d.ng=function(){var e=this,t,n,i,r;return k(function(o){for(t=[],n=g(e.ye),i=n.next();!i.done;i=n.next())r=i.value,r.o||t.push(r.destroy());return e.ye=[],T(o,Promise.all(t),0)})};function mv(e,t,n,i,r,o){r=r===void 0?!1:r;var s,u,a,l;return k(function(c){return c.g==1?i?c.u(2):T(c,yv(e,t),3):(c.g!=2&&(i=c.h),VA(e,i)?c.return(null):(s=o||e.g,u=!1,a=!0,r&&(e.s&&e.Za==s.abrFactory&&(a=!1),e.h&&e.h.nodeName==="AUDIO"&&(u=!0)),l=vv(e,t,n,i||null,s,!r,u,a),l=r?l.then(function(f){return f.B=!1,f}):l.then(function(f){return e.ye.push(f),f}),c.return(l)))})}function vv(e,t,n,i,r,o,s,u){o=o===void 0?!0:o,s=s===void 0?!1:s,u=u===void 0?!0:u;var a,l,c,f,p,h,m,y,v,x,S,w,A,D,E;return k(function(I){return I.g==1?(a=null,l=Pn(r),s&&(l.manifest.disableVideo=!0),c=function(){return a.S&&a.o?null:a},f=function(){return c()?c().getConfiguration():e.g},e.wa.width!=1/0||e.wa.height!=1/0||e.g.ignoreHardwareResolution?I.u(2):(p=ye(),T(I,p.ic(),3))):(I.g!=2&&(h=I.h,e.wa.width=h.width,e.wa.height=h.height),m=new Kc(l,e.wa,null),y={networkingEngine:e.I,filter:function(C){var R,N;return k(function(L){if(L.g==1)return T(L,Og(m,C),2);if(L.g!=4)return R=L.h,R?(N=be("trackschanged"),T(L,Promise.resolve(),4)):L.u(0);a.dispatchEvent(N),K(L)})},makeTextStreamsForClosedCaptions:function(C){return rE(e,C)},onTimelineRegionAdded:function(C){mf(a.H,C)},onEvent:function(C){return a.dispatchEvent(C)},onError:function(C){return a.onError(C)},isLowLatencyMode:function(){return f().streaming.lowLatencyMode},updateDuration:function(){e.l&&a.S&&e.l.updateDuration()},newDrmInfo:function(C){var R=a.i,N=R?R.g:null;N&&R.A&&Fg(m,N.keySystem,C)},onManifestUpdated:function(){var C=new Map().set("isLive",e.V());a.dispatchEvent(be("manifestupdated",C)),Ds(a,!1,function(){e.B&&e.B.onManifestUpdated(e.V())})},getBandwidthEstimate:function(){return e.s.getBandwidthEstimate()},onMetadata:function(C,R,N,L){var P=C;C=="com.apple.hls.interstitial"&&(P="com.apple.quicktime.HLS",C={startTime:R,endTime:N,values:L},e.B)&&e.B.onHLSInterstitialMetadata(e,e.h,C),L=g(L),C=L.next();for(var b={};!C.done;b={Xg:void 0},C=L.next())b.Xg=C.value,b.Xg.name!="ID"&&Ds(a,!1,function(U){return function(){qf(e,R,N,P,U.Xg)}}(b))},disableStream:function(C){return e.disableStream(C,e.g.streaming.maxDisabledTime)},addFont:function(C,R){return e.addFont(C,R)}},v=new ws(function(){return e.Sa()}),v.addEventListener("regionadd",function(C){var R=C.region;Us(e,"timelineregionadded",R,a),Ds(a,!1,function(){e.B&&(e.B.onDashTimedMetadata(R),e.B.onDASHInterstitialMetadata(e,e.h,R))})}),x=null,l.streaming.observeQualityChanges&&(x=new ga(function(){return e.Nb()}),x.addEventListener("qualitychange",function(C){_v(e,C.quality,C.position)}),x.addEventListener("audiotrackchange",function(C){_v(e,C.quality,C.position,!0)})),S=!0,w={pc:e.I,onError:function(C){return a.onError(C)},rf:function(C){Ds(a,!0,function(){if(e.C)e:{var R=C,N=be("keystatuschanged");e.dispatchEvent(N);var L=Object.keys(R);L.length==1&&L[0]==""&&(L=["00"],R={"00":R[""]}),N=L.length==1&&L[0]=="00";var P=!1;if(L.length){L=e.keySystem();for(var b=Qr(e.g.drm.clearKeys),U=g(e.i.variants),j=U.next();!j.done;j=U.next()){j=j.value;var O=[];j.audio&&O.push(j.audio),j.video&&O.push(j.video),O=g(O);for(var B=O.next();!B.done;B=O.next()){var V=B.value;if(B=j.allowedByKeySystem,V.keyIds.size)if(V.drmInfos.length&&!b.size){V=g(V.drmInfos);for(var q=V.next();!q.done;q=V.next())if(q=q.value,q.keyIds.size&&q.keySystem==L){j.allowedByKeySystem=!0,q=g(q.keyIds);for(var X=q.next();!X.done;X=q.next())X=X.value,((X=R[N?"00":X])||e.C.G)&&(j.allowedByKeySystem=j.allowedByKeySystem&&!!X&&!Xc.includes(X))}}else for(j.allowedByKeySystem=!0,V=g(V.keyIds),q=V.next();!q.done;q=V.next())q=q.value,((q=R[N?"00":q])||e.C.G)&&(j.allowedByKeySystem=j.allowedByKeySystem&&!!q&&!Xc.includes(q));B!=j.allowedByKeySystem&&(P=!0)}}}if(P&&(bt(e),!wi(e)))break e;(R=e.l.o)&&!R.allowedByKeySystem&&Ir(e)}})},onExpirationUpdated:function(C,R){var N=be("expirationupdated");a.dispatchEvent(N),(N=a.l)&&N.onExpirationUpdated&&N.onExpirationUpdated(C,R)},onEvent:function(C){a.dispatchEvent(C),C.type=="drmsessionupdate"&&S&&(S=!1,C=Date.now()/1e3-a.Ka,(e.A||a.getStats()).m=C,e.S&&Sh(e.S))}},A=xv(e,c),hg(e.I,A),D=function(){return e.hd(w)},E={config:l,pk:y,Ck:v,Bk:x,hd:D,nk:m,networkingEngine:A,ej:o,dj:u},a=new Tn(t,i,n,E),u||pA(a,e.s,e.Za),I.return(a))})}function yv(e,t){var n,i,r;return k(function(o){return o.g==1?(n=e.g.manifest.retryParameters,T(o,Er(t,e.I,n),2)):(i=o.h,i=="application/x-mpegurl"&&(r=ye(),r.Da()==="WEBKIT"&&(i="application/vnd.apple.mpegurl")),o.return(i))})}function VA(e,t){if(!Zn(ye()))return!0;if(t){if((e.h||xr()).canPlayType(t)=="")return!1;if(!Zn(ye())||!eo.has(t))return!0;if(es(t))return ye().Da()==="WEBKIT"&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if(t==="application/dash+xml"||t==="video/vnd.mpeg.dash.mpd")return e.g.streaming.preferNativeDash}return!1}function Wf(e){var t=e.g.textDisplayFactory;if(e.Fh!==t){var n=e.o;e.o=t(),e.o.configure?e.o.configure(e.g.textDisplayer):Ee("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.o.setTextLanguage||Ee("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),n?(e.o.setTextVisibility(n.isTextVisible()),n.destroy().catch(function(){})):e.o.setTextVisibility(e.ba),e.G&&cw(e.G,e.o),e.Fh=t,e.l&&jw(e.l)}else e.o&&e.o.configure&&e.o.configure(e.g.textDisplayer)}function zf(e){var t,n,i;return k(function(r){if(r.g==1)return ye(),To(e,"media-source"),e.g.mediaSource.useSourceElements&&aa(e.h),Wf(e),t=JA(e.h,e.o,{Ej:function(){return e.keySystem()},onMetadata:function(o,s,u){o=g(o);for(var a=o.next();!a.done;a=o.next())if(a=a.value,a.data&&typeof a.cueTime=="number"&&a.frames){var l=a.cueTime+s,c=u;c&&l>c&&(c=l);for(var f=g(a.frames),p=f.next();!p.done;p=f.next())qf(e,l,c,"org.id3",p.value);e.B&&e.B.onHlsTimedMetadata(a,l)}},wk:function(o){e.ab&&mf(e.ab,{schemeIdUri:o.schemeIdUri,startTime:o.startTime,endTime:o.endTime,id:String(o.id),emsg:o})},onEvent:function(o){return e.dispatchEvent(o)},yk:function(){e.H&&e.H.update&&e.H.update()}},e.S,e.g.mediaSource),n=e.g.manifest,i=n.segmentRelativeVttTiming,t.Ka=i,T(r,t.K,2);e.G=t,K(r)})}function Tv(e,t,n){function i(){return Qf(e)}if(e.j.D(t,"playing",i),e.j.D(t,"pause",i),e.j.D(t,"ended",i),e.j.D(t,"ratechange",function(){var o=e.h.playbackRate;o!=0&&(e.K&&(e.K.set(o),e.m==Lt&&e.s.playbackRateChanged(o),Dv(e,o)),o=be("ratechange"),e.dispatchEvent(o))}),t.remote&&(e.j.D(t.remote,"connect",function(){e.l&&t.remote.state=="connected"&&Cr(e),bt(e)}),e.j.D(t.remote,"connecting",function(){return bt(e)}),e.j.D(t.remote,"disconnect",function(){return k(function(o){if(o.g==1)return e.l&&t.remote.state=="disconnected"?T(o,kf(e.l),3):o.u(2);o.g!=2&&Cr(e),bt(e),K(o)})})),t.audioTracks&&(e.j.D(t.audioTracks,"addtrack",function(){return bt(e)}),e.j.D(t.audioTracks,"removetrack",function(){return bt(e)}),e.j.D(t.audioTracks,"change",function(){return bt(e)})),t.videoTracks&&(e.j.D(t.videoTracks,"addtrack",function(){return bt(e)}),e.j.D(t.videoTracks,"removetrack",function(){return bt(e)}),e.j.D(t.videoTracks,"change",function(){return bt(e)})),t.textTracks){var r=function(){e.m===en&&e.o instanceof ct&&Cr(e),bt(e)};e.j.D(t.textTracks,"addtrack",function(o){if(o.track)switch(o=o.track,o.kind){case"metadata":zA(e,o);break;case"chapters":YA(e,o);break;default:r()}}),e.j.D(t.textTracks,"removetrack",r),e.j.D(t.textTracks,"change",r),e.g.streaming.crossBoundaryStrategy!=="keep"&&(e.j.D(t,"waiting",function(){e.l&&Df(e.l)}),e.j.D(t,"timeupdate",function(){e.l&&Df(e.l)}))}t.preload!="none"&&e.j.Aa(t,"loadedmetadata",function(){e.A.F=Date.now()/1e3-n})}function HA(e,t,n,i){var r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j;return k(function(O){switch(O.g){case 1:for(To(e,"load"),r=e.h,e.K=new Ss({Ve:function(){return r.playbackRate},Pc:function(){return r.defaultPlaybackRate},nh:function(B){r.playbackRate=B},ni:function(B){r.currentTime+=B}}),Tv(e,r,t),("onchange"in F.screen)&&e.j.D(F.screen,"change",function(){if(e.M.getConfiguration){var B=e.M.getConfiguration();B.Ec=="AUTO"?wi(e):e.g.preferredVideoHdrLevel=="AUTO"&&e.g.abr.enabled&&(B.Ec="AUTO",e.M.configure(B),wi(e))}}),o=!1,s=g(e.i.variants),u=s.next();!u.done;u=s.next())a=u.value,(l=a.video&&a.video.dependencyStream)&&(o=wh(l));FA(e,e.g,o),e.xd=e.g.preferredTextLanguage,e.se=e.g.preferredTextRole,e.re=e.g.preferForcedSubs,td(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.s.init(function(B,V,q){e.i&&e.l&&B!=e.l.o&&Ns(e,B,!0,V===void 0?!1:V,q===void 0?0:q)}),e.s.setMediaElement(r),e.s.setCmsdManager(e.va),e.l=eE(e),e.l.configure(e.g.streaming),e.m=Lt,e.dispatchEvent(be("streaming")),c=n;case 2:for((p=e.l.o)||c||(c=wi(e)?e.s.chooseVariant():null),h=[],f=p||c,m=g([f.video,f.audio]),y=m.next();!y.done;y=m.next())(v=y.value)&&!v.segmentIndex&&(h.push(v.createSegmentIndex()),v.dependencyStream&&h.push(v.dependencyStream.createSegmentIndex()));if(!(0<h.length)){O.u(4);break}return T(O,Promise.all(h),4);case 4:if(!f||f.disabledUntilTime!=0){O.u(2);break}if(e.H&&e.H.onInitialVariantChosen&&e.H.onInitialVariantChosen(f),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Yf):Ae("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),e.L&&(kA(e.L,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),DA(e.L,1e3*t)),td(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),Pw(e.l,e.g.playRangeStart,e.g.playRangeEnd),e.Oa=!0,e.dispatchEvent(be("canupdatestarttime")),x=function(B){e.F=qA(e,B),e.Zb=$A(e,B),Sv(e,r,!1)},e.g.streaming.startAtSegmentBoundary||(S=e.N,S==null&&e.i.startTime&&(S=e.i.startTime),x(S)),p){O.u(7);break}if(!e.g.streaming.startAtSegmentBoundary){O.u(8);break}return w=e.i.presentationTimeline,e.N instanceof Date&&(D=w.m||w.i,E=e.N.getTime()/1e3-D,E!=null&&(A=E)),A==null&&(A=typeof e.N=="number"?e.N:e.h.currentTime),e.N==null&&e.i.startTime&&(A=e.i.startTime),I=w.Xb(),C=w.Fb(),A<I?A=I:A>C&&(A=C),T(O,oE(c,A),9);case 9:R=O.h,x(R);case 8:Ns(e,c,!0,!1,0);case 7:return e.F.ready(),N=e.Dc().find(function(B){return B.active}),N||((L=Wr(e.i.textStreams,e.xd,e.se,e.re)[0]||null)&&Nf(e.A.h,L,!0),c&&(L?(rg(c.audio,L,e.g)&&(e.ba=!0),e.ba&&e.o.setTextVisibility(!0)):(e.ba=!1,e.o.setTextVisibility(!1)),Uv(e)),L&&(e.g.streaming.alwaysStreamText||e.Ng())&&(ya(e.l,L),js(e))),T(O,e.l.start(i),10);case 10:e.g.abr.enabled&&(e.s.enable(),Ov(e)),bt(e),wi(e),e.i.variants.some(function(B){return B.primary}),((P=e.V())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(b=function(){return Rv(e)},e.j.D(r,"timeupdate",b)),P||(U=function(){return Ka(e)},e.j.D(r,"timeupdate",U),Ka(e),e.i.nextUrl&&(0<e.g.streaming.preloadNextUrlWindow&&(j=function(){var B;return k(function(V){if(V.g==1)return B=e.Sa().end-e.h.currentTime,isNaN(B)||!(B<=e.g.streaming.preloadNextUrlWindow)?V.u(0):(e.j.Ja(r,"timeupdate",j),T(V,e.preload(e.i.nextUrl),4));e.Pa=V.h,K(V)})},e.j.D(r,"timeupdate",j)),e.j.D(r,"ended",function(){e.load(e.Pa||e.i.nextUrl)}))),e.B&&e.B.onManifestUpdated(P),K(O)}})}function GA(e,t){var n,i,r;return k(function(o){return o.g==1?(n=Date.now()/1e3,i=!0,e.C=e.hd({pc:e.I,onError:function(s){xo(e,s)},rf:function(){},onExpirationUpdated:function(){var s=be("expirationupdated");e.dispatchEvent(s)},onEvent:function(s){e.dispatchEvent(s),s.type=="drmsessionupdate"&&i&&(i=!1,e.A.m=Date.now()/1e3-n)}}),e.C.configure(e.g.drm),r=og([t]),e.C.ha=!0,T(o,wg(e.C,[r],[]),2)):T(o,e.C.fc(e.h),0)})}function KA(e,t,n){var i,r,o,s,u,a,l,c,f,p,h,m;return k(function(y){switch(y.g){case 1:if(To(e,"src-equals"),i=e.h,e.F=new Am(i),r=!1,e.qe.push(function(){r=!0}),e.dispatchEvent(be("canupdatestarttime")),e.N!=null&&e.F.Vf(e.N),e.Zb=QA(e,e.N||0),e.K=new Ss({Ve:function(){return i.playbackRate},Pc:function(){return i.defaultPlaybackRate},nh:function(v){i.playbackRate=v},ni:function(v){i.currentTime+=v}}),Sv(e,i,!0),i.textTracks&&(Wf(e),o=function(v){if(!(e.o instanceof ct)){var x=Va(e).find(function(S){return S.mode!=="disabled"});x&&(x.mode=v?"showing":"hidden"),e.o instanceof Ct&&(x=tE(e))&&(x.mode=!v&&e.o.isTextVisible()?"showing":"hidden")}},e.j.D(i,"enterpictureinpicture",function(){return o(!0)}),e.j.D(i,"leavepictureinpicture",function(){return o(!1)}),i.remote?(e.j.D(i.remote,"connect",function(){return o(!1)}),e.j.D(i.remote,"connecting",function(){return o(!1)}),e.j.D(i.remote,"disconnect",function(){return o(!1)})):"webkitCurrentPlaybackTargetIsWireless"in i&&e.j.D(i,"webkitcurrentplaybacktargetiswirelesschanged",function(){return o(!1)}),s=i,s.webkitSupportsFullscreen&&e.j.D(s,"webkitpresentationmodechanged",function(){return o(s.webkitPresentationMode!=="inline")})),Tv(e,i,t),u=RA(e.L,e.W,n),!u.includes("#t=")&&(0<e.g.playRangeStart||isFinite(e.g.playRangeEnd))&&(u+="#t=",0<e.g.playRangeStart&&(u+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(u+=","+e.g.playRangeEnd)),!e.G){y.u(2);break}return T(y,e.G.destroy(),3);case 3:e.G=null;case 2:return aa(i),i.src=u,a=ye(),a.La()=="TV"&&i.load(),i.preload!="none"&&!i.autoplay&&es(n)&&a.Da()==="WEBKIT"&&i.load(),e.m=en,e.dispatchEvent(be("streaming")),l=new je,fo(i,HTMLMediaElement.HAVE_METADATA,e.j,function(){e.F.ready(),e.ha&&es(e.ha)||l.resolve()}),c=function(){return new Promise(function(v){var x=new Te(v);e.j.D(i.textTracks,"change",function(){return x.ia(.5)}),x.ia(.5)})},fo(i,HTMLMediaElement.HAVE_CURRENT_DATA,e.j,function(){var v,x,S,w,A;return k(function(D){if(D.g==1)return T(D,c(),2);if(r)return D.return();if(XA(e),v=Va(e),v.some(function(E){return E.mode==="showing"})&&(e.ba=!0,e.o.setTextVisibility(!0)),!(e.o instanceof ct))for(v.length&&(e.o.enableTextDisplayer?e.o.enableTextDisplayer():Ee("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),x=!1,S=g(v),w=S.next();!w.done;w=S.next())A=w.value,A.mode!=="disabled"&&(x?(A.mode="disabled",Ae("Found more than one enabled text track, disabling it",A)):(Mv(e,A),x=!0));WA(e),e.ha&&es(e.ha)&&l.resolve(),K(D)})}),i.error?l.reject(ed(e)):i.preload=="none"&&(Ae('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),l.resolve()),e.j.Aa(i,"error",function(){l.reject(ed(e))}),T(y,os(e.g.streaming.loadTimeout,l),4);case 4:((f=e.V())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(p=function(){return Rv(e)},e.j.D(i,"timeupdate",p)),f||(h=function(){return Ka(e)},e.j.D(i,"timeupdate",h),Ka(e)),e.B&&(e.B.onManifestUpdated(f),f&&(m=e.Sa().end,e.j.D(i,"progress",function(){var v=e.Sa().end;m!=v&&(e.B.onManifestUpdated(e.V()),m=v)}))),e.Oa=!0,K(y)}})}function XA(e){var t=e.g.preferredAudioLanguage;t!=""&&e.Hi(t,e.g.preferredVariantRole)}function WA(e){var t=e.g.preferredTextLanguage;t!=""&&e.ih(t,e.g.preferredTextRole,e.g.preferForcedSubs)}function zA(e,t){if(t.kind=="metadata"){t.mode="hidden",e.j.D(t,"cuechange",function(){if(t.activeCues)for(var i=g(t.activeCues),r=i.next();!r.done;r=i.next())r=r.value,qf(e,r.startTime,r.endTime,r.type,r.value),e.B&&e.B.onCueMetadataChange(r.value);if(t.cues){i=[],r=g(t.cues);for(var o=r.next(),s={};!o.done;s={xc:void 0},o=r.next())s.xc=o.value,s.xc.type=="com.apple.quicktime.HLS"&&s.xc.startTime!=null&&(o=i.find(function(u){return function(a){return a.startTime==u.xc.startTime&&a.endTime==u.xc.endTime}}(s)),o||(o={startTime:s.xc.startTime,endTime:s.xc.endTime,values:[]},i.push(o)),o.values.push(s.xc.value));for(i=g(i),r=i.next();!r.done;r=i.next())r=r.value,r.values.some(function(u){return u.key=="X-ASSET-URI"||u.key=="X-ASSET-LIST"})&&e.B&&(r.values.push({key:"CUE",description:"",data:r.startTime!=0||e.V()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.B.onHLSInterstitialMetadata(e,e.h,r))}});var n=new Te(function(){var i=nE(e);i=g(i);for(var r=i.next();!r.done;r=i.next())r.value.mode="hidden"}).Jb().ia(.5);e.qe.push(function(){n.stop()})}}function Yf(e,t,n){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(be(n,t))}function qf(e,t,n,i,r){e.ya&&(t={schemeIdUri:i,startTime:t,endTime:n||1/0,id:"",payload:r},t.id=JSON.stringify(t),mf(e.ya,t))}function YA(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new Te(function(){t.mode="hidden"}).Jb().ia(.5);e.qe.push(function(){n.stop()})}}d.Gk=function(){for(var e=this.ka;e.g;)e.release()},d.hd=function(e){return new Zu(e)};function xv(e,t){function n(o){t()?t().dispatchEvent(o):e.dispatchEvent(o)}function i(o){t()?Ds(t(),!0,o):o()}t||(t=function(){return null});var r=new Ge(function(o,s,u,a,l){var c=t()?t().j:e.s;c&&c.segmentDownloaded(o,s,u,a,l)},function(o,s,u){s=new Map().set("headers",o).set("request",s).set("requestType",u),n(be("downloadheadersreceived",s)),i(function(){if(e.va){var a=e.va;if(a.h.enabled){var l=o["cmsd-static"];if(l)try{var c=new Map,f=l.split(",");for(l=0;l<f.length;l++){var p=f[l].split("=");c.set(p[0],av(p[1]))}}catch{}if(c=o["cmsd-dynamic"]){try{var h=new Map,m=c.split(";");for(c=1;c<m.length;c++){var y=m[c].split("=");h.set(y[0],av(y[1]))}var v=h}catch{v=null}v&&(a.g=v)}}}})},function(o,s){o=new Map().set("request",o).set("response",s),n(be("downloadcompleted",o))},function(o,s,u,a){o=new Map().set("request",o).set("error",s).set("httpResponseCode",u).set("aborted",a),n(be("downloadfailed",o))},function(o,s,u){i(function(){var a=e.L,l=u;if(l=l===void 0?{}:l,a.g.enabled)if(s.method==="HEAD")yo(a,s);else switch(o){case 0:try{if(a.g.enabled){if(l.type){e:{switch(l.type){case 4:var c=a.l?_a:Oa;break e;case 3:case 2:c=a.l?Fa:ba;break e;case 5:c="s";break e}c=void 0}a.i=c}yo(a,s,{ot:sv,su:!a.s})}}catch(j){tr("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",j)}break;case jn:try{if(a.g.enabled){var f=s.uris[0],p=l.segment;c=0,p&&(c=p.endTime-p.startTime);var h={d:1e3*c,st:a.h.V()?"l":"v"};h.ot=NA(l);var m=h.ot===Na||h.ot===La||h.ot===ja||h.ot===Ua,y=l.stream;if(y){var v=a.h.ub();if(m&&(h.bl=jA(a,y.type),h.ot!==Ua)){var x=ov(a,y.type);h.dl=v?x/Math.abs(v):x}if(y.bandwidth&&(h.br=y.bandwidth/1e3),y.segmentIndex&&p){var S=y.segmentIndex.Wb(p.endTime,!0,0>v);if(S){var w=S.next().value;if(w&&w!=p){if(f&&!zo(p.O(),w.O())){var A=w.O()[0],D=new URL(A),E=new URL(f);if(D.origin!==E.origin)var I=A;else{for(var C=D.pathname.split("/").slice(1),R=E.pathname.split("/").slice(1,-1);C[0]===R[0];)C.shift(),R.shift();for(;R.length;)R.shift(),C.unshift("..");I=C.join("/")}h.nor=I}if((w.startByte||w.endByte)&&(p.startByte!=w.startByte||p.endByte!=w.endByte)){var N=w.startByte+"-";w.endByte&&(N+=w.endByte),h.nrr=N}}}var L=a.h.ub()||1,P=ov(a,y.type)||500,b=y.bandwidth,U=b?b*(p.endTime-p.startTime)/1e3/(P/L/1e3)*a.g.rtpSafetyFactor:NaN;isNaN(U)||(h.rtp=U)}}m&&h.ot!==Ua&&(h.tb=UA(a,h.ot)/1e3),yo(a,s,h)}}catch(j){tr("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",j)}break;case 2:case 5:case 6:yo(a,s,{ot:"k"});break;case 4:yo(a,s,{ot:"o"})}})},function(o,s,u,a){(o=t()?t().l:e.H)&&o.banLocation&&o.banLocation(a)},function(o,s){if(s.data){s=s.data.byteLength;var u=t()?t().getStats():e.A;u&&(zm(u,s),o===0&&(u.gi=s))}});return r.configure(e.g.networking),r}function qA(e,t){return new Cm(e.h,e.i,e.g.streaming,t,function(){e.Zb&&Pm(e.Zb,!0),e.l&&e.l.Yc(),e.P&&Jn(e)},function(n){return e.dispatchEvent(n)})}function $A(e,t){var n=e.V()||typeof t=="number"&&0<t;t=new Ar(e.me,n),t.addEventListener("enter",function(o){Us(e,"timelineregionenter",o.region)}),t.addEventListener("exit",function(o){Us(e,"timelineregionexit",o.region)}),t.addEventListener("skip",function(o){var s=o.region;o.seeking||(Us(e,"timelineregionenter",s),Us(e,"timelineregionexit",s))});var i=new Ar(e.ya,n);i.addEventListener("enter",function(o){Yf(e,o.region,"metadata")}),n=new Ar(e.ab,n),n.addEventListener("enter",function(o){o=new Map().set("detail",o.region.emsg),e.dispatchEvent(be("emsg",o))});var r=new gf(e.h);return r.g.add(t),r.g.add(i),r.g.add(n),e.le&&r.g.add(e.le),r}function QA(e,t){t=new Ar(e.ya,t instanceof Date||0<t),t.addEventListener("enter",function(i){Yf(e,i.region,"metadata")});var n=new gf(e.h);return n.g.add(t),n}function Sv(e,t,n){e.P=new kS,e.P.g=Zr,wv(e),Ga(e),e.Ka=new Te(function(){Jn(e)}),e.g.streaming.rebufferingGoal&&e.Ka.Fa(.25),e.j.D(t,"waiting",function(){return Jn(e)}),e.j.D(t,"canplaythrough",function(){return Jn(e)}),e.j.D(t,"playing",function(){return Jn(e)}),e.j.D(t,"seeked",function(){return Jn(e)}),n&&(e.j.D(t,"stalled",function(){return Jn(e)}),e.j.D(t,"progress",function(){return Jn(e)}),e.j.D(t,"timeupdate",function(){return Jn(e)}))}function wv(e){var t=e.g.streaming.rebufferingGoal;e.P.i.set(fs,Math.min(.5,t/2)).set(Zr,t)}function Jn(e){var t=e.G?wr(e.G):!1,n=e.Wd()||t||e.F.ci(),i=Qg(e.h.buffered,e.h.currentTime);t=e.P;var r=t.i.get(t.g),o=t.g;n=n||i>=r&&0<i?fs:Zr,t.g=n,(o=o!=n)&&n===fs&&(t.h=Date.now()),o&&Ga(e)}function JA(e,t,n,i,r){return new rm(e,t,n,r,i)}function ZA(e){return new Bf({getBandwidthEstimate:function(){return e.s?e.s.getBandwidthEstimate():NaN},Nb:function(){return e.Nb()},getCurrentTime:function(){return e.h?e.h.currentTime:0},ub:function(){return e.ub()},Pb:function(){return e.Pb()},Qb:function(){return e.Qb()},V:function(){return e.V()},Ue:function(){return e.Ue()}},e.g.cmcd)}function eE(e){return new _m(e.i,{Qc:function(){return e.F?e.F.De():0},getBandwidthEstimate:function(){return e.s.getBandwidthEstimate()},ub:function(){return e.ub()},video:e.h,Z:e.G,pc:e.I,onError:function(t){return xo(e,t)},onEvent:function(t){return e.dispatchEvent(t)},tf:function(t,n,i){var r=t.startTime;if(t=t.endTime,n=n.type,n!=pe){if(e.F){e.F.pi();var o=sf(e.G,n);!e.V()&&e.h.paused&&!e.h.seeking&&o!=null&&0<o&&e.F.De()<o&&e.F.Vf(o)}Jn(e)}i=new Map().set("start",r).set("end",t).set("contentType",n).set("isMuxed",i),e.dispatchEvent(be("segmentappended",i))},xk:function(t,n){(n=n.rd)&&e.le&&ww(e.le,n,t)},Kh:function(t,n){var i=e.C;if(i.h.parseInbandPsshEnabled&&!i.G&&["audio","video"].includes(t)){t=new Vc(se(n)),n=0;for(var r=g(t.data),o=r.next();!o.done;o=r.next())n+=o.value.length;if(n==0)i=Promise.resolve();else{for(n=new Uint8Array(n),r=0,t=g(t.data),o=t.next();!o.done;o=t.next())o=o.value,n.set(o,r),r+=o.length;as(i,"cenc",n),i=i.l}}else i=Promise.resolve();return i},disableStream:function(t,n){return e.disableStream(t,n)}})}d.configure=function(e,t){if(arguments.length==2&&typeof e=="string"&&(e=Ea(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(Ee("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(Ee("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming){Ee("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var n=ye();e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&n.Da()==="WEBKIT",delete e.streaming.useNativeHlsOnSafari}if(e.streaming&&typeof e.streaming.liveSync=="boolean"&&(Ee("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),n=e.streaming.liveSync,e.streaming.liveSync={},e.streaming.liveSync.enabled=n),e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){n=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(Ee("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(Ee("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(Ee("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(Ee("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(Ee("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(Ee("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(Ee("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(Ee("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){Ee("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var r=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return r},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(Ee("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(Ee("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(Ee("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(Ee("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(Ee("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.manifest&&e.manifest.dash&&"ignoreSupplementalCodecs"in e.manifest.dash&&(Ee("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.dash.ignoreSupplementalCodecs,delete e.manifest.dash.ignoreSupplementalCodecs),e.manifest&&e.manifest.hls&&"ignoreSupplementalCodecs"in e.manifest.hls&&(Ee("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.hls.ignoreSupplementalCodecs,delete e.manifest.hls.ignoreSupplementalCodecs),e.manifest&&e.manifest.dash&&"updatePeriod"in e.manifest.dash&&(Ee("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.dash.updatePeriod,delete e.manifest.dash.updatePeriod),e.manifest&&e.manifest.hls&&"updatePeriod"in e.manifest.hls&&(Ee("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.hls.updatePeriod,delete e.manifest.hls.updatePeriod),e.manifest&&e.manifest.dash&&"ignoreDrmInfo"in e.manifest.dash&&(Ee("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),e.manifest.ignoreDrmInfo=e.manifest.dash.ignoreDrmInfo,delete e.manifest.dash.ignoreDrmInfo),e.drm&&e.drm.advanced){n=!1;for(var o in e.drm.advanced){var s=e.drm.advanced[o];i=s.videoRobustness,s=s.audioRobustness,"videoRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].videoRobustness)&&(e.drm.advanced[o].videoRobustness=[i],n=!0),"audioRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].audioRobustness)&&(e.drm.advanced[o].audioRobustness=[s],n=!0)}n&&Ee("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return e.streaming&&"forceHTTP"in e.streaming&&(Ee("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTP=e.streaming.forceHTTP,delete e.streaming.forceHTTP),e.streaming&&"forceHTTPS"in e.streaming&&(Ee("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTPS=e.streaming.forceHTTPS,delete e.streaming.forceHTTPS),e.streaming&&"minBytesForProgressEvents"in e.streaming&&(Ee("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),e.networking=e.networking||{},e.networking.minBytesForProgressEvents=e.streaming.minBytesForProgressEvents,delete e.streaming.minBytesForProgressEvents),o=xi(this.g,e,Xn(this)),Av(this),o},d.nj=function(e){this.Yf=e};function Av(e){if(e.ue=new Kc(e.g,e.wa,e.C),e.H){var t=Pn(e.g.manifest);e.h&&e.h.nodeName==="AUDIO"&&(t.disableVideo=!0),e.H.configure(t)}if(e.C&&e.C.configure(e.g.drm),e.l){e.l.configure(e.g.streaming);try{e.m!=Un&&bg(e.ue,e.i)&&bt(e)}catch(n){xo(e,n)}e.s&&wi(e),t=e.l.o,!t||t.allowedByApplication&&t.allowedByKeySystem||Ir(e)}e.I&&e.I.configure(e.g.networking),e.G&&(e.G.configure(e.g.mediaSource),e.G.Ka=e.g.manifest.segmentRelativeVttTiming),e.o&&Wf(e),e.s&&(e.s.configure(e.g.abr),e.g.abr.enabled?e.s.enable():e.s.disable(),Ov(e)),e.P&&wv(e),e.Ka&&(e.g.streaming.rebufferingGoal?e.Ka.Fa(.25):e.Ka.stop()),e.i&&td(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.B&&e.B.configure(e.g.ads),e.L&&e.L.configure(e.g.cmcd),e.va&&e.va.configure(e.g.cmsd),e.za&&e.za.configure(e.g.queue)}d.getConfiguration=function(){var e=Xn(this);return xi(e,this.g,Xn(this)),e},d.xj=function(){return this.Yf},d.Zh=function(){var e=Xn(this);return xi(e,this.g,Xn(this)),Gm(this.g,Xn(this))},d.Vh=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(t=Math.min(this.h.currentTime+t,this.Sa().end),e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},d.Ci=function(){for(var e in this.g)delete this.g[e];xi(this.g,Xn(this),Xn(this)),Av(this)},d.Fj=function(){return this.m},d.Xh=function(){return this.i?this.i.type:null},d.Jj=function(){return this.h},d.Pb=function(){return this.I},d.nd=function(){return this.W},d.Uh=function(){return this.B?this.B:null},d.$h=function(){return this.za?this.za:null},d.V=function(){return this.i&&!this.ua()?this.i.presentationTimeline.V():this.h&&(this.h.src||this.ua())?this.h.duration==1/0:!1},d.Tc=function(){return this.i?this.i.presentationTimeline.Tc():!1},d.ck=function(){if(this.i&&!this.ua()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&(this.h.src||this.ua())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},d.jk=function(){if(this.i&&!this.ua()){var e=this.i.variants;return e.length?(e=e[0],e.audio||!e.video?!1:!e.video.codecs.includes(",")):!1}return this.h&&(this.h.src||this.ua())&&this.h.audioTracks?this.h.audioTracks.length==0:!1},d.Sa=function(){if(this.i&&!this.ua()){if(!this.Oa&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Xb(),end:e.Fb()}}if(this.h&&(this.h.src||this.ua())&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return e=Math.min(e.end(e.length-1),n),{start:t,end:e}}return{start:0,end:0}},d.Zj=function(){this.V()&&(this.h.currentTime=this.Sa().end)},d.dk=function(){return this.Oa},d.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},d.drmInfo=function(){return this.C?this.C.g:null},d.Pd=function(){return this.C?this.C.Pd():1/0},d.Eg=function(){return this.C?this.C.Eg():[]},d.Te=function(){return this.C?this.C.Te():{}},d.Mg=function(){return this.P?this.P.g==Zr:!!this.W},d.ub=function(){return this.h?this.K?this.K.i:1:0},d.Ch=function(e){this.m==Lt&&this.l&&bm(this.l,e)},d.ke=function(e,t){t=t===void 0?!0:t,e==0?Ae("A trick play rate of 0 is unsupported!"):(this.K.set(e),this.m==Lt&&(this.s.playbackRateChanged(e),this.Ch(t&&e!=1)),Dv(this,e))},d.Id=function(){var e=this.K.Pc();this.m==en&&this.K.set(e),this.m==Lt&&(this.K.set(e),this.s.playbackRateChanged(e),this.Ch(!1)),this.bc.Ra()},d.Qb=function(){if(this.i&&!this.ua()){for(var e=this.l?this.l.o:null,t=[],n=0,i=g(this.i.variants),r=i.next();!r.done;r=i.next())if(r=r.value,us(r)){var o=pr(r);o.active=r==e,o.active||n==1||e==null||r.video!=e.video||r.audio!=e.audio||(o.active=!0),o.active&&n++,t.push(o)}return t}if(this.h&&this.h.audioTracks){var s=Pv(this);return e=Array.from(this.h.audioTracks),e.length?e.map(function(u){return Bu(u,s)}):s?[Bu(null,s)]:[]}return[]},d.Dc=function(){if(this.i){if(this.ua())return[];for(var e=this.l?this.l.A:null,t=[],n=g(this.i.textStreams),i=n.next();!i.done;i=n.next()){i=i.value;var r=hr(i);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?Va(this).map(function(o){return eg(o)}):[]},d.Cj=function(){var e=this.Ae;return this.i&&(e=this.i.imageStreams),e.map(function(t){return Uc(t)})},d.qj=function(e){var t=this,n,i;return k(function(r){return r.g==1?T(r,Iv(t,e),2):(n=r.h,n?(i=[],n.segmentIndex.Eb(function(o){var s=Ev(o.tilesLayout||n.tilesLayout);if(s)for(var u=s.rows*s.Lc,a=o.j-o.startTime,l=0;l<u;l++){var c=Cv(o,n,o.startTime+a*l/u,s);i.push(c)}}),n.closeSegmentIndex&&n.closeSegmentIndex(),r.return(i)):r.return(null))})};function Ev(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{Lc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}d.Tj=function(e,t){var n=this,i,r,o,s;return k(function(u){return u.g==1?T(u,Iv(n,e),2):(i=u.h,!i||(r=i.segmentIndex.find(t),r==null)?u.return(null):(o=i.segmentIndex.get(r),(s=Ev(o.tilesLayout||i.tilesLayout))?u.return(Cv(o,i,t,s)):u.return(null)))})};function Iv(e,t){var n,i;return k(function(r){return r.g==1?e.m!=Lt&&e.m!=en||(n=e.Ae,e.i&&(n=e.i.imageStreams),i=n[0],!i)?r.return(null):(t!=null&&(i=n.find(function(o){return o.id==t})),i?i.segmentIndex?r.u(2):T(r,i.createSegmentIndex(),2):r.return(null)):r.return(i)})}function Cv(e,t,n,i){var r=t.width||0,o=t.height||0,s=r/i.Lc,u=o/i.rows,a=i.Lc*i.rows,l=e.j-e.startTime;l=e.B||l/a;var c=e.startTime,f=0,p=0;return 1<a&&(p=Math.floor((n-e.startTime)/l),c=e.startTime+p*l,f=p%i.Lc*s,p=Math.floor(p/i.Lc)*u),i=!1,(n=e.thumbnailSprite)&&(i=!0,u=n.height,f=n.positionX,p=n.positionY,s=n.width),{segment:e,imageHeight:o,imageWidth:r,height:u,positionX:f,positionY:p,startTime:c,duration:l,uris:e.O(),startByte:e.Bc(),endByte:e.zc(),width:s,sprite:i,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs}}d.jh=function(e){function t(){var i=n.i.textStreams.find(function(r){return r.id==e.id});i&&i!=n.l.A&&(Nf(n.A.h,i,!1),ya(n.l,i),Cr(n),js(n),n.xd=i.language)}var n=this;this.i&&this.F&&(t(),!this.ua())||function(){if(n.h&&n.h.textTracks){var i=Va(n),r=i.find(function(u){return Fu(u)===e.id});if(r){if(n.o instanceof ct){i=g(i);for(var o=i.next();!o.done;o=i.next()){o=o.value;var s=o===r?n.ba?"showing":"hidden":"disabled";o.mode!==s&&(o.mode=s)}}else i=i.find(function(u){return u.mode!=="disabled"}),i!==r&&(i&&(i.mode="disabled",n.j.Ja(i,"cuechange"),n.o.remove(0,1/0)),r&&Mv(n,r));Cr(n),js(n)}}}()};function Mv(e,t){e.j.D(t,"cuechange",function(){e.o.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]);r=g(r);for(var o=r.next();!o.done;o=r.next()){if(o=o.value,o.endTime===1/0||o.endTime<o.startTime)o=null;else{var s=new Be(o.startTime,o.endTime,o.text);s.line=typeof o.line=="number"?o.line:null,o.lineAlign&&(s.lineAlign=o.lineAlign),s.lineInterpretation=o.snapToLines?Zo:1,s.position=typeof o.position=="number"?o.position:null,o.positionAlign&&(s.positionAlign=o.positionAlign),s.size=o.size,s.textAlign=o.align,o.vertical==="lr"?s.writingMode="vertical-lr":o.vertical==="rl"&&(s.writingMode="vertical-rl"),o.region&&(s.region.id=o.region.id,s.region.height=o.region.lines,s.region.heightUnits=2,s.region.regionAnchorX=o.region.regionAnchorX,s.region.regionAnchorY=o.region.regionAnchorY,s.region.scroll=o.region.scroll,s.region.viewportAnchorX=o.region.viewportAnchorX,s.region.viewportAnchorY=o.region.viewportAnchorY,s.region.viewportAnchorUnits=qt,s.region.width=o.region.width,s.region.widthUnits=qt),Pu(s),o=s}o&&((s=e.g.mediaSource.modifyCueCallback)&&s(o,null,n),i.push(o))}e.o.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}d.Ef=function(e,t,n){function i(){var o=r.i.variants.find(function(u){return u.id==e.id});if(o&&us(o)){var s=r.l.o;r.g.abr.enabled&&(s.video!=o.video||s.audio&&o.audio&&s.audio.language==o.audio.language&&s.audio.channelsCount==o.audio.channelsCount&&s.audio.label==o.audio.label)&&Ae("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),r.ua()?Ns(r,o,!1,!1,0):Ns(r,o,!1,t||!1,n||0),r.M.configure({language:o.language,role:o.audio&&o.audio.roles&&o.audio.roles[0]||"",channelCount:o.audio&&o.audio.channelsCount?o.audio.channelsCount:0,Ec:o.video&&o.video.hdr?o.video.hdr:"",spatialAudio:o.audio&&o.audio.spatialAudio?o.audio.spatialAudio:!1,videoLayout:o.video&&o.video.videoLayout?o.video.videoLayout:"",Jc:o.audio&&o.audio.label?o.audio.label:"",Ed:"",codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:o.audio&&o.audio.codecs?o.audio.codecs:"",Gd:s.audio&&s.audio.codecs?s.audio.codecs:"",Fe:s.audio&&s.audio.channelsCount?s.audio.channelsCount:0,preferredAudioCodecs:r.g.preferredAudioCodecs,preferredAudioChannelCount:r.g.preferredAudioChannelCount}),wi(r)}}var r=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.F&&(i(),!this.ua()))&&function(){if(e.originalAudioId&&r.h&&r.h.audioTracks){var o=Array.from(r.h.audioTracks);o=g(o);for(var s=o.next();!s.done;s=o.next())if(s=s.value,Fu(s)==e.id){Jf(r,s);break}}}()},d.Ok=function(e,t){function n(){var r=i.M.getConfiguration();r.audioCodec=e.codecs||"",r.Jc=e.label||"",r.channelCount=e.channelsCount||0,r.language=e.language,r.role=e.roles[0]||"",r.spatialAudio=e.spatialAudio,i.M.configure(r),Ir(i,!0,t,!1,!1)}var i=this;t=t===void 0?0:t,!(this.i&&this.F&&(n(),!this.ua()))&&function(){if(i.h&&i.h.audioTracks){var r=ke(e.language),o=Array.from(i.h.audioTracks),s=null;o=g(o);for(var u=o.next();!u.done;u=o.next()){u=u.value;var a=u.language||"und";if(u.label==e.label&&ke(a)==r&&u.kind==e.roles[0]){s=u;break}}s&&Jf(i,s)}}()},d.getAudioTracks=function(){if(this.i&&!this.ua()){var e=this.Qb();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e;if(this.m!=Lt||this.ua()||(n=e.filter(function(o){return o.originalVideoId===t.originalVideoId&&o.audioCodec})),!n.length)return[];e=new Map,n=g(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.originalAudioId;r||i.audioId==null||(r=String(i.audioId)),r&&e.set(r,{active:i.active,language:i.language,label:i.label,mimeType:i.audioMimeType,codecs:i.audioCodec,primary:i.primary,roles:i.audioRoles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage})}return Array.from(e.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(o){var s=o.language;return s={active:o.enabled,language:ke(s||"und"),label:o.label,mimeType:null,codecs:null,primary:o.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:s},o.kind&&s.roles.push(o.kind),o.configuration&&(o.configuration.codec&&(s.codecs=o.configuration.codec),o.configuration.sampleRate&&(s.audioSamplingRate=o.configuration.sampleRate),o.configuration.numberOfChannels&&(s.channelsCount=o.configuration.numberOfChannels)),s}):[]},d.Qk=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?0:n;var i=this.Qb();if(i.length){var r=i.find(function(o){return o.active});r&&(i=i.find(function(o){return o.audioId===r.audioId&&(o.videoBandwidth||o.bandwidth)==e.bandwidth&&o.width==e.width&&o.height==e.height&&o.frameRate==e.frameRate&&o.pixelAspectRatio==e.pixelAspectRatio&&o.hdr==e.hdr&&o.colorGamut==e.colorGamut&&o.videoLayout==e.videoLayout&&o.videoMimeType==e.mimeType&&o.videoCodec==e.codecs}))&&!i.active&&this.Ef(i,t,n)}},d.getVideoTracks=function(){if(this.m==en||this.ua())return[];var e=this.Qb();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e.filter(function(o){return o.originalAudioId===t.originalAudioId&&o.audioId===t.audioId&&o.audioGroupId===t.audioGroupId&&o.videoCodec});if(!n.length)return[];e=new Map,n=g(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.originalVideoId;r||i.videoId==null||(r=String(i.videoId)),r&&e.set(r,{active:i.active,bandwidth:i.videoBandwidth||i.bandwidth,width:i.width,height:i.height,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,mimeType:i.videoMimeType,codecs:i.videoCodec})}return Array.from(e.values())},d.sj=function(){return Fv(this.Qb())},d.Rj=function(){return Fv(this.Dc())},d.rj=function(){return Array.from(bv(this.Qb()))},d.Qj=function(){return Array.from(bv(this.Dc()))},d.Hi=function(e,t,n,i,r,o,s){function u(){function l(m,y){return m.video||y.video?m.video&&y.video?Math.abs((m.video.height||0)-(y.video.height||0))+Math.abs((m.video.width||0)-(y.video.width||0)):1/0:0}var c=a.l.o;a.M=a.g.adaptationSetCriteriaFactory(),a.M.configure({language:e,role:t||"",channelCount:n||0,Ec:"",spatialAudio:o||!1,videoLayout:"",Jc:s||"",Ed:"",codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:r||"",Gd:c.audio&&c.audio.codecs?c.audio.codecs:"",Fe:c.audio&&c.audio.channelsCount?c.audio.channelsCount:0,preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount});var f=a.M.create(a.i.variants),p=null;f=g(f.values());for(var h=f.next();!h.done;h=f.next())h=h.value,us(h)&&(!p||l(p,c)>l(h,c))&&(p=h);p!=c&&(p?(c=pr(p),a.Ef(c,!0,i||0)):Ir(a))}var a=this;n=n===void 0?0:n,i=i===void 0?0:i,r=r===void 0?"":r,o=o===void 0?!1:o,s=s===void 0?"":s,!(this.i&&this.F&&(u(),!this.ua()))&&function(){if(a.h&&a.h.audioTracks){var l=Wr(a.Qb(),e,t||"",!1)[0];l&&a.Ef(l)}}()},d.ih=function(e,t,n){function i(){r.xd=e,r.se=t||"",r.re=n||!1;var o=Wr(r.i.textStreams,r.xd,r.se,r.re)[0]||null;o&&o!=r.l.A&&(Nf(r.A.h,o,!1),r.g.streaming.alwaysStreamText||r.Ng())&&(ya(r.l,o),Cr(r),js(r))}var r=this;n=n===void 0?!1:n,!(this.i&&this.F&&(i(),!this.ua()))&&function(){var o=Wr(r.Dc(),e,t||"",n||!1)[0];o&&r.jh(o)}()},d.Pk=function(e,t,n){function i(){for(var o=null,s=g(r.i.variants),u=s.next();!u.done;u=s.next())if(u=u.value,u.audio.label==e){o=u;break}o!=null&&(r.M=r.g.adaptationSetCriteriaFactory(),r.M.configure({language:o.language,role:"",channelCount:0,Ec:"",spatialAudio:!1,videoLayout:"",Ed:"",Jc:e,codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Gd:"",Fe:0,preferredAudioCodecs:r.g.preferredAudioCodecs,preferredAudioChannelCount:r.g.preferredAudioChannelCount}),Ir(r,t,n))}var r=this;t=t===void 0?!0:t,n=n===void 0?0:n,!(this.i&&this.F&&(i(),!this.ua()))&&function(){if(r.h&&r.h.audioTracks){var o=Array.from(r.h.audioTracks),s=null;o=g(o);for(var u=o.next();!u.done;u=o.next())u=u.value,u.label==e&&(s=u);s&&Jf(r,s)}}()},d.Ng=function(){var e=this.ba;return this.o?this.o.isTextVisible():e},d.wj=function(){return this.eb.map(function(e){return hr(e)})},d.uj=function(e){if(Ee("getChapters","Please use an getChaptersAsync."),!this.eb.length)return[];var t=ke(e);if(e=this.eb.filter(function(o){return ke(o.language)==t}),!e.length)return[];var n=[],i=new Set;e=g(e);for(var r=e.next();!r.done;r=e.next())r=r.value,r.segmentIndex&&r.segmentIndex.Eb(function(o){var s=o.O()[0],u=o.startTime+"-"+o.endTime+"-"+s;o={id:u,title:s,startTime:o.startTime,endTime:o.endTime},i.has(u)||(n.push(o),i.add(u))});return n},d.vj=function(e){var t=this,n,i,r,o,s,u,a;return k(function(l){switch(l.g){case 1:if(!t.eb.length)return l.return([]);if(n=ke(e),i=t.eb.filter(function(c){return ke(c.language)==n}),!i.length)return l.return([]);r=[],o=new Set,s=g(i),u=s.next();case 2:if(u.done){l.u(4);break}if(a=u.value,a.segmentIndex){l.u(5);break}return T(l,a.createSegmentIndex(),5);case 5:a.segmentIndex.Eb(function(c){var f=c.O()[0],p=c.startTime+"-"+c.endTime+"-"+f;c={id:p,title:f,startTime:c.startTime,endTime:c.endTime},o.has(p)||(r.push(c),o.add(p))}),u=s.next(),l.u(2);break;case 4:return l.return(r)}})};function Va(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function tE(e){return Array.from(e.h.textTracks).find(function(t){return t.label=="Shaka Player TextTrack"})}function nE(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}d.oh=function(e){e=!!e,this.ba!=e&&(this.ba=e,this.m==Lt?(this.o.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.l.A||(e=Wr(this.i.textStreams,this.xd,this.se,this.re),0<e.length&&(ya(this.l,e[0]),Cr(this),js(this))):Nw(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.o.setTextVisibility(e),Uv(this))},d.Kj=function(){if(this.F)var e=this.F.De();else{if(this.N==null)return new Date;if(this.N instanceof Date)return this.N;e=this.N}if(this.i&&!this.ua()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},d.Gg=function(){if(this.i&&!this.ua()){var e=this.i.presentationTimeline;return new Date(1e3*(e.m||e.i))}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),isNaN(e.getTime())?null:e):null},d.We=function(){return this.V()&&this.i?this.i.presentationTimeline.We():null},d.Nb=function(){if(this.m==Lt)return this.G.Nb();var e={total:[],audio:[],video:[],text:[]};return this.m==en&&(e.total=yi(this.h.buffered)),e},d.Ue=function(){if(!this.h||!this.h.currentTime)return null;var e=this.Gg().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},d.getStats=function(){if(this.m!=Lt&&this.m!=en)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};Qf(this);var e=this.h,t=e.currentTime/e.duration;if(isNaN(t)||this.V()||sA(this.A,Math.round(100*t)),this.F&&(this.A.S=this.F.Dh(),this.A.U=this.F.Eh()),e.getVideoPlaybackQuality&&(t=e.getVideoPlaybackQuality(),oA(this.A,Number(t.droppedVideoFrames),Number(t.totalVideoFrames)),this.A.M=Number(t.corruptedVideoFrames)),this.A.o=this.C?hS(this.C):NaN,Wm(this.A,e.videoWidth||NaN,e.videoHeight||NaN),this.A.l="",this.V()&&this.Gg()!=null&&(e=this.Ue()||0,this.A.C=e/1e3),t=this.Qb().find(function(r){return r.active}),e=this.Dc().find(function(r){return r.active}),t){if(t.bandwidth){var n=this.K?this.K.i:1,i=n*t.bandwidth;e&&e.bandwidth&&(i+=n*e.bandwidth),this.A.A=i}t.width&&t.height&&Wm(this.A,t.width||NaN,t.height||NaN),t=t.codecs,e&&(t+=","+(e.codecs||e.mimeType)),t&&(this.A.l=t)}return this.m!=Lt||this.ua()||(this.i&&(this.A.H=this.i.periodCount,this.A.G=this.i.gapCount,this.i.presentationTimeline&&(this.A.K=this.i.presentationTimeline.h)),e=this.s.getBandwidthEstimate(),this.A.s=e),this.m==en&&zm(this.A,NaN),uA(this.A)},d.Hd=function(e,t,n,i,r,o,s){s=s===void 0?!1:s;var u=this,a,l,c,f,p,h,m,y,v,x,S,w;return k(function(A){switch(A.g){case 1:if(u.m!=Lt&&u.m!=en)throw new M(1,7,7004);if(n!="subtitles"&&n!="captions"&&Ae("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){A.u(2);break}return T(A,$f(u,e),3);case 3:i=A.h;case 2:if(a=[],u.B&&(a=u.B.getCuePoints()),u.m!=en){A.u(4);break}return l=ye(),s&&l.Da()==="WEBKIT"&&(n="forced"),T(A,iE(u,e,t,n,i,o||"",a),5);case 5:if(c=A.h,c.track)return bt(u),A.return(eg(c.track));throw new M(1,2,2012);case 4:if(f=gt,p=u.Sa(),h=p.end-p.start,u.i&&(h=u.i.presentationTimeline.getDuration()),h==1/0)throw new M(1,4,4033);if(!a.length){A.u(6);break}return T(A,Ha(u,e,u.I,u.g.streaming.retryParameters),7);case 7:m=A.h,y=kv(u,m,i,a),v=new Blob([y],{type:"text/vtt"}),e=lf(v),i="text/vtt";case 6:if(x={id:u.ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ha(0,h,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:o||null,type:f.Ta,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!s,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([rt(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},S=rt(x.mimeType,x.codecs),w=ns(S),!w)throw new M(2,2,2014,i);return u.i.textStreams.push(x),bt(u),A.return(hr(x))}})},d.He=function(e,t){var n=this,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A;return k(function(D){switch(D.g){case 1:if(n.m!=Lt&&n.m!=en)throw new M(1,7,7004);if(t){D.u(2);break}return T(D,$f(n,e),3);case 3:t=D.h;case 2:if(t!="text/vtt")throw new M(1,2,2017,e);if(i=gt,r=n.Sa(),o=r.end-r.start,n.i&&(o=n.i.presentationTimeline.getDuration()),o==1/0)throw new M(1,4,4045);return T(D,Ha(n,e,n.I,n.g.streaming.retryParameters),4);case 4:if(s=D.h,u=ts(t),!u)throw new M(2,2,2014,t);for(a=u(),l={periodStart:0,segmentStart:0,segmentEnd:o,vttOffset:0},c=se(s),f=a.parseMedia(c,l,e,[]),p=[],h=g(f),m=h.next(),y={};!m.done;y={Qf:void 0,jd:void 0},m=h.next())y.jd=m.value,y.Qf=null,v=function(E){return function(){return E.Qf==null&&(E.Qf=ht([e],[E.jd.payload])),E.Qf||[]}}(y),x=new Z(y.jd.startTime,y.jd.endTime,v,0,null,null,0,0,1/0),y.jd.payload.includes("#xywh")&&(S=y.jd.payload.split("#xywh=")[1].split(","),S.length===4&&x.Hf({height:parseInt(S[3],10),positionX:parseInt(S[0],10),positionY:parseInt(S[1],10),width:parseInt(S[2],10)})),p.push(x);if(w=t,!p.length){D.u(5);break}return T(D,Er(p[0].O()[0],n.I,n.g.manifest.retryParameters),6);case 6:w=D.h;case 5:return A={id:n.ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ie(p),mimeType:w||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:i.Tf,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([rt(w||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},n.m==en?n.Ae.push(A):n.i.imageStreams.push(A),bt(n),D.return(Uc(A))}})},d.Ge=function(e,t,n){var i=this,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S;return k(function(w){switch(w.g){case 1:if(i.m!=Lt&&i.m!=en)throw new M(1,7,7004);if(n){w.u(2);break}return T(w,$f(i,e),3);case 3:n=w.h;case 2:if(r=gt,o=i.Sa(),s=o.end-o.start,i.i&&(s=i.i.presentationTimeline.getDuration()),s==1/0)throw new M(1,4,4054);return T(w,Ha(i,e,i.I,i.g.streaming.retryParameters),4);case 4:if(u=w.h,a=ts(n),!a)throw new M(2,2,2014,n);for(l=a(),c={periodStart:0,segmentStart:0,segmentEnd:s,vttOffset:0},f=se(u),p=l.parseMedia(f,c,e,[]),h=[],m=g(p),y=m.next(),v={};!y.done;v={Qe:void 0},y=m.next())v.Qe=y.value,x=new Z(v.Qe.startTime,v.Qe.endTime,function(A){return function(){return[A.Qe.payload]}}(v),0,null,null,0,0,1/0),h.push(x);return S={id:i.ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ie(h),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:r.Ta,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([rt("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},i.eb.push(S),bt(i),w.return(hr(S))}})};function $f(e,t){var n;return k(function(i){switch(i.g){case 1:return ue(i,2),T(i,Er(t,e.I,e.g.streaming.retryParameters),4);case 4:n=i.h,ce(i,3);break;case 2:ae(i);case 3:if(n)return i.return(n);throw new M(1,2,2011,t)}})}function iE(e,t,n,i,r,o,s){var u,a,l,c;return k(function(f){if(f.g==1)return r!="text/vtt"||s.length?T(f,Ha(e,t,e.I,e.g.streaming.retryParameters),3):f.u(2);f.g!=2&&(u=f.h,a=kv(e,u,r,s),l=new Blob([a],{type:"text/vtt"}),t=lf(l),r="text/vtt"),c=document.createElement("track");var p=e.L,h=t;try{if(p.g.enabled){var m=Vf(p);m.ot=Gf,m.su=!0;var y=Pa(m),v=Hf(h,y)}else v=h}catch(x){tr("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),v=h}return c.src=v,c.label=o,c.kind=i,c.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(c),e.Xf.push(c),f.return(c)})}function Ha(e,t,n,i){var r,o,s;return k(function(u){if(u.g==1){r=jn,o=lt([t],i),o.method="GET";var a=e.L;try{a.g.enabled&&yo(a,o,{ot:Gf,su:!0})}catch(l){tr("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return T(u,n.request(r,o).promise,2)}return s=u.h,u.return(s.data)})}function kv(e,t,n,i){var r=ts(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=se(t),t=n.parseMedia(t,e,null,[]),CA(t,i);throw new M(2,2,2014,n)}d.Vk=function(e,t){this.wa.width=e,this.wa.height=t},d.eh=function(e){if(this.m==Lt){var t=this.l;if(e=e===void 0?.1:e,t.l.g)t=!1;else if(t.B)t=!1;else{for(var n=g(t.h.values()),i=n.next();!i.done;i=n.next())i=i.value,!i.Sd||i.Qa||i.zb||(i.Sd=!1,_t(t,i,e));t=!0}}else t=!1;return t},d.Fg=function(){return Ae("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},d.Gj=function(){return this.qc},d.Aj=function(){var e={video:null,audio:null,text:null};if(this.m!=Lt)return e;var t=this.l.o,n=this.h.currentTime;t=g([t.video,t.audio,this.l.A]);for(var i=t.next();!i.done;i=t.next())if((i=i.value)&&i.segmentIndex){var r=i.segmentIndex.find(n);r=i.segmentIndex.get(r),r={codecs:r.codecs||i.codecs,mimeType:r.mimeType||i.mimeType,bandwidth:r.bandwidth||i.bandwidth},i.type=="video"?(r.width=i.width,r.height=i.height,e.video=r):i.type=="audio"?e.audio=r:i.type==pe&&(e.text=r)}return e};function Xn(e){var t=mo();return t.streaming.failureCallback=function(n){if(e.V()){var i=null;n.code==1001||n.code==1002?(i=1,e.g.streaming.lowLatencyMode&&(i=.1)):n.code==1003&&(i=.1),i!=null&&(n.severity=1,e.eh(i))}},t.textDisplayFactory=function(){var n=ye();return e.we&&(document.fullscreenEnabled||n.Da()!=="WEBKIT")?new kt(e.h,e.we):"track"in document.createElement("track")?new ct(e):new Mt},t}d.Oi=function(e){this.we=e};function rE(e,t){for(var n=new Set,i=g(t.textStreams),r=i.next();!r.done;r=i.next())r=r.value,r.mimeType!="application/cea-608"&&r.mimeType!="application/cea-708"||n.add(r.originalId);for(i=g(t.variants),r=i.next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var o=g(r.closedCaptions.keys()),s=o.next();!s.done;s=o.next())if(s=s.value,!n.has(s)){var u=s.startsWith("CC")?"application/cea-608":"application/cea-708",a=new Je,l=r.closedCaptions.get(s);u={id:e.ve++,originalId:s,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:a,mimeType:u,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:pe,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([rt(u,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(u),n.add(s)}}}function oE(e,t){var n,i,r,o,s;return k(function(u){return u.g==1?(n=e.audio,i=e.video,r=function(a,l){var c,f,p;return k(function(h){return h.g==1?a?a.segmentIndex?h.u(2):T(h,a.createSegmentIndex(),2):h.return(null):(f=(c=a.segmentIndex.Wb(l))?c.next().value:null,f?(p=f.startTime,h.return(p)):h.return(null))})},T(u,r(n,t),2)):u.g!=3?(o=u.h,T(u,r(i,t),3)):(s=u.h,s!=null&&o!=null?u.return(Math.max(s,o)):s!=null?u.return(s):o!=null?u.return(o):u.return(t))})}function Ga(e){var t=e.Mg();if(e.A&&e.P&&e.F){if(e.g.streaming.rebufferingGoal==0){var n=e.K;n.j=!1,hf(n)}else n=e.K,n.j=t,hf(n);if(e.L&&(n=e.L,t||n.s||(n.s=!0),n.s&&t&&(n.B=!0),n.F=t),Qf(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Ee<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.U&&(e.U=Math.min(e.U+ ++e.Ee*r,n-i))}}t=new Map().set("buffering",t),e.dispatchEvent(be("buffering",t))}function Dv(e,t){e.bc.Ra(),e.bc.D(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Sa(),r=e.V(),o=r?e.g.streaming.safeSeekOffset:0;0<t?(!r||1<=t)&&Math.floor(n)>=Math.floor(i.end)&&e.Id():Math.floor(n)<=Math.floor(i.start+o)&&e.Id()})}function Qf(e){if(e.A&&e.P){var t=e.A.g,n="playing";e.P.g==Zr?n="buffering":e.Wd()?n="ended":e.h.paused&&(n="paused");var i=n;if(t.g==null)t.g={timestamp:Date.now()/1e3,state:i,duration:0},t=!0;else{var r=Date.now()/1e3;t.g.duration=r-t.g.timestamp,t.g.state==i?t=!1:(t.h.push(t.g),t.g={timestamp:r,state:i,duration:0},t=!0)}t&&(n=new Map().set("newstate",n),e.dispatchEvent(be("statechanged",n)))}}function Rv(e){var t=e.h.playbackRate,n=e.V();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.Vh();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.ke(i,!1):r==1&&t!==e.K.Pc()&&e.Id()}if(n&&(n=e.Sa(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var o=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var s=e.g.streaming.liveSync.targetLatency,u=s+i,a=Math.max(0,s-i),l=e.g.streaming.liveSync.maxPlaybackRate,c=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(s=e.i.serviceDescription.targetLatency,e.i.serviceDescription.targetLatency!=null?u=e.i.serviceDescription.targetLatency+i:e.i.serviceDescription.maxLatency!=null&&(u=e.i.serviceDescription.maxLatency),e.i.serviceDescription.targetLatency!=null?a=Math.max(0,e.i.serviceDescription.targetLatency-i):e.i.serviceDescription.minLatency!=null&&(a=e.i.serviceDescription.minLatency),l=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,c=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.U||typeof s!="number"||(e.U=s);var f=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.$b&&e.U!==null&&typeof s=="number"&&e.Ee<f&&Date.now()-e.$b>1e3*o&&(o=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.U=Math.max(e.U-(s-o)/2,o+i),e.$b=Date.now()),r&&e.U!==null&&(u=e.U+i,a=e.U-i),s=n.end-e.h.currentTime,i=0,e.m==en&&(r=e.h.buffered,0<r.length&&(i=r.end(r.length-1),i=Math.max(l,i-n.end))),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,o=Date.now()-e.P.h,n&&!c&&(c=e.g.streaming.liveSync.minPlaybackRate),n&&c&&o<=r?t!=c&&e.ke(c,!1):u!=null&&l&&s-i>u?(t!=l&&e.ke(l,!1),e.$b=null):a!=null&&c&&s-i<a?(t!=c&&e.ke(c,!1),e.$b=null):t!==e.K.Pc()&&(e.Id(),e.$b=Date.now())}}function Ka(e){if(e.h){var t=function(r,o){var s=s===void 0?Number.EPSILON:s;if(r===o)s=!0;else{var u=Math.abs(r-o);s=u<=s?!0:s!==Number.EPSILON?Math.abs(u-s)<=Number.EPSILON:!1}return(s||o>r)&&e.Wf<r?(e.Wf=r,!0):!1},n=e.Sa();if(n=n.end-n.start,n=0<n?e.h.currentTime/n:0,!isNaN(n)){if(n*=100,t(0,n))var i=be("started");else t(25,n)?i=be("firstquartile"):t(50,n)?i=be("midpoint"):t(75,n)?i=be("thirdquartile"):((t(100,n)||100<n)&&(i=be("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Wd()&&e.h.pause());i&&e.dispatchEvent(i)}}}function wi(e){try{Bg(e.ue,e.i)}catch(n){return xo(e,n),!1}var t=Vu(e.i.variants);return t=e.M.create(t),e.s.setVariants(Array.from(t.values())),!0}function Ir(e,t,n,i,r){t=t===void 0?!0:t,n=n===void 0?0:n,i=i===void 0?!1:i,r=r===void 0?!0:r;var o;(o=wi(e)?e.s.chooseVariant():null)&&Ns(e,o,r,t,n,i)}function Ns(e,t,n,i,r,o){o=o===void 0?!1:o;var s=e.l.o;if(t==s)i&&Fm(e.l,t,i,r,!0);else{var u=e.A.h;if(u.h!=t&&(u.h=t,u.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Fm(e.l,t,i,r,o,n),i=null,s&&(i=pr(s)),s=pr(t),s.active=!0,e.S&&(r=e.S,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),o=0,u=-1,t.mimeType){case"video/webm":o=1;break;case"video/mp4":o=2}switch(e.Xh()){case"DASH":u=1;break;case"HLS":u=0}r.g&&(r.g.setLevelSwitching(t.id,!0),r.g.setContainerFormat(o),r.j||r.g.setStreamingFormat(u))}n?(n=new Map().set("oldTrack",i).set("newTrack",s),n=be("adaptation",n),Mr(e,n)):Lv(e,i,s),Nv(e,i,s)}}function Jf(e,t){var n=Array.from(e.h.audioTracks).find(function(r){return r.enabled});if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var i=Pv(e);n=Bu(n,i),t=Bu(t,i),Lv(e,n,t),Nv(e,n,t)}}function Pv(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find(function(t){return t.selected}):null}function bt(e){var t=be("trackschanged");Mr(e,t),jv(e)}function Lv(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),t=be("variantchanged",t),Mr(e,t)}function Nv(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&jv(e)}function jv(e){var t=be("audiotrackschanged");Mr(e,t)}function Cr(e){var t=be("textchanged");Mr(e,t)}function Uv(e){var t=be("texttrackvisibility");Mr(e,t)}function Ov(e){e.g.abr.enabled||Zf(e);var t=new Map().set("newStatus",e.g.abr.enabled);Mr(e,be("abrstatuschanged",t))}function js(e){var t=e.Dc().find(function(n){return n.active});t&&e.o&&e.o.setTextLanguage&&e.o.setTextLanguage(t.language)}function Zf(e,t){if(t=t===void 0?!0:t,e.m==Lt){e.xe.stop();for(var n=g(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&wi(e)}}d.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===Un||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(u){var a=u[e.type];return a&&a.id!==e.id&&!u.disabledUntilTime?e.type=="audio"?e.language===a.language:!0:!1})){for(var n=!1,i=!1,r=g(this.i.variants),o=r.next();!o.done;o=r.next()){o=o.value;var s=o[e.type];s&&(s.id===e.id?(o.disabledUntilTime=Date.now()/1e3+t,n=!0):s.trickModeVideo&&s.trickModeVideo.id==e.id&&(i=!0))}return!n&&i?!1:(this.xe.Fa(1),t=this.Nb().video.reduce(function(u,a){return u+a.end-a.start},0),Ir(this,!1,t,!0,!1),!0)}return!1};function xo(e,t){var n,i,r,o,s;return k(function(u){switch(u.g){case 1:if(e.m==Un)return u.return();if(t.severity===1&&e.A.L++,n=!0,!(e.Oa&&e.i&&e.l)||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3024&&t.code!=3018){u.u(2);break}return i=ye(),i.Da()==="WEBKIT"&&t.code==3016?u.return():(ue(u,3),T(u,kf(e.l),5));case 5:r=u.h,n=!r,r&&(o=be("mediasourcerecovered"),e.dispatchEvent(o)),ce(u,2);break;case 3:ae(u),n=!0;case 2:if(!n)return u.return();t.severity===2&&Zf(e,!1),s=be("error",new Map().set("detail",t)),e.dispatchEvent(s),s.defaultPrevented&&(t.handled=!0),K(u)}})}d.addFont=function(e,t){return qS(e,t)};function Us(e,t,n,i){i=i===void 0?e:i,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventElement:n.eventElement,eventNode:n.eventNode}),i.dispatchEvent(be(t,e))}function _v(e,t,n,i){i=i===void 0?!1:i,t=new Map().set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(be(i?"audiotrackchanged":"mediaqualitychanged",t))}function ed(e,t){if(t=t===void 0?!0:t,!e.h.error)return t?new M(2,3,3016):null;var n=e.h.error.code;return!t&&n==1?null:((t=e.h.error.msExtendedCode)&&(0>t&&(t+=Math.pow(2,32)),t=t.toString(16)),new M(2,3,3016,n,t,e.h.error.message))}function td(e,t,n){0<t&&(e.V()||e.Ni(t)),t=e.getDuration(),n<t&&(e.V()||e.pb(n))}function Mr(e,t){k(function(n){if(n.g==1)return T(n,Promise.resolve(),2);e.m!=Un&&e.dispatchEvent(t),K(n)})}function bv(e){var t=new Set;e=g(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.language?t.add(ke(n.language)):t.add("und");return t}function Fv(e){for(var t=new Map,n=new Map,i=0;i<e.length;i++){var r=e[i],o="und",s=[];r.language&&(o=ke(r.language)),r.type=="variant"?s=r.audioRoles:s=r.roles,s&&s.length||(s=[""]),t.has(o)||t.set(o,new Set),s=g(s);for(var u=s.next();!u.done;u=s.next())u=u.value,t.get(o).add(u),r.label&&(n.has(o)||n.set(o,new Map),n.get(o).set(u,r.label))}var a=[];return t.forEach(function(l,c){l=g(l);for(var f=l.next();!f.done;f=l.next()){f=f.value;var p=null;n.has(c)&&n.get(c).has(f)&&(p=n.get(c).get(f)),a.push({language:c,role:f,label:p})}}),a}d.ua=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1},d.Wd=function(){return!this.h||this.h.ended?!0:this.Oa&&!this.V()&&this.h.currentTime>=this.Sa().end},W("shaka.Player",_),_.prototype.isEnded=_.prototype.Wd,_.prototype.isRemotePlayback=_.prototype.ua,_.prototype.addFont=_.prototype.addFont,_.prototype.setVideoContainer=_.prototype.Oi,_.prototype.getFetchedPlaybackInfo=_.prototype.Aj,_.prototype.getManifestParserFactory=_.prototype.Gj,_.prototype.getManifest=_.prototype.Fg,_.prototype.retryStreaming=_.prototype.eh,_.prototype.setMaxHardwareResolution=_.prototype.Vk,_.prototype.addChaptersTrack=_.prototype.Ge,_.prototype.addThumbnailsTrack=_.prototype.He,_.prototype.addTextTrackAsync=_.prototype.Hd,_.prototype.getStats=_.prototype.getStats,_.prototype.getBufferedInfo=_.prototype.Nb,_.prototype.getSegmentAvailabilityDuration=_.prototype.We,_.prototype.getPresentationStartTimeAsDate=_.prototype.Gg,_.prototype.getPlayheadTimeAsDate=_.prototype.Kj,_.prototype.setTextTrackVisibility=_.prototype.oh,_.prototype.getChaptersAsync=_.prototype.vj,_.prototype.getChapters=_.prototype.uj,_.prototype.getChaptersTracks=_.prototype.wj,_.prototype.isTextTrackVisible=_.prototype.Ng,_.prototype.selectVariantsByLabel=_.prototype.Pk,_.prototype.selectTextLanguage=_.prototype.ih,_.prototype.selectAudioLanguage=_.prototype.Hi,_.prototype.getTextLanguages=_.prototype.Qj,_.prototype.getAudioLanguages=_.prototype.rj,_.prototype.getTextLanguagesAndRoles=_.prototype.Rj,_.prototype.getAudioLanguagesAndRoles=_.prototype.sj,_.prototype.getVideoTracks=_.prototype.getVideoTracks,_.prototype.selectVideoTrack=_.prototype.Qk,_.prototype.getAudioTracks=_.prototype.getAudioTracks,_.prototype.selectAudioTrack=_.prototype.Ok,_.prototype.selectVariantTrack=_.prototype.Ef,_.prototype.selectTextTrack=_.prototype.jh,_.prototype.getThumbnails=_.prototype.Tj,_.prototype.getAllThumbnails=_.prototype.qj,_.prototype.getImageTracks=_.prototype.Cj,_.prototype.getTextTracks=_.prototype.Dc,_.prototype.getVariantTracks=_.prototype.Qb,_.prototype.cancelTrickPlay=_.prototype.Id,_.prototype.trickPlay=_.prototype.ke,_.prototype.useTrickPlayTrackIfAvailable=_.prototype.Ch,_.prototype.getPlaybackRate=_.prototype.ub,_.prototype.isBuffering=_.prototype.Mg,_.prototype.getKeyStatuses=_.prototype.Te,_.prototype.getActiveSessionsMetadata=_.prototype.Eg,_.prototype.getExpiration=_.prototype.Pd,_.prototype.drmInfo=_.prototype.drmInfo,_.prototype.keySystem=_.prototype.keySystem,_.prototype.isFullyLoaded=_.prototype.dk,_.prototype.goToLive=_.prototype.Zj,_.prototype.seekRange=_.prototype.Sa,_.prototype.isVideoOnly=_.prototype.jk,_.prototype.isAudioOnly=_.prototype.ck,_.prototype.isInProgress=_.prototype.Tc,_.prototype.isLive=_.prototype.V,_.prototype.getQueueManager=_.prototype.$h,_.prototype.getAdManager=_.prototype.Uh,_.prototype.getAssetUri=_.prototype.nd,_.prototype.getNetworkingEngine=_.prototype.Pb,_.prototype.getMediaElement=_.prototype.Jj,_.prototype.getManifestType=_.prototype.Xh,_.prototype.getLoadMode=_.prototype.Fj,_.prototype.resetConfiguration=_.prototype.Ci,_.prototype.getBufferFullness=_.prototype.Vh,_.prototype.getNonDefaultConfiguration=_.prototype.Zh,_.prototype.getConfigurationForLowLatency=_.prototype.xj,_.prototype.getConfiguration=_.prototype.getConfiguration,_.prototype.configurationForLowLatency=_.prototype.nj,_.prototype.configure=_.prototype.configure,_.prototype.releaseAllMutexes=_.prototype.Gk,_.prototype.destroyAllPreloads=_.prototype.ng,_.prototype.preload=_.prototype.preload,_.prototype.detachAndSavePreload=_.prototype.Qh,_.prototype.unloadAndSavePreload=_.prototype.Yk,_.prototype.load=_.prototype.load,_.prototype.updateStartTime=_.prototype.cl,_.prototype.unload=_.prototype.vc,_.prototype.detach=_.prototype.detach,_.prototype.attachCanvas=_.prototype.fj,_.prototype.attach=_.prototype.fc,_.probeSupport=function(e){e=e===void 0?!0:e;var t,n,i,r,o,s,u;return k(function(a){switch(a.g){case 1:if(t={},!e){a.u(2);break}return T(a,TS(),3);case 3:t=a.h;case 2:return n=DS(),i=nw(),r=ye(),T(a,r.ic(),4);case 4:return o=a.h,s={manifest:n,media:i,drm:t,hardwareResolution:o},u=Vv,u.forEach(function(l,c){s[c]=l()}),a.return(s)}})},_.isBrowserSupported=function(){return F.Promise||Ae("A Promise implementation or polyfill is required"),!(F.Promise&&F.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/")?!1:(ye(),Zn()?!0:xr().canPlayType("application/x-mpegurl")!="")},_.setQueueManagerFactory=function(e){za=e},_.setAdManagerFactory=function(e){Wa=e},_.registerSupportPlugin=hv,_.prototype.destroy=_.prototype.destroy;var Un=0,Xa=1,Lt=2,en=3;_.LoadMode={DESTROYED:Un,NOT_LOADED:Xa,MEDIA_SOURCE:Lt,SRC_EQUALS:en},_.version="v4.15.7";var Bv=["4","15"];ph=new function(e){this.g=e,this.i=Cx,this.h=Mx}(new lc(Number(Bv[0]),Number(Bv[1])));var Vv=new Map,Wa=null,za=null;function Hv(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function sE(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function ee(e,t,n){var i=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.j=this.h.getVolume(),this.l=new Me,this.l.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.l.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}d=ee.prototype,d.needsSkipUI=function(){return!1},d.isClientRendering=function(){return!0},d.hasCustomClick=function(){return!0},d.isUsingAnotherMediaElement=function(){return!0},d.getDuration=function(){return this.g.getDuration()},d.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},d.getRemainingTime=function(){return this.h.getRemainingTime()},d.isPaused=function(){return this.i},d.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},d.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},d.canSkipNow=function(){return this.h.getAdSkippableState()},d.skip=function(){return this.h.skip()},d.pause=function(){return this.h.pause()},d.play=function(){return this.h.resume()},d.getVolume=function(){return this.h.getVolume()},d.setVolume=function(e){return this.m.volume=e,this.h.setVolume(e)},d.isMuted=function(){return this.h.getVolume()==0},d.isLinear=function(){return this.g.isLinear()},d.resize=function(e,t){this.h.resize(e,t)},d.setMuted=function(e){(this.m.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},d.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},d.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},d.getTitle=function(){return this.g.getTitle()},d.getDescription=function(){return this.g.getDescription()},d.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},d.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},d.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},d.getVastAdId=function(){return""},d.getAdId=function(){return this.g.getAdId()},d.getCreativeAdId=function(){return this.g.getCreativeAdId()},d.getAdvertiserName=function(){return this.g.getAdvertiserName()},d.getMediaUrl=function(){return this.g.getMediaUrl()},d.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},d.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},d.release=function(){this.h=this.g=null},W("shaka.ads.ClientSideAd",ee),ee.prototype.release=ee.prototype.release,ee.prototype.getPodIndex=ee.prototype.getPodIndex,ee.prototype.getTimeOffset=ee.prototype.getTimeOffset,ee.prototype.getMediaUrl=ee.prototype.getMediaUrl,ee.prototype.getAdvertiserName=ee.prototype.getAdvertiserName,ee.prototype.getCreativeAdId=ee.prototype.getCreativeAdId,ee.prototype.getAdId=ee.prototype.getAdId,ee.prototype.getVastAdId=ee.prototype.getVastAdId,ee.prototype.getVastMediaWidth=ee.prototype.getVastMediaWidth,ee.prototype.getVastMediaHeight=ee.prototype.getVastMediaHeight,ee.prototype.getVastMediaBitrate=ee.prototype.getVastMediaBitrate,ee.prototype.getDescription=ee.prototype.getDescription,ee.prototype.getTitle=ee.prototype.getTitle,ee.prototype.getPositionInSequence=ee.prototype.getPositionInSequence,ee.prototype.getSequenceLength=ee.prototype.getSequenceLength,ee.prototype.setMuted=ee.prototype.setMuted,ee.prototype.resize=ee.prototype.resize,ee.prototype.isLinear=ee.prototype.isLinear,ee.prototype.isMuted=ee.prototype.isMuted,ee.prototype.setVolume=ee.prototype.setVolume,ee.prototype.getVolume=ee.prototype.getVolume,ee.prototype.play=ee.prototype.play,ee.prototype.pause=ee.prototype.pause,ee.prototype.skip=ee.prototype.skip,ee.prototype.canSkipNow=ee.prototype.canSkipNow,ee.prototype.getTimeUntilSkippable=ee.prototype.getTimeUntilSkippable,ee.prototype.isSkippable=ee.prototype.isSkippable,ee.prototype.isPaused=ee.prototype.isPaused,ee.prototype.getRemainingTime=ee.prototype.getRemainingTime,ee.prototype.getMinSuggestedDuration=ee.prototype.getMinSuggestedDuration,ee.prototype.getDuration=ee.prototype.getDuration,ee.prototype.isUsingAnotherMediaElement=ee.prototype.isUsingAnotherMediaElement,ee.prototype.hasCustomClick=ee.prototype.hasCustomClick,ee.prototype.isClientRendering=ee.prototype.isClientRendering,ee.prototype.needsSkipUI=ee.prototype.needsSkipUI;function Ke(){}function Gv(e,t){var n=[];e=g(Ne(e,"Ad"));for(var i=e.next();!i.done;i=e.next())if((i=Ye(i.value,"InLine"))&&(i=Ye(i,"Creatives"))){i=g(Ne(i,"Creative"));for(var r=i.next();!r.done;r=i.next()){r=r.value;var o=Ye(r,"Linear");if(o&&uE(n,t,o),r=Ye(r,"NonLinearAds")){r=Ne(r,"NonLinear"),r=g(r);for(var s=r.next();!s.done;s=r.next())e:{o=n;var u=t,a=s.value,l=Ye(a,"StaticResource");if(l)s=l.attributes.creativeType;else{if(l=Ye(a,"HTMLResource"),!l)break e;s="text/html"}if(l=$t(l)){s==="text/html"&&(l="data:text/html;charset=UTF-8,"+encodeURIComponent(l));var c=oe(a,"width",yt)||oe(a,"expandedWidth",yt),f=oe(a,"height",yt)||oe(a,"expandedHeight",yt);if(c||f){var p=null;(a=a.attributes.minSuggestedDuration)&&(p=Vr(a)),a=0,u!=null&&(a=u),o.push({id:null,groupId:null,startTime:a,endTime:null,uri:l,mimeType:s,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:p,once:!0,pre:u==null,post:u==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:c||0,y:f||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}}}return n}function uE(e,t,n){var i=0;t!=null&&(i=t);var r=null;if(n.attributes.skipoffset&&(r=Vr(n.attributes.skipoffset),isNaN(r)&&(r=null)),n=Ye(n,"MediaFiles")){var o=Ne(n,"MediaFile");for(n=o,o=o.filter(function(u){return u.attributes.delivery=="streaming"}),o.length&&(n=o),n=n.sort(function(u,a){return(parseInt(a.attributes.height,10)||0)-(parseInt(u.attributes.height,10)||0)}),n=g(n),o=n.next();!o.done;o=n.next())if(o=o.value,!o.attributes.apiFramework){var s=$t(o);if(s){e.push({id:null,groupId:null,startTime:i,endTime:null,uri:s,mimeType:o.attributes.type||null,isSkippable:r!=null,skipOffset:r,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:t==null,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}W("shaka.ads.Utils",Ke),Ke.ADS_LOADED="ads-loaded",Ke.AD_STARTED="ad-started",Ke.AD_FIRST_QUARTILE="ad-first-quartile",Ke.AD_MIDPOINT="ad-midpoint",Ke.AD_THIRD_QUARTILE="ad-third-quartile",Ke.AD_COMPLETE="ad-complete",Ke.AD_STOPPED="ad-stopped",Ke.AD_SKIPPED="ad-skipped",Ke.AD_VOLUME_CHANGED="ad-volume-changed",Ke.AD_MUTED="ad-muted",Ke.AD_PAUSED="ad-paused",Ke.AD_RESUMED="ad-resumed",Ke.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Ke.CUEPOINTS_CHANGED="ad-cue-points-changed",Ke.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Ke.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Ke.AD_CLICKED="ad-clicked",Ke.AD_PROGRESS="ad-progress",Ke.AD_BUFFERING="ad-buffering",Ke.AD_IMPRESSION="ad-impression",Ke.AD_DURATION_CHANGED="ad-duration-changed",Ke.AD_CLOSED="ad-closed",Ke.AD_LOADED="ad-loaded",Ke.ALL_ADS_COMPLETED="all-ads-completed",Ke.AD_LINEAR_CHANGED="ad-linear-changed",Ke.AD_METADATA="ad-metadata",Ke.AD_RECOVERABLE_ERROR="ad-recoverable-error",Ke.AD_ERROR="ad-error",Ke.AD_BREAK_READY="ad-break-ready",Ke.AD_INTERACTION="ad-interaction",Ke.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",Ke.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",Ke.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Ya(e,t,n,i,r){var o=this;this.s=e,this.i=t,this.F=!1,this.A=this.o=null,this.G=NaN,this.l=r,this.j=null,this.h=new Me,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.s,this.i),this.C.initialize(),this.m=new google.ima.AdsLoader(this.C),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.15.7"),this.g=null,this.B=i||new google.ima.AdsRenderingSettings,this.h.D(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(s){aE(o,s)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(s){Kv(o,s)}),this.h.D(this.i,"ended",function(){o.m.contentComplete()}),this.h.Aa(this.i,"play",function(){o.F=!0})}Ya.prototype.configure=function(e){this.o=e},Ya.prototype.stop=function(){this.g&&this.g.stop(),this.s&&ys(this.s)},Ya.prototype.release=function(){this.stop(),this.A&&this.A.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.C.destroy()};function Kv(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new G("ad-error",t)),qa(e,null),e.l(new G("ad-cue-points-changed",new Map().set("cuepoints",[])))}function aE(e,t){if(e.l(new G("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.G))),e.o.customPlayheadTracker){var n={currentTime:e.i.currentTime};e.g=t.getAdsManager(n,e.B),e.i.muted?e.g.setVolume(0):e.g.setVolume(e.i.volume),e.h.D(e.i,"timeupdate",function(){e.i.duration&&(n.currentTime=e.i.currentTime)}),e.h.D(e.i,"volumechange",function(){e.j&&(e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))})}else e.g=t.getAdsManager(e.i,e.B);e.l(new G("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var i=e.g.getCuePoints();if(i.length){t=[],i=g(i);for(var r=i.next();!r.done;r=i.next())t.push({start:r.value,end:null});e.l(new G("ad-cue-points-changed",new Map().set("cuepoints",t)))}lE(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight),e.h.D(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),"ResizeObserver"in F?(e.A=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.A.observe(e.i)):e.h.D(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.F||e.o.skipPlayDetection?e.g.start():e.h.Aa(e.i,"play",function(){e.F=!0,e.g.start()})}catch{qa(e,null)}}function lE(e){function t(n,i){n=new Map().set("originalEvent",n),e.l(new G(i,n))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){Kv(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){Xv(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,function(n){Xv(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(n){t(n,"ad-first-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.MIDPOINT,function(n){t(n,"ad-midpoint")}),e.h.D(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(n){t(n,"ad-third-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.COMPLETE,function(n){t(n,"ad-complete")}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){qa(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){qa(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPED,function(n){t(n,"ad-skipped")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(n){t(n,"ad-volume-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(n){t(n,"ad-muted")}),e.h.D(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.D(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.CLICK,function(n){t(n,"ad-clicked")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(n){t(n,"ad-progress")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(n){t(n,"ad-buffering")}),e.h.D(e.g,google.ima.AdEvent.Type.IMPRESSION,function(n){t(n,"ad-impression")}),e.h.D(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(n){t(n,"ad-duration-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(n){t(n,"ad-closed")}),e.h.D(e.g,google.ima.AdEvent.Type.LOADED,function(n){t(n,"ad-loaded")}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed")}),e.h.D(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(n){t(n,"ad-linear-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_METADATA,function(n){t(n,"ad-metadata")}),e.h.D(e.g,google.ima.AdEvent.Type.LOG,function(n){t(n,"ad-recoverable-error")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(n){t(n,"ad-break-ready")}),e.h.D(e.g,google.ima.AdEvent.Type.INTERACTION,function(n){t(n,"ad-interaction")})}function Xv(e,t){var n=t.getAd();n?(e.j=new ee(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new G("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new G("ad-started",t)),e.j.isLinear()&&(e.s.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(t=e.j,t.j=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):Ae("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function qa(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new G("ad-content-resume-requested")),e.l(new G("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.s.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function te(e,t,n,i,r,o){this.g=e,this.i=t,this.j=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.A=n,this.o=i,this.m=r,this.s=o,this.B=t.overlay}d=te.prototype,d.needsSkipUI=function(){return!0},d.isClientRendering=function(){return!0},d.hasCustomClick=function(){return!1},d.isUsingAnotherMediaElement=function(){return this.s},d.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},d.getMinSuggestedDuration=function(){return this.getDuration()},d.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},d.isPaused=function(){return this.g.paused},d.isSkippable=function(){return this.h&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},d.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},d.canSkipNow=function(){return this.h&&this.getTimeUntilSkippable()==0},d.skip=function(){this.canSkipNow()&&this.A()},d.pause=function(){return this.g.pause()},d.play=function(){return this.g.play()},d.getVolume=function(){return this.g.volume},d.setVolume=function(e){this.g.volume=e},d.isMuted=function(){return this.g.muted},d.isLinear=function(){return this.B==null},d.resize=function(){},d.setMuted=function(e){this.g.muted=e},d.getSequenceLength=function(){return this.o},d.getPositionInSequence=function(){return this.m},d.getTitle=function(){return""},d.getDescription=function(){return""},d.getVastMediaBitrate=function(){return 0},d.getVastMediaHeight=function(){return 0},d.getVastMediaWidth=function(){return 0},d.getVastAdId=function(){return""},d.getAdId=function(){return this.i.id||""},d.getCreativeAdId=function(){return""},d.getAdvertiserName=function(){return""},d.getMediaUrl=function(){return this.i.uri},d.getTimeOffset=function(){return 0},d.getPodIndex=function(){return 0},d.release=function(){this.g=null},W("shaka.ads.InterstitialAd",te),te.prototype.release=te.prototype.release,te.prototype.getPodIndex=te.prototype.getPodIndex,te.prototype.getTimeOffset=te.prototype.getTimeOffset,te.prototype.getMediaUrl=te.prototype.getMediaUrl,te.prototype.getAdvertiserName=te.prototype.getAdvertiserName,te.prototype.getCreativeAdId=te.prototype.getCreativeAdId,te.prototype.getAdId=te.prototype.getAdId,te.prototype.getVastAdId=te.prototype.getVastAdId,te.prototype.getVastMediaWidth=te.prototype.getVastMediaWidth,te.prototype.getVastMediaHeight=te.prototype.getVastMediaHeight,te.prototype.getVastMediaBitrate=te.prototype.getVastMediaBitrate,te.prototype.getDescription=te.prototype.getDescription,te.prototype.getTitle=te.prototype.getTitle,te.prototype.getPositionInSequence=te.prototype.getPositionInSequence,te.prototype.getSequenceLength=te.prototype.getSequenceLength,te.prototype.setMuted=te.prototype.setMuted,te.prototype.resize=te.prototype.resize,te.prototype.isLinear=te.prototype.isLinear,te.prototype.isMuted=te.prototype.isMuted,te.prototype.setVolume=te.prototype.setVolume,te.prototype.getVolume=te.prototype.getVolume,te.prototype.play=te.prototype.play,te.prototype.pause=te.prototype.pause,te.prototype.skip=te.prototype.skip,te.prototype.canSkipNow=te.prototype.canSkipNow,te.prototype.getTimeUntilSkippable=te.prototype.getTimeUntilSkippable,te.prototype.isSkippable=te.prototype.isSkippable,te.prototype.isPaused=te.prototype.isPaused,te.prototype.getRemainingTime=te.prototype.getRemainingTime,te.prototype.getMinSuggestedDuration=te.prototype.getMinSuggestedDuration,te.prototype.getDuration=te.prototype.getDuration,te.prototype.isUsingAnotherMediaElement=te.prototype.isUsingAnotherMediaElement,te.prototype.hasCustomClick=te.prototype.hasCustomClick,te.prototype.isClientRendering=te.prototype.isClientRendering,te.prototype.needsSkipUI=te.prototype.needsSkipUI;function ne(e,t,n){this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}d=ne.prototype,d.needsSkipUI=function(){return!0},d.isClientRendering=function(){return!0},d.hasCustomClick=function(){return!1},d.isUsingAnotherMediaElement=function(){return!1},d.getDuration=function(){return-1},d.getMinSuggestedDuration=function(){return this.getDuration()},d.getRemainingTime=function(){return-1},d.isPaused=function(){return!1},d.isSkippable=function(){return!1},d.getTimeUntilSkippable=function(){return 0},d.canSkipNow=function(){return!1},d.skip=function(){},d.pause=function(){},d.play=function(){},d.getVolume=function(){return 1},d.setVolume=function(){},d.isMuted=function(){return!1},d.isLinear=function(){return this.i},d.resize=function(){},d.setMuted=function(){},d.getSequenceLength=function(){return this.j},d.getPositionInSequence=function(){return this.h},d.getTitle=function(){return""},d.getDescription=function(){return""},d.getVastMediaBitrate=function(){return 0},d.getVastMediaHeight=function(){return 0},d.getVastMediaWidth=function(){return 0},d.getVastAdId=function(){return""},d.getAdId=function(){return this.g.id||""},d.getCreativeAdId=function(){return""},d.getAdvertiserName=function(){return""},d.getMediaUrl=function(){return this.g.uri},d.getTimeOffset=function(){return 0},d.getPodIndex=function(){return 0},d.release=function(){},W("shaka.ads.InterstitialStaticAd",ne),ne.prototype.release=ne.prototype.release,ne.prototype.getPodIndex=ne.prototype.getPodIndex,ne.prototype.getTimeOffset=ne.prototype.getTimeOffset,ne.prototype.getMediaUrl=ne.prototype.getMediaUrl,ne.prototype.getAdvertiserName=ne.prototype.getAdvertiserName,ne.prototype.getCreativeAdId=ne.prototype.getCreativeAdId,ne.prototype.getAdId=ne.prototype.getAdId,ne.prototype.getVastAdId=ne.prototype.getVastAdId,ne.prototype.getVastMediaWidth=ne.prototype.getVastMediaWidth,ne.prototype.getVastMediaHeight=ne.prototype.getVastMediaHeight,ne.prototype.getVastMediaBitrate=ne.prototype.getVastMediaBitrate,ne.prototype.getDescription=ne.prototype.getDescription,ne.prototype.getTitle=ne.prototype.getTitle,ne.prototype.getPositionInSequence=ne.prototype.getPositionInSequence,ne.prototype.getSequenceLength=ne.prototype.getSequenceLength,ne.prototype.setMuted=ne.prototype.setMuted,ne.prototype.resize=ne.prototype.resize,ne.prototype.isLinear=ne.prototype.isLinear,ne.prototype.isMuted=ne.prototype.isMuted,ne.prototype.setVolume=ne.prototype.setVolume,ne.prototype.getVolume=ne.prototype.getVolume,ne.prototype.play=ne.prototype.play,ne.prototype.pause=ne.prototype.pause,ne.prototype.skip=ne.prototype.skip,ne.prototype.canSkipNow=ne.prototype.canSkipNow,ne.prototype.getTimeUntilSkippable=ne.prototype.getTimeUntilSkippable,ne.prototype.isSkippable=ne.prototype.isSkippable,ne.prototype.isPaused=ne.prototype.isPaused,ne.prototype.getRemainingTime=ne.prototype.getRemainingTime,ne.prototype.getMinSuggestedDuration=ne.prototype.getMinSuggestedDuration,ne.prototype.getDuration=ne.prototype.getDuration,ne.prototype.isUsingAnotherMediaElement=ne.prototype.isUsingAnotherMediaElement,ne.prototype.hasCustomClick=ne.prototype.hasCustomClick,ne.prototype.isClientRendering=ne.prototype.isClientRendering,ne.prototype.needsSkipUI=ne.prototype.needsSkipUI;function Wv(e,t,n,i){var r=this;this.M=null,this.B=e,this.C=t,this.g=n,this.G=null,this.A=!0,this.h=this.g,this.i=i,this.U=new Set,this.H=new Set,this.F=new Map,this.L=new Map,this.j=new _,od(this),this.I=new Me,this.l=new Me,this.K=!1,this.ha=this.o=this.s=this.m=null,this.ka=!1,this.P=-1,this.ba=function(){if(!r.K&&r.m&&!r.C.ua()){r.m=r.g.currentTime;var o=_s(r);o&&$a(r,o,1,1,Date.now())}},this.W=function(){if(!(r.K||r.m||r.C.ua())){r.m=r.g.currentTime;var o=_s(r,!0);o&&$a(r,o,1,1,Date.now())}},this.na=function(){if(!r.K&&r.m&&!r.C.ua()){var o=r.g.currentTime;r.s&&!r.s.pre&&!r.s.post&&o<(r.s.endTime||r.s.startTime)&&(r.s=null)}},this.S=new Te(this.ba),this.N=new Te(function(){var o,s,u,a,l,c,f,p,h,m,y;return k(function(v){switch(v.g){case 1:if(!r.H.size||r.m==null){v.u(0);break}if(o=r.C.m,o==Un||o==Xa)return v.return();s=!1,u=Array.from(r.H),a=r.C.Sa(),l=g(u),c=l.next();case 3:if(c.done){v.u(5);break}if(f=c.value,f==r.s){v.u(4);break}if(p=f.endTime||f.startTime,!(1<=a.start-p)){h=f.startTime-r.m,0<h&&10>=h&&(!r.F.has(f)&&Yv(f)&&r.F.set(f,r.j.preload(f.uri,null,f.mimeType||void 0)),$v(r,f)),v.u(4);break}if(!r.F.has(f)){v.u(7);break}return T(v,r.F.get(f),8);case 8:(m=v.h)&&m.destroy(),r.F.delete(f);case 7:Qv(r,f),y=JSON.stringify(f),r.U.has(y)&&r.U.delete(y),r.H.delete(f),nd(r),f.overlay||(s=!0);case 4:c=l.next(),v.u(3);break;case 5:s&&Qa(r),K(v)}})}),this.configure(this.C.getConfiguration().ads)}d=Wv.prototype,d.configure=function(e){this.M=e,id(this)};function cE(e){if(!e.ka&&e.H.size){if(e.I.D(e.g,"playing",e.W),e.I.D(e.g,"timeupdate",e.W),e.I.D(e.g,"seeked",e.na),e.I.D(e.g,"ended",e.ba),"requestVideoFrameCallback"in e.g&&!qv()){var t=e.g,n=function(){e.P!=-1&&(e.ba(),e.P!=-1&&(e.P=t.requestVideoFrameCallback(n)))};e.P=t.requestVideoFrameCallback(n)}else e.S.Fa(.025);e.N&&e.N.Fa(1),e.ka=!0}}function nd(e){e.ka&&!e.H.size&&(e.I.Ja(e.g,"playing",e.W),e.I.Ja(e.g,"timeupdate",e.W),e.I.Ja(e.g,"seeked",e.na),e.I.Ja(e.g,"ended",e.ba),e.P!=-1&&(e.g.cancelVideoFrameCallback(e.P),e.P=-1),e.S&&e.S.stop(),e.N&&e.N.stop(),e.ka=!1)}function id(e){if(e.B&&e.M&&!e.K){var t=e.M.supportsMultipleMediaElements,n=e.g;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.A==t&&(e.A=!t,e.A?(e.h=e.g,e.G&&(e.G.parentElement&&e.B.removeChild(e.G),e.G=null)):(e.G||(t=document.createElement(e.g.tagName),t.autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.G=t),e.h=e.G))}else e.A=!0}d.stop=function(){if(this.l&&this.l.Ra(),this.U.clear(),this.H.clear(),this.j.ng(),this.F.size){var e=Array.from(this.F.values());e=g(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(n){n&&n.destroy()})}if(this.F.clear(),this.L.size)for(e=Array.from(this.L.keys()),e=g(e),t=e.next();!t.done;t=e.next())Qv(this,t.value);this.L.clear(),this.j.detach(),this.K=!1,this.s=this.m=null,this.A=!0,this.h=this.g,this.G=null,rd(this),nd(this),this.B&&ys(this.B),this.o&&(this.o.stop(),this.o=null)},d.release=function(){this.stop(),this.I&&this.I.release(),this.l&&this.l.release(),this.S&&(this.S.stop(),this.S=null),this.N&&(this.N.stop(),this.N=null),this.j.destroy()},d.od=function(){return this.j};function fE(e,t){var n;k(function(i){if(i.g==1)return od(e),T(i,gE(e,t),2);n=i.h,n.length?Os(e,n):Ae("Unsupported HLS interstitial",t),K(i)})}function dE(e,t){var n=Ye(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,o=n.attributes.loop=="true",s=oe(n,"z",yt);if(i&&s!=0){var u=null,a=Ye(n,"Background");if(a){var l=a.attributes.uri;l?u="center / contain no-repeat url('"+l+"')":u=$t(a)}a=1920,l=1080;var c=Ye(n,"Viewport");if(c&&(a=oe(c,"x",yt),a==null||(l=oe(c,"y",yt),l==null)))return;var f={viewport:{x:a,y:l},topLeft:{x:0,y:0},size:{x:a,y:l}},p=Ye(n,"Overlay");if(c&&p){var h=Ye(p,"TopLeft"),m=Ye(p,"Size");if(h&&m){if(p=oe(h,"x",yt),p==null||(h=oe(h,"y",yt),h==null))return;var y=oe(m,"x",yt);if(y==null||(m=oe(m,"y",yt),m==null))return;f.topLeft.x=p,f.topLeft.y=h,f.size.x=y,f.size.y=m}}if(p=null,n=Ye(n,"Squeeze"),c&&n&&(m=Ye(n,"TopLeft"),n=Ye(n,"Size"),m&&n)){if(c=oe(m,"x",yt),c==null||(p=oe(m,"y",yt),p==null)||(m=oe(n,"x",yt),m==null)||(n=oe(n,"y",yt),n==null))return;p={viewport:{x:a,y:l},topLeft:{x:c,y:p},size:{x:m,y:n}}}Os(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:i,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:o,overlay:f,displayOnBackground:s==-1,currentVideo:p,background:u}])}}d.addAdUrlInterstitial=function(e){var t=this,n,i,r,o,s,u,a,l,c;return k(function(f){switch(f.g){case 1:return n={type:12},T(f,sd(t,e,n),2);case 2:if(i=f.h,r=qo(i,"VAST,vmap:VMAP"),!r)throw new M(2,10,10007);if(o=[],r.tagName=="VAST"){o=Gv(r,t.m),f.u(3);break}if(r.tagName!="vmap:VMAP"){f.u(3);break}for(var p=[],h=g(Ne(r,"vmap:AdBreak")),m=h.next();!m.done;m=h.next()){var y=m.value,v=y.attributes.timeOffset;v&&(m=null,v=="start"?m=0:v=="end"?m=1/0:m=Vr(v),(y=Ye(y,"vmap:AdSource"))&&(y=Ye(y,"vmap:AdTagURI"))&&(y=ot(y))&&p.push({time:m,uri:y}))}s=g(p),u=s.next();case 5:if(u.done){f.u(3);break}return a=u.value,T(f,sd(t,a.uri,n),8);case 8:if(l=f.h,c=qo(l,"VAST"),!c)throw new M(2,10,10007);o.push.apply(o,H(Gv(c,a.time))),u=s.next(),f.u(5);break;case 3:Os(t,o),K(f)}})};function Os(e,t){var n,i,r,o,s,u,a,l;k(function(c){switch(c.g){case 1:n=!1,i=g(t),r=i.next();case 2:if(r.done){c.u(4);break}if(o=r.value,!o.uri){Ae("Missing URL in interstitial",o),c.u(3);break}if(o.mimeType){c.u(5);break}return ue(c,6),s=e.j.Pb(),T(c,Er(o.uri,s,e.C.getConfiguration().streaming.retryParameters),8);case 8:o.mimeType=c.h,ce(c,5);break;case 6:ae(c);case 5:if(u=o.id||JSON.stringify(o),e.U.has(u)){c.u(3);break}o.loop&&!o.overlay&&Ae("Loop is only supported in overlay interstitials",o),o.overlay||(n=!0),e.U.add(u),e.H.add(o),a=!1,o.pre&&e.m==null?a=!0:o.startTime!=0||o.canJump?e.m!=null&&(l=o.startTime-e.m,0<l&&10>=l&&(a=!0)):a=!0,a&&(!e.F.has(o)&&Yv(o)&&e.F.set(o,e.j.preload(o.uri,null,o.mimeType||void 0)),$v(e,o));case 3:r=i.next(),c.u(2);break;case 4:n&&Qa(e),cE(e),K(c)}})}function _s(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var i=0,r=null;if(e.H.size&&e.m!=null){var o=e.g.ended,s=Array.from(e.H).sort(function(f,p){return p.startTime-f.startTime}),u=s;for(u=t?s.filter(function(f){return f.pre}):o?s.filter(function(f){return f.post}):s.filter(function(f){return!f.pre&&!f.post}),s=g(u),u=s.next();!u.done;u=s.next()){u=u.value;var a=!1;if(t)a=u.pre;else if(o)a=u.post;else if(!u.pre&&!u.post){var l=e.m-Math.round(1e3*u.startTime)/1e3,c=1;e.M.allowStartInMiddleOfInterstitial&&u.endTime&&u.endTime!=1/0&&(c=u.endTime-u.startTime),0<l&&(l<=c||!u.canJump)&&(a=!(n==null&&e.s&&!e.s.pre&&!e.s.post&&e.s.startTime>=u.startTime))}a&&(!e.s||u.startTime>=e.s.startTime)&&(i==(n||0)?r=u:r&&!u.canJump&&.001<Math.round(1e3*u.startTime)/1e3-Math.round(1e3*r.startTime)/1e3&&(r=u,i=0),i++)}}return r}function $a(e,t,n,i,r,o){o=o===void 0?0:o,e.s=t,id(e),e.A||!e.B||e.h.parentElement||e.B.appendChild(e.h),i==1&&n==1&&(n=Array.from(e.H).filter(function(s){return t.pre?s.pre==t.pre:t.post?s.post==t.post:.001>Math.abs(s.startTime-t.startTime)}).length),t.once&&(o++,e.H.delete(t),nd(e),t.overlay||Qa(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?pE(e,t,n,i,o):Ae("Unsupported interstitial",t):e.A&&t.overlay?Ae("Unsupported interstitial",t):hE(e,t,n,i,r,o)}function pE(e,t,n,i,r){function o(){e.o&&(e.o.stop(),e.o=null),e.B.removeChild(a),rd(e,t),e.i(new G("ad-stopped")),e.l.Ra();var p=_s(e,t.pre,i-r);p?$a(e,p,n,++i,Date.now(),r):e.K=!1}e.K=!0;var s=t.overlay,u=t.mimeType=="text/html"?"iframe":"img",a=document.createElement(u);a.style.objectFit="contain",a.style.position="absolute",a.style.border="none",zv(e,t),e.i(new G("ad-started",new Map().set("ad",new ne(t,n,i)))),u=="iframe"?a.src=t.uri:(a.src=t.uri,a.onerror=function(p){e.i(new G("ad-error",new Map().set("originalEvent",p))),o()});var l=s.viewport,c=s.topLeft;s=s.size,l.x==0&&l.y==0?(a.width=t.overlay.size.x,a.height=t.overlay.size.y,a.style.bottom="10%",a.style.left="0",a.style.right="0",a.style.width="100%",t.overlay.size.y||u!="iframe"||(a.style.height="auto")):(a.style.height=s.y/l.y*100+"%",a.style.left=c.x/l.x*100+"%",a.style.top=c.y/l.y*100+"%",a.style.width=s.x/l.x*100+"%"),e.B.appendChild(a);var f=Date.now();e.o&&e.o.stop(),e.o=new Te(function(){t.playoutLimit&&(Date.now()-f)/1e3>t.playoutLimit?(e.i(new G("ad-complete")),o()):t.endTime&&e.g.currentTime>t.endTime?(e.i(new G("ad-complete")),o()):e.g.currentTime<t.startTime&&(e.i(new G("ad-skipped")),o())}),t.playoutLimit&&!t.endTime?e.o.ia(t.playoutLimit):t.endTime&&e.o.Fa(.025),e.l.D(e.g,"seeked",function(){var p=e.g.currentTime;(p<t.startTime||t.endTime&&p>t.endTime)&&(e.o&&e.o.stop(),e.i(new G("ad-skipped")),o())})}function hE(e,t,n,i,r,o){var s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R;k(function(N){switch(N.g){case 1:if(s=Date.now(),e.K=!0,!e.A||i!=1){N.u(2);break}return e.i(new G("ad-content-pause-requested",new Map().set("saveLivePosition",!0))),u=new je,a=function(L){return k(function(P){if(P.g==1)return L.state!="detach"?P.u(0):qv()?T(P,new Promise(function(b){return new Te(b).ia(.1)}),3):P.u(3);u.resolve(),e.l.Ja(e.C,"onstatechange",a),K(P)})},e.l.D(e.C,"onstatechange",a),T(N,u,2);case 2:return zv(e,t),e.A||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,l=t.overlay.viewport,c=t.overlay.topLeft,f=t.overlay.size,e.h.style.height=f.y/l.y*100+"%",e.h.style.left=c.x/l.x*100+"%",e.h.style.top=c.y/l.y*100+"%",e.h.style.width=f.x/l.x*100+"%"):(e.g.pause(),t.resumeOffset!=null&&t.resumeOffset!=0&&(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),p=!1,h=function(){if(!e.A&&!t.overlay&&t.resumeOffset==null)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var L=Date.now();e.g.currentTime+=(L-r)/1e3,r=L}},m=function(L){var P,b;return k(function(U){if(U.g==1){if(h(),P=_s(e,t.pre,i-o),L&&t.groupId)for(;P&&P.groupId==t.groupId;)i++,P=_s(e,t.pre,i-o);return e.o&&(!t.groupId||P&&P.groupId!=t.groupId)&&(e.o.stop(),e.o=null),rd(e,t),P&&!P.overlay?U.u(2):(t.post&&(e.m=null,e.s=null),e.A?T(U,e.j.detach(),4):T(U,e.j.vc(),4))}U.g!=2&&(e.A&&(b=t.resumeOffset,b==null&&(b=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.m||0):(Date.now()-r)/1e3),e.i(new G("ad-content-resume-requested",new Map().set("offset",b)))),e.i(new G("ad-stopped")),e.l.Ra(),e.K=!1,e.A?Qa(e):(e.h.style.display="none",h(),e.g.ended||e.g.play())),id(e),P&&(e.i(new G("ad-stopped")),e.l.Ra(),$a(e,P,n,++i,r,o)),K(U)})},y=function(L){return k(function(P){return p?P.return():(p=!0,e.i(new G("ad-error",new Map().set("originalEvent",L))),T(P,m(!1),0))})},v=function(){return k(function(L){if(L.g==1)return p?L.return():(p=!0,T(L,m(!1),2));e.i(new G("ad-complete")),K(L)})},e.ha=function(){return k(function(L){return p?L.return():(p=!0,e.i(new G("ad-skipped")),T(L,m(!0),0))})},x=new te(e.h,t,e.ha,n,i,!e.A),e.A||(x.setMuted(e.g.muted),x.setVolume(e.g.volume)),e.i(new G("ad-started",new Map().set("ad",x))),(S=x.canSkipNow())&&e.i(new G("ad-skip-state-changed")),e.l.Aa(e.j,"error",y),e.l.D(e.h,"timeupdate",function(){if(e.h.duration){var L=x.canSkipNow();S!=L&&0<x.getRemainingTime()&&0<x.getDuration()&&e.i(new G("ad-skip-state-changed")),S=L}}),e.l.Aa(e.j,"firstquartile",function(){h(),e.i(new G("ad-first-quartile"))}),e.l.Aa(e.j,"midpoint",function(){h(),e.i(new G("ad-midpoint"))}),e.l.Aa(e.j,"thirdquartile",function(){h(),e.i(new G("ad-third-quartile"))}),e.l.Aa(e.j,"complete",v),e.l.D(e.h,"play",function(){e.i(new G("ad-resumed"))}),e.l.D(e.h,"pause",function(){var L=e.j.getConfiguration();e.h.currentTime>=L.playRangeEnd?v():e.i(new G("ad-paused"))}),e.l.D(e.h,"volumechange",function(){e.h.muted?e.i(new G("ad-muted")):e.i(new G("ad-volume-changed"))}),ue(N,4),od(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(w=t.endTime-t.startTime,0<w&&e.j.configure("playRangeEnd",w)),t.playoutLimit&&!e.o&&(e.o=new Te(function(){e.ha()}).ia(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),T(N,e.j.fc(e.h),6);case 6:return A=null,e.M.allowStartInMiddleOfInterstitial&&e.m!=null&&(D=e.m-t.startTime,.25<Math.abs(D)&&(A=D)),e.F.has(t)?T(N,e.F.get(t),10):T(N,e.j.load(t.uri,A,t.mimeType||void 0),8);case 10:return E=N.h,e.F.delete(t),E?T(N,e.j.load(E),8):T(N,e.j.load(t.uri,A,t.mimeType||void 0),8);case 8:e.h.play(),I=(Date.now()-s)/1e3,e.i(new G("ads-loaded",new Map().set("loadTime",I))),e.A&&e.g.play(),t.overlay&&(C=function(){var L=e.g.currentTime-t.startTime;.1<Math.abs(L-e.h.currentTime)&&(e.h.currentTime=L)},e.l.Aa(e.h,"playing",C),e.l.D(e.g,"seeking",C),e.l.D(e.g,"seeked",function(){var L=e.g.currentTime;(L<t.startTime||t.endTime&&L>t.endTime)&&e.ha()})),ce(N,0);break;case 4:if(R=ae(N),!e.K)return N.return();y(R),K(N)}})}function zv(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),t.currentVideo!=null){var n=t.currentVideo;e.g.style.transformOrigin="top left";var i=!0,r=[],o=n.topLeft.x/n.viewport.x*100;0<o&&100>=o&&(r.push("translateX("+o+"%)"),i=!1),o=n.topLeft.y/n.viewport.y*100,0<o&&100>=o&&(r.push("translateY("+o+"%)"),i=!1),o=n.size.x/n.viewport.x,1>o&&r.push("scaleX("+o+")"),n=n.size.y/n.viewport.y,1>o&&r.push("scaleY("+n+")"),r.length&&(e.g.style.transform=r.join(" ")),i&&(e.g.style.transition="transform 250ms")}e.B&&(e.B.style.pointerEvents="none",t.background&&(e.B.style.background=t.background)),e.G&&(e.G.style.background=t.overlay?"":"rgb(0, 0, 0)")}function rd(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&t.currentVideo==null||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.B&&(e.B.style.pointerEvents="",!t||t.background)&&(e.B.style.background=""),e.G&&(e.G.style.background="")}function gE(e,t){var n,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j,O,B,V,q,X,Ce,he,xe,ve,me,Pe,de;return k(function(fe){switch(fe.g){case 1:if(n=[],!t||(i=t.values.find(function(ge){return ge.key=="X-ASSET-URI"}),r=t.values.find(function(ge){return ge.key=="X-ASSET-LIST"}),!i&&!r))return fe.return(n);if(o=null,(s=t.values.find(function(ge){return ge.key=="ID"}))&&(o=s.data),u=o==null?Math.floor(10*t.startTime)/10:t.startTime,(a=t.endTime)&&t.endTime!=1/0&&typeof t.endTime=="number"&&(a=o==null?Math.floor(10*t.endTime)/10:t.endTime),l=t.values.find(function(ge){return ge.key=="X-RESTRICT"}),f=c=!0,l&&l.data&&(p=l.data,c=!p.includes("SKIP"),f=!p.includes("JUMP")),h=c?0:null,(m=t.values.find(function(ge){return ge.key=="X-ENABLE-SKIP-AFTER"}))&&(y=m.data,h=parseFloat(y),isNaN(h)&&(h=c?0:null)),v=null,(x=t.values.find(function(ge){return ge.key=="X-ENABLE-SKIP-FOR"}))&&(S=x.data,v=parseFloat(S),isNaN(h)&&(v=null)),w=null,(A=t.values.find(function(ge){return ge.key=="X-RESUME-OFFSET"}))&&(D=A.data,w=parseFloat(D),isNaN(w)&&(w=null)),E=null,(I=t.values.find(function(ge){return ge.key=="X-PLAYOUT-LIMIT"}))&&(C=I.data,E=parseFloat(C),isNaN(E)&&(E=null)),L=N=R=!1,(P=t.values.find(function(ge){return ge.key=="CUE"}))&&(b=P.data,R=b.includes("ONCE"),N=b.includes("PRE"),L=b.includes("POST")),U=!1,(j=t.values.find(function(ge){return ge.key=="X-TIMELINE-OCCUPIES"}))?(O=j.data,U=O.includes("RANGE")):!A&&e.C.V()&&(U=!N&&!L),i){if(B=i.data,!B)return fe.return(n);n.push({id:o,groupId:null,startTime:u,endTime:a,uri:B,mimeType:null,isSkippable:c,skipOffset:h,skipFor:v,canJump:f,resumeOffset:w,playoutLimit:E,once:R,pre:N,post:L,timelineRange:U,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),fe.u(2);break}if(!r){fe.u(2);break}return V=r.data,V?(ue(fe,4),q={type:11},T(fe,sd(e,V,q),6)):fe.return(n);case 6:for(X=fe.h,Ce=ze(X),he=JSON.parse(Ce),(xe=he["SKIP-CONTROL"])&&(ve=xe["ENABLE-SKIP-AFTER"],typeof ve=="number"&&(h=parseFloat(ve),isNaN(ve)&&(h=c?0:null)),me=xe["ENABLE-SKIP-FOR"],typeof me=="number"&&(v=parseFloat(me),isNaN(me)&&(v=null))),Pe=0;Pe<he.ASSETS.length;Pe++)de=he.ASSETS[Pe],de.URI&&n.push({id:o+"_shaka_asset_"+Pe,groupId:o,startTime:u,endTime:a,uri:de.URI,mimeType:null,isSkippable:c,skipOffset:h,skipFor:v,canJump:f,resumeOffset:w,playoutLimit:E,once:R,pre:N,post:L,timelineRange:U,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});ce(fe,2);break;case 4:ae(fe);case 2:return fe.return(n)}})}function Qa(e){for(var t=[],n=g(e.H),i=n.next(),r={};!i.done;r={uc:void 0},i=n.next())i=i.value,i.overlay||(r.uc={start:i.startTime,end:null},i.pre?(r.uc.start=0,r.uc.end=null):i.post?(r.uc.start=-1,r.uc.end=null):i.timelineRange&&(r.uc.end=i.endTime),t.find(function(o){return function(s){return o.uc.start==s.start&&o.uc.end==s.end}}(r))||t.push(r.uc));e.i(new G("ad-cue-points-changed",new Map().set("cuepoints",t)))}function od(e){e.j.configure(e.C.Zh()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),hg(e.C.Pb(),e.j.Pb())}function sd(e,t,n){var i,r,o;return k(function(s){return s.g==1?(i=lt([t],Hn()),r=e.C.Pb().request(7,i,n),T(s,r.promise,2)):(o=s.h,s.return(o.data))})}function Yv(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function qv(){var e=ye().La();return e=="TV"||e=="CONSOLE"||e=="CAST"}function $v(e,t){if(!(e.L.has(t)||e.M&&!e.M.allowPreloadOnDomElements)){var n=function(o){var s=document.createElement("link");return s.rel="preload",s.href=o,s.as="image",document.head.appendChild(s),s},i=[];if(t.background){var r=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);r&&i.push(n(r[2]))}t.mimeType.startsWith("image/")&&i.push(n(t.uri)),e.L.set(t,i)}}function Qv(e,t){if(e.L.has(t)){var n=e.L.get(t);n=g(n);for(var i=n.next();!i.done;i=n.next())i=i.value,i.parentNode.removeChild(i);e.L.delete(t)}}function J(e,t,n,i,r){this.h=e,this.j=Vr(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}d=J.prototype,d.needsSkipUI=function(){return!0},d.isClientRendering=function(){return!1},d.hasCustomClick=function(){return!1},d.isUsingAnotherMediaElement=function(){return!1},d.getDuration=function(){return this.h.durationInSeconds},d.getMinSuggestedDuration=function(){return this.getDuration()},d.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},d.isPaused=function(){return this.g.paused},d.isSkippable=function(){return typeof this.j=="number"},d.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},d.canSkipNow=function(){return this.getTimeUntilSkippable()==0},d.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},d.pause=function(){return this.g.pause()},d.play=function(){return this.g.play()},d.getVolume=function(){return this.g.volume},d.setVolume=function(e){this.g.volume=e},d.isMuted=function(){return this.g.muted},d.isLinear=function(){return this.o},d.resize=function(){},d.setMuted=function(e){this.g.muted=e},d.getSequenceLength=function(){return this.l?this.l:1},d.getPositionInSequence=function(){return this.i?this.i:1},d.getTitle=function(){return this.h.adTitle},d.getDescription=function(){return""},d.getVastMediaBitrate=function(){return 0},d.getVastMediaHeight=function(){return 0},d.getVastMediaWidth=function(){return 0},d.getVastAdId=function(){return this.h.vastAdId||""},d.getAdId=function(){return this.h.adId},d.getCreativeAdId=function(){return this.h.creativeId},d.getAdvertiserName=function(){return""},d.getMediaUrl=function(){return null},d.getTimeOffset=function(){return 0},d.getPodIndex=function(){return 0},d.release=function(){this.l=this.i=this.g=this.h=null},W("shaka.ads.MediaTailorAd",J),J.prototype.release=J.prototype.release,J.prototype.getPodIndex=J.prototype.getPodIndex,J.prototype.getTimeOffset=J.prototype.getTimeOffset,J.prototype.getMediaUrl=J.prototype.getMediaUrl,J.prototype.getAdvertiserName=J.prototype.getAdvertiserName,J.prototype.getCreativeAdId=J.prototype.getCreativeAdId,J.prototype.getAdId=J.prototype.getAdId,J.prototype.getVastAdId=J.prototype.getVastAdId,J.prototype.getVastMediaWidth=J.prototype.getVastMediaWidth,J.prototype.getVastMediaHeight=J.prototype.getVastMediaHeight,J.prototype.getVastMediaBitrate=J.prototype.getVastMediaBitrate,J.prototype.getDescription=J.prototype.getDescription,J.prototype.getTitle=J.prototype.getTitle,J.prototype.getPositionInSequence=J.prototype.getPositionInSequence,J.prototype.getSequenceLength=J.prototype.getSequenceLength,J.prototype.setMuted=J.prototype.setMuted,J.prototype.resize=J.prototype.resize,J.prototype.isLinear=J.prototype.isLinear,J.prototype.isMuted=J.prototype.isMuted,J.prototype.setVolume=J.prototype.setVolume,J.prototype.getVolume=J.prototype.getVolume,J.prototype.play=J.prototype.play,J.prototype.pause=J.prototype.pause,J.prototype.skip=J.prototype.skip,J.prototype.canSkipNow=J.prototype.canSkipNow,J.prototype.getTimeUntilSkippable=J.prototype.getTimeUntilSkippable,J.prototype.isSkippable=J.prototype.isSkippable,J.prototype.isPaused=J.prototype.isPaused,J.prototype.getRemainingTime=J.prototype.getRemainingTime,J.prototype.getMinSuggestedDuration=J.prototype.getMinSuggestedDuration,J.prototype.getDuration=J.prototype.getDuration,J.prototype.isUsingAnotherMediaElement=J.prototype.isUsingAnotherMediaElement,J.prototype.hasCustomClick=J.prototype.hasCustomClick,J.prototype.isClientRendering=J.prototype.isClientRendering,J.prototype.needsSkipUI=J.prototype.needsSkipUI;function bs(e,t,n,i){this.B=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=i,this.I=!1,this.A=null,this.j=[],this.M=[],this.L=this.C=this.g=null,this.F=new Map,this.m=[],this.s=[],this.G="",this.N=!0,this.H="",this.o=new Me}bs.prototype.stop=function(){for(var e=g(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Ja(t.target,t.type,t.listener);So(this),this.m=[],this.s=[],this.G="",this.N=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},bs.prototype.release=function(){this.stop(),this.o&&this.o.release()},bs.prototype.onManifestUpdated=function(e){this.I=e,this.G!=""&&(vE(this,this.G,this.N),this.N=!1)},bs.prototype.getCuePoints=function(){for(var e=[],t=g(this.j),n=t.next();!n.done;n=t.next()){n=g(n.value.ads);for(var i=n.next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds})}return e};function mE(e,t,n){var i,r,o,s,u,a,l,c,f,p,h,m;k(function(y){if(y.g==1)return i={type:7},r=lt([t],Hn()),r.method="POST",n&&(o=JSON.stringify(n),r.body=Dn(o)),s=e.K.request(7,r,i),ue(y,2),T(y,s.promise,4);if(y.g!=2){if(u=y.h,a=ze(u.data),l=JSON.parse(a),l.manifestUrl&&l.trackingUrl)c=new nt(t),f=new nt(l.trackingUrl),e.G=c.resolve(f).toString(),p=Date.now()/1e3,h=p-e.P,e.i(new G("ads-loaded",new Map().set("loadTime",h))),m=new nt(l.manifestUrl),e.l.resolve(c.resolve(m).toString()),e.l=null;else throw Error("Insufficient data from MediaTailor.");return ce(y,0)}if(ae(y),!e.H.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,y.return();e.l.resolve(e.H),e.l=null,K(y)})}function vE(e,t,n){var i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S;k(function(w){if(w.g==1)return i={type:8},r=lt([t],Hn()),o=e.K.request(7,r,i),ue(w,2),T(w,o.promise,4);if(w.g!=2){if(s=w.h,u=[],a=ze(s.data),l=JSON.parse(a),0<l.avails.length){if(JSON.stringify(e.j)!=JSON.stringify(l.avails)){for(e.j=l.avails,c=g(e.j),f=c.next();!f.done;f=c.next())for(p=f.value,h=g(p.nonLinearAdsList),m=h.next();!m.done;m=h.next())for(y=m.value,v=g(y.nonLinearAdList),x=v.next();!x.done;x=v.next())S=x.value,yE(e,S);u=e.getCuePoints(),e.i(new G("ad-cue-points-changed",new Map().set("cuepoints",u)))}}else e.j.length&&e.i(new G("ad-cue-points-changed",new Map().set("cuepoints",u))),So(e),e.j=[];return n&&(e.I||0<u.length)&&TE(e),ce(w,0)}ae(w),K(w)})}function yE(e,t){var n,i,r,o,s,u,a,l;k(function(c){if(c.g==1)return!t.staticResource||(n=Jv(t),e.F.get(n))?c.return():(i={type:9},r=lt([t.staticResource],Hn()),o=e.K.request(7,r,i),ue(c,2),e.F.set(n,[]),T(c,o.promise,4));if(c.g!=2)return s=c.h,u=ze(s.data),a=JSON.parse(u),l=a.apps,e.F.set(n,l),ce(c,0);ae(c),e.F.delete(n),K(c)})}function Jv(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function TE(e){ey(e),e.I||(Zv(e),e.o.D(e.h,"seeked",function(){Zv(e)}),e.o.D(e.h,"ended",function(){So(e)})),e.o.D(e.h,"timeupdate",function(){ey(e)})}function Zv(e){var t=e.h.currentTime;if(t!=0&&e.A==null){for(var n,i,r=g(e.j),o=r.next();!o.done;o=r.next()){o=o.value;for(var s=g(o.ads),u=s.next();!u.done;u=s.next())if(u=u.value,!i)u.startTimeInSeconds<t&&(i=u,n=o);else if(u.startTimeInSeconds<t&&u.startTimeInSeconds>i.startTimeInSeconds+i.durationInSeconds){i=u,n=o;break}}n&&i&&!e.M.includes(i.adId)&&(e.A=t,e.h.currentTime=n.startTimeInSeconds)}}function ey(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var i=e.C,r=i.startTimeInSeconds+.5*i.durationInSeconds,o=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.s.includes("firstQuartile")?(e.s.push("firstQuartile"),Ft(e,"firstQuartile")):t>=r&&!e.s.includes("midpoint")?(e.s.push("midpoint"),Ft(e,"midpoint")):t>=o&&!e.s.includes("thirdQuartile")&&(e.s.push("thirdQuartile"),Ft(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&0<i&&0<r&&Ft(e,"skipStateChanged"),0<r&&(0>=i||i>r)&&So(e)}if(!e.g||!e.g.isLinear()){e:for(i=g(e.j),r=i.next();!r.done&&(r=r.value,!(e.g&&e.g.isLinear()));r=i.next())for(o=0;o<r.ads.length;o++){var s=r.ads[o],u=s.startTimeInSeconds+s.durationInSeconds;if(s.startTimeInSeconds<=t&&u>t){if(e.M.includes(s.adId)){if(e.h.ended)continue;e.h.currentTime=u;break e}So(e),e.L=r,e.g=new J(s,o+1,r.ads.length,!0,e.h),e.C=s,o===0&&Ft(e,"breakStart"),ty(e);break}}if(!e.g){for(i=g(e.j),r=i.next();!r.done&&(r=r.value,!e.g);r=i.next())for(o=0;o<r.nonLinearAdsList.length;o++)if(s=r.nonLinearAdsList[o],s.nonLinearAdList.length){u=r.startTimeInSeconds;var a=e.F.get(Jv(s.nonLinearAdList[0]));if(u<=t&&a&&a.length){So(e),u=e,a=g(a);for(var l=a.next();!l.done;l=a.next())if(l=l.value,l.data.source.length){var c=document.createElement("img");c.src=l.data.source[0].url,c.style.top=(l.placeholder.top||0)+"%",c.style.height=100-(l.placeholder.top||0)+"%",c.style.left=(l.placeholder.left||0)+"%",c.style.maxWidth=100-(l.placeholder.left||0)+"%",c.style.objectFit="contain",c.style.position="absolute",u.B.appendChild(c)}e.L=r,e.g=new J(s,o+1,r.ads.length,!1,e.h),e.C=s,o===0&&Ft(e,"breakStart"),ty(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function So(e){if(e.g){for(;e.B.lastChild;)e.B.removeChild(e.B.firstChild);e.I||e.M.push(e.C.adId);var t=e.g.m;t!==void 0&&t?Ft(e,"skip"):Ft(e,"complete"),t=g(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Ja(n.target,n.type,n.listener);e.m=[],e.s=[],t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&Ft(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function ty(e){var t=!1;e.h.paused?t=!0:(Ft(e,"impression"),Ft(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&Ft(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||Ft(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(Ft(e,"impression"),Ft(e,"start"),t=!1):Ft(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){Ft(e,"pause")}});for(var n=g(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.D(i.target,i.type,i.listener)}function Ft(e,t){var n=e.C.trackingEvents.find(function(o){return o.eventType==t});if(n||(n=e.L.adBreakTrackingEvents.find(function(o){return o.eventType==t})),n){var i={type:10};n=g(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&r!=""&&(r=lt([r],Hn()),r.method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new G("ad-impression"));break;case"start":e.i(new G("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new G("ad-muted"));break;case"unmute":e.i(new G("ad-volume-changed"));break;case"resume":e.i(new G("ad-resumed"));break;case"pause":e.i(new G("ad-paused"));break;case"firstQuartile":e.i(new G("ad-first-quartile"));break;case"midpoint":e.i(new G("ad-midpoint"));break;case"thirdQuartile":e.i(new G("ad-third-quartile"));break;case"complete":e.i(new G("ad-complete")),e.i(new G("ad-stopped"));break;case"skip":e.i(new G("ad-skipped")),e.i(new G("ad-stopped"));break;case"breakStart":e.B.setAttribute("ad-active","true");break;case"breakEnd":e.B.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new G("ad-skip-state-changed"))}}function ie(e,t){this.g=e,this.i=null,this.h=t}d=ie.prototype,d.needsSkipUI=function(){return!0},d.isClientRendering=function(){return!1},d.hasCustomClick=function(){return!0},d.isUsingAnotherMediaElement=function(){return!1},d.getDuration=function(){return this.i?this.i.duration:-1},d.getMinSuggestedDuration=function(){return this.getDuration()},d.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},d.isPaused=function(){return this.h.paused},d.isSkippable=function(){return this.g.isSkippable()},d.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},d.canSkipNow=function(){return this.getTimeUntilSkippable()==0},d.skip=function(){this.h.currentTime+=this.getRemainingTime()},d.pause=function(){return this.h.pause()},d.play=function(){return this.h.play()},d.getVolume=function(){return this.h.volume},d.setVolume=function(e){this.h.volume=e},d.isMuted=function(){return this.h.muted},d.isLinear=function(){return!0},d.resize=function(){},d.setMuted=function(e){this.h.muted=e},d.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},d.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},d.getTitle=function(){return this.g.getTitle()},d.getDescription=function(){return this.g.getDescription()},d.getVastMediaBitrate=function(){return 0},d.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},d.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},d.getVastAdId=function(){return""},d.getAdId=function(){return this.g.getAdId()},d.getCreativeAdId=function(){return this.g.getCreativeAdId()},d.getAdvertiserName=function(){return this.g.getAdvertiserName()},d.getMediaUrl=function(){return null},d.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},d.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},d.release=function(){this.h=this.i=this.g=null},W("shaka.ads.ServerSideAd",ie),ie.prototype.release=ie.prototype.release,ie.prototype.getPodIndex=ie.prototype.getPodIndex,ie.prototype.getTimeOffset=ie.prototype.getTimeOffset,ie.prototype.getMediaUrl=ie.prototype.getMediaUrl,ie.prototype.getAdvertiserName=ie.prototype.getAdvertiserName,ie.prototype.getCreativeAdId=ie.prototype.getCreativeAdId,ie.prototype.getAdId=ie.prototype.getAdId,ie.prototype.getVastAdId=ie.prototype.getVastAdId,ie.prototype.getVastMediaWidth=ie.prototype.getVastMediaWidth,ie.prototype.getVastMediaHeight=ie.prototype.getVastMediaHeight,ie.prototype.getVastMediaBitrate=ie.prototype.getVastMediaBitrate,ie.prototype.getDescription=ie.prototype.getDescription,ie.prototype.getTitle=ie.prototype.getTitle,ie.prototype.getPositionInSequence=ie.prototype.getPositionInSequence,ie.prototype.getSequenceLength=ie.prototype.getSequenceLength,ie.prototype.setMuted=ie.prototype.setMuted,ie.prototype.resize=ie.prototype.resize,ie.prototype.isLinear=ie.prototype.isLinear,ie.prototype.isMuted=ie.prototype.isMuted,ie.prototype.setVolume=ie.prototype.setVolume,ie.prototype.getVolume=ie.prototype.getVolume,ie.prototype.play=ie.prototype.play,ie.prototype.pause=ie.prototype.pause,ie.prototype.skip=ie.prototype.skip,ie.prototype.canSkipNow=ie.prototype.canSkipNow,ie.prototype.getTimeUntilSkippable=ie.prototype.getTimeUntilSkippable,ie.prototype.isSkippable=ie.prototype.isSkippable,ie.prototype.isPaused=ie.prototype.isPaused,ie.prototype.getRemainingTime=ie.prototype.getRemainingTime,ie.prototype.getMinSuggestedDuration=ie.prototype.getMinSuggestedDuration,ie.prototype.getDuration=ie.prototype.getDuration,ie.prototype.isUsingAnotherMediaElement=ie.prototype.isUsingAnotherMediaElement,ie.prototype.hasCustomClick=ie.prototype.hasCustomClick,ie.prototype.isClientRendering=ie.prototype.isClientRendering,ie.prototype.needsSkipUI=ie.prototype.needsSkipUI;function ny(e,t,n,i){var r=this;this.s=e,this.l=t,this.j=null,this.F=NaN,this.i=i,this.G=!1,this.A=this.m=this.o=null,this.B="",this.C=[],this.h=new Me,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.s,e),this.i(new G("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(o){xE(r,o)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.B.length?r.j.resolve(r.B):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(o){o=o.getAd(),r.m=new ie(o,r.l),r.A&&(r.m.i=r.A),r.i(new G("ad-started",new Map().set("ad",r.m))),r.s.setAttribute("ad-active","true")}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.s.removeAttribute("ad-active");var o=r.l.currentTime;r.o&&r.o>o&&(r.l.currentTime=r.o,r.o=null)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(o){r.A=o.getStreamData().adProgressData,r.m&&(r.m.i=r.A)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new G("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new G("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new G("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new G("ad-complete")),r.i(new G("ad-stopped")),r.s.removeAttribute("ad-active"),r.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new G("ad-skipped")),r.i(new G("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(o){var s=o.getStreamData();o=[],s=g(s.cuepoints);for(var u=s.next();!u.done;u=s.next())u=u.value,o.push({start:u.start,end:u.end});r.C=o,r.i(new G("ad-cue-points-changed",new Map().set("cuepoints",o)))})}d=ny.prototype,d.configure=function(){},d.stop=function(){this.B="",this.o=null,this.C=[]},d.release=function(){this.stop(),this.h&&this.h.release()},d.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},d.getCuePoints=function(){return this.C};function xE(e,t){e.i(new G("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.F))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.G||e.h.D(e.l,"seeked",function(){var n=e.l.currentTime;if(n!=0){e.g.streamTimeForContentTime(n);var i=e.g.previousCuePointForStreamTime(n);i&&!i.played&&(e.o=n,e.l.currentTime=i.start)}})}function Y(){De.call(this),this.h=this.i=this.j=this.g=null,this.m=new Hv,this.o=navigator.language,this.l=null}et(Y,De),d=Y.prototype,d.setLocale=function(e){this.o=e},d.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},d.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new Wv(e,t,n,function(r){return Ja(i,r)}),this.g.configure(this.l)},d.initClientSide=function(e,t,n){var i=this;if(!F.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1e4);this.j&&this.j.release(),this.j=new Ya(e,t,this.o,n,function(r){return Ja(i,r)}),this.j.configure(this.l)},d.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),De.prototype.release.call(this)},d.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new G("ad-stopped")),this.dispatchEvent(new G("ad-content-attach-requested")),this.m=new Hv},d.requestClientSideAds=function(e){if(!this.j)throw new M(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.G=Date.now()/1e3,t.m.requestAds(e)},d.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new M(1,10,10001);var t=this.j;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},d.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new bs(e,t,n,function(r){return Ja(i,r)})},d.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new M(1,10,10005);var i=this.i;return n=n===void 0?"":n,i.l?e=Promise.reject(new M(1,10,10004)):(i.l=new je,mE(i,e,t),i.H=n||"",i.P=Date.now()/1e3,e=i.l),e},d.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new M(1,10,10005);var t=this.i;t.G=e,t.i(new G("ads-loaded",new Map().set("loadTime",0)))},d.initServerSide=function(e,t){var n=this;if(!F.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.h&&this.h.release(),this.h=new ny(e,t,this.o,function(i){return Ja(n,i)}),this.h.configure(this.l)},d.requestServerSideStream=function(e,t){if(t=t===void 0?"":t,!this.h)throw new M(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&Ae('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.15.7",n=this.h,n.j?e=Promise.reject(new M(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new je,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},d.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new M(1,10,10003);(e.mpt||e.mpv)&&Ae('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v4.15.7",this.h.g.replaceAdTagParameters(e)},d.getServerSideCuePoints=function(){return Ee("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},d.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},d.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:sE(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},d.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},d.onDashTimedMetadata=function(e){this.h&&e.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},d.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},d.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},d.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&fE(this.g,n))},d.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var i=n.schemeIdUri;if(i=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||i=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",i=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",t||i)){for(var r=n.startTime,o=n.endTime,s=null,u=0,a,l=g(n.eventNode.children),c=l.next();!c.done;c=l.next())if(c=c.value,c.tagName=="AlternativeMPD"){if(c=c.attributes.uri){a=c;break}}else if(c.tagName=="InsertPresentation"||c.tagName=="ReplacePresentation"){var f=c.attributes.url;if(f){a=f,(l=oe(c,"maxDuration",yt))&&(s=l/n.timescale),(l=oe(c,"returnOffset",yt))&&(u=l/n.timescale),t&&u&&(o=r+u);break}}a&&Os(e,[{id:n.id,groupId:null,startTime:r,endTime:o,uri:a,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?u:null,playoutLimit:s,once:!1,pre:!1,post:!1,timelineRange:t&&!i,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else(i=="urn:mpeg:dash:event:2012"||i=="urn:scte:dash:scte214-events")&&n.eventNode&&Ye(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&dE(this.g,n))}},d.addCustomInterstitial=function(e){if(!this.g)throw new M(1,10,10006);Os(this.g,[e])},d.addAdUrlInterstitial=function(e){if(!this.g)throw new M(1,10,10006);return this.g.addAdUrlInterstitial(e)},d.getInterstitialPlayer=function(){if(!this.g)throw new M(1,10,10006);return this.g.od()};function Ja(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;var n=t.ad;n&&!n.isLinear()&&e.m.j++;break;case"ad-complete":e.m.l++;break;case"ad-skipped":e.m.m++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}W("shaka.ads.AdManager",Y),Y.prototype.getInterstitialPlayer=Y.prototype.getInterstitialPlayer,Y.prototype.addAdUrlInterstitial=Y.prototype.addAdUrlInterstitial,Y.prototype.addCustomInterstitial=Y.prototype.addCustomInterstitial,Y.prototype.onDASHInterstitialMetadata=Y.prototype.onDASHInterstitialMetadata,Y.prototype.onHLSInterstitialMetadata=Y.prototype.onHLSInterstitialMetadata,Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange,Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata,Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata,Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated,Y.prototype.getStats=Y.prototype.getStats,Y.prototype.getCuePoints=Y.prototype.getCuePoints,Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints,Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters,Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream,Y.prototype.initServerSide=Y.prototype.initServerSide,Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl,Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream,Y.prototype.initMediaTailor=Y.prototype.initMediaTailor,Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings,Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds,Y.prototype.onAssetUnload=Y.prototype.onAssetUnload,Y.prototype.release=Y.prototype.release,Y.prototype.initClientSide=Y.prototype.initClientSide,Y.prototype.initInterstitial=Y.prototype.initInterstitial,Y.prototype.configure=Y.prototype.configure,Y.prototype.setLocale=Y.prototype.setLocale,Y.ADS_LOADED="ads-loaded",Y.AD_STARTED="ad-started",Y.AD_FIRST_QUARTILE="ad-first-quartile",Y.AD_MIDPOINT="ad-midpoint",Y.AD_THIRD_QUARTILE="ad-third-quartile",Y.AD_COMPLETE="ad-complete",Y.AD_STOPPED="ad-stopped",Y.AD_SKIPPED="ad-skipped",Y.AD_VOLUME_CHANGED="ad-volume-changed",Y.AD_MUTED="ad-muted",Y.AD_PAUSED="ad-paused",Y.AD_RESUMED="ad-resumed",Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Y.CUEPOINTS_CHANGED="ad-cue-points-changed",Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Y.AD_CLICKED="ad-clicked",Y.AD_PROGRESS="ad-progress",Y.AD_BUFFERING="ad-buffering",Y.AD_IMPRESSION="ad-impression",Y.AD_DURATION_CHANGED="ad-duration-changed",Y.AD_CLOSED="ad-closed",Y.AD_LOADED="ad-loaded",Y.ALL_ADS_COMPLETED="all-ads-completed",Y.AD_LINEAR_CHANGED="ad-linear-changed",Y.AD_METADATA="ad-metadata",Y.AD_RECOVERABLE_ERROR="ad-recoverable-error",Y.AD_ERROR="ad-error",Y.AD_BREAK_READY="ad-break-ready",Y.AD_INTERACTION="ad-interaction",Y.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",Y.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",Y.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",Wa=function(){return new Y};function iy(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(n instanceof Event||n instanceof G){var i={};for(r in n)(t=n[r])&&typeof t=="object"?r=="detail"&&(i[r]=t):r in Event||(i[r]=t);return i}if(n instanceof Error){var r=new Set(["name","message","stack"]);for(i in n)r.add(i);for(i=g(Object.getOwnPropertyNames(n)),t=i.next();!t.done;t=i.next())r.add(t.value);for(i={},r=g(r),t=r.next();!t.done;t=r.next())t=t.value,i[t]=n[t];n={__type__:"Error",contents:i}}else if(n instanceof TimeRanges){for(r={__type__:"TimeRanges",length:n.length,start:[],end:[]},n=g(yi(n)),i=n.next();!i.done;i=n.next())i=i.value,t=i.end,r.start.push(i.start),r.end.push(t);n=r}else n=ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(n)}:typeof n=="number"?isNaN(n)?"NaN":isFinite(n)?n:0>n?"-Infinity":"Infinity":n;return n}})}function ud(e){return JSON.parse(e,function(t,n){if(n=="NaN")var i=NaN;else if(n=="-Infinity")i=-1/0;else if(n=="Infinity")i=1/0;else if(n&&typeof n=="object"&&n.__type__=="TimeRanges")i=SE(n);else if(n&&typeof n=="object"&&n.__type__=="Uint8Array")i=new Uint8Array(n.entries);else if(n&&typeof n=="object"&&n.__type__=="Error"){t=n.contents,n=Error(t.message);for(i in t)n[i]=t[i];i=n}else i=n;return i})}function SE(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var ry="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),wE="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ad=["loop","playbackRate"],AE=["pause","play"],ld=new Map().set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),cd=new Map().set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks",2).set("getVariantTracks",2),oy=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),sy=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],uy=[["isTextTrackVisible","setTextTrackVisibility"]],EE="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),IE="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function fd(e,t,n,i,r,o,s){var u=this;this.G=e,this.K=s,this.l=new Te(t),this.L=n,this.s=!1,this.A=i,this.F=r,this.M=o,this.i=this.m=!1,this.I="",this.o=null,this.B=function(){return dd(u)},this.C=function(a,l){switch(a=ud(l),a.type){case"event":var c=a.targetName,f=pg(a.event);u.A(c,f);break;case"update":c=a.update;for(f in c){a=u.g[f]||{};for(var p in c[f])a[p]=c[f][p]}u.s&&(u.L(),u.s=!1);break;case"asyncComplete":if(p=a.id,f=a.error,l=a.res,a=u.h.get(p),u.h.delete(p),a)if(f){p=new M(f.severity,f.category,f.code);for(c in f)p[c]=f[c];a.reject(p)}else a.resolve(l)}},this.g={video:{},player:{}},this.H=0,this.h=new Map,this.j=null,Bs.add(this)}d=fd.prototype,d.destroy=function(){return Bs.delete(this),pd(this),On&&ly(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.i=this.m=!1,this.C=this.B=this.j=this.h=this.g=this.o=null,Promise.resolve()},d.vb=function(){return this.i},d.Zg=function(){return this.I},d.init=function(){if(this.G.length)if(F.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.Jb();var e=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=g(Bs),i=n.next();!i.done;i=n.next()){i=i.value;var r=t;i.j=new je,i.s=!0,Za(i,r)}},function(t){for(var n=g(Bs),i=n.next();!i.done;i=n.next())i=i.value,el=t=="available",i.l.Jb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),el&&this.l.ia(ME),(e=On)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new je,this.s=!0,Za(this,e)):On=null}else F.__onGCastApiAvailable!==cy&&(tl=F.__onGCastApiAvailable||null,F.__onGCastApiAvailable=cy)},d.kh=function(e){this.o=e,this.i&&Fs(this,{type:"appData",appData:this.o})},d.cast=function(){var e=this;return k(function(t){if(!e.m)throw new M(1,8,8e3);if(!el)throw new M(1,8,8001);if(e.i)throw new M(1,8,8002);return e.j=new je,chrome.cast.requestSession(function(n){return Za(e,n)},function(n){return ay(e,n)}),T(t,e.j,0)})};function CE(e){e.i&&chrome.cast.requestSession(function(t){return Za(e,t)},function(t){return ay(e,t)})}d.md=function(){if(this.i){if(pd(this),On){ly(this);try{On.stop(function(){},function(){})}catch{}On=null}dd(this)}},d.get=function(e,t){var n=this;if(e=="video"){if(AE.includes(t))return function(){return n.zi.apply(n,[e,t].concat(H(pt.apply(0,arguments))))}}else if(e=="player"){if(oy.has(t)&&!this.get("player","isLive")())return function(){};if(EE.includes(t))return function(){return n.zi.apply(n,[e,t].concat(H(pt.apply(0,arguments))))};if(IE.includes(t))return function(){return n.Hk.apply(n,[e,t].concat(H(pt.apply(0,arguments))))};if(ld.has(t)||cd.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},d.set=function(e,t,n){this.g[e][t]=n,Fs(this,{type:"set",targetName:e,property:t,value:n})};function Za(e,t){var n=e.M();On=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),dd(e),Fs(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function ay(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new M(2,8,n,t))}d.zi=function(e,t){Fs(this,{type:"call",targetName:e,methodName:t,args:pt.apply(2,arguments)})},d.Hk=function(e,t){var n=pt.apply(2,arguments),i=new je,r=this.H.toString();this.H++,this.h.set(r,i);try{Fs(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(o){i.reject(o)}return i};function ly(e){var t=On;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function dd(e){var t=On?On.status=="connected":!1;if(e.i&&!t){e.F();for(var n in e.g)e.g[n]={};pd(e)}e.i=t,e.I=t?On.receiver.friendlyName:"",e.l.Jb()}function pd(e){if(e.h)for(var t=g(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var i=e.h.get(n);e.h.delete(n),i.reject(new M(1,7,7e3))}}function Fs(e,t){t=iy(t);var n=On;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},wx)}catch(i){throw t=new M(2,8,8005,i),n=new G("error",new Map().set("detail",t)),e.A("player",n),e.md(),t}}var ME=.02,el=!1,On=null,tl=null,Bs=new Set;function cy(e){if(tl?F.__onGCastApiAvailable=tl:delete F.__onGCastApiAvailable,tl=null,e)for(var t=g(Bs),n=t.next();!n.done;n=t.next())n.value.init();typeof F.__onGCastApiAvailable=="function"&&F.__onGCastApiAvailable(e)}function st(e,t,n,i){i=i===void 0?!1:i,De.call(this);var r=this;this.i=e,this.h=t,this.l=this.o=this.m=this.s=this.j=null,this.H=n,this.G=i,this.C=[],this.B=[],this.A=[],this.F=new Map,this.g=null,F.chrome?(this.g=new fd(n,function(){return py(r)},function(){return hy(r)},function(o,s){return my(r,o,s)},function(){return gy(r)},function(){return dy(r)},i),kE(this)):(this.j=this.i,this.s=this.h)}et(st,De),d=st.prototype,d.destroy=function(e){return this.g&&(e!==void 0&&e)&&this.g.md(),this.l&&(this.l.release(),this.l=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.s=this.j=this.i=null,De.prototype.release.call(this),Promise.all(e)},d.Xj=function(){return this.j},d.od=function(){return this.s},d.hj=function(){return this.g?this.g.m&&el:!1},d.vb=function(){return this.g?this.g.vb():!1},d.Zg=function(){return this.g?this.g.Zg():""},d.cast=function(){var e=this;return k(function(t){return t.g==1?e.g?T(t,e.g.cast(),2):t.return():e.h?T(t,e.h.vc(),0):t.return()})},d.kh=function(e){this.g&&this.g.kh(e)},d.Wk=function(){this.g&&CE(this.g)},d.md=function(){this.g&&this.g.md()},d.ij=function(e,t){t=t===void 0?!1:t;var n=this;return k(function(i){if(i.g==1)return e==n.H&&t==n.G||(n.H=e,n.G=t,!n.g)?i.return():(n.g.md(),T(i,n.g.destroy(),2));n.g=null,n.g=new fd(e,function(){return py(n)},function(){return hy(n)},function(r,o){return my(n,r,o)},function(){return gy(n)},function(){return dy(n)},t),n.g.init(),K(i)})};function kE(e){e.g.init(),e.l=new Me;for(var t=g(ry),n=t.next();!n.done;n=t.next())e.l.D(e.i,n.value,function(o){e.g.vb()||(o=pg(o),e.m.dispatchEvent(o))});for(var i in zu)e.l.D(e.h,zu[i],function(o){e.g.vb()||e.o.dispatchEvent(o)});e.j={},t={};for(var r in e.i)t={Xd:t.Xd},t.Xd=r,Object.defineProperty(e.j,t.Xd,{configurable:!1,enumerable:!0,get:function(o){return function(){return RE(e,o.Xd)}}(t),set:function(o){return function(s){var u=o.Xd;e.g.vb()?e.g.set("video",u,s):e.i[u]=s}}(t)});e.s={},fy(e,function(o){Object.defineProperty(e.s,o,{configurable:!1,enumerable:!0,get:function(){return nl(e,o)}})}),DE(e),e.m=new De,e.m.ze=e.j,e.o=new De,e.o.ze=e.s,e.l.D(e.h,"unloading",function(){e.g&&e.g.vb()||hd(e)})}function DE(e){var t=new Map;fy(e,function(n,i){t.has(i)?(i=t.get(i),n.length<i.length?e.F.set(n,i):e.F.set(i,n)):t.set(i,n)})}function fy(e,t){function n(a){return a=="constructor"||typeof i[a]!="function"?!1:!r.has(a)}var i=e.h,r=new Set,o;for(o in i)n(o)&&(r.add(o),t(o,i[o]));for(e=Object.getPrototypeOf(i),o=Object.getPrototypeOf({});e&&e!=o;){for(var s=g(Object.getOwnPropertyNames(e)),u=s.next();!u.done;u=s.next())u=u.value,n(u)&&(r.add(u),t(u,i[u]));e=Object.getPrototypeOf(e)}}function dy(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.nd(),startTime:null,addThumbnailsTrackCalls:e.C,addTextTrackAsyncCalls:e.B,addChaptersTrackCalls:e.A};e.i.pause();for(var n=g(ad),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),n=g(sy),i=n.next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(n=g(uy),i=n.next();!i.done;i=n.next())r=i.value,i=r[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function py(e){var t=new G("caststatuschanged");e.dispatchEvent(t)}function hy(e){var t=new G(e.j.paused?"pause":"play");e.m.dispatchEvent(t)}function gy(e){for(var t=g(sy),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}var r=e.C,o=e.B,s=e.A;hd(e);var u=e.g.get("player","getAssetUri")();i=e.g.get("video","ended"),t=Promise.resolve();var a=e.i.autoplay;n=null,i||(n=e.g.get("video","currentTime"));var l;(i=e.g.get("player","getTextTracks")())&&i.length&&(l=i.find(function(p){return p.active}));var c=e.g.get("player","isTextTrackVisible")();u&&(e.i.autoplay=!1,t=e.h.load(u,n));var f={};for(n=g(ad),i=n.next();!i.done;i=n.next())i=i.value,f[i]=e.g.get("video",i);t.then(function(){if(e.i){for(var p=g(r),h=p.next();!h.done;h=p.next()){h=h.value;var m;(m=e.od()).He.apply(m,H(h))}for(p=g(o),m=p.next();!m.done;m=p.next()){m=m.value;var y;(y=e.od()).Hd.apply(y,H(m))}for(y=g(s),p=y.next();!p.done;p=y.next()){p=p.value;var v;(v=e.od()).Ge.apply(v,H(p))}for(v=g(ad),y=v.next();!y.done;y=v.next())y=y.value,e.i[y]=f[y];for(v=g(uy),y=v.next();!y.done;y=v.next())p=y.value,y=p[1],p=e.g.get("player",p[0])(),e.h[y](p);e.h.oh(c),l&&e.h.ih(l.language,l.roles,l.forced),e.i.autoplay=a,u&&e.i.play()}},function(p){p=new Map().set("detail",p),p=new G("error",p),e.h.dispatchEvent(p)})}function RE(e,t){if(t=="addEventListener")return function(i,r,o){return e.m.addEventListener(i,r,o)};if(t=="removeEventListener")return function(i,r,o){return e.m.removeEventListener(i,r,o)};if(e.g.vb()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return e.g.vb()?e.g.get("video",t):(t=e.i[t],typeof t=="function"&&(t=t.bind(e.i)),t)}function nl(e,t,n){if(n=n===void 0?!1:n,e.F.has(t)&&(t=e.F.get(t)),t=="addEventListener")return function(i,r,o){return e.o.addEventListener(i,r,o)};if(t=="removeEventListener")return function(i,r,o){return e.o.removeEventListener(i,r,o)};if(t=="getMediaElement")return function(){return e.j};if(t=="getSharedConfiguration")return e.g.get("player","getConfiguration");if(t=="getNetworkingEngine")return function(){return e.h.Pb()};if(t=="getDrmEngine")return function(){return e.h.C};if(t=="getAdManager")return function(){return e.h.Uh()};if(t=="getQueueManager")return function(){return e.h.$h()};if(t=="setVideoContainer")return function(i){return e.h.Oi(i)};if(!n){if(t=="addThumbnailsTrack")return function(){var i=pt.apply(0,arguments);return e.C.push(i),nl(e,t,!0).apply(null,H(i))};if(t=="addTextTrackAsync")return function(){var i=pt.apply(0,arguments);return e.B.push(i),nl(e,t,!0).apply(null,H(i))};if(t=="addChaptersTrack")return function(){var i=pt.apply(0,arguments);return e.A.push(i),nl(e,t,!0).apply(null,H(i))}}if(e.g.vb()){if(t=="getManifest"||t=="drmInfo")return function(){return Ae(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return Ae(t+"() does not work while casting!"),Promise.resolve()};if(t=="getChapters")return function(){return Ae(t+"() does not work while casting!"),[]}}return e.g.vb()&&Object.keys(e.g.g.video).length==0&&(ld.has(t)||cd.has(t))||!e.g.vb()?e.h[t].bind(e.h):e.g.get("player",t)}function my(e,t,n){e.g.vb()&&(t=="video"?e.m.dispatchEvent(n):t=="player"&&(n.type=="unloading"&&hd(e),e.o.dispatchEvent(n)))}function hd(e){e.C=[],e.B=[],e.A=[]}W("shaka.cast.CastProxy",st),st.prototype.changeReceiverId=st.prototype.ij,st.prototype.forceDisconnect=st.prototype.md,st.prototype.suggestDisconnect=st.prototype.Wk,st.prototype.setAppData=st.prototype.kh,st.prototype.cast=st.prototype.cast,st.prototype.receiverName=st.prototype.Zg,st.prototype.isCasting=st.prototype.vb,st.prototype.canCast=st.prototype.hj,st.prototype.getPlayer=st.prototype.od,st.prototype.getVideo=st.prototype.Xj,st.prototype.destroy=st.prototype.destroy;function Dt(e,t,n,i){De.call(this);var r=this;this.h=e,this.g=t,this.j=new Me,this.H={video:e,player:t},this.F=n||function(){},this.I=i||function(o){return o},this.i=null,this.G=!1,this.o=!0,this.m=0,this.B=!1,this.A=!0,this.s=this.l=null,this.C=new Te(function(){gd(r)}),PE(this)}et(Dt,De),d=Dt.prototype,d.isConnected=function(){return this.G},d.ek=function(){return this.o},d.Tk=function(e){this.i=e},d.mj=function(){this.i=null},d.Uk=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},d.Sk=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},d.Rk=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},d.destroy=function(){var e=this,t,n;return k(function(i){if(i.g==1)return e.j&&(e.j.release(),e.j=null),t=[],e.g&&(t.push(e.g.destroy()),e.g=null),e.C&&(e.C.stop(),e.C=null),e.h=null,e.H=null,e.F=null,e.G=!1,e.o=!0,e.l=null,e.s=null,De.prototype.release.call(e),T(i,Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),K(i)})};function PE(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return vy(e)},t.onSenderDisconnected=function(){return vy(e)},t.onSystemVolumeChanged=function(){var r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();r&&Ai(e,{type:"update",update:{video:{volume:r.level,muted:r.muted}}},e.l),Ai(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.s=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.s.onMessage=function(r){return jE(e,r)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(r){return NE(e,r)},t.start(),t=g(ry);for(var n=t.next();!n.done;n=t.next())e.j.D(e.h,n.value,function(r){return yy(e,"video",r)});for(var i in zu)e.j.D(e.g,zu[i],function(r){return yy(e,"player",r)});e.j.D(e.h,"loadeddata",function(){e.B=!0}),e.j.D(e.g,"loading",function(){e.o=!1,wo(e)}),e.j.D(e.h,"playing",function(){e.o=!1,wo(e)}),e.j.D(e.h,"pause",function(){wo(e)}),e.j.D(e.g,"unloading",function(){e.o=!0,wo(e)}),e.j.D(e.h,"ended",function(){new Te(function(){e.h&&e.h.ended&&(e.o=!0,wo(e))}).ia(OE)})}function vy(e){e.m=0,e.A=!0,e.G=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,wo(e)}function wo(e){var t;k(function(n){if(n.g==1)return T(n,Promise.resolve(),2);if(!e.g)return n.return();t=new G("caststatuschanged"),e.dispatchEvent(t),Ty(e)||Ei(e),K(n)})}function LE(e,t,n){var i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D;k(function(E){switch(E.g){case 1:for(i in t.player)r=t.player[i],e.g[i](r);return e.F(n),o=e.h.autoplay,t.manifest?(e.h.autoplay=!1,ue(E,5),T(E,e.g.load(t.manifest,t.startTime),7)):T(E,Promise.resolve(),3);case 7:if(t.addThumbnailsTrackCalls)for(s=g(t.addThumbnailsTrackCalls),u=s.next();!u.done;u=s.next())a=u.value,e.g.He.apply(e.g,H(a));if(t.addTextTrackAsyncCalls)for(l=g(t.addTextTrackAsyncCalls),c=l.next();!c.done;c=l.next())f=c.value,e.g.Hd.apply(e.g,H(f));if(t.addChaptersTrackCalls)for(p=g(t.addChaptersTrackCalls),h=p.next();!h.done;h=p.next())m=h.value,e.g.Ge.apply(e.g,H(m));ce(E,3);break;case 5:return y=ae(E),v=new Map().set("detail",y),x=new G("error",v),e.g&&e.g.dispatchEvent(x),E.return();case 3:if(!e.g)return E.return();for(S in t.video)w=t.video[S],e.h[S]=w;for(A in t.playerAfterLoad)D=t.playerAfterLoad[A],e.g[A](D);e.h.autoplay=o,t.manifest&&(e.h.play(),Ei(e)),K(E)}})}function yy(e,t,n){e.g&&(gd(e),Ai(e,{type:"event",targetName:t,event:n},e.l))}function gd(e){e.C.ia(UE);for(var t={video:{},player:{}},n=g(wE),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.h[i];e.g.V()&&oy.forEach(function(r,o){e.m%r==0&&(t.player[o]=e.g[o]())}),ld.forEach(function(r,o){e.m%r==0&&(t.player[o]=e.g[o]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),Ai(e,{type:"update",update:t},e.l),cd.forEach(function(r,o){e.m%r==0&&(r={player:{}},r.player[o]=e.g[o](),Ai(e,{type:"update",update:r},e.l))}),e.B&&(e.m+=1),Ty(e)}function Ty(e){return e.A&&(e.h.duration||e.g.V())?(md(e),e.A=!1,!0):!1}function md(e,t){var n={contentId:e.g.nd(),streamType:e.g.V()?"LIVE":"BUFFERED",contentType:""};e.g.V()||(n.duration=e.h.duration),e.i&&(n.metadata=e.i),Ei(e,t===void 0?0:t,n)}function NE(e,t){var n=ud(t.data);switch(n.type){case"init":e.m=0,e.B=!1,e.A=!0,LE(e,n.initState,n.appData),gd(e);break;case"appData":e.F(n.appData);break;case"set":var i=n.targetName,r=n.property;if(n=n.value,i=="video"){if(t=cast.receiver.CastReceiverManager.getInstance(),r=="volume"){t.setSystemVolumeLevel(n);break}else if(r=="muted"){t.setSystemVolumeMuted(n);break}}e.H[i][r]=n;break;case"call":i=e.H[n.targetName],i[n.methodName].apply(i,n.args);break;case"asyncCall":i=n.targetName,r=n.methodName,i=="player"&&r=="load"&&(e.m=0,e.B=!1);var o=n.id,s=t.senderId;t=e.H[i],n=t[r].apply(t,n.args),i=="player"&&r=="load"&&(n=n.then(function(){e.A=!0})),n.then(function(u){return xy(e,s,o,null,u)},function(u){return xy(e,s,o,u,null)})}}function jE(e,t){var n=ud(t.data);switch(n.type){case"PLAY":e.h.play(),Ei(e);break;case"PAUSE":e.h.pause(),Ei(e);break;case"SEEK":t=n.currentTime;var i=n.resumeState;t!=null&&(e.h.currentTime=Number(t)),i&&i=="PLAYBACK_START"?(e.h.play(),Ei(e)):i&&i=="PLAYBACK_PAUSE"&&(e.h.pause(),Ei(e));break;case"STOP":e.g.vc().then(function(){e.g&&Ei(e)});break;case"GET_STATUS":md(e,Number(n.requestId));break;case"VOLUME":i=n.volume,t=i.level,i=i.muted;var r=e.h.volume,o=e.h.muted;t!=null&&(e.h.volume=Number(t)),i!=null&&(e.h.muted=i),r==e.h.volume&&o==e.h.muted||Ei(e);break;case"LOAD":e.m=0,e.B=!1,e.A=!1,t=n.media,i=n.currentTime,r=e.I(t.contentId),o=n.autoplay||!0,e.F(t.customData),o&&(e.h.autoplay=!0),e.g.load(r,i).then(function(){e.g&&md(e)}).catch(function(s){var u="LOAD_FAILED";s.category==7&&s.code==7e3&&(u="LOAD_CANCELLED"),Ai(e,{requestId:Number(n.requestId),type:u},e.s)});break;default:Ai(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.s)}}function xy(e,t,n,i,r){e.g&&Ai(e,{type:"asyncComplete",id:n,error:i,res:r},e.l,t)}function Ai(e,t,n,i){e.G&&(e=iy(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function Ei(e,t,n){n=n===void 0?null:n;var i={mediaSessionId:0,playbackRate:e.h.playbackRate,playerState:e.o?_E:e.g.Mg()?FE:e.h.paused?BE:bE,currentTime:e.h.currentTime,supportedMediaCommands:63,volume:{level:e.h.volume,muted:e.h.muted}};n&&(i.media=n),Ai(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[i]},e.s)}W("shaka.cast.CastReceiver",Dt),Dt.prototype.destroy=Dt.prototype.destroy,Dt.prototype.setContentArtist=Dt.prototype.Rk,Dt.prototype.setContentImage=Dt.prototype.Sk,Dt.prototype.setContentTitle=Dt.prototype.Uk,Dt.prototype.clearContentMetadata=Dt.prototype.mj,Dt.prototype.setContentMetadata=Dt.prototype.Tk,Dt.prototype.isIdle=Dt.prototype.ek,Dt.prototype.isConnected=Dt.prototype.isConnected;var UE=.5,OE=5,_E="IDLE",bE="PLAYING",FE="BUFFERING",BE="PAUSED";function Sy(e,t,n,i,r){if(i>=r)return null;for(var o=-1,s=-1,u=0;u<n.length;u++)if(n[u].some(function(A){return A!=null&&A.g.trim()!=""})){o=u;break}for(u=n.length-1;0<=u;u--)if(n[u].some(function(A){return A!=null&&A.g.trim()!=""})){s=u;break}if(o===-1||s===-1)return null;for(var a=u=!1,l="white",c="black",f=vd(i,r,u,a,l,c);o<=s;o++){for(var p=n[o],h=-1,m=-1,y=0;y<p.length;y++)if(p[y]!=null&&p[y].g.trim()!==""){h=y;break}for(y=p.length-1;0<=y;y--)if(p[y]!=null&&p[y].g.trim()!==""){m=y;break}if(h===-1||m===-1)p=wy(i,r),e.nestedCues.push(p);else{for(;h<=m;h++)if(y=p[h]){var v=y.l,x=y.i,S=y.j,w=y.h;(v!=u||x!=a||S!=l||w!=c)&&(f.payload&&e.nestedCues.push(f),f=vd(i,r,v,x,S,w),u=v,a=x,l=S,c=w),f.payload+=y.g}else f.payload+=" ";f.payload&&e.nestedCues.push(f),o!==s&&(f=wy(i,r),e.nestedCues.push(f)),f=vd(i,r,u,a,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function vd(e,t,n,i,r,o){return e=new Be(e,t,""),n&&e.textDecoration.push(fi),i&&(e.fontStyle=Gr),e.color=r,e.backgroundColor=o,e}function wy(e,t){return e=new Be(e,t,""),e.lineBreak=!0,e}function Ay(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function yd(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.B=t,this.j=this.m=!1,this.l="white",this.o="black",this.s=this.A=null,Vs(this)}function il(e,t,n){var i="CC"+((e.C<<1|e.B)+1),r=new Be(t,n,"");r.lineInterpretation=1;var o=Cy.get(e.g);return o&&(r.line=o),e.s!=null&&e.A!=null&&(r.position=10+Math.min(70,10*e.s)+2.5*e.A),(t=Sy(r,i,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(o=Cy.get(e.g+3-t.cue.nestedCues.length))&&(r.line=o),t}function Vs(e){Ii(e,0,15),e.g=1}function Ao(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case 0:i=Iy.has(n)?Iy.get(n):String.fromCharCode(n);break;case 1:i=VE.get(n);break;case 2:e.i[e.g].pop(),i=HE.get(n);break;case 3:e.i[e.g].pop(),i=GE.get(n)}i&&e.i[e.g].push(new Ay(i,e.m,e.j,e.o,e.l))}}function Ey(e,t,n,i){if(!(0>n||0>t))if(t>=n)for(--i;0<=i;i--)e.i[t+i]=e.i[n+i].map(function(o){return o});else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map(function(o){return o})}function Ii(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var Iy=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),VE=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),HE=new Map([[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,"»"]]),GE=new Map([[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,"┘"]]),Cy=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function rl(e,t){this.h=0,this.o=new yd(e,t),this.i=new yd(e,t),this.g=this.j=new yd(e,t),this.l=0,this.m=null}function Td(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==3&&e.h!==4&&(r=il(i,e.l,n),n=e.i,n.g=0<n.h?n.h:0,Ii(n,0,15),n=e.j,n.g=0<n.h?n.h:0,Ii(n,0,15),i.g=15),e.h=3,i.h=t,r}function My(e){e.h=1,e.g=e.j,e.g.h=0}function ky(e){tr("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var KE="black green blue cyan red yellow magenta black".split(" "),Dy="white green blue cyan red yellow magenta white_italics".split(" ");function xd(e,t){this.I=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.s="black",Sd(this)}function Sd(e){e.i=[];for(var t=0;16>t;t++)e.i.push(wd())}function wd(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function Ki(e,t){Ry(e)&&(e.i[e.h][e.g]=new Ay(t,e.C,e.A,e.s,e.B),e.g++)}function Ry(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}xd.prototype.isVisible=function(){return this.l};function XE(e){for(var t=0,n=1;16>n;n++,t++)e.i[t]=e.i[n];for(n=0;1>n;n++,t++)e.i[t]=wd()}function kr(e,t,n){var i=new Be(e.j,t,"");i.textAlign=e.F===0?"left":e.F===1?"right":Qn;var r=i.region;switch(e.I&&(r.id+="svc"+e.I),r.id+="win"+e.M,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.H,r.viewportAnchorY=e.L,r.viewportAnchorUnits=e.K?qt:2,e.G){case 0:r.regionAnchorX=0,r.regionAnchorY=0;break;case 1:r.regionAnchorX=50,r.regionAnchorY=0;break;case 2:r.regionAnchorX=100,r.regionAnchorY=0;break;case 3:r.regionAnchorX=0,r.regionAnchorY=50;break;case 4:r.regionAnchorX=50,r.regionAnchorY=50;break;case 5:r.regionAnchorX=100,r.regionAnchorY=50;break;case 6:r.regionAnchorX=0,r.regionAnchorY=100;break;case 7:r.regionAnchorX=50,r.regionAnchorY=100;break;case 8:r.regionAnchorX=100,r.regionAnchorY=100}return(n=Sy(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}xd.prototype.display=function(){this.l=!0};function WE(){this.i=[],this.h=null,this.g=0}function zE(e,t){t.type===3?(e.g=2*(t.value&63)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),e.g===0&&(e.i.push(new Hs(e.h)),e.h=null,e.g=0))}function Hs(e){this.g=0,this.h=e}Hs.prototype.Ga=function(){return this.g<this.h.length},Hs.prototype.Ma=function(){return this.g};function ft(e){if(!e.Ga())throw new M(2,2,3e3);return e.h[e.g++]}Hs.prototype.skip=function(e){if(this.g+e>this.h.length)throw new M(2,2,3e3);this.g+=e},Hs.prototype.Ei=function(e){if(0>this.g-e)throw new M(2,2,3e3);this.g-=e};function YE(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function qE(e,t,n,i){if(!e.g)return[];if(n==24)return n=ft(t).value,i=ft(t).value,n=function(o){return o.map(function(s){return("0"+(s&255).toString(16)).slice(-2)}).join("")}([n,i]),Ki(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!Ry(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(r=kr(t,i,e.i)),t.h+1>=t.o?XE(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=kr(t,i,e.i)),t.i[t.h]=wd(),t.g=0;break;case 12:t.isVisible()&&(r=kr(t,i,e.i)),Sd(t),t.h=0,t.g=0}return r?[r]:[]}function $E(e,t,n,i){if(128<=n&&135>=n)i=n&7,e.h[i]&&(e.g=e.h[i]);else{if(n===136){n=ft(t).value,t=[],n=g(Gs(e,n));for(var r=n.next();!r.done;r=n.next()){if(r=e.h[r.value],r.isVisible()){var o=kr(r,i,e.i);o&&t.push(o)}Sd(r)}return t}if(n===137)for(t=ft(t).value,t=g(Gs(e,t)),n=t.next();!n.done;n=t.next())n=e.h[n.value],n.isVisible()||(n.j=i),n.display();else{if(n===138){for(n=ft(t).value,t=null,n=g(Gs(e,n)),r=n.next();!r.done;r=n.next())r=e.h[r.value],r.isVisible()&&(t=kr(r,i,e.i)),r.l=!1;return t?[t]:[]}if(n===139){for(n=ft(t).value,t=null,n=g(Gs(e,n)),r=n.next();!r.done;r=n.next())r=e.h[r.value],r.isVisible()?t=kr(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(n===140)return t=ft(t).value,Py(e,t,i);if(n===143)return i=Py(e,255,i),Ly(e),i;if(n===144)t.skip(1),i=ft(t).value,e.g&&(e.g.A=0<(i&128),e.g.C=0<(i&64));else if(n===145)i=ft(t).value,n=ft(t).value,t.skip(1),e.g&&(t=Ny((n&48)>>4,(n&12)>>2,n&3),e.g.B=Ny((i&48)>>4,(i&12)>>2,i&3),e.g.s=t);else if(n===146)i=ft(t).value,t=ft(t).value,e.g&&(e=e.g,e.h=i&15,e.g=t&63);else if(n===151)t.skip(1),t.skip(1),i=ft(t).value,t.skip(1),e.g&&(e.g.F=i&3);else if(152<=n&&159>=n){n=(n&15)-8,r=e.h[n]!==null,r||(o=new xd(n,e.i),o.j=i,e.h[n]=o),i=ft(t).value,o=ft(t).value;var s=ft(t).value,u=ft(t).value,a=ft(t).value;t=ft(t).value,r&&!(t&7)||(t=e.h[n],t.h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.s="black"),t=e.h[n],t.l=0<(i&32),t.L=o&127,t.H=s,t.G=(u&240)>>4,t.K=0<(o&128),t.o=(u&15)+1,t.m=(a&63)+1,e.g=e.h[n]}}}return[]}function Gs(e,t){for(var n=[],i=0;8>i;i++)(t&1)===1&&e.h[i]&&n.push(i),t>>=1;return n}function Py(e,t,n){var i=[];t=g(Gs(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var o=e.h[r];o.isVisible()&&(o=kr(o,n,e.i))&&i.push(o),e.h[r]=null}return i}function Ly(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function Ny(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],t=i[t],n=i[n],QE[e<<2|t<<1|n]}var jy=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),QE="black blue green cyan red magenta yellow white".split(" ");function Eo(){this.h=[],this.g=[],this.i=new WE,this.l=0,this.m=new Map([["CC1",new rl(0,0)],["CC2",new rl(0,1)],["CC3",new rl(1,0)],["CC4",new rl(1,1)]]),this.s=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,Ad(this)}Eo.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,Ad(this),e=g(this.j.values());for(var t=e.next();!t.done;t=e.next())Ly(t.value)};function Ad(e){e.o=0,e.s=0;for(var t=g(e.m.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,Vs(n.i),Vs(n.j),Vs(n.o);e.B=!0}Eo.prototype.extract=function(e,t){if(this.B){for(var n=g(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.B=!1}if(e=new He(e,0),!(8>e.getLength())&&e.X()===181&&e.Ba()===49&&e.T()===1195456820&&e.X()===3&&(n=e.X(),(n&64)!==0))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.X(),o=(r&4)>>2,s=e.X(),u=e.X();o&&(r&=3,r===0||r===1?this.h.push({pts:t,type:r,Bb:s,hc:u,order:this.h.length}):(this.g.push({pts:t,type:r,value:s,order:this.g.length}),this.g.push({pts:t,type:2,value:u,order:this.g.length})))}},Eo.prototype.decode=function(){function e(r,o){return r.pts-o.pts||r.order-o.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=g(this.h),i=n.next();!i.done;i=n.next())(i=JE(this,i.value))&&t.push(i);for(n=g(this.g),i=n.next();!i.done;i=n.next())zE(this.i,i.value);for(n=g(this.i.i),i=n.next();!i.done;i=n.next())i=ZE(this,i.value),t.push.apply(t,H(i));return this.i.i=[],this.h=[],this.g=[],t};function JE(e,t){var n=t.type;if((t.Bb&112)===16){var i=t.Bb>>3&1;n===0?e.o=i:e.s=i}if(i="CC"+((n<<1|(n?e.s:e.o))+1),n=e.m.get(i),t.Bb===255&&t.hc===255||!t.Bb&&!t.hc||!Uy(t.Bb)||!Uy(t.hc))return 45<=++e.l&&Ad(e),null;e.l=0,t.Bb&=127,t.hc&=127;var r=t.Bb;if(1<=r&&15>=r||!t.Bb&&!t.hc)return null;if(r=null,(t.Bb&112)===16)e:{if(e.A.add(i),i=t.Bb,e=t.hc,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,(i&240)===16&&(e&192)===64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(i&7)<<1|e>>5&1],i="white",r=!1;var o=null,s=95<e?e-96:e-64;13>=s?i=Dy[Math.floor(s/2)]:15>=s?r=!0:o=Math.floor((s-16)/2),e=(e&1)===1,n.h!==4&&(s=n.g,n.h===3&&t!==s.g&&(n=1+t-s.h,Ey(s,n,1+s.g-s.h,s.h),Ii(s,0,n-1),Ii(s,t+1,15-t)),s.g=t,s.m=e,s.j=r,s.l=i,s.s=o,s.o="black")}else if((i&247)===17&&(e&240)===32)n.g.m=!1,n.g.j=!1,n.g.l="white",Ao(n.g,0,32),i=!1,t=Dy[(e&14)>>1],t==="white_italics"&&(t="white",i=!0),n.g.m=(e&1)===1,n.g.j=i,n.g.l=t;else if((i&247)===16&&(e&240)===32||(i&247)===23&&(e&255)===45)t="black",!(i&7)&&(t=KE[(e&14)>>1]),n.g.o=t;else if((i&247)===17&&(e&240)===48)Ao(n.g,1,e);else if((i&246)===18&&(e&224)===32)Ao(n.g,i&1?3:2,e);else{if((i&246)===20&&(e&240)===32){switch(e=t.pts,i=null,t.hc){case 32:My(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:i=Td(n,2,e);break;case 38:i=Td(n,3,e);break;case 39:i=Td(n,4,e);break;case 40:Ao(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Vs(n.o),ky(n);break;case 43:ky(n);break;case 44:t=n.i,i=null,n.h!==4&&(i=il(t,n.l,e)),Ii(t,0,15);break;case 45:t=n.g,n.h!==3?i=null:(i=il(t,n.l,e),r=t.g-t.h+1,Ey(t,r-1,r,t.h),Ii(t,0,r-1),Ii(t,t.g,15-t.g),n.l=e);break;case 46:Ii(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=il(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,My(n),n.l=e,i=t}r=i;break e}(i==23||i==31)&&33<=e&&35>=e&&(n.g.A=e-32)}r=null}else e=t.hc,Ao(n.g,0,t.Bb),Ao(n.g,0,e);return r}function ZE(e,t){var n=[];try{for(;t.Ga();){var i=ft(t).value,r=(i&224)>>5,o=i&31;if(r===7&&o!=0&&(r=ft(t).value&63),r!=0){e.A.add("svc"+r),e.j.has(r)||e.j.set(r,new YE(r));for(var s=e.j.get(r),u=t.Ma();t.Ma()-u<o;){r=s;var a=t,l=ft(a),c=l.value,f=l.pts;if(c===16){var p=ft(a);c=c<<16|p.value}if(0<=c&&31>=c)var h=qE(r,a,c,f);else if(128<=c&&159>=c)h=$E(r,a,c,f);else{if(4096<=c&&4127>=c)r=a,a=c&255,8<=a&&15>=a?r.skip(1):16<=a&&23>=a?r.skip(2):24<=a&&31>=a&&r.skip(3);else if(4224<=c&&4255>=c)r=a,a=c&255,128<=a&&135>=a?r.skip(4):136<=a&&143>=a&&r.skip(5);else if(32<=c&&127>=c)a=c,r.g&&(a===127?Ki(r.g,"♪"):Ki(r.g,String.fromCharCode(a)));else if(160<=c&&255>=c)r.g&&Ki(r.g,String.fromCharCode(c));else if(4128<=c&&4223>=c){if(a=c&255,r.g)if(jy.has(a)){var m=jy.get(a);Ki(r.g,m)}else Ki(r.g,"_")}else 4256<=c&&4351>=c&&r.g&&((c&255)!=160?Ki(r.g,"_"):Ki(r.g,"[CC]"));h=[]}n.push.apply(n,H(h))}}}}catch(y){if(y instanceof M&&y.code===3e3)tr("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y}return n}function Uy(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}Eo.prototype.getStreams=function(){return Array.from(this.A)},W("shaka.cea.CeaDecoder",Eo),or=function(){return new Eo};function Oy(e){for(var t=[],n=e,i=e=0;i<n.length;)e==2&&n[i]==3?(e=0,n=[].concat(H(n)),n.splice(i,1),n=new Uint8Array(n)):n[i]==0?e++:e=0,i++;for(e=n,i=0;i<e.length;){for(n=0;e[i]==255;)n+=255,i++;n+=e[i++];for(var r=0;e[i]==255;)r+=255,i++;r+=e[i++],n==4&&t.push(e.subarray(i,i+r)),i+=r}return t}function ol(){this.j=new Map,this.i=this.h=0,this.g=Ed}ol.prototype.init=function(e){function t(o){o=o.name,sl.has(o)&&(n.g=sl.get(o))}var n=this,i=[],r=[];if(new Ue().box("moov",le).box("mvex",le).R("trex",function(o){var s=o.reader;s.skip(4),s.skip(4),o=s.T(),s=s.T(),n.h=o,n.i=s}).box("trak",le).R("tkhd",function(o){var s=o.reader;o=o.version,o==1?(s.skip(8),s.skip(8)):(s.skip(4),s.skip(4));var u=s.T();o==1?s.skip(8):s.skip(4),s.skip(4),s.skip(8),s.skip(2),s.skip(2),s.skip(2),s.skip(2),s.skip(36),s.Ba(),s.Ba(),s.Ba(),s.Ba(),i.push(u)}).box("mdia",le).R("mdhd",function(o){o=ra(o.reader,o.version),r.push(o.timescale)}).box("minf",le).box("stbl",le).R("stsd",mi).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",Qt).box("sinf",le).box("frma",function(o){o=Wc(o.reader).codec,sl.has(o)&&(n.g=sl.get(o))}).parse(e,!0,!0),!i.length||!r.length||i.length!=r.length)throw new M(2,2,2010);this.g==Ed&&Ae("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(o,s){n.j.set(o,r[s])})},ol.prototype.parse=function(e){var t=this;if(this.g==Ed)return[];var n=[],i=0,r=[];return new Ue().box("moof",function(o){i=o.start,r=[],le(o)}).box("traf",function(o){r.push({baseMediaDecodeTime:null,Md:t.h,Nd:t.i,ti:[],timescale:9e4}),le(o)}).R("trun",function(o){var s=r[r.length-1];o=oa(o.reader,o.version,o.flags),s.ti.push(o)}).R("tfhd",function(o){var s=r[r.length-1];o=na(o.reader,o.flags),s.Md=o.Md||t.h,s.Nd=o.Nd||t.i,o=o.trackId,t.j.has(o)&&(s.timescale=t.j.get(o))}).R("tfdt",function(o){var s=r[r.length-1];o=ia(o.reader,o.version),s.baseMediaDecodeTime=o.baseMediaDecodeTime}).box("mdat",function(o){for(var s=i-o.start-8,u=o.reader.Ma(),a=g(r),l=a.next();!l.done;l=a.next())l=l.value,l.baseMediaDecodeTime===null?Ae("Unable to find base media decode time for CEA captions!"):(o.reader.seek(u),e2(t,o.reader,l.baseMediaDecodeTime,l.timescale,l.Md,l.Nd,s,l.ti,n))}).parse(e,!1,!0),n};function e2(e,t,n,i,r,o,s,u,a){var l=0,c=o,f=u.map(function(m){return m.gh});for(f=[].concat.apply([],H(f)),f.length&&(c=f[0].sampleSize||o),t.skip(s+u[0].mg);t.Ga();){s=t.T();var p=t.X(),h=null;switch(h=!1,u=1,e.g){case Ks:h=p&31,h=h==6;break;case Xs:u=2,t.skip(1),h=p>>1&63,h=h==39||h==40;break;case Ws:u=2,t.skip(1),h=p>>1&63,h=h==23||h==24;break;default:return}if(h)for(p=0,l<f.length&&(p=f[l].Bf||0),p=(n+p)/i,u=g(Oy(t.Ub(s-u))),h=u.next();!h.done;h=u.next())a.push({packet:h.value,pts:p});else try{t.skip(s-u)}catch{break}c-=s+4,c==0&&(n=l<f.length?n+(f[l].hh||r):n+r,l++,l<f.length?c=f[l].sampleSize||o:c=o)}}W("shaka.cea.Mp4CeaParser",ol);var Ed=0,Ks=1,Xs=2,Ws=3,sl=new Map().set("avc1",Ks).set("avc3",Ks).set("dvav",Ks).set("dva1",Ks).set("hev1",Xs).set("hvc1",Xs).set("dvh1",Xs).set("dvhe",Xs).set("vvc1",Ws).set("vvi1",Ws).set("dvc1",Ws).set("dvi1",Ws);yc("video/mp4",function(){return new ol});function ul(){this.g=null}ul.prototype.init=function(){},ul.prototype.parse=function(e){this.g?this.g.clearData():this.g=new Fe;var t=[];if(e=se(e),!oo(e))return t;e=this.g.parse(e);var n=e.Od(),i=e.Xe();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(n=g(i),i=n.next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&i.time!=null)for(var r=g(Oy(i.data)),o=r.next();!o.done;o=r.next())t.push({packet:o.value,pts:i.time});return t},W("shaka.cea.TsCeaParser",ul),yc("video/mp2t",function(){return new ul});function t2(e){var t=0,n=Ht(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,r&1||r+e>n.byteLength){n=[];break e}var o=se(n,e,r);t.push({type:i,value:o}),e+=r}n=t}return n}function _y(e){return e=mn(ot(e)),e=t2(e).filter(function(t){return t.type===n2})[0],e?(e=Ri(e.value,!0),(e=lr(e,"WRMHEADER"))?e:null):null}function al(e){try{var t=_y(e);if(t)e:{for(var n=g(Vn(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var o=g(r.children),s=o.next();!s.done;s=o.next()){var u=s.value;if(u.tagName=="LA_URL"){var a=ot(u);break e}}}a=""}else a="";return a}catch{return""}}var n2=1;function by(e,t,n){var i=o2(e),r=null;e=[];var o=[],s=null,u=new Set(i.map(function(l){return l.keyId}));u.delete(null);var a="cenc";if(1<u.size)throw new M(2,4,4010);if(!t){if(o=i.filter(function(l){return l.Bd=="urn:mpeg:dash:sea:2012"}),1<o.length)throw new M(2,4,4050);o.length&&(s=u2(o[0])),(o=i.find(function(l){return l.Bd=="urn:mpeg:dash:mp4protection:2011"}))&&o.encryptionScheme&&(a=o.encryptionScheme),o=i.filter(function(l){return l.Bd=="urn:mpeg:dash:mp4protection:2011"?(r=l.init||r,!1):l.Bd!="urn:mpeg:dash:sea:2012"}),o.length&&(e=r2(r,a,o,n,u),e.length==0&&(e=[ui("",a,r)]))}if(i.length&&!s&&(t||!o.length))for(e=[],t=g(Object.values(n)),n=t.next();!n.done;n=t.next())n=n.value,n!="org.w3.clearkey"&&e.push(ui(n,a,r));if(u=Array.from(u)[0]||null)for(a=g(e),t=a.next();!t.done;t=a.next())for(t=g(t.value.initData),n=t.next();!n.done;n=t.next())n.value.keyId=u;return{Oh:u,vm:r,drmInfos:e,cg:s,Th:!0}}function i2(e,t,n,i){var r=by(e,n,i);if(t.Th)e=t.drmInfos.length==1&&!t.drmInfos[0].keySystem,n=r.drmInfos.length==0,(t.drmInfos.length==0||e&&!n)&&(t.drmInfos=r.drmInfos),t.Th=!1;else if(0<r.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(o){return r.drmInfos.some(function(s){return s.keySystem==o.keySystem})}),t.drmInfos.length==0))throw new M(2,4,4008);return r.Oh||t.Oh}function ll(e){var t=Ln(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=ot(t)))return t;if((t=Ln(e.node,"urn:microsoft:playready","pro"))&&ot(t))return al(t);if((e=Ln(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=ot(e))){t=mn(e),e=8,t=Ht(t);var n=t.getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),e=se(t,e+4),e=wu(e),e=lr("<pro>"+e+"</pro>"),al(e)}return""}function r2(e,t,n,i,r){var o=[];n=g(n);for(var s=n.next();!s.done;s=n.next()){s=s.value;var u=i[s.Bd];if(u){var a;if((a=Ln(s.node,"urn:microsoft:playready","pro"))&&ot(a)){a=ot(a),a=mn(a);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=[{initData:Ju(a,l,new Set,0),initDataType:"cenc",keyId:s.keyId}]}else a=null;if(l=null,s.Bd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=s;var c=r;if(c.size==0)l=null;else{var f=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Ju(p,f,c,1),initDataType:"cenc",keyId:l.keyId}]}}a=ui(u,t,s.init||e||a||l),(u=a2.get(u))&&(a.licenseServerUri=u(s)),o.push(a)}}return o}function o2(e){var t=[];e=g(e);for(var n=e.next();!n.done;n=e.next())(n=s2(n.value))&&t.push(n);return t}function s2(e){var t=e.attributes.schemeIdUri,n=ai(e,"urn:mpeg:cenc:2013","default_KID"),i=Dh(e,"urn:mpeg:cenc:2013","pssh").map($t),r=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),n.includes(" ")))throw new M(2,4,4009);var o=[];try{o=i.map(function(s){return{initDataType:"cenc",initData:mn(s),keyId:null}})}catch{throw new M(2,4,4007)}return{node:e,Bd:t,keyId:n,init:0<o.length?o:null,encryptionScheme:r}}function u2(e){if(!F.crypto||!F.crypto.subtle)throw Ae("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var t=Ln(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new M(2,4,4051);if(t.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new M(2,4,4051);if(t=Ln(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new M(2,4,4051);if(e=t.attributes.IV,t=Gt(t.attributes.keyUriTemplate),!e||!t)throw new M(2,4,4051);if(e=rr(e.substr(2)),e.byteLength!=16)throw new M(2,4,4048);return{kk:t,iv:e}}var a2=new Map().set("com.apple.fps",function(e){if(F.shakaMediaKeysPolyfill==="apple")throw new M(2,4,4054);return(e=Ln(e.node,"https://dashif.org/CPS","Laurl"))&&(e=ot(e))?e:""}).set("com.widevine.alpha",function(e){var t=Ln(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=ot(t))?t:(e=Ln(e.node,"urn:microsoft","laurl"))&&Gt(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",ll).set("com.microsoft.playready.recommendation",ll).set("com.microsoft.playready.software",ll).set("com.microsoft.playready.hardware",ll).set("org.w3.clearkey",function(e){var t=Ln(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=ot(t))?t:(e=Ln(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=ot(e))?e:""});function zs(e,t,n,i,r,o){var s=new Map().set("RepresentationID",t).set("Number",n).set("SubNumber",i).set("Bandwidth",r).set("Time",o);return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(u,a,l,c){if(u=="$$")return"$";var f=s.get(a);if(f==null)return u;switch(a=="RepresentationID"&&l&&(l=void 0),a=="Time"&&typeof f!="bigint"&&(.2<=Math.abs(f-Math.round(f))&&Ae("Calculated $Time$ values must be close to integers"),f=Math.round(f)),c){case void 0:case"d":case"i":case"u":u=f.toString();break;case"o":u=f.toString(8);break;case"x":u=f.toString(16);break;case"X":u=f.toString(16).toUpperCase();break;default:u=f.toString()}return l=F.parseInt(l,10)||1,Array(Math.max(0,l-u.length)+1).join("0")+u})}function Fy(e,t){var n=_n(e,t,"timescale"),i=1;n&&(i=ci(n)||1),n=_n(e,t,"duration");var r=(n=ci(n||""))?n/i:null,o=_n(e,t,"startNumber"),s=Number(_n(e,t,"presentationTimeOffset"))||0,u=wt(o||"");if((o==null||u==null)&&(u=1),o=null,t=Io(e,t,"SegmentTimeline")){t=Ne(t,"S"),o=i,e=e.ma.duration||1/0;for(var a=u,l=[],c=-s,f=0;f<t.length;++f){var p=t[f],h=t[f+1],m=oe(p,"t",wt),y=oe(p,"d",wt),v=oe(p,"r",yt);if(p=oe(p,"k",yt)||0,m!=null&&(m-=s),y){if(m=m??c,v=v||0,0>v)if(h){if(h=oe(h,"t",wt),h==null)break;if(m>=h)break;v=Math.ceil((h-m)/y)-1}else{if(e==1/0)break;if(m/o>=e)break;v=Math.ceil((e*o-m)/y)-1}for(0<l.length&&m!=c&&(l[l.length-1].end=m/o),h=0;h<=v;++h)c=m+y,l.push({start:m/o,end:c/o,Bh:m,rc:p,Nk:l.length+a}),m=c}}o=l}return{timescale:i,Kf:n,gb:r,ie:u,Ib:s/i||0,dd:s,timeline:o}}function By(e,t){return[t(e.J),t(e.oa),t(e.ra)].filter(Oi)}function _n(e,t,n){t=By(e,t),e=null,t=g(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function Io(e,t,n){t=By(e,t),e=null,t=g(t);for(var i=t.next();!i.done&&!(e=Ye(i.value,n));i=t.next());return e}function l2(e,t,n,i,r,o){for(var s=ai(e,"http://www.w3.org/1999/xlink","href"),u=ai(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",a=g(Object.keys(e.attributes)),l=a.next();!l.done;l=a.next()){l=l.value;var c=l.split(":"),f=Sc("http://www.w3.org/1999/xlink");c[0]==f&&delete e.attributes[l]}if(5<=o)return gr(new M(2,4,4028));if(u!="onLoad")return gr(new M(2,4,4027));var p=ht([i],[s]);return r.request(0,lt(p,t)).Va(function(h){if(h=qo(h.data,e.tagName),!h)return gr(new M(2,4,4001,s));for(e.children=[];h.children.length;){var m=h.children.shift();e.children.push(m)}m=g(Object.keys(h.attributes));for(var y=m.next();!y.done;y=m.next())y=y.value,e.attributes[y]=h.attributes[y];return cl(e,t,n,p[0],r,o+1)})}function cl(e,t,n,i,r,o){if(o=o===void 0?0:o,ai(e,"http://www.w3.org/1999/xlink","href")){var s=l2(e,t,n,i,r,o);return n&&(s=s.Va(void 0,function(){return cl(e,t,n,i,r,o)})),s}s=[];for(var u=g(kh(e)),a=u.next(),l={};!a.done;l={Jd:void 0},a=u.next())l.Jd=a.value,ai(l.Jd,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter(function(c){return function(f){return f!==c.Jd}}(l)):l.Jd.tagName!="SegmentTimeline"&&s.push(cl(l.Jd,t,n,i,r,o));return dg(s).Va(function(){return e})}function c2(e,t,n,i,r,o,s){var u,a=new Ue().R("sidx",function(l){u=f2(t,i,r,o,s,n,l)});if(e&&a.parse(e),u)return u;throw new M(2,3,3004)}function f2(e,t,n,i,r,o,s){var u=[];s.reader.skip(4);var a=s.reader.T();if(a==0)throw new M(2,3,3005);if(s.version==0)var l=s.reader.T(),c=s.reader.T();else l=s.reader.yd(),c=s.reader.yd();s.reader.skip(2);var f=s.reader.Ba();for(e=e+s.size+c,c=0;c<f;c++){var p=s.reader.T(),h=(p&2147483648)>>>31;p&=2147483647;var m=s.reader.T();if(s.reader.skip(4),h==1)throw new M(2,3,3006);u.push(new Z(l/a+n,(l+m)/a+n,function(){return o},e,e+p-1,t,n,i,r)),l+=m,e+=p}return s.parser.stop(),u}function Xi(e){this.h=Ht(e),this.g=new He(this.h,0)}Xi.prototype.Ga=function(){return this.g.Ga()};function Ci(e){var t=Vy(e);if(7<t.length)throw new M(2,3,3002);var n=0;t=g(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=Vy(e);e:{i=g(d2);for(var r=i.next();!r.done;r=i.next())if(ri(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Ma();else{if(t.length==8&&t[1]&224)throw new M(2,3,3001);for(r=i=0;r<t.length;r++){var o=t[r];i=r==0?o&(1<<8-t.length)-1:256*i+o}t=i}return t=e.g.Ma()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ma(),i=Ht(e.h,e.g.Ma(),t),e.g.skip(t),new p2(n,i)}function Vy(e){var t=e.g.Ma(),n=e.g.X();if(n==0)throw new M(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),se(e.h,t,n)}var d2=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function p2(e,t){this.id=e,this.g=t}function Id(e){if(8<e.g.byteLength)throw new M(2,3,3002);if(e.g.byteLength==8&&e.g.getUint8(0)&224)throw new M(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){var i=e.g.getUint8(n);t=256*t+i}return t}function h2(e,t,n,i,r,o,s,u,a){function l(){return r}var c=[];e=new Xi(e.g);for(var f=null,p=null;e.Ga();){var h=Ci(e);if(h.id==187){var m=g2(h);m&&(h=n*m.al,m=t+m.Fk,f!=null&&c.push(new Z(f+s,h+s,l,p,m-1,o,s,u,a)),f=h,p=m)}}return f!=null&&c.push(new Z(f+s,i+s,l,p,null,o,s,u,a)),c}function g2(e){var t=new Xi(e.g);if(e=Ci(t),e.id!=179)throw new M(2,3,3013);if(e=Id(e),t=Ci(t),t.id!=183)throw new M(2,3,3012);t=new Xi(t.g);for(var n=0;t.Ga();){var i=Ci(t);if(i.id==241){n=Id(i);break}}return{al:e,Fk:n}}function Hy(e,t,n){if(t=Io(e,t,"Initialization"),!t)return null;var i=e.J.cb(),r=t.attributes.sourceURL;r&&(i=ht(i,[Gt(r)],e.Lb())),r=0;var o=null;return(t=oe(t,"range",Cu))&&(r=t.start,o=t.end),n=new Xt(function(){return i},r,o,Wy(e),null,null,n,e.oa.encrypted),n.codecs=e.J.codecs,n.mimeType=e.J.mimeType,e.ma&&!e.ma.bf&&(n.g=e.ma.start+e.ma.duration),n}function m2(e,t,n){var i=Number(_n(e,Co,"presentationTimeOffset"))||0,r=_n(e,Co,"timescale"),o=1;r&&(o=ci(r)||1);var s=i/o||0,u=Hy(e,Co,n);v2(e,u);var a=Pi(e);return{endTime:-1,timeline:-1,Oc:function(){var l=Io(a,Co,"RepresentationIndex"),c=a.J.cb();return l&&(l=Gt(l.attributes.sourceURL))&&(c=ht(c,[l],a.Lb())),l=Ky(a),Gy(a,t,u,c,l.start,l.end,s)},timescale:o}}function Gy(e,t,n,i,r,o,s){var u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C;return k(function(R){if(R.g==1)return u=e.presentationTimeline,a=!e.Db||!e.ma.bf,l=e.ma.start,c=e.ma.duration,f=e.J.mimeType.split("/")[1],p=t,h=null,m=[p(i,r,o,!1),f=="webm"?p(n.O(),n.startByte,n.endByte,!0):null],p=null,T(R,Promise.all(m),2);if(y=R.h,v=y[0],x=y[1]||null,S=null,w=l-s,A=l,D=c?l+c:1/0,f=="mp4")var N=c2(v,r,i,n,w,A,D);else{N=v;var L=new Xi(x);if(Ci(L).id!=440786851)throw new M(2,3,3008);var P=Ci(L);if(P.id!=408125543)throw new M(2,3,3009);L=P.g.byteOffset,P=new Xi(P.g);for(var b=null;P.Ga();){var U=Ci(P);if(U.id==357149030){b=U;break}}if(!b)throw new M(2,3,3010);for(b=new Xi(b.g),U=1e6,P=null;b.Ga();){var j=Ci(b);if(j.id==2807729)U=Id(j);else if(j.id==17545)if(j.g.byteLength==4)P=j.g.getFloat32(0);else if(j.g.byteLength==8)P=j.g.getFloat64(0);else throw new M(2,3,3003)}if(P==null)throw new M(2,3,3011);if(b=U/1e9,P*=b,N=Ci(new Xi(N)),N.id!=475249515)throw new M(2,3,3007);N=h2(N,L,b,P,i,n,w,A,D)}for(S=N,E=g(S),I=E.next();!I.done;I=E.next())C=I.value,C.codecs=e.J.codecs,C.mimeType=e.J.mimeType,C.bandwidth=e.bandwidth;return u.$d(S),h=new Ie(S),a&&h.ld(A,D,!0),R.return(h)})}function Co(e){return e.Cd}function Ky(e){var t=Io(e,Co,"RepresentationIndex");return e=_n(e,Co,"indexRange"),e=Cu(e||""),t&&(e=oe(t,"range",Cu,e)),e}function v2(e,t){if(Xy(e,t),!Ky(e))throw new M(2,4,4002)}function Xy(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=pe&&n!="mp4"&&n!="webm")throw new M(2,4,4006);if(n=="webm"&&!t)throw new M(2,4,4005)}function Wy(e){var t=e.J;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.qf,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.oa.label||null,roles:e.roles||null,language:e.oa.language||null}}function y2(e,t,n){var i=Hy(e,zy,n),r=T2(e);if(!r.gb&&!r.timeline&&1<r.sd.length)throw new M(2,4,4002);if(!r.gb&&!e.ma.duration&&!r.timeline&&r.sd.length==1)throw new M(2,4,4002);if(r.timeline&&r.timeline.length==0)throw new M(2,4,4002);var o=null,s=null;e.ra.id&&e.J.id&&(s=t.get(e.ra.id+","+e.J.id))&&(o=s.segmentIndex);var u=x2(e.ma.start,e.ma.duration,e.J.cb,r,i,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.Lb);return t=!o,o?o.Yd(u,e.presentationTimeline.Gb()):o=new Ie(u),e.presentationTimeline.$d(u),e.Db&&e.ma.bf||o.ld(e.ma.start,e.ma.duration?e.ma.start+e.ma.duration:1/0,t),s&&(s.segmentIndex=o),{endTime:-1,timeline:-1,Oc:function(){return o&&o.getNumReferences()!=0||o.kf(u),Promise.resolve(o)},timescale:r.timescale}}function zy(e){return e.tc}function T2(e){var t=S2(e);e=Fy(e,zy);var n=e.ie;n==0&&(n=1);var i=0;return e.gb?i=e.gb*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{gb:e.gb,startTime:i,ie:n,Ib:e.Ib,timescale:e.timescale,timeline:e.timeline,sd:t}}function x2(e,t,n,i,r,o,s,u,a,l){var c=i.sd.length;i.timeline&&i.timeline.length!=i.sd.length&&(c=Math.min(i.timeline.length,i.sd.length));for(var f=e-i.Ib,p=t?e+t:1/0,h=[],m=i.startTime,y={},v=0;v<c;y={Mf:void 0,Cf:void 0},v++){y.Cf=i.sd[v];var x=m;m=void 0,m=i.gb!=null?x+i.gb:i.timeline?i.timeline[v].end:x+t,y.Mf=null,y=new Z(e+x,e+m,function(S){return function(){return S.Mf==null&&(S.Mf=ht(n(),[S.Cf.tk],l())),S.Mf}}(y),y.Cf.start,y.Cf.end,r,f,e,p,[],"",null,null,vi,o),y.codecs=u,y.mimeType=s,y.bandwidth=a,h.push(y)}return h}function S2(e){return[e.J.tc,e.oa.tc,e.ra.tc].filter(Oi).map(function(t){return Ne(t,"SegmentURL")}).reduce(function(t,n){return 0<t.length?t:n}).map(function(t){t.attributes.indexRange&&!e.Jg&&(e.Jg=!0);var n=Gt(t.attributes.media);return t=oe(t,"mediaRange",Cu,{start:0,end:null}),{tk:n,start:t.start,end:t.end}})}function Yy(e,t,n,i,r,o,s,u,a,l){a||e.J.Ze||(e.J.Ze=_n(e,Wi,"initialization"));var c=e.J.Ze?I2(e,s):null,f=w2(e);A2(f);var p=Pi(e);if(f.Vd)return Xy(e,c),{endTime:-1,timeline:-1,Oc:function(){var x=zs(f.Vd,p.J.originalId,null,null,p.bandwidth||null,null);return x=ht(p.J.cb(),[x]),Gy(p,t,c,x,0,null,f.Ib)},timescale:f.timescale};if(f.gb)return i||e.oa.contentType==="image"||e.oa.contentType==="text"||(i=e.ma.start,l=e.ra.id,n=e.ma.duration,l=(l=l!=null&&o.get(l)||n)?i+l:1/0,e.presentationTimeline.Rg(f.gb),e.presentationTimeline.ri(i,l)),{endTime:-1,timeline:-1,Oc:function(){return E2(p,f,r,c,o,s,u,e.J.Df)},timescale:f.timescale};var h=null;i=i=null,e.ra.id&&e.J.id&&(i=e.ra.id+","+e.J.id,i=n.get(i))&&(h=i.segmentIndex);var m=e.ma.start,y=e.ma.duration?m+e.ma.duration:1/0;if(h)l=h,qy(l,f,m,y,c,e.Db),l.$a(e.presentationTimeline.Gb());else{if(n=0,a=-1,e.ra.id!=null&&e.J.id!=null){var v=l.get(e.ra.id);if(v)a=v.timeline;else for(l=g(l.values()),v=l.next();!v.done;v=l.next())if(v=v.value,Math.abs(f.Ib-v.endTime)<=Th&&v.ah.includes(e.J.id)){a=v.timeline;break}else v.timeline>=n&&(n=v.timeline+1)}a==-1&&(a=n),h=new Ys(e.Db,f,e.J.originalId,e.bandwidth,e.J.cb,e.Lb,m,y,c,s,e.J.Df,a)}return f.timeline&&e.oa.contentType!=="image"&&e.oa.contentType!=="text"&&e.presentationTimeline.si(h.h?h.h.timeline:[],m),i&&e.Db&&(i.segmentIndex=h),i=(i=(i=f.timeline)&&i[i.length-1])?i.end+f.Ib:-1,l=-1,h instanceof Ys&&(l=h.Pe()),{endTime:i,timeline:l,Oc:function(){return h instanceof Ys&&h.getNumReferences()==0&&qy(h,f,m,y,c,e.Db),Promise.resolve(h)},timescale:f.timescale}}function Wi(e){return e.Gc}function w2(e){var t=Fy(e,Wi),n=_n(e,Wi,"media"),i=_n(e,Wi,"index"),r=_n(e,Wi,"k"),o=0;return r&&(o=parseInt(r,10)),{Kf:t.Kf,gb:t.gb,timescale:t.timescale,ie:t.ie,Ib:t.Ib,dd:t.dd,timeline:t.timeline,ac:n&&Gt(n),Vd:i,mimeType:e.J.mimeType,codecs:e.J.codecs,bandwidth:e.bandwidth,vk:o}}function A2(e){var t=e.Vd?1:0;if(t+=e.timeline?1:0,t+=e.gb?1:0,t==0)throw new M(2,4,4002);if(t!=1&&(e.Vd&&(e.timeline=null),e.Kf=null,e.gb=null),!e.Vd&&!e.ac)throw new M(2,4,4002)}function E2(e,t,n,i,r,o,s,u){function a(P){var b=P-v,U=b*y,j=t.Kf,O=b*j;"BigInt"in F&&O>Number.MAX_SAFE_INTEGER&&(O=BigInt(b)*BigInt(j)),U+=p,b=U+y,j=Math.min(b,c());var B=[],V=t.vk;if(V)for(var q=(j-U)/V,X={},Ce=0;Ce<V;X={Ri:void 0},Ce++){var he=U+q*Ce,xe=he+q;X.Ri=Ce,X=new Z(he,xe,function(ve){return function(){var me=zs(x,w,P,ve.Ri,S,O);return ht(A(),[me],D())}}(X),0,null,i,E,p,c(),[],"",null,null,vi,o),X.codecs=e.J.codecs,X.mimeType=e.J.mimeType,u==0?0<Ce&&X.qd():Ce%u!=0&&X.qd(),B.push(X)}return U=new Z(U,j,function(){if(V)return[];var ve=zs(x,w,P,null,S,O);return ht(A(),[ve],D())},0,null,i,E,p,c(),B,"",null,null,vi,o,0<B.length),U.codecs=e.J.codecs,U.mimeType=e.J.mimeType,U.bandwidth=e.bandwidth,U.j=b,U}function l(){var P=[Math.max(f.Gb(),p),Math.min(f.Ac(),c())].map(function(b){return b-p});return P=[Math.ceil(P[0]/y),Math.ceil(P[1]/y)-1],e.J.qb&&P[1]++,P.map(function(b){return b+v})}function c(){var P=h!=null&&r.get(h)||m;return P?p+P:1/0}var f=e.presentationTimeline,p=e.ma.start,h=e.ra.id,m=e.ma.duration,y=t.gb,v=t.ie,x=t.ac,S=e.bandwidth||null,w=e.J.originalId,A=e.J.cb,D=e.Lb,E=p-t.Ib,I=l();n=e.Db?Math.max(I[0],I[1]-n+1):I[0],s=s||I[1],I=[];for(var C=n;C<=s;++C){var R=a(C);I.push(R)}var N=new Ie(I);if(I=f.Ac()<c(),C=f.V(),I||C){var L=Math.max(n,s+1);n=y,e.J.qb&&(n=.1),N.Lf(n,function(){var P=f.Gb();N.$a(P);var b=g(l());b.next(),b=b.next().value;for(var U=[];L<=b;){var j=a(L);U.push(j),L++}return P>c()&&!U.length?null:U})}return Promise.resolve(N)}function I2(e,t){var n=e.J.Ze;if(n||(n=_n(e,Wi,"initialization")),!n)return null;n=Gt(n);var i=e.J.originalId,r=e.bandwidth||null,o=e.J.cb,s=e.Lb;return t=new Xt(function(){var u=zs(n,i,null,null,r,null);return ht(o(),[u],s())},0,null,Wy(e),null,null,t,e.oa.encrypted),t.codecs=e.J.codecs,t.mimeType=e.J.mimeType,e.ma&&!e.ma.bf&&(t.g=e.ma.start+e.ma.duration),t}function Ys(e,t,n,i,r,o,s,u,a,l,c,f){Ie.call(this,[]),this.C=e,this.h=t,this.G=n,this.B=i,this.F=r,this.I=o,this.j=s,this.l=u,this.s=a,this.A=l,this.H=c,this.K=f,Cd(this)}et(Ys,Ie),d=Ys.prototype,d.getNumReferences=function(){return this.h?this.h.timeline.length:0},d.release=function(){Ie.prototype.release.call(this),this.h=null},d.$a=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length&&n[i].end+this.j<=e;i+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,this.getNumReferences()===0&&this.release())}};function qy(e,t,n,i,r,o){if(C2(e,r),e.C=o,e.h){if(e.h.dd!==t.dd&&(e.h.timeline=t.timeline,e.h.dd=t.dd,e.h.Ib=t.Ib),e.h.ac!==t.ac&&(e.h.ac=t.ac),n=e.h.timeline,n.length){var s=n[n.length-1];t=t.timeline.filter(function(u){return u.end>s.end})}else t=t.timeline.slice();0<t.length&&e.h.timeline.push.apply(e.h.timeline,H(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;Cd(e)}function C2(e,t){if(e.s!==t){e.s=t,e=g(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&qg(n,t)}}function Cd(e){if(e.h&&!e.o){for(var t=[],n=g(e.h.timeline),i=n.next();!i.done;i=n.next())i=i.value,i.start>=e.l||0>=i.end||t.push(i);e.h.timeline=t,e.$a(e.j)}}d.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,i=0;i<t.length;i++){var r=t[i],o=r.start+this.j;if(r=i<n?t[i+1].start+this.j:this.l===1/0?r.end+this.j:this.l,e>=o&&e<r)return i+this.i}return null},d.get=function(e){var t=this;if(e-=this.i,0>e||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){n=this.h.timeline[e];var i=n.Nk,r=n.Bh+this.h.dd,o=this.j-this.h.Ib,s=this.j+n.end,u=s;e===this.getNumReferences()-1&&this.l!==1/0&&(u=this.C&&.1<Math.abs(u-this.l)?Math.min(u,this.l):this.l);var a=this.h.codecs,l=this.h.mimeType,c=this.h.bandwidth,f=[],p=!1;if(n.rc&&this.h&&this.h.ac&&(p=this.h.ac.includes("$SubNumber$")),p){p=(n.end-n.start)/n.rc;for(var h={},m=0;m<n.rc;h={Nf:void 0,Si:void 0},m++){var y=n.start+p*m,v=y+p;h.Si=m,h.Nf=null,h=new Z(this.j+y,this.j+v,function(x){return function(){return t.h?(x.Nf==null&&(x.Nf=$y(t.h.ac,t.G,i,t.B,r,x.Si,t.F,t.I)),x.Nf):[]}}(h),0,null,this.s,o,this.j,this.l,[],"",null,null,vi,this.A),h.codecs=a,h.mimeType=l,h.bandwidth=c,this.H==0?0<m&&h.qd():m%this.H!=0&&h.qd(),f.push(h)}}n=new Z(this.j+n.start,u,function(){return 0<f.length||!t.h?[]:$y(t.h.ac,t.G,i,t.B,r,null,t.F,t.I)},0,null,this.s,o,this.j,this.l,f,"",null,null,vi,this.A,0<f.length),n.codecs=a,n.mimeType=l,n.j=s,n.bandwidth=c,this.g[e]=n}return n},d.Eb=function(e){Cd(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}};function $y(e,t,n,i,r,o,s,u){return e=zs(e,t,n,o,i||null,r),ht(s(),[e],u()).map(function(a){return a.toString()})}d.Pe=function(){return this.K};function Mo(e){this.o=null,this.A=e,this.G=new qr,this.i=[],this.h=null,this.m=[],this.B=null,this.F=[],this.C=300,this.l=new Map,this.j=new Map,this.g=null,this.s="UNKNOWN"}Mo.prototype.configure=function(e){this.o=e},Mo.prototype.destroy=function(){return this.A=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),this.g!=null&&(this.g.stop(),this.g=null),this.G.destroy()},Mo.prototype.setManifestType=function(e){this.s=e};function qs(e,t){var n,i,r,o,s,u,a;return k(function(l){if(l.g==1)return n=ht(e.i,[M2(e,t)]),i=lt(n,e.o.retryParameters),r=e.A.networkingEngine.request(8,i),mr(e.G,r),ue(l,2),T(l,r.promise,4);if(l.g!=2)return o=l.h,s=ze(o.data),u=JSON.parse(s),u.VERSION==1&&k2(e,u,o.uri),ce(l,0);if((a=ae(l))&&a.code==7001)return l.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new Te(function(){qs(e,t)}),e.g.ia(e.C),K(l)})}function M2(e,t){if(!e.m.length)return t;t=new nt(t);var n=e.B||e.m[0],i=Math.round(e.A.getBandwidthEstimate()),r=t.g;return e.s=="DASH"?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):e.s=="HLS"&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),gh(r)&&nr(t,r),t.toString()}function k2(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var i=t["RELOAD-URI"]||n;e.g=new Te(function(){qs(e,i)}),(n=t.TTL)&&(e.C=n),e.g.ia(e.C),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}function ko(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}Mo.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function $s(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var i=[],r=g(e.m),o=r.next(),s={};!o.done;s={ud:void 0},o=r.next())if(s.ud=o.value,o=t.get(s.ud))i.push({Wg:s.ud,location:o});else if(o=e.F.find(function(a){return function(l){return l.Hl==a.ud}}(s))){var u=t.get(o["BASE-ID"]);u&&(o["URI-REPLACEMENT"].bj?(u=new nt(u),xu(u,o["URI-REPLACEMENT"].bj),i.push({Wg:s.ud,location:u.toString()})):i.push({Wg:s.ud,location:u}))}for(r=Date.now(),s=g(e.j.keys()),o=s.next();!o.done;o=s.next())o=o.value,u=e.j.get(o),r>u&&e.j.delete(o);if(i=i.filter(function(a){for(var l=g(e.j.keys()),c=l.next();!c.done;c=l.next())if(c.value.includes(new nt(a.location).Cb))return!1;return!0}),i.length&&(e.B=i[0].Wg),i=i.map(function(a){return a.location}),!i.length&&e.h)for(r=g(e.h.split(",")),s=r.next();!s.done;s=r.next())(s=t.get(s.value))&&(e.B=e.h,i.push(s));if(!i.length)for(t=g(t.values()),r=t.next();!r.done;r=t.next())i.push(r.value);return n?i:ht(e.i,i)}function Nt(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.s=this.o=!1,this.m=new Set}d=Nt.prototype,d.release=function(){for(var e=g(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.s=this.o=!1,this.m.clear()},d.Wj=function(){return this.l},d.Hg=function(){return this.j.slice()},d.Bj=function(){return this.i},d.Ph=function(e,t){if(e){if(e.type=="audio")for(var n=g(this.h),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if(e.type=="video")for(n=g(this.g),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e}),i.trickModeVideo&&(i.trickModeVideo.matchedStreams=i.trickModeVideo.matchedStreams.filter(function(r){return r!==e})),i.dependencyStream&&(i.dependencyStream.matchedStreams=i.dependencyStream.matchedStreams.filter(function(r){return r!==e}));else if(e.type==pe)for(n=g(this.j),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if(e.type=="image")for(n=g(this.i),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}};function Qy(e,t){var n=[],i=[],r=[],o=[];e=g(e);for(var s=e.next();!s.done;s=e.next()){var u=s.value;s=new Map(u.audioStreams.map(function(f){return[Pd(f),f]}));var a=new Map(u.videoStreams.map(function(f){return[Rd(f),f]})),l=new Map(u.textStreams.map(function(f){return[Js(f),f]}));if(u=new Map(u.imageStreams.map(function(f){return[Zs(f),f]})),t){var c=i0(pe);l.set(Js(c),c),c=i0("image"),u.set(Zs(c),c)}n.push(s),i.push(a),r.push(l),o.push(u)}return{Ih:n,$i:i,Xi:r,bi:o}}d.gg=function(e,t,n){n=n===void 0?!1:n;var i=this,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j,O,B,V,q;return k(function(X){if(X.g==1){if(r=gt,!t&&e.length==1)return o=Qy(e,!1),s=o.Ih,u=o.$i,a=o.Xi,l=o.bi,i.h=Array.from(s[0].values()),i.g=Array.from(u[0].values()),i.j=Array.from(a[0].values()),i.i=Array.from(l[0].values()),X.u(2);for(c=n?i.m.size:0,f=-1,p=0;p<e.length;p++)h=e[p],i.m.has(h.id)||(i.m.add(h.id),f==-1&&(f=p));return f==-1?X.return():(m=Qy(e,!0),y=m.Ih,v=m.$i,x=m.Xi,S=m.bi,T(X,Promise.all([zi(i,i.h,y,f,Do,Yi,c),zi(i,i.g,v,f,Do,Yi,c),zi(i,i.j,x,f,Do,Yi,c),zi(i,i.i,S,f,Do,Yi,c)]),2))}if(w=0,A=[],i.g.length&&i.h.length)for(L=g(i.h),P=L.next();!P.done;P=L.next())for(b=P.value,U=g(i.g),j=U.next();!j.done;j=U.next())O=j.value,B=ag(b.drmInfos,O.drmInfos),b.drmInfos.length&&O.drmInfos.length&&!B.length||(V=(b.bandwidth||0)+(O.bandwidth||0),b.dependencyStream&&(V+=b.dependencyStream.bandwidth||0),O.dependencyStream&&(V+=O.dependencyStream.bandwidth||0),q=w++,A.push({id:q,language:b.language,disabledUntilTime:0,primary:b.primary,audio:b,video:O,bandwidth:V,drmInfos:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(D=i.g.length?i.g:i.h,E=g(D),I=E.next();!I.done;I=E.next())C=I.value,R=w++,N=C.bandwidth||0,C.dependencyStream&&(N+=C.dependencyStream.bandwidth||0),A.push({id:R,language:C.language,disabledUntilTime:0,primary:C.primary,audio:C.type==r.ea?C:null,video:C.type==r.Ca?C:null,bandwidth:N,drmInfos:C.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});i.l=A,K(X)})};function Jy(e){var t,n,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U;return k(function(j){switch(j.g){case 1:if(t=gt,e.length==1)return j.return(e[0]);for(n=e.map(function(O){return new Map(O.filter(function(B){return B.type===t.ea}).map(function(B){return[Pd(B),B]}))}),i=e.map(function(O){return new Map(O.filter(function(B){return B.type===t.Ca}).map(function(B){return[Rd(B),B]}))}),r=e.map(function(O){return new Map(O.filter(function(B){return B.type===t.Ta}).map(function(B){return[Js(B),B]}))}),o=e.map(function(O){return new Map(O.filter(function(B){return B.type===t.Tf}).map(function(B){return[Zs(B),B]}))}),s=g(r),u=s.next();!u.done;u=s.next())a=u.value,l=n0(t.Ta),a.set(Js(l),l);for(c=g(o),f=c.next();!f.done;f=c.next())p=f.value,h=n0(t.Tf),p.set(Zs(h),h);return m=new Nt,T(j,zi(m,[],n,0,fl,dl,0),2);case 2:return y=j.h,T(j,zi(m,[],i,0,fl,dl,0),3);case 3:return v=j.h,T(j,zi(m,[],r,0,fl,dl,0),4);case 4:return x=j.h,T(j,zi(m,[],o,0,fl,dl,0),5);case 5:if(S=j.h,w=0,v.length&&y.length)for(C=g(y),R=C.next();!R.done;R=C.next())for(N=R.value,L=g(v),P=L.next();!P.done;P=L.next())b=P.value,U=w++,b.variantIds.push(U),N.variantIds.push(U);else for(A=v.concat(y),D=g(A),E=D.next();!E.done;E=D.next())I=E.value,I.variantIds=[w++];return j.return(v.concat(y).concat(x).concat(S))}})}function zi(e,t,n,i,r,o,s){var u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R;return k(function(N){switch(N.g){case 1:for(u=[],a=0;a<n.length;a++)a>=i?u.push(new Set(n[a].values())):u.push(new Set);l=g(t),c=l.next();case 2:if(c.done){N.u(4);break}return f=c.value,T(N,D2(e,f,n,i,o,u,s),5);case 5:if(p=N.h,!p)throw new M(2,4,4037);c=l.next(),N.u(2);break;case 4:for(h=g(u),m=h.next();!m.done;m=h.next())for(y=m.value,v=g(y),x=v.next();!x.done;x=v.next())S=x.value,(w=R2(e,S,n,r,o,u))&&t.push(w);for(A=g(u),D=A.next();!D.done;D=A.next())for(E=D.value,I=g(E),C=I.next(),R={};!C.done;R={qh:void 0},C=I.next())if(R.qh=C.value,!Dd(R.qh)&&t.some(function(L){return function(P){return kd(e,L.qh,P)}}(R)))throw new M(2,4,4037);return N.return(t)}})}function D2(e,t,n,i,r,o,s){return k(function(u){return u.g==1?(t0(e,n,t,0<s),t.matchedStreams?t.segmentIndex?T(u,Zy(t,i+s),2):u.u(2):u.return(!1)):(e0(t,i,r,o,s),u.return(!0))})}function Zy(e,t){var n,i,r,o,s,u;return k(function(a){if(a.g==1){for(n=[],i=e.matchedStreams,r=t;r<i.length;r++)o=i[r],n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex()),o.dependencyStream&&!o.dependencyStream.segmentIndex&&n.push(o.dependencyStream.createSegmentIndex());return T(a,Promise.all(n),2)}if(e.segmentIndex instanceof Je)for(s=t;s<i.length;s++)u=i[s],u.segmentIndex&&e.segmentIndex.h.push(u.segmentIndex);K(a)})}function R2(e,t,n,i,r,o){if(Dd(t))return null;var s=i(t);return t0(e,n,s),s.createSegmentIndex&&(s.createSegmentIndex=function(){return k(function(u){return s.segmentIndex?u.u(0):(s.segmentIndex=new Je,T(u,Zy(s,0),0))})}),!s.matchedStreams||!s.matchedStreams.length?null:(e0(s,0,r,o,0),s)}function e0(e,t,n,i,r){var o=e.matchedStreams;for(t+=r;t<o.length;t++){var s=o[t];n(e,s);var u=!0;if(e.type=="audio"&&dr(e.language,s.language)==0&&(u=!1),u&&(i[t-r].delete(s),s.fullMimeTypes))for(s=g(s.fullMimeTypes.values()),u=s.next();!u.done;u=s.next())e.fullMimeTypes.add(u.value)}}function Do(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var n=g(t.matchedStreams),i=n.next();!i.done;i=n.next())i=i.value,i.segmentIndex&&(i.segmentIndex.release(),i.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream=null,t}function fl(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function Yi(e,t){function n(s,u){s||(s=[]),u=g(u);for(var a=u.next();!a.done;a=u.next())a=a.value,s.includes(a)||s.push(a);return s}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=g(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(e.originalId==null?e.originalId=t.originalId:(i=t.originalId||"")&&!e.originalId.endsWith(i)&&(e.originalId+=","+i),i=ag(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new M(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),i=g(t.closedCaptions),r=i.next();!r.done;r=i.next()){var o=g(r.value);r=o.next().value,o=o.next().value,e.closedCaptions.set(r,o)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=Do(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var s=new Je,u=g(e.trickModeVideo.matchedStreams),a=u.next();!a.done;a=u.next())s.h.push(a.value.segmentIndex);return e.trickModeVideo.segmentIndex=s,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),Yi(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),Yi(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=Do(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var s=new Je,u=g(e.dependencyStream.matchedStreams),a=u.next();!a.done;a=u.next())s.h.push(a.value.segmentIndex);return e.dependencyStream.segmentIndex=s,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),Yi(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),Yi(e.dependencyStream,t))}function dl(e,t){var n=e.roles;n||(n=[]);for(var i=g(t.roles),r=i.next();!r.done;r=i.next())r=r.value,n.includes(r)||n.push(r);for(e.roles=n,n=g(t.keyIds),i=n.next();!i.done;i=n.next())e.keyIds.add(i.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,H(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=g(t.closedCaptions),n=t.next();!n.done;n=t.next())i=g(n.value),n=i.next().value,i=i.next().value,e.closedCaptions.set(n,i)}function t0(e,t,n,i){i=i!==void 0&&i?n.matchedStreams:[],t=g(t);for(var r=t.next();!r.done;r=t.next()){if(r=P2(e,r.value,n),!r)return;i.push(r)}n.matchedStreams=i}function P2(e,t,n){var i={audio:Pd,video:Rd,text:Js,image:Zs}[n.type],r=null,o=i(n);if(t.has(o))r=t.get(o);else{o={audio:function(l,c){return kd(e,l,c)},video:function(l,c){return kd(e,l,c)},text:L2,image:N2}[n.type];for(var s={audio:j2,video:U2,text:O2,image:_2}[n.type],u=g(t.values()),a=u.next();!a.done;a=u.next())a=a.value,!o(n,a)||n.fastSwitching!=a.fastSwitching||r&&!s(n,r,a)||(r=a)}return e.s&&!Dd(r)&&t.delete(i(r)),r}function Md(e,t){return e.mimeType!=t.mimeType?!1:s0(e.codecs)===s0(t.codecs)}d.Ii=function(e){this.o=e},d.Mi=function(e){this.s=e};function kd(e,t,n){return!(!Md(t,n)&&!e.o||t.drmInfos&&!ug(t.drmInfos,n.drmInfos))}function L2(e,t){return t.language?!(e.forced!==t.forced||dr(e.language,t.language)==0||t.kind!=e.kind):!0}function N2(){return!0}function j2(e,t,n){var i=r0(e,t,n);if(i===tn)return!0;if(i===Sn)return!1;i=dr(e.language,t.language);var r=dr(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(o){return e.roles.includes(o)}),r=n.roles.filter(function(o){return e.roles.includes(o)}),r.length>i.length)return!0;if(r.length<i.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&n.primary?!0:t.primary&&!n.primary?!1:(i=Qs(e.channelsCount,t.channelsCount,n.channelsCount),i==tn?!0:i==Sn?!1:(i=Qs(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),i==tn?!0:i==Sn?!1:!!(e.bandwidth&&o0(e.bandwidth,t.bandwidth,n.bandwidth)==tn)))}function U2(e,t,n){var i=r0(e,t,n);if(i===tn)return!0;if(i===Sn)return!1;if(i=Qs(e.width*e.height,t.width*t.height,n.width*n.height),i==tn)return!0;if(i==Sn)return!1;if(e.frameRate){if(i=Qs(e.frameRate,t.frameRate,n.frameRate),i==tn)return!0;if(i==Sn)return!1}return!!(e.bandwidth&&o0(e.bandwidth,t.bandwidth,n.bandwidth)==tn)}function O2(e,t,n){var i=dr(e.language,t.language),r=dr(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(o){return e.roles.includes(o)}),r=n.roles.filter(function(o){return e.roles.includes(o)}),r.length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!(n.mimeType!=e.mimeType||n.codecs!=e.codecs||t.mimeType==e.mimeType&&t.codecs==e.codecs)}function _2(e,t,n){return Qs(e.width*e.height,t.width*t.height,n.width*n.height)==tn}function n0(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}function i0(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ie([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}}function Qs(e,t,n){if(t==e&&e!=n)return Sn;if(n==e&&e!=t)return tn;if(t>e){if(n<=e||n-e<t-e)return tn;if(n-e>t-e)return Sn}else{if(n>e)return Sn;if(e-n<e-t)return tn;if(e-n>e-t)return Sn}return Ld}function r0(e,t,n){var i=e.mimeType===t.mimeType&&e.codecs===t.codecs,r=e.mimeType===n.mimeType&&e.codecs===n.codecs;return i&&!r?Sn:!i&&r?tn:(t=Md(e,t),e=Md(e,n),t&&!e?Sn:!t&&e?tn:Ld)}function o0(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?tn:t<e?Sn:Ld}function Dd(e){switch(e.type){case pe:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function Rd(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,e.codecs,e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Pd(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Js(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Zs(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function s0(e){if(!Nd.has(e)){var t=Ot(e);Nd.set(e,t)}return Nd.get(e)}W("shaka.util.PeriodCombiner",Nt),Nt.prototype.setUseStreamOnce=Nt.prototype.Mi,Nt.prototype.setAllowMultiTypeVariants=Nt.prototype.Ii,Nt.prototype.combinePeriods=Nt.prototype.gg,Nt.prototype.deleteStream=Nt.prototype.Ph,Nt.prototype.getImageStreams=Nt.prototype.Bj,Nt.prototype.getTextStreams=Nt.prototype.Hg,Nt.prototype.getVariants=Nt.prototype.Wj;var tn=1,Ld=0,Sn=-1,Nd=new Map;function b2(e,t){var n=new DOMParser,i=F2.value()(e);e=null;try{e=n.parseFromString(i,"text/xml")}catch{return null}if(n=e.documentElement,!n||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function u0(e,t){try{var n=Yn(e);return b2(n,t)}catch{return null}}var F2=new St(function(){if(typeof trustedTypes<"u"){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(t){return t}});return function(t){return e.createHTML(t)}}return function(t){return t}});function pl(){var e=this;this.j=this.g=null,this.A=[],this.i=null,this.za=1,this.G=[],this.l={mf:"",type:"",profiles:[],nc:null,qb:0,cb:null,be:0},this.s=new Map,this.B=new Map,this.o=new Map,this.C=new Map,this.wa=new Map,this.m=new Nt,this.K=0,this.ya=new Nr(5),this.L=new Te(function(){if(e.I&&!e.g.continueLoadingWhenPaused&&(e.H.Ja(e.I,"timeupdate"),e.I.paused)){e.H.Aa(e.I,"timeupdate",function(){return h0(e)});return}h0(e)}),this.P=new qr,this.N=null,this.F=[],this.ha=1/0,this.va=!1,this.h=null,this.M=0,this.S=!1,this.H=new Me,this.I=null,this.U=!1,this.ba="",this.na=function(){return!1},this.W=[],this.ka=new Set}d=pl.prototype,d.configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.na=t),n&&this.i&&this.i.presentationTimeline.V()&&this.L.Jb(),this.h&&this.h.configure(this.g),this.m&&(this.m.Ii(this.g.dash.multiTypeVariantsAllowed&&br()),this.m.Mi(this.g.dash.useStreamOnceInPeriodFlattening))},d.start=function(e,t){var n=this,i;return k(function(r){if(r.g==1)return n.va=t.isLowLatencyMode(),n.A=[e],n.j=t,T(r,jd(n),2);if(i=r.h,n.j&&Ud(n,i),!n.j)throw new M(2,7,7001);return r.return(n.i)})},d.stop=function(){for(var e=g(this.o.values()),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.A=[],this.i=null,this.o.clear(),this.C.clear(),this.s.clear(),this.B.clear(),this.l={mf:"",type:"",profiles:[],nc:null,qb:0,cb:null,be:0},this.m=null,this.L!=null&&(this.L.stop(),this.L=null),this.h&&this.h.destroy(),this.H&&(this.H.release(),this.H=null),this.ka.clear(),this.P.destroy()},d.update=function(){var e=this,t;return k(function(n){if(n.g==1)return ue(n,2),T(n,jd(e),4);if(n.g!=2)return ce(n,0);if(t=ae(n),!e.j||!t)return n.return();e.j.onError(t),K(n)})},d.onExpirationUpdated=function(){},d.onInitialVariantChosen=function(e){if(this.i&&this.i.presentationTimeline.V()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.Ac();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.K=t.endTime-e,Ud(this,0))}}},d.banLocation=function(e){this.h&&this.h.banLocation(e)},d.setMediaElement=function(e){this.I=e};function jd(e){var t,n,i,r,o,s,u,a,l,c,f;return k(function(p){return p.g==1?(t=4,n="MPD",i=iI(e),r=e.A,i.length?(r=i,n="Patch",t=6):1<e.A.length&&e.h&&(o=$s(e.h,"Location",!0),o.length&&(r=o)),s=lt(r,e.g.retryParameters),u=Date.now(),T(p,_d(e,s,0,{type:t}),2)):p.g!=3?(a=p.h,e.j?(a.uri&&a.uri!=a.originalUri&&!e.A.includes(a.uri)&&e.A.unshift(a.uri),l=new nt(a.uri),e.ba=l.g.toString(),T(p,B2(e,a.data,a.uri,n),3)):p.return(0)):(c=Date.now(),f=(c-u)/1e3,e.ya.sample(1,f),e.ka.clear(),p.return(f))})}function B2(e,t,n,i){var r,o,s,u,a,l,c,f,p,h;return k(function(m){if(m.g==1){if(r=t,o=e.g.dash.manifestPreprocessor,s=ka,o!=s){if(Ee("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),u=u0(r,i),!u)throw new M(2,4,4001,n);o(u),r=Dn(u.outerHTML)}if(a=qo(r,i),!a)throw new M(2,4,4001,n);return l=e.g.dash.manifestPreprocessorTXml,c=Da,l!=c&&l(a),i==="Patch"?m.return(V2(e,a)):e.g.dash.disableXlinkProcessing?m.return(a0(e,a,n)):(f=e.g.dash.xlinkFailGracefully,p=cl(a,e.g.retryParameters,f,n,e.j.networkingEngine),mr(e.P,p),T(m,p.promise,2))}return h=m.h,m.return(a0(e,h,n))})}function a0(e,t,n){var i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j,O,B,V,q,X,Ce,he,xe,ve,me,Pe,de,fe,ge,Xe,We,$e,at,ut,Le,$i,Wn,Qi;return k(function(kn){switch(kn.g){case 1:for(e.h&&e.h.l.clear(),i=[n],r=[],o=new Map,s=Ne(t,"Location"),u=g(s),a=u.next();!a.done;a=u.next())l=a.value,c=l.attributes.serviceLocation,(f=$t(l))&&(p=ht(i,[f])[0],c&&(e.h?ko(e.h,"Location",c,p):o.set(c,p)),r.push(p));if(e.h?(h=$s(e.h,"Location",!0),0<h.length&&(i=e.A=h)):r.length&&(i=e.A=r),e.l.mf=t.attributes.id||"",e.l.be=oe(t,"publishTime",li)||0,e.G=Ne(t,"PatchLocation"),m=Promise.resolve(),(y=Ye(t,"ContentSteering"))&&e.j)for(v=y.attributes.defaultServiceLocation,e.h?(e.h.i=i,e.h.h=v):(e.h=new Mo(e.j),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=i,e.h.h=v,(x=$t(y))&&(oe(y,"queryBeforeStart",ku,!1)?m=qs(e.h,x):qs(e.h,x))),S=g(o.keys()),w=S.next();!w.done;w=S.next())A=w.value,D=o.get(A),ko(e.h,"Location",A,D);if(E=Ne(t,"BaseURL"),I=!1,e.h)for(C=g(E),R=C.next();!R.done;R=C.next())N=R.value,L=N.attributes.serviceLocation,P=$t(N),L&&P&&(ko(e.h,"BaseURL",L,P),I=!0);if(e.W=null,I&&e.h||(b=E.map($t),e.W=ht(i,b)),U=function(){return e.h&&I?$s(e.h,"BaseURL"):e.W?e.W:[]},e.l.cb=U,j=0,E&&E.length&&(j=oe(E[0],"availabilityTimeOffset",Mu)||0),e.l.qb=j,e.K=oe(t,"minimumUpdatePeriod",$n,-1),O=oe(t,"availabilityStartTime",li),B=oe(t,"timeShiftBufferDepth",$n),V=e.g.dash.ignoreSuggestedPresentationDelay,q=null,V||(q=oe(t,"suggestedPresentationDelay",$n)),X=e.g.dash.ignoreMaxSegmentDuration,Ce=null,X||(Ce=oe(t,"maxSegmentDuration",$n)),he=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.U=e.i.presentationTimeline.V()&&he=="static"),e.l.type=he,e.i)for(xe=e.i.presentationTimeline,ve=xe.Gb(),me=g(e.o.values()),Pe=me.next();!Pe.done;Pe=me.next())de=Pe.value,de.segmentIndex&&de.segmentIndex.$a(ve);else fe=e.g.dash.ignoreMinBufferTime,ge=0,fe||(ge=oe(t,"minBufferTime",$n)||0),Xe=0,Xe=q!=null?Math.min(q,B||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*ge,B||1/0),xe=new re(O,Xe,e.g.dash.autoCorrectDrift);return xe.Zc(he=="static"),xe.V()&&!isNaN(e.g.availabilityWindowOverride)&&(B=e.g.availabilityWindowOverride),B==null&&(B=1/0),xe.Gf(B),We=t.attributes.profiles||"",e.l.profiles=We.split(","),$e={Db:he!="static",presentationTimeline:xe,ra:null,ma:null,oa:null,J:null,bandwidth:0,Jg:!1,qb:j,nc:null,profiles:We.split(","),roles:null,Lb:function(){return""}},T(kn,m,2);case 2:return e.M=0,at=d0(e,$e,U,t,!1),ut=at.duration,Le=at.periods,(he!="static"||e.U)&&at.Rh||xe.pb(ut||1/0),e.S&&e.va&&xe.Ji(e.ha),xe.Rg(Ce||1),e.S&&e.va&&($i=q??e.g.defaultPresentationDelay,xe.lh($i)),e.i?(e.i.periodCount=Le.length,e.i.gapCount=e.M,T(kn,l0(e,Le,!1),4)):T(kn,e.m.gg(Le,$e.Db),6);case 6:if(e.i={presentationTimeline:xe,variants:e.m.l,textStreams:e.m.Hg(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:K2(t),nextUrl:X2(t),periodCount:Le.length,gapCount:e.M,isLowLatency:e.S,startTime:null},!xe.Zi()){kn.u(7);break}return Wn=Ne(t,"UTCTiming"),T(kn,tI(e,U,Wn),8);case 8:if(Qi=kn.h,!e.j)return kn.return();xe.Ki(Qi);case 7:xe.hf(),e.m&&!e.i.presentationTimeline.V()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),W2(e),z2(e,Le),K(kn)}})}function l0(e,t,n){var i;return k(function(r){if(r.g==1)return T(r,e.m.gg(t,!0,n),2);e.i.variants=e.m.l,i=e.m.Hg(),0<i.length&&(e.i.textStreams=i),e.i.imageStreams=e.m.i,e.j.filter(e.i),K(r)})}function V2(e,t){var n,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P;return k(function(b){if(b.g==1){if(n=t.attributes.mpdId,i=oe(t,"originalPublishTime",li),!n||n!==e.l.mf||i!==e.l.be)throw e.G=[],new M(1,4,4052);for(r=[],o=[],s=new Set,u=g(kh(t)),a=u.next();!a.done;a=u.next())if(l=a.value,c=Du(l.attributes.sel||""),f=c[c.length-1],p=$t(l)||"",f.name==="MPD")if(f.wc==="mediaPresentationDuration"){h=$t(l)||"";var U=$n(h);if(U!=null){e.l.nc=U;for(var j=g(e.s.values()),O=j.next();!O.done;O=j.next())O.value.nc=U}}else if(f.wc==="type"){for(e.i.presentationTimeline.Zc(p=="static"),e.l.type=p,U=g(e.s.values()),j=U.next();!j.done;j=U.next())j.value.Db=p=="dynamic";p=="static"&&(e.K=-1)}else f.wc==="publishTime"?e.l.be=li(p)||0:f.wc===null&&l.tagName==="add"&&o.push(l);else if(f.name==="PatchLocation")Rh(e.G,l);else if(f.name==="Period")l.tagName==="add"?o.push(l):l.tagName==="remove"&&f.id&&G2(e,f.id);else if(f.name==="SegmentTemplate"){if(j=Du(l.attributes.sel||""),U=j[j.length-1],U.wc){j=c0(e,j),O=$t(l)||"";for(var B=g(j),V=B.next();!V.done;V=B.next())V=e.s.get(V.value),Lh(V.J.Gc,l.tagName,U.wc,O);U=j}else U=[];for(m=U,y=g(m),v=y.next();!v.done;v=y.next())x=v.value,s.add(x)}else if(f.name==="SegmentTimeline"||f.name==="S"){for(U=Du(l.attributes.sel||""),U=c0(e,U),j=g(U),O=j.next();!O.done;O=j.next())O=e.s.get(O.value),O=Io(O,Wi,"SegmentTimeline"),B=Ne(O,"S"),Rh(B,l),O.children=B;for(S=U,w=g(S),A=w.next();!A.done;A=w.next())D=A.value,s.add(D)}for(E=g(s),I=E.next();!I.done;I=E.next())C=I.value,f0(e,C);for(R=g(o),N=R.next();!N.done;N=R.next())L=N.value,r.push.apply(r,H(H2(e,L)));return r.length?(e.i.periodCount+=r.length,e.i.gapCount=e.M,T(b,l0(e,r,!0),2)):b.u(2)}e.l.type=="static"&&(P=e.l.nc,e.i.presentationTimeline.pb(P||1/0)),K(b)})}function H2(e,t){return d0(e,{Db:e.l.type=="dynamic",presentationTimeline:e.i.presentationTimeline,ra:null,ma:null,oa:null,J:null,bandwidth:0,Jg:!1,qb:e.l.qb,profiles:e.l.profiles,nc:e.l.nc,roles:null,Lb:function(){return""}},e.l.cb,t,!0).periods}function G2(e,t){e.i.periodCount--;for(var n=g(e.s.keys()),i=n.next();!i.done;i=n.next())if(i=i.value,i.startsWith(t)){var r=e.s.get(i);Io(r,Wi,"SegmentTimeline").children=[],f0(e,i),e.s.delete(i)}e.F=e.F.filter(function(o){return o!==t})}function c0(e,t){var n="",i="",r=-1,o="";t=g(t);for(var s=t.next();!s.done;s=t.next())s=s.value,s.name==="Period"?n=s.id:s.name==="AdaptationSet"?(i=s.id,s.position!==null&&(r=s.position)):s.name==="Representation"&&(o=s.id);if(t=[],o)t.push(n+","+o);else if(i)for(r=g(e.s.values()),e=r.next();!e.done;e=r.next())e=e.value,e.ra.id===n&&e.oa.id===i&&e.J.id&&t.push(n+","+e.J.id);else if(-1<r)for(i=g(e.s.values()),e=i.next();!e.done;e=i.next())e=e.value,e.ra.id===n&&e.oa.position===r&&e.J.id&&t.push(n+","+e.J.id);return t}function f0(e,t){var n=e.s.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.$a(e.i.presentationTimeline.Gb());try{var r=Yy(n,function(o,s,u,a){return m0(e,o,s,u,a)},e.o,!0,e.g.dash.initialSegmentLimit,e.wa,n.J.aesKey,null,!0,e.B);i.createSegmentIndex=function(){return k(function(o){if(o.g==1)return i.segmentIndex?o.u(0):T(o,r.Oc(),3);i.segmentIndex=o.h,K(o)})}}catch(o){if(t=n.J.contentType,t!=pe&&t!="application"&&t!="image"||o.code!=4002)throw o}}function K2(e){var t=Ye(e,"ServiceDescription");if(!t||(e=Ye(t,"Latency"),t=Ye(t,"PlaybackRate"),!e&&!t))return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}function X2(e){if(e=Ne(e,"SupplementalProperty"),!e.length)return null;e=g(e);for(var t=e.next();!t.done;t=e.next())if(t=t.value,t.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016")return t.attributes.value;return null}function d0(e,t,n,i,r){var o=t.nc;o||(o=oe(i,"mediaPresentationDuration",$n),e.l.nc=o);var s=0;e.i&&e.i.presentationTimeline&&e.U&&(s=e.i.presentationTimeline.Xb());var u=[],a=s;i=Ne(i,"Period");for(var l=0;l<i.length;l++){var c=i[l],f=i[l+1],p=oe(c,"start",$n,a),h=c.attributes.id,m=oe(c,"duration",$n);p=l==0&&p==0&&e.U?s:p;var y=null;if(f){var v=oe(f,"start",$n);v!=null&&(y=v-p+s)}else o!=null&&(y=o-p+s);if(v=Th,y&&m&&Math.abs(y-m)>v&&y>m&&e.M++,y==null&&(y=m),!(e.N!==null&&h!==null&&p!==null&&p<e.N)||e.F.includes(h)||l+1==i.length){if(p!==null&&(e.N===null||p>e.N)&&(e.N=p),a=Y2(e,t,n,{start:p,duration:y,node:c,bf:y==null||!f}),u.push(a),t.ra.id&&y&&e.wa.set(t.ra.id,y),y==null){a=null;break}a=p+y}}if(r)for(t=g(u),n=t.next();!n.done;n=t.next())n=n.value.id,e.F.includes(n)||e.F.push(n);else e.F=u.map(function(x){return x.id});return o!=null?{periods:u,duration:o+s,Rh:!1}:{periods:u,duration:a,Rh:!0}}function W2(e){var t=Array.from(e.C.keys()).filter(function(u){return!e.F.includes(u)});t=g(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=g(e.C.get(n)),o=r.next();!o.done;o=r.next()){o=o.value;var s=e.o.get(o);s&&(s.segmentIndex&&s.segmentIndex.getNumReferences()!=0?i=!1:(e.m&&e.m.Ph(s,n),e.o.delete(o)))}i&&e.C.delete(n)}}function z2(e,t){t=new Set(t.map(function(r){return r.id}));for(var n=g(e.B.keys()),i=n.next();!i.done;i=n.next())i=i.value,t.has(i)||e.B.delete(i)}function Y2(e,t,n,i){t.ra=Od(e,i.node,null,n),t.ma=i,t.ra.qb=t.qb,t.ra.id||(t.ra.id="__shaka_period_"+i.start);var r=Ne(i.node,"EventStream");n=t.presentationTimeline.Gb(),r=g(r);for(var o=r.next();!o.done;o=r.next())nI(e,i.start,i.duration,o.value,n);for(n=Ne(i.node,"SupplementalProperty"),n=g(n),r=n.next();!r.done;r=n.next())r=r.value,r.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(r=eu(e,r))&&(t.Lb=r);if(n=Ne(i.node,"AdaptationSet").map(function(h,m){return p0(e,t,m,h)}).filter(Oi),t.Db){r=[],o=g(n);for(var s=o.next();!s.done;s=o.next()){s=g(s.value.Jk);for(var u=s.next();!u.done;u=s.next())r.push(u.value)}if(r.length!=new Set(r).size)throw new M(2,4,4018)}for(r=new Map,o=g(n),s=o.next();!s.done;s=o.next())for(s=g(s.value.pj),u=s.next();!u.done;u=s.next()){var a=g(u.value);u=a.next().value,a=a.next().value,r.set(u,a)}if(r.size)for(o=null,s=g(n),u=s.next();!u.done;u=s.next()){u=u.value,a=[];for(var l=g(u.streams),c=l.next(),f={};!c.done;f={rh:void 0},c=l.next())if(f.rh=c.value,r.has(f.rh.originalId)){o||(o=Ne(i.node,"AdaptationSet").map(function(h,m){return p0(e,t,m,h)}).filter(Oi)),c=g(o);for(var p=c.next();!p.done;p=c.next())(p=p.value.streams.find(function(h){return function(m){return m.originalId==h.rh.originalId}}(f)))&&(p.dependencyStream=r.get(p.originalId),p.originalId+=p.dependencyStream.originalId,a.push(p))}a.length&&u.streams.push.apply(u.streams,H(a))}if(i=n.filter(function(h){return!h.Ah}),n=n.filter(function(h){return h.Ah}),!e.g.disableIFrames){for(n=g(n),r=n.next();!r.done;r=n.next())for(r=r.value,o=r.Ah.split(" "),s=g(i),u=s.next();!u.done;u=s.next())if(u=u.value,o.includes(u.id))for(u=g(u.streams),a=u.next();!a.done;a=u.next())ng(a.value,r.streams)}if(n=hl(e.g.disableAudio,i,"audio"),r=hl(e.g.disableVideo,i,"video"),o=hl(e.g.disableText,i,pe),i=hl(e.g.disableThumbnails,i,"image"),r.length===0&&n.length===0)throw new M(2,4,4004);return{id:t.ra.id,audioStreams:n,videoStreams:r,textStreams:o,imageStreams:i}}function hl(e,t,n){return e||!t.length?[]:t.reduce(function(i,r){return r.contentType!=n||i.push.apply(i,H(r.streams)),i},[])}function p0(e,t,n,i){function r(P){var b=P.attributes["dvb:fontFamily"];P=P.attributes["dvb:url"],b&&P&&(P=ht(t.oa.cb(),[P],t.Lb()),e.j.addFont(b,P[0]))}function o(P){switch(P){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function s(P){switch(P){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.oa=Od(e,i,t.ra,null),t.oa.position=n;var u=!1;n=Ne(i,"Role");var a=n.map(function(P){return P.attributes.value}).filter(Oi),l=void 0,c=t.oa.contentType==pe;c&&(l="subtitle"),n=g(n);for(var f=n.next();!f.done;f=n.next()){f=f.value;var p=f.attributes.schemeIdUri;if(p==null||p=="urn:mpeg:dash:role:2011")switch(f=f.attributes.value,f){case"main":u=!0;break;case"caption":case"subtitle":l=f}}var h=Ne(i,"EssentialProperty");n=null;var m=!1;f=null,p=!1,h=g(h);for(var y=h.next();!y.done;y=h.next()){y=y.value;var v=y.attributes.schemeIdUri;if(v=="http://dashif.org/guidelines/trickmode")n=y.attributes.value;else if(v=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var x=s(parseInt(y.attributes.value,10));else if(v=="urn:mpeg:mpegB:cicp:ColourPrimaries")var S=o(parseInt(y.attributes.value,10));else v!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(v=="urn:mpeg:dash:ssr:2023"&&e.g.dash.enableFastSwitching?m=!0:v=="urn:dvb:dash:fontdownload:2014"?r(y):v=="urn:mpeg:dash:urlparam:2014"&&(f=eu(e,y))||(p=!0))}if(p)return null;var w=null;for(p=Ne(i,"SupplementalProperty"),p=g(p),h=p.next();!h.done;h=p.next())h=h.value,y=h.attributes.schemeIdUri,y=="http://dashif.org/guidelines/last-segment-number"?w=parseInt(h.attributes.value,10)-1:y=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?x=s(parseInt(h.attributes.value,10)):y=="urn:mpeg:mpegB:cicp:ColourPrimaries"?S=o(parseInt(h.attributes.value,10)):y=="urn:dvb:dash:fontdownload:2014"?r(h):y=="urn:mpeg:dash:urlparam:2014"&&(f=eu(e,h));f&&(t.Lb=f),f=Ne(i,"Accessibility");var A=new Map,D;for(f=g(f),p=f.next();!p.done;p=f.next())if(h=p.value,p=h.attributes.schemeIdUri,h=h.attributes.value,p!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText)if(p!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText)p=="urn:mpeg:dash:role:2011"?h!=null&&(a.push(h),h=="captions"&&(l="caption")):p=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(h=="1"?D="visually impaired":h=="2"?D="hard of hearing":h=="9"&&(D="spoken subtitles"));else if(p=1,h!=null)for(h=g(h.split(";")),y=h.next();!y.done;y=h.next()){v=y.value;var E=y=void 0;v.includes("=")?(v=v.split("="),y="svc"+v[0],E=v[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,E=v),A.set(y,ke(E))}else A.set("svc1","und");else if(p=1,h!=null)for(h=h.split(";"),y=g(h),v=y.next();!v.done;v=y.next()){E=v.value;var I=v=void 0;E.includes("=")?(E=E.split("="),v=E[0].startsWith("CC")?E[0]:"CC"+E[0],I=E[1]||"und"):(v="CC"+p,h.length==2?p+=2:p++,I=E),A.set(v,ke(I))}else A.set("CC1","und");f=Ne(i,"ContentProtection");var C=by(f,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.oa.encrypted=0<f.length;var R=ke(t.oa.language||"und"),N=t.oa.label,L=new Map;if(i=Ne(i,"Representation"),!e.g.ignoreSupplementalCodecs){for(f=[],p=g(i),h=p.next();!h.done;h=p.next())y=h.value,(h=ai(y,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(y=Pn(y),y.attributes.codecs=h.split(" ").join(","),y.attributes.id&&(y.attributes.supplementalId=y.attributes.id+"_supplementalCodecs"),f.push(y));i.push.apply(i,H(f))}if(f=i.map(function(P){var b=q2(e,t,C,l,R,N,u,a,A,P,D,w);return b&&(b.hdr=b.hdr||x,b.colorGamut=b.colorGamut||S,b.fastSwitching=m,P=P.attributes.dependencyId)?(b.baseOriginalId=P,L.set(P,b),null):b}).filter(function(P){return!!P}),f.length==0&&L.size==0){if(n=t.oa.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||c||n)return null;throw new M(2,4,4003)}if(!t.oa.contentType||t.oa.contentType=="application")for(t.oa.contentType=v0(f[0].mimeType,f[0].codecs),c=g(f),p=c.next();!p.done;p=c.next())p.value.type=t.oa.contentType;for(c=t.oa.id||"__fake__"+e.za++,p=g(f),h=p.next();!h.done;h=p.next()){for(h=h.value,y=g(C.drmInfos),v=y.next();!v.done;v=y.next())v=v.value,v.keyIds=v.keyIds&&h.keyIds?new Set([].concat(H(v.keyIds),H(h.keyIds))):v.keyIds||h.keyIds;h.groupId=c}return i=i.map(function(P){return P.attributes.supplementalId||P.attributes.id}).filter(Oi),{id:c,contentType:t.oa.contentType,language:R,wm:u,streams:f,drmInfos:C.drmInfos,Ah:n,Jk:i,pj:L}}function eu(e,t){if((t=Ln(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&oe(t,"useMPDUrlQuery",ku,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return n=="$querypart$"?e.ba:n.split("&").map(function(i){if(i=="$querypart$")return e.ba;var r=/\$query:(.*?)\$/g.exec(i);if(r&&r.length==2){r=r[1];var o=new Ur(e.ba).get(r);if(o.length)return r+"="+o[0]}return i}).join("&")}}return null}function q2(e,t,n,i,r,o,s,u,a,l,c,f){t.J=Od(e,l,t.oa,null);var p=t.J.id;if(e.ha=Math.min(e.ha,t.J.qb),e.S=0<e.ha,!eI(t.J))return null;var h=t.ma.start;t.bandwidth=oe(l,"bandwidth",ci)||0,t.roles=u;var m=Ne(l,"SupplementalProperty"),y=Ne(l,"EssentialProperty"),v=Ne(l,"ContentProtection");l=null;var x=y.find(function(j){return j.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});(x||(x=m.find(function(j){return j.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"})))&&(l=eu(e,x)),l&&(t.Lb=l),x=t.J.contentType,l=x==pe||x=="application",x=x=="image",v.length&&(t.oa.encrypted=!0);try{var S=void 0;if(n.cg){var w=t.J.cb,A=t.Lb,D=ht(w(),[n.cg.kk],A()),E=lt(D,e.g.retryParameters);S={bitsKey:128,blockCipherMode:"CBC",iv:n.cg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var j,O,B;return k(function(V){if(V.g==1)return T(V,_d(e,E,6),2);if(V.g!=3){if(j=V.h,!j.data||j.data.byteLength!=16)throw new M(2,4,4049);return O={name:"AES-CBC"},B=S,T(V,F.crypto.subtle.importKey("raw",j.data,O,!0,["decrypt"]),3)}B.cryptoKey=V.h,S.fetchKey=void 0,K(V)})}}}if(t.J.aesKey=S,w=function(j,O,B,V){return m0(e,j,O,B,V)},t.J.Cd)var I=m2(t,w,S);else if(t.J.tc)I=y2(t,e.o,S);else if(t.J.Gc)I=Yy(t,w,e.o,!!e.i,e.g.dash.initialSegmentLimit,e.wa,S,f,!1,e.B);else{var C=t.ma.duration||0,R=t.J.cb,N=t.J.mimeType,L=t.J.codecs;I={endTime:-1,timeline:-1,Oc:function(){var j=ha(h,C,R());return j.Eb(function(O){O.mimeType=N,O.codecs=L}),Promise.resolve(j)},timescale:1}}}catch(j){if((l||x)&&j.code==4002)return null;throw j}f=i2(v,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),f=new Set(f?[f]:[]),v=!1,m.some(function(j){return j.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&j.attributes.value=="JOC"})&&(v=!0),m=!1,l&&(m=u.includes("forced_subtitle")||u.includes("forced-subtitle"));var P;if(x&&((y=y.find(function(j){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(j.attributes.schemeIdUri)}))&&(P=y.attributes.value),!P))return null;var b;l=t.J.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(b="PQ"),y=t.J.id?t.ra.id+","+t.J.id:"",e.G.length&&p&&e.s.set(t.ra.id+","+p,Q2(t)),t.J.yf&&$2(e,t.J.yf,I,t.presentationTimeline),I.endTime!=-1&&t.ra.id!=null&&t.J.id!=null&&((p=e.B.get(t.ra.id))?(p.endTime=I.endTime,p.ah.includes(t.J.id)||p.ah.push(t.J.id),e.B.set(t.ra.id,p)):e.B.set(t.ra.id,{endTime:I.endTime,timeline:I.timeline,ah:[t.J.id]}));var U=y&&e.o.has(y)?e.o.get(y):{id:e.za++,originalId:t.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){U.segmentIndex&&(U.segmentIndex.release(),U.segmentIndex=null)},segmentIndex:null,mimeType:t.J.mimeType,codecs:l,frameRate:t.J.frameRate,pixelAspectRatio:t.J.pixelAspectRatio,bandwidth:t.bandwidth,width:t.J.width,height:t.J.height,kind:i,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:f,language:r,originalLanguage:t.oa.language,label:o,type:t.oa.contentType,primary:s,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.J.emsgSchemeIdUris,roles:u,forced:m,channelsCount:t.J.qf,audioSamplingRate:t.J.audioSamplingRate,spatialAudio:v,closedCaptions:a,hdr:b,colorGamut:void 0,videoLayout:void 0,tilesLayout:P,accessibilityPurpose:c,external:!1,fastSwitching:!1,fullMimeTypes:new Set([rt(t.J.mimeType,t.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return U.createSegmentIndex=function(){var j;return k(function(O){if(O.g==1)return U.segmentIndex?O.u(0):(j=U,T(O,I.Oc(),3));j.segmentIndex=O.h,K(O)})},y&&t.Db&&!e.o.has(y)&&(t=t.ra.id||"",e.C.has(t)||e.C.set(t,[]),e.o.set(y,U),e.C.get(t).push(y)),U}function $2(e,t,n,i){if(!e.ka.has(t)){e.ka.add(t);var r=oe(t,"presentationTime",wt)||0,o=Ye(t,"UTCTiming"),s;(s=o&&o.attributes.schemeIdUri)&&(o=o.attributes.schemeIdUri,s=!(o==="urn:mpeg:dash:utc:http-ntp:2014"||o==="urn:mpeg:dash:utc:ntp:2014"||o==="urn:mpeg:dash:utc:sntp:2014")),s?t=1e3*(oe(t,"wallClockTime",li)||0):(t=oe(t,"wallClockTime",wt)||0,t=tm(t)),n=new Date(t-r/n.timescale*1e3),r=n.getTime()/1e3,isNaN(r)||(i.o||i.mh(r),i=new Map().set("detail",{wallClockTime:t,programStartDate:n}),i=new G("prft",i),e.j.onEvent(i))}}function Q2(e){function t(n){return n?(n=Pi(n),n.Cd=null,n.tc=null,n.Gc=wc(n.Gc),n.yf=null,n):null}return e=Pi(e),e.ra=t(e.ra),e.oa=t(e.oa),e.J=t(e.J),e.ma&&(e.ma=Pi(e.ma),e.ma.node=null),e}function h0(e){var t,n;return k(function(i){switch(i.g){case 1:return t=0,ue(i,2),T(i,jd(e),4);case 4:t=i.h,ce(i,3);break;case 2:if(n=ae(i),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),i.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return i.return();e.j.onManifestUpdated(),Ud(e,t),K(i)}})}function Ud(e,t){if(!(0>e.K)){var n=e.K;0<=e.g.updatePeriod&&(n=e.g.updatePeriod),e.L.ia(Math.max(n-t,vu(e.ya)))}}function Od(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,qf:null,audioSamplingRate:null,qb:0,Df:0,encrypted:!1},i=i||n.cb;var r=t.attributes.id,o=t.attributes.supplementalId,s=Ne(t,"BaseURL"),u,a=!1;if(e.h)for(var l=g(s),c=l.next();!c.done;c=l.next()){var f=c.value;c=f.attributes.serviceLocation,f=$t(f),c&&f&&(ko(e.h,r,c,f),a=!0)}a&&e.h||(u=s.map($t)),l=t.attributes.contentType||n.contentType,c=t.attributes.mimeType||n.mimeType,f=xf([t.attributes.codecs||n.codecs]).join(",");var p=oe(t,"frameRate",Ox)||n.frameRate,h=t.attributes.sar||n.pixelAspectRatio,m=J2(Ne(t,"InbandEventStream"),n.emsgSchemeIdUris),y=Ne(t,"AudioChannelConfiguration");y=Z2(y)||n.qf;var v=oe(t,"audioSamplingRate",wt)||n.audioSamplingRate;l||(l=v0(c,f));var x=Ye(t,"SegmentBase"),S=Ye(t,"SegmentTemplate"),w=x&&oe(x,"availabilityTimeOffset",Mu)||0,A=S&&oe(S,"availabilityTimeOffset",Mu)||0,D=s&&s.length&&oe(s[0],"availabilityTimeOffset",Mu)||0;w=n.qb+D+w+A,A=null,(D=Ye(t,"SegmentSequenceProperties"))&&(D=Ye(D,"SAP"))&&(A=oe(D,"cadence",yt)),D=t.attributes.label;var E=Ne(t,"Label");return E&&E.length&&(E=E[0],ot(E)&&(D=ot(E))),{cb:function(){return ht(i(),s.length?e.h&&a?$s(e.h,r):u||[]:[])},Cd:x||n.Cd,tc:Ye(t,"SegmentList")||n.tc,Gc:S||n.Gc,yf:Ye(t,"ProducerReferenceTime")||n.yf,width:oe(t,"width",wt)||n.width,height:oe(t,"height",wt)||n.height,contentType:l,mimeType:c,codecs:f,frameRate:p,pixelAspectRatio:h,emsgSchemeIdUris:m,id:o||r,originalId:r,language:t.attributes.lang,qf:y,audioSamplingRate:v,qb:w,Ze:null,Df:A||n.Df,label:D||null,encrypted:!1}}function J2(e,t){t=t.slice(),e=g(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}function Z2(e){e=g(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=t.attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(t,10),!t)continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],t=parseInt(t,16),!t)continue;for(var i=0,r=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),t=parseInt(t,16),!t)continue;for(r=i=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&0<t&&t<n.length)return n[t]}}return null}function eI(e){var t=e.Cd?1:0;return t+=e.tc?1:0,t+=e.Gc?1:0,t==0?e.contentType==pe||e.contentType=="application":(t!=1&&(e.Cd&&(e.tc=null),e.Gc=null),!0)}function g0(e,t,n,i){var r,o,s,u,a,l,c;return k(function(f){if(f.g==1)return r=[Gt(n)],o=ht(t(),r),s=lt(o,e.g.retryParameters),s.method=i,u=e.j.networkingEngine.request(4,s,{isPreload:e.na()}),mr(e.P,u),T(f,u.promise,2);if(a=f.h,i=="HEAD"){if(!a.headers||!a.headers.date)return f.return(0);l=a.headers.date}else l=ze(a.data);return c=Date.parse(l),isNaN(c)?f.return(0):f.return(c-Date.now())})}function tI(e,t,n){var i,r,o,s,u,a,l,c;return k(function(f){switch(f.g){case 1:i=n.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),r=e.g.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),o=g(i),s=o.next();case 2:if(s.done){f.u(4);break}switch(u=s.value,ue(f,5),a=u.scheme,l=u.value,a){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return f.u(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return f.u(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return c=Date.parse(l),f.return(isNaN(c)?0:c-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":Ae("NTP UTCTiming scheme is not supported");break;default:Ae("Unrecognized scheme in UTCTiming element",a)}f.u(9);break;case 7:return T(f,g0(e,t,l,"HEAD"),10);case 10:return f.return(f.h);case 8:return T(f,g0(e,t,l,"GET"),11);case 11:return f.return(f.h);case 9:ce(f,3);break;case 5:ae(f);case 3:s=o.next(),f.u(2);break;case 4:return Ae("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),f.return(0)}})}function nI(e,t,n,i,r){var o=i.attributes.schemeIdUri||"",s=i.attributes.value||"",u=oe(i,"timescale",wt)||1,a=oe(i,"presentationTimeOffset",wt)||0;i=g(Ne(i,"Event"));for(var l=i.next();!l.done;l=i.next()){l=l.value;var c=oe(l,"presentationTime",wt)||0,f=oe(l,"duration",wt)||0;c=Math.max((c-a)/u+t,t),f=c+f/u,n!=null&&(c=Math.min(c,t+n),f=Math.min(f,t+n)),f<r||(l={schemeIdUri:o,value:s,startTime:c,endTime:f,id:l.attributes.id||"",timescale:u,eventElement:Nh(l),eventNode:wc(l)},e.j.onTimelineRegionAdded(l))}}function m0(e,t,n,i,r){var o,s,u,a;return k(function(l){return l.g==1?(o=jn,s=r?0:1,u=Is(t,n,i,e.g.retryParameters),T(l,_d(e,u,o,{type:s}),2)):(a=l.h,l.return(a.data))})}function v0(e,t){return t=rt(e,t),ns(t)?pe:e.split("/")[0]}function _d(e,t,n,i){return i||(i={}),i.isPreload=e.na(),t=e.j.networkingEngine.request(n,t,i),mr(e.P,t),t.promise}function iI(e){var t=e.l.be;if(!e.l.mf||!t||!e.G.length)return[];var n=Date.now()/1e3,i=e.G.filter(function(r){return r=wt(r.attributes.ttl),!r||t+r>n}).map($t).filter(Oi);return i.length?ht(e.A,i):[]}W("shaka.dash.DashParser",pl),vr("application/dash+xml",function(){return new pl}),vr("video/vnd.mpeg.dash.mpd",function(){return new pl});function gl(){}W("shaka.dependencies",gl),gl.has=function(e){return bd.has(e)},gl.add=function(e,t){if(!T0[e])throw Error(e+" is not supported");e==y0?Ee("mux.js","mux.js is no longer used in Shaka Player."):bd.set(e,function(){return t})};var y0="muxjs",T0={xm:y0,ISOBoxer:"ISOBoxer"};gl.Allowed=T0;var bd=new Map([["ISOBoxer",function(){return F.ISOBoxer}]]);function Oe(){this.j=new St(function(){return["Oculus","Quest"].some(function(e){return navigator.userAgent.includes(e.toLowerCase())})?"VR":navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android"?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?"MOBILE":"DESKTOP"}),this.l=new St(function(){return navigator.vendor.includes("Apple")&&(navigator.userAgent.includes("Version/")||navigator.userAgent.includes("OS/"))?"WEBKIT":navigator.userAgent.includes("Edge/")?"EDGE":navigator.userAgent.includes("Chrome/")?"CHROMIUM":navigator.userAgent.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Zn(){var e=F.ManagedMediaSource||F.MediaSource;return!!(e&&e.isTypeSupported)}d=Oe.prototype,d.dc=function(){return!!navigator.mediaCapabilities},d.La=function(){return this.j.value()},d.Da=function(){return this.l.value()},d.fe=function(){return!1},d.Ai=function(){return!1},d.$e=function(){return!1},d.Bi=function(){return!1},d.ee=function(){return!1},d.bd=function(){return!0},d.cd=function(){return!0},d.je=function(){return!0},d.Gi=function(){return 0},d.ic=function(){return Promise.resolve({width:1/0,height:1/0})},d.Pi=function(){return!1},d.ph=function(){return!1},d.Ua=function(e){var t=this.La();return(t==="TV"||t==="CONSOLE"||t==="CAST")&&(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),e},d.uh=function(){return!!F.indexedDB},d.xi=function(){return[]};function x0(e){return ye(),F.matchMedia!==void 0&&F.matchMedia("(color-gamut: p3)").matches?e?"HLG":"PQ":"SDR"}d.Wi=function(){return!1},d.li=function(){return!1},d.fh=function(){return!1},d.If=function(){return!0},d.mi=function(){return!1},d.Vi=function(){return!0},d.$c=function(){return!1},d.Qg=function(e){return e==="com.apple.fps"},d.toString=function(){return"Device: "+this.Ob()+" v"+this.xa()+"; Type: "+this.La()};function Fd(){Oe.call(this),this.g=new St(function(){var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}),this.h=new St(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}et(Fd,Oe),d=Fd.prototype,d.xa=function(){return this.g.value()},d.Ob=function(){return"Apple Browser"},d.La=function(){return this.h.value()},d.Da=function(){return"WEBKIT"},d.dc=function(){return!1},d.fe=function(e,t){return t==="audio"},d.$e=function(){return!0},d.Bi=function(e){return e==="audio"},d.Ua=function(e){return Oe.prototype.Ua.call(this,e),e.abr.minTimeToSwitch=.5,e},d.Wi=function(){return!0},(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(Fn=function(){return new Fd});function Bd(){if(!S0())throw Error("Not a Chromecast device!");Oe.call(this),this.h=new St(function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}),this.g=new St(function(){var e=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;return e=e.toLowerCase(),e.includes("android")?w0:e.includes("fuchsia")?A0:Vd})}et(Bd,Oe),d=Bd.prototype,d.xa=function(){return this.h.value()},d.Ob=function(){return"Chromecast with "+this.g.value()},d.La=function(){return"CAST"},d.Da=function(){return"CHROMIUM"},d.dc=function(){return Oe.prototype.dc.call(this)&&this.g.value()!==Vd},d.cd=function(){return this.g.value()!==Vd},d.Gi=function(){switch(this.g.value()){case w0:return 0;case A0:return 3;default:return 1}},d.ic=function(){var e,t,n,i,r;return k(function(o){switch(o.g){case 1:if(e=F.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t={width:1280,height:720},ue(o,2),!(n=e)){o.u(4);break}return T(o,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:n=o.h;case 4:if(n){t.width=3840,t.height=2160,o.u(6);break}if(!(i=e)){o.u(7);break}return T(o,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:i=o.h;case 7:i&&(t.width=1920,t.height=1080);case 6:ce(o,3);break;case 2:r=ae(o),zn("Failed to check canDisplayType:",r);case 3:return o.return(t)}})},d.Ua=function(e){return Oe.prototype.Ua.call(this,e),e.streaming.stallSkip=0,e},d.uh=function(){return!1},d.$c=function(){return!0};function S0(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var w0="Android",A0="Fuchsia",Vd="Linux";S0()&&(Fn=function(){return new Bd});function Hd(){Oe.call(this);var e=this;this.i=new St(function(){var t=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return t?parseInt(t[2],10):null}),this.g=new St(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"}),this.h=new St(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}),this.o=new St(function(){return navigator.userAgent.match(/Edge?\//)?!e.h.value():!0}),this.m=new St(function(){return navigator.userAgent.includes("sony.hbbtv.tv")})}et(Hd,Oe),d=Hd.prototype,d.xa=function(){return this.i.value()},d.Ob=function(){return this.g.value()},d.fe=function(e){return _c(e)?this.g.value()==="Edge"&&this.h.value():!1},d.Ai=function(){return this.g.value()==="Edge"&&this.h.value()},d.$e=function(){return this.g.value()==="Edge"&&this.h.value()},d.cd=function(){return this.o.value()},d.Ua=function(e){if(Oe.prototype.Ua.call(this,e),this.h.value())switch(this.g.value()){case"Firefox":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case"Chrome":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return e},d.fh=function(){return this.g.value()==="Edge"||this.m.value()},d.$c=function(){if(this.Da()==="GECKO"){var e=this.xa();return e!==null?100<=e:Oe.prototype.$c.call(this)}return Oe.prototype.$c.call(this)},d.Qg=function(e){return this.Da()==="GECKO"?e.startsWith("com.microsoft.playready.recommendation"):Oe.prototype.Qg.call(this,e)},ac=function(){return new Hd};function Gd(){Oe.apply(this,arguments)}et(Gd,Oe),d=Gd.prototype,d.xa=function(){return null},d.Ob=function(){return"Hisense"},d.La=function(){return"TV"},d.dc=function(){return!1},d.ic=function(){var e={width:1920,height:1080},t=null;if(F.Hisense_Get4KSupportState)try{t=F.Hisense_Get4KSupportState()}catch{}return t==null&&(t=navigator.userAgent.includes("UHD")),t&&(e.width=3840,e.height=2160),Promise.resolve(e)},d.Ua=function(e){return Oe.prototype.Ua.call(this,e),e.streaming.stallSkip=0,e},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(Fn=function(){return new Gd});function Kd(){Oe.call(this),this.g=new St(function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null})}et(Kd,Oe),d=Kd.prototype,d.Ob=function(){return"PlayStation"},d.La=function(){return"CONSOLE"},d.Da=function(){return"WEBKIT"},d.xa=function(){return this.g.value()},d.dc=function(){return!1},d.bd=function(){return!1},d.cd=function(){return!1},d.ph=function(){return this.xa()===4},d.ic=function(){var e,t,n,i,r;return k(function(o){switch(o.g){case 1:return e={width:1920,height:1080},t=!1,ue(o,2),T(o,F.msdk.device.getDisplayInfo(),4);case 4:n=o.h,t=n.resolution==="4K",ce(o,3);break;case 2:return ae(o),ue(o,5),T(o,F.msdk.device.getDisplayInfoImmediate(),7);case 7:i=o.h,t=i.resolution==="4K",ce(o,3);break;case 5:r=ae(o),Ae("PlayStation: Failed to get the display info:",r);case 3:return t&&(e.width=3840,e.height=2160),o.return(e)}})},d.Ua=function(e){return Oe.prototype.Ua.call(this,e),this.xa()===4&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},d.fh=function(){return this.xa()===4},d.If=function(){return this.xa()!==4},navigator.userAgent.includes("PlayStation")&&(Fn=function(){return new Kd});function Xd(){Oe.call(this);var e=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=e?parseInt(e[1],10):null,this.h=e?parseInt(e[2],10):null}et(Xd,Oe),d=Xd.prototype,d.xa=function(){return this.g},d.Ob=function(){return"Tizen"},d.Da=function(){return"CHROMIUM"},d.La=function(){return"TV"},d.fe=function(){return!0},d.ee=function(){return this.xa()===3},d.dc=function(){return!1},d.bd=function(){var e=this.xa();return e!==null?4<=e:Oe.prototype.bd.call(this)},d.cd=function(){return!1},d.je=function(){return this.g&&this.h?this.g===5?5<=this.h:5<this.g:Oe.prototype.je.call(this)},d.ic=function(){var e=F.devicePixelRatio;e={width:1920<F.screen.width*e?3840:1920,height:1080<F.screen.height*e?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var t=webapis.systeminfo.getMaxVideoResolution();e.width=t.width,e.height=t.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch{Ae("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},d.Ua=function(e){return Oe.prototype.Ua.call(this,e),e.drm.ignoreDuplicateInitData=this.xa()!==2,this.xa()===3&&(e.streaming.crossBoundaryStrategy="reset_to_encrypted"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},d.xi=function(){var e=[];return this.g!==null&&5>this.g&&e.push("opus"),e},d.li=function(){return!0},d.mi=function(){return this.xa()===3},navigator.userAgent.includes("Tizen")&&(Fn=function(){return new Xd});function Ro(){Oe.apply(this,arguments)}et(Ro,Oe),Ro.prototype.xa=function(){return null},Ro.prototype.Ob=function(){return"Vizio"},Ro.prototype.La=function(){return"TV"},Ro.prototype.dc=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(Fn=function(){return new Ro});function Wd(){Oe.call(this),this.h=new St(function(){return navigator.userAgent.includes("DT_STB_BCM")}),this.g=new St(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null})}et(Wd,Oe),d=Wd.prototype,d.xa=function(){return this.g.value()},d.Ob=function(){return"WebKit STB"},d.La=function(){return"TV"},d.Da=function(){return"WEBKIT"},d.dc=function(){return!1},d.bd=function(){var e=this.g.value();return e!==null?15<=e:!0},d.ic=function(){return Promise.resolve({width:F.screen.width*F.devicePixelRatio,height:F.screen.height*F.devicePixelRatio})},d.If=function(){return!this.h.value()},(navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("DT_STB_BCM")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))&&(Fn=function(){return new Wd});function zd(){Oe.call(this),this.g=rI()}et(zd,Oe),d=zd.prototype,d.xa=function(){return this.g},d.Ob=function(){return"WebOS"},d.La=function(){return"TV"},d.Da=function(){return"CHROMIUM"},d.dc=function(){return!1},d.bd=function(){var e=this.xa();return e!==null?3<e:Oe.prototype.bd.call(this)},d.cd=function(){var e=this.xa();return e!==null?6<e:Oe.prototype.cd.call(this)},d.je=function(){var e=this.xa();return e!==null?3<e:Oe.prototype.je.call(this)},d.ic=function(){var e={width:1920,height:1080};try{var t=JSON.parse(F.PalmSystem.deviceInfo);e.width=Math.max(1920,t.screenWidth),e.height=Math.max(1080,t.screenHeight)}catch{Ae("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},d.Ua=function(e){return Oe.prototype.Ua.call(this,e),this.xa()===3&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e};function rI(){var e=null,t=navigator.userAgent.match(/Chrome\/(\d+)/);switch(t&&(e=parseInt(t[1],10)),e){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}d.Vi=function(){return!1},d.$c=function(){var e=this.xa();return e!==null?6<=e:Oe.prototype.$c.call(this)},navigator.userAgent.includes("Web0S")&&(Fn=function(){return new zd});function Yd(){Oe.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}et(Yd,Oe),d=Yd.prototype,d.xa=function(){return this.h},d.Ob=function(){return"Xbox"},d.La=function(){return"CONSOLE"},d.Da=function(){return this.g?"EDGE":"CHROMIUM"},d.fe=function(){return!0},d.$e=function(){return!0},d.Pi=function(){return this.g},d.ic=function(){var e={width:1920,height:1080},t=E0();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,i=t.Media.Protection.ProtectionCapabilityResult;t=null;do t=n.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(t===i.maybe);t===i.probably&&(e.width=3840,e.height=2160)}catch{Ae("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},d.Ua=function(e){return Oe.prototype.Ua.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},d.uh=function(){return!1};function E0(){var e=null;try{e=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}return e}(navigator.userAgent.includes("Xbox One")||E0()!==null)&&(Fn=function(){return new Yd});function I0(e,t,n){this.type=e,this.aa=t,this.segments=n||null}function ml(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=i===void 0?null:i}ml.prototype.toString=function(e){function t(r){return r.name+"="+(isNaN(Number(r.value))?'"'+r.value+'"':r.value)}var n="#"+this.name,i=this.attributes?this.attributes.filter(function(r){return e?!e.has(r.name):!0}).map(t):[];return this.value&&i.unshift(this.value),0<i.length&&(n+=":"+i.join(",")),n};function C0(e,t){return t?e.toString():(t=new Set().add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function Po(e,t){return e=e.attributes.filter(function(n){return n.name==t}),e.length?e[0]:null}function $(e,t,n){return(e=Po(e,t))?e.value:n||null}function _e(e,t){if(e=Po(e,t),!e)throw new M(2,4,4023,t);return e.value}function M0(e,t,n){n=n===void 0?[]:n,this.aa=t,this.g=e,this.rc=n}function vl(e,t){this.name=e,this.value=t}function wn(e,t){return e.filter(function(n){return n.name==t})}function k0(e,t){return e.filter(function(n){return _e(n,"TYPE")==t})}function Tt(e,t){e=g(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function Lo(e,t,n){return n=n===void 0?0:n,(e=Tt(e,t))?Number(e.value):n}function qi(e,t,n){return t?D0(e,[t],n):[]}function D0(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(r){return R0(r,n)})),ht(e,i)}function R0(e,t){if(!t||!t.size)return e;e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}");var n=e.match(/{\$\w*}/g);if(n){n=g(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.slice(2,i.length-1),o=t.get(r);if(o)e=e.replace(i,o);else throw new M(2,4,4039,r)}}return e}function oI(){this.g=0}function qd(e,t){t=ze(t),t=t.replace(/\r\n|\r(?=[^\n]|$)/gm,`
|
|
72
|
+
`).trim();var n=t.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new M(2,4,4015);t=0;for(var i=!0,r=g(n),o=r.next();!o.done;o=r.next())if(o=o.value,/^#(?!EXT)/m.test(o)||i)i=!1;else if(o=$d(e,o),--e.g,P0.includes(o.name)){t=1;break}else o.name=="EXT-X-STREAM-INF"&&(i=!0);for(r=[],i=!0,o=0;o<n.length;o++){var s=n[o],u=n[o+1];if(/^#(?!EXT)/m.test(s)||i)i=!1;else{if(s=$d(e,s),sI.includes(s.name)){if(t!=1)throw new M(2,4,4017);s=n.splice(o,n.length-o),n=[],i=[],o=[],u=null,s=g(s);for(var a=s.next();!a.done;a=s.next())a=a.value,/^(#EXT)/.test(a)?(a=$d(e,a),P0.includes(a.name)?r.push(a):a.name=="EXT-X-MAP"?u=a:a.name=="EXT-X-PART"?o.push(a):a.name=="EXT-X-PRELOAD-HINT"?$(a,"TYPE")=="PART"?o.push(a):$(a,"TYPE")=="MAP"&&(a.name="EXT-X-MAP",u=a):i.push(a)):/^#(?!EXT)/m.test(a)||(a=a.trim(),u&&i.push(u),n.push(new M0(a,i,o)),i=[],o=[]);return o.length&&(u&&i.push(u),n.push(new M0("",i,o))),new I0(t,r,n)}r.push(s),s.name=="EXT-X-STREAM-INF"&&(s.attributes.push(new vl("URI",u)),i=!0)}}return new I0(t,r)}function $d(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new M(2,4,4016,t);t=n[1];var i=n[2];n=[];var r;if(i){i=new Fr(i);var o;(o=ur(i,/^([^,=]+)(?:,|$)/g))&&(r=o[1]);for(var s=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;o=ur(i,s);)n.push(new vl(o[1],o[2]||o[3])),Br(i)}return new ml(e,t,n,r)}var P0="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),sI="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function L0(){}function N0(e,t){try{var n=yl(e);return Yr({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(i){return gr(i)}}function yl(e){var t=e.split(":");if(2>t.length||t[0]!="data")throw new M(2,1,1004,e);if(t=t.slice(1).join(":").split(","),2>t.length)throw new M(2,1,1004,e);var n=t[0];e=F.decodeURIComponent(t.slice(1).join(",")),t=n.split(";"),n=t[0];var i=!1;1<t.length&&t[t.length-1]=="base64"&&(i=!0,t.pop());var r;return i?r=mn(e):r=Dn(e),{data:r,contentType:n}}W("shaka.net.DataUriPlugin",L0),L0.parse=N0,hi("data",N0);function Tl(){var e=this;this.g=this.h=null,this.G=1,this.A=new Map,this.K=new Map,this.B=new Map,this.B.set("video",new Map),this.B.set("audio",new Map),this.B.set(pe,new Map),this.B.set("image",new Map),this.$b=new Map().set("com.apple.streamingkeydelivery",function(t,n,i){return RI(e,t,n,i)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){var n=_e(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=_e(t,"URI"),n=yl(n.split("?")[0]),n=se(n.data),i=ui("com.widevine.alpha",i,[{initDataType:"cenc",initData:n}]),(t=$(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}).set("com.microsoft.playready",function(t){var n=_e(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),t=_e(t,"URI"),t=yl(t.split("?")[0]),t=se(t.data),n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),n=Ju(t,n,new Set,0),i=ui("com.microsoft.playready",i,[{initDataType:"cenc",initData:n}]),(t=lr(["<PLAYREADY>",oi(t),"</PLAYREADY>"].join(`
|
|
73
|
+
`)))&&(i.licenseServerUri=al(t)),i=Promise.resolve(i)}else i=Promise.resolve(null);return i}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){var n=_e(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=_e(t,"URI"),n=yl(n.split("?")[0]),n=se(n.data),i=ui("com.huawei.wiseplay",i,[{initDataType:"cenc",initData:n}]),(t=$(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}),this.ab=new Set,this.i=new Map,this.l=null,this.F="",this.Ya=new oI,this.L=-1,this.ha=1/0,this.ba=this.qc=this.Za=!1,this.C=new Te(function(){if(e.U&&!e.g.continueLoadingWhenPaused&&(e.S.Ja(e.U,"timeupdate"),e.U.paused)){e.S.Aa(e.U,"timeupdate",function(){return e1(e)});return}e1(e)}),this.za=El,this.m=null,this.Pa=0,this.o=1/0,this.Oa=this.Ka=this.P=0,this.W=new qr,this.H=new Map,this.I=new Map,this.ya=new Map,this.na=new Map,this.M=new Map,this.va=new Map,this.wa=new Map,this.bc=this.ka=!1,this.eb=new Nr(5),this.j=null,this.N=!0,this.S=new Me,this.s=this.U=null,this.Zb=function(){return!1}}d=Tl.prototype,d.configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.Zb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.V()&&this.C.Jb()},d.start=function(e,t){var n=this,i;return k(function(r){return r.g==1?(n.h=t,n.ka=t.isLowLatencyMode(),T(r,rp(n,[e]).promise,2)):r.g!=3?(i=r.h,n.F=i.uri,T(r,lI(n,i.data),3)):r.return(n.m)})},d.stop=function(){this.C&&(this.C.stop(),this.C=null);var e=[];return this.W&&(e.push(this.W.destroy()),this.W=null),this.g=this.h=null,this.ab.clear(),this.m=null,this.i.clear(),this.K.clear(),this.I.clear(),this.A.clear(),this.ya.clear(),this.na.clear(),this.M.clear(),this.va.clear(),this.wa.clear(),this.j&&this.j.destroy(),this.S&&(this.S.release(),this.S=null),Promise.all(e)},d.update=function(){var e=this,t,n,i,r,o,s,u,a,l,c,f,p;return k(function(h){if(h.g==1){if(!jt(e))return h.return();for(t=[],n=Array.from(e.i.values()),e.o=1/0,e.m.gapCount=0,i=n.filter(function(m){return m.stream.segmentIndex}),r=g(i),o=r.next();!o.done;o=r.next())s=o.value,t.push(uI(e,s));return T(h,Promise.all(t),2)}for(V0(e,i.map(function(m){return m.stream})),u=i.some(function(m){return m.Rd==0}),i.length&&!u&&(a=UI,wl(e,a.cj),l=i.map(function(m){return m.mc}),e.l.pb(Math.min.apply(Math,H(l))),e.h.updateDuration()),u&&Jd(e),c=g(i),f=c.next();!f.done;f=c.next())p=f.value,p.stream.isAudioMuxedInVideo||!p.stream.segmentIndex||Gn(p.stream.segmentIndex)||e.h.disableStream(p.stream);K(h)})};function Qd(e,t){return jt(e)?e.B.get(t.type):t.jf}function uI(e,t){var n,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j,O,B,V,q,X,Ce;return k(function(he){switch(he.g){case 1:if(t.stream.isAudioMuxedInVideo)return he.return();for(n=[],i=g(t.O()),r=i.next();!r.done;r=i.next())o=r.value,s=new nt(o),u=s.g,t.Me&&(0<=t.Sb&&u.add("_HLS_msn",String(t.Sb)),0<=t.Tb&&u.add("_HLS_part",String(t.Tb))),t.Ne&&u.add("_HLS_skip","YES"),gh(u)&&nr(s,jr(u.toString())),n.push(s.toString());return ue(he,2),T(he,rp(e,n,!0).promise,4);case 4:a=he.h,ce(he,3);break;case 2:throw l=ae(he),e.h&&e.h.disableStream(t.stream),l;case 3:if(!t.stream.segmentIndex)return he.return();if(c=qd(e.Ya,a.data),c.type!=1)throw new M(2,4,4017);return f=a.uri,f==a.originalUri||t.O().includes(f)||t.zf.push(f),p=wn(c.aa,"EXT-X-DEFINE"),h=Zd(e,p,f),m=t.stream,y=Qd(e,t),T(he,X0(e,c,m.mimeType,t.O,h),5);case 5:for(v=he.h,x=v.keyIds,S=v.drmInfos,w=v.encrypted,A=v.Hh,m.encrypted||!w||A||(m.encrypted=!0),D=function(xe,ve){return xe.size===ve.size&&[].concat(H(xe)).every(function(me){return ve.has(me)})},D(m.keyIds,x)||(m.keyIds=x,m.drmInfos=S,e.h.newDrmInfo(m)),E=Q0(e,c,y,h,t.O,t.type),I=E.segments,(C=E.bandwidth)&&(m.bandwidth=C),R=ma(m),N=g(I),L=N.next();!L.done;L=N.next())P=L.value,P.Y&&(P.Y.rd=R);m.segmentIndex.Yd(I,e.l.Gb()),I.length&&(b=Lo(c.aa,"EXT-X-MEDIA-SEQUENCE",0),j=(U=Tt(c.aa,"EXT-X-SKIP"))?Number($(U,"SKIPPED-SEGMENTS")):0,O=G0(b,I),B=O.Sb,V=O.Tb,t.Sb=B+j,t.Tb=V,q=y.get(b),m.segmentIndex.$a(q)),(X=Gn(m.segmentIndex))&&(t.Uc=X.startTime,Ce=I[I.length-1],t.mc=Ce.endTime),Tt(c.aa,"EXT-X-ENDLIST")&&(t.Rd=!0),tp(e,c),np(e,c.aa,m.type,h,t.O),K(he)}})}d.onExpirationUpdated=function(){},d.onInitialVariantChosen=function(){},d.banLocation=function(e){this.j&&this.j.banLocation(e)},d.setMediaElement=function(e){this.U=e};function j0(e,t,n){n=n===void 0?!1:n;for(var i=e.L==-1,r=g(t),o=r.next();!o.done;o=r.next()){o=o.value;var s=o.stream.segmentIndex,u=Qd(e,o);if(s=Gn(s)){u=g(u);for(var a=u.next();!a.done;a=u.next()){a=g(a.value);var l=a.next().value;if(a.next().value==s.startTime){i&&(e.L=Math.max(e.L,l)),o.og=l;break}}}}if(!(0>e.L))for(t=g(t),i=t.next();!i.done;i=t.next())i=i.value,(tu(e,i.type)||n)&&(r=i.stream.segmentIndex)&&(o=e.L-i.og,0<o&&(r.g.splice(0,o),r=Gn(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),U0(e,i,r)))}function aI(e,t){if(e.ha==1/0){t=g(t);for(var n=t.next();!n.done;n=t.next())n=Gn(n.value.stream.segmentIndex),n!=null&&n.h!=null&&(e.ha=Math.min(e.ha,n.h))}if(t=e.ha,t!=1/0){n=g(e.i.values());for(var i=n.next();!i.done;i=n.next())if(i=i.value,!tu(e,i.type)){var r=i.stream.segmentIndex;if(r!=null){var o=Gn(r);if(o)if(o.h==null)zn("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.O(),"Expect AV sync issues!");else for(U0(e,i,o.h-t-o.startTime),i=g(r),r=i.next();!r.done;r=i.next())r.value.vh(t)}}}}function U0(e,t,n){if(!(.001>Math.abs(n))){t.Uc+=n,t.mc+=n,e=Qd(e,t);for(var i=g(e),r=i.next();!r.done;r=i.next()){var o=g(r.value);r=o.next().value,o=o.next().value,e.set(r,o+n)}t.O()}}function lI(e,t){var n,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j,O,B,V,q,X,Ce,he,xe,ve,me,Pe,de,fe;return k(function(ge){switch(ge.g){case 1:return n=gt,i=qd(e.Ya,t),r=wn(i.aa,"EXT-X-DEFINE"),o=[],s=[],u=[],e.l=new re(null,0),e.l.Zc(!0),a=function(){return[e.F]},l=null,c=new Map,i.type==1?(e.N=!1,B=wn(i.aa,"EXT-X-DEFINE"),c=Zd(e,B,e.F),l=n.Ca,V="",q=new Map,T(ge,H0(e,e.G++,c,i,a,"",l,V,!0,"Media Playlist",null,q,null,!1,null,!1),7)):(fI(e,r),f=wn(i.aa,"EXT-X-MEDIA"),p=wn(i.aa,"EXT-X-STREAM-INF"),h=wn(i.aa,"EXT-X-IMAGE-STREAM-INF"),m=wn(i.aa,"EXT-X-I-FRAME-STREAM-INF"),y=wn(i.aa,"EXT-X-SESSION-KEY"),v=wn(i.aa,"EXT-X-SESSION-DATA"),x=wn(i.aa,"EXT-X-CONTENT-STEERING"),pI(e,v),T(ge,hI(e,x),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(S=[],w=g(p),A=w.next(),D={};!A.done;D={Ti:void 0},A=w.next())E=A.value,(I=$(E,"SUPPLEMENTAL-CODECS"))&&(D.Ti=I.split(/\s*,\s*/).map(function(Xe){return Xe.split("/")[0]}),C=E.attributes.map(function(Xe){return function(We){var $e=We.name,at=We.value;return $e=="CODECS"&&(at=Xe.Ti.join(","),We=We.value.split(","),1<We.length&&(We=Kt("audio",We))&&(at+=","+We)),new vl($e,at)}}(D)),S.push(new ml(E.id,E.name,C,null)));for(p.push.apply(p,H(S)),R=[],N=g(m),L=N.next(),P={};!L.done;P={Ui:void 0},L=N.next())b=L.value,(U=$(b,"SUPPLEMENTAL-CODECS"))&&(P.Ui=U.split(/\s*,\s*/).map(function(Xe){return Xe.split("/")[0]}),j=b.attributes.map(function(Xe){return function(We){var $e=We.name;return We=We.value,$e=="CODECS"&&(We=Xe.Ui.join(",")),new vl($e,We)}}(P)),R.push(new ml(b.id,b.name,j,null)));m.push.apply(m,H(R))}return dI(e,p),wI(e,f),O=yI(e,m),T(ge,TI(e,p,y,f,a,e.A,O),5);case 5:return o=ge.h,s=gI(e,f),T(ge,mI(e,h,m),6);case 6:u=ge.h,ge.u(3);break;case 7:X=ge.h,e.i.set(e.F,X),X.stream&&(Ce=ma(X.stream),X.stream.segmentIndex.Eb(function(Xe){Xe.Y&&(Xe.Y.rd=Ce)})),l=X.stream.type,he=!0,(e.g.disableAudio&&X.type=="audio"||e.g.disableVideo&&X.type=="video"&&!X.stream.codecs.includes(","))&&(he=!1),he&&o.push({id:0,language:ke(V||"und"),disabledUntilTime:0,primary:!0,audio:X.type=="audio"?X.stream:null,video:X.type=="video"?X.stream:null,bandwidth:X.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new M(2,7,7001);if(z0(e,i),i.type==1&&(jt(e)&&(Y0(e,i),xe=e.o,e.C.ia(xe)),ve=Array.from(e.i.values()),ep(e,ve),Jd(e),np(e,i.aa,l,c,a)),e.m={presentationTimeline:e.l,variants:o,textStreams:s,imageStreams:u,offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.s},e.ba||!e.g.hls.disableCodecGuessing){ge.u(8);break}for(me=[],Pe=g(e.m.variants),de=Pe.next();!de.done;de=Pe.next())fe=de.value,fe.audio&&fe.audio.codecs===""&&me.push(fe.audio.createSegmentIndex()),fe.video&&fe.video.codecs===""&&me.push(fe.video.createSegmentIndex());return T(ge,Promise.all(me),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.m),K(ge)}})}function cI(e,t){var n,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w;return k(function(A){if(A.g==1)return n=Tf(e.g.hls.mediaPlaylistFullMimeType),t.length?(i=J0(e,t),r=i.segment,o=i.segmentIndex,s=r.O(),u=s[0],a=new nt(u),l=a.ob.split(".").pop(),(c=op.get(l))?A.return(Tf(c)):T(A,Promise.all([O0(e,r.Y,0),O0(e,r,o)]),2)):A.return(n);if(f=A.h,p=f[1].mimeType,h=f[0].data,m=f[1].data,y="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),v=["audio/mp4","video/mp4","video/iso.segment"],x=r.Y||v.includes(p),!x&&oo(se(m))){var D=m,E=e.g.disableAudio,I=e.g.disableVideo,C=e.g.disableText,R=se(D),N=new Fe().parse(R),L=N.Od();R=N.Ig();var P=[],b=!1,U=!1;if(!E)switch(L.audio){case"aac":case"aac-loas":N.sb().length&&(P.push("mp4a.40.2"),b=!0);break;case"mp3":N.sb().length&&(P.push("mp4a.40.34"),b=!0);break;case"ac3":N.sb().length&&(P.push("ac-3"),b=!0);break;case"ec3":N.sb().length&&(P.push("ec-3"),b=!0);break;case"opus":N.sb().length&&(P.push("opus"),b=!0)}if(!I)switch(L.video){case"avc":R.codec?P.push(R.codec):P.push("avc1.42E01E"),U=!0;break;case"hvc":R.codec?P.push(R.codec):P.push("hvc1.1.6.L93.90"),U=!0;break;case"av1":P.push("av01.0.01M.08"),U=!0}if(P.length){if(E=b&&!U,I=new Map,U&&!C){for(C=new Bn("video/mp2t"),C.vf(D),D=g(C.Uf()),U=D.next();!U.done;U=D.next())U=U.value,I.set(U,U);C.Fd()}R={type:E?"audio":"video",mimeType:"video/mp2t",codecs:P.join(", "),language:null,height:R.height,width:R.width,channelCount:null,sampleRate:null,closedCaptions:I,oe:null,colorGamut:null,frameRate:R.frameRate}}else R=null;if(S=R)return A.return(S)}else if((x||y.includes(l))&&(w=Mw(h,m,e.g.disableText)))return A.return(w);return p?A.return(Tf(p)):A.return(n)})}function O0(e,t,n){var i,r,o,s,u,a;return k(function(l){switch(l.g){case 1:return t?(i=jn,r=Is(t.O(),t.Bc(),t.zc(),e.g.retryParameters),o=t instanceof Z?1:0,T(l,Mi(e,r,i,{type:o}).promise,2)):l.return({mimeType:null,data:null});case 2:if(s=l.h,u=s.data,!t.aesKey){l.u(3);break}return T(l,Sf(u,t.aesKey,n),4);case 4:u=l.h;case 3:return t instanceof Z?t.ge(u,!0):t.ge(u),(a=s.headers["content-type"])&&(a=a.split(";")[0].toLowerCase()),l.return({mimeType:a,data:u})}})}function Jd(e){if(jt(e)){if(e.za==Il){for(var t=1/0,n=1/0,i=g(e.i.values()),r=i.next();!r.done;r=i.next())r=r.value,r.stream.segmentIndex&&r.stream.type!="text"&&!r.stream.isAudioMuxedInVideo&&(t=Math.min(t,r.mc),n=Math.min(n,r.Uc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.Gf(t)}}else e.l.pb(B0(e));if(!e.l.o)for(t=g(e.i.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=Gn(n.stream.segmentIndex))&&n.h&&e.l.mh(n.h);e.l.hf()}function fI(e,t){var n=new nt(e.F).g;t=g(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=$(r,"NAME");var o=$(r,"VALUE");r=$(r,"QUERYPARAM"),i&&o&&(e.A.has(i)||e.A.set(i,o)),r&&(i=n.get(r)[0])&&!e.A.has(i)&&e.A.set(r,i)}}function Zd(e,t,n){n=new nt(n).g;var i=new Map;t=g(t);for(var r=t.next();!r.done;r=t.next()){var o=r.value,s=$(o,"NAME"),u=$(o,"VALUE");r=$(o,"QUERYPARAM"),o=$(o,"IMPORT"),s&&u&&(i.has(s)||i.set(s,u)),r&&(s=n.get(r)[0])&&!i.has(s)&&i.set(r,s),o&&(r=e.A.get(o))&&i.set(o,r)}return i}function dI(e,t){t=g(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=$(i,"AUDIO");n=$(i,"VIDEO");var o=$(i,"SUBTITLES");if(i=_0(e,i),o){var s=Kt(pe,i);e.I.set(o,s),Rn(i,s)}r&&(o=Kt("audio",i),o||(o=e.g.hls.defaultAudioCodec),e.I.set(r,o)),n&&(r=Kt("video",i),r||(r=e.g.hls.defaultVideoCodec),e.I.set(n,r))}}function pI(e,t){t=g(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=$(i,"DATA-ID");n=$(i,"URI");var o=$(i,"LANGUAGE");i=$(i,"VALUE"),r=new Map().set("id",r),n&&r.set("uri",qi([e.F],n,e.A)[0]),o&&r.set("language",o),i&&r.set("value",i),n=new G("sessiondata",r),e.h&&e.h.onEvent(n)}}function hI(e,t){var n,i,r,o,s,u;return k(function(a){if(!e.h||!e.g)return a.return();for(i=g(t),r=i.next();!r.done;r=i.next())if(o=r.value,s=$(o,"PATHWAY-ID"),u=$(o,"SERVER-URI"),s&&u){e.j=new Mo(e.h),e.j.configure(e.g),e.j.i=[e.F],e.j.setManifestType("HLS"),e.j.h=s,n=qs(e.j,u);break}return T(a,n,0)})}function gI(e,t){var n=k0(t,"SUBTITLES");t=n.map(function(s){if(e.g.disableText)return null;try{return b0(e,[s],new Map).stream}catch(u){if(e.g.hls.ignoreTextStreamFailures)return null;throw u}}),n=g(n);for(var i=n.next();!i.done;i=n.next()){var r=_e(i.value,"GROUP-ID");if((i=e.I.get(r))&&(r=e.K.get(r))){r=g(r);for(var o=r.next();!o.done;o=r.next())o=o.value,o.stream.codecs=i,o.stream.mimeType=ip(pe,i)||Sl(pe),No(o.stream)}}return t.filter(function(s){return s})}function No(e){var t=new Set([rt(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Eb(function(n){n.mimeType&&t.add(rt(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function mI(e,t,n){var i,r;return k(function(o){return o.g==1?(i=t.map(function(s){var u,a;return k(function(l){if(l.g==1)return e.g.disableThumbnails?l.return(null):(ue(l,2),T(l,AI(e,s),4));if(l.g!=2)return u=l.h,l.return(u.stream);if(a=ae(l),e.g.hls.ignoreImageStreamFailures)return l.return(null);throw a})}).concat(n.map(function(s){if(e.g.disableThumbnails)return null;try{var u=F0(e,s);return u.stream.type!=="image"?null:u.stream}catch(a){if(e.g.hls.ignoreImageStreamFailures)return null;throw a}})),T(o,Promise.all(i),2)):(r=o.h,o.return(r.filter(function(s){return s})))})}function vI(e,t,n){t=t.filter(function(u){var a=$(u,"URI")||"";return u=$(u,"TYPE"),u!="SUBTITLES"&&(a!=""||u=="AUDIO")});var i={};t=g(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;var o=C0(r,!e.j);i[o]?i[o].push(r):i[o]=[r]}for(var s in i)b0(e,i[s],n,!1)}function yI(e,t){return t.map(function(n){return n=F0(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function TI(e,t,n,i,r,o,s){var u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j,O,B,V,q,X,Ce,he,xe,ve,me,Pe;return k(function(de){switch(de.g){case 1:if(u=[],a=new Set,e.g.ignoreDrmInfo||!(0<n.length)){de.u(2);break}l=g(n),c=l.next();case 3:if(c.done){de.u(2);break}if(f=c.value,p=_e(f,"METHOD"),h=$(f,"KEYFORMAT")||"identity",m=null,p=="NONE"){de.u(4);break}if(Al(p)){y=qi(r(),_e(f,"URI"),o),v=y.sort().join(""),e.M.has(v)||(x=lt(y,e.g.retryParameters),S=Mi(e,x,6).promise,e.M.set(v,S)),de.u(4);break}if(h=="identity")return T(de,t1(e,f,"",r,null,o),12);if(w=e.$b.get(h),!w){A=null,de.u(10);break}return T(de,w(f,"",null),11);case 11:A=de.h;case 10:m=A,de.u(6);break;case 12:m=de.h;case 6:if(m){if(m.keyIds)for(D=g(m.keyIds),E=D.next();!E.done;E=D.next())I=E.value,a.add(I);u.push(m)}case 4:c=l.next(),de.u(3);break;case 2:for(C={},R=g(t),N=R.next();!N.done;N=R.next())L=N.value,P=C0(L,!e.j),C[P]?C[P].push(L):C[P]=[L];b=[];for(U in C)j=C[U],O=j[0],B=$(O,"FRAME-RATE"),V=Number($(O,"AVERAGE-BANDWIDTH"))||Number(_e(O,"BANDWIDTH")),q=$(O,"RESOLUTION"),X=g(q?q.split("x"):[null,null]),Ce=X.next().value,he=X.next().value,xe=$(O,"VIDEO-RANGE"),(ve=$(O,"REQ-VIDEO-LAYOUT"))&&ve.includes(",")&&(me=ve.split(",").filter(function(fe){return fe=="CH-STEREO"||fe=="CH-MONO"}),ve=me[0]),ve=ve||"CH-MONO",Pe=xI(e,j,i),b.push.apply(b,H(SI(e,Pe.audio,Pe.video,V,Ce,he,B,xe,ve,u,a,s)));return de.return(b.filter(function(fe){return fe!=null}))}})}function xI(e,t,n){for(var i={audio:[],video:[]},r=new Map,o=[],s=!1,u=!1,a=g(t),l=a.next();!l.done;l=a.next()){var c=l.value;l=$(c,"AUDIO");var f=$(c,"VIDEO"),p=l||f;p&&(o.includes(p)||o.push(p),(c=$(c,"PATHWAY-ID"))&&r.set(p,c),l?s=!0:f&&(u=!0))}o.length&&n.length&&(n=n.filter(function(m){return o.includes(_e(m,"GROUP-ID"))}),vI(e,n,r)),n=(r=o.sort().join(","))&&e.K.has(r)?e.K.get(r):[],s?i.audio.push.apply(i.audio,H(n)):u&&i.video.push.apply(i.video,H(n)),s=!1;var h=t.map(function(m){return _e(m,"URI")});return l=i.audio.find(function(m){return m&&m.O().find(function(y){return h.includes(y)})}),u=_0(e,t[0]),n=Kt("video",u),(a=Kt("audio",u))&&!n?(l="audio",s=0<i.audio.length):!i.audio.length&&!i.video.length&&a&&n?(l="video",u=[[n,a].join()]):i.audio.length&&l?(l="audio",s=!0):l=i.video.length&&!i.audio.length?"audio":"video",s||(e=EI(e,t,u,l),r&&(e.stream.groupId=r),i[e.stream.type]=[e]),i}function _0(e,t){return t=$(t,"CODECS")||"",e.ba=0<t.length,e.ba||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),xf(t.split(/\s*,\s*/))}function SI(e,t,n,i,r,o,s,u,a,l,c,f){for(var p=g(n),h=p.next();!h.done;h=p.next())Z0(h.value.stream,r,o,s,u,a,null);for(r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r&&(t=t.filter(function(x){return!x.stream.isAudioMuxedInVideo})),r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=[],t=g(t),o=t.next();!o.done;o=t.next())for(o=o.value,s=g(n),u=s.next();!u.done;u=s.next()){var m=u.value;(u=o?o.stream:null)&&(u.drmInfos=l,u.keyIds=c),(a=m?m.stream:null)&&(a.drmInfos=l,a.keyIds=c,e.g.disableIFrames||ng(a,f)),a&&!u&&(a.bandwidth=i),!a&&u&&(u.bandwidth=i),p=o?o.stream.drmInfos:null,h=m?m.stream.drmInfos:null,m=m?m.O().sort().join(","):"";var y=o?o.O().sort().join(","):"",v=[];u&&u.codecs&&v.push(u.codecs),a&&a.codecs&&v.push(a.codecs),m=[m,y,v.sort()].join("-"),u&&a&&!ug(p,h)||e.ab.has(m)||(u={id:e.G++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!a&&a.primary,audio:u,video:a,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(u),e.ab.add(m))}return r}function wI(e,t){t=k0(t,"CLOSED-CAPTIONS"),e.N=t.length==0,t=g(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=$(i,"LANGUAGE");n=ke(r||"und"),r||(r=$(i,"NAME"))&&(n=r),r=_e(i,"GROUP-ID"),i=_e(i,"INSTREAM-ID").replace("SERVICE","svc"),e.H.get(r)||e.H.set(r,new Map),e.H.get(r).set(i,n)}}function b0(e,t,n,i){i=i===void 0?!0:i;for(var r=[],o=[],s=new Map,u=g(t),a=u.next();!a.done;a=u.next()){var l=a.value;a=i?_e(l,"URI"):$(l,"URI")||"shaka://hls-muxed",l=_e(l,"GROUP-ID"),r.push(a),o.push(l),s.set(l,a)}if(i=o.sort().join(","),a=t[0],t="",u=_e(a,"TYPE").toLowerCase(),u=="subtitles"&&(u=pe),u==pe)t=$(a,"CODECS")||"";else for(o=g(o),l=o.next();!l.done;l=o.next())if(l=l.value,e.I.has(l)){t=e.I.get(l);break}if(o=r.sort().join(","),e.i.has(o))return e.i.get(o);if(l=e.G++,e.j){s=g(s);for(var c=s.next();!c.done;c=s.next()){var f=g(c.value);c=f.next().value,f=f.next().value,(c=n.get(c))&&ko(e.j,l,c,f)}}n=$(a,"LANGUAGE"),s=$(a,"NAME"),c=$(a,"DEFAULT")=="YES",u=="audio"?f=(f=$(a,"CHANNELS"))?parseInt(f.split("/")[0],10):null:f=null;var p;u=="audio"&&(p=$(a,"CHANNELS"))?(p=p.split("/"),p=p.length!=2?!1:p[1]==="JOC"||p[1].includes("ATMOS")):p=!1;var h=$(a,"CHARACTERISTICS"),m=$(a,"FORCED")=="YES";return u=="audio"?a=(a=$(a,"SAMPLE-RATE"))?parseInt(a,10):null:a=null,r=xl(e,l,r,t,u,n,c,s,f,null,h,m,a,p),r.stream&&(r.stream.groupId=i),e.K.has(i)?e.K.get(i).push(r):e.K.set(i,[r]),e.i.set(o,r),r}function AI(e,t){var n,i,r,o,s,u,a,l,c,f;return k(function(p){return p.g==1?(n=_e(t,"URI"),i=$(t,"CODECS","jpeg")||"",e.i.has(n)?p.return(e.i.get(n)):(r=$(t,"LANGUAGE"),o=$(t,"NAME"),s=$(t,"CHARACTERISTICS"),u=xl(e,e.G++,[n],i,"image",r,!1,o,null,null,s,!1,null,!1),(a=$(t,"RESOLUTION"))?T(p,u.stream.createSegmentIndex(),3):p.u(2))):(p.g!=2&&(l=Gn(u.stream.segmentIndex),c=l.tilesLayout)&&(u.stream.width=Number(a.split("x")[0])*Number(c.split("x")[0]),u.stream.height=Number(a.split("x")[1])*Number(c.split("x")[1])),(f=$(t,"BANDWIDTH"))&&(u.stream.bandwidth=Number(f)),e.i.set(n,u),p.return(u))})}function F0(e,t){var n="video",i=_e(t,"URI"),r=$(t,"CODECS")||"";if(r=="mjpg"&&(n="image"),e.i.has(i))return e.i.get(i);var o=$(t,"LANGUAGE"),s=$(t,"NAME"),u=$(t,"CHARACTERISTICS");return n=xl(e,e.G++,[i],r,n,o,!1,s,null,null,u,!1,null,!1),r=$(t,"RESOLUTION"),o=g(r?r.split("x"):[null,null]),r=o.next().value,o=o.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(o)||void 0,(t=$(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function EI(e,t,n,i){for(var r=e.G++,o=[],s=g(t),u=s.next();!u.done;u=s.next()){var a=u.value;u=_e(a,"URI"),a=$(a,"PATHWAY-ID"),e.j&&a&&ko(e.j,r,a,u),o.push(u)}if(s=o.sort().join(",")+n.sort().join(","),e.i.has(s))return e.i.get(s);u=o.join(",");e:{if(t=$(t[0],"CLOSED-CAPTIONS"),i=="video"){if(e.g.disableText){e.N=!1,t=null;break e}if(t){if(t!="NONE"){t=e.H.get(t);break e}e.N=!1}else if(!t&&e.H.size)for(t=g(e.H.keys()).next();!t.done;){t=e.H.get(t.value);break e}}t=null}return n=_r(i,n),i=xl(e,r,o,n,i,null,!1,u,null,t,null,!1,null,!1),e.i.set(s,i),i}function xl(e,t,n,i,r,o,s,u,a,l,c,f,p,h){function m(A){var D,E,I,C,R,N,L,P,b,U,j,O,B,V,q,X,Ce,he,xe,ve;return k(function(me){switch(me.g){case 1:return D=gt,ue(me,2),T(me,A.promise,4);case 4:if(E=me.h,A.aborted)return me.return();if(I=E.uri,I!=E.originalUri&&(C=x.O(),C.includes(I)||x.zf.push(I)),R=qd(e.Ya,E.data),R.type!=1)throw new M(2,4,4017);return N=wn(R.aa,"EXT-X-DEFINE"),L=Zd(e,N,I),P=!1,(!e.ba&&e.g.hls.disableCodecGuessing||e.N&&r==D.Ca&&!e.g.hls.disableClosedCaptionsDetection)&&0<R.segments.length&&(e.N=!1,P=!0),b=!e.ba&&e.g.hls.disableCodecGuessing,U=jt(e),T(me,H0(e,0,L,R,y,i,r,o,s,u,a,l,c,f,p,h,void 0,P,b),5);case 5:if(j=me.h,A.aborted)return me.return();O=j.stream,z0(e,R),jt(e)&&!U&&Y0(e,R),x.Uc=j.Uc,x.mc=j.mc,x.Ne=j.Ne,x.Me=j.Me,x.Rd=j.Rd,x.jf=j.jf,x.Sb=j.Sb,x.Tb=j.Tb,v.segmentIndex=O.segmentIndex,v.encrypted=O.encrypted,v.drmInfos=O.drmInfos,v.keyIds=O.keyIds,v.mimeType=O.mimeType,v.bandwidth=v.bandwidth||O.bandwidth,v.codecs=v.codecs||O.codecs,v.closedCaptions=v.closedCaptions||O.closedCaptions,v.width=v.width||O.width,v.height=v.height||O.height,v.hdr=v.hdr||O.hdr,v.colorGamut=v.colorGamut||O.colorGamut,v.frameRate=v.frameRate||O.frameRate,v.language=="und"&&O.language!="und"&&(v.language=O.language),v.language=v.language||O.language,v.channelsCount=v.channelsCount||O.channelsCount,v.audioSamplingRate=v.audioSamplingRate||O.audioSamplingRate,No(v),v.drmInfos.length&&e.h.newDrmInfo(v),B=!1,(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)&&(B=!0),e.m&&B&&e.h.makeTextStreamsForClosedCaptions(e.m),r==D.Ta&&(V=Gn(O.segmentIndex))&&V.Y&&(v.mimeType="application/mp4",No(v)),q=ma(v),v.segmentIndex.Eb(function(Pe){Pe.Y&&(Pe.Y.rd=q)}),II(e)&&(e.qc?ep(e,[x]):(e.qc=!0,X=Array.from(e.i.values()),Ce=X.filter(function(Pe){return Pe.stream.segmentIndex}),ep(e,Ce),Jd(e),he=e.o,0<he&&e.C.ia(he))),np(e,R.aa,v.type,L,y),e.m&&(e.m.startTime=e.s),ce(me,0);break;case 2:if(xe=ae(me),v.closeSegmentIndex(),xe.code===7001)return me.return();if(ve=e.h.disableStream(v),!ve)throw xe;K(me)}})}function y(){return e.j&&1<n.length?$s(e.j,t):x.zf.concat(D0([e.F],n,e.A))}var v=K0(e,i,r,o,s,u,a,l,c,f,p,h);n.includes("shaka://hls-muxed")&&(v.isAudioMuxedInVideo=!0,v.mimeType="video/mp2t",No(v));var x={stream:v,type:r,zf:[],Uc:0,mc:0,jf:new Map,Ne:!1,Me:!1,Rd:!1,og:-1,Sb:-1,Tb:-1,O:y},S=null,w;return v.createSegmentIndex=function(){return S||(v.isAudioMuxedInVideo?(v.segmentIndex=new Ie([]),Promise.resolve()):(w=rp(e,x.O(),!0),S=new Promise(function(A){A(m(w))})))},v.closeSegmentIndex=function(){S&&!v.segmentIndex&&w.abort(),v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null),S=null},x}function B0(e){var t=1/0;e=g(e.i.values());for(var n=e.next();!n.done;n=e.next())n=n.value,n.stream.segmentIndex&&n.stream.type!="text"&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.mc));return t}function V0(e,t){var n=[];t=g(t);for(var i=t.next();!i.done;i=t.next())i=i.value,i.segmentIndex&&i.segmentIndex.Eb(function(r){n.push(r)});e.l.$d(n)}function ep(e,t){if(!jt(e))for(var n=B0(e),i=g(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.ld(0,n);V0(e,t.map(function(o){return o.stream})),i=Array.from(e.i.values()).filter(function(o){return o.stream.segmentIndex}),n=i.some(function(o){return o.stream.type=="audio"}),r=i.some(function(o){return o.stream.type=="video"}),i=jt(e)&&!e.Za,n=!jt(e)&&e.Za&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?j0(e,t,i):(aI(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&j0(e,t))}function tu(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function II(e){if(!e.m)return!1;var t=[],n=[];e=g(e.m.variants);for(var i=e.next();!i.done;i=e.next())i=i.value,i.video&&t.push(i.video),i.audio&&n.push(i.audio);return!(0<t.length&&!t.some(function(r){return r.segmentIndex})||0<n.length&&!n.some(function(r){return r.segmentIndex}))}function H0(e,t,n,i,r,o,s,u,a,l,c,f,p,h,m,y,v,x,S){x=x===void 0?!0:x,S=S===void 0?!0:S;var w,A,D,E,I,C,R,N,L,P,b,U,j,O,B,V,q,X,Ce,he,xe,ve,me,Pe,de,fe,ge,Xe,We;return k(function($e){switch($e.g){case 1:if(w=i.segments||[],A=w.every(function(at){return!!Tt(at.aa,"EXT-X-GAP")}),!w.length||A)throw new M(2,4,4053);if(CI(e,i),jt(e)&&tp(e,i),D=jt(e)?e.B.get(s):new Map,E=Q0(e,i,D,n,r,s),I=E.segments,C=E.bandwidth,b=P=L=N=R=null,!(0<I.length&&x)){$e.u(2);break}return T($e,cI(e,I),3);case 3:U=$e.h,s!=U.type&&jt(e)&&(e.B.set(U.type,e.B.get(s)),e.B.set(s,new Map)),s=U.type,u=U.language,c=U.channelCount,m=U.sampleRate,e.g.disableText||(f=U.closedCaptions),N=U.height,R=U.width,L=U.oe,P=U.colorGamut,b=U.frameRate,S&&(v=U.mimeType,o=U.codecs);case 2:if(v){$e.u(4);break}return T($e,DI(e,s,o,I),5);case 5:v=$e.h,s!=pe||o||v!="application/mp4"||!I[0]||I[0].Y||(v="text/vtt");case 4:return T($e,X0(e,i,v,r,n),6);case 6:if(j=$e.h,O=j.drmInfos,B=j.keyIds,V=j.encrypted,q=j.Hh,V&&!O.length&&!q)throw new M(2,4,4026);return X=K0(e,o,s,u,a,l,c,f,p,h,m,y),X.encrypted=V&&!q,X.drmInfos=O,X.keyIds=B,X.mimeType=v,C&&(X.bandwidth=C),No(X),s=="video"&&(R||N||L||P)&&Z0(X,R,N,b,L,null,P),jt(e)&&tp(e,i),Ce=I[0].startTime,he=I[I.length-1],xe=he.endTime,ve=new Ie(I),X.segmentIndex=ve,Pe=(me=Tt(i.aa,"EXT-X-SERVER-CONTROL"))?Po(me,"CAN-SKIP-UNTIL")!=null:!1,de=me?Po(me,"CAN-BLOCK-RELOAD")!=null:!1,fe=Lo(i.aa,"EXT-X-MEDIA-SEQUENCE",0),ge=G0(fe,I),Xe=ge.Sb,We=ge.Tb,$e.return({stream:X,type:s,zf:[],O:r,Uc:Ce,mc:xe,Ne:Pe,Me:de,Rd:!1,og:-1,Sb:Xe,Tb:We,jf:D})}})}function G0(e,t){e=e+t.length-1;var n=-1;if(!t.length)return e++,{Sb:e,Tb:n};t=t[t.length-1];var i=t.g;return t.g.length?(n=i.length-1,i[i.length-1].isPreload()||(e++,n=0),{Sb:e,Tb:n}):(e++,t.m&&(n=0),{Sb:e,Tb:n})}function K0(e,t,n,i,r,o,s,u,a,l,c,f){var p=ip(n,t)||Sl(n),h=[];if(a){a=g(a.split(","));for(var m=a.next();!m.done;m=a.next())h.push(m.value)}return a=void 0,m=null,n==pe?a=h.includes("public.accessibility.transcribes-spoken-dialog")&&h.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":h.includes("public.accessibility.describes-video")&&(m="visually impaired"),h.length||a!=="subtitle"||h.push("subtitle"),e={id:e.G++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:t,kind:n==pe?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ke(i||"und"),originalLanguage:i,label:o,type:n,primary:r,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:h,forced:l,channelsCount:s,audioSamplingRate:c,spatialAudio:f,closedCaptions:u,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},No(e),e}function X0(e,t,n,i,r){var o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j,O,B;return k(function(V){switch(V.g){case 1:if(o=new Map,!e.g.ignoreDrmInfo&&t.segments){for(s=g(t.segments),u=s.next();!u.done;u=s.next())if(a=u.value,l=wn(a.aa,"EXT-X-KEY"),c=null,l.length)for(c=q0(e,t,a.aa,i,r),f=g(l),p=f.next();!p.done;p=f.next())h=p.value,o.set(h,c)}y=m=!1,v=[],x=new Set,S=g(o),w=S.next();case 2:if(w.done){V.u(4);break}if(A=w.value,D=g(A),E=D.next().value,I=D.next().value,C=E,R=I,N=_e(C,"METHOD"),N=="NONE"){V.u(3);break}if(m=!0,L=$(C,"KEYFORMAT")||"identity",P=null,Al(N)){y=!0,V.u(3);break}if(L=="identity")return T(V,t1(e,C,n,i,R,r),11);if(b=e.$b.get(L),!b){U=null,V.u(9);break}return T(V,b(C,n,R),10);case 10:U=V.h;case 9:P=U,V.u(6);break;case 11:P=V.h;case 6:if(P){if(P.keyIds)for(j=g(P.keyIds),O=j.next();!O.done;O=j.next())B=O.value,x.add(B);v.push(P)}case 3:w=S.next(),V.u(2);break;case 4:return V.return({drmInfos:v,keyIds:x,encrypted:m,Hh:y})}})}function W0(e,t,n,i,r){if(!F.crypto||!F.crypto.subtle)throw Ae("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var o=0,s=$(t,"IV","");if(s){var u=rr(s.substr(2));if(u.byteLength!=16)throw new M(2,4,4048)}else o=Lo(n.aa,"EXT-X-MEDIA-SEQUENCE",0);var a=qi(i(),_e(t,"URI"),r),l=a.sort().join("");if(n=t.toString()+"-"+o+"-"+l,!e.na.has(n)){var c={bitsKey:128,blockCipherMode:"CBC",iv:u,firstMediaSequenceNumber:o};switch(_e(t,"METHOD")){case"AES-256":c.bitsKey=256;break;case"AES-256-CTR":c.bitsKey=256,c.blockCipherMode="CTR"}c.fetchKey=function(){var f,p,h,m;return k(function(y){if(y.g==1)return e.M.has(l)||(f=lt(a,e.g.retryParameters),p=Mi(e,f,6).promise,e.M.set(l,p)),T(y,e.M.get(l),2);if(y.g!=3){if(h=y.h,!h.data||h.data.byteLength!=c.bitsKey/8)throw new M(2,4,4049);return m={name:c.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:c.bitsKey},T(y,F.crypto.subtle.importKey("raw",h.data,m,!0,["decrypt"]),3)}c.cryptoKey=y.h,c.fetchKey=void 0,K(y)})},e.na.set(n,c)}return e.na.get(n)}function z0(e,t){e.s==null&&(t=Tt(t.aa,"EXT-X-START"))&&(e.s=Number(_e(t,"TIME-OFFSET")))}function CI(e,t){var n=Tt(t.aa,"EXT-X-PLAYLIST-TYPE");t=Tt(t.aa,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?wl(e,El):n?wl(e,Il):wl(e,r1)}function tp(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var o=Tt(i[r].aa,"EXTINF");if(o){n=Number(o.value.split(",")[0]);break}r--}if(i=Tt(t.aa,"EXT-X-TARGETDURATION"),!i)throw new M(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=Tt(t.aa,"EXT-X-PART-INF"))&&(e.P=Number(_e(r,"PART-TARGET"))),t=Tt(t.aa,"EXT-X-SERVER-CONTROL"),e.ka&&e.P?(e.o=e.bc?5*e.P<=n?Math.min(e.P,e.o):Math.min(n,e.o):Math.min(e.P,e.o),e.Oa=t?Number(_e(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),n=t?Po(t,"HOLD-BACK"):null,e.Ka=n?Number(n.value):0),e.Pa=Math.max(i,e.Pa)}function Y0(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Oa)n=e.Oa;else if(e.Ka)n=e.Ka;else for(var i=t.segments.length,r=i-Math.min(i,e.g.hls.liveSegmentsDelay);r<i;r++){var o=Tt(t.segments[r].aa,"EXTINF");n=o?n+Number(o.value.split(",")[0]):n+e.Pa}e.s&&0>e.s&&(n=Math.min(-e.s,n),e.s+=n),e.l.Li(0),e.l.lh(n),e.l.Zc(!1)}function q0(e,t,n,i,r){var o=Tt(n,"EXT-X-MAP");if(!o)return null;var s=_e(o,"URI"),u=qi(i(),s,r);if(s=[u.toString(),$(o,"BYTERANGE","")].join("-"),!e.ya.has(s)){var a=void 0,l=null,c=!1;n=g(n);for(var f=n.next();!f.done;f=n.next())f=f.value,f.name=="EXT-X-KEY"?(c=_e(f,"METHOD"),Al(c)&&f.id<o.id?(c=!1,a=W0(e,f,t,i,r)):c=c!="NONE"):f.name=="EXT-X-BYTERANGE"&&f.id<o.id&&(l=f);t=MI(u,o,l,a,c),e.ya.set(s,t)}return e.ya.get(s)}function MI(e,t,n,i,r){var o=0,s=null;return t=$(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(o=t.split("@"),s=Number(o[0]),o=Number(o[1]),s=o+s-1,i&&(n=s+1-o,n%16&&(s+=16-n%16))),new Xt(function(){return e},o,s,null,null,null,i,r)}function kI(e,t,n,i,r,o,s,u,a){function l(V){V=new nt(V).ob.split(".").pop();var q=sp.get(s).get(V);return q||(q=op.get(V)),q}var c=i.aa,f=Tt(c,"EXTINF"),p=0,h=0,m=null;i.rc.length&&(e.m.isLowLatency=!0);var y=null;if(!e.g.hls.ignoreManifestProgramDateTime){var v=Tt(c,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(y=li(v.value),e.Za=!0)}var x=vi;if(Tt(c,"EXT-X-GAP")&&(e.m.gapCount++,x=2),!f){if(i.rc.length==0)throw new M(2,4,4024,"EXTINF");if(!e.ka)return null}var S=[];v=!1;var w=null,A=!1,D=!1;if(e.ka&&i.rc.length){p=t&&F.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var E=y,I={},C=0;C<i.rc.length;I={Of:void 0,uf:void 0},C++){var R=i.rc[C],N=C==0?n:S[S.length-1],L=C==0?r:N.endTime,P=Number($(R,"DURATION"))||e.P;if(P){var b=L+P,U=0,j=null;if(R.name=="EXT-X-PRELOAD-HINT"?(U=(U=$(R,"BYTERANGE-START"))?Number(U):0,(N=$(R,"BYTERANGE-LENGTH"))?j=U+Number(N)-1:U&&(j=Number.MAX_SAFE_INTEGER)):(U=$(R,"BYTERANGE"),j=g($0(N,U)),U=j.next().value,j=j.next().value),I.uf=$(R,"URI"),I.uf){N=vi,$(R,"GAP")=="YES"&&(e.m.gapCount++,N=2,A=!0),I.Of=null;var O=function(V){return function(){return V.Of==null&&(V.Of=qi(u(),V.uf,o)),V.Of}}(I);p&&0<=U&&j!=null&&(w=O,v=!0),L=new Z(L,b,O,U,j,t,0,0,1/0,[],"",null,E,N,a),R.name=="EXT-X-PRELOAD-HINT"&&(L.Pg(),D=!0),$(R,"INDEPENDENT")!="YES"&&0<C&&L.qd(),(I=l(I.uf))&&(L.mimeType=I,i1.has(I)&&(L.Y=null)),S.push(L),E&&(E+=P)}}}}if(f){if(f=Number(f.value.split(",")[0]),f==0)return null;p=r+f}else if(S.length)p=S[S.length-1].endTime;else return null;v&&(A||S[0].startByte!=0?(v=!1,w=null):S=[]),(f=Tt(c,"EXT-X-BYTERANGE"))?(m=g($0(n,f.value)),h=m.next().value,m=m.next().value):S.length&&(h=S[0].startByte,m=S[S.length-1].endByte),n="",f=null,s=="image"&&(n="1x1",c=Tt(c,"EXT-X-TILES"))&&(n=_e(c,"LAYOUT"),(c=$(c,"DURATION"))&&(f=Number(c)));var B=null;return t=new Z(r,p,function(){return w?w():(B==null&&(B=qi(u(),i.g,o)),B||[])},h,m,t,0,0,1/0,S,n,f,y,x,a,0<S.length&&!!i.g),(r=l(i.g))&&(t.mimeType=r,i1.has(r)&&(t.Y=null)),v&&(e.bc=!0,t.ii(),D&&t.Pg()),t}function $0(e,t){var n=0,i=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.endByte+1,i=n+t-1),[n,i]}function np(e,t,n,i,r){if(n=="video"||n=="audio"){var o=e.l.m;if(o&&!tu(e,n))for(t=wn(t,"EXT-X-DATERANGE"),t=t.filter(function(N){return Po(N,"START-DATE")!=null}).sort(function(N,L){return N=_e(N,"START-DATE"),L=_e(L,"START-DATE"),N<L?-1:N>L?1:0}),n=0;n<t.length;n++){var s=t[n];try{var u=_e(s,"START-DATE"),a=li(u);if(!isNaN(a)){var l=Math.max(0,a-o),c=null,f=$(s,"END-DATE");if(f){var p=li(f);if(!isNaN(p)&&(c=p-o,0>c))continue}if(c==null){var h=$(s,"DURATION")||$(s,"PLANNED-DURATION");if(h){var m=parseFloat(h);if(isNaN(m)||(c=l+m),0>a-o+m)continue}}var y=$(s,"CLASS")||"com.apple.quicktime.HLS",v=$(s,"END-ON-NEXT")=="YES";if(c==null&&v){for(var x=n+1;x<t.length;x++){var S=$(t[x],"CLASS")||"com.apple.quicktime.HLS";if(y==S){var w=_e(t[x],"START-DATE"),A=li(w);if(!isNaN(A)&&A&&A>a){c=Math.max(0,A-o);break}}}if(c==null)continue}x=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var D=[],E=g(s.attributes),I=E.next();!I.done;I=E.next()){var C=I.value;if(!x.includes(C.name)){var R=R0(C.value,i);(C.name=="X-ASSET-URI"||C.name=="X-ASSET-LIST")&&(R=qi(r(),C.value,i)[0]),D.push({key:C.name,description:"",data:R,mimeType:null,pictureType:null})}}1<D.length&&e.h.onMetadata(y,l,c,D)}}catch{}}}}function Q0(e,t,n,i,r,o){var s=t.segments,u=void 0,a=Lo(t.aa,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=Lo(t.aa,"EXT-X-MEDIA-SEQUENCE",0),c=Tt(t.aa,"EXT-X-SKIP"),f=c?Number($(c,"SKIPPED-SEGMENTS")):0,p=l+f,h=0;jt(e)&&n.has(p)&&(h=n.get(p)),h===0&&e.za==Il&&0<n.size&&!n.has(p)&&e.l.i!=null&&(h=e.l.Gb());var m=[],y=null;c=[];for(var v=0;v<s.length;v++){var x=s[v],S=v==0?h:y.endTime;p=l+f+v,Tt(x.aa,"EXT-X-DISCONTINUITY")&&(a++,y&&y.Y&&(y.Y.g=S));for(var w=g(x.aa),A=w.next();!A.done;A=w.next())A=A.value,A.name=="EXT-X-KEY"&&(Al(_e(A,"METHOD"))?u=W0(e,A,t,r,i):u=void 0);n.set(p,S),w=q0(e,t,x.aa,r,i),(S=kI(e,w,y,x,S,i,o,r,u))&&((y=Lo(x.aa,"EXT-X-BITRATE"))?c.push({bitrate:y,duration:S.endTime-S.startTime}):c.length&&(y=c.pop(),y.duration+=S.endTime-S.startTime,c.push(y)),y=S,S.i=a,tu(e,o)&&e.L!=null&&p<e.L||m.push(S))}if(t=void 0,c.length&&(t=c.reduce(function(D,E){return D+E.duration},0),t=Math.round(c.reduce(function(D,E){return D+E.bitrate*E.duration},0)/t*1e3)),c=m.some(function(D){return D.h!=null})){for(n={},i=0;i<m.length;n={Se:void 0,Re:void 0,Je:void 0,Wc:void 0,Ie:void 0},i++)if(n.Wc=m[i],n.Wc.h==null)for(n.Re=0,n.Se=i,r=function(D){return function(){var E=m[D.Se];if(E){if(E.h!=null)return E.h+D.Re;D.Re-=E.endTime-E.startTime,D.Se+=1}return null}}(n),n.Ie=0,n.Je=i,s=function(D){return function(){var E=m[D.Je];if(E){if(E!=D.Wc&&(D.Ie+=E.endTime-E.startTime),E.h!=null)return E.h+D.Ie;--D.Je}return null}}(n);n.Wc.h==null;)n.Wc.h=s(),n.Wc.h==null&&(n.Wc.h=r())}if(c)for(n=g(m),i=n.next();!i.done;i=n.next())for(r=i.value,i=r.h,r=g(r.g),s=r.next();!s.done;s=r.next())s=s.value,s.h=i,i+=s.endTime-s.startTime;if(n=e.ha,c&&n!=1/0&&!tu(e,o))for(e=g(m),o=e.next();!o.done;o=e.next())o.value.vh(n);return{segments:m,bandwidth:t}}function ip(e,t){if(e==pe){if(t=="vtt"||t=="wvtt")return"text/vtt";if(t&&t!=="")return"application/mp4"}return e!="image"||t&&t!="jpeg"?e=="audio"&&t=="mp4a.40.34"?"audio/mpeg":t=="mjpg"?"application/mp4":null:"image/jpeg"}function Sl(e){return e==pe?"text/vtt":sp.get(e).get("mp4")}function J0(e,t){e=jt(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.Cc()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function DI(e,t,n,i){var r,o,s,u,a,l,c,f,p,h,m,y,v;return k(function(x){switch(x.g){case 1:return r=jn,o=J0(e,i),s=o.segment,s.status==2?x.return(Sl(t)):(u=s.O(),a=new nt(u[0]),l=a.ob.split(".").pop(),c=sp.get(t),(f=c.get(l))||(f=op.get(l))||(f=ip(t,n))?x.return(f):(h=1,m=lt(u,e.g.retryParameters),ue(x,2),m.method="HEAD",T(x,Mi(e,m,r,{type:h}).promise,4)));case 4:y=x.h,p=y.headers["content-type"],ce(x,3);break;case 2:if(v=ae(x),!v||v.code!=1002&&v.code!=1001){x.u(3);break}return m.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(m.headers.Range="bytes=0-0"),T(x,Mi(e,m,r,{type:h}).promise,6);case 6:y=x.h,p=y.headers["content-type"];case 3:if(!p){x.u(7);break}if(f=p.toLowerCase().split(";")[0],f!="application/octet-stream"){x.u(8);break}if(y.data.byteLength){x.u(9);break}return m.method="GET",T(x,Mi(e,m,r,{type:h}).promise,10);case 10:y=x.h;case 9:oo(se(y.data))&&(f="video/mp2t");case 8:if(f!="application/octet-stream")return x.return(f);case 7:return x.return(Sl(t))}})}function Z0(e,t,n,i,r,o,s){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0,e.videoLayout=o||void 0,e.colorGamut=s||void 0)}function rp(e,t,n){return Mi(e,lt(t,e.g.retryParameters),0,{type:n?2:3})}function e1(e){var t,n,i,r,o,s;return k(function(u){switch(u.g){case 1:return e.h?(ue(u,2),t=Date.now(),T(u,e.update(),4)):u.return();case 4:n=Date.now(),jt(e)&&(i=(n-t)/1e3,e.eb.sample(1,i),r=0<e.g.updatePeriod?e.g.updatePeriod:e.o,o=Math.max(0,r-vu(e.eb)),e.C.ia(o)),ce(u,3);break;case 2:if(s=ae(u),!e.h)return u.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(s),u.return();s.severity=1,e.h.onError(s),e.C.ia(.1);case 3:if(!e.h)return u.return();e.h.onManifestUpdated(),K(u)}})}function jt(e){return e.za!=El}function wl(e,t){e.za=t,e.l&&e.l.Zc(!jt(e)),jt(e)||e.C.stop()}function Mi(e,t,n,i){if(!e.W)throw new M(2,7,7001);return i||(i={}),i.isPreload=e.Zb(),t=e.h.networkingEngine.request(n,t,i),mr(e.W,t),t}function Al(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"}function RI(e,t,n,i){var r,o,s,u,a,l;return k(function(c){if(c.g==1){if(n=="video/mp2t")throw new M(2,4,4040);if(F.shakaMediaKeysPolyfill==="apple")throw new M(2,4,4041);if(r=_e(t,"METHOD"),o=["SAMPLE-AES","SAMPLE-AES-CTR"],!o.includes(r))return c.return(null);s="cenc",r=="SAMPLE-AES"&&(s="cbcs"),u=_e(t,"URI"),a=ui("com.apple.fps",s,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],u);var f=new nt(u).Cb.replace(/-/g,"").toLowerCase();return(l=f.length===32&&/^[0-9a-f]+$/.test(f)?f:null)||!i?c.u(2):T(c,n1(e,i),3)}return c.g!=2&&(l=c.h),l&&a.keyIds.add(l),c.return(a)})}function t1(e,t,n,i,r,o){var s,u,a,l,c,f,p,h,m,y,v,x;return k(function(S){switch(S.g){case 1:if(n=="video/mp2t")throw new M(2,4,4040);if(F.shakaMediaKeysPolyfill==="apple")throw new M(2,4,4041);if(s=_e(t,"METHOD"),u=["SAMPLE-AES","SAMPLE-AES-CTR"],!u.includes(s))return S.return(null);if(a=qi(i(),_e(t,"URI"),o),a[0].startsWith("data:text/plain;base64,")){l=si(mn(a[0].split("data:text/plain;base64,").pop())),S.u(2);break}return c=a.sort().join(""),e.va.has(c)||(f=lt(a,e.g.retryParameters),p=Mi(e,f,6).promise,e.va.set(c,p)),T(S,e.va.get(c),3);case 3:h=S.h,l=si(h.data);case 2:if(m="00000000000000000000000000000000",!r){S.u(4);break}return T(S,n1(e,r),5);case 5:(y=S.h)&&(m=y);case 4:return v=new Map,v.set(m,l),x="cenc",s=="SAMPLE-AES"&&(x="cbcs"),S.return(yh(v,x))}})}function n1(e,t){var n,i,r,o;return k(function(s){return s.g==1?(n=null,e.wa.has(t)?(n=e.wa.get(t),s.u(2)):(i=Is(t.O(),t.Bc(),t.zc(),e.g.retryParameters),r=jn,T(s,Mi(e,i,r,{type:0}).promise,3))):(s.g!=2&&(o=s.h,t.ge(o.data),n=Dw(o.data),e.wa.set(t,n)),s.return(n))})}W("shaka.hls.HlsParser",Tl);var op=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),PI=new Map().set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),LI=new Map().set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),NI=new Map().set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),jI=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),sp=new Map().set("audio",PI).set("video",LI).set("text",NI).set("image",jI),i1=new Set(["video/mp2t"].concat(H(Ui))),El="VOD",r1="EVENT",Il="LIVE",UI={cj:El,Bl:r1,Ll:Il};vr("application/x-mpegurl",function(){return new Tl}),vr("application/vnd.apple.mpegurl",function(){return new Tl});function Cl(e){return al(e)}var OI=new Map().set("com.microsoft.playready",Cl).set("com.microsoft.playready.recommendation",Cl).set("com.microsoft.playready.software",Cl).set("com.microsoft.playready.hardware",Cl);function up(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.s=1,this.i=null,this.C=new Nr(5),this.o=new Te(function(){_I(e)}),this.B=new qr,this.m=new Map,this.A=function(){return!1}}d=up.prototype,d.configure=function(e,t){this.g=e,t&&(this.A=t)},d.start=function(e,t){var n=this;return k(function(i){if(i.g==1)return n.l=[e],n.h=t,T(i,ap(n),2);if(!n.h)throw new M(2,7,7001);return i.return(n.j)})};function _I(e){var t;k(function(n){switch(n.g){case 1:return ue(n,2),T(n,ap(e),4);case 4:ce(n,3);break;case 2:t=ae(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();K(n)}})}d.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,this.o!=null&&(this.o.stop(),this.o=null),this.m.clear(),this.B.destroy()},d.update=function(){var e=this,t;return k(function(n){if(n.g==1)return ue(n,2),T(n,ap(e),4);if(n.g!=2)return ce(n,0);if(t=ae(n),!e.h||!t)return n.return();e.h.onError(t),K(n)})},d.onExpirationUpdated=function(){},d.onInitialVariantChosen=function(){},d.banLocation=function(){},d.setMediaElement=function(){};function ap(e){var t,n,i,r,o,s,u;return k(function(a){if(a.g==1)return t=lt(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.A()}),mr(e.B,r),T(a,r.promise,2);if(o=a.h,!e.h)return a.return();o.uri&&!e.l.includes(o.uri)&&e.l.unshift(o.uri);var l=o.uri,c=o.data,f=e.g.mss.manifestPreprocessor;if(f!=ka){if(Ee("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),c=u0(c,"SmoothStreamingMedia"),!c)throw new M(2,4,4046,l);f(c),c=Dn(c.outerHTML)}var p=qo(c,"SmoothStreamingMedia");if(!p)throw new M(2,4,4046,l);if(l=e.g.mss.manifestPreprocessorTXml,l!=Da&&l(p),e.i||(e.i=new re(null,0)),l=oe(p,"IsLive",ku,!1))throw new M(2,4,4047);e.i.Zc(!l),f=oe(p,"TimeScale",wt,1e7),c=oe(p,"DVRWindowLength",wt),l&&(c===0||isNaN(c))&&(c=1/0);var h=oe(p,"CanSeek",ku,!1);c===0&&h&&(c=1/0),h=null,c&&0<c&&(h=c/f),l&&!isNaN(e.g.availabilityWindowOverride)&&(h=e.g.availabilityWindowOverride),h==null&&(h=1/0),e.i.Gf(h),c=oe(p,"Duration",wt,1/0),l||e.i.pb(c/f),l={variants:[],textStreams:[],timescale:f,duration:c/f};var m;for(h=Ne(p,"Protection"),f=e.g.mss.keySystemsBySystemId,c=[],h=g(h),m=h.next();!m.done;m=h.next())c=c.concat(Ne(m.value,"ProtectionHeader"));if(c.length){for(h=[],m=0;m<c.length;m++){var y=c[m],v=y.attributes.SystemID.toLowerCase(),x=f[v];if(x){var S;e:{if(S=_y(y)){S=g(Vn(S,"DATA"));for(var w=S.next();!w.done;w=S.next())if(w=Ye(w.value,"KID")){S=mn(ot(w)),S=new Uint8Array([S[3],S[2],S[1],S[0],S[5],S[4],S[7],S[6]].concat(H(S.slice(8)))),S=si(S);break e}}S=null}w=mn(ot(y)),v=rr(v.replace(/-/g,"")),v=[{initData:Ju(w,v,new Set,0),initDataType:"cenc",keyId:S}],v=ui(x,"cenc",v),S&&v.keyIds.add(S),(x=OI.get(x))&&(v.licenseServerUri=x(y)),h.push(v)}}f=h}else f=[];for(m=f,h=[],f=[],c=[],p=Ne(p,"StreamIndex"),p=g(p),y=p.next();!y.done;y=p.next()){y=y.value,x=Ne(y,"QualityLevel"),v=l.timescale,S=l.duration,w=Ne(y,"c");for(var A=[],D=0,E=0;E<w.length;++E){var I=w[E],C=w[E+1],R=oe(I,"t",wt),N=oe(I,"d",wt);if(I=oe(I,"r",yt),!N)break;if(R=R??D,(I=I||0)&&I--,0>I)if(C){if(C=oe(C,"t",wt),C==null)break;if(R>=C)break;I=Math.ceil((C-R)/N)-1}else{if(S==1/0)break;if(R/v>=S)break;I=Math.ceil((S*v-R)/N)-1}for(C=0;C<=I;++C)D=R+N,A.push({start:R/v,end:D/v,Bh:R}),R=D}for(v=A,x=g(x),S=x.next();!S.done;S=x.next())(S=bI(e,y,S.value,v,m,l))&&(S.type!="audio"||e.g.disableAudio?S.type!="video"||e.g.disableVideo?S.type!=pe||e.g.disableText||c.push(S):f.push(S):h.push(S))}for(p=[],h=g(0<h.length?h:[null]),m=h.next();!m.done;m=h.next())for(m=m.value,y=g(0<f.length?f:[null]),A=y.next();!A.done;A=y.next())x=p,v=x.push,S=e,w=m,A=A.value,E=0,w&&w.bandwidth&&0<w.bandwidth&&(E+=w.bandwidth),A&&A.bandwidth&&0<A.bandwidth&&(E+=A.bandwidth),S={id:S.s++,language:w?w.language:"und",disabledUntilTime:0,primary:!!w&&w.primary||!!A&&A.primary,audio:w,video:A,bandwidth:E,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},v.call(x,S);l.variants=p,l.textStreams=c,e.j?(e.j.variants=l.variants,e.j.textStreams=l.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.hf()),Promise.resolve(),s=Date.now(),u=(s-i)/1e3,e.C.sample(1,u),K(a)})}function bI(e,t,n,i,r,o){var s=t.attributes.Type;if(s!=="audio"&&s!=="video"&&s!=="text")return Ae("Ignoring unrecognized type:",s),null;var u=t.attributes.Language,a=e.s++,l=oe(n,"Bitrate",ci),c=oe(n,"MaxWidth",ci),f=oe(n,"MaxHeight",ci),p=oe(n,"Channels",ci),h=oe(n,"SamplingRate",ci),m=o.duration;i.length&&(m=i[i.length-1].end-i[0].start);var y=e.i.getDuration();e.i.pb(Math.min(m,y));var v={id:a,originalId:t.attributes.Name||String(a),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:c||void 0,height:f||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:ke(u||"und"),originalLanguage:u,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:h,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:m,timescale:o.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((r=t.attributes.Subtype)&&((r=KI.get(r))&&v.roles.push(r),r==="main"&&(v.primary=!0)),r=n.attributes.FourCC,(r===null||r==="")&&(r=t.attributes.FourCC),!r){if(s==="audio")r="AAC";else if(s==="video")return Ae('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!GI.includes(r.toUpperCase()))return Ae("Codec not supported:",r),null;switch(n=FI(n,s,r,v),v.mssPrivateData.codecPrivateData=n,s){case"audio":if(!n)return Ae("Quality unsupported without CodecPrivateData",s),null;v.type="audio",v.mimeType="mss/audio/mp4",v.codecs=BI(r,n);break;case"video":if(!n)return Ae("Quality unsupported without CodecPrivateData",s),null;v.type="video",v.mimeType="mss/video/mp4",v.codecs=VI(n);break;case"text":v.type=pe,v.mimeType="application/mp4",(r==="TTML"||r==="DFXP")&&(v.codecs="stpp")}return v.fullMimeTypes.add(rt(v.mimeType,v.codecs)),v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(e.m.has(v.id))var x=e.m.get(v.id);else x=[],v.type=="video"&&(x=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),x={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,Ab:x,Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:null,stream:v},x=to(new yr([x])),e.m.set(v.id,x);return x=HI(e,new Xt(function(){return[]},0,null,ma(v),v.mssPrivateData.timescale,x,null,v.encrypted),v,t,i),v.segmentIndex=new Ie(x),Promise.resolve()},v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)},v}function FI(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if(t!=="audio")return null;t=i.channelsCount||2,e=i.audioSamplingRate||44100;var r={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return i=r[e],n==="AACH"?(n=new Uint8Array(4),e=r[2*e],n[0]=40|i>>1,n[1]=i<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|i>>1,n[1]=i<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}function BI(e,t){var n=0;return e==="AACH"&&(n=5),t?n===0&&(n=(parseInt(t.substr(0,2),16)&248)>>3):(n=2,e==="AACH"&&(n=5)),"mp4a.40."+n}function VI(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}function HI(e,t,n,i,r){var o=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[],r=g(r);for(var s=r.next(),u={};!s.done;u={Jf:void 0},s=r.next())u.Jf=s.value,i.push(new Z(u.Jf.start,u.Jf.end,function(a){return function(){return ht(e.l,[o.replace("{start time}",String(a.Jf.Bh))])}}(u),0,null,t,0,0,n.mssPrivateData.duration));return i}W("shaka.mss.MssParser",up);var GI="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),KI=new Map().set("CAPT","main").set("SUBT","alternate").set("DESC","main");vr("application/vnd.ms-sstr+xml",function(){return new up});function o1(e,t,n,i,r,o,s){if(200<=n&&299>=n&&n!=202||n==304)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:o};o=null;try{o=Yn(t)}catch{}throw new M(n==401||n==403?2:1,1,1001,i,n,o,e,s,r||i)}function lp(){}function Ml(e,t,n,i,r,o){var s=new $I;Qr(t.headers).forEach(function(c,f){s.append(f,c)});var u=new YI,a={Lh:!1,Yi:!1};if(e=XI(e,t,n,{body:t.body||void 0,headers:s,method:t.method,signal:u.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},a,i,r,t.streamDataCallback,o.minBytesForProgressEvents||0),e=new it(e,function(){return a.Lh=!0,u.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var l=new Te(function(){a.Yi=!0,u.abort()});l.ia(t/1e3),e.finally(function(){l.stop()})}return e}function XI(e,t,n,i,r,o,s,u,a){var l,c,f,p,h,m,y,v,x,S,w,A,D,E,I;return k(function(C){switch(C.g){case 1:return l=zI,c=qI,p=new ArrayBuffer(0),m=h=0,y={},v=Date.now(),ue(C,2),T(C,l(e,i),4);case 4:if(f=C.h,y=WI(f.headers),s(y),i.method=="HEAD"){C.u(5);break}return S=(x=f.headers.get("Content-Length"))?parseInt(x,10):0,f.body?(w=f.clone().body.getReader(),A=function(R){function N(){var L,P,b,U;return k(function(j){switch(j.g){case 1:return ue(j,2),T(j,w.read(),4);case 4:L=j.h,ce(j,3);break;case 2:return ae(j),j.return();case 3:if(L.done){j.u(5);break}if(h+=L.value.byteLength,!u){j.u(5);break}return T(j,u(L.value),5);case 5:P=Date.now(),b=h-m,(100<P-v&&b>=a||L.done)&&(U=L.done?0:S-h,o(P-v,b,U),m=h,v=P),L.done?R.close():(R.enqueue(L.value),N()),K(j)}})}N()},new c({start:A}),T(C,f.arrayBuffer(),8)):T(C,f.arrayBuffer(),9);case 8:p=C.h,C.u(5);break;case 9:p=C.h,D=Date.now(),o(D-v,p.byteLength,0);case 5:t.headers.Range&&(E=t.headers.Range.replace("bytes=","").split("-").filter(function(R){return R}).map(function(R){return parseInt(R,10)}),E.length==2&&p.byteLength!=E[1]-E[0]+1&&Ae("Payload length does not match range requested bytes",t,f)),ce(C,3);break;case 2:throw I=ae(C),r.Lh?new M(1,1,7001,e,n):r.Yi?new M(1,1,1003,e,n):new M(1,1,1002,e,I,n);case 3:return C.return(o1(y,p,f.status,e,f.url,t,n))}})}function WI(e){var t={};return e.forEach(function(n,i){t[i.trim()]=n}),t}function s1(){if(F.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(F.Response){if(!new Response("").body)return!1}else return!1;return!(!F.fetch||"polyfill"in F.fetch||!F.AbortController)}W("shaka.net.HttpFetchPlugin",lp),lp.isSupported=s1,lp.parse=Ml;var zI=F.fetch,YI=F.AbortController,qI=F.ReadableStream,$I=F.Headers;s1()&&(hi("http",Ml,2,!0),hi("https",Ml,2,!0),hi("blob",Ml,2,!0));function u1(){}function kl(e,t,n,i,r,o){var s=new QI,u=Date.now(),a=0,l=new Promise(function(c,f){s.open(t.method,e,!0),s.responseType="arraybuffer",s.timeout=t.retryParameters.timeout,s.withCredentials=t.allowCrossSiteCredentials;var p={};s.onabort=function(){f(new M(1,1,7001,e,n))},s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.HEADERS_RECEIVED){var m=s.getAllResponseHeaders().trim().split(`\r
|
|
74
|
+
`),y={};m=g(m);for(var v=m.next();!v.done;v=m.next())v=v.value.split(": "),y[v[0].toLowerCase()]=v.slice(1).join(": ");p=y,r(p)}},s.onload=function(m){var y=s.response;try{i(Date.now()-u,m.loaded-a,0);var v=o1(p,y,s.status,e,s.responseURL,t,n);c(v)}catch(x){f(x)}},s.onerror=function(m){f(new M(1,1,1002,e,m,n))},s.ontimeout=function(){f(new M(1,1,1003,e,n))},s.onprogress=function(m){var y=Date.now(),v=o.minBytesForProgressEvents||0,x=m.loaded-a;(100<y-u&&x>=v||m.lengthComputable&&m.loaded==m.total)&&(i(y-u,x,s.readyState==4?0:m.total-m.loaded),a=m.loaded,u=y)};for(var h in t.headers)s.setRequestHeader(h.toLowerCase(),t.headers[h]);s.send(t.body)});return new it(l,function(){return s.abort(),Promise.resolve()})}W("shaka.net.HttpXHRPlugin",u1),u1.parse=kl;var QI=F.XMLHttpRequest;hi("http",kl,1,!0),hi("https",kl,1,!0),hi("blob",kl,1,!0);function a1(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function cp(e){var t=e.Yb(!1);return t?oi(t):e.O().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function JI(e,t){return Is(e.g.O(),e.g.startByte,e.g.endByte,t.streaming.retryParameters)}function l1(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function c1(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}l1.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}};function f1(e){return e.i==0?0:e.j/e.i}function fp(e){var t=this;this.s=e,this.i=new Map,this.h=new $r(function(){return dp(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new l1,this.l=!1}fp.prototype.destroy=function(){return this.h.destroy()};function ZI(e,t,n){e.o=t,e.m=n}function dp(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}fp.prototype.queue=function(e,t,n,i,r){var o=this;Ve(this.h);var s=(this.i.get(e)||Promise.resolve()).then(function(){var u,a,l,c,f,p,h;return k(function(m){if(m.g==1)return T(m,nC(o,t),2);if(u=m.h,o.h.g)throw new M(2,9,7001);if(i)for(c in a=se(u),l=new Vc(a),l.data)f=Number(c),p=l.data[f],h=l.g[f],o.m(p,h);return o.g.close(n,u.byteLength),o.o(f1(o.g),o.g.g),m.return(r(u))})});return this.i.set(e,s),s};function eC(e,t,n,i,r,o){Ve(e.h);var s=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new M(2,9,7001);if(r){var u=se(n);u=new Vc(u);for(var a in u.data){var l=Number(a);e.m(u.data[l],u.g[l])}}return e.g.close(i,n.byteLength),e.o(f1(e.g),e.g.g),o(n)});e.i.set(t,s)}function tC(e){return k(function(t){return t.g==1?T(t,Promise.all(e.i.values()),2):t.return(e.g.g)})}function nC(e,t){var n,i,r,o;return k(function(s){return s.g==1?(n=jn,i=e.s.request(n,t),r=function(){return i.abort()},e.j.push(r),T(s,i.promise,2)):(o=s.h,Rn(e.j,r),s.return(o.data))})}function Dl(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new je,e.onabort=function(i){i.preventDefault(),n.g.reject()},e.onerror=function(i){i.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}Dl.prototype.abort=function(){var e=this;return k(function(t){if(t.g==1){try{e.i.abort()}catch{}return ue(t,2),T(t,e.g,4)}if(t.g!=2)return ce(t,0);ae(t),K(t)})};function pp(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var o;return k(function(s){if(s.g==1)return r.result==null?(n(),s.return()):(o=r.result,T(s,t(o.key,o.value,o),2));o.continue(),K(s)})}})}Dl.prototype.store=function(){return this.h},Dl.prototype.promise=function(){return this.g};function hp(e){this.h=e,this.g=[]}hp.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function Dr(e,t){return Rl(e,t,"readwrite")}function Rl(e,t,n){n=e.h.transaction([t],n);var i=new Dl(n,t);return e.g.push(i),i.promise().then(function(){Rn(e.g,i)},function(){Rn(e.g,i)}),i}function Rr(e,t,n){this.h=new hp(e),this.i=t,this.g=n}d=Rr.prototype,d.destroy=function(){return this.h.destroy()},d.hasFixedKeySpace=function(){return!0},d.addSegments=function(){return d1(this.i)},d.removeSegments=function(e,t){return p1(this,this.i,e,t)},d.getSegments=function(e){var t=this,n;return k(function(i){return i.g==1?T(i,h1(t,t.i,e),2):(n=i.h,i.return(n.map(function(r){return t.Nh(r)})))})},d.addManifests=function(){return d1(this.g)},d.updateManifest=function(){return Promise.reject(new M(2,9,9016,"Cannot modify values in "+this.g))};function iC(e,t,n){e=Dr(e.h,e.g);var i=e.store();return i.get(t).onsuccess=function(){i.put(n,t)},e.promise()}d.updateManifestExpiration=function(e,t){var n=Dr(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(r){(r=r.target.result)&&(r.expiration=t,i.put(r,e))},n.promise()},d.removeManifests=function(e,t){return p1(this,this.g,e,t)},d.getManifests=function(e){var t=this,n;return k(function(i){return i.g==1?T(i,h1(t,t.g,e),2):(n=i.h,i.return(Promise.all(n.map(function(r){return t.Kd(r)}))))})},d.getAllManifests=function(){var e=this,t,n;return k(function(i){return i.g==1?(t=Rl(e.h,e.g,"readonly"),n=new Map,T(i,pp(t,function(r,o){var s;return k(function(u){if(u.g==1)return T(u,e.Kd(o),2);s=u.h,n.set(r,s),K(u)})}),2)):i.g!=3?T(i,t.promise(),3):i.return(n)})},d.Nh=function(e){return e},d.Kd=function(e){return Promise.resolve(e)};function d1(e){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+e))}d.add=function(e,t){var n=this,i,r,o,s,u,a,l;return k(function(c){if(c.g==1){for(i=Dr(n.h,e),r=i.store(),o=[],s=g(t),u=s.next(),a={};!u.done;a={bh:void 0},u=s.next())l=u.value,a.bh=r.add(l),a.bh.onsuccess=function(f){return function(){o.push(f.bh.result)}}(a);return T(c,i.promise(),2)}return c.return(o)})};function p1(e,t,n,i){e=Dr(e.h,t),t=e.store(),n=g(n);for(var r=n.next(),o={};!r.done;o={Og:void 0},r=n.next())o.Og=r.value,t.delete(o.Og).onsuccess=function(s){return function(){return i(s.Og)}}(o);return e.promise()}function h1(e,t,n){var i,r,o,s,u,a,l;return k(function(c){if(c.g==1){for(i=Rl(e.h,t,"readonly"),r=i.store(),o={},s=[],u=g(n),a=u.next(),l={};!a.done;l={Af:void 0,cf:void 0},a=u.next())l.cf=a.value,l.Af=r.get(l.cf),l.Af.onsuccess=function(f){return function(){f.Af.result==null&&s.push(f.cf),o[f.cf]=f.Af.result}}(l);return T(c,i.promise(),2)}if(s.length)throw new M(2,9,9012,"Could not find values for "+s);return c.return(n.map(function(f){return o[f]}))})}function nu(e){this.g=new hp(e)}nu.prototype.destroy=function(){return this.g.destroy()},nu.prototype.getAll=function(){var e=this,t,n;return k(function(i){return i.g==1?(t=Rl(e.g,"session-ids","readonly"),n=[],T(i,pp(t,function(r,o){n.push(o)}),2)):i.g!=3?T(i,t.promise(),3):i.return(n)})},nu.prototype.add=function(e){var t=Dr(this.g,"session-ids"),n=t.store();e=g(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},nu.prototype.remove=function(e){var t=this,n;return k(function(i){return i.g==1?(n=Dr(t.g,"session-ids"),T(i,pp(n,function(r,o,s){e.includes(o.sessionId)&&s.delete()}),2)):T(i,n.promise(),0)})};function Yt(){this.g=new Map}Yt.prototype.destroy=function(){for(var e=[],t=g(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},Yt.prototype.init=function(){var e=this;iu.forEach(function(r,o){(r=r())&&e.g.set(o,r)});for(var t=[],n=g(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)};function g1(e){var t=null;if(e.g.forEach(function(n,i){n.getCells().forEach(function(r,o){r.hasFixedKeySpace()||t||(t={path:{Rb:i,bb:o},bb:r})})}),t)return t;throw new M(2,9,9013,"Could not find a cell that supports add-operations")}function rC(e,t){e.g.forEach(function(n,i){n.getCells().forEach(function(r,o){t({Rb:i,bb:o},r)})})}function Pl(e,t,n){if(e=e.g.get(t),!e)throw new M(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n),!t)throw new M(2,9,9013,"Could not find cell with name "+n);return t}function oC(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function sC(e){var t=Array.from(e.g.keys());if(!t.length)throw new M(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}function uC(e){var t,n,i;return k(function(r){return r.g==1?(t=Array.from(e.g.values()),n=0<t.length,n||(i=iu,i.forEach(function(o){(o=o())&&t.push(o)})),T(r,Promise.all(t.map(function(o){return o.erase()})),2)):n?r.u(0):T(r,Promise.all(t.map(function(o){return o.destroy()})),0)})}function m1(e,t){iu.set(e,t)}W("shaka.offline.StorageMuxer",Yt),Yt.unregister=function(e){iu.delete(e)},Yt.register=m1,Yt.prototype.destroy=Yt.prototype.destroy;var iu=new Map;function ru(){Rr.apply(this,arguments)}et(ru,Rr),ru.prototype.updateManifestExpiration=function(e,t){var n=this,i,r,o;return k(function(s){return i=Dr(n.h,n.g),r=i.store(),o=new je,r.get(e).onsuccess=function(u){(u=u.target.result)?(u.expiration=t,r.put(u),o.resolve()):o.reject(new M(2,9,9012,"Could not find values for "+e))},T(s,Promise.all([i.promise(),o]),0)})},ru.prototype.Kd=function(e){var t,n,i,r,o,s;return k(function(u){if(u.g==1){for(t=[],n=0;n<e.periods.length;++n)i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime,o=aC(e.periods[n],r),t.push(o);return T(u,Jy(t),2)}return s=u.h,u.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration==null?1/0:e.expiration,streams:s,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})};function aC(e,t){cC(e);for(var n=g(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(r){return lC(r,e.startTime,t)})}function lC(e,t,n){var i=e.initSegmentUri?v1(e.initSegmentUri):null,r=t+e.presentationTimeOffset,o=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(s){var u=v1(s.uri);return{startTime:t+s.startTime,endTime:t+s.endTime,dataKey:u,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:o,timestampOffset:r,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}ru.prototype.Nh=function(e){return{data:e.data}};function v1(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new M(2,9,9004,"Could not parse uri "+e)}function cC(e){var t=e.streams.filter(function(u){return u.contentType=="audio"});if(e=e.streams.filter(function(u){return u.contentType=="video"}),!t.every(function(u){return u.variantIds})||!e.every(function(u){return u.variantIds})){for(var n=g(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(n=g(e),i=n.next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=g(e),o=r.next();!o.done;o=r.next())o.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,r=g(t),o=r.next();!o.done;o=r.next())o.value.variantIds.push(i);if(e.length&&t.length)for(t=g(t),i=t.next();!i.done;i=t.next())for(i=i.value,r=g(e),o=r.next();!o.done;o=r.next()){o=o.value;var s=n++;i.variantIds.push(s),o.variantIds.push(s)}}}function Ll(){Rr.apply(this,arguments)}et(Ll,Rr),Ll.prototype.Kd=function(e){var t,n,i,r,o,s;return k(function(u){if(u.g==1){for(t=[],n=0;n<e.periods.length;++n){i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime;for(var a=e.periods[n],l=[],c=g(a.streams),f=c.next();!f.done;f=c.next())f=f.value,f.variantIds.length!=0&&l.push(fC(f,a.startTime,a.startTime+r));o=l,t.push(o)}return T(u,Jy(t),2)}return s=u.h,u.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration==null?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:s,sequenceMode:!1})})};function fC(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function gp(){Rr.apply(this,arguments)}et(gp,Rr),d=gp.prototype,d.hasFixedKeySpace=function(){return!1},d.addSegments=function(e){return this.add(this.i,e)},d.addManifests=function(e){return this.add(this.g,e)},d.updateManifest=function(e,t){return iC(this,e,t)},d.Kd=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function y1(){this.m=this.j=this.i=this.h=this.g=this.l=null}d=y1.prototype,d.init=function(){var e=this,t=new je,n=!1,i=new Te(function(){n=!0,t.reject(new M(2,9,9017))});typeof Nl=="number"&&0<Nl&&i.ia(Nl);var r=F.indexedDB.open("shaka_offline_db",5);return r.onsuccess=function(){if(!n){i.stop();var o=r.result;e.l=o;var s=o.objectStoreNames;s=s.contains("manifest")&&s.contains("segment")?new ru(o,"segment","manifest"):null,e.g=s,s=o.objectStoreNames,s=s.contains("manifest-v2")&&s.contains("segment-v2")?new Ll(o,"segment-v2","manifest-v2"):null,e.h=s,s=o.objectStoreNames,s=s.contains("manifest-v3")&&s.contains("segment-v3")?new Ll(o,"segment-v3","manifest-v3"):null,e.i=s,s=o.objectStoreNames,s=s.contains("manifest-v5")&&s.contains("segment-v5")?new gp(o,"segment-v5","manifest-v5"):null,e.j=s,o=o.objectStoreNames.contains("session-ids")?new nu(o):null,e.m=o,t.resolve()}},r.onupgradeneeded=function(){for(var o=r.result,s=g(["segment-v5","manifest-v5","session-ids"]),u=s.next();!u.done;u=s.next())u=u.value,o.objectStoreNames.contains(u)||o.createObjectStore(u,{autoIncrement:!0})},r.onerror=function(o){n||(i.stop(),t.reject(new M(2,9,9001,r.error)),o.preventDefault())},t},d.destroy=function(){var e=this;return k(function(t){switch(t.g){case 1:if(!e.g){t.u(2);break}return T(t,e.g.destroy(),2);case 2:if(!e.h){t.u(4);break}return T(t,e.h.destroy(),4);case 4:if(!e.i){t.u(6);break}return T(t,e.i.destroy(),6);case 6:if(!e.j){t.u(8);break}return T(t,e.j.destroy(),8);case 8:if(!e.m){t.u(10);break}return T(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),K(t)}})},d.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},d.getEmeSessionCell=function(){return this.m},d.erase=function(){var e=this;return k(function(t){switch(t.g){case 1:if(!e.g){t.u(2);break}return T(t,e.g.destroy(),2);case 2:if(!e.h){t.u(4);break}return T(t,e.h.destroy(),4);case 4:if(!e.i){t.u(6);break}return T(t,e.i.destroy(),6);case 6:if(!e.j){t.u(8);break}return T(t,e.j.destroy(),8);case 8:return e.l&&e.l.close(),T(t,dC(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,T(t,e.init(),0)}})};function dC(){var e=new je,t=F.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new M(2,9,9001,t.error)),n.preventDefault()},e}var Nl=5;W("shaka.offline.indexeddb.StorageMechanismOpenTimeout",Nl),m1("idb",function(){return ye().uh()?new y1:null});function ei(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}ei.prototype.Rb=function(){return this.i},ei.prototype.bb=function(){return this.h},ei.prototype.key=function(){return this.l},ei.prototype.toString=function(){return this.j};function mp(e){if(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e),e==null)return null;var t=e[1];if(t!="manifest"&&t!="segment")return null;var n=e[2];if(!n)return null;var i=e[3];return i&&t!=null?new ei(t,n,i,Number(e[4])):null}function T1(e,t){this.h=e,this.g=t}function x1(e,t){var n=new re(null,0);n.pb(t.duration);var i=t.streams.filter(function(l){return l.type=="audio"}),r=t.streams.filter(function(l){return l.type=="video"});i=pC(e,i,r,n),r=t.streams.filter(function(l){return l.type==pe}).map(function(l){return jl(e,l,n)});var o=t.streams.filter(function(l){return l.type=="image"}).map(function(l){return jl(e,l,n)}),s=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var u=g(i.values()),a=u.next();!a.done;a=u.next())a=a.value,a.audio&&a.audio.encrypted&&(a.audio.drmInfos=s),a.video&&a.video.encrypted&&(a.video.drmInfos=s);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:o,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function pC(e,t,n,i){for(var r=new Set,o=g(t),s=o.next();!s.done;s=o.next()){s=g(s.value.variantIds);for(var u=s.next();!u.done;u=s.next())r.add(u.value)}for(o=g(n),s=o.next();!s.done;s=o.next())for(s=g(s.value.variantIds),u=s.next();!u.done;u=s.next())r.add(u.value);for(o=new Map,r=g(r),s=r.next();!s.done;s=r.next())s=s.value,o.set(s,{id:s,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=g(t),r=t.next();!r.done;r=t.next())for(s=r.value,r=jl(e,s,i),s=g(s.variantIds),u=s.next();!u.done;u=s.next())u=o.get(u.value),u.language=r.language,u.primary=u.primary||r.primary,u.audio=r;for(n=g(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=jl(e,r,i),r=g(r.variantIds),s=r.next();!s.done;s=r.next())s=o.get(s.value),s.primary=s.primary||t.primary,s.video=t;return o}function jl(e,t,n){var i=t.segments.map(function(r){return hC(e,r,t)});return n.$d(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ie(i),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([rt(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}function hC(e,t,n){var i=new ei("segment",e.h,e.g,t.dataKey);return e=new Z(t.startTime,t.endTime,function(){return[i.toString()]},0,null,t.initSegmentKey!=null?gC(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.Hf(t.thumbnailSprite),e}function gC(e,t){var n=new ei("segment",e.h,e.g,t);return new Xt(function(){return[n.toString()]},0,null)}function S1(){this.g=null}d=S1.prototype,d.configure=function(){},d.start=function(e,t){var n=this,i,r,o,s,u,a,l;return k(function(c){switch(c.g){case 1:if(i=mp(e),n.g=i,i==null||i.g!="manifest")throw new M(2,1,9004,e);return r=new Yt,ii(c,2),T(c,r.init(),4);case 4:return T(c,Pl(r,i.Rb(),i.bb()),5);case 5:return o=c.h,T(c,o.getManifests([i.key()]),6);case 6:return s=c.h,u=s[0],a=new T1(i.Rb(),i.bb()),l=x1(a,u),t.makeTextStreamsForClosedCaptions(l),c.return(l);case 2:return on(c),T(c,r.destroy(),7);case 7:sn(c,0)}})},d.stop=function(){return Promise.resolve()},d.update=function(){},d.onExpirationUpdated=function(e,t){var n=this,i,r,o,s,u,a,l;return k(function(c){switch(c.g){case 1:return i=n.g,r=new Yt,ue(c,2,3),T(c,r.init(),5);case 5:return T(c,Pl(r,i.Rb(),i.bb()),6);case 6:return o=c.h,T(c,o.getManifests([i.key()]),7);case 7:if(s=c.h,u=s[0],a=u.sessionIds.includes(e),l=u.expiration==null||u.expiration>t,!a||!l){c.u(3);break}return T(c,o.updateManifestExpiration(i.key(),t),3);case 3:return on(c),T(c,r.destroy(),10);case 10:sn(c,0);break;case 2:ae(c),c.u(3)}})},d.onInitialVariantChosen=function(){},d.banLocation=function(){},d.setMediaElement=function(){},vr("application/x-offline-manifest",function(){return new S1});function w1(){}function A1(e,t){var n=mp(e);return n&&n.g=="manifest"?(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t},e=Yr(e)):e=n&&n.g=="segment"?mC(n.key(),n,t):gr(new M(2,1,9004,e)),e}function mC(e,t,n){var i=new Yt;return Yr(void 0).Va(function(){return i.init()}).Va(function(){return Pl(i,t.Rb(),t.bb())}).Va(function(r){return r.getSegments([t.key()])}).Va(function(r){return{uri:t,data:r[0].data,headers:{},originalRequest:n}}).finally(function(){return i.destroy()})}W("shaka.offline.OfflineScheme",w1),w1.plugin=A1,hi("offline",A1);function E1(e,t,n){var i,r,o,s,u,a;return k(function(l){switch(l.g){case 1:i=[];for(var c=[],f=g(n),p=f.next();!p.done;p=f.next()){p=p.value;for(var h=!1,m=g(c),y=m.next();!y.done;y=m.next())if(y=y.value,yC(y.info,p)){y.sessionIds.push(p.sessionId),h=!0;break}h||c.push({info:p,sessionIds:[p.sessionId]})}r=g(c),o=r.next();case 2:if(o.done){l.u(4);break}return s=o.value,u=vC(e,t,s),T(l,u,5);case 5:a=l.h,i=i.concat(a),o=r.next(),l.u(2);break;case 4:return l.return(i)}})}function vC(e,t,n){var i,r;return k(function(o){switch(o.g){case 1:return i=new Zu({pc:t,onError:function(){},rf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ue(o,2),i.configure(e),T(o,cS(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:ce(o,3);break;case 2:return ae(o),T(o,i.destroy(),5);case 5:return o.return([]);case 3:return r=[],T(o,Promise.all(n.sessionIds.map(function(s){return k(function(u){if(u.g==1)return ue(u,2),T(u,pS(i,s),4);if(u.g!=2)return r.push(s),ce(u,0);ae(u),K(u)})})),6);case 6:return T(o,i.destroy(),7);case 7:return o.return(r)}})}function yC(e,t){function n(i,r){return i.robustness==r.robustness&&i.contentType==r.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&xc(e.audioCapabilities,t.audioCapabilities,n)&&xc(e.videoCapabilities,t.videoCapabilities,n)}function TC(e,t,n){var i=t.presentationTimeline.getDuration();return t=I1(t),{offlineUri:null,originalManifestUri:e,duration:i,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function vp(e,t){var n=x1(new T1(e.Rb(),e.bb()),t),i=t.appMetadata||{};return n=I1(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function I1(e){var t=[],n=Vu(e.variants);n=g(n);for(var i=n.next();!i.done;i=n.next())t.push(pr(i.value));for(e=g(e.textStreams),n=e.next();!n.done;n=e.next())t.push(hr(n.value));return t}function xC(){this.g=new Map}function SC(e,t){var n=t.audio,i=t.video;if(n&&!i&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&i&&e.g.set(i.id,i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,o=i.bandwidth||t.bandwidth-r;0>=o&&(o=t.bandwidth),e.g.set(n.id,r),e.g.set(i.id,o)}}function wC(e,t){e.g.set(t.id,t.bandwidth||2048)}function C1(e,t){return e=e.g.get(t),e==null&&(e=0),e}function xt(e){var t=this;if(e&&e.constructor!=_)throw new M(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Pb()):(this.h=mo(),this.g=new Ge,this.g.configure(this.h.networking)),this.i=[],this.l=[];var n=!e;this.j=new $r(function(){var i,r,o,s,u;return k(function(a){switch(a.g){case 1:return T(a,Promise.all(t.l.map(function(l){return dp(l)})),2);case 2:for(i=function(){},r=[],o=g(t.i),s=o.next();!s.done;s=o.next())u=s.value,r.push(u.then(i,i));return T(a,Promise.all(r),3);case 3:if(!n){a.u(4);break}return T(a,t.g.destroy(),4);case 4:t.h=null,t.g=null,K(a)}})}),this.m=1e9}function yp(){if(Zn(ye()))e:{for(var e=g(iu.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}d=xt.prototype,d.destroy=function(){return this.j.destroy()},d.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=Ea(e,t)),xi(this.h,e)},d.getConfiguration=function(){var e=mo();return xi(e,this.h,mo()),e},d.Pb=function(){return this.g},d.store=function(e,t,n,i,r){var o=this,s=this.getConfiguration(),u=new fp(this.g);return this.l.push(u),t=AC(this,e,t||{},i||[],r||[],function(){var a;return k(function(l){return l.g==1?n?l.u(2):T(l,Er(e,o.g,s.manifest.retryParameters),3):(l.g!=2&&(n=l.h),a=Vg(e,n||null),l.return(a()))})},s,u),t=new it(t,function(){return dp(u)}),t.finally(function(){Rn(o.l,u)}),FC(this,t)};function AC(e,t,n,i,r,o,s,u){var a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j;return k(function(O){switch(O.g){case 1:return Ul(),l=a=null,c=new Yt,h=p=f=null,ue(O,2,3),T(O,o(),5);case 5:return a=O.h,T(O,LC(e,t,a,s),6);case 6:if(m=O.h,an(e),y=!m.presentationTimeline.V()&&!m.presentationTimeline.Tc(),!y)throw new M(2,9,9005,t);v=g(i),x=v.next();case 7:if(x.done){O.u(9);break}return S=x.value,T(O,NC(e,S,m),10);case 10:w=O.h,m.imageStreams.push(w),an(e),x=v.next(),O.u(7);break;case 9:A=g(r),D=A.next();case 11:return D.done?(Ng(s.drm.clearKeys,m.variants),C=m.variants.some(function(B){if(B.audio){for(var V=g(B.audio.drmInfos),q=V.next();!q.done;q=V.next())if(q.value.licenseServerUri.startsWith("data:"))return!0}if(B.video){for(B=g(B.video.drmInfos),V=B.next();!V.done;V=B.next())if(V.value.licenseServerUri.startsWith("data:"))return!0}return!1}),R=s.offline.usePersistentLicense,C&&(R=!1),T(O,e.hd(m,function(B){h=h||B},s,R),15)):(E=D.value,T(O,jC(e,m,E.uri,E.language,E.kind,E.mime,E.codecs),14));case 14:I=O.h,m.textStreams.push(I),an(e),D=A.next(),O.u(11);break;case 15:if(l=O.h,an(e),h)throw h;return T(O,IC(m,l,s,R),16);case 16:return T(O,c.init(),17);case 17:return an(e),T(O,g1(c),18);case 18:return f=O.h,an(e),N=CC(l,m,t,n,s,u,R),L=N.lk,P=N.yh,T(O,f.bb.addManifests([L]),19);case 19:if(b=O.h,an(e),p=b[0],an(e),h)throw h;return T(O,EC(e,P,p,L,u,s,f.bb,m,l,R),20);case 20:return an(e),R1(m,L,l,R),T(O,f.bb.updateManifest(p,L),21);case 21:return an(e),U=new ei("manifest",f.path.Rb,f.path.bb,p),O.return(vp(U,L));case 3:return on(O),T(O,c.destroy(),22);case 22:if(!a){O.u(23);break}return T(O,a.stop(),23);case 23:if(!l){O.u(25);break}return T(O,l.destroy(),25);case 25:sn(O,0);break;case 2:if(j=ae(O),p==null){O.u(27);break}return T(O,M1(p),27);case 27:throw h||j}})}function EC(e,t,n,i,r,o,s,u,a,l){var c,f,p,h,m,y,v,x,S,w,A;return k(function(D){switch(D.g){case 1:if(c={},f=0,p=function(){if(e.j.g||r.l)throw new M(2,9,7001)},h=function(E,I){var C,R,N,L,P,b,U,j,O;return k(function(B){if(B.g==1){for(C=g(E),R=C.next(),N={};!R.done;N={jc:void 0},R=C.next())N.jc=R.value,p(),L=JI(N.jc,o),P=N.jc.i,b=N.jc.h,U=function(V){return function(q){var X,Ce,he,xe;return k(function(ve){switch(ve.g){case 1:if(X=V.jc.g,Ce=X.Yb(!1),!X.aesKey||Ce){ve.u(2);break}return T(ve,Sf(q,X.aesKey,V.jc.j),3);case 3:q=ve.h;case 2:return he=cp(X),T(ve,s.addSegments([{data:q}]),4);case 4:xe=ve.h,p(),c[he]=xe[0],f+=q.byteLength,K(ve)}})}}(N),j=N.jc.g,(O=j.Yb(!1))?eC(r,N.jc.groupId,O,P,b,U):r.queue(N.jc.groupId,L,P,b,U);return T(B,tC(r),2)}return p(),!I||r.l?B.u(0):(R1(u,i,a,l),T(B,s.updateManifest(n,i),0))})},m=!1,ue(D,2),!Tp(u)||!m||D1(u)){D.u(4);break}return T(D,h(t.filter(function(E){return E.h}),!0),5);case 5:return p(),t=t.filter(function(E){return!E.h}),y=c,v=f,c={},f=0,T(D,k1(s,n,i,y,v,function(){return an(e)}),6);case 6:p();case 4:if(m){D.u(7);break}return T(D,h(t,!1),8);case 8:return p(),x=c,S=f,c={},f=0,T(D,k1(s,n,i,x,S,function(){return p()}),9);case 9:p();case 7:ce(D,0);break;case 2:return w=ae(D),A=Object.values(c),T(D,s.removeSegments(A,function(){}),10);case 10:throw w}})}function M1(e){var t,n,i,r;return k(function(o){switch(o.g){case 1:return t=new Yt,T(o,t.init(),2);case 2:return T(o,g1(t),3);case 3:return n=o.h,i=new ei("manifest",n.path.Rb,n.path.bb,e),T(o,t.destroy(),4);case 4:return r=new xt,T(o,r.remove(i.toString()),0)}})}function k1(e,t,n,i,r,o){var s,u,a,l,c,f,p,h,m,y,v;return k(function(x){switch(x.g){case 1:for(s=!1,ue(x,2),u=!0,a=g(n.streams),l=a.next();!l.done;l=a.next())for(c=l.value,f=g(c.segments),p=f.next();!p.done;p=f.next())h=p.value,m=h.pendingSegmentRefId?i[h.pendingSegmentRefId]:null,m!=null&&(h.dataKey=m,h.pendingSegmentRefId=void 0),m=h.pendingInitSegmentRefId?i[h.pendingInitSegmentRefId]:null,m!=null&&(h.initSegmentKey=m,h.pendingInitSegmentRefId=void 0),h.pendingSegmentRefId&&(u=!1),h.pendingInitSegmentRefId&&(u=!1);return n.size+=r,u&&(n.isIncomplete=!1),T(x,e.updateManifest(t,n),4);case 4:s=!0,o(),ce(x,0);break;case 2:return y=ae(x),T(x,M1(t),5);case 5:if(s){x.u(6);break}return v=Object.values(i),T(x,e.removeSegments(v,function(){}),6);case 6:throw y}})}function IC(e,t,n,i){var r,o,s,u,a,l,c,f,p,h,m,y,v,x,S,w,A,D,E,I,C,R,N,L,P,b,U,j,O,B;return k(function(V){switch(V.g){case 1:return r={width:1/0,height:1/0},Xx(e,n.restrictions,r),T(V,qh(t,e,i,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(o=[],s=n.preferredDecodingAttributes,u=n.preferredVideoCodecs,a=n.preferredAudioCodecs,l=n.preferredTextFormats,Yh(e,u,a,s,l),c=g(e.variants),f=c.next();!f.done;f=c.next())p=f.value,o.push(pr(p));for(h=g(e.textStreams),m=h.next();!m.done;m=h.next())y=m.value,o.push(hr(y));for(v=g(e.imageStreams),x=v.next();!x.done;x=v.next())S=x.value,o.push(Uc(S));return T(V,n.offline.trackSelectionCallback(o),3);case 3:for(w=V.h,A=e.presentationTimeline.getDuration(),D=0,E=g(w),I=E.next();!I.done;I=E.next())C=I.value,R=C.bandwidth*A/8,D+=R;return ue(V,4),T(V,n.offline.downloadSizeCallback(D),6);case 6:if(N=V.h,!N)throw new M(2,9,9014);ce(V,5);break;case 4:throw L=ae(V),L instanceof M?L:new M(2,9,9015);case 5:for(P=new Set,b=new Set,U=new Set,j=g(w),O=j.next();!O.done;O=j.next())B=O.value,B.type=="variant"&&P.add(B.id),B.type=="text"&&b.add(B.id),B.type=="image"&&U.add(B.id);e.variants=e.variants.filter(function(q){return P.has(q.id)}),e.textStreams=e.textStreams.filter(function(q){return b.has(q.id)}),e.imageStreams=e.imageStreams.filter(function(q){return U.has(q.id)}),HC(e),K(V)}})}function CC(e,t,n,i,r,o,s){var u=TC(n,t,i),a=r.offline.progressCallback;ZI(o,function(m,y){u.size=y,a(u,m)},function(m,y){l&&s&&c==y&&as(e,"cenc",m)});var l=Tp(t)&&!D1(t),c=null;l&&(c=GC.get(e.g.keySystem));for(var f=new xC,p=g(t.textStreams),h=p.next();!h.done;h=p.next())f.g.set(h.value.id,52);for(p=g(t.imageStreams),h=p.next();!h.done;h=p.next())wC(f,h.value);for(p=g(t.variants),h=p.next();!h.done;h=p.next())SC(f,h.value);return o=OC(o,f,t,r),r=o.streams,o=o.yh,(f=e.g)&&s&&(f.initData=[]),{lk:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Pd(),streams:r,sessionIds:s?Cg(e):[],drmInfo:f,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},yh:o}}function Tp(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function D1(e){return e.variants.some(function(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[]).some(function(n){return n.initData&&n.initData.length})})}function R1(e,t,n,i){if(t.expiration=n.Pd(),n=Cg(n),t.sessionIds=i?n:[],Tp(e)&&i&&!n.length)throw new M(2,9,9007)}d.remove=function(e){return xp(this,MC(this,e))};function MC(e,t){var n,i,r,o,s,u;return k(function(a){switch(a.g){case 1:if(Ul(),n=mp(t),n==null||n.g!="manifest")throw new M(2,9,9004,t);return i=n,r=new Yt,ii(a,2),T(a,r.init(),4);case 4:return T(a,Pl(r,i.Rb(),i.bb()),5);case 5:return o=a.h,T(a,o.getManifests([i.key()]),6);case 6:return s=a.h,u=s[0],T(a,Promise.all([kC(e,u,r),DC(o,i,u)]),2);case 2:return on(a),T(a,r.destroy(),8);case 8:sn(a,0)}})}function P1(e,t){for(var n=[],i=g(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&r.type=="video"?n.push({contentType:rt(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||r.type!="audio"||n.push({contentType:rt(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function kC(e,t,n){return k(function(i){return T(i,VC(e.g,e.h.drm,n,t),0)})}function DC(e,t,n){function i(){}var r=BC(n);return vp(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}d.Ik=function(){return xp(this,RC(this))};function RC(e){var t,n,i,r,o,s,u,a,l,c;return k(function(f){switch(f.g){case 1:return Ul(),t=e.g,n=e.h.drm,i=new Yt,r=!1,ii(f,2),T(f,i.init(),4);case 4:o=[],oC(i,function(p){return o.push(p)}),s=g(o),u=s.next();case 5:if(u.done){f.u(2);break}return a=u.value,T(f,a.getAll(),8);case 8:return l=f.h,T(f,E1(n,t,l),9);case 9:return c=f.h,T(f,a.remove(c),10);case 10:c.length!=l.length&&(r=!0),u=s.next(),f.u(5);break;case 2:return on(f),T(f,i.destroy(),11);case 11:sn(f,3);break;case 3:return f.return(!r)}})}d.list=function(){return xp(this,PC())};function PC(){var e,t,n;return k(function(i){switch(i.g){case 1:return Ul(),e=[],t=new Yt,ii(i,2),T(i,t.init(),4);case 4:return n=Promise.resolve(),rC(t,function(r,o){n=n.then(function(){var s;return k(function(u){if(u.g==1)return T(u,o.getAllManifests(),2);s=u.h,s.forEach(function(a,l){a=vp(new ei("manifest",r.Rb,r.bb,l),a),e.push(a)}),K(u)})})}),T(i,n,2);case 2:return on(i),T(i,t.destroy(),6);case 6:sn(i,3);break;case 3:return i.return(e)}})}function LC(e,t,n,i){var r,o,s,u,a;return k(function(l){if(l.g==1)return r=null,o=e.g,s={networkingEngine:o,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(c){r=c},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return i.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(i.manifest),an(e),T(l,n.start(t,s),2);if(l.g!=3)return u=l.h,an(e),a=N1(u),T(l,Promise.all(Fc(a,function(c){return c.createSegmentIndex()})),3);if(an(e),r)throw r;return l.return(u)})}function NC(e,t,n){var i,r,o,s,u,a,l,c,f,p,h,m,y,v,x;return k(function(S){switch(S.g){case 1:return T(S,L1(e,t),2);case 2:if(i=S.h,i!="text/vtt")throw new M(1,2,2017,t);return T(S,UC(t,e.g,e.h.streaming.retryParameters),3);case 3:if(r=S.h,o=ts(i),!o)throw new M(2,2,2014,i);for(s=o(),u={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},a=se(r),l=s.parseMedia(a,u,t,[]),c=[],f=g(l),p=f.next(),h={};!p.done;h={Pf:void 0,kd:void 0},p=f.next())h.kd=p.value,h.Pf=null,m=function(w){return function(){return w.Pf==null&&(w.Pf=ht([t],[w.kd.payload])),w.Pf||[]}}(h),y=new Z(h.kd.startTime,h.kd.endTime,m,0,null,null,0,0,1/0),h.kd.payload.includes("#xywh")&&(v=h.kd.payload.split("#xywh=")[1].split(","),v.length===4&&y.Hf({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),c.push(y);if(x=i,!c.length){S.u(4);break}return T(S,Er(c[0].O()[0],e.g,e.h.manifest.retryParameters),5);case 5:x=S.h;case 4:return S.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ie(c),mimeType:x||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([rt(x||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}function jC(e,t,n,i,r,o,s){var u,a,l;return k(function(c){if(c.g==1)return o?c.u(2):T(c,L1(e,n),3);if(c.g!=2&&(o=c.h),u={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ha(0,t.presentationTimeline.getDuration(),[n]),mimeType:o||"",codecs:s||"",kind:r,encrypted:!1,drmInfos:[],keyIds:new Set,language:i,originalLanguage:i,label:null,type:pe,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([rt(o||"",s||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},a=rt(u.mimeType,u.codecs),l=ns(a),!l)throw new M(2,2,2014,o);return c.return(u)})}function L1(e,t){var n;return k(function(i){switch(i.g){case 1:return ue(i,2),T(i,Er(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,ce(i,3);break;case 2:ae(i);case 3:if(n)return i.return(n);throw new M(1,2,2011,t)}})}function UC(e,t,n){var i,r,o;return k(function(s){return s.g==1?(i=jn,r=lt([e],n),r.method="GET",T(s,t.request(i,r).promise,2)):(o=s.h,s.return(o.data))})}d.hd=function(e,t,n,i){var r=this,o;return k(function(s){return s.g==1?(o=new Zu({pc:r.g,onError:t,rf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o.configure(n.drm),T(s,lS(o,e.variants,i),2)):s.g!=3?T(s,Ig(o),3):s.return(o)})};function OC(e,t,n,i){var r=new Map,o=N1(n),s=new Map;o=g(o);for(var u=o.next();!u.done;u=o.next()){u=u.value;var a=_C(e,t,n,u,i,r);s.set(u.id,a)}for(e=g(n.variants),t=e.next();!t.done;t=e.next())t=t.value,t.audio&&s.get(t.audio.id).variantIds.push(t.id),t.video&&s.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(s.values()),yh:Array.from(r.values())}}function _C(e,t,n,i,r,o){var s={id:i.id,originalId:i.originalId,groupId:i.groupId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,kind:i.kind,language:i.language,originalLanguage:i.originalLanguage,label:i.label,width:i.width||null,height:i.height||null,encrypted:i.encrypted,keyIds:i.keyIds,segments:[],variantIds:[],roles:i.roles,forced:i.forced,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,closedCaptions:i.closedCaptions,tilesLayout:i.tilesLayout,mssPrivateData:i.mssPrivateData,external:i.external,fastSwitching:i.fastSwitching,isAudioMuxedInVideo:i.isAudioMuxedInVideo},u=r.offline.numberOfParallelDownloads,a=u===0?i.id:0;return bC(i,n.presentationTimeline.Gb(),function(l,c){var f=cp(l),p=void 0;if(!o.has(f)){var h=l.endTime-l.startTime;h=C1(t,i.id)*h,h=c1(e.g,h),o.set(f,new a1(l,h,a,!1,c))}l.Y&&(p=cp(l.Y),o.has(p)||(h=.5*C1(t,i.id),h=c1(e.g,h),o.set(p,new a1(l.Y,h,a,!0,c)))),s.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:f,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite}),u!==0&&(a=(a+1)%u)}),s}function bC(e,t,n){if(t=e.segmentIndex.find(t),t!=null)for(var i=e.segmentIndex.get(t);i;)n(i,t),i=e.segmentIndex.get(++t)}function an(e){if(e.j.g)throw new M(2,9,7001)}function Ul(){if(!yp())throw new M(2,9,9e3)}function xp(e,t){return k(function(n){return n.g==1?(e.i.push(t),ii(n,2),T(n,t,4)):n.g!=2?n.return(n.h):(on(n),Rn(e.i,t),sn(n,0))})}function FC(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){Rn(e.i,n)})}function BC(e){var t=new Set;e=g(e.streams);for(var n=e.next();!n.done;n=e.next()){n=g(n.value.segments);for(var i=n.next();!i.done;i=n.next())i=i.value,i.initSegmentKey!=null&&t.add(i.initSegmentKey),t.add(i.dataKey)}return Array.from(t)}function VC(e,t,n,i){var r,o,s;return k(function(u){return u.g==1?i.drmInfo?(r=sC(n),o=i.sessionIds.map(function(a){return{sessionId:a,keySystem:i.drmInfo.keySystem,licenseUri:i.drmInfo.licenseServerUri,serverCertificate:i.drmInfo.serverCertificate,audioCapabilities:P1(i,!1),videoCapabilities:P1(i,!0)}}),T(u,E1(t,e,o),2)):u.return():u.g!=3?(s=u.h,T(u,r.remove(s),3)):T(u,r.add(o.filter(function(a){return!s.includes(a.sessionId)})),0)})}function N1(e){for(var t=new Set,n=g(e.variants),i=n.next();!i.done;i=n.next())i=i.value,i.audio&&t.add(i.audio),i.video&&t.add(i.video);for(n=g(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(e=g(e.imageStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function HC(e){e.variants.map(function(o){return o.video});var t=new Set(e.variants.map(function(o){return o.audio}));e=e.textStreams;for(var n=g(t),i=n.next();!i.done;i=n.next()){i=g(t);for(var r=i.next();!r.done;r=i.next());}for(t=g(e),n=t.next();!n.done;n=t.next())for(n=g(e),i=n.next();!i.done;i=n.next());}W("shaka.offline.Storage",xt),xt.deleteAll=function(){var e;return k(function(t){return t.g==1?(e=new Yt,ii(t,2),T(t,uC(e),2)):t.g!=5?(on(t),T(t,e.destroy(),5)):sn(t,0)})},xt.prototype.list=xt.prototype.list,xt.prototype.removeEmeSessions=xt.prototype.Ik,xt.prototype.remove=xt.prototype.remove,xt.prototype.store=xt.prototype.store,xt.prototype.getNetworkingEngine=xt.prototype.Pb,xt.prototype.getConfiguration=xt.prototype.getConfiguration,xt.prototype.configure=xt.prototype.configure,xt.prototype.destroy=xt.prototype.destroy,xt.support=yp;var GC=new Map().set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");hv("offline",yp);function Et(){}function Ut(e,t){for(e={priority:t||0,callback:e},t=0;t<ou.length;t++)if(ou[t].priority<e.priority){ou.splice(t,0,e);return}ou.push(e)}W("shaka.polyfill",Et),Et.register=Ut,Et.installAll=function(){for(var e=g(ou),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){Ae("Error installing polyfill!",n)}}};var ou=[];function j1(){}function U1(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=g(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())KC(t.value)}function KC(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(n){n==null||n==null?this.removeAttribute(t):this.setAttribute(t,n)}})}Et.Aria=j1,j1.install=U1,Ut(U1);function Ol(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}Ol.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=g(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=g(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},Ol.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function O1(e){return e.startsWith("com.apple")?"cbcs":e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("org.w3")||e.startsWith("com.huawei")?"cenc":(Ae("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function _1(e){if(!e)return!1;e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function Sp(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&ye().$c())}function b1(){}var su;function F1(){ye().If()&&!su&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(su=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=XC,navigator.emeEncryptionSchemePolyfilled=!0)}function XC(e,t){var n=this,i;return k(function(r){return r.g==1?T(r,su.call(n,e,t),2):(i=r.h,_1(i)?(navigator.requestMediaKeySystemAccess=su,r.return(i)):(navigator.requestMediaKeySystemAccess=B1,r.return(B1.call(n,e,t))))})}function B1(e,t){var n=this,i,r,o,s,u,a,l,c,f,p,h,m;return k(function(y){if(y.g==1){for(i=O1(e),r=[],o=g(t),s=o.next();!s.done;s=o.next())u=s.value,a=V1(u.videoCapabilities,i),l=V1(u.audioCapabilities,i),u.videoCapabilities&&u.videoCapabilities.length&&!a.length||u.audioCapabilities&&u.audioCapabilities.length&&!l.length||(c=Object.assign({},u),c.videoCapabilities=a,c.audioCapabilities=l,r.push(c));if(!r.length)throw f=Error("Unsupported keySystem or supportedConfigurations."),f.name="NotSupportedError",f.code=DOMException.NOT_SUPPORTED_ERR,f;return T(y,su.call(n,e,r),2)}return p=y.h,m=h=null,r[0]&&(r[0].videoCapabilities&&(h=r[0].videoCapabilities[0].encryptionScheme),r[0].audioCapabilities&&(m=r[0].audioCapabilities[0].encryptionScheme)),y.return(new Ol(p,h,m))})}function V1(e,t){return e&&e.filter(function(n){return Sp(n.encryptionScheme,t)})}Et.EmeEncryptionScheme=b1,b1.install=F1,Ut(F1);function H1(){}function G1(){if(F.Document){var e=Element.prototype;e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||e.webkitRequestFullscreen,e=Document.prototype,e.exitFullscreen=e.exitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen||e.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",jo),document.addEventListener("webkitfullscreenerror",jo),document.addEventListener("mozfullscreenchange",jo),document.addEventListener("mozfullscreenerror",jo),document.addEventListener("MSFullscreenChange",jo),document.addEventListener("MSFullscreenError",jo)}}function jo(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}Et.Fullscreen=H1,H1.install=G1,Ut(G1);function K1(){}var uu;function X1(){ye().If()&&!uu&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(uu=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=WC,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}function WC(e){var t=this,n,i;return k(function(r){switch(r.g){case 1:return T(r,uu.call(t,e),2);case 2:if(n=r.h,!n.supported||!e.keySystemConfiguration)return r.return(n);if(i=n.keySystemAccess,_1(i))return navigator.mediaCapabilities.decodingInfo=uu,r.return(n);if(navigator.mediaCapabilities.decodingInfo=W1,i){r.u(3);break}return T(r,z1(e),4);case 4:return n.keySystemAccess=r.h,r.return(n);case 3:return r.return(W1.call(t,e))}})}function W1(e){var t=this,n,i,r,o,s,u,a;return k(function(l){switch(l.g){case 1:return i=n=null,!e.keySystemConfiguration||(r=e.keySystemConfiguration,o=r.keySystem,i=r.audio&&r.audio.encryptionScheme,n=r.video&&r.video.encryptionScheme,s=O1(o),u={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},Sp(i,s)&&Sp(n,s))?T(l,uu.call(t,e),2):l.return(u);case 2:if(a=l.h,a.keySystemAccess){a.keySystemAccess=new Ol(a.keySystemAccess,n,i),l.u(3);break}if(!e.keySystemConfiguration){l.u(3);break}return T(l,z1(e),5);case 5:a.keySystemAccess=l.h;case 3:return l.return(a)}})}function z1(e){var t,n;return k(function(i){if(i.g==1){var r=e.keySystemConfiguration,o=[],s=[];return r.audio&&o.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:r.audio.encryptionScheme}),r.video&&s.push({robustness:r.video.robustness||"",contentType:e.video.contentType,encryptionScheme:r.video.encryptionScheme}),r={initDataTypes:r.initDataType?[r.initDataType]:[],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes},o.length&&(r.audioCapabilities=o),s.length&&(r.videoCapabilities=s),t=r,T(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}Et.MCapEncryptionScheme=K1,K1.install=X1,Ut(X1,-2);function _l(){}function Y1(){ye().dc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),_l.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=zC)}function zC(e){var t,n,i,r,o,s,u,a,l,c,f;return k(function(p){switch(p.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},ye(),n=e.video,i=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(r=n.contentType,o=xr().canPlayType(r)!="",!o)||i&&(s=i.contentType,u=xr().canPlayType(s)!="",!u))return p.return(t)}else return p.return(t);p.u(2);break}if(!Zn())return p.return(t);if(!n){p.u(3);break}return T(p,YC(n),4);case 4:if(a=p.h,!a)return p.return(t);case 3:if(i){var h=ye().La(),m=i.contentType;if(h==="CAST"&&i.spatialRendering&&(m+="; spatialRendering=true"),l=Pt(m),!l)return p.return(t)}case 2:return e.keySystemConfiguration?(c=e.keySystemConfiguration,T(p,qC(n,i,c),6)):(t.supported=!0,p.return(t));case 6:(f=p.h)&&(t.supported=!0,t.keySystemAccess=f);case 5:return p.return(t)}})}function YC(e){var t,n,i;return k(function(r){return r.g==1?(t=ye(),n=t.La(),n!=="CAST"?r.u(2):T(r,$C(e),3)):r.g!=2?(i=r.h,r.return(i)):r.return(Pt(e.contentType))})}function qC(e,t,n){var i,r,o,s,u,a,l,c,f,p,h;return k(function(m){switch(m.g){case 1:if(i=[],r=[],n.audio&&(o={robustness:n.audio.robustness||"",contentType:t.contentType},ye().li()&&t.contentType.includes('codecs="ac-3"')&&(o.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(o.encryptionScheme=n.audio.encryptionScheme),i.push(o)),n.video&&(s={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(s.encryptionScheme=n.video.encryptionScheme),r.push(s)),u={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},i.length&&(u.audioCapabilities=i),r.length&&(u.videoCapabilities=r),a=e?e.contentType:"",l=t?t.contentType:"",c=un(a)+";"+ji(a),f=un(l)+";"+ji(l),p=n.keySystem,h=null,ue(m,2),zr.has(c+"#"+f+"#"+p)){h=zr.get(c+"#"+f+"#"+p)||null,m.u(4);break}return T(m,navigator.requestMediaKeySystemAccess(n.keySystem,[u]),5);case 5:h=m.h,zr.set(c+"#"+f+"#"+p,h);case 4:ce(m,3);break;case 2:ae(m);case 3:return m.return(h)}})}function $C(e){var t,n,i,r,o;return k(function(s){if(s.g==1){if(!(F.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return s.return(Pt(e.contentType));switch(t=e.contentType,e.width&&e.height&&1280<e.width&&720<e.height&&(t+="; width="+e.width+"; height="+e.height),e.framerate&&(n=Math.round(e.framerate),24>n||30<n)&&(t+="; framerate="+e.framerate),i=e.transferFunction||"",i){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return s.return(!1)}return r=!1,o=QC,o.has(t)?(r=o.get(t),s.u(2)):T(s,cast.__platform__.canDisplayType(t),3)}return s.g!=2&&(r=s.h,o.set(t,r)),s.return(r)})}Et.MediaCapabilities=_l,_l.install=Y1,_l.originalMcap=null;var QC=new Map;Ut(Y1,-1);function q1(){}function $1(){var e=ye(),t=e.Da()==="WEBKIT"?e.xa():null;for((F.MediaSource||F.ManagedMediaSource)&&t&&F.MediaSource&&(12>=t?(Q1(),JC()):15>=t&&Q1()),e=g(e.xi()),t=e.next();!t.done;t=e.next())eM(t.value);(F.MediaSource||F.ManagedMediaSource)&&ZC(),F.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&tM()}function Q1(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,pt.apply(0,arguments));return t.abort=function(){},t}}function JC(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function ZC(){if(F.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return ju(n)!="mp2t"&&e(n)}}if(F.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);F.ManagedMediaSource.isTypeSupported=function(n){return ju(n)!="mp2t"&&t(n)}}}function eM(e){var t=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(i){return ji(i)!=e&&t(i)},F.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);F.ManagedMediaSource.isTypeSupported=function(i){return ji(i)!=e&&n(i)}}}function tM(){var e=MediaSource.isTypeSupported;ye().Vi()&&(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex(function(s){return s.startsWith("codecs=")});if(0>i)return e(t);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),o=r.findIndex(function(s){return s.startsWith("vp09")});return 0<=o&&(r[o]="vp9",n[i]='codecs="'+r.join(",")+'"',t=n.join("; ")),e(t)})}Et.MediaSource=q1,q1.install=$1,Ut($1);function J1(){}function Z1(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=null?nM():F.orientation!=null&&iM())}function nM(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()}),screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}function iM(){function e(){switch(F.orientation){case-90:t.type="landscape-secondary",t.angle=270;break;case 0:t.type="portrait-primary",t.angle=0;break;case 90:t.type="landscape-primary",t.angle=90;break;case 180:t.type="portrait-secondary",t.angle=180}}var t=new bl;screen.orientation=t,e(),F.addEventListener("orientationchange",function(){e();var n=new G("change");t.dispatchEvent(n)})}Et.Orientation=J1,J1.install=Z1;function bl(){De.call(this),this.type="",this.angle=0}et(bl,De),bl.prototype.lock=function(e){function t(i){return screen.lockOrientation?screen.lockOrientation(i):screen.mozLockOrientation?screen.mozLockOrientation(i):screen.msLockOrientation?screen.msLockOrientation(i):!1}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():(e=Error("screen.orientation.lock() is not available on this device"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},bl.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},Ut(Z1);function wp(){}var Ap,Ep,Ip,Cp,Mp,kp;function eT(e){F.HTMLVideoElement&&F.WebKitMediaKeys&&F.shakaMediaKeysPolyfill!=Rp&&(e!==void 0&&e&&(Ap=!0,Ep=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Ip=HTMLMediaElement.prototype.setMediaKeys,Cp=F.MediaKeys,Mp=F.MediaKeySystemAccess,kp=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=oM,F.MediaKeys=au,F.MediaKeySystemAccess=Fl,navigator.requestMediaKeySystemAccess=rM,F.shakaMediaKeysPolyfill=Rp,Hu.clear(),zr.clear())}function rM(e,t){try{var n=new Fl(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function oM(e){var t=this.mediaKeys;return t&&t!=e&&tT(t,null),delete this.mediaKeys,(this.mediaKeys=e)?tT(e,this):Promise.resolve()}function sM(e){if(e=se(e.initData),Ht(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Ri(e.subarray(4),!0),e=Dn(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=gn(e),this.dispatchEvent(t)}Et.PatchedMediaKeysApple=wp,wp.uninstall=function(){F.shakaMediaKeysPolyfill==Rp&&Ap&&(Ap=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Ep),HTMLMediaElement.prototype.setMediaKeys=Ip,F.MediaKeys=Cp,F.MediaKeySystemAccess=Mp,navigator.requestMediaKeySystemAccess=kp,Ep=kp=Ip=Mp=Cp=null,F.shakaMediaKeysPolyfill="",Hu.clear(),zr.clear())},wp.install=eT;function Fl(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=g(t),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.persistentState=="required")t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var o=g(n.audioCapabilities),s=o.next();!s.done;s=o.next())s=s.value,s.contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,s.contentType.split(";")[0])&&(t.audioCapabilities.push(s),r=!0));if(n.videoCapabilities)for(n=g(n.videoCapabilities),o=n.next();!o.done;o=n.next())o=o.value,o.contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.videoCapabilities.push(o),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t){this.g=t;return}}throw e=Error("Unsupported keySystem"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Fl.prototype.createMediaKeys=function(){var e=new au(this.keySystem);return Promise.resolve(e)},Fl.prototype.getConfiguration=function(){return this.g};function au(e){this.h=new WebKitMediaKeys(e),this.g=new Me}au.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Dp(this.h)},au.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function tT(e,t){if(e.g.Ra(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",sM);try{return fo(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}au.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Dp(e){De.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new Me,this.sessionId="",this.expiration=NaN,this.closed=new je,this.keyStatuses=new nT}et(Dp,De),d=Dp.prototype,d.generateRequest=function(e,t){var n=this;this.h=new je;try{var i=this.l.createSession("video/mp4",se(t));this.i=i,this.sessionId=i.sessionId||"",this.j.D(this.i,"webkitkeymessage",function(r){n.h&&(n.h.resolve(),n.h=null),r=new Map().set("messageType",n.keyStatuses.Cc()==null?"license-request":"license-renewal").set("message",gn(r.message)),r=new G("message",r),n.dispatchEvent(r)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(Bl(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(i,"webkitkeyerror",function(){var r=Error("EME PatchedMediaKeysApple key error");if(r.errorCode=n.i.error,n.h!=null)n.h.reject(r),n.h=null;else if(n.g!=null)n.g.reject(r),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Bl(n,"output-not-allowed");break;default:Bl(n,"internal-error")}}),Bl(this,"status-pending")}catch(r){this.h.reject(r)}return this.h},d.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},d.update=function(e){this.g=new je;try{this.i.update(se(e))}catch(t){this.g.reject(t)}return this.g},d.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}catch(e){this.closed.reject(e)}return this.closed},d.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Bl(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new G("keystatuseschange"),e.dispatchEvent(t)}function nT(){this.size=0,this.g=void 0}d=nT.prototype,d.Cc=function(){return this.g},d.forEach=function(e){this.g&&e(this.g,Wu.value())},d.get=function(e){if(this.has(e))return this.g},d.has=function(e){var t=Wu.value();return!!(this.g&&ri(e,t))},d.entries=function(){},d.keys=function(){},d.values=function(){};var Rp="apple";Ut(function(){F.HTMLVideoElement&&F.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||eT())});function iT(){}function rT(){if(F.MediaKeys){var e=ye();MediaKeys.prototype.setServerCertificate&&e.je()||(MediaKeys.prototype.setServerCertificate=uM)}}function uM(){return Promise.resolve(!1)}Et.PatchedMediaKeysCert=iT,iT.install=rT,Ut(rT);function oT(){}function sT(){if(!(!F.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Up="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=aM,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=lM,F.MediaKeys=lu,F.MediaKeySystemAccess=Vl,F.shakaMediaKeysPolyfill=cM}}function Pp(e){var t=Up;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function aM(e,t){try{var n=new Vl(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function lM(e){var t=this.mediaKeys;return t&&t!=e&&uT(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&uT(e,this),Promise.resolve()}Et.PatchedMediaKeysWebkit=oT,oT.install=sT;function Vl(e,t){this.g=this.keySystem=e;var n=!1;e=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video"),t=g(t);for(var o=t.next();!o.done;o=t.next()){o=o.value;var s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var a=g(o.audioCapabilities),l=a.next();!l.done;l=a.next())l=l.value,l.contentType&&(u=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(s.audioCapabilities.push(l),i=!0));if(o.videoCapabilities)for(a=g(o.videoCapabilities),l=a.next();!l.done;l=a.next())l=l.value,l.contentType&&(u=!0,r.canPlayType(l.contentType,this.g)&&(s.videoCapabilities.push(l),i=!0));if(u||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),o.persistentState=="required"&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):i=!1),i){this.h=s;return}}throw n="Unsupported keySystem",(e=="org.w3.clearkey"||e=="com.widevine.alpha")&&(n="None of the requested configurations were supported."),e=Error(n),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Vl.prototype.createMediaKeys=function(){var e=new lu(this.g);return Promise.resolve(e)},Vl.prototype.getConfiguration=function(){return this.h};function lu(e){this.l=e,this.h=null,this.g=new Me,this.i=[],this.j=new Map}function uT(e,t){e.h=t,e.g.Ra();var n=Up;t&&(e.g.D(t,n+"needkey",function(i){var r=new CustomEvent("encrypted");r.initDataType="cenc",r.initData=gn(i.initData),e.h.dispatchEvent(r)}),e.g.D(t,n+"keymessage",function(i){var r=Lp(e,i.sessionId);r&&(i=new Map().set("messageType",r.keyStatuses.Cc()==null?"licenserequest":"licenserenewal").set("message",i.message),i=new G("message",i),r.h&&(r.h.resolve(),r.h=null),r.dispatchEvent(i))}),e.g.D(t,n+"keyadded",function(i){(i=Lp(e,i.sessionId))&&i.ready()}),e.g.D(t,n+"keyerror",function(i){var r=Lp(e,i.sessionId);if(r){var o=Error("EME v0.1b key error"),s=i.errorCode;s.systemCode=i.systemCode,o.errorCode=s,!i.sessionId&&r.h?(i.systemCode==45&&(o.message="Unsupported session type."),r.h.reject(o),r.h=null):i.sessionId&&r.g?(r.g.reject(o),r.g=null):(o=i.systemCode,i.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Hl(r,"output-restricted"):o==1?Hl(r,"expired"):Hl(r,"internal-error"))}}))}lu.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary"&&e!="persistent-license")throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new Np(t,this.l,e),this.i.push(e),e},lu.prototype.setServerCertificate=function(){return Promise.resolve(!1)},lu.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Lp(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function Np(e,t,n){De.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new je,this.keyStatuses=new lT}et(Np,De),d=Np.prototype,d.ready=function(){Hl(this,"usable"),this.g&&this.g.resolve(),this.g=null};function aT(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if(e.l=="persistent-license")if(n)var i=se(Dn("LOAD_SESSION|"+n));else{var r=Dn("PERSISTENT|");i=tt(r,t)}else i=se(t)}catch(s){return Promise.reject(s)}e.h=new je;var o=Pp("generateKeyRequest");try{e.j[o](e.i,i)}catch(s){if(s.name!="InvalidStateError")return e.h=null,Promise.reject(s);new Te(function(){try{e.j[o](e.i,i)}catch(u){e.h.reject(u),e.h=null}}).ia(.01)}return e.h}function jp(e,t,n){if(e.g)e.g.then(function(){return jp(e,t,n)}).catch(function(){return jp(e,t,n)});else{if(e.g=t,e.i=="webkit-org.w3.clearkey"){var i=ze(n),r=JSON.parse(i);r.keys[0].kty!="oct"&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=mn(r.keys[0].k),r=mn(r.keys[0].kid)}else i=se(n),r=null;var o=Pp("addKey");try{e.j[o](e.i,i,r,e.sessionId)}catch(s){e.g.reject(s),e.g=null}}}function Hl(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new G("keystatuseschange"),e.dispatchEvent(t)}d.generateRequest=function(e,t){return aT(this,t,null)},d.load=function(e){return this.l=="persistent-license"?aT(this,null,e):Promise.reject(Error("Not a persistent session."))},d.update=function(e){var t=new je;return jp(this,t,e),t},d.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Pp("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},d.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function lT(){this.size=0,this.g=void 0}d=lT.prototype,d.Cc=function(){return this.g},d.forEach=function(e){this.g&&e(this.g,Wu.value())},d.get=function(e){if(this.has(e))return this.g},d.has=function(e){var t=Wu.value();return!!(this.g&&ri(e,t))},d.entries=function(){},d.keys=function(){},d.values=function(){};var Up="",cM="webkit";Ut(sT);function cT(){}function fT(){if(F.HTMLVideoElement){var e=HTMLVideoElement.prototype;e.requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=dM,Object.defineProperty(e,"disablePictureInPicture",{get:hM,set:gM,enumerable:!0,configurable:!0}),document.exitPictureInPicture=pM,document.addEventListener("webkitpresentationmodechanged",fM,!0))}}function fM(e){if(e=e.target,e.webkitPresentationMode=="picture-in-picture"){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function dM(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function pM(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function hM(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function gM(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Et.PiPWebkit=cT,cT.install=fT,Ut(fT);function dT(){}function pT(){F.crypto&&("randomUUID"in F.crypto||(F.crypto.randomUUID=mM))}function mM(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}Et.RandomUUID=dT,dT.install=pT,Ut(pT);function hT(){}function gT(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:vM})}function vM(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}Et.Symbol=hT,hT.install=gT,Ut(gT);function mT(){}function vT(){for(var e=g([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),t=e.next();!t.done;t=e.next())t=t.value,t.prototype.indexOf||(t.prototype.indexOf=yM),t.prototype.lastIndexOf||(t.prototype.lastIndexOf=TM),t.prototype.includes||(t.prototype.includes=xM)}function yM(e,t){return Array.prototype.indexOf.call(this,e,t)}function TM(e,t){return Array.prototype.lastIndexOf.call(this,e,t)}function xM(e,t){return this.indexOf(e,t)!==-1}Et.TypedArray=mT,mT.install=vT,Ut(vT);function yT(){}function TT(){if(F.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}Et.VideoPlayPromise=yT,yT.install=TT,Ut(TT);function xT(){}function ST(){if(F.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||typeof xr().webkitDroppedFrameCount=="number")&&(e.getVideoPlaybackQuality=SM)}}function SM(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Et.VideoPlaybackQuality=xT,xT.install=ST,Ut(ST);function wT(){}function AT(){if(!F.VTTCue&&F.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=Op;else if(t==6)e=wM;else{try{var n=!!Op(1,2,"")}catch{n=!1}n&&(e=Op)}e&&(F.VTTCue=function(i,r,o){return e(i,r,o)})}}function Op(e,t,n){return new F.TextTrackCue(e,t,n)}function wM(e,t,n){return new F.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}Et.VTTCue=wT,wT.install=AT,Ut(AT);function vt(e){De.call(this),this.h=e,this.l=null,this.g=[],this.i=-1,this.j=null,this.m=new Me}et(vt,De),d=vt.prototype,d.destroy=function(){var e=this;return k(function(t){if(t.g==1)return T(t,e.removeAllItems(),2);e.h=null,e.m&&(e.m.release(),e.m=null),De.prototype.release.call(e),K(t)})},d.configure=function(e){this.l=e},d.getConfiguration=function(){return this.l},d.getCurrentItem=function(){return this.g.length&&0<=this.i&&this.i<this.g.length?this.g[this.i]:null},d.getCurrentItemIndex=function(){return this.i},d.getItems=function(){return this.g.slice()},d.insertItems=function(e){this.g.push.apply(this.g,H(e)),this.dispatchEvent(new G("itemsinserted"))},d.removeAllItems=function(){var e=this;return k(function(t){switch(t.g){case 1:if(e.m.Ra(),!(e.g.length&&0<=e.i)){t.u(2);break}return T(t,e.h.vc(),2);case 2:if(!e.j){t.u(4);break}if(e.j.xf.o){t.u(5);break}return T(t,e.j.xf.destroy(),5);case 5:e.j=null;case 4:e.g=[],e.i=-1,e.dispatchEvent(new G("itemsremoved")),K(t)}})},d.playItem=function(e){var t=this,n,i,r,o,s,u,a,l,c,f,p,h,m,y;return k(function(v){if(v.g==1){if(t.m.Ra(),!t.g.length||e>=t.g.length)throw new M(2,7,7007);return n=t.g[e],t.i!=e&&(t.i=e,t.dispatchEvent(new G("currentitemchanged"))),i=t.h.h,r=t.l?t.l.preloadNextUrlWindow:0,0<r&&(o=!1,t.m.D(i,"timeupdate",function(){var x,S,w,A;return k(function(D){switch(D.g){case 1:if(t.j||1>=t.g.length||o||t.h.V()||!i.duration)return D.return();if(x=t.h.Sa().end-i.currentTime,isNaN(x)){D.u(0);break}if(!(x<=r)){D.u(0);break}if(S=t.l&&t.l.repeatMode,w=null,t.i+1<t.g.length?w=t.g[t.i+1]:S==1&&(w=t.g[0]),!w){D.u(0);break}return o=!0,A=null,ue(D,5),T(D,t.h.preload(w.manifestUri,w.startTime,w.mimeType,w.config),7);case 7:A=D.h,ce(D,6);break;case 5:ae(D),A=null;case 6:t.j={item:w,xf:A},o=!1,K(D)}})})),t.m.D(t.h,"complete",function(){var x=t.l&&t.l.repeatMode,S=!1;if(x==2)S=!0;else{var w=t.i+1;w<t.g.length?t.playItem(w):x==1&&(t.g.length==1?S=!0:t.playItem(0))}S&&(i.paused?(i.currentTime=t.h.Sa().start,i.play()):t.m.D(i,"paused",function(){i.currentTime=t.h.Sa().start,i.play()}))}),n.config&&(t.h.Ci(),t.h.configure(n.config)),s=n.manifestUri,t.j&&t.j.item==n&&t.j.xf&&(s=t.j.xf),T(v,t.h.load(s,n.startTime,n.mimeType),2)}if(t.j=null,n.extraText)for(u=g(n.extraText),a=u.next();!a.done;a=u.next())l=a.value,l.mime?t.h.Hd(l.uri,l.language,l.kind,l.mime,l.codecs):t.h.Hd(l.uri,l.language,l.kind);if(n.extraThumbnail)for(c=g(n.extraThumbnail),f=c.next();!f.done;f=c.next())p=f.value,t.h.He(p);if(n.extraChapter)for(h=g(n.extraChapter),m=h.next();!m.done;m=h.next())y=m.value,t.h.Ge(y.uri,y.language,y.mime);K(v)})},W("shaka.queue.QueueManager",vt),vt.prototype.playItem=vt.prototype.playItem,vt.prototype.removeAllItems=vt.prototype.removeAllItems,vt.prototype.insertItems=vt.prototype.insertItems,vt.prototype.getItems=vt.prototype.getItems,vt.prototype.getCurrentItemIndex=vt.prototype.getCurrentItemIndex,vt.prototype.getCurrentItem=vt.prototype.getCurrentItem,vt.prototype.getConfiguration=vt.prototype.getConfiguration,vt.prototype.configure=vt.prototype.configure,vt.prototype.destroy=vt.prototype.destroy,za=function(e){return new vt(e)};function ln(){}ln.prototype.parseInit=function(){},ln.prototype.setSequenceMode=function(){},ln.prototype.setManifestType=function(){},ln.prototype.parseMedia=function(e,t){var n=null,i=[];e=ze(e).split(/\r?\n/),e=g(e);for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=AM.exec(r))){var o=EM.exec(r[1]);o=60*parseInt(o[1],10)+parseFloat(o[2].replace(",",".")),r=new Be(o,t.segmentEnd?t.segmentEnd:o+2,r[2]),n&&(n.endTime=o,i.push(n)),n=r}return n&&i.push(n),i},W("shaka.text.LrcTextParser",ln),ln.prototype.parseMedia=ln.prototype.parseMedia,ln.prototype.setManifestType=ln.prototype.setManifestType,ln.prototype.setSequenceMode=ln.prototype.setSequenceMode,ln.prototype.parseInit=ln.prototype.parseInit;var AM=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,EM=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;At("application/x-subtitle-lrc",function(){return new ln});function nn(){}nn.prototype.parseInit=function(){},nn.prototype.setSequenceMode=function(){},nn.prototype.setManifestType=function(){},nn.prototype.parseMedia=function(e,t,n,i){var r=ze(e);if(e=[],r=="")return e;var o=lr(r,"tt",!0);if(!o)throw new M(2,2,2005,"Failed to parse TTML.");if(r=Vn(o,"body")[0],!r)return[];var s=qn(o,cu,"frameRate"),u=qn(o,cu,"subFrameRate"),a=qn(o,cu,"frameRateMultiplier"),l=qn(o,cu,"tickRate"),c=qn(o,cu,"cellResolution"),f=o.attributes["xml:space"]||"default",p=qn(o,Xl,"extent");if(f!="default"&&f!="preserve")throw new M(2,2,2005,"Invalid xml:space value: "+f);f=f=="default",s=new DM(s,u,a,l),c=kM(c),u=Vn(o,"metadata")[0],u=(u?u.children:[]).filter(function(y){return y!=`
|
|
75
|
+
`}),a=Vn(o,"style"),o=Vn(o,"region"),l=[];for(var h=g(o),m=h.next();!m.done;m=h.next())(m=IM(m.value,a,p))&&l.push(m);if(Ne(r,"p").length)throw new M(2,2,2001,"<p> can only be inside <div> in TTML");for(p=g(Ne(r,"div")),h=p.next();!h.done;h=p.next())if(Ne(h.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");return(t=ET(r,t,s,u,a,o,l,f,c,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function ET(e,t,n,i,r,o,s,u,a,l,c,f,p){var h=l;if(Iu(e)){if(!c)return null;var m={tagName:"span",children:[ot(e)],attributes:{},parent:null}}else m=e;for(var y=null,v=g(jT),x=v.next();!x.done&&!(y=Kl(m,"backgroundImage",i,"#",x.value)[0]);x=v.next());v=null,x=qn(m,jT,"backgroundImage");var S=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(x&&S.test(x)){if(v=parseInt(x.split(":").pop(),10)-1,v>=p.length)return null;v=p[v]}else f&&x&&!x.startsWith("#")&&(S=new nt(f),x=new nt(x),(x=S.resolve(x).toString())&&(v=x));if((e.tagName=="p"||y||v)&&(c=!0),e=c,x=(m.attributes["xml:space"]||(u?"default":"preserve"))=="default",S=m.children.every(Iu),u=[],!S)for(var w=g(m.children),A=w.next();!A.done;A=w.next())(A=ET(A.value,t,n,i,r,o,s,x,a,m,c,f,p))&&u.push(A);if(i=l!=null,f=ot(m),f=m.children.length&&f&&/\S/.test(f),w=m.attributes.begin||m.attributes.end||m.attributes.dur,!(w||f||m.tagName=="br"||u.length!=0||i&&!x))return null;for(p=MT(m,n),f=p.start,p=p.end;h&&h.tagName&&h.tagName!="tt";)p=MM(h,n,f,p),f=p.start,p=p.end,h=h.parent;if(f==null&&(f=0),f+=t.periodStart,p=p==null?1/0:p+t.periodStart,f=Math.max(f,t.segmentStart),p=Math.min(p,t.segmentEnd),!w&&0<u.length)for(f=1/0,p=0,t=g(u),n=t.next();!n.done;n=t.next())n=n.value,f=Math.min(f,n.startTime),p=Math.max(p,n.endTime);if(m.tagName=="br")return r=new Be(f,p,""),r.lineBreak=!0,r;if(t="",S&&(t=Gt(ot(m)||""),x&&(t=t.replace(/\s+/g," "))),t=new Be(f,p,t),t.nestedCues=u,c||(t.isContainer=!0),a&&(t.cellResolution=a),a=Kl(m,"region",o,"")[0],m.attributes.region&&a&&a.attributes["xml:id"]){var D=a.attributes["xml:id"];t.region=s.filter(function(E){return E.id==D})[0]}return s=a,l&&i&&!m.attributes.region&&!m.attributes.style&&(s=Kl(l,"region",o,"")[0]),CM(t,m,s,y,v,r,e,u.length==0),t}function IM(e,t,n){var i=new sr,r=e.attributes["xml:id"];if(!r)return null;i.id=r,r=null,n&&(r=Vp.exec(n)||Hp.exec(n)),n=r?Number(r[1]):null,r=r?Number(r[2]):null;var o,s=Gl(e,t,"extent");if(s){var u=(o=Vp.exec(s))||Hp.exec(s);u!=null&&(i.width=Number(u[1]),i.height=Number(u[2]),o||(n!=null&&(i.width=100*i.width/n),r!=null&&(i.height=100*i.height/r)),i.widthUnits=o||n!=null?qt:0,i.heightUnits=o||r!=null?qt:0)}return(e=Gl(e,t,"origin"))&&(u=(o=Vp.exec(e))||Hp.exec(e),u!=null&&(i.viewportAnchorX=Number(u[1]),i.viewportAnchorY=Number(u[2]),o?s||(i.width=100-i.viewportAnchorX,i.widthUnits=qt,i.height=100-i.viewportAnchorY,i.heightUnits=qt):(r!=null&&(i.viewportAnchorY=100*i.viewportAnchorY/r),n!=null&&(i.viewportAnchorX=100*i.viewportAnchorX/n)),i.viewportAnchorUnits=o||n!=null?qt:0)),i}function _p(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&(t=t[1].split(","),t.length==4)?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function CM(e,t,n,i,r,o,s,u){if(s=s||u,Rt(t,n,o,"direction",s)=="rtl"&&(e.direction="rtl"),u=Rt(t,n,o,"writingMode",s),u=="tb"||u=="tblr"?e.writingMode="vertical-lr":u=="tbrl"?e.writingMode="vertical-rl":u=="rltb"||u=="rl"?e.direction="rtl":u&&(e.direction=Jo),(u=Rt(t,n,o,"textAlign",!0))?(e.positionAlign=LM.get(u),e.lineAlign=PM.get(u),e.textAlign=Ic[u.toUpperCase()]):e.textAlign=Qn,(u=Rt(t,n,o,"displayAlign",!0))&&(e.displayAlign=_h[u.toUpperCase()]),(u=Rt(t,n,o,"color",s))&&(e.color=_p(u)),(u=Rt(t,n,o,"backgroundColor",s))&&(e.backgroundColor=_p(u)),(u=Rt(t,n,o,"border",s))&&(e.border=u),u=Rt(t,n,o,"fontFamily",s))switch(u){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=u.split(",").filter(function(a){return a!="default"}).join(",")}switch((u=Rt(t,n,o,"fontWeight",s))&&u=="bold"&&(e.fontWeight=Hr),u=Rt(t,n,o,"wrapOption",s),e.wrapLine=!(u&&u=="noWrap"),(u=Rt(t,n,o,"lineHeight",s))&&u.match(Uo)&&(e.lineHeight=u),(u=Rt(t,n,o,"fontSize",s))&&(u.match(Uo)||u.match(RM))&&(e.fontSize=u),(u=Rt(t,n,o,"fontStyle",s))&&(e.fontStyle=Vh[u.toUpperCase()]),i?(r=i.attributes.imageType||i.attributes.imagetype,u=i.attributes.encoding,i=ot(i).trim(),r=="PNG"&&u=="Base64"&&i&&(e.backgroundImage="data:image/png;base64,"+i)):r&&(e.backgroundImage=r),(i=Rt(t,n,o,"textOutline",s))&&(i=i.split(" "),i[0].match(Uo)?e.textStrokeColor=e.color:(e.textStrokeColor=_p(i[0]),i.shift()),i[0]&&i[0].match(Uo)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=Rt(t,n,o,"letterSpacing",s))&&i.match(Uo)&&(e.letterSpacing=i),(i=Rt(t,n,o,"linePadding",s))&&i.match(Uo)&&(e.linePadding=i),(i=Rt(t,n,o,"opacity",s))&&(e.opacity=parseFloat(i)),(i=Gl(n,o,"textDecoration"))&&IT(e,i),(i=bp(t,o,"textDecoration"))&&IT(e,i),(i=Rt(t,n,o,"textCombine",s))&&(e.textCombineUpright=i),Rt(t,n,o,"ruby",s)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}function IT(e,t){t=g(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(fi)||e.textDecoration.push(fi);break;case"noUnderline":e.textDecoration.includes(fi)&&Rn(e.textDecoration,fi);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Rn(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Rn(e.textDecoration,"overline")}}function Rt(e,t,n,i,r){return r=r===void 0?!0:r,(e=bp(e,n,i))?e:r?Gl(t,n,i):null}function Gl(e,t,n){if(!e)return null;var i=qn(e,Xl,n);return i||CT(e,t,n)}function bp(e,t,n){var i=qn(e,Xl,n);return i||CT(e,t,n)}function CT(e,t,n){e=Kl(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var o=ai(e[r],"urn:ebu:tt:style",n);o||(o=qn(e[r],Xl,n)),o||(o=bp(e[r],t,n)),o&&(i=o)}return i}function Kl(e,t,n,i,r){var o=[];if(!e||1>n.length)return o;var s=e;for(e=null;!e&&!(e=r?ai(s,r,t):s.attributes[t])&&(s=s.parent,s););if(t=e){for(t=g(t.split(" ")),r=t.next();!r.done;r=t.next())for(r=r.value,e=g(n),s=e.next();!s.done;s=e.next())if(s=s.value,i+s.attributes["xml:id"]==r){o.push(s);break}}return o}function MM(e,t,n,i){return e=MT(e,t),n==null?n=e.start:e.start!=null&&(n+=e.start),i==null?i=e.end:e.start!=null&&(i+=e.start),{start:n,end:i}}function MT(e,t){var n=Fp(e.attributes.begin,t),i=Fp(e.attributes.end,t);return e=Fp(e.attributes.dur,t),i==null&&e!=null&&(i=n+e),{start:n,end:i}}function Fp(e,t){var n=null;if(kT.test(e)){e=kT.exec(e),n=Number(e[1]);var i=Number(e[2]),r=Number(e[3]),o=Number(e[4]);o+=(Number(e[5])||0)/t.h,r+=o/t.frameRate,n=r+60*i+3600*n}else if(DT.test(e))n=Bp(DT,e);else if(RT.test(e))n=Bp(RT,e);else if(PT.test(e))e=PT.exec(e),n=Number(e[1])/t.frameRate;else if(LT.test(e))e=LT.exec(e),n=Number(e[1])/t.g;else if(NT.test(e))n=Bp(NT,e);else if(e)throw new M(2,2,2001,"Could not parse cue time range in TTML");return n}function Bp(e,t){return e=e.exec(t),e==null||e[0]==""?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function kM(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{Lc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}W("shaka.text.TtmlTextParser",nn),nn.prototype.parseMedia=nn.prototype.parseMedia,nn.prototype.setManifestType=nn.prototype.setManifestType,nn.prototype.setSequenceMode=nn.prototype.setSequenceMode,nn.prototype.parseInit=nn.prototype.parseInit;function DM(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),this.g==0&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}var Vp=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,RM=/^(\d{1,4}(?:\.\d+)?|100)%$/,Uo=/^(\d+px|\d+em|\d*\.?\d+c)$/,Hp=/^(\d+)px (\d+)px$/,kT=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,DT=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,RT=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,PT=/^(\d*(?:\.\d*)?)f$/,LT=/^(\d*(?:\.\d*)?)t$/,NT=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),PM=new Map().set("left",fr).set("center","center").set("right","end").set("start",fr).set("end","end"),LM=new Map().set("left","line-left").set("center","center").set("right","line-right"),cu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Xl=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],jT=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];At("application/ttml+xml",function(){return new nn});function dt(){this.g=new nn}dt.prototype.parseInit=function(e){var t=!1;if(new Ue().box("moov",le).box("trak",le).box("mdia",le).box("minf",le).box("stbl",le).R("stsd",mi).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new M(2,2,2007)},dt.prototype.setSequenceMode=function(){},dt.prototype.setManifestType=function(){},dt.prototype.parseMedia=function(e,t,n){var i=[],r=null,o=[],s=new Map,u=[];if(new Ue().box("moof",le).box("traf",le).R("tfhd",function(x){r=na(x.reader,x.flags).Nd}).R("trun",function(x){x=oa(x.reader,x.version,x.flags),x=g(x.gh);for(var S=x.next();!S.done;S=x.next())u.push(S.value.sampleSize||r||0)}).R("subs",function(x){for(var S=x.reader,w=S.T(),A=-1,D=0;D<w;D++){var E=S.T();A+=E,E=S.Ba();for(var I=[],C=0;C<E;C++)x.version==1?I.push(S.T()):I.push(S.Ba()),S.X(),S.X(),S.T();s.set(A,I)}}).box("mdat",Jr(function(x){o.push(x)})).parse(e,!1),o.length==0)throw new M(2,2,2007);for(var a=tt.apply(It,H(o)),l=0,c=0;c<u.length;c++){var f=se(a,l,u[c]);l+=u[c];var p=s.get(c);if(p&&p.length){f=se(f,0,p[0]);for(var h=[],m=p[0],y=1;y<p.length;y++){var v=se(e,m,p[y]);v=wu(v),h.push("data:image/png;base64,"+v),m+=p[y]}i=i.concat(this.g.parseMedia(f,t,n,h))}else i=i.concat(this.g.parseMedia(f,t,n,[]))}return i},W("shaka.text.Mp4TtmlParser",dt),dt.prototype.parseMedia=dt.prototype.parseMedia,dt.prototype.setManifestType=dt.prototype.setManifestType,dt.prototype.setSequenceMode=dt.prototype.setSequenceMode,dt.prototype.parseInit=dt.prototype.parseInit,At('application/mp4; codecs="stpp"',function(){return new dt}),At('application/mp4; codecs="stpp.ttml"',function(){return new dt}),At('application/mp4; codecs="stpp.ttml.im1i"',function(){return new dt}),At('application/mp4; codecs="stpp.ttml.im1t"',function(){return new dt}),At('application/mp4; codecs="stpp.ttml.im2i"',function(){return new dt}),At('application/mp4; codecs="stpp.ttml.im2t"',function(){return new dt}),At('application/mp4; codecs="stpp.ttml.etd1"',function(){return new dt}),At('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new dt}),At('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new dt}),At('application/mp4; codecs="stpp.TTML.im1t"',function(){return new dt});function Bt(){this.g="UNKNOWN"}Bt.prototype.parseInit=function(){},Bt.prototype.setSequenceMode=function(){},Bt.prototype.setManifestType=function(e){this.g=e},Bt.prototype.parseMedia=function(e,t){e=ze(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,`
|
|
76
|
+
`);var n=e.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new M(2,2,2e3);if(e=t.vttOffset,this.g=="HLS")if(n[0].includes("X-TIMESTAMP-MAP")){var i=n[0];if(e=i.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=i.match(/MPEGTS:(\d+)/m),!e||!i)throw new M(2,2,2e3);if(e=Vr(e[1]),e==null)throw new M(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;95443.7176888889<=r;)r-=95443.7176888889,i+=8589934592;e=t.periodStart+i/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],i=g(n[0].split(`
|
|
77
|
+
`)),r=i.next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new Fr(r);var o=new sr;ar(r),Br(r);for(var s=ar(r);s;){var u=o,a=s;(s=/^id=(.*)$/.exec(a))?u.id=s[1]:(s=/^width=(\d{1,2}|100)%$/.exec(a))?u.width=Number(s[1]):(s=/^lines=(\d+)$/.exec(a))?(u.height=Number(s[1]),u.heightUnits=2):(s=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(a))?(u.regionAnchorX=Number(s[1]),u.regionAnchorY=Number(s[2])):(s=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(a))?(u.viewportAnchorX=Number(s[1]),u.viewportAnchorY=Number(s[2])):/^scroll=up$/.exec(a)&&(u.scroll="up"),Br(r),s=ar(r)}t.push(o)}for(i=new Map,Uh(i),r=[],n=g(n.slice(1)),o=n.next();!o.done;o=n.next()){if(o=o.value.split(`
|
|
78
|
+
`),(o.length!=1||o[0])&&!/^NOTE($|[ \t])/.test(o[0])&&o[0]=="STYLE"){for(u=[],s=-1,a=1;a<o.length;a++)o[a].includes("::cue")&&(u.push([]),s=u.length-1),s!=-1&&(u[s].push(o[a]),o[a].includes("}")&&(s=-1));for(u=g(u),s=u.next();!s.done;s=u.next()){var l=s.value;s="global",(a=l[0].match(/\((.*)\)/))&&(s=a.pop()),a=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(a=l[1].split(";")),(l=i.get(s))||(l=new Be(0,0,""));for(var c=!1,f=0;f<a.length;f++){var p=/^\s*([^:]+):\s*(.*)/.exec(a[f]);if(p){var h=p[2].trim().replace(";","");switch(p[1].trim()){case"background-color":case"background":c=!0,l.backgroundColor=h;break;case"color":c=!0,l.color=h;break;case"font-family":c=!0,l.fontFamily=h;break;case"font-size":c=!0,l.fontSize=h;break;case"font-weight":(700<=parseInt(h,10)||h=="bold")&&(c=!0,l.fontWeight=Hr);break;case"font-style":switch(h){case"normal":c=!0,l.fontStyle=Mc;break;case"italic":c=!0,l.fontStyle=Gr;break;case"oblique":c=!0,l.fontStyle="oblique"}break;case"opacity":c=!0,l.opacity=parseFloat(h);break;case"text-combine-upright":c=!0,l.textCombineUpright=h;break;case"text-shadow":c=!0,l.textShadow=h;break;case"white-space":c=!0,l.wrapLine=h!="noWrap"}}}c&&i.set(s,l)}}if(l=o,c=e,l.length==1&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")o=null;else if(o=null,l[0].includes("-->")||(o=l[0],l.splice(0,1)),u=new Fr(l[0]),s=Yo(u),f=ur(u,/[ \t]+--\x3e[ \t]+/g),a=Yo(u),s==null||f==null||a==null)Ae("Failed to parse VTT time code. Cue skipped:",o,l),o=null;else{for(s+=c,a+=c,c=l.slice(1).join(`
|
|
79
|
+
`).trim(),i.has("global")?(l=i.get("global").clone(),l.startTime=s,l.endTime=a,l.payload=c):l=new Be(s,a,c),Br(u),s=ar(u);s;)UT(l,s,t),Br(u),s=ar(u);Pu(l,i),o!=null&&(l.id=o),o=l}o&&r.push(o)}return r};function UT(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],t=="middle"?e.textAlign=Qn:e.textAlign=Ic[t.toUpperCase()]):(i=/^vertical:(lr|rl)$/.exec(t))?e.writingMode=i[1]=="lr"?"vertical-lr":"vertical-rl":(i=/^size:([\d.]+)%$/.exec(t))?e.size=Number(i[1]):(i=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(t=i[2],e.positionAlign=t=="line-left"||t=="start"?"line-left":t=="line-right"||t=="end"?"line-right":t=="center"||t=="middle"?"center":Lu)):(i=/^region:(.*)$/.exec(t))?(t=NM(n,i[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=Cc[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=Zo,e.line=Number(n[1]),n[2]&&(e.lineAlign=Cc[n[2].toUpperCase()]))}function NM(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}W("shaka.text.VttTextParser",Bt),Bt.prototype.parseMedia=Bt.prototype.parseMedia,Bt.prototype.setManifestType=Bt.prototype.setManifestType,Bt.prototype.setSequenceMode=Bt.prototype.setSequenceMode,Bt.prototype.parseInit=Bt.prototype.parseInit,At("text/vtt",function(){return new Bt}),At('text/vtt; codecs="vtt"',function(){return new Bt}),At('text/vtt; codecs="wvtt"',function(){return new Bt});function cn(){this.g=null}cn.prototype.parseInit=function(e){var t=this,n=!1;if(new Ue().box("moov",le).box("trak",le).box("mdia",le).R("mdhd",function(i){i=ra(i.reader,i.version),t.g=i.timescale}).box("minf",le).box("stbl",le).R("stsd",mi).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new M(2,2,2008);if(!n)throw new M(2,2,2008)},cn.prototype.setSequenceMode=function(){},cn.prototype.setManifestType=function(){},cn.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new M(2,2,2008);var n=0,i=[],r,o=[],s=!1,u=!1,a=!1,l=null;if(new Ue().box("moof",le).box("traf",le).R("tfdt",function(w){s=!0,n=ia(w.reader,w.version).baseMediaDecodeTime}).R("tfhd",function(w){l=na(w.reader,w.flags).Md}).R("trun",function(w){u=!0,i=oa(w.reader,w.version,w.flags).gh}).box("mdat",Jr(function(w){a=!0,r=w})).parse(e,!1),!a&&!s&&!u)throw new M(2,2,2008);e=n;for(var c=new He(r,0),f=g(i),p=f.next();!p.done;p=f.next()){p=p.value;var h=p.hh||l,m=p.Bf?n+p.Bf:e;e=m+(h||0);var y=0;do{var v=c.T();y+=v;var x=c.T(),S=null;Qu(x)=="vttc"?8<v&&(S=c.Ub(v-8)):c.skip(v-8),h&&S&&(v=jM(S,t.periodStart+m/this.g,t.periodStart+e/this.g),o.push(v))}while(p.sampleSize&&y<p.sampleSize)}return o.filter(Oi)};function jM(e,t,n){var i,r,o;return new Ue().box("payl",Jr(function(s){i=ze(s)})).box("iden",Jr(function(s){r=ze(s)})).box("sttg",Jr(function(s){o=ze(s)})).parse(e),i?UM(i,r,o,t,n):null}function UM(e,t,n,i,r){if(e=new Be(i,r,e),Pu(e),t&&(e.id=t),n)for(t=new Fr(n),n=ar(t);n;)UT(e,n,[]),Br(t),n=ar(t);return e}W("shaka.text.Mp4VttParser",cn),cn.prototype.parseMedia=cn.prototype.parseMedia,cn.prototype.setManifestType=cn.prototype.setManifestType,cn.prototype.setSequenceMode=cn.prototype.setSequenceMode,cn.prototype.parseInit=cn.prototype.parseInit,At('application/mp4; codecs="wvtt"',function(){return new cn});function fn(){}fn.prototype.parseInit=function(){},fn.prototype.setSequenceMode=function(){},fn.prototype.setManifestType=function(){},fn.prototype.parseMedia=function(e){var t=ze(e).replace(/\r+/g,"");if(t=t.trim(),e=[],t=="")return e;t=g(t.split(`
|
|
80
|
+
|
|
81
|
+
`));for(var n=t.next();!n.done;n=t.next()){n=n.value.split(`
|
|
82
|
+
`);var i=new Fr(n[0]),r=Yo(i),o=ur(i,/,/g);if(i=Yo(i),r==null||o==null||i==null)throw new M(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new Be(r,i,n.slice(1).join(`
|
|
83
|
+
`).trim()))}return e},W("shaka.text.SbvTextParser",fn),fn.prototype.parseMedia=fn.prototype.parseMedia,fn.prototype.setManifestType=fn.prototype.setManifestType,fn.prototype.setSequenceMode=fn.prototype.setSequenceMode,fn.prototype.parseInit=fn.prototype.parseInit,At("text/x-subviewer",function(){return new fn});function rn(){this.g=new Bt}rn.prototype.parseInit=function(){},rn.prototype.setSequenceMode=function(){},rn.prototype.setManifestType=function(){},rn.prototype.parseMedia=function(e,t,n){return e=ze(e),e=OT(e),e=se(Dn(e)),this.g.parseMedia(e,t,n,[])};function OT(e){var t=`WEBVTT
|
|
84
|
+
|
|
85
|
+
`;if(e=="")return t;e=e.replace(/\r+/g,""),e=e.trim(),e=g(e.split(`
|
|
86
|
+
|
|
87
|
+
`));for(var n=e.next();!n.done;n=e.next())n=n.value.split(/\n/),n[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join(`
|
|
88
|
+
`).replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+`
|
|
89
|
+
|
|
90
|
+
`;return t}W("shaka.text.SrtTextParser",rn),rn.srt2webvtt=OT,rn.prototype.parseMedia=rn.prototype.parseMedia,rn.prototype.setManifestType=rn.prototype.setManifestType,rn.prototype.setSequenceMode=rn.prototype.setSequenceMode,rn.prototype.parseInit=rn.prototype.parseInit,At("text/srt",function(){return new rn});function dn(){}dn.prototype.parseInit=function(){},dn.prototype.setSequenceMode=function(){},dn.prototype.setManifestType=function(){},dn.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=ze(e).split(/\r?\n\s*\r?\n/),e=g(r),r=e.next();!r.done;r=e.next()){var o=r.value;r=o,(o=_M.exec(o))&&(i=o[1],r=o[2]),i=="V4 Styles"||i=="V4+ Styles"?(t=r,t=n?t+(`
|
|
91
|
+
`+r):r):i=="Events"&&(n=n?n+(`
|
|
92
|
+
`+r):r)}for(i=[],r=null,t=g(t.split(/\r?\n/)),e=t.next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(o=FT.exec(e))){if(e=o[1].trim(),o=o[2].trim(),e=="Format")r=o.split(Wl);else if(e=="Style"){e=o.split(Wl),o={};for(var s=0;s<r.length&&s<e.length;s++)o[r[s]]=e[s];i.push(o)}}for(r=[],t=null,n=g(n.split(/\r?\n/)),o=n.next(),e={};!o.done;e={Qi:void 0},o=n.next())if(o=o.value,!/^\s*;/.test(o)&&(s=FT.exec(o))){if(o=s[1].trim(),s=s[2].trim(),o=="Format")t=s.split(Wl);else if(o=="Dialogue"){s=s.split(Wl),o={};for(var u=0;u<t.length&&u<s.length;u++)o[t[u]]=s[u];u=bT(o.Start);var a=bT(o.End);s=new Be(u,a,s.slice(t.length-1).join(",").replace(/\\N/g,`
|
|
93
|
+
`).replace(/\{[^}]+\}/g,"")),e.Qi=o.Style,(e=i.find(function(l){return function(c){return c.Name==l.Qi}}(e)))&&OM(s,e),r.push(s)}}return r};function OM(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=_T(n))&&(e.color=n),(n=t.BackColour)&&(n=_T(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=Hr),t.Italic&&(e.fontStyle=Gr),t.Underline&&e.textDecoration.push(fi),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=Qo,e.textAlign="start";break;case 2:e.displayAlign=Qo,e.textAlign=Qn;break;case 3:e.displayAlign=Qo,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Qn;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=Qn;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function _T(e){return e=parseInt(e.replace("&H",""),16),0<=e?"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function bT(e){return e=bM.exec(e),3600*(e[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}W("shaka.text.SsaTextParser",dn),dn.prototype.parseMedia=dn.prototype.parseMedia,dn.prototype.setManifestType=dn.prototype.setManifestType,dn.prototype.setSequenceMode=dn.prototype.setSequenceMode,dn.prototype.parseInit=dn.prototype.parseInit;var _M=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,FT=/^\s*([^:]+):\s*(.*)/,Wl=/\s*,\s*/,bM=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;At("text/x-ssa",function(){return new dn});function BT(e,t){var n=e[t+1]&1?7:9;return t+n<=e.length&&(e=((e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5)-n,0<e)?{Ud:n,qa:e}:null}function VT(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(e[t+2]&60)>>>2;if(i>n.length-1)return null;var r=((e[t+2]&192)>>>6)+1,o=(e[t+2]&1)<<2;return o|=(e[t+3]&192)>>>6,{sampleRate:n[i],channelCount:o,codec:"mp4a.40."+r}}function HT(e,t){if(t+1<e.length&&e[t]===255&&(e[t+1]&246)===240){var n=e[t+1]&1?7:9;if(t+n>=e.length)return!1;var i=(e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5;return i<=n?!1:(t+=i,t===e.length||t+1<e.length&&e[t]===255&&(e[t+1]&246)===240)}return!1}function FM(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2||t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}function pn(e){this.j=e,this.h=0,this.g=new Map,this.i=null}d=pn.prototype,d.destroy=function(){this.g.clear()},d.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?Pt(this.convertCodecs("audio",e)):!1},d.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(vn(t)||"mp4a.40.2")+'"':t},d.getOriginalMimeType=function(){return this.j},d.transmux=function(e,t,n,i){for(var r=se(e),o=io(r),s=o.length;s<r.length&&!HT(r,s);s++);if(e=1e3*n.endTime,o=Sr(o),o.length&&n&&(o=o.find(function(c){return c.description==="com.apple.streaming.transportStreamTimestamp"}))&&(e=o.data),o=VT(r,s),!o)return Promise.reject(new M(2,3,3018,n?n.O()[0]:null));t.audioSamplingRate=o.sampleRate,t.channelsCount=o.channelCount;for(var u=[];s<r.length;){var a=BT(r,s);if(!a)return Promise.reject(new M(2,3,3018,n?n.O()[0]:null));var l=a.Ud+a.qa;s+l<=r.length&&u.push({data:r.subarray(s+a.Ud,s+l),size:a.qa,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),s+=l}return r=o.sampleRate,e=Math.floor(e*r/1e3),i={id:t.id,type:"audio",codecs:o.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:e,yb:u},stream:t},i=new yr([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=to(i),this.g.set(n,t)),n=this.i!==t,i=gs(i),this.i=t,this.h++,n?(t=tt(t,i),Promise.resolve(t)):Promise.resolve(i)},W("shaka.transmuxer.AacTransmuxer",pn),pn.prototype.transmux=pn.prototype.transmux,pn.prototype.getOriginalMimeType=pn.prototype.getOriginalMimeType,pn.prototype.convertCodecs=pn.prototype.convertCodecs,pn.prototype.isSupported=pn.prototype.isSupported,pn.prototype.destroy=pn.prototype.destroy,di("audio/aac",function(){return new pn("audio/aac")},Ni);function GT(e,t){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return null;var n=e[t+4]>>6;if(3<=n)return null;var i=e[t+4]&63,r=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*i+n];if(t+r>e.length)return null;var o=e[t+6]>>5,s=0;o===2?s+=2:(o&1&&o!==1&&(s+=2),o&4&&(s+=2)),s=(e[t+6]<<8|e[t+7])>>12-s&1;var u=e[t+5]&7;return e=new Uint8Array([n<<6|e[t+5]>>3<<1|u>>2,(u&3)<<6|o<<3|s<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][o]+s,Ea:e,qa:r}}function BM(e,t){if(e[t]===11&&e[t+1]===119){var n=0,i=5;t+=i;for(var r,o;0<i;){o=e[t];var s=Math.min(i,8),u=8-s;r=4278190080>>>24+u<<u,r=(o&r)>>u,n=n?n<<s|r:r,t+=1,i-=s}if(16>n)return!0}return!1}function An(e){this.j=e,this.h=0,this.g=new Map,this.i=null}d=An.prototype,d.destroy=function(){this.g.clear()},d.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?Pt(this.convertCodecs("audio",e)):!1},d.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?ye().ee()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},d.getOriginalMimeType=function(){return this.j},d.transmux=function(e,t,n,i){e=se(e);for(var r=io(e),o=r.length;o<e.length&&!BM(e,o);o++);var s=1e3*n.endTime;r=Sr(r),r.length&&n&&(r=r.find(function(c){return c.description==="com.apple.streaming.transportStreamTimestamp"}))&&(s=r.data),r=0;for(var u=new Uint8Array([]),a=[];o<e.length;){var l=GT(e,o);if(!l)return Promise.reject(new M(2,3,3018,n?n.O()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,u=l.Ea,a.push({data:e.subarray(o,o+l.qa),size:l.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),o+=l.qa}return e=Math.floor(s*r/1e3),i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,Ab:[],Ea:u,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:e,yb:a},stream:t},i=new yr([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=to(i),this.g.set(n,t)),n=this.i!==t,i=gs(i),this.i=t,this.h++,n?(t=tt(t,i),Promise.resolve(t)):Promise.resolve(i)},W("shaka.transmuxer.Ac3Transmuxer",An),An.prototype.transmux=An.prototype.transmux,An.prototype.getOriginalMimeType=An.prototype.getOriginalMimeType,An.prototype.convertCodecs=An.prototype.convertCodecs,An.prototype.isSupported=An.prototype.isSupported,An.prototype.destroy=An.prototype.destroy,di("audio/ac3",function(){return new An("audio/ac3")},Ni);function KT(e,t){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return null;var n=new Ti(e.subarray(t+2));Zt(n,2),Zt(n,3);var i=Se(n,11)+1<<1,r=Se(n,2);if(r==3){r=Se(n,2),r=[24e3,22060,16e3][r];var o=3}else r=[48e3,44100,32e3][r],o=Se(n,2);var s=Se(n,3),u=Se(n,1);return n=Se(n,5),t+i>e.byteLength?null:(e=Math.floor(i*r/(16*[1,2,3,6][o])),e=new Uint8Array([(e&8160)>>5,(e&31)<<3,r<<6|n<<1|0,0|s<<1|u<<0,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][s]+u,Ea:e,qa:i})}function En(e){this.j=e,this.h=0,this.g=new Map,this.i=null}d=En.prototype,d.destroy=function(){this.g.clear()},d.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?Pt(this.convertCodecs("audio",e)):!1},d.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},d.getOriginalMimeType=function(){return this.j},d.transmux=function(e,t,n,i){e=se(e);for(var r=io(e),o=r.length;o<e.length&&(e[o]<<8|e[o+1]<<0)!==2935;o++);var s=1e3*n.endTime;r=Sr(r),r.length&&n&&(r=r.find(function(c){return c.description==="com.apple.streaming.transportStreamTimestamp"}))&&(s=r.data),r=0;for(var u=new Uint8Array([]),a=[];o<e.length;){var l=KT(e,o);if(!l)return Promise.reject(new M(2,3,3018,n?n.O()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,u=l.Ea,a.push({data:e.subarray(o,o+l.qa),size:l.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),o+=l.qa}return e=Math.floor(s*r/1e3),i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,Ab:[],Ea:u,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:e,yb:a},stream:t},i=new yr([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=to(i),this.g.set(n,t)),n=this.i!==t,i=gs(i),this.i=t,this.h++,n?(t=tt(t,i),Promise.resolve(t)):Promise.resolve(i)},W("shaka.transmuxer.Ec3Transmuxer",En),En.prototype.transmux=En.prototype.transmux,En.prototype.getOriginalMimeType=En.prototype.getOriginalMimeType,En.prototype.convertCodecs=En.prototype.convertCodecs,En.prototype.isSupported=En.prototype.isSupported,En.prototype.destroy=En.prototype.destroy,di("audio/ec3",function(){return new En("audio/ec3")},Ni);function VM(e){if(!e.length)return null;var t=e.find(function(y){return y.type==7});if(e=e.find(function(y){return y.type==8}),!t||!e)return null;var n=new Ti(t.data),i=Re(n);if(Re(n),Re(n),Wt(n),GM.includes(i)&&(i=z(n),i===3&&Zt(n,1),Wt(n),Wt(n),Zt(n,1),Q(n))){i=i!==3?8:12;for(var r=0;r<i;r++)Q(n)&&(6>r?la(n,16):la(n,64))}if(Wt(n),i=z(n),i===0)z(n);else if(i===1)for(Zt(n,1),Wt(n),Wt(n),i=z(n),r=0;r<i;r++)Wt(n);Wt(n),Zt(n,1);var o=z(n),s=z(n),u=Se(n,1);u===0&&Zt(n,1),Zt(n,1);var a=0,l=0,c=0,f=0;if(Q(n)&&(a=z(n),l=z(n),c=z(n),f=z(n)),r=i=1,Q(n)&&Q(n)){var p=Re(n),h=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],m=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(i=h[p-1],r=m[p-1]):p===255&&(i=Se(n,16),r=Se(n,16))}return n=(2-u)*(s+1)*16-2*c-2*f,o=16*(o+1)-2*a-2*l,a=[],t=t.fullData,a.push(t.byteLength>>>8&255),a.push(t.byteLength&255),a=a.concat.apply(a,H(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(e.byteLength&255),t=t.concat.apply(t,H(e)),e=new Uint8Array([1,a[3],a[4],a[5],255,225].concat(a,[1],t)),{height:n,width:o,Na:e,Wa:i,Xa:r}}function HM(e){function t(m){r={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:m.pts,dts:m.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var m=[],y=g(r.nalus),v=y.next();!v.done;v=y.next()){v=v.value;var x=v.fullData.byteLength,S=new Uint8Array(4);S[0]=x>>24&255,S[1]=x>>16&255,S[2]=x>>8&255,S[3]=x&255,m.push(S),m.push(v.fullData)}r.data=tt.apply(It,H(m)),i.push(r)}}for(var i=[],r=null,o=!1,s=0;s<e.length;s++){var u=e[s],a=u.nalus,l=!1;r&&a.length&&!o&&(n(),t(u)),a=g(u.nalus);for(var c=a.next();!c.done;c=a.next()){c=c.value;var f=!1;switch(c.type){case 1:var p=!1;f=!0;var h=c.data;l&&4<h.length&&(h=QS(new Ti(h)),h===2||h===4||h===7||h===9)&&(p=!0),p&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=p;break;case 5:f=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=!0;break;case 6:f=!0;break;case 7:l=f=!0;break;case 8:f=!0;break;case 9:o=f=!0,r&&r.frame&&(n(),r=null),r||t(u);break;case 12:f=!0;break;default:f=!1}r&&f&&r.nalus.push(c)}}return n(),i}var GM=[100,110,122,244,44,83,86,118,128,138,139,134];function KM(e){if(!e.length)return null;var t=e.find(function(s){return s.type==32}),n=e.find(function(s){return s.type==33}),i=e.find(function(s){return s.type==34});if(!t||!n||!i)return null;var r=XM(t.fullData);e=WM(n.fullData);var o=zM(i.fullData);return t=YM(t.fullData,n.fullData,i.fullData,{Sg:r.Sg,wh:r.wh,Cg:e.Cg,Dg:e.Dg,wg:e.wg,Bg:e.Bg,xg:e.xg,yg:e.yg,zg:e.zg,Ag:e.Ag,pg:e.pg,qg:e.qg,rg:e.rg,sg:e.sg,ug:e.ug,vg:e.vg,hg:e.hg,lf:e.lf,fg:e.fg,eg:e.eg,dg:e.dg,Ug:o.Ug}),{height:e.height,width:e.width,Na:t,Wa:e.Mk,Xa:e.Lk}}function XM(e){var t=new Ti(e,!0);return Re(t),Re(t),Se(t,4),Se(t,2),Se(t,6),e=Se(t,3),t=Q(t),{Sg:e+1,wh:t}}function WM(e){e=new Ti(e,!0),Re(e),Re(e);var t=0,n=0,i=0,r=0;Se(e,4);var o=Se(e,3);Q(e);for(var s=Se(e,2),u=Se(e,1),a=Se(e,5),l=Re(e),c=Re(e),f=Re(e),p=Re(e),h=Re(e),m=Re(e),y=Re(e),v=Re(e),x=Re(e),S=Re(e),w=Re(e),A=[],D=[],E=0;E<o;E++)A.push(Q(e)),D.push(Q(e));if(0<o)for(E=o;8>E;E++)Se(e,2);for(E=0;E<o;E++)A[E]&&Se(e,88),D[E]&&Re(e);z(e),A=z(e),A==3&&Se(e,1),D=z(e),E=z(e),Q(e)&&(t+=z(e),n+=z(e),i+=z(e),r+=z(e));var I=z(e),C=z(e),R=z(e);if(Q(e))for(var N=0;N<=o;N++)z(e),z(e),z(e);else z(e),z(e),z(e);if(z(e),z(e),z(e),z(e),z(e),z(e),Q(e)&&Q(e))for(N=0;4>N;N++)for(var L=0;L<(N===3?2:6);L++)if(Q(e)){var P=Math.min(64,1<<4+(N<<1));1<N&&ro(e);for(var b=0;b<P;b++)ro(e)}else z(e);for(Q(e),Q(e),Q(e)&&(Re(e),z(e),z(e),Q(e)),N=z(e),P=L=0;P<N;P++)if(b=!1,P!==0&&(b=Q(e)),b){P===N&&z(e),Q(e),z(e);for(var U=b=0;U<=L;U++){var j=Q(e),O=!1;j||(O=Q(e)),(j||O)&&b++}L=b}else{for(U=z(e),b=z(e),L=U+b,j=0;j<U;j++)z(e),Q(e);for(U=0;U<b;U++)z(e),Q(e)}if(Q(e))for(N=z(e),L=0;L<N;L++){for(P=0;P<R+4;P++)Se(e,1);Se(e,1)}if(N=R=1,L=0,Q(e),Q(e),Q(e)){if(Q(e)&&(P=Re(e),b=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],U=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<P&&16>=P?(R=b[P-1],N=U[P-1]):P===255&&(R=Se(e,16),N=Se(e,16))),Q(e)&&Q(e),Q(e)&&(Se(e,3),Q(e),Q(e)&&(Re(e),Re(e),Re(e))),Q(e)&&(z(e),z(e)),Q(e),Q(e),Q(e),(P=Q(e))&&(z(e),z(e),z(e),z(e)),Q(e)&&(Se(e,32),Se(e,32),Q(e)&&z(e),Q(e)))for(U=!1,P=Q(e),b=Q(e),(P||b)&&((U=Q(e))&&(Re(e),Se(e,5),Q(e),Se(e,5)),Se(e,4),Se(e,4),U&&Se(e,4),Se(e,5),Se(e,5),Se(e,5)),j=0;j<=o;j++){var B=!0;O=1,Q(e)||(B=Q(e));var V=!1;if(B?z(e):V=Q(e),V||(O=z(e)+1),P){for(B=0;B<O;B++)z(e),z(e),U&&(z(e),z(e));Q(e)}if(b){for(B=0;B<O;B++)z(e),z(e),U&&(z(e),z(e));Q(e)}}Q(e)&&(Q(e),Q(e),Q(e),L=z(e),z(e),z(e),z(e),z(e))}return{wg:w,Cg:s,Dg:u,Bg:a,xg:l,yg:c,zg:f,Ag:p,pg:h,qg:m,rg:y,sg:v,ug:x,vg:S,lf:L,hg:0,fg:A,eg:I,dg:C,width:D-(t+n)*(A===1||A===2?2:1),height:E-(i+r)*(A===1?2:1),Mk:R,Lk:N}}function zM(e){var t=new Ti(e,!0);Re(t),Re(t),z(t),z(t),Q(t),Q(t),Se(t,3),Q(t),Q(t),z(t),z(t),ro(t),Q(t),Q(t),Q(t)&&z(t),ro(t),ro(t),Q(t),Q(t),Q(t),Q(t),e=Q(t),t=Q(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Ug:n}}function YM(e,t,n,i){var r=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return r[0]=1,r[1]=(i.Cg&3)<<6|(i.Dg?1:0)<<5|i.Bg&31,r[2]=i.xg,r[3]=i.yg,r[4]=i.zg,r[5]=i.Ag,r[6]=i.pg,r[7]=i.qg,r[8]=i.rg,r[9]=i.sg,r[10]=i.ug,r[11]=i.vg,r[12]=i.wg,r[13]=240|(i.lf&3840)>>8,r[14]=i.lf&255,r[15]=252|i.Ug&3,r[16]=252|i.fg&3,r[17]=248|i.eg&7,r[18]=248|i.dg&7,r[19]=0,r[20]=0,r[21]=(i.hg&3)<<6|(i.Sg&7)<<3|(i.wh?1:0)<<2|3,r[22]=3,r[23]=160,r[24]=0,r[25]=1,r[26]=(e.byteLength&65280)>>8,r[27]=(e.byteLength&255)>>0,r.set(e,28),r[23+(5+e.byteLength)]=161,r[e.byteLength+29]=0,r[e.byteLength+30]=1,r[e.byteLength+31]=(t.byteLength&65280)>>8,r[e.byteLength+32]=(t.byteLength&255)>>0,r.set(t,e.byteLength+33),r[23+(e.byteLength+10+t.byteLength)]=162,r[e.byteLength+10+t.byteLength+24]=0,r[e.byteLength+10+t.byteLength+25]=1,r[e.byteLength+10+t.byteLength+26]=(n.byteLength&65280)>>8,r[e.byteLength+10+t.byteLength+27]=(n.byteLength&255)>>0,r.set(n,e.byteLength+10+t.byteLength+28),r}function zl(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,o=e[t+2]>>2&3;if(n!==1&&r!==0&&r!==15&&o!==3){var s=e[t+3]>>6;r=1e3*qM[14*(n===3?3-i:i===3?3:4)+r-1],o=$M[3*(n===3?0:n===2?1:2)+o],n=QM[n][i];var u=JM[i],a=Math.floor(n*r/o+(e[t+2]>>1&1))*u,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&87>=l&&i===2&&224e3<=r&&s===0&&(e[t+3]|=128),{sampleRate:o,channelCount:s===3?1:2,qa:a,Kk:8*n*u}}return null}function XT(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function WT(e,t){if(t+1<e.length&&XT(e,t)){var n=zl(e,t),i=4;return n&&n.qa&&(i=n.qa),t+=i,t===e.length||t+1<e.length&&XT(e,t)}return!1}var qM=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],$M=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],QM=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],JM=[0,1,1,4];function In(e){this.j=e,this.h=0,this.g=new Map,this.i=null}d=In.prototype,d.destroy=function(){this.g.clear()},d.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?Pt(this.convertCodecs("audio",e)):!1},d.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},d.getOriginalMimeType=function(){return this.j},d.transmux=function(e,t,n,i){for(var r=se(e),o=io(r).length;o<r.length&&!WT(r,o);o++);var s;for(e=[];o<r.length;){var u=zl(r,o);if(!u)return Promise.reject(new M(2,3,3018,n?n.O()[0]:null));s||(s=u),o+u.qa<=r.length&&e.push({data:r.subarray(o,o+u.qa),size:u.qa,duration:1152,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),o+=u.qa}return s?(r=9e4*s.Kk/s.sampleRate*this.h,i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:s.sampleRate,duration:i,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:r,yb:e},stream:t},i=new yr([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=to(i),this.g.set(n,t)),n=this.i!==t,i=gs(i),this.i=t,this.h++,n?(t=tt(t,i),Promise.resolve(t)):Promise.resolve(i)):Promise.reject(new M(2,3,3018,n?n.O()[0]:null))},W("shaka.transmuxer.Mp3Transmuxer",In),In.prototype.transmux=In.prototype.transmux,In.prototype.getOriginalMimeType=In.prototype.getOriginalMimeType,In.prototype.convertCodecs=In.prototype.convertCodecs,In.prototype.isSupported=In.prototype.isSupported,In.prototype.destroy=In.prototype.destroy,di("audio/mpeg",function(){return new In("audio/mpeg")},Ni);function Cn(e){this.h=e,this.g=null}d=Cn.prototype,d.destroy=function(){},d.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=vn(e).split(","),n=Kt("audio",t);return t=Kt("video",t),!n||t||Ot(n)!="mp3"?!1:Pt(this.convertCodecs("audio",e))},d.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},d.getOriginalMimeType=function(){return this.h},d.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new Fe,this.g.Ff(n.i),e=se(e),e=this.g.parse(e),e.Od().audio!="mp3"||r!="audio")return Promise.reject(new M(2,3,3018,n?n.O()[0]:null));for(n=new Uint8Array([]),r=g(e.sb()),e=r.next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=zl(e,t))?(t+i.qa<=e.length&&(n=tt(n,e.subarray(t,t+i.qa))),t+=i.qa):t++;return Promise.resolve(n)},W("shaka.transmuxer.MpegTsTransmuxer",Cn),Cn.prototype.transmux=Cn.prototype.transmux,Cn.prototype.getOriginalMimeType=Cn.prototype.getOriginalMimeType,Cn.prototype.convertCodecs=Cn.prototype.convertCodecs,Cn.prototype.isSupported=Cn.prototype.isSupported,Cn.prototype.destroy=Cn.prototype.destroy,di("video/mp2t",function(){return new Cn("video/mp2t")},Dc);/*
|
|
94
|
+
@license
|
|
95
|
+
MSS Transmuxer
|
|
96
|
+
Copyright 2015 Dash Industry Forum
|
|
97
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
98
|
+
*/function hn(e){this.h=e,(this.g=bd.get("ISOBoxer")())&&ZM(this)}function ZM(e){function t(){this._procFullBox(),this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(n){this._procEntryField(n,"InitializationVector","data",8),this.flags&2&&(this._procEntryField(n,"NumberOfEntries","uint",16),this._procSubEntries(n,"clearAndCryptedData",n.NumberOfEntries,function(i){this._procEntryField(i,"BytesOfClearData","uint",16),this._procEntryField(i,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var n=!0,i=0;16>i;i++)this.usertype[i]!==ek[i]&&(n=!1);n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}d=hn.prototype,d.destroy=function(){},d.isSupported=function(e,t){var n=e.startsWith("mss/");return!this.g||!n?!1:t?Pt(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Pt(t)||Pt(e))},d.convertCodecs=function(e,t){return t.replace("mss/","")},d.getOriginalMimeType=function(){return this.h},d.transmux=function(e,t,n){if(!n)return Promise.resolve(se(e));if(!t.mssPrivateData)return Promise.reject(new M(2,3,3020,n?n.O()[0]:null));try{var i,r=this.g.parseBuffer(e),o=r.fetch("tfhd");o.track_ID=t.id+1;var s=r.fetch("tfdt"),u=r.fetch("traf");s===null&&(s=this.g.createFullBox("tfdt",u,o),s.version=1,s.flags=0,s.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var a=r.fetch("trun"),l=r.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var c=r.fetch("tfrf");c&&c._parent.boxes.splice(c._parent.boxes.indexOf(c),1);var f=r.fetch("sepiff");if(f!==null){f.type="senc",f.usertype=void 0;var p=r.fetch("saio");if(p===null){p=this.g.createFullBox("saio",u),p.version=0,p.flags=0,p.entry_count=1,p.offset=[0];var h=this.g.createFullBox("saiz",u);if(h.version=0,h.flags=0,h.sample_count=f.sample_count,h.default_sample_info_size=0,h.sample_info_size=[],f.flags&2)for(i=0;i<f.sample_count;i+=1)h.sample_info_size[i]=10+6*f.entry[i].NumberOfEntries;else h.default_sample_info_size=8}}o.flags&=16777214,o.flags|=131072,a.flags|=1;var m=r.fetch("moof");a.data_offset=m.getLength()+8;var y=r.fetch("saio");y!==null&&(y.offset[0]=zT(m,"traf")+zT(u,"senc")+16);var v=se(r.write());return Promise.resolve(v)}catch(x){return x instanceof M?Promise.reject(x):Promise.reject(new M(2,3,3022,n?n.O()[0]:null))}};function zT(e,t){for(var n=8,i=0;i<e.boxes.length&&e.boxes[i].type!==t;i++)n+=e.boxes[i].size;return n}W("shaka.transmuxer.MssTransmuxer",hn),hn.prototype.transmux=hn.prototype.transmux,hn.prototype.getOriginalMimeType=hn.prototype.getOriginalMimeType,hn.prototype.convertCodecs=hn.prototype.convertCodecs,hn.prototype.isSupported=hn.prototype.isSupported,hn.prototype.destroy=hn.prototype.destroy;var ek=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);di("mss/audio/mp4",function(){return new hn("mss/audio/mp4")},Ni),di("mss/video/mp4",function(){return new hn("mss/video/mp4")},Ni);function Mn(e){this.m=e,this.g=0,this.j=new Map,this.l=this.i=this.h=null}d=Mn.prototype,d.destroy=function(){this.j.clear(),this.i&&this.i.destroy()},d.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=vn(n).split(",");return n=Kt("audio",i),i=Kt("video",i),n&&(n=Ot(n),!tk.includes(n))||i&&(n=Ot(i),!nk.includes(n))?!1:t?Pt(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Pt(t)||Pt(e))},d.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=vn(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return bu(n,"audio/mp4")}).map(Zh).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},d.getOriginalMimeType=function(){return this.m},d.transmux=function(e,t,n,i,r){var o=se(e);if(r=="audio"&&!oo(o)){for(var s=io(o),u=s.length;u<o.length;u++)if(WT(o,u))return Promise.reject(new M(2,3,3018,n?n.O()[0]:null));for(u=s.length;u<o.length;u++)if(HT(o,u))return this.i||(this.i=new pn("audio/aac")),this.i.transmux(e,t,n,i,r);return Promise.reject(new M(2,3,3018,n?n.O()[0]:null))}this.h?this.h.clearData():this.h=new Fe,this.h.Ff(n.i);var a=this.h.parse(o),l=[],c=a.Od();try{var f=null;if(r=="video"){switch(c.video){case"avc":var p=[],h=null,m=a.Rc(),y=HM(m);if(!y.length)throw new M(2,3,3023,n?n.O()[0]:null);for(var v=0;v<y.length;v++){var x=y[v];h==null&&(h=x.dts);var S=void 0;S=v+1<y.length?(y[v+1].dts||0)-(x.dts||0):1<y.length?(x.dts||0)-(y[v-1].dts||0):9e4*(n.endTime-n.startTime),p.push({data:x.data,size:x.data.byteLength,duration:S,rb:Math.round((x.pts||0)-(x.dts||0)),flags:{wb:0,kb:0,jb:0,hb:0,ib:x.isKeyframe?2:1,xb:x.isKeyframe?0:1}})}for(var w=[],A=g(m),D=A.next();!D.done;D=A.next())w.push.apply(w,H(D.value.nalus));var E=VM(w);if(!E||h==null)throw new M(2,3,3018,n?n.O()[0]:null);t.height=E.height,t.width=E.width,f={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Ab:[],Ea:new Uint8Array([]),Na:E.Na,Wa:E.Wa,Xa:E.Xa,data:{Vb:this.g,baseMediaDecodeTime:h,yb:p},stream:t};break;case"hvc":var I=[],C=null,R=[],N=a.Rc();if(!N.length)throw new M(2,3,3023,n?n.O()[0]:null);for(var L=0;L<N.length;L++){var P=N[L],b=P.nalus;R.push.apply(R,H(b));for(var U=!1,j=[],O=!1,B=g(b),V=B.next();!V.done;V=B.next()){var q=V.value;switch(q.type){case 1:case 0:var X=O=!0;break;case 19:case 20:case 21:U=X=O=!0;break;case 32:X=!0;break;case 33:X=!0;break;case 34:X=!0;break;case 35:O=X=!0;break;case 39:case 40:X=!0;break;default:X=!1}if(O&&X){var Ce=q.fullData.byteLength,he=new Uint8Array(4);he[0]=Ce>>24&255,he[1]=Ce>>16&255,he[2]=Ce>>8&255,he[3]=Ce&255,j.push(he),j.push(q.fullData)}}var xe=j.length?{data:tt.apply(It,H(j)),isKeyframe:U}:null;if(xe){C==null&&P.dts!=null&&(C=P.dts);var ve=void 0;ve=L+1<N.length?(N[L+1].dts||0)-(P.dts||0):1<N.length?(P.dts||0)-(N[L-1].dts||0):9e4*(n.endTime-n.startTime),I.push({data:xe.data,size:xe.data.byteLength,duration:ve,rb:Math.round((P.pts||0)-(P.dts||0)),flags:{wb:0,kb:0,jb:0,hb:0,ib:xe.isKeyframe?2:1,xb:xe.isKeyframe?0:1}})}}var me=KM(R);if(!me||C==null)throw new M(2,3,3018,n?n.O()[0]:null);t.height=me.height,t.width=me.width,f={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Ab:[],Ea:new Uint8Array([]),Na:me.Na,Wa:me.Wa,Xa:me.Xa,data:{Vb:this.g,baseMediaDecodeTime:C,yb:I},stream:t}}f&&(l.push(f),f=null)}if(r=="audio"){switch(c.audio){case"aac":for(var Pe=[],de,fe=null,ge=null,Xe=null,We=g(a.sb()),$e=We.next();!$e.done;$e=We.next()){var at=$e.value,ut=at.data;if(ut){var Le=0;if(ge==-1&&Xe)ut=tt(Xe,at.data),ge=null;else if(ge!=null&&Xe){Le=Math.max(0,ge);var $i=tt(Xe,ut.subarray(0,Le));Pe.push({data:$i,size:$i.byteLength,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),ge=Xe=null}if(de=VT(ut,Le),!de)throw new M(2,3,3018,n?n.O()[0]:null);for(t.audioSamplingRate=de.sampleRate,t.channelsCount=de.channelCount,fe==null&&at.pts!==null&&(fe=at.pts);Le<ut.length;){var Wn=BT(ut,Le);if(!Wn){Xe=ut.subarray(Le,ut.length),ge=-1;break}var Qi=Wn.Ud+Wn.qa;ge=Math.max(0,Le+Qi-ut.length),ge!=0?Xe=ut.subarray(Le+Wn.Ud,Le+Qi):Le+Qi<=ut.length&&Pe.push({data:ut.subarray(Le+Wn.Ud,Le+Qi),size:Wn.qa,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),Le+=Qi}}}if(!de||fe==null){if(!a.Rc().length)throw new M(2,3,3018,n?n.O()[0]:null);fe=9e4*n.startTime;var kn=Kt("audio",t.codecs.split(","));if(!kn||!t.channelsCount||!t.audioSamplingRate)throw new M(2,3,3018,n?n.O()[0]:null);de={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:kn};var Gp=FM(kn,t.channelsCount);if(!Gp)throw new M(2,3,3018,n?n.O()[0]:null);for(var ik=fe+9e4*(n.endTime-n.startTime),qT=fe;qT<ik;)Pe.push({data:Gp,size:Gp.byteLength,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),qT+=1024/de.sampleRate*9e4}var $T=de.sampleRate,rk=fe/9e4*$T;f={id:t.id,type:"audio",codecs:de.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:$T,duration:i,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:rk,yb:Pe},stream:t};break;case"ac3":for(var QT=[],Yl=0,Kp=new Uint8Array([]),ql=null,JT=g(a.sb()),Xp=JT.next();!Xp.done;Xp=JT.next()){var Wp=Xp.value,zp=Wp.data;ql==null&&Wp.pts!==null&&(ql=Wp.pts);for(var Oo=0;Oo<zp.length;){var Ji=GT(zp,Oo);Ji?(t.audioSamplingRate=Ji.sampleRate,t.channelsCount=Ji.channelCount,Yl=Ji.sampleRate,Kp=Ji.Ea,QT.push({data:zp.subarray(Oo,Oo+Ji.qa),size:Ji.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),Oo+=Ji.qa):Oo++}}if(Yl==0||Kp.byteLength==0||ql==null)throw new M(2,3,3018,n?n.O()[0]:null);var ok=ql/9e4*Yl;f={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Yl,duration:i,Ab:[],Ea:Kp,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:ok,yb:QT},stream:t};break;case"ec3":for(var ZT=[],$l=0,Yp=new Uint8Array([]),Ql=null,ex=g(a.sb()),qp=ex.next();!qp.done;qp=ex.next()){var $p=qp.value,Qp=$p.data;Ql==null&&$p.pts!==null&&(Ql=$p.pts);for(var _o=0;_o<Qp.length;){var Zi=KT(Qp,_o);Zi?(t.audioSamplingRate=Zi.sampleRate,t.channelsCount=Zi.channelCount,$l=Zi.sampleRate,Yp=Zi.Ea,ZT.push({data:Qp.subarray(_o,_o+Zi.qa),size:Zi.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),_o+=Zi.qa):_o++}}if($l==0||Yp.byteLength==0||Ql==null)throw new M(2,3,3018,n?n.O()[0]:null);var sk=Ql/9e4*$l;f={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:$l,duration:i,Ab:[],Ea:Yp,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:sk,yb:ZT},stream:t};break;case"mp3":for(var tx=[],Jl,Zl=null,nx=g(a.sb()),Jp=nx.next();!Jp.done;Jp=nx.next()){var Zp=Jp.value,fu=Zp.data;if(fu){Zl==null&&Zp.pts!==null&&(Zl=Zp.pts);for(var Pr=0;Pr<fu.length;){var bo=zl(fu,Pr);bo?(Jl||(Jl=bo),Pr+bo.qa<=fu.length&&tx.push({data:fu.subarray(Pr,Pr+bo.qa),size:bo.qa,duration:1152,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),Pr+=bo.qa):Pr++}}}if(!Jl||Zl==null)throw new M(2,3,3018,n?n.O()[0]:null);var ix=Jl.sampleRate,uk=Zl/9e4*ix;f={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:ix,duration:i,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:uk,yb:tx},stream:t};break;case"opus":var rx=[],ec=null,ti=a.G;if(!ti)throw new M(2,3,3018,n?n.O()[0]:null);var Vt=[];switch(ti.jj){case 1:case 2:Vt=[0];break;case 0:Vt=[255,1,1,0,1];break;case 128:Vt=[255,2,0,0,1];break;case 3:Vt=[1,2,1,0,2,1];break;case 4:Vt=[1,2,2,0,1,2,3];break;case 5:Vt=[1,3,2,0,4,1,2,3];break;case 6:Vt=[1,4,2,0,4,1,2,3,5];break;case 7:Vt=[1,4,2,0,4,1,2,3,5,6];break;case 8:Vt=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Vt=[1,1,2,0,1];break;case 131:Vt=[1,1,3,0,1,2];break;case 132:Vt=[1,1,4,0,1,2,3];break;case 133:Vt=[1,1,5,0,1,2,3,4];break;case 134:Vt=[1,1,6,0,1,2,3,4,5];break;case 135:Vt=[1,1,7,0,1,2,3,4,5,6];break;case 136:Vt=[1,1,8,0,1,2,3,4,5,6,7]}for(var ox=new Uint8Array([0,ti.channelCount,0,0,ti.sampleRate>>>24&255,ti.sampleRate>>>17&255,ti.sampleRate>>>8&255,ti.sampleRate>>>0&255,0,0].concat(H(Vt))),sx=ti.sampleRate,ux=g(a.sb()),eh=ux.next();!eh.done;eh=ux.next()){var th=eh.value,Fo=th.data;ec==null&&th.pts!==null&&(ec=th.pts);for(var du=0;du<Fo.length;){for(var ak=(Fo[du+1]&16)!==0,lk=(Fo[du+1]&8)!==0,ki=du+2,tc=0;Fo[ki]===255;)tc+=255,ki+=1;tc+=Fo[ki],ki+=1,ki+=ak?2:0,ki+=lk?2:0;var ax=Fo.slice(ki,ki+tc);rx.push({data:ax,size:ax.byteLength,duration:960,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),du=ki+tc}}if(ox.byteLength==0||ec==null)throw new M(2,3,3018,n?n.O()[0]:null);t.audioSamplingRate=ti.sampleRate,t.channelsCount=ti.channelCount;var ck=ec/9e4*sx;f={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:sx,duration:i,Ab:[],Ea:ox,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:ck,yb:rx},stream:t}}f&&(l.push(f),f=null)}}catch(ih){return ih&&ih.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(ih)}if(!l.length)return Promise.reject(new M(2,3,3018,n?n.O()[0]:null));var lx=new yr(l),nh=t.id+"_"+n.i;if(this.j.has(nh))var pu=this.j.get(nh);else pu=to(lx),this.j.set(nh,pu);var fk=this.l!==pu,cx=gs(lx);if(this.l=pu,this.g++,fk){var dk=tt(pu,cx);return Promise.resolve(dk)}return Promise.resolve(cx)},W("shaka.transmuxer.TsTransmuxer",Mn),Mn.prototype.transmux=Mn.prototype.transmux,Mn.prototype.getOriginalMimeType=Mn.prototype.getOriginalMimeType,Mn.prototype.convertCodecs=Mn.prototype.convertCodecs,Mn.prototype.isSupported=Mn.prototype.isSupported,Mn.prototype.destroy=Mn.prototype.destroy;var tk=["aac","ac-3","ec-3","mp3","opus"],nk=["avc","hevc"];di("video/mp2t",function(){return new Mn("video/mp2t")},Rc);function YT(){}et(YT,zt),W("shaka.util.FairPlayUtils",YT)}).call(er,Vo,Vo,void 0);for(var Di in er.shaka)Bo[Di]=er.shaka[Di]})()})(rh);const hk=fx.getDefaultExportFromCjs(rh),gk=pk({__proto__:null,default:hk},[rh]);exports.shakaPlayer_compiled=gk;
|