@clickview/player 0.0.26 → 0.0.27-rc.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/dist/en.json +1 -1
- package/dist/interactive-player.css +152 -0
- package/dist/interactive-player.js +124 -0
- package/dist/{player-app.css → player.css} +6 -24
- package/dist/player.js +31 -0
- package/package.json +3 -3
- package/dist/libs/analytics/src/Analytics.d.ts +0 -10
- package/dist/libs/analytics/src/AnalyticsHelper.d.ts +0 -30
- package/dist/libs/analytics/src/clients/CollectionApiClient.d.ts +0 -47
- package/dist/libs/analytics/src/constants/EventFirehose.d.ts +0 -4
- package/dist/libs/analytics/src/constants/GlobalChannels.d.ts +0 -3
- package/dist/libs/analytics/src/constants/Regions.d.ts +0 -7
- package/dist/libs/analytics/src/constants/Services.d.ts +0 -4
- package/dist/libs/analytics/src/enums/CountryCode.d.ts +0 -6
- package/dist/libs/analytics/src/enums/RegionName.d.ts +0 -6
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +0 -406
- package/dist/libs/analytics/src/interfaces/AnalyticsUser.d.ts +0 -19
- package/dist/libs/analytics/src/interfaces/Config.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Folder.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/HashObject.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Owner.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Playlist.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Rating.d.ts +0 -4
- package/dist/libs/analytics/src/interfaces/Region.d.ts +0 -4
- package/dist/libs/analytics/src/interfaces/RegionalUrl.d.ts +0 -6
- package/dist/libs/analytics/src/interfaces/Resource.d.ts +0 -5
- package/dist/libs/analytics/src/interfaces/Series.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Subtitle.d.ts +0 -4
- package/dist/libs/analytics/src/interfaces/VersionData.d.ts +0 -4
- package/dist/libs/analytics/src/interfaces/Video.d.ts +0 -16
- package/dist/libs/analytics/src/interfaces/index.d.ts +0 -15
- package/dist/libs/analytics/src/interfaces/primitives/BaseObject.d.ts +0 -7
- package/dist/libs/analytics/src/models/AnalyticsEvent.d.ts +0 -49
- package/dist/libs/analytics/src/models/CollectionEvent.d.ts +0 -61
- package/dist/libs/analytics/src/services/ContextService.d.ts +0 -19
- package/dist/libs/analytics/src/utils/CollectionApiClientHelper.d.ts +0 -6
- package/dist/libs/analytics/src/utils/DataFormatHelper.d.ts +0 -14
- package/dist/libs/analytics/src/utils/EventWhitelistHelper.d.ts +0 -19
- package/dist/libs/analytics/src/utils/ShareFormatHelper.d.ts +0 -4
- package/dist/libs/analytics/src/utils/TypeHelper.d.ts +0 -4
- package/dist/libs/analytics/src/utils/UploadDataFormatHelper.d.ts +0 -10
- package/dist/libs/analytics/src/utils/UrlHelper.d.ts +0 -3
- package/dist/libs/analytics/src/utils/UserAgentHelper.d.ts +0 -10
- package/dist/libs/common/src/backbone/constants/CommonChannels.d.ts +0 -5
- package/dist/libs/common/src/backbone/constants/CommonServices.d.ts +0 -4
- package/dist/libs/common/src/backbone/core/AppLink.d.ts +0 -37
- package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +0 -104
- package/dist/libs/common/src/backbone/core/BaseApplication.d.ts +0 -76
- package/dist/libs/common/src/backbone/core/BaseBehavior.d.ts +0 -6
- package/dist/libs/common/src/backbone/core/BaseCollection.d.ts +0 -7
- package/dist/libs/common/src/backbone/core/BaseCollectionView.d.ts +0 -16
- package/dist/libs/common/src/backbone/core/BaseError.d.ts +0 -28
- package/dist/libs/common/src/backbone/core/BaseLayoutView.d.ts +0 -11
- package/dist/libs/common/src/backbone/core/BaseModel.d.ts +0 -27
- package/dist/libs/common/src/backbone/core/BaseNestedModel.d.ts +0 -21
- package/dist/libs/common/src/backbone/core/BaseService.d.ts +0 -10
- package/dist/libs/common/src/backbone/core/BaseView.d.ts +0 -131
- package/dist/libs/common/src/backbone/core/EventNames.d.ts +0 -16
- package/dist/libs/common/src/backbone/core/LayoutService.d.ts +0 -31
- package/dist/libs/common/src/backbone/core/ListenToRadio.d.ts +0 -3
- package/dist/libs/common/src/backbone/core/LocationUtils.d.ts +0 -24
- package/dist/libs/common/src/backbone/core/Middleware.d.ts +0 -10
- package/dist/libs/common/src/backbone/core/Shell.d.ts +0 -79
- package/dist/libs/common/src/backbone/core/Types.d.ts +0 -12
- package/dist/libs/common/src/backbone/core/index.d.ts +0 -27
- package/dist/libs/common/src/backbone/enums/DataServiceErrorType.d.ts +0 -8
- package/dist/libs/common/src/backbone/enums/HttpStatus.d.ts +0 -17
- package/dist/libs/common/src/backbone/enums/HttpVerbs.d.ts +0 -6
- package/dist/libs/common/src/backbone/errors/DevError.d.ts +0 -4
- package/dist/libs/common/src/backbone/index.d.ts +0 -2
- package/dist/libs/common/src/backbone/interfaces/BaseCollectionIdentifier.d.ts +0 -19
- package/dist/libs/common/src/backbone/interfaces/ChainableDataService.d.ts +0 -9
- package/dist/libs/common/src/backbone/interfaces/DataCache.d.ts +0 -8
- package/dist/libs/common/src/backbone/interfaces/DataProvider.d.ts +0 -15
- package/dist/libs/common/src/backbone/interfaces/DataServiceError.d.ts +0 -7
- package/dist/libs/common/src/backbone/interfaces/DataServiceRequests.d.ts +0 -218
- package/dist/libs/common/src/backbone/interfaces/Pagination.d.ts +0 -33
- package/dist/libs/common/src/backbone/interfaces/StickitBinding.d.ts +0 -33
- package/dist/libs/common/src/backbone/interfaces/Xhr.d.ts +0 -9
- package/dist/libs/common/src/backbone/interfaces/index.d.ts +0 -9
- package/dist/libs/common/src/backbone/services/EnvironmentVariables.d.ts +0 -13
- package/dist/libs/common/src/backbone/services/LanguageService.d.ts +0 -38
- package/dist/libs/common/src/backbone/utils/FunctionHelper.d.ts +0 -8
- package/dist/libs/common/src/backbone/utils/LocalStorageHelper.d.ts +0 -58
- package/dist/libs/common/src/backbone/utils/UrlHelper.d.ts +0 -14
- package/dist/libs/common/src/react/flight/FlightHelpers.d.ts +0 -16
- package/dist/libs/common/src/react/flight/FlightMiddleware.d.ts +0 -12
- package/dist/libs/common/src/react/flight/FlightReducer.d.ts +0 -2
- package/dist/libs/common/src/react/flight/FlightSimulator.d.ts +0 -24
- package/dist/libs/common/src/react/flight/constants/Actions.d.ts +0 -7
- package/dist/libs/common/src/react/flight/constants/index.d.ts +0 -1
- package/dist/libs/common/src/react/flight/data-layers/AjaxRequest.d.ts +0 -2
- package/dist/libs/common/src/react/flight/data-layers/index.d.ts +0 -1
- package/dist/libs/common/src/react/flight/enums/RequestStatus.d.ts +0 -6
- package/dist/libs/common/src/react/flight/enums/index.d.ts +0 -1
- package/dist/libs/common/src/react/flight/index.d.ts +0 -9
- package/dist/libs/common/src/react/flight/interfaces/Action.d.ts +0 -28
- package/dist/libs/common/src/react/flight/interfaces/Dispatch.d.ts +0 -3
- package/dist/libs/common/src/react/flight/interfaces/FlightState.d.ts +0 -23
- package/dist/libs/common/src/react/flight/interfaces/HttpRequest.d.ts +0 -27
- package/dist/libs/common/src/react/flight/interfaces/NormalizeOptions.d.ts +0 -4
- package/dist/libs/common/src/react/flight/interfaces/NormalizedData.d.ts +0 -7
- package/dist/libs/common/src/react/flight/interfaces/Request.d.ts +0 -29
- package/dist/libs/common/src/react/flight/interfaces/Response.d.ts +0 -9
- package/dist/libs/common/src/react/flight/interfaces/UpdateStateOptions.d.ts +0 -15
- package/dist/libs/common/src/react/flight/interfaces/index.d.ts +0 -9
- package/dist/libs/common/src/react/flight/normalizer/Denormalizer.d.ts +0 -3
- package/dist/libs/common/src/react/flight/normalizer/Normalizer.d.ts +0 -8
- package/dist/libs/common/src/react/flight/normalizer/index.d.ts +0 -2
- package/dist/libs/common/src/react/flight/utils/SimulatorHelper.d.ts +0 -5
- package/dist/libs/common/src/react/flight/utils/StateHelper.d.ts +0 -11
- package/dist/libs/common/src/react/flight/utils/index.d.ts +0 -2
- package/dist/libs/common/src/react/interfaces/ApplicationData.d.ts +0 -3
- package/dist/libs/common/src/react/interfaces/ApplicationState.d.ts +0 -8
- package/dist/libs/common/src/react/interfaces/BaseReducerActions.d.ts +0 -4
- package/dist/libs/common/src/react/interfaces/HashObject.d.ts +0 -3
- package/dist/libs/common/src/react/interfaces/index.d.ts +0 -4
- package/dist/libs/common/src/react/services/EventsService.d.ts +0 -16
- package/dist/libs/common/src/react/utils/ArrayHelper.d.ts +0 -64
- package/dist/libs/common/src/react/utils/ObjectHelper.d.ts +0 -11
- package/dist/libs/common/src/react/utils/RandomHelper.d.ts +0 -3
- package/dist/libs/common/src/react/utils/TextHelper.d.ts +0 -18
- package/dist/libs/common/src/react/utils/TimeHelper.d.ts +0 -8
- package/dist/libs/shared/src/apps/notifications/enums/NotificationType.d.ts +0 -18
- package/dist/libs/shared/src/apps/search/interfaces/FilterProps.d.ts +0 -8
- package/dist/libs/shared/src/apps/search/interfaces/SearchFilter.d.ts +0 -29
- package/dist/libs/shared/src/apps/search/interfaces/SearchResults.d.ts +0 -26
- package/dist/libs/shared/src/apps/search/interfaces/SearchTypes.d.ts +0 -26
- package/dist/libs/shared/src/apps/search/interfaces/index.d.ts +0 -4
- package/dist/libs/shared/src/apps/search/reducers/FilterReducer.d.ts +0 -36
- package/dist/libs/shared/src/apps/search/reducers/index.d.ts +0 -1
- package/dist/libs/shared/src/apps/upload/constants/UploadConstants.d.ts +0 -43
- package/dist/libs/shared/src/components/actions/ActionButton.d.ts +0 -21
- package/dist/libs/shared/src/components/actions/Actions.d.ts +0 -30
- package/dist/libs/shared/src/components/actions/ActionsDropdown.d.ts +0 -15
- package/dist/libs/shared/src/components/app-link/AppLink.d.ts +0 -23
- package/dist/libs/shared/src/components/avatar/Avatar.d.ts +0 -8
- package/dist/libs/shared/src/components/div-button/DivButton.d.ts +0 -10
- package/dist/libs/shared/src/components/feedback-tooltip/FeedbackTooltip.d.ts +0 -6
- package/dist/libs/shared/src/components/icon-button/IconButton.d.ts +0 -24
- package/dist/libs/shared/src/components/image/BaseImage.d.ts +0 -21
- package/dist/libs/shared/src/components/image-cropper/SimpleCropper.d.ts +0 -15
- package/dist/libs/shared/src/components/immersive-reader/ImmersiveReader.d.ts +0 -16
- package/dist/libs/shared/src/components/interaction-answers/multiple-choice/MultipleChoiceInteractionAnswers.d.ts +0 -29
- package/dist/libs/shared/src/components/interaction-answers/true-or-false/TrueOrFalseInteractionAnswers.d.ts +0 -29
- package/dist/libs/shared/src/components/interaction-response/InteractionResponse.d.ts +0 -19
- package/dist/libs/shared/src/components/interaction-response/InteractionResponseCorrectness.d.ts +0 -7
- package/dist/libs/shared/src/components/interaction-response/InteractionStudentDetailsHeader.d.ts +0 -10
- package/dist/libs/shared/src/components/interaction-response/MarkResponse.d.ts +0 -12
- package/dist/libs/shared/src/components/interaction-response/response-types/MissingWordResponse.d.ts +0 -3
- package/dist/libs/shared/src/components/interaction-response/response-types/MultipleChoiceResponse.d.ts +0 -3
- package/dist/libs/shared/src/components/interaction-response/response-types/NoResponse.d.ts +0 -2
- package/dist/libs/shared/src/components/interaction-response/response-types/ResponseComponentLookup.d.ts +0 -15
- package/dist/libs/shared/src/components/interaction-response/response-types/ShortAnswerResponse.d.ts +0 -3
- package/dist/libs/shared/src/components/interaction-response/response-types/TrueOrFalseResponse.d.ts +0 -3
- package/dist/libs/shared/src/components/interactive-questions/InteractionLabel.d.ts +0 -21
- package/dist/libs/shared/src/components/interactive-questions/InteractiveQuestions.d.ts +0 -12
- package/dist/libs/shared/src/components/interactive-questions/formatAnnotationText.d.ts +0 -1
- package/dist/libs/shared/src/components/lazy-image/LazyImage.d.ts +0 -8
- package/dist/libs/shared/src/components/popup/Popup.d.ts +0 -37
- package/dist/libs/shared/src/components/popup/PopupButtons.d.ts +0 -15
- package/dist/libs/shared/src/components/popup/PopupLoadingSpinner.d.ts +0 -2
- package/dist/libs/shared/src/components/spinner-button/SpinnerButton.d.ts +0 -8
- package/dist/libs/shared/src/components/svg-container/SvgContainer.d.ts +0 -23
- package/dist/libs/shared/src/components/svgs/interaction-types/InteractionTypes.d.ts +0 -7
- package/dist/libs/shared/src/components/text/Text.d.ts +0 -20
- package/dist/libs/shared/src/components/tooltip/Tooltip.d.ts +0 -19
- package/dist/libs/shared/src/components/widgets/items/FixedWidgetItemProps.d.ts +0 -18
- package/dist/libs/shared/src/components/widgets/items/resource-widget-item/ResourceWidgetItem.d.ts +0 -17
- package/dist/libs/shared/src/constants/AppVariables.d.ts +0 -5
- package/dist/libs/shared/src/constants/ImageSizes.d.ts +0 -8
- package/dist/libs/shared/src/constants/RadioChannels.d.ts +0 -20
- package/dist/libs/shared/src/enums/ClassificationStatus.d.ts +0 -5
- package/dist/libs/shared/src/enums/ClassificationType.d.ts +0 -8
- package/dist/libs/shared/src/enums/ContentRegion.d.ts +0 -8
- package/dist/libs/shared/src/enums/CountryCode.d.ts +0 -6
- package/dist/libs/shared/src/enums/CurationStatus.d.ts +0 -12
- package/dist/libs/shared/src/enums/CurriculumType.d.ts +0 -6
- package/dist/libs/shared/src/enums/CustomerType.d.ts +0 -13
- package/dist/libs/shared/src/enums/GlanceFormat.d.ts +0 -3
- package/dist/libs/shared/src/enums/Images.d.ts +0 -29
- package/dist/libs/shared/src/enums/InstanceRegion.d.ts +0 -6
- package/dist/libs/shared/src/enums/InteractionCorrectness.d.ts +0 -8
- package/dist/libs/shared/src/enums/InteractiveAnswerStatus.d.ts +0 -5
- package/dist/libs/shared/src/enums/InteractiveOriginType.d.ts +0 -4
- package/dist/libs/shared/src/enums/LibraryType.d.ts +0 -5
- package/dist/libs/shared/src/enums/MasterType.d.ts +0 -62
- package/dist/libs/shared/src/enums/MediaQueries.d.ts +0 -20
- package/dist/libs/shared/src/enums/ObjectStatus.d.ts +0 -5
- package/dist/libs/shared/src/enums/PlaylistPrivacy.d.ts +0 -5
- package/dist/libs/shared/src/enums/PresentationStatus.d.ts +0 -4
- package/dist/libs/shared/src/enums/PresentationType.d.ts +0 -4
- package/dist/libs/shared/src/enums/ProductId.d.ts +0 -7
- package/dist/libs/shared/src/enums/ResourceFileType.d.ts +0 -9
- package/dist/libs/shared/src/enums/SettingKind.d.ts +0 -4
- package/dist/libs/shared/src/enums/SettingName.d.ts +0 -34
- package/dist/libs/shared/src/enums/ShareActivityStatus.d.ts +0 -5
- package/dist/libs/shared/src/enums/ShareIntegration.d.ts +0 -4
- package/dist/libs/shared/src/enums/ShareLinkStatus.d.ts +0 -4
- package/dist/libs/shared/src/enums/ShareType.d.ts +0 -4
- package/dist/libs/shared/src/enums/StaffRequestRole.d.ts +0 -5
- package/dist/libs/shared/src/enums/SupportArticle.d.ts +0 -16
- package/dist/libs/shared/src/enums/TagType.d.ts +0 -3
- package/dist/libs/shared/src/enums/ThemeType.d.ts +0 -3
- package/dist/libs/shared/src/enums/UserGroup.d.ts +0 -5
- package/dist/libs/shared/src/enums/UserRole.d.ts +0 -15
- package/dist/libs/shared/src/enums/WidgetContents.d.ts +0 -13
- package/dist/libs/shared/src/errors/primitives/DialogError.d.ts +0 -9
- package/dist/libs/shared/src/hooks/UseGetMediaQueryString.d.ts +0 -2
- package/dist/libs/shared/src/hooks/UseGrabCursorProps.d.ts +0 -15
- package/dist/libs/shared/src/hooks/UseLazyLoad.d.ts +0 -22
- package/dist/libs/shared/src/hooks/UseMediaQuery.d.ts +0 -1
- package/dist/libs/shared/src/hooks/UseVideoDragDropState.d.ts +0 -6
- package/dist/libs/shared/src/hooks/useNavLock.d.ts +0 -14
- package/dist/libs/shared/src/images/svg/ImportedSvgs.d.ts +0 -105
- package/dist/libs/shared/src/images/svg/actions/index.d.ts +0 -28
- package/dist/libs/shared/src/images/svg/arrows/index.d.ts +0 -9
- package/dist/libs/shared/src/images/svg/index.d.ts +0 -2
- package/dist/libs/shared/src/images/svg/objects/index.d.ts +0 -50
- package/dist/libs/shared/src/images/svg/settings.d.ts +0 -1
- package/dist/libs/shared/src/images/svg/status/index.d.ts +0 -14
- package/dist/libs/shared/src/interfaces/AppLinkWithLabel.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/CurriculumData.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/DateRange.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/DefaultPlaybackQuality.d.ts +0 -1
- package/dist/libs/shared/src/interfaces/DialogOptions.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/FavouriteFunc.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/ImageUrls.d.ts +0 -16
- package/dist/libs/shared/src/interfaces/Integration.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/QueryParams.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/RegionalUrl.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/SetActivityStatusFunc.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/VideoTypes.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/WidgetContext.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/app-variables/BaseNotificationsAppVariables.d.ts +0 -19
- package/dist/libs/shared/src/interfaces/app-variables/BaseSearchAppVariables.d.ts +0 -18
- package/dist/libs/shared/src/interfaces/app-variables/index.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/collections/AudienceCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/CategoryCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ClassificationCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ClassroomCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ClassroomGroupCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ClipCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/CompanyCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/CustomerCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/DirectShareCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/FolderCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/InteractiveCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/LibraryCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/LinkCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/PersonCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/PlaylistCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/PointOfInterestCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/PresentationAudienceCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ResourceCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/SeriesCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/SubtitleCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/TagCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/UnionShareObjectCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/UserCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/VideoCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/VideoHistoryCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/WidgetCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/YearGroupCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/index.d.ts +0 -29
- package/dist/libs/shared/src/interfaces/collections/primitives/BasePaginatedCollection.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/collections/primitives/index.d.ts +0 -1
- package/dist/libs/shared/src/interfaces/index.d.ts +0 -21
- package/dist/libs/shared/src/interfaces/models/Audience.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Avatar.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Banner.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/BaseShareObject.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/models/Category.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/CategoryTree.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Channel.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Classification.d.ts +0 -23
- package/dist/libs/shared/src/interfaces/models/Classroom.d.ts +0 -11
- package/dist/libs/shared/src/interfaces/models/ClassroomGroup.d.ts +0 -17
- package/dist/libs/shared/src/interfaces/models/Clip.d.ts +0 -18
- package/dist/libs/shared/src/interfaces/models/Company.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Config.d.ts +0 -28
- package/dist/libs/shared/src/interfaces/models/ContentRegionObject.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/Country.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/Cover.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Curriculum.d.ts +0 -16
- package/dist/libs/shared/src/interfaces/models/Customer.d.ts +0 -10
- package/dist/libs/shared/src/interfaces/models/Dashboard.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/models/DirectShare.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/EntitySetting.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/FileUpload.d.ts +0 -20
- package/dist/libs/shared/src/interfaces/models/Folder.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/Following.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/Glance.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/Group.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/HeroBanner.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Image.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/InteractiveMetadata.d.ts +0 -30
- package/dist/libs/shared/src/interfaces/models/Language.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/LanguageConfig.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/Library.d.ts +0 -10
- package/dist/libs/shared/src/interfaces/models/Link.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/Logo.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/MasterNestedObject.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/Organisation.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Pdf.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/Person.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/PlayerViewKey.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Playlist.d.ts +0 -22
- package/dist/libs/shared/src/interfaces/models/PointOfInterest.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/Poster.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Presentation.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/PresentationAudience.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/Product.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/models/Rating.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/Resource.d.ts +0 -17
- package/dist/libs/shared/src/interfaces/models/Restriction.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/Season.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/Series.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/models/Share.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/ShareLink.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/models/ShareRecipient.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/Subject.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/models/Subtitle.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/Tag.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/models/TallPoster.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Theme.d.ts +0 -23
- package/dist/libs/shared/src/interfaces/models/Thumbnail.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/UnionShareObject.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/models/User.d.ts +0 -112
- package/dist/libs/shared/src/interfaces/models/UserChannel.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/Video.d.ts +0 -49
- package/dist/libs/shared/src/interfaces/models/VideoHistory.d.ts +0 -14
- package/dist/libs/shared/src/interfaces/models/Widget.d.ts +0 -16
- package/dist/libs/shared/src/interfaces/models/YearGroup.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/index.d.ts +0 -70
- package/dist/libs/shared/src/interfaces/models/interactive/ActionableItem.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/interactive/Interaction.d.ts +0 -14
- package/dist/libs/shared/src/interfaces/models/interactive/InteractionTypeId.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/models/interactive/Interactive.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/interactive/Timepoint.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/interactive/index.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/interactive-results/InteractiveResult.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/interactive-results/InteractiveResultSet.d.ts +0 -11
- package/dist/libs/shared/src/interfaces/models/interactive-results/StudentAnswer.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/interactive-results/StudentAttempt.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/interactive-results/StudentResult.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/interactive-results/index.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/primitives/BaseObject.d.ts +0 -10
- package/dist/libs/shared/src/interfaces/models/primitives/VirtualObject.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/primitives/index.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/props/ViewProps.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/props/index.d.ts +0 -1
- package/dist/libs/shared/src/interfaces/requests/CreateInteractiveMetadataRequest.d.ts +0 -12
- package/dist/libs/shared/src/interfaces/requests/CreateInteractiveRequest.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/requests/CreateOrUpdateClipRequest.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/requests/EditDetailsRequest.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/requests/EditInteractiveMetadataOriginRequest.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/requests/EditInteractiveMetadataRequest.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/requests/EditInteractiveRequest.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/requests/ReorderRequest.d.ts +0 -12
- package/dist/libs/shared/src/interfaces/requests/UpdateObjectChannel.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/requests/UpdateObjectRating.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/requests/UpdateResourceRequest.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/requests/UpdateVideoRequest.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/requests/index.d.ts +0 -12
- package/dist/libs/shared/src/interfaces/responses/ShareSearchResponse.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/responses/UnionWrapper.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/responses/index.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/services/BaseConfigDataService.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/services/BaseLibraryDataService.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/services/BaseSeriesDataService.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/services/BaseSettingsDataService.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/services/BaseUserDataService.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/services/BaseVideoDataService.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/services/BaseVideoUploadDataService.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/services/index.d.ts +0 -7
- package/dist/libs/shared/src/utils/ArticleHelper.d.ts +0 -5
- package/dist/libs/shared/src/utils/DialogHelper.d.ts +0 -25
- package/dist/libs/shared/src/utils/DurationHelper.d.ts +0 -7
- package/dist/libs/shared/src/utils/ImageHelper.d.ts +0 -33
- package/dist/libs/shared/src/utils/ImageSelectHelper.d.ts +0 -7
- package/dist/libs/shared/src/utils/InteractiveCorrectnessHelper.d.ts +0 -18
- package/dist/libs/shared/src/utils/InteractiveHelper.d.ts +0 -12
- package/dist/libs/shared/src/utils/SvgHelper.d.ts +0 -18
- package/dist/libs/shared/src/utils/UserHelper.d.ts +0 -20
- package/dist/libs/shared/src/utils/interaction-type-helper/InteractionTypeHelper.d.ts +0 -16
- package/dist/player-app.js +0 -89
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-item.d.ts +0 -80
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-items.d.ts +0 -56
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-load-progress.d.ts +0 -55
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-play-progress.d.ts +0 -55
- package/dist/projects/player/src/components/chapter-seek-bar/chapter-seek-bar.d.ts +0 -1
- package/dist/projects/player/src/components/chapters-button/chapter-menu-item.d.ts +0 -60
- package/dist/projects/player/src/components/chapters-button/chapters-button.d.ts +0 -1
- package/dist/projects/player/src/components/cog-button/cog-button.d.ts +0 -49
- package/dist/projects/player/src/components/cog-button/collapsible-heading-menu-item.d.ts +0 -15
- package/dist/projects/player/src/components/collapserator/collapserator.d.ts +0 -6
- package/dist/projects/player/src/components/keyboard-shortcuts-button/keyboard-shortcuts-button.d.ts +0 -1
- package/dist/projects/player/src/components/landing-splash/landing-splash.d.ts +0 -65
- package/dist/projects/player/src/components/landing-splash/metadata/splash-metadata.d.ts +0 -63
- package/dist/projects/player/src/components/landing-splash/metadata/splash-title/splash-title.d.ts +0 -62
- package/dist/projects/player/src/components/landing-splash/metadata/splash-warning/splash-warning.d.ts +0 -60
- package/dist/projects/player/src/components/logo/clickview-logo.d.ts +0 -1
- package/dist/projects/player/src/components/menu/menu.d.ts +0 -23
- package/dist/projects/player/src/components/menu-button/menu-button.d.ts +0 -1
- package/dist/projects/player/src/components/mouse-time-display/mouse-time-display.d.ts +0 -16
- package/dist/projects/player/src/components/next-video-menu-item/next-video-menu-item.d.ts +0 -1
- package/dist/projects/player/src/components/play-pause-feedback/play-pause-feedback.d.ts +0 -1
- package/dist/projects/player/src/components/play-toggle/play-toggle.d.ts +0 -1
- package/dist/projects/player/src/components/playback-rate-button/playback-rate-button.d.ts +0 -1
- package/dist/projects/player/src/components/player/player.d.ts +0 -17
- package/dist/projects/player/src/components/progress-control/progress-control.d.ts +0 -12
- package/dist/projects/player/src/components/quality-selector/quality-button.d.ts +0 -1
- package/dist/projects/player/src/components/quality-selector/quality-menu-item.d.ts +0 -19
- package/dist/projects/player/src/components/seek-bar/seek-bar.d.ts +0 -1
- package/dist/projects/player/src/components/subs-caps-button/SubCapsMenuItem.d.ts +0 -52
- package/dist/projects/player/src/components/subs-caps-button/subs-caps-button.d.ts +0 -1
- package/dist/projects/player/src/components/subs-caps-button/subtitle-search-menu-item.d.ts +0 -55
- package/dist/projects/player/src/components/subs-caps-button/subtitle-size-menu-item.d.ts +0 -53
- package/dist/projects/player/src/components/subtitle-search-button/subtitle-result-menu-item.d.ts +0 -15
- package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-button.d.ts +0 -32
- package/dist/projects/player/src/components/subtitle-search-button/subtitle-search-input.d.ts +0 -28
- package/dist/projects/player/src/components/subtitle-size-button/subtitle-size-button.d.ts +0 -1
- package/dist/projects/player/src/components/text-track-button/off-text-track-menu-item.d.ts +0 -1
- package/dist/projects/player/src/components/text-track-button/text-track-button.d.ts +0 -1
- package/dist/projects/player/src/components/text-track-settings/text-track-settings.d.ts +0 -56
- package/dist/projects/player/src/components/thumbnail-display/thumbnail-display.d.ts +0 -67
- package/dist/projects/player/src/components/time-tooltip/time-tooltip.d.ts +0 -17
- package/dist/projects/player/src/components/time-wrapper/time-wrapper.d.ts +0 -1
- package/dist/projects/player/src/index.d.ts +0 -9
- package/dist/projects/player/src/interfaces/CollapsibleComponent.d.ts +0 -10
- package/dist/projects/player/src/interfaces/NextVideo.d.ts +0 -4
- package/dist/projects/player/src/interfaces/models/ApiError.d.ts +0 -4
- package/dist/projects/player/src/interfaces/models/ClipData.d.ts +0 -4
- package/dist/projects/player/src/interfaces/models/Config.d.ts +0 -7
- package/dist/projects/player/src/interfaces/models/PlaybackObject.d.ts +0 -69
- package/dist/projects/player/src/players/base-player.d.ts +0 -114
- package/dist/projects/player/src/players/create-clip-player.d.ts +0 -20
- package/dist/projects/player/src/players/interactive-player.d.ts +0 -53
- package/dist/projects/player/src/players/player.d.ts +0 -29
- package/dist/projects/player/src/players/reports/reports-player.d.ts +0 -23
- package/dist/projects/player/src/plugins/activity-status-plugin/activity-status-plugin.d.ts +0 -29
- package/dist/projects/player/src/plugins/activity-status-plugin/components/activity-status-button.d.ts +0 -20
- package/dist/projects/player/src/plugins/chromecast-plugin/chromecast-plugin.d.ts +0 -11
- package/dist/projects/player/src/plugins/chromecast-plugin/components/chromecast-button.d.ts +0 -1
- package/dist/projects/player/src/plugins/chromecast-plugin/session-manager.d.ts +0 -73
- package/dist/projects/player/src/plugins/chromecast-plugin/tech/chromecast-tech-ui/chromecast-tech-ui.d.ts +0 -67
- package/dist/projects/player/src/plugins/chromecast-plugin/tech/chromecast-tech.d.ts +0 -1
- package/dist/projects/player/src/plugins/clip-plugin/clip-plugin.d.ts +0 -50
- package/dist/projects/player/src/plugins/create-clip-button-plugin/components/create-clip-button.d.ts +0 -1
- package/dist/projects/player/src/plugins/create-clip-button-plugin/create-clip-button-plugin.d.ts +0 -10
- package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector-handle.d.ts +0 -54
- package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector.d.ts +0 -93
- package/dist/projects/player/src/plugins/create-clip-plugin/components/create-clip-progress-indicator/create-clip-progress-indicator.d.ts +0 -67
- package/dist/projects/player/src/plugins/create-clip-plugin/components/create-clip-seek-bar/create-clip-seek-bar.d.ts +0 -14
- package/dist/projects/player/src/plugins/create-clip-plugin/create-clip-plugin.d.ts +0 -14
- package/dist/projects/player/src/plugins/engagement-overlay-plugin/components/engagement-overlay/engagement-overlay-chart-options.d.ts +0 -7
- package/dist/projects/player/src/plugins/engagement-overlay-plugin/components/engagement-overlay/engagement-overlay.d.ts +0 -73
- package/dist/projects/player/src/plugins/engagement-overlay-plugin/components/engagement-overlay-menu-item/engagement-overlay-menu-item.d.ts +0 -31
- package/dist/projects/player/src/plugins/engagement-overlay-plugin/components/timepoint-interactions/timepoint-interactions.d.ts +0 -8
- package/dist/projects/player/src/plugins/engagement-overlay-plugin/engagement-overlay-plugin.d.ts +0 -35
- package/dist/projects/player/src/plugins/favourite-plugin/components/favourite-button.d.ts +0 -19
- package/dist/projects/player/src/plugins/favourite-plugin/favourite-plugin.d.ts +0 -28
- package/dist/projects/player/src/plugins/fullscreen-on-rotate-plugin/fullscreen-on-rotate-plugin.d.ts +0 -30
- package/dist/projects/player/src/plugins/interactive-plugin/components/add-question-button/add-question-button.d.ts +0 -8
- package/dist/projects/player/src/plugins/interactive-plugin/components/continue-session/continue-session.d.ts +0 -8
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-annotation/create-annotation-helpers.d.ts +0 -9
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-annotation/create-annotation-link.d.ts +0 -13
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-annotation/create-annotation.d.ts +0 -12
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-components.d.ts +0 -7
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-error-feedback/create-error-feedback.d.ts +0 -6
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-image/create-image-cropper.d.ts +0 -15
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-image/create-image.d.ts +0 -15
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-image/upload-image-dropzone.d.ts +0 -6
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-image/upload-image-icon.d.ts +0 -2
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-interaction-buttons/create-interaction-buttons.d.ts +0 -14
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-interaction-heading/create-interaction-heading.d.ts +0 -12
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-missing-word/create-missing-word.d.ts +0 -18
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-multiple-choice/create-multiple-choice.d.ts +0 -18
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-multiple-choice/multiple-choice-answer.d.ts +0 -9
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-short-answer/create-short-answer.d.ts +0 -11
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.d.ts +0 -15
- package/dist/projects/player/src/plugins/interactive-plugin/components/feedback/feedback.d.ts +0 -7
- package/dist/projects/player/src/plugins/interactive-plugin/components/interaction-actions/interaction-actions.d.ts +0 -13
- package/dist/projects/player/src/plugins/interactive-plugin/components/interaction-footer/interaction-footer.d.ts +0 -20
- package/dist/projects/player/src/plugins/interactive-plugin/components/interaction-header/interaction-header.d.ts +0 -14
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive/interactive-component.d.ts +0 -1
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-actions/interactive-actions.d.ts +0 -11
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-icon-button/interactive-icon-button.d.ts +0 -8
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/InteractiveSummaryWrapper.d.ts +0 -22
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/getstudentAttempts.d.ts +0 -14
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/interaction-summary/interaction-summary.d.ts +0 -15
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/interactions-bar/interactions-bar.d.ts +0 -9
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/interactive-summary.d.ts +0 -23
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/progress-summary/progress-summary.d.ts +0 -12
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive-summary/show-summary-button/show-summary-button.d.ts +0 -13
- package/dist/projects/player/src/plugins/interactive-plugin/components/move-timepoint/move-timepoint.d.ts +0 -12
- package/dist/projects/player/src/plugins/interactive-plugin/components/question-list/question-list-empty-state.d.ts +0 -8
- package/dist/projects/player/src/plugins/interactive-plugin/components/question-list/question-list.d.ts +0 -15
- package/dist/projects/player/src/plugins/interactive-plugin/components/reorder-interactions/reorder-interactions.d.ts +0 -9
- package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.d.ts +0 -20
- package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.d.ts +0 -66
- package/dist/projects/player/src/plugins/interactive-plugin/components/sliding-timepoint/sliding-timepoints.d.ts +0 -12
- package/dist/projects/player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.d.ts +0 -40
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/annotation/annotation-interaction.d.ts +0 -3
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.d.ts +0 -4
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/interactive-immersive-reader/interactive-immersive-reader.d.ts +0 -8
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/missing-word/missing-word-interaction.d.ts +0 -13
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.d.ts +0 -13
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/short-answer/short-answer-interaction.d.ts +0 -11
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/true-or-false/true-or-false-interaction.d.ts +0 -12
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-components.d.ts +0 -12
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-error-feedback/view-error-feedback.d.ts +0 -6
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-interaction-buttons/view-iteraction-buttons.d.ts +0 -14
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.d.ts +0 -8
- package/dist/projects/player/src/plugins/interactive-plugin/errors/ReconnectionError.d.ts +0 -8
- package/dist/projects/player/src/plugins/interactive-plugin/grade-passback-plugin.d.ts +0 -29
- package/dist/projects/player/src/plugins/interactive-plugin/hooks/useInteractiveState.d.ts +0 -26
- package/dist/projects/player/src/plugins/interactive-plugin/hooks/useInteractiveTrack.d.ts +0 -23
- package/dist/projects/player/src/plugins/interactive-plugin/hooks/useLockPlayer.d.ts +0 -15
- package/dist/projects/player/src/plugins/interactive-plugin/hooks/useStateManager.d.ts +0 -47
- package/dist/projects/player/src/plugins/interactive-plugin/interactive-plugin.d.ts +0 -59
- package/dist/projects/player/src/plugins/interactive-plugin/interactive-seek-bar-plugin.d.ts +0 -38
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractionComponent.d.ts +0 -3
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractionProps.d.ts +0 -16
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractionResult.d.ts +0 -4
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractiveMode.d.ts +0 -4
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractiveState.d.ts +0 -30
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/LatestSession.d.ts +0 -11
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/ResultSubmission.d.ts +0 -2
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/SubmissionFunction.d.ts +0 -4
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/index.d.ts +0 -8
- package/dist/projects/player/src/plugins/interactive-plugin/utils/InteractiveReducer.d.ts +0 -14
- package/dist/projects/player/src/plugins/interactive-plugin/utils/ResultsService.d.ts +0 -29
- package/dist/projects/player/src/plugins/interactive-plugin/utils/getInteractionComponents.d.ts +0 -3
- package/dist/projects/player/src/plugins/interactive-plugin/utils/getInteractionStateId.d.ts +0 -2
- package/dist/projects/player/src/plugins/interactive-plugin/utils/getTimepointStateId.d.ts +0 -2
- package/dist/projects/player/src/plugins/interactive-plugin/utils/helpers.d.ts +0 -5
- package/dist/projects/player/src/plugins/interactive-plugin/utils/interactive-ajax.d.ts +0 -10
- package/dist/projects/player/src/plugins/localcache-plugin/LocalCache.d.ts +0 -12
- package/dist/projects/player/src/plugins/localcache-plugin/compontents/local-cache-indicator.d.ts +0 -2
- package/dist/projects/player/src/plugins/localcache-plugin/localcache-middleware.d.ts +0 -1
- package/dist/projects/player/src/plugins/localcache-plugin/localcache-plugin.d.ts +0 -62
- package/dist/projects/player/src/plugins/next-video-plugin/components/up-next/up-next.d.ts +0 -1
- package/dist/projects/player/src/plugins/next-video-plugin/next-video-plugin.d.ts +0 -45
- package/dist/projects/player/src/plugins/open-externally-plugin/components/open-externally-button.d.ts +0 -1
- package/dist/projects/player/src/plugins/open-externally-plugin/interfaces/ExternalLinkOptions.d.ts +0 -3
- package/dist/projects/player/src/plugins/open-externally-plugin/open-externally-plugin.d.ts +0 -31
- package/dist/projects/player/src/plugins/persist-quality-settings-plugin/persist-quality-settings-plugin.d.ts +0 -34
- package/dist/projects/player/src/plugins/persist-subtitle-settings-plugin/persist-subtitle-settings-plugin.d.ts +0 -37
- package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.d.ts +0 -26
- package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.test.d.ts +0 -1
- package/dist/projects/player/src/plugins/picture-in-picture-plugin/picture-in-picture-plugin.d.ts +0 -48
- package/dist/projects/player/src/plugins/points-of-interest-plugin/components/point-of-interest-indicator/point-of-interest-indicator.d.ts +0 -99
- package/dist/projects/player/src/plugins/points-of-interest-plugin/components/points-of-interest-menu-item/points-of-interest-menu-item.d.ts +0 -31
- package/dist/projects/player/src/plugins/points-of-interest-plugin/points-of-interest-plugin.d.ts +0 -39
- package/dist/projects/player/src/plugins/progress-reporter-plugin/components/progress-reporter-display.d.ts +0 -57
- package/dist/projects/player/src/plugins/progress-reporter-plugin/interfaces/ProgressEvent.d.ts +0 -8
- package/dist/projects/player/src/plugins/progress-reporter-plugin/progress-reporter-plugin.d.ts +0 -76
- package/dist/projects/player/src/plugins/progressive-files-plugin/ProgressiveFilesPluginOptions.d.ts +0 -4
- package/dist/projects/player/src/plugins/progressive-files-plugin/ProgressiveRepresentation.d.ts +0 -10
- package/dist/projects/player/src/plugins/progressive-files-plugin/interfaces/Source.d.ts +0 -6
- package/dist/projects/player/src/plugins/progressive-files-plugin/progressive-files-plugin.d.ts +0 -41
- package/dist/projects/player/src/plugins/resources-plugin/components/resource-menu-item/resource-menu-item.d.ts +0 -21
- package/dist/projects/player/src/plugins/resources-plugin/components/resources-button/resources-button.d.ts +0 -1
- package/dist/projects/player/src/plugins/resources-plugin/resources-plugin.d.ts +0 -12
- package/dist/projects/player/src/plugins/touch-controls-plugin/components/touch-controls/touch-controls.d.ts +0 -59
- package/dist/projects/player/src/plugins/touch-controls-plugin/touch-controls-plugin.d.ts +0 -41
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/drag-handle/drag-handle.d.ts +0 -53
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/drag-targets/drag-targets.d.ts +0 -54
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/whiteboard-mode-button/whiteboard-mode-button.d.ts +0 -23
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/components/whiteboard-mode-button/whiteboard-mode-menu-item.d.ts +0 -15
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/contants/WhiteboardSides.d.ts +0 -5
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/interfaces/WhiteboardSide.d.ts +0 -1
- package/dist/projects/player/src/plugins/whiteboard-mode-plugin/whiteboard-mode-plugin.d.ts +0 -34
- package/dist/projects/player/src/react/CreateClipPlayer.d.ts +0 -3
- package/dist/projects/player/src/react/InteractivePlayer.d.ts +0 -8
- package/dist/projects/player/src/react/Player.d.ts +0 -10
- package/dist/projects/player/src/react/ReportsPlayer.d.ts +0 -3
- package/dist/projects/player/src/react/react-component.d.ts +0 -11
- package/dist/projects/player/src/services/analytics-service.d.ts +0 -39
- package/dist/projects/player/src/utils/ajax-helper.d.ts +0 -16
- package/dist/projects/player/src/utils/fn.d.ts +0 -44
- package/dist/projects/player/src/utils/formatTime.d.ts +0 -5
- package/dist/projects/player/src/utils/getBufferedEnd.d.ts +0 -2
- package/dist/projects/player/src/utils/hotkeys.d.ts +0 -5
- package/dist/projects/player/src/utils/interactive-track-helper.d.ts +0 -5
- package/dist/projects/player/src/utils/local-storage-helper.d.ts +0 -6
- package/dist/projects/player/src/utils/quality-helper.d.ts +0 -19
- package/dist/projects/player/src/utils/quality-helper.test.d.ts +0 -1
- package/dist/projects/player/src/utils/track-helper.d.ts +0 -8
- package/dist/projects/player/test/players/test-player.d.ts +0 -17
- package/dist/projects/player/test/setupTests.d.ts +0 -0
- package/dist/projects/player/test/utils/test-helpers.d.ts +0 -8
- package/tooling/externals.js +0 -56
package/dist/player-app.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@clickview/player"]=t():e["@clickview/player"]=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=410)}([function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(32))},function(e,t,n){"use strict";e.exports=n(326)},function(e,t,n){"use strict";var r=n(182);n.d(t,"EntityType",(function(){return r.a})),n.d(t,"EventDefaultValue",(function(){return r.b})),n.d(t,"EventVersion",(function(){return r.c})),n.d(t,"InteractionType",(function(){return r.d})),n.d(t,"InteractionTypeDescriptor",(function(){return r.e})),n.d(t,"LocationContext",(function(){return r.f})),n.d(t,"PlayerDescriptor",(function(){return r.g})),n.d(t,"SearchQueryType",(function(){return r.h})),n.d(t,"UserAction",(function(){return r.i})),n.d(t,"WorkflowPhase",(function(){return r.j}));n(97),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195)},function(e,t,n){(function(e,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},o=i._,a=Array.prototype,s=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,l=a.push,c=a.slice,f=s.toString,h=s.hasOwnProperty,d=Array.isArray,p=Object.keys,y=Object.create,m=function(){},v=function(e){return e instanceof v?e:this instanceof v?void(this._wrapped=e):new v(e)};t.nodeType?i._=v:(!n.nodeType&&n.exports&&(t=n.exports=v),t._=v),v.VERSION="1.9.2";var g,b=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},_=function(e,t,n){return v.iteratee!==g?v.iteratee(e,t):null==e?v.identity:v.isFunction(e)?b(e,t,n):v.isObject(e)&&!v.isArray(e)?v.matcher(e):v.property(e)};v.iteratee=g=function(e,t){return _(e,t,1/0)};var w=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}},T=function(e){if(!v.isObject(e))return{};if(y)return y(e);m.prototype=e;var t=new m;return m.prototype=null,t},S=function(e){return function(t){return null==t?void 0:t[e]}},E=function(e,t){return null!=e&&h.call(e,t)},C=function(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0},k=Math.pow(2,53)-1,x=S("length"),O=function(e){var t=x(e);return"number"==typeof t&&t>=0&&t<=k};v.each=v.forEach=function(e,t,n){var r,i;if(t=b(t,n),O(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=v.keys(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e},v.map=v.collect=function(e,t,n){t=_(t,n);for(var r=!O(e)&&v.keys(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o};var P=function(e){var t=function(t,n,r,i){var o=!O(t)&&v.keys(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var u=o?o[s]:s;r=n(r,t[u],u,t)}return r};return function(e,n,r,i){var o=arguments.length>=3;return t(e,b(n,i,4),r,o)}};v.reduce=v.foldl=v.inject=P(1),v.reduceRight=v.foldr=P(-1),v.find=v.detect=function(e,t,n){var r=(O(e)?v.findIndex:v.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},v.filter=v.select=function(e,t,n){var r=[];return t=_(t,n),v.each(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r},v.reject=function(e,t,n){return v.filter(e,v.negate(_(t)),n)},v.every=v.all=function(e,t,n){t=_(t,n);for(var r=!O(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0},v.some=v.any=function(e,t,n){t=_(t,n);for(var r=!O(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1},v.contains=v.includes=v.include=function(e,t,n,r){return O(e)||(e=v.values(e)),("number"!=typeof n||r)&&(n=0),v.indexOf(e,t,n)>=0},v.invoke=w((function(e,t,n){var r,i;return v.isFunction(t)?i=t:v.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),v.map(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=C(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))})),v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=O(e)?e:v.values(e)).length;s<u;s++)null!=(r=e[s])&&r>o&&(o=r);else t=_(t,n),v.each(e,(function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o},v.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=O(e)?e:v.values(e)).length;s<u;s++)null!=(r=e[s])&&r<o&&(o=r);else t=_(t,n),v.each(e,(function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)}));return o},v.shuffle=function(e){return v.sample(e,1/0)},v.sample=function(e,t,n){if(null==t||n)return O(e)||(e=v.values(e)),e[v.random(e.length-1)];var r=O(e)?v.clone(e):v.values(e),i=x(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=v.random(a,o),u=r[a];r[a]=r[s],r[s]=u}return r.slice(0,t)},v.sortBy=function(e,t,n){var r=0;return t=_(t,n),v.pluck(v.map(e,(function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),"value")};var R=function(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=_(r,i),v.each(n,(function(t,i){var a=r(t,i,n);e(o,t,a)})),o}};v.groupBy=R((function(e,t,n){E(e,n)?e[n].push(t):e[n]=[t]})),v.indexBy=R((function(e,t,n){e[n]=t})),v.countBy=R((function(e,t,n){E(e,n)?e[n]++:e[n]=1}));var A=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;v.toArray=function(e){return e?v.isArray(e)?c.call(e):v.isString(e)?e.match(A):O(e)?v.map(e,v.identity):v.values(e):[]},v.size=function(e){return null==e?0:O(e)?e.length:v.keys(e).length},v.partition=R((function(e,t,n){e[n?0:1].push(t)}),!0),v.first=v.head=v.take=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[0]:v.initial(e,e.length-t)},v.initial=function(e,t,n){return c.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},v.last=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[e.length-1]:v.rest(e,Math.max(0,e.length-t))},v.rest=v.tail=v.drop=function(e,t,n){return c.call(e,null==t||n?1:t)},v.compact=function(e){return v.filter(e,Boolean)};var j=function(e,t,n,r){for(var i=(r=r||[]).length,o=0,a=x(e);o<a;o++){var s=e[o];if(O(s)&&(v.isArray(s)||v.isArguments(s)))if(t)for(var u=0,l=s.length;u<l;)r[i++]=s[u++];else j(s,t,n,r),i=r.length;else n||(r[i++]=s)}return r};v.flatten=function(e,t){return j(e,t,!1)},v.without=w((function(e,t){return v.difference(e,t)})),v.uniq=v.unique=function(e,t,n,r){v.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=_(n,r));for(var i=[],o=[],a=0,s=x(e);a<s;a++){var u=e[a],l=n?n(u,a,e):u;t&&!n?(a&&o===l||i.push(u),o=l):n?v.contains(o,l)||(o.push(l),i.push(u)):v.contains(i,u)||i.push(u)}return i},v.union=w((function(e){return v.uniq(j(e,!0,!0))})),v.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=x(e);r<i;r++){var o=e[r];if(!v.contains(t,o)){var a;for(a=1;a<n&&v.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},v.difference=w((function(e,t){return t=j(t,!0,!0),v.filter(e,(function(e){return!v.contains(t,e)}))})),v.unzip=function(e){for(var t=e&&v.max(e,x).length||0,n=Array(t),r=0;r<t;r++)n[r]=v.pluck(e,r);return n},v.zip=w(v.unzip),v.object=function(e,t){for(var n={},r=0,i=x(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n};var I=function(e){return function(t,n,r){n=_(n,r);for(var i=x(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}};v.findIndex=I(1),v.findLastIndex=I(-1),v.sortedIndex=function(e,t,n,r){for(var i=(n=_(n,r,1))(t),o=0,a=x(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o};var L=function(e,t,n){return function(r,i,o){var a=0,s=x(r);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(c.call(r,a,s),v.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(r[o]===i)return o;return-1}};v.indexOf=L(1,v.findIndex,v.sortedIndex),v.lastIndexOf=L(-1,v.findLastIndex),v.range=function(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i},v.chunk=function(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(c.call(e,r,r+=t));return n};var D=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=T(e.prototype),a=e.apply(o,i);return v.isObject(a)?a:o};v.bind=w((function(e,t,n){if(!v.isFunction(e))throw new TypeError("Bind must be called on a function");var r=w((function(i){return D(e,r,t,this,n.concat(i))}));return r})),v.partial=w((function(e,t){var n=v.partial.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return D(e,r,this,this,a)};return r})),v.partial.placeholder=v,v.bindAll=w((function(e,t){var n=(t=j(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=v.bind(e[r],e)}})),v.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return E(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},v.delay=w((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})),v.defer=v.partial(v.delay,v,1),v.throttle=function(e,t,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!1===n.leading?0:v.now(),r=null,a=e.apply(i,o),r||(i=o=null)},l=function(){var l=v.now();s||!1!==n.leading||(s=l);var c=t-(l-s);return i=this,o=arguments,c<=0||c>t?(r&&(clearTimeout(r),r=null),s=l,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,c)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l},v.debounce=function(e,t,n){var r,i,o=function(t,n){r=null,n&&(i=e.apply(t,n))},a=w((function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,t),s&&(i=e.apply(this,a))}else r=v.delay(o,t,this,a);return i}));return a.cancel=function(){clearTimeout(r),r=null},a},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},v.once=v.partial(v.before,2),v.restArguments=w;var M=!{toString:null}.propertyIsEnumerable("toString"),N=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(e,t){var n=N.length,r=e.constructor,i=v.isFunction(r)&&r.prototype||s,o="constructor";for(E(e,o)&&!v.contains(t,o)&&t.push(o);n--;)(o=N[n])in e&&e[o]!==i[o]&&!v.contains(t,o)&&t.push(o)};v.keys=function(e){if(!v.isObject(e))return[];if(p)return p(e);var t=[];for(var n in e)E(e,n)&&t.push(n);return M&&B(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var n in e)t.push(n);return M&&B(e,t),t},v.values=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},v.mapObject=function(e,t,n){t=_(t,n);for(var r=v.keys(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o},v.pairs=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},v.invert=function(e){for(var t={},n=v.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},v.functions=v.methods=function(e){var t=[];for(var n in e)v.isFunction(e[n])&&t.push(n);return t.sort()};var U=function(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,u=0;u<s;u++){var l=a[u];t&&void 0!==n[l]||(n[l]=o[l])}return n}};v.extend=U(v.allKeys),v.extendOwn=v.assign=U(v.keys),v.findKey=function(e,t,n){t=_(t,n);for(var r,i=v.keys(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r};var F,V,H=function(e,t,n){return t in n};v.pick=w((function(e,t){var n={},r=t[0];if(null==e)return n;v.isFunction(r)?(t.length>1&&(r=b(r,t[1])),t=v.allKeys(e)):(r=H,t=j(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n})),v.omit=w((function(e,t){var n,r=t[0];return v.isFunction(r)?(r=v.negate(r),t.length>1&&(n=t[1])):(t=v.map(j(t,!1,!1),String),r=function(e,n){return!v.contains(t,n)}),v.pick(e,r,n)})),v.defaults=U(v.allKeys,!0),v.create=function(e,t){var n=T(e);return t&&v.extendOwn(n,t),n},v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e},v.tap=function(e,t){return t(e),e},v.isMatch=function(e,t){var n=v.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0},F=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&V(e,t,n,r)},V=function(e,t,n,r){e instanceof v&&(e=e._wrapped),t instanceof v&&(t=t._wrapped);var i=f.call(e);if(i!==f.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return u.valueOf.call(e)===u.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(v.isFunction(a)&&a instanceof a&&v.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var l=(n=n||[]).length;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),o){if((l=e.length)!==t.length)return!1;for(;l--;)if(!F(e[l],t[l],n,r))return!1}else{var c,h=v.keys(e);if(l=h.length,v.keys(t).length!==l)return!1;for(;l--;)if(c=h[l],!E(t,c)||!F(e[c],t[c],n,r))return!1}return n.pop(),r.pop(),!0},v.isEqual=function(e,t){return F(e,t)},v.isEmpty=function(e){return null==e||(O(e)&&(v.isArray(e)||v.isString(e)||v.isArguments(e))?0===e.length:0===v.keys(e).length)},v.isElement=function(e){return!(!e||1!==e.nodeType)},v.isArray=d||function(e){return"[object Array]"===f.call(e)},v.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},v.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],(function(e){v["is"+e]=function(t){return f.call(t)==="[object "+e+"]"}})),v.isArguments(arguments)||(v.isArguments=function(e){return E(e,"callee")});var z=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof z&&(v.isFunction=function(e){return"function"==typeof e||!1}),v.isFinite=function(e){return!v.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},v.isNaN=function(e){return v.isNumber(e)&&isNaN(e)},v.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===f.call(e)},v.isNull=function(e){return null===e},v.isUndefined=function(e){return void 0===e},v.has=function(e,t){if(!v.isArray(t))return E(e,t);for(var n=t.length,r=0;r<n;r++){var i=t[r];if(null==e||!h.call(e,i))return!1;e=e[i]}return!!n},v.noConflict=function(){return i._=o,this},v.identity=function(e){return e},v.constant=function(e){return function(){return e}},v.noop=function(){},v.property=function(e){return v.isArray(e)?function(t){return C(t,e)}:S(e)},v.propertyOf=function(e){return null==e?function(){}:function(t){return v.isArray(t)?C(e,t):e[t]}},v.matcher=v.matches=function(e){return e=v.extendOwn({},e),function(t){return v.isMatch(t,e)}},v.times=function(e,t,n){var r=Array(Math.max(0,e));t=b(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},v.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},v.now=Date.now||function(){return(new Date).getTime()};var q={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},W=v.invert(q),$=function(e){var t=function(t){return e[t]},n="(?:"+v.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};v.escape=$(q),v.unescape=$(W),v.result=function(e,t,n){v.isArray(t)||(t=[t]);var r=t.length;if(!r)return v.isFunction(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=v.isFunction(o)?o.call(e):o}return e};var G=0;v.uniqueId=function(e){var t=++G+"";return e?e+t:t},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,Y={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},X=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+Y[e]};v.template=function(e,t,n){!t&&n&&(t=n),t=v.defaults({},t,v.templateSettings);var r,i=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,(function(t,n,r,i,s){return a+=e.slice(o,s).replace(X,Q),o=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),t})),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return r.call(this,e,v)},u=t.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},v.chain=function(e){var t=v(e);return t._chain=!0,t};var J=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){return v.each(v.functions(e),(function(t){var n=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];return l.apply(e,arguments),J(this,n.apply(v,e))}})),v},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=a[e];v.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],J(this,n)}})),v.each(["concat","join","slice"],(function(e){var t=a[e];v.prototype[e]=function(){return J(this,t.apply(this._wrapped,arguments))}})),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return v}.apply(t,[]))||(n.exports=r)}()}).call(this,n(32),n(395)(e))},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},o=n(327);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=r}).call(this,n(32))},function(e,t,n){var r=n(14),i=n(46).f,o=n(29),a=n(41),s=n(109),u=n(219),l=n(114);e.exports=function(e,t){var n,c,f,h,d,p=e.target,y=e.global,m=e.stat;if(n=y?r:m?r[p]||s(p,{}):(r[p]||{}).prototype)for(c in t){if(h=t[c],f=e.noTargetGet?(d=i(n,c))&&d.value:n[c],!l(y?c:p+(m?".":"#")+c,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(n,c,h,e)}}},function(e,t,n){var r=n(127);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r,i,o=n(10),a=n(12),s=n(103);!function(e){e[e.Ok=200]="Ok",e[e.NoContent=204]="NoContent",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.Conflict=409]="Conflict",e[e.InternalServer=500]="InternalServer"}(r||(r={})),function(e){e[e.Information=1]="Information",e[e.Success=2]="Success",e[e.Redirect=3]="Redirect",e[e.ClientError=4]="ClientError",e[e.ServerError=5]="ServerError"}(i||(i={}));var u=n(13);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function p(e){var t=g();return function(){var n,r=_(e);if(t){var i=_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){var t="function"==typeof Map?new Map:void 0;return(m=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return v(e,arguments,_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),b(r,e)})(e)}function v(e,t,n){return(v=g()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&b(i,n.prototype),i}).apply(null,arguments)}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return T})),n.d(t,"b",(function(){return S})),n.d(t,"c",(function(){return C}));var w=function(e){d(n,e);var t=p(n);function n(e){return h(this,n),t.call(this,e)}return f(n)}(m(Error)),T=function(e){d(n,e);var t=p(n);function n(){return h(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"SilentError"}}]),n}(w),S=function(e){d(n,e);var t=p(n);function n(){return h(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"CoreError"}}]),n}(m(Error)),E={},C={throw:function(e){if(o.Radio.channel(a.a.SHELL).trigger(u.a.ERROR,e),!(e instanceof T||s.a.isDevelopment))throw e},delayedThrow:function(e,t,n){E[e]||(E[e]=!0,window.setTimeout((function(){C.throw(t),delete E[e]}),n))},isStatusCodeError:function(e){var t,n=+(null===(t=null==e?void 0:e.toString())||void 0===t?void 0:t.substr(0,1));return n===i.ClientError||n===i.ServerError}}},function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var n,o=String(e);return(n=r[o.toLowerCase()])?n:(n=i[o.toLowerCase()])||(1===o.length?o.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var o;if(o=r[t.toLowerCase()])return o===n;if(o=i[t.toLowerCase()])return o===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};
|
|
2
|
-
/*!
|
|
3
|
-
* Programatically add the following
|
|
4
|
-
*/
|
|
5
|
-
for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=o;for(o=1;o<13;o++)r["f"+o]=o+111;for(o=0;o<10;o++)r["numpad "+o]=o+96;var a=t.names=t.title={};for(o in r)a[r[o]]=o;for(var s in i)r[s]=i[s]},function(e,t,n){(function(r){var i,o,a;a="object"==typeof self&&self.self===self&&self||"object"==typeof r&&r.global===r&&r,i=[n(3),n(396),t],void 0===(o=function(e,t,n){a.Backbone=function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.3.3",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var a=function(e,t,r){n.each(t,(function(t,i){n[i]&&(e.prototype[i]=function(e,t,r){switch(e){case 1:return function(){return n[t](this[r])};case 2:return function(e){return n[t](this[r],e)};case 3:return function(e,i){return n[t](this[r],s(e,this),i)};case 4:return function(e,i,o){return n[t](this[r],s(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),n[t].apply(n,e)}}}(t,i,r))}))},s=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?u(e):n.isString(e)?function(t){return t.get(e)}:e},u=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}},l=t.Events={},c=/\s+/,f=function(e,t,r,i,o){var a,s=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)t=f(e,t,a[s],r[a[s]],o)}else if(r&&c.test(r))for(a=r.split(c);s<a.length;s++)t=e(t,a[s],i,o);else t=e(t,r,i,o);return t};l.on=function(e,t,n){return h(this,e,t,n)};var h=function(e,t,n,r,i){return e._events=f(d,e._events||{},t,n,{context:r,ctx:e,listening:i}),i&&((e._listeners||(e._listeners={}))[i.id]=i),e};l.listenTo=function(e,t,r){if(!e)return this;var i=e._listenId||(e._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=o[i];if(!a){var s=this._listenId||(this._listenId=n.uniqueId("l"));a=o[i]={obj:e,objId:i,id:s,listeningTo:o,count:0}}return h(e,t,r,this,a),this};var d=function(e,t,n,r){if(n){var i=e[t]||(e[t]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return e};l.off=function(e,t,n){return this._events?(this._events=f(p,this._events,e,t,{context:n,listeners:this._listeners}),this):this},l.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(t,r,this)}return this};var p=function(e,t,r,i){if(e){var o,a=0,s=i.context,u=i.listeners;if(t||r||s){for(var l=t?[t]:n.keys(e);a<l.length;a++){var c=e[t=l[a]];if(!c)break;for(var f=[],h=0;h<c.length;h++){var d=c[h];r&&r!==d.callback&&r!==d.callback._callback||s&&s!==d.context?f.push(d):(o=d.listening)&&0==--o.count&&(delete u[o.id],delete o.listeningTo[o.objId])}f.length?e[t]=f:delete e[t]}return e}for(var p=n.keys(u);a<p.length;a++)delete u[(o=u[p[a]]).id],delete o.listeningTo[o.objId]}};l.once=function(e,t,r){var i=f(y,{},e,t,n.bind(this.off,this));return"string"==typeof e&&null==r&&(t=void 0),this.on(i,t,r)},l.listenToOnce=function(e,t,r){var i=f(y,{},t,r,n.bind(this.stopListening,this,e));return this.listenTo(e,i)};var y=function(e,t,r,i){if(r){var o=e[t]=n.once((function(){i(t,o),r.apply(this,arguments)}));o._callback=r}return e};l.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return f(m,this._events,e,void 0,n),this};var m=function(e,t,n,r){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice()),i&&v(i,r),o&&v(o,[t].concat(r))}return e},v=function(e,t){var n,r=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}};l.bind=l.on,l.unbind=l.off,n.extend(t,l);var g=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(g.prototype,l,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var i;if("object"==typeof e?(i=e,r=t):(i={})[e]=t,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var l=this.attributes,c=this.changed,f=this._previousAttributes;for(var h in i)t=i[h],n.isEqual(l[h],t)||s.push(h),n.isEqual(f[h],t)?delete c[h]:c[h]=t,o?delete l[h]:l[h]=t;if(this.idAttribute in i&&(this.id=this.get(this.idAttribute)),!a){s.length&&(this._pending=r);for(var d=0;d<s.length;d++)this.trigger("change:"+s[d],this,l[s[d]],r)}if(u)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,r={};for(var i in e){var o=e[i];n.isEqual(t[i],o)||(r[i]=o)}return!!n.size(r)&&r},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var i=e.parse?t.parse(n,e):n;if(!t.set(i,e))return!1;r&&r.call(e.context,t,n,e),t.trigger("sync",t,n,e)},N(this,e),this.sync("read",this,e)},save:function(e,t,r){var i;null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var a=this,s=r.success,u=this.attributes;r.success=function(e){a.attributes=u;var t=r.parse?a.parse(e,r):e;if(o&&(t=n.extend({},i,t)),t&&!a.set(t,r))return!1;s&&s.call(r.context,a,e,r),a.trigger("sync",a,e,r)},N(this,r),i&&o&&(this.attributes=n.extend({},u,i));var l=this.isNew()?"create":r.patch?"patch":"update";"patch"!==l||r.attrs||(r.attrs=i);var c=this.sync(l,this,r);return this.attributes=u,c},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=e.wait,o=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){i&&o(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var a=!1;return this.isNew()?n.defer(e.success):(N(this,e),a=this.sync("delete",this,e)),i||o(),a},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||M();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}}),a(g,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var b=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},_={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},T=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,i=Array(e.length-n),o=t.length;for(r=0;r<i.length;r++)i[r]=e[r+n];for(r=0;r<o;r++)e[r+n]=t[r];for(r=0;r<i.length;r++)e[r+o+n]=i[r]};n.extend(b.prototype,l,{model:g,initialize:function(){},toJSON:function(e){return this.map((function(t){return t.toJSON(e)}))},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,w))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var i=this._removeModels(e,t);return!t.silent&&i.length&&(t.changes={added:[],merged:[],removed:i},this.trigger("update",this,t)),r?i[0]:i},set:function(e,t){if(null!=e){(t=n.extend({},_,t)).parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var i=t.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],u=[],l=[],c=[],f={},h=t.add,d=t.merge,p=t.remove,y=!1,m=this.comparator&&null==i&&!1!==t.sort,v=n.isString(this.comparator)?this.comparator:null;for(a=0;a<e.length;a++){o=e[a];var g=this.get(o);if(g){if(d&&o!==g){var b=this._isModel(o)?o.attributes:o;t.parse&&(b=g.parse(b,t)),g.set(b,t),l.push(g),m&&!y&&(y=g.hasChanged(v))}f[g.cid]||(f[g.cid]=!0,s.push(g)),e[a]=g}else h&&(o=e[a]=this._prepareModel(o,t))&&(u.push(o),this._addReference(o,t),f[o.cid]=!0,s.push(o))}if(p){for(a=0;a<this.length;a++)f[(o=this.models[a]).cid]||c.push(o);c.length&&this._removeModels(c,t)}var w=!1,S=!m&&h&&p;if(s.length&&S?(w=this.length!==s.length||n.some(this.models,(function(e,t){return e!==s[t]})),this.models.length=0,T(this.models,s,0),this.length=this.models.length):u.length&&(m&&(y=!0),T(this.models,u,null==i?this.length:i),this.length=this.models.length),y&&this.sort({silent:!0}),!t.silent){for(a=0;a<u.length;a++)null!=i&&(t.index=i+a),(o=u[a]).trigger("add",o,this,t);(y||w)&&this.trigger("sort",this,t),(u.length||c.length||l.length)&&(t.changes={added:u,removed:c,merged:l},this.trigger("update",this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(e.attributes||e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=n.bind(t,this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){var t=(e=n.extend({parse:!0},e)).success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},N(this,e),this.sync("read",this,e)},create:function(e,t){var r=(t=t?n.clone(t):{}).wait;if(!(e=this._prepareModel(e,t)))return!1;r||this.add(e,t);var i=this,o=t.success;return t.success=function(e,t,n){r&&i.add(e,n),o&&o.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;(t=t?n.clone(t):{}).collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=this.get(e[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes);null!=a&&delete this._byId[a],t.silent||(t.index=o,i.trigger("remove",i,this,t)),n.push(i),this._removeReference(i,t)}}return n},_isModel:function(e){return e instanceof g},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"change"===e){var i=this.modelId(t.previousAttributes()),o=this.modelId(t.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=t))}}this.trigger.apply(this,arguments)}}),a(b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var S=t.View=function(e){this.cid=n.uniqueId("view"),n.extend(this,n.pick(e,C)),this._ensureElement(),this.initialize.apply(this,arguments)},E=/^(\S+)\s*(.*)$/,C=["model","collection","el","id","attributes","className","tagName","events"];n.extend(S.prototype,l,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var i=t.match(E);this.delegate(i[1],i[2],n.bind(r,this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}}),t.sync=function(e,r,i){var o=k[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||M()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",o),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var u=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,u&&u.call(i.context,e,t,n)};var l=i.xhr=t.ajax(n.extend(a,i));return r.trigger("request",r,l,i),l};var k={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var x=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},O=/\((.*?)\)/g,P=/(\(\?)?:\w+/g,R=/\*\w+/g,A=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(x.prototype,l,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,(function(n){var a=o._extractParameters(e,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),t.history.trigger("route",o,r,a))})),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(A,"\\$&").replace(O,"(?:$1)?").replace(P,(function(e,t){return t?e:"([^/?]+)"})).replace(R,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,(function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null}))}});var j=t.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},I=/^[#\/]|\s+$/g,L=/^\/+|\/+$/g,D=/#.*$/;j.started=!1,n.extend(j.prototype,l,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(I,"")},start:function(e){if(j.started)throw new Error("Backbone.history has already been started");if(j.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(L,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),j.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,(function(t){if(t.route.test(e))return t.callback(e),!0})))},navigate:function(e,t){if(!j.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;if(e=this.decodeFragment(e.replace(D,"")),this.fragment!==e){if(this.fragment=e,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new j,g.extend=b.extend=x.extend=S.extend=j.extend=function(e,t){var r,i=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,t),r.prototype=n.create(i.prototype,e),r.prototype.constructor=r,r.__super__=i.prototype,r};var M=function(){throw new Error('A "url" property or function must be specified')},N=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t}(a,n,e,t)}.apply(t,i))||(e.exports=o)}).call(this,n(32))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={SHELL:"global:shell",ALERT:"global:alert",POPUP:"global:popup"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={SHOW_POPUP:"show:popup",ROUTE:"route",LOCK_NAV:"lock:nav",UNLOCK_NAV:"unlock:nav",NAV_IS_LOCKED:"navigation:islocked",NAV_UNLOCKED_BY_USER:"navigation:unlocked:by:user",ROUTING_START:"routing:start",ROUTING_END:"routing:end",HAS_ACTIVE_ROUTE:"has:active:route",ROUTE_LOOKUP:"route:look:up",URL_CHANGE:"url:change",ERROR:"error",CURRENT_ROUTE:"route:current"}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(32))},function(e,t,n){var r=n(49),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(14),i=n(70),o=n(81),a=n(145),s=r.Symbol,u=i("wks");e.exports=function(e){return u[e]||(u[e]=a&&s[e]||(a?s:o)("Symbol."+e))}},function(e,t,n){var r=n(11);e.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=n(398)()},function(e,t,n){"use strict";
|
|
6
|
-
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(55))&&"object"==typeof r&&"default"in r?r.default:r,o={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],s=["Video","Audio","Text"],u=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},l=function(e){return e.map(u)},c=function(e){void 0===e&&(e="");var t=e.split(","),n={},r=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(r){var i=o[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var a=e.substring(0,i[1].length),s=e.replace(a,"");n[r]={type:a,details:s}}})),t||r.push(e)})),r.length&&(n.unknown=r),n},f=function(e){return void 0===e&&(e=""),o.audio.test(e.trim().toLowerCase())},h=function(e){return void 0===e&&(e=""),o.text.test(e.trim().toLowerCase())},d=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().split(",").map((function(e){return u(e.trim())})),n="video";1===t.length&&f(t[0])?n="audio":1===t.length&&h(t[0])&&(n="application");var r="mp4";return t.every((function(e){return o.mp4.test(e)}))?r="mp4":t.every((function(e){return o.webm.test(e)}))?r="webm":t.every((function(e){return o.ogg.test(e)}))&&(r="ogg"),n+"/"+r+';codecs="'+e+'"'}};t.DEFAULT_AUDIO_CODEC="mp4a.40.2",t.DEFAULT_VIDEO_CODEC="avc1.4d400d",t.browserSupportsCodec=function(e){return void 0===e&&(e=""),i.MediaSource&&i.MediaSource.isTypeSupported&&i.MediaSource.isTypeSupported(d(e))||!1},t.codecsFromDefault=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return c(i.playlists[0].attributes.CODECS)}return null},t.getMimeForCodec=d,t.isAudioCodec=f,t.isTextCodec=h,t.isVideoCodec=function(e){return void 0===e&&(e=""),o.video.test(e.trim().toLowerCase())},t.mapLegacyAvcCodecs=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return l([e])[0]}))},t.muxerSupportsCodec=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<s.length;t++){if(o["muxer"+s[t]].test(e))return!0}return!1}))},t.parseCodecs=c,t.translateLegacyCodec=u,t.translateLegacyCodecs=l},function(e,t,n){var r=n(25);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10);function i(e,t,n,i){var o=e;return"string"==typeof e&&(o=r.Radio.channel(e)),i.call(this,o,t,n)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return p}));var r=n(3),i=n(10),o=n(36),a=n(12),s=n(13),u=/((\(\?)?:\w+)|(\*\w+)/,l=/[\(\)]/g,c=/\(\/\)/g,f=/\/$/,h={routingStarted:function(){i.Radio.channel(a.a.SHELL).trigger(s.a.ROUTING_START)},routingEnded:function(){h.hasActiveRoute()&&i.Radio.channel(a.a.SHELL).trigger(s.a.ROUTING_END)},hasActiveRoute:function(){return i.Radio.channel(a.a.SHELL).request(s.a.HAS_ACTIVE_ROUTE)}},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.usedHelper=!0;var n=e.application,r=e.action;i.Radio.channel(n).trigger(r,e,t)},p={getHref:function(e){if(!e)return"";var t=e.application,n=e.action,r=e.args,o=e.params,u=i.Radio.channel(a.a.SHELL).request(s.a.ROUTE_LOOKUP,"".concat(t,":").concat(n),r,o);return!1===u?"":"/".concat(u)},buildRoute:function(e,t){if(!t)return e;var n=t.args,i=t.params;if(r.each(n,(function(t){e=e.replace(u,t||"")})),e=(e=(e=e.replace(c,"")).replace(l,"")).replace(f,""),!i)return e;var a=o.a.SerializeQueryParams(i);return a.length?"".concat(e,"?").concat(a):e},trigger:function(e,t){e&&(h.hasActiveRoute()?i.Radio.channel(a.a.SHELL).once("routing:end",(function(){d(e,t)})):d(e,t))},getCurrentAppLink:function(){return i.Radio.channel(a.a.SHELL).request(s.a.CURRENT_ROUTE)}}},function(e,t,n){var r=n(18);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(17),i=n(139),o=n(24),a=n(60),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=function(e,t,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n;var r=function(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e.apply(t,r)}},i=e.Model.extend,o=function e(n,r){t.isObject(n)&&(n=n.prev+" is going to be removed in the future. Please use "+n.next+" instead."+(n.url?" See: "+n.url:"")),je.DEV_MODE&&(void 0!==r&&r||e._cache[n]||(e._warn("Deprecation warning: "+n),e._cache[n]=!0))};o._console="undefined"!=typeof console?console:{},o._warn=function(){var e=o._console.warn||o._console.log||t.noop;return e.apply(o._console,arguments)},o._cache={};var a=function(e){return document.documentElement.contains(e&&e.parentNode)},s=function(e,n){var r=this;e&&t.each(n,(function(t){var n=e[t];void 0!==n&&(r[t]=n)}))},u=function(e){if(e)return this.options&&void 0!==this.options[e]?this.options[e]:this[e]},l=function(e){var n=this;return t.reduce(e,(function(e,r,i){return t.isFunction(r)||(r=n[r]),r&&(e[i]=r),e}),{})},c=/(^|:)(\w)/gi;function f(e,t,n){return n.toUpperCase()}var h=t.memoize((function(e){return"on"+e.replace(c,f)}));function d(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=h(e),a=u.call(this,o),s=void 0;return t.isFunction(a)&&(s=a.apply(this,r)),this.trigger.apply(this,arguments),s}function p(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.isFunction(e.triggerMethod)?e.triggerMethod.apply(e,r):d.apply(e,r)}function y(e,n,r){e._getImmediateChildren&&t.each(e._getImmediateChildren(),(function(e){r(e)&&p(e,n,e)}))}function m(e){return!e._isAttached}function v(e){return!!m(e)&&(e._isAttached=!0,!0)}function g(e){return e._isAttached}function b(e){return!!g(e)&&(e._isAttached=!1,!0)}function _(e){e._isAttached&&e._isRendered&&p(e,"dom:refresh",e)}function w(e){e._isAttached&&e._isRendered&&p(e,"dom:remove",e)}function T(){y(this,"before:attach",m)}function S(){y(this,"attach",v),_(this)}function E(){y(this,"before:detach",g),w(this)}function C(){y(this,"detach",b)}function k(){w(this)}function x(){_(this)}function O(e){e._areViewEventsMonitored||!1===e.monitorViewEvents||(e._areViewEventsMonitored=!0,e.on({"before:attach":T,attach:S,"before:detach":E,detach:C,"before:render":k,render:x}))}var P=["description","fileName","lineNumber","name","message","number"],R=i.call(Error,{urlRoot:"http://marionettejs.com/docs/v3.5.1/",constructor:function(e,n){t.isObject(e)?e=(n=e).message:n||(n={});var r=Error.call(this,e);t.extend(this,t.pick(r,P),t.pick(n,P)),this.captureStackTrace(),n.url&&(this.url=this.urlRoot+n.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.captureStackTrace(this,R)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}});function A(e,n,r,i){if(!t.isObject(r))throw new R({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindevents"});t.each(r,(function(r,a){t.isString(r)?function(e,n,r,i,a){var s=i.split(/\s+/);s.length>1&&o("Multiple handlers for a single event are deprecated. If needed, use a single handler to call multiple methods."),t.each(s,(function(t){var i=e[t];if(!i)throw new R('Method "'+t+'" was configured as an event handler, but does not exist.');e[a](n,r,i)}))}(e,n,a,r,i):e[i](n,a,r)}))}function j(e,t){return e&&t?(A(this,e,t,"listenTo"),this):this}function I(e,t){return e?t?(A(this,e,t,"stopListening"),this):(this.stopListening(e),this):this}function L(e,n,r,i){if(!t.isObject(r))throw new R({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindrequests"});var o=l.call(e,r);n[i](o,e)}function D(e,t){return e&&t?(L(this,e,t,"reply"),this):this}function M(e,t){return e?t?(L(this,e,t,"stopReplying"),this):(e.stopReplying(null,null,this),this):this}R.extend=i;var N={normalizeMethods:l,_setOptions:function(e){this.options=t.extend({},t.result(this,"options"),e)},mergeOptions:s,getOption:u,bindEvents:j,unbindEvents:I},B={_initRadio:function(){var e=t.result(this,"channelName");if(e){if(!n)throw new R({name:"BackboneRadioMissing",message:'The dependency "backbone.radio" is missing.'});var r=this._channel=n.channel(e),i=t.result(this,"radioEvents");this.bindEvents(r,i);var o=t.result(this,"radioRequests");this.bindRequests(r,o),this.on("destroy",this._destroyRadio)}},_destroyRadio:function(){this._channel.stopReplying(null,null,this)},getChannel:function(){return this._channel},bindEvents:j,unbindEvents:I,bindRequests:D,unbindRequests:M},U=["channelName","radioEvents","radioRequests"],F=function(e){this.hasOwnProperty("options")||this._setOptions(e),this.mergeOptions(e,U),this._setCid(),this._initRadio(),this.initialize.apply(this,arguments)};F.extend=i,t.extend(F.prototype,e.Events,N,B,{cidPrefix:"mno",_isDestroyed:!1,isDestroyed:function(){return this._isDestroyed},initialize:function(){},_setCid:function(){this.cid||(this.cid=t.uniqueId(this.cidPrefix))},destroy:function(){if(this._isDestroyed)return this;for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.triggerMethod.apply(this,["before:destroy",this].concat(t)),this._isDestroyed=!0,this.triggerMethod.apply(this,["destroy",this].concat(t)),this.stopListening(),this},triggerMethod:d});var V=function(e){this.templateId=e};t.extend(V,{templateCaches:{},get:function(e,t){var n=this.templateCaches[e];return n||(n=new V(e),this.templateCaches[e]=n),n.load(t)},clear:function(){for(var e=void 0,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.length;if(i>0)for(e=0;e<i;e++)delete this.templateCaches[n[e]];else this.templateCaches={}}}),t.extend(V.prototype,{load:function(e){if(this.compiledTemplate)return this.compiledTemplate;var t=this.loadTemplate(this.templateId,e);return this.compiledTemplate=this.compileTemplate(t,e),this.compiledTemplate},loadTemplate:function(t,n){var r=e.$(t);if(!r.length)throw new R({name:"NoTemplateError",message:'Could not find template: "'+t+'"'});return r.html()},compileTemplate:function(e,n){return t.template(e,n)}});var H=t.invokeMap||t.invoke;function z(e,n){return t.chain(n).map((function(n,r){var i=function(e,n){return e.behaviorClass?e.behaviorClass:t.isFunction(e)?e:t.isFunction(je.Behaviors.behaviorsLookup)?je.Behaviors.behaviorsLookup(e,n)[n]:je.Behaviors.behaviorsLookup[n]}(n,r),o=new i(n===i?{}:n,e),a=z(e,t.result(o,"behaviors"));return[o].concat(a)})).flatten().value()}var q={_initBehaviors:function(){this._behaviors=this._getBehaviors()},_getBehaviors:function(){var e=t.result(this,"behaviors");return t.isObject(e)?z(this,e):{}},_getBehaviorTriggers:function(){var e=H(this._behaviors,"getTriggers");return t.reduce(e,(function(e,n){return t.extend(e,n)}),{})},_getBehaviorEvents:function(){var e=H(this._behaviors,"getEvents");return t.reduce(e,(function(e,n){return t.extend(e,n)}),{})},_proxyBehaviorViewProperties:function(){H(this._behaviors,"proxyViewProperties")},_delegateBehaviorEntityEvents:function(){H(this._behaviors,"delegateEntityEvents")},_undelegateBehaviorEntityEvents:function(){H(this._behaviors,"undelegateEntityEvents")},_destroyBehaviors:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];H.apply(void 0,[this._behaviors,"destroy"].concat(t))},_removeBehavior:function(e){this._isDestroyed||(this.undelegate(".trig"+e.cid+" ."+e.cid),this._behaviors=t.without(this._behaviors,e))},_bindBehaviorUIElements:function(){H(this._behaviors,"bindUIElements")},_unbindBehaviorUIElements:function(){H(this._behaviors,"unbindUIElements")},_triggerEventOnBehaviors:function(){for(var e=this._behaviors,t=0,n=e&&e.length;t<n;t++)d.apply(e[t],arguments)}},W={_delegateEntityEvents:function(e,n){var r=t.result(this,"modelEvents");r&&(I.call(this,e,r),j.call(this,e,r));var i=t.result(this,"collectionEvents");i&&(I.call(this,n,i),j.call(this,n,i))},_undelegateEntityEvents:function(e,n){var r=t.result(this,"modelEvents");I.call(this,e,r);var i=t.result(this,"collectionEvents");I.call(this,n,i)}},$=/^(\S+)\s*(.*)$/,G=function(e,t){var n=e.match($);return n[1]+"."+t+" "+n[2]},K={childViewEventPrefix:!0,triggersStopPropagation:!0,triggersPreventDefault:!0};function Y(e){return!!K[e]}var X={_getViewTriggers:function(e,n){var r=this;return t.reduce(n,(function(n,i,o){return n[o=G(o,"trig"+r.cid)]=function(e,n){t.isString(n)&&(n={event:n});var r=n.event,i=!!n.preventDefault;Y("triggersPreventDefault")&&(i=!1!==n.preventDefault);var o=!!n.stopPropagation;return Y("triggersStopPropagation")&&(o=!1!==n.stopPropagation),function(t){i&&t.preventDefault(),o&&t.stopPropagation(),e.triggerMethod(r,e,t)}}(e,i),n}),{})}},Q=function(e,t){return e.replace(/@ui\.[a-zA-Z-_$0-9]*/g,(function(e){return t[e.slice(4)]}))},J={normalizeUIKeys:function(e){return function(e,n){return t.reduce(e,(function(e,t,r){return e[Q(r,n)]=t,e}),{})}(e,this._getUIBindings())},normalizeUIString:function(e){var t=this._getUIBindings();return Q(e,t)},normalizeUIValues:function(e,n){return function e(n,r,i){return t.each(n,(function(o,a){t.isString(o)?n[a]=Q(o,r):t.isObject(o)&&t.isArray(i)&&(t.extend(o,e(t.pick(o,i),r)),t.each(i,(function(e){var n=o[e];t.isString(n)&&(o[e]=Q(n,r))})))})),n}(e,this._getUIBindings(),n)},_getUIBindings:function(){var e=t.result(this,"_uiBindings"),n=t.result(this,"ui");return e||n},_bindUIElements:function(){var e=this;if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var n=t.result(this,"_uiBindings");this._ui={},t.each(n,(function(t,n){e._ui[n]=e.$(t)})),this.ui=this._ui}},_unbindUIElements:function(){var e=this;this.ui&&this._uiBindings&&(t.each(this.ui,(function(t,n){delete e.ui[n]})),this.ui=this._uiBindings,delete this._uiBindings,delete this._ui)},_getUI:function(e){return this._ui[e]}};function Z(t){return t instanceof e.$?t:e.$(t)}function ee(e){return this.prototype.Dom=t.extend({},this.prototype.Dom,e),this}var te={createBuffer:function(){return document.createDocumentFragment()},getEl:function(e){return Z(e)},findEl:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z(e);return n.find(t)},hasEl:function(e,t){return e.contains(t&&t.parentNode)},detachEl:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z(e);t.detach()},replaceEl:function(e,t){if(e!==t){var n=t.parentNode;n&&n.replaceChild(e,t)}},swapEl:function(e,t){if(e!==t){var n=e.parentNode,r=t.parentNode;if(n&&r){var i=e.nextSibling,o=t.nextSibling;n.insertBefore(t,i),r.insertBefore(e,o)}}},setContents:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z(e);n.html(t)},appendContents:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n._$el,i=void 0===r?Z(e):r,o=n._$contents,a=void 0===o?Z(t):o;i.append(a)},hasContents:function(e){return!!e&&e.hasChildNodes()},detachContents:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z(e);t.contents().detach()}},ne={Dom:te,supportsRenderLifecycle:!0,supportsDestroyLifecycle:!0,_isDestroyed:!1,isDestroyed:function(){return!!this._isDestroyed},_isRendered:!1,isRendered:function(){return!!this._isRendered},_isAttached:!1,isAttached:function(){return!!this._isAttached},delegateEvents:function(n){this._proxyBehaviorViewProperties(),this._buildEventProxies();var r=this._getEvents(n);void 0===n&&(this.events=r);var i=t.extend({},this._getBehaviorEvents(),r,this._getBehaviorTriggers(),this.getTriggers());return e.View.prototype.delegateEvents.call(this,i),this},_getEvents:function(e){var n=e||this.events;return t.isFunction(n)?this.normalizeUIKeys(n.call(this)):this.normalizeUIKeys(n)},getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(t.result(this,"triggers"));return this._getViewTriggers(this,e)}},delegateEntityEvents:function(){return this._delegateEntityEvents(this.model,this.collection),this._delegateBehaviorEntityEvents(),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.model,this.collection),this._undelegateBehaviorEntityEvents(),this},destroy:function(){if(this._isDestroyed)return this;for(var e=this._isAttached&&!this._shouldDisableEvents,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.triggerMethod.apply(this,["before:destroy",this].concat(n)),e&&this.triggerMethod("before:detach",this),this.unbindUIElements(),this._removeElement(),e&&(this._isAttached=!1,this.triggerMethod("detach",this)),this._removeChildren(),this._isDestroyed=!0,this._isRendered=!1,this._destroyBehaviors.apply(this,n),this.triggerMethod.apply(this,["destroy",this].concat(n)),this.stopListening(),this},_removeElement:function(){this.$el.off().removeData(),this.Dom.detachEl(this.el,this.$el)},bindUIElements:function(){return this._bindUIElements(),this._bindBehaviorUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this._unbindBehaviorUIElements(),this},getUI:function(e){return this._getUI(e)},childViewEventPrefix:function(){return!!Y("childViewEventPrefix")&&"childview"},triggerMethod:function(){var e=d.apply(this,arguments);return this._triggerEventOnBehaviors.apply(this,arguments),e},_buildEventProxies:function(){this._childViewEvents=t.result(this,"childViewEvents"),this._childViewTriggers=t.result(this,"childViewTriggers")},_proxyChildViewEvents:function(e){this.listenTo(e,"all",this._childViewEventHandler)},_childViewEventHandler:function(e){for(var n=this.normalizeMethods(this._childViewEvents),r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];void 0!==n&&t.isFunction(n[e])&&n[e].apply(this,i);var a=this._childViewTriggers;a&&t.isString(a[e])&&this.triggerMethod.apply(this,[a[e]].concat(i));var s=t.result(this,"childViewEventPrefix");if(!1!==s){var u=s+":"+e;this.triggerMethod.apply(this,[u].concat(i))}}};function re(e){e._isRendered||(e.supportsRenderLifecycle||p(e,"before:render",e),e.render(),e.supportsRenderLifecycle||(e._isRendered=!0,p(e,"render",e)))}function ie(e){if(e.destroy)e.destroy();else{e.supportsDestroyLifecycle||p(e,"before:destroy",e);var t=e._isAttached&&!e._shouldDisableEvents;t&&p(e,"before:detach",e),e.remove(),t&&(e._isAttached=!1,p(e,"detach",e)),e._isDestroyed=!0,e.supportsDestroyLifecycle||p(e,"destroy",e)}}t.extend(ne,q,N,W,X,J);var oe=["allowMissingEl","parentEl","replaceElement"],ae=F.extend({Dom:te,cidPrefix:"mnr",replaceElement:!1,_isReplaced:!1,_isSwappingView:!1,constructor:function(t){if(this._setOptions(t),this.mergeOptions(t,oe),this._initEl=this.el=this.getOption("el"),this.el=this.el instanceof e.$?this.el[0]:this.el,!this.el)throw new R({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),F.call(this,t)},show:function(e,t){if(this._ensureElement(t))return(e=this._getView(e,t))===this.currentView||(this._isSwappingView=!!this.currentView,this.triggerMethod("before:show",this,e,t),e._isAttached||this.empty(t),this._setupChildView(e),this.currentView=e,re(e),this._attachView(e,t),this.triggerMethod("show",this,e,t),this._isSwappingView=!1),this},_setupChildView:function(e){O(e),this._proxyChildViewEvents(e),e.on("destroy",this._empty,this)},_proxyChildViewEvents:function(e){var t=this._parentView;t&&t._proxyChildViewEvents(e)},_shouldDisableMonitoring:function(){return this._parentView&&!1===this._parentView.monitorViewEvents},_attachView:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!e._isAttached&&a(this.el)&&!this._shouldDisableMonitoring(),i=void 0===n.replaceElement?!!t.result(this,"replaceElement"):!!n.replaceElement;r&&p(e,"before:attach",e),i?this._replaceEl(e):this.attachHtml(e),r&&(e._isAttached=!0,p(e,"attach",e))},_ensureElement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0],this.$el=this.Dom.getEl(this.el)),!this.$el||0===this.$el.length){var n=void 0===e.allowMissingEl?!!t.result(this,"allowMissingEl"):!!e.allowMissingEl;if(n)return!1;throw new R('An "el" must exist in DOM for this region '+this.cid)}return!0},_getView:function(t){if(!t)throw new R({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(t._isDestroyed)throw new R({name:"ViewDestroyedError",message:'View (cid: "'+t.cid+'") has already been destroyed and cannot be used.'});if(t instanceof e.View)return t;var n=this._getViewOptions(t);return new he(n)},_getViewOptions:function(e){return t.isFunction(e)?{template:e}:t.isObject(e)?e:{template:function(){return e}}},getEl:function(e){var n=t.result(this,"parentEl");return n&&t.isString(e)?this.Dom.findEl(n,e):this.Dom.getEl(e)},_replaceEl:function(e){this._restoreEl(),e.on("before:destroy",this._restoreEl,this),this.Dom.replaceEl(e.el,this.el),this._isReplaced=!0},_restoreEl:function(){if(this._isReplaced){var e=this.currentView;e&&(this._detachView(e),this._isReplaced=!1)}},isReplaced:function(){return!!this._isReplaced},isSwappingView:function(){return!!this._isSwappingView},attachHtml:function(e){this.Dom.appendContents(this.el,e.el,{_$el:this.$el,_$contents:e.$el})},empty:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{allowMissingEl:!0},t=this.currentView;if(!t)return this._ensureElement(e)&&this.detachHtml(),this;var n=!e.preventDestroy;return n||o("The preventDestroy option is deprecated. Use Region#detachView"),this._empty(t,n),this},_empty:function(e,t){e.off("destroy",this._empty,this),this.triggerMethod("before:empty",this,e),this._restoreEl(),delete this.currentView,e._isDestroyed||(t?this.removeView(e):this._detachView(e),this._stopChildViewEvents(e)),this.triggerMethod("empty",this,e)},_stopChildViewEvents:function(e){this._parentView&&this._parentView.stopListening(e)},destroyView:function(e){return e._isDestroyed||(e._shouldDisableEvents=this._shouldDisableMonitoring(),ie(e)),e},removeView:function(e){this.destroyView(e)},detachView:function(){var e=this.currentView;if(e)return this._empty(e),e},_detachView:function(e){var t=e._isAttached&&!this._shouldDisableMonitoring(),n=this._isReplaced;t&&p(e,"before:detach",e),n?this.Dom.replaceEl(this.el,e.el):this.detachHtml(),t&&(e._isAttached=!1,p(e,"detach",e))},detachHtml:function(){this.Dom.detachContents(this.el,this.$el)},hasView:function(){return!!this.currentView},reset:function(e){return this.empty(e),this.$el&&(this.el=this._initEl),delete this.$el,this},destroy:function(e){return this._isDestroyed?this:(this.reset(e),this._name&&this._parentView._removeReferences(this._name),delete this._parentView,delete this._name,F.prototype.destroy.apply(this,arguments))}},{setDomApi:ee}),se=function(e,n){return e instanceof ae?e:function(e,n){var r=t.extend({},n);if(t.isString(e))return t.extend(r,{el:e}),ue(r);if(t.isFunction(e))return t.extend(r,{regionClass:e}),ue(r);if(t.isObject(e))return e.selector&&o("The selector option on a Region definition object is deprecated. Use el to pass a selector string"),t.extend(r,{el:e.selector},e),ue(r);throw new R({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})}(e,n)};function ue(e){return new(0,e.regionClass)(t.omit(e,"regionClass"))}var le={regionClass:ae,_initRegions:function(){this.regions=this.regions||{},this._regions={},this.addRegions(t.result(this,"regions"))},_reInitRegions:function(){H(this._regions,"reset")},addRegion:function(e,t){var n={};return n[e]=t,this.addRegions(n)[e]},addRegions:function(e){if(!t.isEmpty(e))return e=this.normalizeUIValues(e,["selector","el"]),this.regions=t.extend({},this.regions,e),this._addRegions(e)},_addRegions:function(e){var n=this,r={regionClass:this.regionClass,parentEl:t.partial(t.result,this,"el")};return t.reduce(e,(function(e,t,i){return e[i]=se(t,r),n._addRegion(e[i],i),e}),{})},_addRegion:function(e,t){this.triggerMethod("before:add:region",this,t,e),e._parentView=this,e._name=t,this._regions[t]=e,this.triggerMethod("add:region",this,t,e)},removeRegion:function(e){var t=this._regions[e];return this._removeRegion(t,e),t},removeRegions:function(){var e=this._getRegions();return t.each(this._regions,t.bind(this._removeRegion,this)),e},_removeRegion:function(e,t){this.triggerMethod("before:remove:region",this,t,e),e.destroy(),this.triggerMethod("remove:region",this,t,e)},_removeReferences:function(e){delete this.regions[e],delete this._regions[e]},emptyRegions:function(){var e=this.getRegions();return H(e,"empty"),e},hasRegion:function(e){return!!this.getRegion(e)},getRegion:function(e){return this._isRendered||this.render(),this._regions[e]},_getRegions:function(){return t.clone(this._regions)},getRegions:function(){return this._isRendered||this.render(),this._getRegions()},showChildView:function(e,t){for(var n=this.getRegion(e),r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.show.apply(n,[t].concat(i))},detachChildView:function(e){return this.getRegion(e).detachView()},getChildView:function(e){return this.getRegion(e).currentView}},ce={render:function(e,n){if(!e)throw new R({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});return(t.isFunction(e)?e:V.get(e))(n)}},fe=["behaviors","childViewEventPrefix","childViewEvents","childViewTriggers","collectionEvents","events","modelEvents","regionClass","regions","template","templateContext","triggers","ui"],he=e.View.extend({constructor:function(n){this.render=t.bind(this.render,this),this._setOptions(n),this.mergeOptions(n,fe),O(this),this._initBehaviors(),this._initRegions();var r=Array.prototype.slice.call(arguments);r[0]=this.options,e.View.prototype.constructor.apply(this,r),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},serializeData:function(){return this.model||this.collection?this.model?this.serializeModel():{items:this.serializeCollection()}:{}},serializeModel:function(){return this.model?t.clone(this.model.attributes):{}},serializeCollection:function(){return this.collection?this.collection.map((function(e){return t.clone(e.attributes)})):{}},setElement:function(){return e.View.prototype.setElement.apply(this,arguments),this._isRendered=this.Dom.hasContents(this.el),this._isAttached=a(this.el),this._isRendered&&this.bindUIElements(),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._isRendered&&this._reInitRegions(),this._renderTemplate(),this.bindUIElements(),this._isRendered=!0,this.triggerMethod("render",this)),this},_renderTemplate:function(){var e=this.getTemplate();if(!1!==e){var t=this.mixinTemplateContext(this.serializeData()),n=this._renderHtml(e,t);this.attachElContent(n)}else o("template:false is deprecated. Use _.noop.")},_renderHtml:function(e,t){return ce.render(e,t,this)},getTemplate:function(){return this.template},mixinTemplateContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.result(this,"templateContext");return t.extend(e,n)},attachElContent:function(e){return this.Dom.setContents(this.el,e,this.$el),this},_removeChildren:function(){this.removeRegions()},_getImmediateChildren:function(){return t.chain(this._getRegions()).map("currentView").compact().value()}},{setRenderer:function(e){return this.prototype._renderHtml=e,this},setDomApi:ee});t.extend(he.prototype,ne,le);var de=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce","partition"],pe=function(e,n){t.each(de,(function(r){e[r]=function(){var e=t.result(this,n),i=Array.prototype.slice.call(arguments);return t[r].apply(t,[e].concat(i))}}))},ye=function(e){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),t.each(e,t.bind(this.add,this))};pe(ye.prototype,"_getViews"),t.extend(ye.prototype,{_getViews:function(){return t.values(this._views)},add:function(e,t){return this._add(e,t)._updateLength()},_add:function(e,t){var n=e.cid;return this._views[n]=e,e.model&&(this._indexByModel[e.model.cid]=n),t&&(this._indexByCustom[t]=n),this},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){var t=this._indexByModel[e];return this.findByCid(t)},findByCustom:function(e){var t=this._indexByCustom[e];return this.findByCid(t)},findByIndex:function(e){return t.values(this._views)[e]},findByCid:function(e){return this._views[e]},remove:function(e){return this._remove(e)._updateLength()},_remove:function(e){var n=e.cid;return e.model&&delete this._indexByModel[e.model.cid],t.some(this._indexByCustom,t.bind((function(e,t){if(e===n)return delete this._indexByCustom[t],!0}),this)),delete this._views[n],this},_updateLength:function(){return this.length=t.size(this._views),this}});var me=["behaviors","childView","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","events","filter","emptyView","emptyViewOptions","modelEvents","reorderOnSort","sort","triggers","ui","viewComparator"],ve=e.View.extend({sort:!0,constructor:function(n){this.render=t.bind(this.render,this),this._setOptions(n),this.mergeOptions(n,me),O(this),this._initBehaviors(),this.once("render",this._initialEvents),this._initChildViewStorage(),this._bufferedChildren=[];var r=Array.prototype.slice.call(arguments);r[0]=this.options,e.View.prototype.constructor.apply(this,r),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},_startBuffering:function(){this._isBuffering=!0},_endBuffering:function(){var e=this._isAttached&&!1!==this.monitorViewEvents?this._getImmediateChildren():[];this._isBuffering=!1,t.each(e,(function(e){p(e,"before:attach",e)})),this.attachBuffer(this,this._createBuffer()),t.each(e,(function(e){e._isAttached=!0,p(e,"attach",e)})),this._bufferedChildren=[]},_getImmediateChildren:function(){return t.values(this.children._views)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"update",this._onCollectionUpdate),this.listenTo(this.collection,"reset",this.render),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_onCollectionAdd:function(e,n,r){var i=void 0!==r.at&&(r.index||n.indexOf(e));(this.filter||!1===i)&&(i=t.indexOf(this._filteredSortedModels(i),e)),this._shouldAddChild(e,i)&&(this._destroyEmptyView(),this._addChild(e,i))},_onCollectionUpdate:function(e,t){var n=t.changes;this._removeChildModels(n.removed)},_removeChildModels:function(e){var t=this._getRemovedViews(e);t.length&&(this.children._updateLength(),this._updateIndices(t,!1),this.isEmpty()&&this._showEmptyView())},_getRemovedViews:function(e){var n=this;return t.reduce(e,(function(e,t){var r=t&&n.children.findByModel(t);return!r||r._isDestroyed||(n._removeChildView(r),e.push(r)),e}),[])},_removeChildView:function(e){this.triggerMethod("before:remove:child",this,e),this.children._remove(e),e._shouldDisableEvents=!1===this.monitorViewEvents,ie(e),this.stopListening(e),this.triggerMethod("remove:child",this,e)},setElement:function(){return e.View.prototype.setElement.apply(this,arguments),this._isAttached=a(this.el),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._renderChildren(),this._isRendered=!0,this.triggerMethod("render",this)),this},setFilter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preventRender,r=this._isRendered&&!this._isDestroyed,i=this.filter!==e,o=r&&i&&!n;if(o){var a=this._filteredSortedModels();this.filter=e;var s=this._filteredSortedModels();this._applyModelDeltas(s,a)}else this.filter=e;return this},removeFilter:function(e){return this.setFilter(null,e)},_applyModelDeltas:function(e,n){var r=this,i={};t.each(e,(function(e,t){!r.children.findByModel(e)&&r._onCollectionAdd(e,r.collection,{at:t}),i[e.cid]=!0}));var o=t.filter(n,(function(e){return!i[e.cid]&&r.children.findByModel(e)}));this._removeChildModels(o)},reorder:function(){var e=this,n=this.children,r=this._filteredSortedModels();if(!r.length&&this._showingEmptyView)return this;if(t.some(r,(function(e){return!n.findByModel(e)})))this.render();else{var i=[],o=t.reduce(this.children._views,(function(e,n){var o=t.indexOf(r,n.model);return-1===o?(i.push(n.model),e):(n._index=o,e[o]=n.el,e)}),new Array(r.length));this.triggerMethod("before:reorder",this);var a=this.Dom.createBuffer();t.each(o,(function(t){e.Dom.appendContents(a,t)})),this._appendReorderedChildren(a),this._removeChildModels(i),this.triggerMethod("reorder",this)}return this},resortView:function(){return this.reorderOnSort?this.reorder():this._renderChildren(),this},_sortViews:function(){var e=this,n=this._filteredSortedModels();t.find(n,(function(t,n){var r=e.children.findByModel(t);return!r||r._index!==n}))&&this.resortView()},_emptyViewIndex:-1,_appendReorderedChildren:function(e){this.Dom.appendContents(this.el,e,{_$el:this.$el})},_renderChildren:function(){this._isRendered&&(this._destroyEmptyView(),this._destroyChildren());var e=this._filteredSortedModels();this.isEmpty({processedModels:e})?this._showEmptyView():(this.triggerMethod("before:render:children",this),this._startBuffering(),this._showCollection(e),this._endBuffering(),this.triggerMethod("render:children",this))},_createView:function(e,t){var n=this._getChildView(e),r=this._getChildViewOptions(e,t);return this.buildChildView(e,n,r)},_setupChildView:function(e,t){O(e),this._proxyChildViewEvents(e),this.sort&&(e._index=t)},_showCollection:function(e){t.each(e,t.bind(this._addChild,this)),this.children._updateLength()},_filteredSortedModels:function(e){if(!this.collection||!this.collection.length)return[];var t=this.getViewComparator(),n=this.collection.models;if(e=Math.min(Math.max(e,0),n.length-1),t){var r=void 0;e&&(r=n[e],n=n.slice(0,e).concat(n.slice(e+1))),n=this._sortModelsBy(n,t),r&&n.splice(e,0,r)}return n=this._filterModels(n)},getViewComparator:function(){return this.viewComparator},_filterModels:function(e){var n=this;return this.filter&&(e=t.filter(e,(function(e,t){return n._shouldAddChild(e,t)}))),e},_sortModelsBy:function(e,n){return"string"==typeof n?t.sortBy(e,(function(e){return e.get(n)})):1===n.length?t.sortBy(e,t.bind(n,this)):t.clone(e).sort(t.bind(n,this))},_showEmptyView:function(){var n=this._getEmptyView();if(n&&!this._showingEmptyView){this._showingEmptyView=!0;var r=new e.Model,i=this.emptyViewOptions||this.childViewOptions;t.isFunction(i)&&(i=i.call(this,r,this._emptyViewIndex));var o=this.buildChildView(r,n,i);this.triggerMethod("before:render:empty",this,o),this.addChildView(o,0),this.triggerMethod("render:empty",this,o)}},_destroyEmptyView:function(){this._showingEmptyView&&(this.triggerMethod("before:remove:empty",this),this._destroyChildren(),delete this._showingEmptyView,this.triggerMethod("remove:empty",this))},_getEmptyView:function(){var e=this.emptyView;if(e)return this._getView(e)},_getChildView:function(e){var t=this.childView;if(!t)throw new R({name:"NoChildViewError",message:'A "childView" must be specified'});if(!(t=this._getView(t,e)))throw new R({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return t},_getView:function(n,r){return n.prototype instanceof e.View||n===e.View?n:t.isFunction(n)?n.call(this,r):void 0},_addChild:function(e,t){var n=this._createView(e,t);return this.addChildView(n,t),n},_getChildViewOptions:function(e,n){return t.isFunction(this.childViewOptions)?this.childViewOptions(e,n):this.childViewOptions},addChildView:function(e,t){return this.triggerMethod("before:add:child",this,e),this._setupChildView(e,t),this._isBuffering?this.children._add(e):(this._updateIndices(e,!0),this.children.add(e)),re(e),this._attachView(e,t),this.triggerMethod("add:child",this,e),e},_updateIndices:function(e,n){if(this.sort)if(n){var r=t.isArray(e)?t.max(e,"_index"):e;t.isObject(r)&&t.each(this.children._views,(function(e){e._index>=r._index&&(e._index+=1)}))}else t.each(t.sortBy(this.children._views,"_index"),(function(e,t){e._index=t}))},_attachView:function(e,t){var n=!e._isAttached&&!this._isBuffering&&this._isAttached&&!1!==this.monitorViewEvents;n&&p(e,"before:attach",e),this.attachHtml(this,e,t),n&&(e._isAttached=!0,p(e,"attach",e))},buildChildView:function(e,n,r){return new n(t.extend({model:e},r))},removeChildView:function(e){return!e||e._isDestroyed||(this._removeChildView(e),this.children._updateLength(),this._updateIndices(e,!1)),e},isEmpty:function(e){var n=void 0;return t.result(e,"processedModels")?n=e.processedModels:(n=this.collection?this.collection.models:[],n=this._filterModels(n)),0===n.length},attachBuffer:function(e,t){this.Dom.appendContents(e.el,t,{_$el:e.$el})},_createBuffer:function(){var e=this,n=this.Dom.createBuffer();return t.each(this._bufferedChildren,(function(t){e.Dom.appendContents(n,t.el,{_$contents:t.$el})})),n},attachHtml:function(e,t,n){e._isBuffering?e._bufferedChildren.splice(n,0,t):e._insertBefore(t,n)||e._insertAfter(t)},_insertBefore:function(e,n){var r=void 0;return this.sort&&n<this.children.length-1&&(r=t.find(this.children._views,(function(e){return e._index===n+1}))),!!r&&(this.beforeEl(r.el,e.el),!0)},beforeEl:function(e,t){this.$(e).before(t)},_insertAfter:function(e){this.Dom.appendContents(this.el,e.el,{_$el:this.$el,_$contents:e.$el})},_initChildViewStorage:function(){this.children=new ye},_removeChildren:function(){this._destroyChildren()},_destroyChildren:function(e){this.children.length&&(this.triggerMethod("before:destroy:children",this),t.each(this.children._views,t.bind(this._removeChildView,this)),this.children._updateLength(),this.triggerMethod("destroy:children",this))},_shouldAddChild:function(e,n){var r=this.filter;return!t.isFunction(r)||r.call(this,e,n,this.collection)}},{setDomApi:ee});t.extend(ve.prototype,ne);var ge=function(){this._init()};function be(e,t){return t.model&&t.model.get(e)}pe(ge.prototype,"_views"),t.extend(ge.prototype,{_init:function(){this._views=[],this._viewsByCid={},this._indexByModel={},this._updateLength()},_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._views.length,n=e.cid;this._viewsByCid[n]=e,e.model&&(this._indexByModel[e.model.cid]=n),this._views.splice(t,0,e),this._updateLength()},_sort:function(e,n){return"string"==typeof e?(e=t.partial(be,e),this._sortBy(e)):1===e.length?this._sortBy(t.bind(e,n)):this._views.sort(t.bind(e,n))},_sortBy:function(e){var n=t.sortBy(this._views,e);return this._set(n),n},_set:function(e){this._views.length=0,this._views.push.apply(this._views,e.slice(0)),this._updateLength()},_swap:function(e,t){var n=this.findIndexByView(e),r=this.findIndexByView(t);if(-1!==n&&-1!==r){var i=this._views[n];this._views[n]=this._views[r],this._views[r]=i}},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){var t=this._indexByModel[e];return this.findByCid(t)},findByIndex:function(e){return this._views[e]},findIndexByView:function(e){return this._views.indexOf(e)},findByCid:function(e){return this._viewsByCid[e]},hasView:function(e){return!!this.findByCid(e.cid)},_remove:function(e){if(this._viewsByCid[e.cid]){e.model&&delete this._indexByModel[e.model.cid],delete this._viewsByCid[e.cid];var t=this.findIndexByView(e);this._views.splice(t,1),this._updateLength()}},_updateLength:function(){this.length=this._views.length}});var _e=["behaviors","childView","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","emptyView","emptyViewOptions","events","modelEvents","sortWithCollection","triggers","ui","viewComparator","viewFilter"],we=e.View.extend({sortWithCollection:!0,constructor:function(t){this._setOptions(t),this.mergeOptions(t,_e),O(this),this.once("render",this._initialEvents),this._initChildViewStorage(),this._initBehaviors();var n=Array.prototype.slice.call(arguments);n[0]=this.options,e.View.prototype.constructor.apply(this,n),this.getEmptyRegion(),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},_initChildViewStorage:function(){this.children=new ge},getEmptyRegion:function(){return this._emptyRegion&&!this._emptyRegion.isDestroyed()||(this._emptyRegion=new ae({el:this.el,replaceElement:!1}),this._emptyRegion._parentView=this),this._emptyRegion},_initialEvents:function(){this.listenTo(this.collection,{sort:this._onCollectionSort,reset:this._onCollectionReset,update:this._onCollectionUpdate})},_onCollectionSort:function(e,t){var n=t.add,r=t.merge,i=t.remove;this.sortWithCollection&&!1!==this.viewComparator&&(n||i||r||this.sort())},_onCollectionReset:function(){this.render()},_onCollectionUpdate:function(e,t){var n=t.changes,r=n.removed.length&&this._removeChildModels(n.removed);this._addedViews=n.added.length&&this._addChildModels(n.added),this._detachChildren(r),this._showChildren(),this._removeChildViews(r)},_removeChildModels:function(e){var n=this;return t.reduce(e,(function(e,t){var r=n._removeChildModel(t);return r&&e.push(r),e}),[])},_removeChildModel:function(e){var t=this.children.findByModel(e);return t&&this._removeChild(t),t},_removeChild:function(e){this.triggerMethod("before:remove:child",this,e),this.children._remove(e),this.triggerMethod("remove:child",this,e)},_addChildModels:function(e){return t.map(e,t.bind(this._addChildModel,this))},_addChildModel:function(e){var t=this._createChildView(e);return this._addChild(t),t},_createChildView:function(e){var t=this._getChildView(e),n=this._getChildViewOptions(e);return this.buildChildView(e,t,n)},_addChild:function(e,t){this.triggerMethod("before:add:child",this,e),this._setupChildView(e),this.children._add(e,t),this.triggerMethod("add:child",this,e)},_getChildView:function(e){var t=this.childView;if(!t)throw new R({name:"NoChildViewError",message:'A "childView" must be specified'});if(!(t=this._getView(t,e)))throw new R({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return t},_getView:function(n,r){return n.prototype instanceof e.View||n===e.View?n:t.isFunction(n)?n.call(this,r):void 0},_getChildViewOptions:function(e){return t.isFunction(this.childViewOptions)?this.childViewOptions(e):this.childViewOptions},buildChildView:function(e,n,r){return new n(t.extend({model:e},r))},_setupChildView:function(e){O(e),e.on("destroy",this.removeChildView,this),this._proxyChildViewEvents(e)},_getImmediateChildren:function(){return this.children._views},setElement:function(){return e.View.prototype.setElement.apply(this,arguments),this._isAttached=a(this.el),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._destroyChildren(),this.children._init(),this.collection&&this._addChildModels(this.collection.models),this._showChildren(),this._isRendered=!0,this.triggerMethod("render",this)),this},sort:function(){return this._isDestroyed?this:this.children.length?(this._showChildren(),this):this},_showChildren:function(){this.isEmpty()?this._showEmptyView():(this._sortChildren(),this.filter())},isEmpty:function(e){return e||!this.children.length},_showEmptyView:function(){var e=this._getEmptyView();if(e){var t=this._getEmptyViewOptions();this.getEmptyRegion().show(new e(t))}},_getEmptyView:function(){var e=this.emptyView;if(e)return this._getView(e)},_destroyEmptyView:function(){var e=this.getEmptyRegion();e.hasView()&&e.empty()},_getEmptyViewOptions:function(){var e=this.emptyViewOptions||this.childViewOptions;return t.isFunction(e)?e.call(this):e},_sortChildren:function(){var e=this.getComparator();e&&(delete this._addedViews,this.triggerMethod("before:sort",this),this.children._sort(e,this),this.triggerMethod("sort",this))},setComparator:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preventRender,r=this.viewComparator!==e,i=r&&!n;return this.viewComparator=e,i&&this.sort(),this},removeComparator:function(e){return this.setComparator(null,e)},getComparator:function(){return this.viewComparator?this.viewComparator:!(!this.sortWithCollection||!1===this.viewComparator||!this.collection)&&this._viewComparator},_viewComparator:function(e){return this.collection.indexOf(e.model)},filter:function(){if(this._isDestroyed)return this;if(!this.children.length)return this;var e=this._filterChildren();return this._renderChildren(e),this},_filterChildren:function(){var e=this,n=this._getFilter(),r=this._addedViews;if(delete this._addedViews,!n)return r||this.children._views;this.triggerMethod("before:filter",this);var i=[],o=[];return t.each(this.children._views,(function(t,r,a){(n.call(e,t,r,a)?i:o).push(t)})),this._detachChildren(o),this.triggerMethod("filter",this,i,o),i},_getFilter:function(){var e=this.getFilter();if(!e)return!1;if(t.isFunction(e))return e;if(t.isObject(e)){var n=t.matches(e);return function(e){return n(e.model&&e.model.attributes)}}if(t.isString(e))return function(t){return t.model&&t.model.get(e)};throw new R({name:"InvalidViewFilterError",message:'"viewFilter" must be a function, predicate object literal, a string indicating a model attribute, or falsy'})},getFilter:function(){return this.viewFilter},setFilter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preventRender,r=this.viewFilter!==e,i=r&&!n;return this.viewFilter=e,i&&this.filter(),this},removeFilter:function(e){return this.setFilter(null,e)},_detachChildren:function(e){t.each(e,t.bind(this._detachChildView,this))},_detachChildView:function(e){var t=e._isAttached&&!1!==this.monitorViewEvents;t&&p(e,"before:detach",e),this.detachHtml(e),t&&(e._isAttached=!1,p(e,"detach",e))},detachHtml:function(e){this.Dom.detachEl(e.el,e.$el)},_renderChildren:function(e){if(this.isEmpty(!e.length))this._showEmptyView();else{this._destroyEmptyView(),this.triggerMethod("before:render:children",this,e);var t=this._getBuffer(e);this._attachChildren(t,e),this.triggerMethod("render:children",this,e)}},_attachChildren:function(e,n){n=this._isAttached&&!1!==this.monitorViewEvents?n:[],t.each(n,(function(e){e._isAttached||p(e,"before:attach",e)})),this.attachHtml(e),t.each(n,(function(e){e._isAttached||(e._isAttached=!0,p(e,"attach",e))}))},_getBuffer:function(e){var n=this,r=this.Dom.createBuffer();return t.each(e,(function(e){re(e),n.Dom.appendContents(r,e.el,{_$contents:e.$el})})),r},attachHtml:function(e){this.Dom.appendContents(this.el,e,{_$el:this.$el})},swapChildViews:function(e,t){if(!this.children.hasView(e)||!this.children.hasView(t))throw new R({name:"ChildSwapError",message:"Both views must be children of the collection view"});return this.children._swap(e,t),this.Dom.swapEl(e.el,t.el),this.Dom.hasEl(this.el,e.el)!==this.Dom.hasEl(this.el,t.el)&&this.filter(),this},addChildView:function(e,t){return!e||e._isDestroyed||((!t||t>=this.children.length)&&(this._addedViews=[e]),this._addChild(e,t),this._showChildren()),e},detachChildView:function(e){return this.removeChildView(e,{shouldDetach:!0}),e},removeChildView:function(e,t){return e?(this._removeChildView(e,t),this._removeChild(e),this.isEmpty()&&this._showEmptyView(),e):e},_removeChildViews:function(e){t.each(e,t.bind(this._removeChildView,this))},_removeChildView:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.shouldDetach;e.off("destroy",this.removeChildView,this),n?this._detachChildView(e):this._destroyChildView(e),this.stopListening(e)},_destroyChildView:function(e){e._isDestroyed||(e._shouldDisableEvents=!1===this.monitorViewEvents,ie(e))},_removeChildren:function(){this._destroyChildren(),this.getEmptyRegion().destroy(),delete this._addedViews},_destroyChildren:function(){this.children&&this.children.length&&(this.triggerMethod("before:destroy:children",this),!1===this.monitorViewEvents&&this.Dom.detachContents(this.el,this.$el),t.each(this.children._views,t.bind(this._removeChildView,this)),this.triggerMethod("destroy:children",this))}},{setDomApi:ee});t.extend(we.prototype,ne);var Te=["childViewContainer","template","templateContext"],Se=ve.extend({constructor:function(e){o("CompositeView is deprecated. Convert to View at your earliest convenience"),this.mergeOptions(e,Te),ve.prototype.constructor.apply(this,arguments)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"update",this._onCollectionUpdate),this.listenTo(this.collection,"reset",this.renderChildren),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_getChildView:function(e){var t=this.childView;if(!t)return this.constructor;if(!(t=this._getView(t,e)))throw new R({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return t},serializeData:function(){return this.serializeModel()},render:function(){return this._isDestroyed||(this._isRendering=!0,this.resetChildViewContainer(),this.triggerMethod("before:render",this),this._renderTemplate(),this.bindUIElements(),this.renderChildren(),this._isRendering=!1,this._isRendered=!0,this.triggerMethod("render",this)),this},renderChildren:function(){(this._isRendered||this._isRendering)&&ve.prototype._renderChildren.call(this)},attachBuffer:function(e,t){var n=this.getChildViewContainer(e);this.Dom.appendContents(n[0],t,{_$el:n})},_insertAfter:function(e){var t=this.getChildViewContainer(this,e);this.Dom.appendContents(t[0],e.el,{_$el:t,_$contents:e.$el})},_appendReorderedChildren:function(e){var t=this.getChildViewContainer(this);this.Dom.appendContents(t[0],e,{_$el:t})},getChildViewContainer:function(e,n){if(e.$childViewContainer)return e.$childViewContainer;var r=void 0;if(e.childViewContainer){var i=t.result(e,"childViewContainer");if((r="@"===i.charAt(0)&&e.ui?e.ui[i.substr(4)]:this.$(i)).length<=0)throw new R({name:"ChildViewContainerMissingError",message:'The specified "childViewContainer" was not found: '+e.childViewContainer})}else r=e.$el;return e.$childViewContainer=r,r},resetChildViewContainer:function(){this.$childViewContainer&&(this.$childViewContainer=void 0)}}),Ee=t.pick(he.prototype,"serializeModel","getTemplate","_renderTemplate","_renderHtml","mixinTemplateContext","attachElContent");t.extend(Se.prototype,Ee);var Ce=["collectionEvents","events","modelEvents","triggers","ui"],ke=F.extend({cidPrefix:"mnb",constructor:function(e,n){this.view=n,this.defaults&&o("Behavior defaults are deprecated. For similar functionality set options on the Behavior class."),this.defaults=t.clone(t.result(this,"defaults",{})),this._setOptions(t.extend({},this.defaults,e)),this.mergeOptions(this.options,Ce),this.ui=t.extend({},t.result(this,"ui"),t.result(n,"ui")),F.apply(this,arguments)},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this.stopListening(),this.view._removeBehavior(this),this},proxyViewProperties:function(){return this.$el=this.view.$el,this.el=this.view.el,this},bindUIElements:function(){return this._bindUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this},getUI:function(e){return this._getUI(e)},delegateEntityEvents:function(){return this._delegateEntityEvents(this.view.model,this.view.collection),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.view.model,this.view.collection),this},getEvents:function(){var e=this,n=this.normalizeUIKeys(t.result(this,"events"));return t.reduce(n,(function(n,r,i){return t.isFunction(r)||(r=e[r]),r?(n[i=G(i,e.cid)]=t.bind(r,e),n):n}),{})},getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(t.result(this,"triggers"));return this._getViewTriggers(this.view,e)}}});t.extend(ke.prototype,W,X,J);var xe=["region","regionClass"],Oe=F.extend({cidPrefix:"mna",constructor:function(e){this._setOptions(e),this.mergeOptions(e,xe),this._initRegion(),F.prototype.constructor.apply(this,arguments)},regionClass:ae,_initRegion:function(){var e=this.region;if(e){var t={regionClass:this.regionClass};this._region=se(e,t)}},getRegion:function(){return this._region},showView:function(e){for(var t=this.getRegion(),n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.show.apply(t,[e].concat(r))},getView:function(){return this.getRegion().currentView},start:function(e){return this.triggerMethod("before:start",this,e),this.triggerMethod("start",this,e),this}}),Pe=["appRoutes","controller"],Re=e.Router.extend({constructor:function(t){this._setOptions(t),this.mergeOptions(t,Pe),e.Router.apply(this,arguments);var n=this.appRoutes,r=this._getController();this.processAppRoutes(r,n),this.on("route",this._processOnRoute,this)},appRoute:function(e,t){var n=this._getController();return this._addAppRoute(n,e,t),this},_processOnRoute:function(e,n){if(t.isFunction(this.onRoute)){var r=t.invert(this.appRoutes)[e];this.onRoute(e,r,n)}},processAppRoutes:function(e,n){var r=this;if(!n)return this;var i=t.keys(n).reverse();return t.each(i,(function(t){r._addAppRoute(e,t,n[t])})),this},_getController:function(){return this.controller},_addAppRoute:function(e,n,r){var i=e[r];if(!i)throw new R('Method "'+r+'" was not found on the controller');this.route(n,r,t.bind(i,e))},triggerMethod:d});t.extend(Re.prototype,N);var Ae=e.Marionette,je=e.Marionette={};return je.noConflict=function(){return e.Marionette=Ae,this},je.bindEvents=r(j),je.unbindEvents=r(I),je.bindRequests=r(D),je.unbindRequests=r(M),je.mergeOptions=r(s),je.getOption=r(u),je.normalizeMethods=r(l),je.extend=i,je.isNodeAttached=a,je.deprecate=o,je.triggerMethod=r(d),je.triggerMethodOn=p,je.isEnabled=Y,je.setEnabled=function(e,t){return K[e]=t},je.monitorViewEvents=O,je.Behaviors={},je.Behaviors.behaviorsLookup=function(){throw new R({message:"You must define where your behaviors are stored.",url:"marionette.behaviors.md#behaviorslookup"})},je.Application=Oe,je.AppRouter=Re,je.Renderer=ce,je.TemplateCache=V,je.View=he,je.CollectionView=ve,je.NextCollectionView=we,je.CompositeView=Se,je.Behavior=ke,je.Region=ae,je.Error=R,je.Object=F,je.DEV_MODE=!1,je.FEATURES=K,je.VERSION="3.5.1",je.DomApi=te,je.setDomApi=function(e){ve.setDomApi(e),Se.setDomApi(e),we.setDomApi(e),ae.setDomApi(e),he.setDomApi(e)},je}(n(10),n(3),n(397)),this&&this.Marionette&&(this.Mn=this.Marionette)},function(e,t,n){var r=n(69),i=n(25);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(17),i=n(26),o=n(59);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(25),i=/"/g;e.exports=function(e,t,n,o){var a=String(r(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(o).replace(i,""")+'"'),s+">"+a+"</"+t+">"}},function(e,t,n){var r=n(11);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r,i,o,a=n(141),s=n(14),u=n(18),l=n(29),c=n(33),f=n(80),h=n(71),d=s.WeakMap;if(a){var p=new d,y=p.get,m=p.has,v=p.set;r=function(e,t){return v.call(p,e,t),t},i=function(e){return y.call(p,e)||{}},o=function(e){return m.call(p,e)}}else{var g=f("state");h[g]=!0,r=function(e,t){return l(e,g,t),t},i=function(e){return c(e,g)?e[g]:{}},o=function(e){return c(e,g)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),i=n(10),o=n(23),a=n(13),s=n(12),u={GetQuery:function(){return u.DeserializeQueryParams(window.location.search.substring(1))},UpdateQuery:function(e){if(e){var t=u.GetQuery(),n=u.SerializeQueryParams(r.extend(t,e));n&&(n="?".concat(n)),u.UpdateUrl("".concat(u.GetCurrentPath()).concat(n),null,{replace:!0,trigger:!1})}},UpdateUrl:function(e,t,n){var r=o.a.buildRoute(e,t);i.history.navigate(r,n),i.Radio.channel(s.a.SHELL).trigger(a.a.URL_CHANGE,t,n)},SerializeQueryParams:function(e){if(!e)return"";if("string"==typeof e)return e;var t=[],n=function(e,t){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t))};return Object.keys(e).forEach((function(r){var i=e[r];null!=i&&(Array.isArray(i)?i.forEach((function(e){t.push(n(r,e))})):t.push(n(r,i)))})),t.join("&")},DeserializeQueryParams:function(e){return e?r.reduce(e.split("&"),(function(e,t){var n=t.split("="),r=n[0],i=n.length>0?decodeURIComponent(n[1]):"";return e[r]?e[r]instanceof Array?(e[r].push(i),e):(e[r]=[e[r],i],e):(e[r]=i,e)}),{}):{}},StartHistory:function(){i.History.started&&i.history.stop(),i.history.start({pushState:!0})},PageLoad:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?window.open(e,"_blank"):window.location.href=e},Redirect:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function(){return t?window.location.replace(e):window.location.href=e};o.b.hasActiveRoute()?i.Radio.channel(s.a.SHELL).once("routing:end",n):n()},Reload:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];window.location.reload(e)},GetCurrentPath:function(){return window.location.pathname},GetCurrentQueryString:function(){return window.location.search},GetCurrentUrl:function(){return window.location.href},GetCurrentReferrer:function(){return document.referrer},GetCurrentOrigin:function(){return window.location.origin},SetPageTitle:function(e){document.title=e}}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(390)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(l,e);var t,n,r,u=s(l);function l(){return i(this,l),u.apply(this,arguments)}return t=l,(n=[{key:"name",get:function(){return"DevError"}}])&&o(t.prototype,n),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(n(8).a)},function(e,t,n){var r=n(16),i=n(62),o=n(29),a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,i(null)),e.exports=function(e){s[a][e]=!0}},function(e,t,n){e.exports={item:"yzAZk",background:"_2FYoc",thumbnailContainer:"_14YzS",teacherPack:"_1H-bZ",text:"fDGTW",atomGuide:"_2UrFB",studentActivity:"_3bk9l",additionalMaterials:"_3KgEr",userUploaded:"_21qiB"}},function(e,t,n){var r=n(14),i=n(70),o=n(29),a=n(33),s=n(109),u=n(140),l=n(35),c=l.get,f=l.enforce,h=String(u).split("toString");i("inspectSource",(function(e){return u.call(e)})),(e.exports=function(e,t,n,i){var u=!!i&&!!i.unsafe,l=!!i&&!!i.enumerable,c=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||o(n,"name",t),f(n).source=h.join("string"==typeof t?t:"")),e!==r?(u?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=n:o(e,t,n)):l?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||u.call(this)}))},function(e,t){e.exports=!1},function(e,t,n){var r=n(63),i=n(69),o=n(21),a=n(15),s=n(73),u=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,f=6==e,h=5==e||f;return function(d,p,y,m){for(var v,g,b=o(d),_=i(b),w=r(p,y,3),T=a(_.length),S=0,E=m||s,C=t?E(d,T):n?E(d,0):void 0;T>S;S++)if((h||S in _)&&(g=w(v=_[S],S,b),e))if(t)C[S]=g;else if(g)switch(e){case 3:return!0;case 5:return v;case 6:return S;case 2:u.call(C,v)}else if(c)return!1;return f?-1:l||c?c:C}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t){var n=[][e];return!n||!r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){e.exports={image:"VcUxj",thumbnail:"_3pbQo",tallPoster:"_39QHb",cover:"_2wQ0p",banner:"_2Gztt",poster:"_3tEfw",pdf:"_3SJSK",link:"_2-RIk"}},function(e,t,n){var r=n(17),i=n(79),o=n(59),a=n(28),s=n(60),u=n(33),l=n(139),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=s(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(143),i=n(14),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(24),i=n(155),o=n(15),a=n(63),s=n(156),u=n(154),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,f){var h,d,p,y,m,v,g,b=a(t,n,c?2:1);if(f)h=e;else{if("function"!=typeof(d=s(e)))throw TypeError("Target is not iterable");if(i(d)){for(p=0,y=o(e.length);y>p;p++)if((m=c?b(r(g=e[p])[0],g[1]):b(e[p]))&&m instanceof l)return m;return new l(!1)}h=d.call(e)}for(v=h.next;!(g=v.call(h)).done;)if("object"==typeof(m=u(h,b,g.value,c))&&m&&m instanceof l)return m;return new l(!1)}).stop=function(e){return new l(!0,e)}},function(e,t,n){var r=n(47);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(26).f,i=n(33),o=n(16)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(60),i=n(26),o=n(59);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){var r=n(71),i=n(18),o=n(33),a=n(26).f,s=n(81),u=n(84),l=s("meta"),c=0,f=Object.isExtensible||function(){return!0},h=function(e){a(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,l)){if(!f(e))return"F";if(!t)return"E";h(e)}return e[l].objectID},getWeakData:function(e,t){if(!o(e,l)){if(!f(e))return!0;if(!t)return!1;h(e)}return e[l].weakData},onFreeze:function(e){return u&&d.REQUIRED&&f(e)&&!o(e,l)&&h(e),e}};r[l]=!0},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(32))},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){var n,r,i,o,a,s,u;n=function(e){return 9e4*e},r=function(e,t){return e*t},i=function(e){return e/9e4},o=function(e,t){return e/t},a=function(e,t){return n(o(e,t))},s=function(e,t){return r(i(e),t)},u=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:i,audioTsToSeconds:o,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:u}},function(e,t,n){"use strict";
|
|
7
|
-
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)},i=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,r(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},o=function(e,t){void 0===t&&(t=0);var n=(e=r(e))[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},a=function e(t,n){return void 0===n&&(n=0),(t=r(t)).length-n<10||"ID3"!==i(t.subarray(n,n+3))?n:e(t,n+=o(t,n))},s={aac:function(e){var t=a(e);return e.length>=t+2&&255==(255&e[t])&&224==(224&e[t+1])&&16==(22&e[t+1])},mp3:function(e){var t=a(e);return e.length>=t+2&&255==(255&e[t])&&224==(224&e[t+1])&&2==(6&e[t+1])},webm:function(e){return e.length>=4&&26==(255&e[0])&&69==(255&e[1])&&223==(255&e[2])&&163==(255&e[3])},mp4:function(e){return e.length>=8&&/^(f|s)typ$/.test(i(e.subarray(4,8)))&&!/^ftyp3g$/.test(i(e.subarray(4,10)))},"3gp":function(e){return e.length>=10&&/^ftyp3g$/.test(i(e.subarray(4,10)))},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){return e.length>=4&&/^fLaC$/.test(i(e.subarray(0,4)))},ogg:function(e){return e.length>=4&&/^OggS$/.test(i(e.subarray(0,4)))}},u=Object.keys(s).filter((function(e){return"ts"!==e})).concat("ts");u.forEach((function(e){var t=s[e];s[e]=function(e){return t(r(e))}}));t.detectContainerForBytes=function(e){e=r(e);for(var t=0;t<u.length;t++){var n=u[t];if(s[n](e))return n}return""},t.getId3Offset=a,t.id3Size=o,t.isLikely=s,t.isLikelyFmp4MediaSegment=function(e){e=r(e);for(var t=0;t<e.length;){var n=(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0;if("moof"===i(e.subarray(t+4,t+8)))return!0;0===n||n+t>e.length?t=e.length:t+=n}return!1}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(18);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(49),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t,n){var r=n(24),i=n(146),o=n(112),a=n(71),s=n(147),u=n(108),l=n(80)("IE_PROTO"),c=function(){},f=function(){var e,t=u("iframe"),n=o.length;for(t.style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),f=e.F;n--;)delete f.prototype[o[n]];return f()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=r(e),n=new c,c.prototype=null,n[l]=e):n=f(),void 0===t?n:i(n,t)},a[l]=!0},function(e,t,n){var r=n(34);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(33),i=n(21),o=n(80),a=n(158),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(3),i=n(10),o=n(22);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=c(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function c(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(c,e);var t,n,i,a=h(c);function c(){return s(this,c),a.apply(this,arguments)}return t=c,(n=[{key:"mixin",value:function(e){for(var t in e){if(this.hasOwnProperty(t)){var n=this[t];return void(this[t]=r.extend({},n,e[t]))}this[t]=e[t]}}},{key:"addValidation",value:function(e){this.mixin({validation:e})}},{key:"validate",value:function(e,t){l(p(c.prototype),"validate",this).call(this,e,t)}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(p(c.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Model)},function(e,t,n){var r;
|
|
8
|
-
/*!
|
|
9
|
-
Copyright (c) 2018 Jed Watson.
|
|
10
|
-
Licensed under the MIT License (MIT), see
|
|
11
|
-
http://jedwatson.github.io/classnames
|
|
12
|
-
*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var a=i.apply(null,r);a&&e.push(a)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";
|
|
13
|
-
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(337)),o=r(n(55));e.exports=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=i.buildAbsoluteURL(o.location&&o.location.href||"",e)),i.buildAbsoluteURL(e,t))}},function(e,t,n){var r=n(11),i=n(47),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(42),i=n(218);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.4.0",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports={}},function(e,t,n){var r=n(144),i=n(112);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(18),i=n(51),o=n(16)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(11),i=n(16),o=n(115),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(34),i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(49),i=n(25),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),l=s.length;return u<0||u>=l?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return x})),n.d(t,"a",(function(){return O}));var r=n(3),i=n(10),o=n(27),a=n(22),s=n(38),u=n(12),l=n(103),c=n(8),f=n(23);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=b(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function b(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=C(e)););return e}function _(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C(e);if(t){var i=C(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){_(n,e);var t=T(n);function n(e){var i;y(this,n),i=t.call(this,e);var o=[].concat(d(i.defaultProps),d(i.props||[]));return i.mergeOptions(e,o),r.result(E(i),"name")||c.c.throw(new c.b("Error: View with cid:".concat(i.cid," requires a name."))),i}return v(n,[{key:"defaultProps",get:function(){return["shell","layoutService"]}},{key:"_setOptions",value:function(e){this.options=r.extend({},r.result(this,"defaults"),e)}},{key:"_setAttributes",value:function(e){var t,n,i;l.a.isDevelopment&&r.extend(e,(t={},n="cv-classname",i=this.name,n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t)),this.$el.attr(e)}},{key:"ui",get:function(){return this.uiStorage||(this.uiStorage=this.elements),this.uiStorage},set:function(e){this.uiStorage=e}},{key:"elements",get:function(){return null}},{key:"serializeModel",value:function(){return this.model?this.model.toJSON():{}}},{key:"serializeCollection",value:function(){return this.collection?this.collection.toJSON():[]}},{key:"resetClassName",value:function(){this.$el.attr("class",r.result(this,"className"))}},{key:"serializeData",value:function(){var e=this,t=g(C(n.prototype),"serializeData",this).call(this),i=r.result(this,"viewOptions"),o=r.extend({},t,{options:i});return n.ViewDataExtensions.length?r.extend.apply(r,[o].concat(d(r.map(n.ViewDataExtensions,(function(t){return t instanceof Function?t(e):t}))))):o}},{key:"viewOptions",value:function(){return this.options}},{key:"undelegateAppLinks",value:function(){this.$el&&this.$el.off(".appLinks".concat(this.cid))}},{key:"renderAppLinks",value:function(){var e=this,t=this.appLinks;t&&(t=this.normalizeUIKeys(t),this.undelegateAppLinks(),r.each(r.keys(t),(function(n){var r=n,i=t[n],o=f.a.getHref(i);"[this]"===r&&(r=null);var a=r?e.$el.find(n):e.$el;(a.is("a")||a.is("button"))&&(o&&"/"!==o&&a.attr("href",o),e.delegate("click.appLinks".concat(e.cid),r,(function(e){e.preventDefault(),f.a.trigger(i)})))})))}},{key:"hasPartialLoadingRegions",value:function(){return void 0!==this._hasPartialLoadingRegions||(this._hasPartialLoadingRegions=r.some(this.regions,(function(e){return r.has(e,"partialLoading")}))),this._hasPartialLoadingRegions}},{key:"renderPartialLoading",value:function(e){i.Radio.channel(u.a.SHELL).trigger("render:partial:loading",this,e)}},{key:"listenTo",value:function(){return a.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],g(C(n.prototype),"listenTo",this))}},{key:"render",value:function(){if(this._isDestroyed)return this;var e=this.processRequriedResources(!0);return e&&(e=this.triggerMethod("before:render",this)),!1!==e&&(e=!0),!1===(e=e&&this.processRequriedResources(!1))?(this._partialLoadingRendered||!this.hasPartialLoadingRegions()||(this._partialLoadingRendered=!0,this._reInitRegions(),this._renderTemplate(),this.renderPartialLoading()),this):((this._isRendered||this._partialLoadingRendered)&&this._reInitRegions(),this.setTitle(),this._renderTemplate(),this.bindUIElements(),this.renderAppLinks(),this._partialLoadingRendered=!1,this._isRendered=!0,this.triggerMethod("render",this),this)}},{key:"processRequriedResources",value:function(e){return!0}},{key:"setTitle",value:function(){}}],[{key:"AddViewDataExtension",value:function(e){n.ViewDataExtensions.push(e)}}]),n}(o.View);k.ViewDataExtensions=[];var x=function(e){_(n,e);var t=T(n);function n(e){var r;return y(this,n),(r=t.call(this,e)).boundListeners={},r.resourceInstances={},r}return v(n,[{key:"processRequriedResources",value:function(e){var t=this,n=r.keys(this.requiredResources);if(!n.length)return!0;var i=this,o=!0;return r.each(n,(function(n){var r=t.requiredResources[n];if(r.beforeOnBeforeRender===e){var a=r.dataServiceName;t.resourceInstances[a]||(t.resourceInstances[a]=r.getInstance(t)),t.boundListeners["".concat(a,":").concat(r.eventName)]||(t.listenTo(t.resourceInstances[a].channelName,r.eventName,t.render),t.boundListeners["".concat(a,":").concat(r.eventName)]=!0),i[n]=r.getData(t.resourceInstances[a]),o=o&&!!i[n]}})),o}},{key:"setTitle",value:function(){r.isString(this.title)||!1===this.title||c.c.throw(new s.a("Must define a title for ".concat(this.name,"."))),i.Radio.channel(u.a.SHELL).trigger("set:page:title",this.title)}}]),n}(k),O=function(e){_(n,e);var t=T(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(k)},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(70),i=n(81),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(48);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(24),i=n(236);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){var r=n(11);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r=n(41);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(42),i=n(14),o=n(11);e.exports=r||!o((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete i[e]}))},function(e,t,n){var r=n(24),i=n(34),o=n(16)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){"use strict";var r,i,o=n(122),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,l=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(e){var t,n,r,i,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),l&&(t=u.lastIndex),r=a.call(u,e),l&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),c&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},function(e,t,n){var r=n(18),i=n(47),o=n(16)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict";var r=n(29),i=n(41),o=n(11),a=n(16),s=n(90),u=a("species"),l=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=a(e),d=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),p=d&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!d||!p||"replace"===e&&!l||"split"===e&&!c){var y=/./[h],m=n(h,""[e],(function(e,t,n,r,i){return t.exec===s?d&&!i?{done:!0,value:y.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=m[0],g=m[1];i(String.prototype,e,v),i(RegExp.prototype,h,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)}),f&&r(RegExp.prototype[h],"sham",!0)}}},function(e,t,n){"use strict";var r=n(77).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(47),i=n(90);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(25),i="["+n(125)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t){e.exports={toUnsigned:function(e){return e>>>0},toHexString:function(e){return("00"+e.toString(16)).slice(-2)}}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Staff="staff",e.Learner="learner",e.Unknown="unknown"}(r||(r={}))},function(e,t,n){"use strict";n.r(t);var r=n(23);n.d(t,"AppLinkHelper",(function(){return r.a})),n.d(t,"AppLinkUtility",(function(){return r.b}));var i=n(196);n.d(t,"Application",(function(){return i.a}));var o=n(197);n.d(t,"AppRouter",(function(){return o.a}));var a=n(198);n.d(t,"Behavior",(function(){return a.a}));var s=n(100);n.d(t,"Collection",(function(){return s.a}));var u=n(128);n.d(t,"CollectionView",(function(){return u.a})),n.d(t,"ComponentCollection",(function(){return u.a}));var l=n(8);n.d(t,"Error",(function(){return l.a})),n.d(t,"ErrorHelper",(function(){return l.c})),n.d(t,"SilentError",(function(){return l.d}));var c=n(199);n.d(t,"LayoutView",(function(){return c.a}));var f=n(200);n.d(t,"NestedModel",(function(){return f.a}));var h=n(201);n.d(t,"Service",(function(){return h.a}));var d=n(65);n.d(t,"Model",(function(){return d.a}));var p=n(78);n.d(t,"View",(function(){return p.b})),n.d(t,"Component",(function(){return p.a}));var y=n(13);n.d(t,"EventNames",(function(){return y.a}));var m=n(202);n.d(t,"LayoutService",(function(){return m.a}));var v=n(99);n.d(t,"Middleware",(function(){return v.a}));var g=n(36);n.d(t,"LocationUtils",(function(){return g.a}));var b=n(203);n.d(t,"Shell",(function(){return b.a}));var _=n(204);for(var w in _)["AppLinkHelper","AppLinkUtility","Application","AppRouter","Behavior","Collection","CollectionView","ComponentCollection","Error","ErrorHelper","SilentError","LayoutView","NestedModel","Service","Model","View","Component","EventNames","LayoutService","Middleware","LocationUtils","Shell","default"].indexOf(w)<0&&function(e){n.d(t,e,(function(){return _[e]}))}(w)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,"a",(function(){return i}));var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"use",value:function(e){var t;this.go=(t=this.go,function(n,r){return t(n,(function(t){return e(t,r)}))})}},{key:"go",value:function(e,t){t(e)}}])&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(10),i=n(22);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(l,e);var t,n,r,o=f(l);function l(){return a(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(d(l.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Collection)},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},o=n(333);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=r}).call(this,n(32))},function(e,t,n){"use strict";(function(t){var r,i=(r=n(55))&&"object"==typeof r&&"default"in r?r.default:r;e.exports=function(e){for(var n,r=(n=e,i.atob?i.atob(n):t.from(n,"base64").toString("binary")),o=new Uint8Array(r.length),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);return o}}).call(this,n(338).Buffer)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,"a",(function(){return i}));var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.variables={}}var t,n,i;return t=e,i=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"name",get:function(){return"EnvironmentVariables"}},{key:"isDevelopment",get:function(){return this.variables.isDevelopment}},{key:"get",value:function(e){return this.variables[e]}},{key:"setUpVariables",value:function(e){this.variables=e}}])&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}().Instance},function(e,t,n){"use strict";
|
|
14
|
-
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */var r=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();e.exports=r},function(e,t,n){"use strict";
|
|
15
|
-
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)};t.bytesToString=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,r(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},t.concatTypedArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return e+=t&&(t.byteLength||t.length)||0}),0),o=new Uint8Array(i),a=0;return t.forEach((function(e){e=r(e),o.set(e,a),a+=e.byteLength})),o},t.isTypedArray=function(e){return ArrayBuffer.isView(e)},t.stringToBytes=function(e,t){void 0===t&&(t=!1);return"string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e?[]:(t||(e=unescape(encodeURIComponent(e))),e.split("").map((function(e){return 255&e.charCodeAt(0)})))},t.toUint8=r},function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=n},function(e,t,n){"use strict";function r(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(14),i=n(18),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(14),i=n(29);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(144),i=n(112).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(28),i=n(15),o=n(61),a=function(e){return function(t,n,a){var s,u=r(t),l=i(u.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(11),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==l||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},function(e,t,n){var r,i,o=n(14),a=n(82),s=o.process,u=s&&s.versions,l=u&&u.v8;l?i=(r=l.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){var r=n(47),i=n(16)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(16)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(28),i=n(39),o=n(75),a=n(35),s=n(119),u=a.set,l=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){"use strict";var r=n(5),i=n(120),o=n(64),a=n(83),s=n(52),u=n(29),l=n(41),c=n(16),f=n(42),h=n(75),d=n(157),p=d.IteratorPrototype,y=d.BUGGY_SAFARI_ITERATORS,m=c("iterator"),v=function(){return this};e.exports=function(e,t,n,c,d,g,b){i(n,t,c);var _,w,T,S=function(e){if(e===d&&O)return O;if(!y&&e in k)return k[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},E=t+" Iterator",C=!1,k=e.prototype,x=k[m]||k["@@iterator"]||d&&k[d],O=!y&&x||S(d),P="Array"==t&&k.entries||x;if(P&&(_=o(P.call(new e)),p!==Object.prototype&&_.next&&(f||o(_)===p||(a?a(_,p):"function"!=typeof _[m]&&u(_,m,v)),s(_,E,!0,!0),f&&(h[E]=v))),"values"==d&&x&&"values"!==x.name&&(C=!0,O=function(){return x.call(this)}),f&&!b||k[m]===O||u(k,m,O),h[t]=O,d)if(w={values:S("values"),keys:g?O:S("keys"),entries:S("entries")},b)for(T in w)(y||C||!(T in k))&&l(k,T,w[T]);else r({target:t,proto:!0,forced:y||C},w);return w}},function(e,t,n){"use strict";var r=n(157).IteratorPrototype,i=n(62),o=n(59),a=n(52),s=n(75),u=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,l,!1,!0),s[l]=u,e}},function(e,t,n){"use strict";var r=n(48),i=n(26),o=n(16),a=n(17),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(24);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(91);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(16)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t,n){var r=n(11),i=n(125);e.exports=function(e){return r((function(){return!!i[e]()||"
"!="
"[e]()||i[e].name!==e}))}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(3),i=n(27),o=n(22),a=n(8);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=c(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function c(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(c,e);var t,n,i,s=h(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),t=s.call(this,e),r.result(p(t),"name")||a.c.throw(new a.b("Error: View with cid:".concat(t.cid," requires a name."))),t}return t=c,(n=[{key:"serializeModel",value:function(){return this.model?this.model.toJSON():{}}},{key:"serializeCollection",value:function(){return this.collection?this.collection.toJSON():[]}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(y(c.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.CollectionView)},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],c=0;(u=new Error(t.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";var r=n(55),i=n(56),o=n(331);function a(e,t,n){var r=e;return o(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function s(e,t,n){return u(t=a(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=l.response?l.response:l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l),m)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,v)}function o(){if(!u){var t;clearTimeout(c),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=v,o=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(i.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}(l.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),n(o,i,i.body)}}var a,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var c,f=l.url=e.uri||e.url,h=l.method=e.method||"GET",d=e.body||e.data,p=l.headers=e.headers||{},y=!!e.sync,m=!1,v={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:l};if("json"in e&&!1!==e.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===e.json?d:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(o,0)},l.onload=o,l.onerror=i,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=i,l.open(h,f,!y,e.username,e.password),y||(l.withCredentials=!!e.withCredentials),!y&&e.timeout>0&&(c=setTimeout((function(){if(!u){u=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),l.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&l.setRequestHeader(a,p[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(d||null),l}e.exports=s,e.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){s["delete"===e?"del":e]=function(t,n,r){return(n=a(t,n,r)).method=e.toUpperCase(),u(n)}}))},function(e,t,n){var r=n(55),i=e.exports={WebVTT:n(332),VTTCue:n(334),VTTRegion:n(335)};r.vttjs=i,r.WebVTT=i.WebVTT;var o=i.VTTCue,a=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=o,r.VTTRegion=a},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},function(e,t,n){"use strict";
|
|
16
|
-
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i;t.simpleTypeFromSourceType=function(e){return r.test(e)?"hls":i.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},function(e,t,n){"use strict";var r,i,o,a,s,u,l=n(96).toUnsigned,c=n(96).toHexString,f=n(347),h=n(181),d=n(348),p=n(349),y=n(351);r=function(e){return f(e,["moov","trak"]).reduce((function(e,t){var n,r,i,o,a;return(n=f(t,["tkhd"])[0])?(r=n[0],o=l(n[i=0===r?12:20]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=f(t,["mdia","mdhd"])[0])?(i=0===(r=a[0])?12:20,e[o]=l(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),e):null):null}),{})},i=function(e,t){var n,r,i;return n=f(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return f(t,["tfhd"]).map((function(n){var r,i,o;return r=l(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,(o="number"!=typeof(o=f(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=l(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=l(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0])||isNaN(o)?1/0:o)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},o=function(e,t){var n,r=f(t,["moof","traf"]),i=0,o=0;if(r&&r.length){var a=f(r[0],["tfhd"])[0],s=f(r[0],["trun"])[0],u=f(r[0],["tfdt"])[0];if(a)n=d(a).trackId;if(u)i=y(u).baseMediaDecodeTime;if(s){var l=p(s);l.samples&&l.samples.length&&(o=l.samples[0].compositionTimeOffset||0)}}return(i+o)/(e[n]||9e4)},a=function(e){var t=f(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=f(e,["mdia","hdlr"]),r=f(e,["tkhd"]);t.forEach((function(e,t){var i,o,a=h(e.subarray(8,12)),s=r[t];"vide"===a&&(o=0===(i=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),n.push(o))}))})),n},u=function(e){var t=0===e[0]?12:20;return l(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},s=function(e){var t=f(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},o=f(e,["tkhd"])[0];o&&(r=(t=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var a=f(e,["mdia","hdlr"])[0];if(a){var s=h(a.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var l=f(e,["mdia","minf","stbl","stsd"])[0];if(l){var d=l.subarray(8);i.codec=h(d.subarray(4,8));var p,y=f(d,[i.codec])[0];y&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(p=y.subarray(78),"avcC"===h(p.subarray(4,8))&&p.length>11?(i.codec+=".",i.codec+=c(p[9]),i.codec+=c(p[10]),i.codec+=c(p[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(p=y.subarray(28),"esds"===h(p.subarray(4,8))&&p.length>20&&0!==p[19]?(i.codec+="."+c(p[19]),i.codec+="."+c(p[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var m=f(e,["mdia","mdhd"])[0];m&&(i.timescale=u(m)),n.push(i)})),n},e.exports={findBox:f,parseType:h,timescale:r,startTime:i,compositionStartTime:o,videoTrackIds:a,tracks:s,getTimescaleFromMediaHeader:u}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,h=Math.min,d=function(){return l.Date.now()};function p(e,t,n){var r,i,o,a,s,u,l=0,c=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function b(e){return l=e,s=setTimeout(w,t),c?g(e):a}function _(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-l>=o}function w(){var e=d();if(_(e))return T(e);s=setTimeout(w,function(e){var n=t-(e-u);return p?h(n,o-(e-l)):n}(e))}function T(e){return s=void 0,v&&r?g(e):(r=i=void 0,a)}function S(){var e=d(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return b(u);if(p)return s=setTimeout(w,t),g(u)}return void 0===s&&(s=setTimeout(w,t)),a}return t=m(t)||0,y(n)&&(c=!!n.leading,o=(p="maxWait"in n)?f(m(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:T(d())},S}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return y(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),p(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(32))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,h=Math.min,d=function(){return l.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,u,l=0,c=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function b(e){return l=e,s=setTimeout(w,t),c?g(e):a}function _(e){var n=e-u;return void 0===u||n>=t||n<0||m&&e-l>=o}function w(){var e=d();if(_(e))return T(e);s=setTimeout(w,function(e){var n=t-(e-u);return m?h(n,o-(e-l)):n}(e))}function T(e){return s=void 0,v&&r?g(e):(r=i=void 0,a)}function S(){var e=d(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return b(u);if(m)return s=setTimeout(w,t),g(u)}return void 0===s&&(s=setTimeout(w,t)),a}return t=y(t)||0,p(n)&&(c=!!n.leading,o=(m="maxWait"in n)?f(y(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:T(d())},S}}).call(this,n(32))},function(e,t,n){e.exports={image:"_1YW-E"}},function(e,t,n){"use strict";var r=n(1);var i=function(e){var t=Object(r.useRef)(e);return Object(r.useEffect)((function(){t.current=e}),[e]),t};function o(e){var t=i(e);return Object(r.useCallback)((function(){return t.current&&t.current.apply(t,arguments)}),[t])}n.d(t,"a",(function(){return o}))},function(e,t,n){var r=n(17),i=n(11),o=n(108);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(70);e.exports=r("native-function-to-string",Function.toString)},function(e,t,n){var r=n(14),i=n(140),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i.call(o))},function(e,t,n){var r=n(48),i=n(110),o=n(113),a=n(24);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){e.exports=n(14)},function(e,t,n){var r=n(33),i=n(28),o=n(111).indexOf,a=n(71);e.exports=function(e,t){var n,s=i(e),u=0,l=[];for(n in s)!r(a,n)&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(l,n)||l.push(n));return l}},function(e,t,n){var r=n(11);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(17),i=n(26),o=n(24),a=n(72);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},function(e,t,n){var r=n(48);e.exports=r("document","documentElement")},function(e,t,n){var r=n(28),i=n(110).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){t.f=n(16)},function(e,t,n){"use strict";var r=n(5),i=n(43).filter;r({target:"Array",proto:!0,forced:!n(74)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(51),i=n(15),o=n(63),a=function(e,t,n,s,u,l,c,f){for(var h,d=u,p=0,y=!!c&&o(c,f,3);p<s;){if(p in n){if(h=y?y(n[p],p,t):n[p],l>0&&r(h))d=a(e,t,h,i(h.length),d,l-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[d]=h}d++}p++}return d};e.exports=a},function(e,t,n){"use strict";var r=n(5),i=n(153);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(e,t,n){"use strict";var r=n(43).forEach,i=n(44);e.exports=i("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},function(e,t,n){var r=n(24);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(16),i=n(75),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var r=n(116),i=n(75),o=n(16)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";var r,i,o,a=n(64),s=n(29),u=n(33),l=n(16),c=n(42),f=l("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),c||u(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(e,t,n){var r=n(11);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(5),i=n(160).left;r({target:"Array",proto:!0,forced:n(44)("reduce")},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(34),i=n(21),o=n(69),a=n(15),s=function(e){return function(t,n,s,u){r(n);var l=i(t),c=o(l),f=a(l.length),h=e?f-1:0,d=e?-1:1;if(s<2)for(;;){if(h in c){u=c[h],h+=d;break}if(h+=d,e?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:f>h;h+=d)h in c&&(u=n(u,c[h],h,l));return u}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var r=n(5),i=n(14),o=n(114),a=n(41),s=n(54),u=n(50),l=n(85),c=n(18),f=n(11),h=n(117),d=n(52),p=n(253);e.exports=function(e,t,n,y,m){var v=i[e],g=v&&v.prototype,b=v,_=y?"set":"add",w={},T=function(e){var t=g[e];a(g,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof v||!(m||g.forEach&&!f((function(){(new v).entries().next()})))))b=n.getConstructor(t,e,y,_),s.REQUIRED=!0;else if(o(e,!0)){var S=new b,E=S[_](m?{}:-0,1)!=S,C=f((function(){S.has(1)})),k=h((function(e){new v(e)})),x=!m&&f((function(){for(var e=new v,t=5;t--;)e[_](t,t);return!e.has(-0)}));k||((b=t((function(t,n){l(t,b,e);var r=p(new v,t,b);return null!=n&&u(n,r[_],r,y),r}))).prototype=g,g.constructor=b),(C||x)&&(T("delete"),T("has"),y&&T("get")),(x||E)&&T(_),m&&g.clear&&delete g.clear}return w[e]=b,r({global:!0,forced:b!=v},w),d(b,e),m||n.setStrong(b,e,y),b}},function(e,t,n){var r=n(5),i=n(256);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){var r=n(17),i=n(72),o=n(28),a=n(79).f,s=function(e){return function(t){for(var n,s=o(t),u=i(s),l=u.length,c=0,f=[];l>c;)n=u[c++],r&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}};e.exports={entries:s(!0),values:s(!1)}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var r=n(41),i=n(279),o=Object.prototype;i!==o.toString&&r(o,"toString",i,{unsafe:!0})},function(e,t,n){var r=n(14);e.exports=r.Promise},function(e,t,n){var r,i,o,a=n(14),s=n(11),u=n(47),l=n(63),c=n(147),f=n(108),h=n(82),d=a.location,p=a.setImmediate,y=a.clearImmediate,m=a.process,v=a.MessageChannel,g=a.Dispatch,b=0,_={},w=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},T=function(e){return function(){w(e)}},S=function(e){w(e.data)},E=function(e){a.postMessage(e+"",d.protocol+"//"+d.host)};p&&y||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return _[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(b),b},y=function(e){delete _[e]},"process"==u(m)?r=function(e){m.nextTick(T(e))}:g&&g.now?r=function(e){g.now(T(e))}:v&&!/(iphone|ipod|ipad).*applewebkit/i.test(h)?(o=(i=new v).port2,i.port1.onmessage=S,r=l(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(E)?r="onreadystatechange"in f("script")?function(e){c.appendChild(f("script")).onreadystatechange=function(){c.removeChild(this),w(e)}}:function(e){setTimeout(T(e),0)}:(r=E,a.addEventListener("message",S,!1))),e.exports={set:p,clear:y}},function(e,t,n){var r=n(24),i=n(18),o=n(76);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(5),i=n(90);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){"use strict";var r=n(77).charAt,i=n(35),o=n(119),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(92),i=n(24),o=n(15),a=n(25),s=n(93),u=n(94);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),l=String(this);if(!a.global)return u(a,l);var c=a.unicode;a.lastIndex=0;for(var f,h=[],d=0;null!==(f=u(a,l));){var p=String(f[0]);h[d]=p,""===p&&(a.lastIndex=s(l,o(a.lastIndex),c)),d++}return 0===d?null:h}]}))},function(e,t,n){var r=n(15),i=n(173),o=n(25),a=Math.ceil,s=function(e){return function(t,n,s){var u,l,c=String(o(t)),f=c.length,h=void 0===s?" ":String(s),d=r(n);return d<=f||""==h?c:(u=d-f,(l=i.call(h,a(u/h.length))).length>u&&(l=l.slice(0,u)),e?c+l:l+c)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,n){"use strict";var r=n(49),i=n(25);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){var r=n(82);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(e,t,n){"use strict";var r=n(92),i=n(24),o=n(21),a=n(15),s=n(49),u=n(25),l=n(93),c=n(94),f=Math.max,h=Math.min,d=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,y=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n){return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,o){var u=n(t,e,this,o);if(u.done)return u.value;var d=i(e),p=String(this),y="function"==typeof o;y||(o=String(o));var m=d.global;if(m){var v=d.unicode;d.lastIndex=0}for(var g=[];;){var b=c(d,p);if(null===b)break;if(g.push(b),!m)break;""===String(b[0])&&(d.lastIndex=l(p,a(d.lastIndex),v))}for(var _,w="",T=0,S=0;S<g.length;S++){b=g[S];for(var E=String(b[0]),C=f(h(s(b.index),p.length),0),k=[],x=1;x<b.length;x++)k.push(void 0===(_=b[x])?_:String(_));var O=b.groups;if(y){var P=[E].concat(k,C,p);void 0!==O&&P.push(O);var R=String(o.apply(void 0,P))}else R=r(E,p,C,k,O,o);C>=T&&(w+=p.slice(T,C)+R,T=C+E.length)}return w+p.slice(T)}];function r(e,n,r,i,a,s){var u=r+e.length,l=i.length,c=y;return void 0!==a&&(a=o(a),c=p),t.call(s,c,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return t;if(c>l){var f=d(c/10);return 0===f?t:f<=l?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):t}s=i[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){var r=n(14),i=n(177),o=n(118),a=n(29),s=n(16),u=s("iterator"),l=s("toStringTag"),c=o.values;for(var f in i){var h=r[f],d=h&&h.prototype;if(d){if(d[u]!==c)try{a(d,u,c)}catch(e){d[u]=c}if(d[l]||a(d,l,f),i[f])for(var p in o)if(d[p]!==o[p])try{a(d,p,o[p])}catch(e){d[p]=o[p]}}}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";
|
|
17
|
-
/*
|
|
18
|
-
object-assign
|
|
19
|
-
(c) Sindre Sorhus
|
|
20
|
-
@license MIT
|
|
21
|
-
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(Object.create){var i=Object.create(t.prototype);r.__proto__=i}if(!(r instanceof t)){function o(){}o.prototype=t.prototype,n(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,l=i.ENTITY_REFERENCE_NODE=5,c=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,d=i.DOCUMENT_NODE=9,p=i.DOCUMENT_TYPE_NODE=10,y=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,v={},g={},b=(v.INDEX_SIZE_ERR=(g[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(g[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(g[3]="Hierarchy request error",3)),_=(v.WRONG_DOCUMENT_ERR=(g[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(g[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(g[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(g[7]="No modification allowed",7),v.NOT_FOUND_ERR=(g[8]="Not found",8)),w=(v.NOT_SUPPORTED_ERR=(g[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(g[10]="Attribute in use",10));v.INVALID_STATE_ERR=(g[11]="Invalid state",11),v.SYNTAX_ERR=(g[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(g[13]="Invalid modification",13),v.NAMESPACE_ERR=(g[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(g[15]="Invalid access",15);function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,g[e]),this.message=g[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function S(){}function E(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);te(e,"length",r.length),n(r,e),e._inc=t}}function k(){}function x(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function O(e,t,n,r){if(r?t[x(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&D(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function P(e,t,n){var r=x(t,n);if(!(r>=0))throw T(_,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(D(o,e,n),n.ownerElement=null)}}function R(e){if(this._features={},e)for(var t in e)this._features=e[t]}function A(){}function j(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function I(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(I(e,t))return!0}while(e=e.nextSibling)}function L(){}function D(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function M(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function N(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,M(e.ownerDocument,e),t}function B(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===y){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return M(e.ownerDocument||e,e),t.nodeType==y&&(t.firstChild=t.lastChild=null),t}function U(){this._nsMap={}}function F(){}function V(){}function H(){}function z(){}function q(){}function W(){}function $(){}function G(){}function K(){}function Y(){}function X(){}function Q(){}function J(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return ee(this,n,e,t,a),n.join("")}function Z(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case o:i||(i=[]);i.length;var c=e.attributes,m=c.length,v=e.firstChild,g=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",g);for(var b=0;b<m;b++){"xmlns"==(_=c.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(b=0;b<m;b++){var _;if(Z(_=c.item(b),0,i)){var w=_.prefix||"",T=_.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}ee(_,t,n,r,i)}if(Z(e,0,i)){w=e.prefix||"",T=e.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}if(v||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(g)){if(t.push(">"),n&&/^script$/i.test(g))for(;v;)v.data?t.push(v.data):ee(v,t,n,r,i),v=v.nextSibling;else for(;v;)ee(v,t,n,r,i),v=v.nextSibling;t.push("</",g,">")}else t.push("/>");return;case d:case y:for(v=e.firstChild;v;)ee(v,t,n,r,i),v=v.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,j),'"');case s:return t.push(e.data.replace(/[<&]/g,j));case u:return t.push("<![CDATA[",e.data,"]]>");case h:return t.push("\x3c!--",e.data,"--\x3e");case p:var E=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(' PUBLIC "',E),C&&"."!=C&&t.push('" "',C),t.push('">');else if(C&&"."!=C)t.push(' SYSTEM "',C,'">');else{var k=e.internalSubset;k&&t.push(" [",k,"]"),t.push(">")}return;case f:return t.push("<?",e.target," ",e.data,"?>");case l:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}T.prototype=Error.prototype,n(v,T),S.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return C(this),this[e]},r(E,S),k.prototype={length:0,item:S.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new T(w);var n=this.getNamedItem(e.nodeName);return O(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new T(w);return t=this.getNamedItemNS(e.namespaceURI,e.localName),O(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return P(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return P(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},R.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new L;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new W;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},A.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return B(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return N(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var s in n){var u=n[s];"object"!=typeof u&&u!=i[s]&&(i[s]=u)}n.childNodes&&(i.childNodes=new S);switch(i.ownerDocument=t,i.nodeType){case o:var l=n.attributes,c=i.attributes=new k,f=l.length;c._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(e(t,l.item(h),!0));break;case a:r=!0}if(r)for(var d=n.firstChild;d;)i.appendChild(e(t,d,r)),d=d.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==s&&e.nodeType==s?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,A),n(i,A.prototype),L.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==y){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),B(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),N(this,e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=t;case y:break;case a:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(e(t,s,r)),s=s.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return I(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new U;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new S,(t.attributes=new k)._ownerElement=t,t},createDocumentFragment:function(){var e=new Y;return e.ownerDocument=this,e.childNodes=new S,e},createTextNode:function(e){var t=new H;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new q;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new X;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new F;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new K;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new U,r=t.split(":"),i=n.attributes=new k;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new F,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(L,A),U.prototype={nodeType:o,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===y?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,M(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return I(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return I(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},L.prototype.getElementsByTagName=U.prototype.getElementsByTagName,L.prototype.getElementsByTagNameNS=U.prototype.getElementsByTagNameNS,r(U,A),F.prototype.nodeType=a,r(F,A),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(g[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(V,A),H.prototype={nodeName:"#text",nodeType:s,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,V),z.prototype={nodeName:"#comment",nodeType:h},r(z,V),q.prototype={nodeName:"#cdata-section",nodeType:u},r(q,V),W.prototype.nodeType=p,r(W,A),$.prototype.nodeType=m,r($,A),G.prototype.nodeType=c,r(G,A),K.prototype.nodeType=l,r(K,A),Y.prototype.nodeName="#document-fragment",Y.prototype.nodeType=y,r(Y,A),X.prototype.nodeType=f,r(X,A),Q.prototype.serializeToString=function(e,t,n){return J.call(e,t,n)},A.prototype.toString=J;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(A.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case o:case y:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case o:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),te=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DOMImplementation=R,t.XMLSerializer=Q},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t){e.exports=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])}},function(e,t,n){"use strict";var r,i,o,a,s,u,l,c,f,h,d,p,y,m,v,g,b,_,w,T,S,E,C,k,x,O,P,R;n.d(t,"i",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"g",(function(){return y})),n.d(t,"e",(function(){return _})),n.d(t,"b",(function(){return x})),n.d(t,"d",(function(){return O})),n.d(t,"h",(function(){return P})),n.d(t,"c",(function(){return R})),function(e){e.Stream="cv_product_stream",e.WebPlayerStream="cv_product_webplayer_stream",e.StreamProgress="cv_product_stream_progress",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_instant_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.Unshare="cv_product_unshare",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.Print="cv_product_print",e.Copy="cv_product_copy",e.Activate="cv_product_activate",e.VerifyEmail="cv_product_verify_email",e.ChangePassword="cv_product_change_password",e.ManageGroup="cv_product_manage_group",e.Export="cv_product_export",e.SendEmail="cv_product_send_email",e.Publish="cv_product_publish",e.Answer="cv_product_submit",e.Complete="cv_product_complete",e.Archive="cv_product_archive",e.Promote="cv_product_promote",e.Demote="cv_product_demote",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(r||(r={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Restriction="restriction",e.Interactive="interactive",e.Interaction="interaction",e.PDF="pdf",e.CustomerSetting="customer_setting",e.UserSetting="user_setting",e.StaffRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Playlists="playlists",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.DirectShare="direct_share",e.Upload="upload",e.SearchResults="search_results",e.Audience="audience",e.User="user",e.Clip="clip",e.UserChannel="user_channel",e.Widget="widget",e.Url="url",e.SocialShare="social_share"}(i||(i={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.ExpandableVideoThumbnail="expandable_video_thumbnail",e.VideoItemPreview="video_item_preview",e.VideoDetails="video_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.StaffRequestDetails="staff_request_details",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.SeriesListItem="series_list_item",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.FeaturedSeriesSearchResult="featured_series_search_result",e.StaffManager="staff_manager",e.StaffManagerListItem="staff_manager_list_item",e.StudentManager="student_manager",e.StudentManagerListItem="student_manager_list_item",e.EditUser="edit_user",e.Classroom="classroom",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.ManageClassroomTeachers="manage_classroom_teachers",e.ManageClassroomTeacherListItem="manage_classroom_teachers_list_item",e.ArchivedClassrooms="archived_classrooms",e.PreviewInteractive="preview_interactive",e.PreviewSharedInteractive="preview_shared_interactive",e.PreviewInteractiveQuestions="preview_interactive_questions",e.EditInteractive="edit_interactive",e.EditInteractiveDetails="edit_interactive_details",e.PlaySharedInteractive="play_shared_interactive",e.PlayInteractive="play_interactive",e.InteractiveListItem="interactive_list_item",e.DeleteInteractive="delete_interactive",e.NewInteractive="new_interactive",e.CopyInteractive="copy_interactive",e.UnpublishInteractive="unpublish_interactive",e.ShareInteractive="share_interactive",e.PlayPage="play_page",e.Player="player",e.FloatingPlayer="floating_player",e.InteractivePlayer="interactive_player",e.EmbeddedPlayer="embedded_player",e.CreateClipPlayer="create_clip_player",e.PlayClip="play_clip",e.PlaySharedClip="play_shared_clip",e.ClipListItem="clip_list_item",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.TopicsOnboarding="topics_onboarding",e.MyUploads="my_uploads",e.SlidingList="sliding_list",e.HeroBannerItem="hero_banner_item",e.SlidingListItem="sliding_list_item",e.ClassificationListItem="classification_list_item",e.ClassificationComingSoon="classification_coming_soon",e.ClassificationHero="classification_hero",e.Dashboard="dashboard",e.ProductBanner="product_banner",e.UserOptions="user_options",e.Settings="settings",e.StudentFeed="student_feed",e.SharedByMe="shared_by_me",e.SharedWithMe="shared_with_me",e.TopVideos="top_videos",e.VideoViewsList="video_views_list",e.LiteUpgradeFeedbackPopup="lite_upgrade_feedback_popup",e.LiteUpgradeBanner="lite_upgrade_banner",e.LiteUpgradeOnboarding="lite_upgrade_onboarding"}(o||(o={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard"}(a||(a={})),function(e){e.PageLoad="page_load"}(s||(s={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(u||(u={})),function(e){e.Publish="publish",e.Unpublish="unpublish"}(l||(l={})),function(e){e.ActivateUser="activate_user",e.VerifyEmail="verify_email"}(c||(c={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}(f||(f={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}(h||(h={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(d||(d={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit"}(p||(p={})),function(e){e.Embedded="embedded"}(y||(y={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open",e.Button="button",e.Link="link",e.Tile="tile",e.Thumbnail="thumbnail",e.Cover="cover",e.TallPoster="tall_poster",e.Slide="slide",e.ExternalLink="external_link",e.ViewStudentWorkspace="view_student_workspace"}(m||(m={})),function(e){e.FeatureUserChannelVideo="feature_user_channel_video",e.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",e.ShareClip="share_clip",e.ViewOriginalVideo="view_original_video",e.ShareInteractive="share_interactive",e.DeleteInteractiveVideo="delete_interactive_video",e.CopyInteractiveVideo="copy_interactive_video",e.EditInteractiveVideo="edit_interactive_video",e.PrintAsWorksheet="print_as_worksheet",e.PreviewInteractiveVideo="preview_interactive_video",e.ViewResults="view_results",e.ViewUsage="view_usage",e.MoveToAnotherFolder="move_to_another_folder",e.CreateInteractiveVideo="create_interactive_video",e.ShareVideo="share_video",e.EditVideo="edit_video",e.DownloadVideo="download_video",e.AddToExchange="add_to_exchange",e.AddToUserChannel="add_to_user_channel",e.CreateClip="create_clip",e.FlagVideo="flag_video",e.AddToLibrary="add_to_library",e.AddToWorkspace="add_to_workspace",e.AddToPlaylist="add_to_playlist",e.RemoveFromPlaylist="remove_from_playlist",e.AddCurriculumLink="add_curriculum_link",e.ViewCurriculumLinks="view_curriculum_links",e.OpenInCurator="open_in_curator",e.ManageVideoAccess="manage_video_access",e.Approve="approve",e.AddToLocalCache="add_to_local_cache",e.OpenInLibraryEditor="open_in_library_editor",e.PlayClip="play_clip",e.EditClip="edit_clip",e.DeleteClip="delete_clip",e.EditVideoDetails="edit_video_details",e.DeleteVideo="delete_video"}(v||(v={})),function(e){e.Remove="remove"}(g||(g={})),function(e){e.LibraryReview="library_review"}(b||(b={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(_||(_={})),function(e){e.Edit="edit"}(w||(w={})),function(e){e.Image="image",e.User="user",e.Playlist="playlist",e.Link="link",e.Avatar="avatar",e.Clip="clip",e.Interactive="interactive",e.Classroom="classroom"}(T||(T={})),function(e){e.On="on",e.Off="off"}(S||(S={})),function(e){e.ContinueSession="continue_session",e.NewSession="new_session"}(E||(E={})),function(e){e.DirectShare="direct_share",e.CopyLink="copy_link",e.CopyEmbedHtml="copy_embed_html",e.PluginEmbed="plugin_embed"}(C||(C={})),function(e){e.GoToOnline="go_to_online",e.Feedback="feedback"}(k||(k={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(x||(x={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(O||(O={})),function(e){e.Video="videos",e.Folder="categories",e.Series="series",e.Tags="tags",e.Subjects="subjects"}(P||(P={})),function(e){e[e.V1=1]="V1",e[e.V2=2]="V2"}(R||(R={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(3),i=n(10),o=n(27),a=n(13),s=n(22),u=n(8);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=p(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function p(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(f,e);var t,n,o,l=m(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=l.call(this,e)).mergeOptions(e,[].concat(c(t.defaultProps),c(t.props||[]))),r.result(g(t),"name")||u.c.throw(new u.b("BaseApplication must define a name")),r.result(g(t),"channelName")||u.c.throw(new u.b("BaseApplication must define a channelName")),t.listenTo(t.getGlobalRadioChannel("popup"),a.a.SHOW_POPUP,t.onShowPopup),t.listenTo(t.getGlobalRadioChannel("alert"),"show:alert",t.onShowAlert),t}return t=f,(n=[{key:"defaultProps",get:function(){return["shell","layoutService"]}},{key:"getGlobalRadioChannel",value:function(e){var t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||u.c.throw(new u.b("Global channel ".concat(t," does not exist"))),i.Radio.channel(t)}},{key:"onLoadLayout",value:function(){if(this.layoutOptions&&this.layoutOptions.name){var e=r.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(r.extend(this.layoutOptions,{options:e})),this.layout||u.c.throw(new u.b("Layout: ".concat(this.layoutOptions.name," does not exist or was not registered"))),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}},{key:"onShowPopup",value:function(e){this.layout.getRegion("popup")||u.c.throw(new u.b("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}},{key:"onShowAlert",value:function(e){var t=e.ctor,n=e.collection,r=this.layout.getRegion("alert");r?r.hasView()||this.layout.showChildView("alert",new t({collection:n})):u.c.throw(new u.b("Your application layout must define an alert region"))}},{key:"setDefaultQueryParams",value:function(e){this.defaultQueryParams&&(e=r.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}},{key:"getAndClearDefaultQueryParams",value:function(){var e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(b(f.prototype),"listenTo",this))}}])&&h(t.prototype,n),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Application)},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(3),i=n(10),o=n(27),a=n(23),s=n(22),u=n(99),l=n(13),c=n(8),f=n(36),h=n(12);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=g(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function g(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=T(e)););return e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=/([A-Z])/g,E=/(^|:)(\w)/gi,C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(y,e);var t,n,o,d=_(y);function y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(t=d.call(this,e)).bindDisposal(),t.processInternalRoutes(),t.processExternalRoutes(),t.processAppLinks(),t}return t=y,(n=[{key:"bindDisposal",value:function(){var e=this;this.listenTo(h.a.SHELL,l.a.ROUTE,(function(t){t.application!==e.channelName&&e.destroyApp()}))}},{key:"addRouteLookup",value:function(e,t){var n=this;this.options.shell.addRouteLookup("".concat(this.channelName,":").concat(e),(function(r,i){return a.a.buildRoute(t,{application:n.channelName,action:e,args:r,params:i})}))}},{key:"processInternalRoutes",value:function(){var e=this;r.each(r.keys(this.appRoutes),(function(t){var n=e.appRoutes[t],i=e.toEventName(n);e.addRouteLookup(i,t),e.listenTo(e.channelName,i,(function(n,i){i&&i.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(n,{isAppRoute:!0},(function(){var o=r.extend({},e.controller.getAndClearDefaultQueryParams(),n.params);n.params=o,f.a.UpdateUrl(t,n,i)}))}))}))}},{key:"triggerNavLocked",value:function(e,t){e.trigger(l.a.NAV_IS_LOCKED,t),a.b.routingEnded()}},{key:"processExternalRoutes",value:function(){var e=this;this.externalRoutes&&r.each(r.keys(this.externalRoutes),(function(t){var n=e.externalRoutes[t],r=e.toEventName(n);e.addRouteLookup(r,t),e.listenTo(e.channelName,r,(function(t,n){n&&n.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks."));var r=i.Radio.channel(h.a.SHELL);e.options.shell.isNavLocked()?e.triggerNavLocked(r,t):f.a.PageLoad(a.a.getHref(t))}))}))}},{key:"processAppLinks",value:function(){var e=this;this.appLinks&&r.each(this.appLinks,(function(t){var n=e.toEventName(t);e.listenTo(e.channelName,n,(function(t,n){n&&n.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(t,{isAppRoute:!1})}))}))}},{key:"executeRoute",value:function(e,t,n){var o=this;this.validateAppLink(e);var s=this.toMethodName(e.action);a.b.routingStarted();var f=i.Radio.channel(h.a.SHELL);if(this.options.shell.isNavLocked())this.triggerNavLocked(f,e);else{var d=new u.a;r.each(this.filters,(function(e){return d.use(e)})),d.go({appLink:e,shell:this.options.shell},(function(){f.trigger(l.a.ROUTE,e,t),o.createApp();var i=o.controller;if(r.isFunction(i[s])||(a.b.routingEnded(),c.c.throw(new c.b("".concat(s," does not exist on the ").concat(r.result(i,"name"),".")))),!1===i.triggerMethod("before:action"))return i.triggerMethod("action:cancelled"),void a.b.routingEnded();i.triggerMethod("load:layout"),i[s].apply(i,[].concat(p(e.args||[]),[e.params||{}])),r.isFunction(n)&&n(),a.b.routingEnded()}))}}},{key:"createApp",value:function(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}},{key:"destroyApp",value:function(){this.controller&&(this.controller.destroy(),delete this.controller)}},{key:"_addAppRoute",value:function(e,t,n){var i=this;this.route(t,n,(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var a={application:i.channelName,action:i.toEventName(n),args:t.slice(0,t.length-1),params:f.a.DeserializeQueryParams(t[t.length-1])};i.executeRoute(a,{isAppRoute:!0},(function(){f.a.UpdateQuery(r.extend(i.controller.getAndClearDefaultQueryParams(),a.params))}))}))}},{key:"toEventName",value:function(e){return e.replace(S,":$1").toLowerCase()}},{key:"toMethodName",value:function(e){var t=e.replace(E,(function(e,t,n){return n.toUpperCase()}));return t[0].toLowerCase()+t.slice(1,t.length)}},{key:"validateAppLink",value:function(e){e.application&&e.action||(a.b.routingEnded(),c.c.throw(new c.b("Invalid AppLink")))}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],v(T(y.prototype),"listenTo",this))}}])&&m(t.prototype,n),o&&m(t,o),Object.defineProperty(t,"prototype",{writable:!1}),y}(o.AppRouter)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(27),i=n(22);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(l,e);var t,n,r,o=f(l);function l(){return a(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(d(l.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Behavior)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(78),i=n(38),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,n,r,a=l(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,r=[{key:"getCacheKey",value:function(e){o.c.throw(new i.a("Must define getCacheKey for ".concat(this.name,".")))}}],(n=[{key:"unmountRegion",value:function(e){this.trigger("unmount:".concat(e))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.b)},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(3),i=n(65),o=n(100);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=c(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function c(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(y,e);var t,n,c,d=h(y);function y(){return s(this,y),d.apply(this,arguments)}return t=y,(n=[{key:"set",value:function(e,t,n){var i,o;if(null===e)return this;for(i in"object"===a(e)?(o=e,n=t):(o={})[e]=t,n||(n={}),o)r.has(this.associations,i)&&(o[i]=this.setAssociation(i,o[i],n));return l(p(y.prototype),"set",this).call(this,o,n)}},{key:"get",value:function(e){var t=e.indexOf(".");if(-1===t)return l(p(y.prototype),"get",this).call(this,e);var n=e.substr(0,t),i=this.attributes[n];if(!i||!r.isFunction(i.get))return l(p(y.prototype),"get",this).call(this,e);var o=e.substr(t+1);return i.get(o)}},{key:"setAssociation",value:function(e,t,n){var a=this.associations[e],s=this.attributes[e];if(!r.isFunction(a))return t;if(n.unset)return s&&delete s.parent,delete this[e],s;if(s)return s instanceof i.a&&s.set(t,n),s instanceof o.a&&s.set(t,n),n.silent||this.trigger("change:".concat(e),this,t,n),s;var u=t instanceof i.a?t:new a(t,{parse:!0});return u.parent=this,this[e]=u,u}},{key:"toJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=l(p(y.prototype),"toJSON",this).apply(this,t);return r.each(this.associations,(function(e,t){r.has(i,t)&&r.isFunction(i[t].toJSON)?i[t]=i[t].toJSON():i[t]=(new e).toJSON()})),i}},{key:"toFlatJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.omit(l(p(y.prototype),"toJSON",this).apply(this,t),r.keys(this.associations))}}])&&u(t.prototype,n),c&&u(t,c),Object.defineProperty(t,"prototype",{writable:!1}),y}(i.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(27),i=n(22),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(l,e);var t,n,r,a=f(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).name||o.c.throw(new o.b("Your service must be named.")),t}return t=l,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(d(l.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(3),i=n(27),o=n(22),a=n(8);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=c(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function c(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(c,e);var t,n,i,s=h(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=s.call(this,e)).layouts={},t.requiredRegions=e.requiredRegions,t}return t=c,(n=[{key:"clearLayout",value:function(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}},{key:"registerLayout",value:function(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}},{key:"getLayout",value:function(e){var t=e.name,n=e.options,r=void 0===n?{}:n;this.layouts[t]||a.c.throw(new a.b("".concat(t," was not registered as a template.")));var i=this.layouts[t].getCacheKey(r);return this.currentLayoutCacheKey===i&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",r),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=i,this.currentLayout=new this.layouts[t](r),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}},{key:"checkRequiredRegions",value:function(e){r.each(this.requiredRegions,(function(t){r.has(r.result(e.prototype,"regions"),t)||a.c.throw(new a.b("Layout: ".concat(e.prototype.name," must define an ").concat(t," region.")))}))}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(p(c.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(3),i=n(10),o=n(27),a=n(23),s=n(22),u=n(12),l=n(8),c=n(13),f=n(36);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=p(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function p(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var T=function(){function e(t,n){b(this,e),this.application=t,this.options=n||{}}return w(e,[{key:"Application",get:function(){return this.application}},{key:"Options",get:function(){return this.options}}]),e}(),S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(n,e);var t=m(n);function n(){return b(this,n),t.apply(this,arguments)}return w(n,[{key:"initialize",value:function(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}},{key:"bindListeners",value:function(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}},{key:"bindNavLockListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.LOCK_NAV,(function(){return e.shellState.navLock=!0})),this.listenTo(u.a.SHELL,c.a.UNLOCK_NAV,(function(){return e.shellState.navLock=!1}))}},{key:"bindAppLinkListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.ROUTING_START,(function(){return e.shellState.activeRoute=!0})),this.listenTo(u.a.SHELL,c.a.ROUTING_END,(function(){return e.shellState.activeRoute=!1})),this.listenTo(u.a.SHELL,c.a.ROUTE,(function(t){return e.shellState.currentAppLink=t}));var t=i.Radio.channel(u.a.SHELL);t.reply(c.a.HAS_ACTIVE_ROUTE,r.bind(this.hasActiveRoute,this)),t.reply(c.a.CURRENT_ROUTE,(function(){return e.shellState.currentAppLink}))}},{key:"bindErrorHandlers",value:function(){window.addEventListener("error",(function(){a.b.routingEnded()}))}},{key:"bindErrorListener",value:function(){var e=i.Radio.channel(u.a.SHELL);this.listenTo(e,c.a.ERROR,this.handleError)}},{key:"bindRouteLookup",value:function(){var e=this;i.Radio.channel(u.a.SHELL).reply(c.a.ROUTE_LOOKUP,(function(t,n,r){return!!e.routeLookup[t]&&e.routeLookup[t](n,r)}),this)}},{key:"addRouteLookup",value:function(e,t){this.routeLookup[e]=t}},{key:"registerApplication",value:function(e,t){return this.applications.push(new T(e,t)),this}},{key:"getGlobalRadioChannels",value:function(){return u.a}},{key:"isNavLocked",value:function(){return this.shellState.navLock}},{key:"start",value:function(e){var t=this;e||(e={}),this.runInitializationSteps(this,(function(){t.runStartUpSteps(t,e,(function(){d(g(n.prototype),"start",t).call(t,e)}))}))}},{key:"hasActiveRoute",value:function(){return this.shellState.activeRoute}},{key:"onStart",value:function(){var e=this;r.each(this.applications,(function(t){var n={appConstructor:t.Application,shell:e,appOptions:Object.assign({region:"",shell:e,layoutService:e.layoutService},t.Options)};new t.Application.router(n)})),this.bindListeners(),f.a.StartHistory()}},{key:"addInitializationStep",value:function(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,function(n,r){return t(n,(function(){return e(n,r)}))}),this}},{key:"runInitializationSteps",value:function(e,t){t(e)}},{key:"addStartUpStep",value:function(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,function(n,r,i){return t(n,r,(function(){return e(n,r,i)}))}),this}},{key:"runStartUpSteps",value:function(e,t,n){n(e,t)}},{key:"registerLayout",value:function(e,t){return this.layoutService.registerLayout(e,t),this}},{key:"registerErrorHandler",value:function(e,t){return e||l.c.throw(new l.b("An error must have a name in order to register a handler for it.")),r.any(this.errorHandlers,(function(t){return t.errorType===e}))&&l.c.throw(new l.b("An error handler for ".concat(e.prototype.name," has already been defined."))),this.errorHandlers.push({errorType:e,handler:t}),this}},{key:"handleError",value:function(e){var t=r.find(this.errorHandlers,(function(t){return e instanceof t.errorType}));t&&t.handler&&t.handler(e)}},{key:"registerStore",value:function(e){this.store=e}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(g(n.prototype),"listenTo",this))}}]),n}(o.Application)},function(e,t){},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){var r=n(127),i=n(336);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.__esModule=!0,e.exports.default=e.exports),o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(127);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new l,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,c=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(f.nbsp=" ",f.copy="©",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,c,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var l=0;l<s;l++){e=r.getURI(l);var c=r.getValue(l),f=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(l),f),f.value=f.nodeValue=c,a.setAttributeNode(f)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(342).XMLReader,c=t.DOMImplementation=n(179).DOMImplementation;t.XMLSerializer=n(179).XMLSerializer,t.DOMParser=r},function(e,t){var n=Math.pow(2,32);e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=t.getUint32(i),r.firstOffset=t.getUint32(i+4),i+=8):(r.earliestPresentationTime=t.getUint32(i)*n+t.getUint32(i+4),r.firstOffset=t.getUint32(i+8)*n+t.getUint32(i+12),i+=16),i+=2;var o=t.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return r}},function(e,t,n){"use strict";var r=n(180),i=n(343).handleRollover,o={};o.ts=n(345),o.aac=n(346);var a=n(57).ONE_SECOND_IN_TS,s=function(e,t,n){for(var r,i,a,s,u=0,l=188,c=!1;l<=e.byteLength;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u++,l++;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u+=188,l+=188}for(u=(l=e.byteLength)-188,c=!1;u>=0;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u--,l--;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u-=188,l-=188}},u=function(e,t,n){for(var r,i,a,s,u,l,c,f=0,h=188,d=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[f]||71!==e[h])f++,h++;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":if(i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!d&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0),!n.firstKeyFrame)){if(a&&0!==p.size){for(u=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),u.set(c,l),l+=c.byteLength;if(o.ts.videoPacketContainsKeyFrame(u)){var y=o.ts.parsePesTime(u);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(r),p.size+=r.byteLength}}if(d&&n.firstKeyFrame)break;f+=188,h+=188}for(f=(h=e.byteLength)-188,d=!1;f>=0;)if(71!==e[f]||71!==e[h])f--,h--;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0)}if(d)break;f-=188,h-=188}},l=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),o.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=o.ts.parsePat(n));break;case"pmt":t.table||(t.table=o.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],u(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=o.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,s=null,u=0,l=0;e.length-l>=3;){switch(o.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((u=o.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===s&&(t=e.subarray(l,l+u),s=o.aac.parseAacTimestamp(t)),l+=u;break;case"audio":if(e.length-l<7){n=!0;break}if((u=o.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===i&&(t=e.subarray(l,l+u),i=o.aac.parseSampleRate(t)),r++,l+=u;break;default:l++}if(n)return null}if(null===i||null===s)return null;var c=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*c,pts:s+1024*r*c}]}}(e):l(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,t),n):null},parseAudioPes_:s}},function(e){e.exports=JSON.parse('{"a":"0.0.26"}')},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();var a,s=Array.prototype,u=Function.prototype,l=Object.prototype,c=o["__core-js_shared__"],f=(a=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",h=u.toString,d=l.hasOwnProperty,p=l.toString,y=RegExp("^"+h.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=s.splice,v=C(o,"Map"),g=C(Object,"create");function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function S(e){return!(!x(e)||(t=e,f&&f in t))&&(function(e){var t=x(e)?p.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?y:n).test(function(e){if(null!=e){try{return h.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function E(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function C(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return S(n)?n:void 0}function k(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(k.Cache||w),n}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}b.prototype.clear=function(){this.__data__=g?g(null):{}},b.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},b.prototype.get=function(e){var t=this.__data__;if(g){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return d.call(t,e)?t[e]:void 0},b.prototype.has=function(e){var t=this.__data__;return g?void 0!==t[e]:d.call(t,e)},b.prototype.set=function(e,t){return this.__data__[e]=g&&void 0===t?"__lodash_hash_undefined__":t,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(e){var t=this.__data__,n=T(t,e);return!(n<0)&&(n==t.length-1?t.pop():m.call(t,n,1),!0)},_.prototype.get=function(e){var t=this.__data__,n=T(t,e);return n<0?void 0:t[n][1]},_.prototype.has=function(e){return T(this.__data__,e)>-1},_.prototype.set=function(e,t){var n=this.__data__,r=T(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},w.prototype.clear=function(){this.__data__={hash:new b,map:new(v||_),string:new b}},w.prototype.delete=function(e){return E(this,e).delete(e)},w.prototype.get=function(e){return E(this,e).get(e)},w.prototype.has=function(e){return E(this,e).has(e)},w.prototype.set=function(e,t){return E(this,e).set(e,t),this},k.Cache=w,e.exports=k}).call(this,n(32))},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&u()}function s(){o(a)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=v(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(u+a)!==n&&(u-=d(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var l=Math.round(s+o)-t,p=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(p)&&(u-=p)}return v(i.left,i.top,s,u)}var y="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function m(e){return r?y(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):p(e):f}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var g=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,i,o,a,s,u,c=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),l(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);l(this,{target:e,contentRect:c})},_=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new g(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,T=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);w.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){T.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));var S=void 0!==i.ResizeObserver?i.ResizeObserver:T;t.a=S}).call(this,n(32))},function(e,t,n){e.exports=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,a,s=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(a=i+u)>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(l+r*(a%4));return{value:s,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+l)>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(c+r*(s%4))}return{value:u,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d=0,p=n||[0],y=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(a=[],128>(o=e.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=a[u]<<8*(f+i*(c%4)),d+=1}else for(f=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===h&&(o=(u=255&o)<<8|o>>>8),l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=o<<8*(f+i*(c%4)),d+=2}return{value:p,binLen:8*d+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,a,s,u,l,c,f=0,h=n||[0],d=(r=r||0)>>>3,p=-1===i?3:0,y=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==y&&y<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(u=e.substr(o,4),s=0,a=0;a<u.length;a+=1)s|=t.indexOf(u.charAt(a))<<18-6*a;for(a=0;a<u.length-1;a+=1){for(l=(c=f+d)>>>2;h.length<=l;)h.push(0);h[l]|=(s>>>16-8*a&255)<<8*(p+i*(c%4)),f+=1}}return{value:h,binLen:8*f+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,a,s,u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),a=(s=o+l)>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(c+r*(s%4));return{value:u,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,a="",s=t/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,a,s,u,l,c="",f=n/8,h=-1===r?3:0;for(o=0;o<f;o+=3)for(u=o+1<f?e[o+1>>>2]:0,l=o+2<f?e[o+2>>>2]:0,s=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(u>>>8*(h+r*((o+1)%4))&255)<<8|l>>>8*(h+r*((o+2)%4))&255,a=0;a<4;a+=1)c+=8*o+6*a<=n?t.charAt(s>>>6*(3-a)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function a(e,t){return e<<t|e>>>32-t}function s(e,t,n){return e^t^n}function u(e,t,n){return e&t^e&n^t&n}function l(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function c(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function h(e,t){var n,r,i,o,f,h,d,p,y=[];for(n=t[0],r=t[1],i=t[2],o=t[3],f=t[4],d=0;d<80;d+=1)y[d]=d<16?e[d]:a(y[d-3]^y[d-8]^y[d-14]^y[d-16],1),h=d<20?c(a(n,5),(p=r)&i^~p&o,f,1518500249,y[d]):d<40?c(a(n,5),s(r,i,o),f,1859775393,y[d]):d<60?c(a(n,5),u(r,i,o),f,2400959708,y[d]):c(a(n,5),s(r,i,o),f,3395469782,y[d]),f=o,o=i,i=a(r,30),r=n,n=h;return t[0]=l(n,t[0]),t[1]=l(r,t[1]),t[2]=l(i,t[2]),t[3]=l(o,t[3]),t[4]=l(f,t[4]),t}function d(e,t,n,r){for(var i,o=15+(t+65>>>9<<4),a=t+n;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=h(e.slice(i,i+16),r);return r}return function(t){function n(e,n,i){var o=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=t.call(this,e,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=h,o.p=function(e){return e.slice()},o.l=f,o.R=d,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,a.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.T<=o&&(this.U=this.A(a.slice(t,t+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,r,a=this.m,s=o(t);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var u=i(e,a,this.u,s);if(!0===this.L&&this.i)return u(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return u(r)},e.prototype.setHMACKey=function(e,t,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.S[t]=1549556828^e.value[t];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},e.prototype.getHMAC=function(e,t){var n=o(t);return i(e,this.m,this.u,n)(this.o())},e.prototype.o=function(){var e;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return e=this.A(this.S,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())}()},function(e){e.exports=JSON.parse('{"a":"1.0.44"}')},function(e,t,n){"use strict";t.a=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";var r=n(5),i=n(14),o=n(48),a=n(42),s=n(17),u=n(145),l=n(11),c=n(33),f=n(51),h=n(18),d=n(24),p=n(21),y=n(28),m=n(60),v=n(59),g=n(62),b=n(72),_=n(110),w=n(148),T=n(113),S=n(46),E=n(26),C=n(79),k=n(29),x=n(41),O=n(70),P=n(80),R=n(71),A=n(81),j=n(16),I=n(149),L=n(220),D=n(52),M=n(35),N=n(43).forEach,B=P("hidden"),U=j("toPrimitive"),F=M.set,V=M.getterFor("Symbol"),H=Object.prototype,z=i.Symbol,q=o("JSON","stringify"),W=S.f,$=E.f,G=w.f,K=C.f,Y=O("symbols"),X=O("op-symbols"),Q=O("string-to-symbol-registry"),J=O("symbol-to-string-registry"),Z=O("wks"),ee=i.QObject,te=!ee||!ee.prototype||!ee.prototype.findChild,ne=s&&l((function(){return 7!=g($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=W(H,t);r&&delete H[t],$(e,t,n),r&&e!==H&&$(H,t,r)}:$,re=function(e,t){var n=Y[e]=g(z.prototype);return F(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ie=u&&"symbol"==typeof z.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof z},oe=function(e,t,n){e===H&&oe(X,t,n),d(e);var r=m(t,!0);return d(n),c(Y,r)?(n.enumerable?(c(e,B)&&e[B][r]&&(e[B][r]=!1),n=g(n,{enumerable:v(0,!1)})):(c(e,B)||$(e,B,v(1,{})),e[B][r]=!0),ne(e,r,n)):$(e,r,n)},ae=function(e,t){d(e);var n=y(t),r=b(n).concat(ce(n));return N(r,(function(t){s&&!se.call(n,t)||oe(e,t,n[t])})),e},se=function(e){var t=m(e,!0),n=K.call(this,t);return!(this===H&&c(Y,t)&&!c(X,t))&&(!(n||!c(this,t)||!c(Y,t)||c(this,B)&&this[B][t])||n)},ue=function(e,t){var n=y(e),r=m(t,!0);if(n!==H||!c(Y,r)||c(X,r)){var i=W(n,r);return!i||!c(Y,r)||c(n,B)&&n[B][r]||(i.enumerable=!0),i}},le=function(e){var t=G(y(e)),n=[];return N(t,(function(e){c(Y,e)||c(R,e)||n.push(e)})),n},ce=function(e){var t=e===H,n=G(t?X:y(e)),r=[];return N(n,(function(e){!c(Y,e)||t&&!c(H,e)||r.push(Y[e])})),r};(u||(x((z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=A(e),n=function(e){this===H&&n.call(X,e),c(this,B)&&c(this[B],t)&&(this[B][t]=!1),ne(this,t,v(1,e))};return s&&te&&ne(H,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return V(this).tag})),C.f=se,E.f=oe,S.f=ue,_.f=w.f=le,T.f=ce,s&&($(z.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),a||x(H,"propertyIsEnumerable",se,{unsafe:!0})),I.f=function(e){return re(j(e),e)}),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:z}),N(b(Z),(function(e){L(e)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(c(Q,t))return Q[t];var n=z(t);return Q[t]=n,J[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(c(J,e))return J[e]},useSetter:function(){te=!0},useSimple:function(){te=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(e,t){return void 0===t?g(e):ae(g(e),t)},defineProperty:oe,defineProperties:ae,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:le,getOwnPropertySymbols:ce}),r({target:"Object",stat:!0,forced:l((function(){T.f(1)}))},{getOwnPropertySymbols:function(e){return T.f(p(e))}}),q)&&r({target:"JSON",stat:!0,forced:!u||l((function(){var e=z();return"[null]"!=q([e])||"{}"!=q({a:e})||"{}"!=q(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(h(t)||void 0!==e)&&!ie(e))return f(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),i[1]=t,q.apply(null,i)}});z.prototype[U]||k(z.prototype,U,z.prototype.valueOf),D(z,"Symbol"),R[B]=!0},function(e,t,n){var r=n(14),i=n(109),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(33),i=n(142),o=n(46),a=n(26);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||s(e,c,u(t,c))}}},function(e,t,n){var r=n(143),i=n(33),o=n(149),a=n(26).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,n){"use strict";var r=n(5),i=n(11),o=n(51),a=n(18),s=n(21),u=n(15),l=n(53),c=n(73),f=n(74),h=n(16),d=n(115),p=h("isConcatSpreadable"),y=d>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),m=f("concat"),v=function(e){if(!a(e))return!1;var t=e[p];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(e){var t,n,r,i,o,a=s(this),f=c(a,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(v(o=-1===t?a:arguments[t])){if(h+(i=u(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,h++)n in o&&l(f,h,o[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");l(f,h++,o)}return f.length=h,f}})},function(e,t,n){var r=n(5),i=n(223),o=n(39);r({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},function(e,t,n){"use strict";var r=n(21),i=n(61),o=n(15),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n.length),u=i(e,s),l=i(t,s),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?s:i(c,s))-l,s-u),h=1;for(l<u&&u<l+f&&(h=-1,l+=f-1,u+=f-1);f-- >0;)l in n?n[u]=n[l]:delete n[u],u+=h,l+=h;return n}},function(e,t,n){"use strict";var r=n(5),i=n(43).every;r({target:"Array",proto:!0,forced:n(44)("every")},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(5),i=n(226),o=n(39);r({target:"Array",proto:!0},{fill:i}),o("fill")},function(e,t,n){"use strict";var r=n(21),i=n(61),o=n(15);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(5),i=n(43).find,o=n(39),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(5),i=n(43).findIndex,o=n(39),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,n){"use strict";var r=n(5),i=n(151),o=n(21),a=n(15),s=n(49),u=n(73);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=o(this),n=a(t.length),r=u(t,0);return r.length=i(r,t,t,n,0,void 0===e?1:s(e)),r}})},function(e,t,n){"use strict";var r=n(5),i=n(151),o=n(21),a=n(15),s=n(34),u=n(73);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),r=a(n.length);return s(e),(t=u(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){var r=n(5),i=n(232);r({target:"Array",stat:!0,forced:!n(117)((function(e){Array.from(e)}))},{from:i})},function(e,t,n){"use strict";var r=n(63),i=n(21),o=n(154),a=n(155),s=n(15),u=n(53),l=n(156);e.exports=function(e){var t,n,c,f,h,d=i(e),p="function"==typeof this?this:Array,y=arguments.length,m=y>1?arguments[1]:void 0,v=void 0!==m,g=0,b=l(d);if(v&&(m=r(m,y>2?arguments[2]:void 0,2)),null==b||p==Array&&a(b))for(n=new p(t=s(d.length));t>g;g++)u(n,g,v?m(d[g],g):d[g]);else for(h=(f=b.call(d)).next,n=new p;!(c=h.call(f)).done;g++)u(n,g,v?o(f,m,[c.value,g],!0):c.value);return n.length=g,n}},function(e,t,n){"use strict";var r=n(5),i=n(111).includes,o=n(39);r({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){"use strict";var r=n(5),i=n(111).indexOf,o=n(44),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,u=o("indexOf");r({target:"Array",proto:!0,forced:s||u},{indexOf:function(e){return s?a.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(5)({target:"Array",stat:!0},{isArray:n(51)})},function(e,t,n){var r=n(18);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(5),i=n(69),o=n(28),a=n(44),s=[].join,u=i!=Object,l=a("join",",");r({target:"Array",proto:!0,forced:u||l},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(5),i=n(239);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(e,t,n){"use strict";var r=n(28),i=n(49),o=n(15),a=n(44),s=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf");e.exports=l||c?function(e){if(l)return u.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=s(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:u},function(e,t,n){"use strict";var r=n(5),i=n(43).map;r({target:"Array",proto:!0,forced:!n(74)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(11),o=n(53);r({target:"Array",stat:!0,forced:i((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(5),i=n(160).right;r({target:"Array",proto:!0,forced:n(44)("reduceRight")},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(51),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},function(e,t,n){"use strict";var r=n(5),i=n(18),o=n(51),a=n(61),s=n(15),u=n(28),l=n(53),c=n(74),f=n(16)("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!c("slice")},{slice:function(e,t){var n,r,c,p=u(this),y=s(p.length),m=a(e,y),v=a(void 0===t?y:t,y);if(o(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[f])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,m,v);for(r=new(void 0===n?Array:n)(d(v-m,0)),c=0;m<v;m++,c++)m in p&&l(r,c,p[m]);return r.length=c,r}})},function(e,t,n){"use strict";var r=n(5),i=n(43).some;r({target:"Array",proto:!0,forced:n(44)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(34),o=n(21),a=n(11),s=n(44),u=[].sort,l=[1,2,3],c=a((function(){l.sort(void 0)})),f=a((function(){l.sort(null)})),h=s("sort");r({target:"Array",proto:!0,forced:c||!f||h},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},function(e,t,n){n(121)("Array")},function(e,t,n){"use strict";var r=n(5),i=n(61),o=n(49),a=n(15),s=n(21),u=n(73),l=n(53),c=n(74),f=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!c("splice")},{splice:function(e,t){var n,r,c,d,p,y,m=s(this),v=a(m.length),g=i(e,v),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=v-g):(n=b-2,r=h(f(o(t),0),v-g)),v+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=u(m,r),d=0;d<r;d++)(p=g+d)in m&&l(c,d,m[p]);if(c.length=r,n<r){for(d=g;d<v-r;d++)y=d+n,(p=d+r)in m?m[y]=m[p]:delete m[y];for(d=v;d>v-r+n;d--)delete m[d-1]}else if(n>r)for(d=v-r;d>g;d--)y=d+n-1,(p=d+r-1)in m?m[y]=m[p]:delete m[y];for(d=0;d<n;d++)m[d+g]=arguments[d+2];return m.length=v-r+n,c}})},function(e,t,n){n(39)("flat")},function(e,t,n){n(39)("flatMap")},function(e,t,n){var r=n(14);n(52)(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(161),i=n(254);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i,!0)},function(e,t,n){var r=n(18),i=n(83);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){"use strict";var r=n(26).f,i=n(62),o=n(86),a=n(63),s=n(85),u=n(50),l=n(119),c=n(121),f=n(17),h=n(54).fastKey,d=n(35),p=d.set,y=d.getterFor;e.exports={getConstructor:function(e,t,n,l){var c=e((function(e,r){s(e,c,t),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=r&&u(r,e[l],e,n)})),d=y(t),m=function(e,t,n){var r,i,o=d(e),a=v(e,t);return a?a.value=n:(o.last=a={index:i=h(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),f?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},v=function(e,t){var n,r=d(e),i=h(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(c.prototype,{clear:function(){for(var e=d(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=d(this),n=v(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),f?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=d(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),o(c.prototype,n?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),f&&r(c.prototype,"size",{get:function(){return d(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",i=y(t),o=y(r);l(e,t,(function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){n(52)(Math,"Math",!0)},function(e,t,n){"use strict";var r=n(17),i=n(11),o=n(72),a=n(113),s=n(79),u=n(21),l=n(69),c=Object.assign;e.exports=!c||i((function(){var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,f=a.f,h=s.f;i>c;)for(var d,p=l(arguments[c++]),y=f?o(p).concat(f(p)):o(p),m=y.length,v=0;m>v;)d=y[v++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:c},function(e,t,n){n(5)({target:"Object",stat:!0,sham:!n(17)},{create:n(62)})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(34),u=n(26);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(e,t){u.f(a(this),e,{get:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(5),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(146)})},function(e,t,n){var r=n(5),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(26).f})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(34),u=n(26);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(e,t){u.f(a(this),e,{set:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(5),i=n(163).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},function(e,t,n){var r=n(5),i=n(84),o=n(11),a=n(18),s=n(54).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(e){return u&&a(e)?u(s(e)):e}})},function(e,t,n){var r=n(5),i=n(50),o=n(53);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){o(t,e,n)}),void 0,!0),t}})},function(e,t,n){var r=n(5),i=n(11),o=n(28),a=n(46).f,s=n(17),u=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},function(e,t,n){var r=n(5),i=n(17),o=n(142),a=n(28),s=n(46),u=n(53);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),i=s.f,l=o(r),c={},f=0;l.length>f;)void 0!==(n=i(r,t=l[f++]))&&u(c,t,n);return c}})},function(e,t,n){var r=n(5),i=n(11),o=n(148).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(e,t,n){var r=n(5),i=n(11),o=n(21),a=n(64),s=n(158);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,n){n(5)({target:"Object",stat:!0},{is:n(164)})},function(e,t,n){var r=n(5),i=n(11),o=n(18),a=Object.isExtensible;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isExtensible:function(e){return!!o(e)&&(!a||a(e))}})},function(e,t,n){var r=n(5),i=n(11),o=n(18),a=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isFrozen:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(5),i=n(11),o=n(18),a=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isSealed:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(5),i=n(21),o=n(72);r({target:"Object",stat:!0,forced:n(11)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(60),u=n(64),l=n(46).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.get}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(87),a=n(21),s=n(60),u=n(64),l=n(46).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.set}while(n=u(n))}})},function(e,t,n){var r=n(5),i=n(18),o=n(54).onFreeze,a=n(84),s=n(11),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{preventExtensions:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){var r=n(5),i=n(18),o=n(54).onFreeze,a=n(84),s=n(11),u=Object.seal;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{seal:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){n(5)({target:"Object",stat:!0},{setPrototypeOf:n(83)})},function(e,t,n){"use strict";var r=n(116),i={};i[n(16)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},function(e,t,n){var r=n(5),i=n(163).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,n){"use strict";var r,i,o,a,s=n(5),u=n(42),l=n(14),c=n(48),f=n(166),h=n(41),d=n(86),p=n(52),y=n(121),m=n(18),v=n(34),g=n(85),b=n(47),_=n(50),w=n(117),T=n(88),S=n(167).set,E=n(282),C=n(168),k=n(283),x=n(76),O=n(89),P=n(35),R=n(114),A=n(16),j=n(115),I=A("species"),L="Promise",D=P.get,M=P.set,N=P.getterFor(L),B=f,U=l.TypeError,F=l.document,V=l.process,H=c("fetch"),z=x.f,q=z,W="process"==b(V),$=!!(F&&F.createEvent&&l.dispatchEvent),G=R(L,(function(){if(66===j)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0;if(u&&!B.prototype.finally)return!0;if(j>=51&&/native code/.test(B))return!1;var e=B.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[I]=t,!(e.then((function(){}))instanceof t)})),K=G||!w((function(e){B.all(e).catch((function(){}))})),Y=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},X=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;E((function(){for(var i=t.value,o=1==t.state,a=0;r.length>a;){var s,u,l,c=r[a++],f=o?c.ok:c.fail,h=c.resolve,d=c.reject,p=c.domain;try{f?(o||(2===t.rejection&&ee(e,t),t.rejection=1),!0===f?s=i:(p&&p.enter(),s=f(i),p&&(p.exit(),l=!0)),s===c.promise?d(U("Promise-chain cycle")):(u=Y(s))?u.call(s,h,d):h(s)):d(i)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&J(e,t)}))}},Q=function(e,t,n){var r,i;$?((r=F.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},(i=l["on"+e])?i(r):"unhandledrejection"===e&&k("Unhandled promise rejection",n)},J=function(e,t){S.call(l,(function(){var n,r=t.value;if(Z(t)&&(n=O((function(){W?V.emit("unhandledRejection",r,e):Q("unhandledrejection",e,r)})),t.rejection=W||Z(t)?2:1,n.error))throw n.value}))},Z=function(e){return 1!==e.rejection&&!e.parent},ee=function(e,t){S.call(l,(function(){W?V.emit("rejectionHandled",e):Q("rejectionhandled",e,t.value)}))},te=function(e,t,n,r){return function(i){e(t,n,i,r)}},ne=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,X(e,t,!0))},re=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw U("Promise can't be resolved itself");var i=Y(n);i?E((function(){var r={done:!1};try{i.call(n,te(re,e,r,t),te(ne,e,r,t))}catch(n){ne(e,r,n,t)}})):(t.value=n,t.state=1,X(e,t,!1))}catch(n){ne(e,{done:!1},n,t)}}};G&&(B=function(e){g(this,B,L),v(e),r.call(this);var t=D(this);try{e(te(re,this,t),te(ne,this,t))}catch(e){ne(this,t,e)}},(r=function(e){M(this,{type:L,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(B.prototype,{then:function(e,t){var n=N(this),r=z(T(this,B));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=W?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&X(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=D(e);this.promise=e,this.resolve=te(re,e,t),this.reject=te(ne,e,t)},x.f=z=function(e){return e===B||e===o?new i(e):q(e)},u||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(e,t){var n=this;return new B((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof H&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(B,H.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:G},{Promise:B}),p(B,L,!1,!0),y(L),o=c(L),s({target:L,stat:!0,forced:G},{reject:function(e){var t=z(this);return t.reject.call(void 0,e),t.promise}}),s({target:L,stat:!0,forced:u||G},{resolve:function(e){return C(u&&this===o?B:this,e)}}),s({target:L,stat:!0,forced:K},{all:function(e){var t=this,n=z(t),r=n.resolve,i=n.reject,o=O((function(){var n=v(t.resolve),o=[],a=0,s=1;_(e,(function(e){var u=a++,l=!1;o.push(void 0),s++,n.call(t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=z(t),r=n.reject,i=O((function(){var i=v(t.resolve);_(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){var r,i,o,a,s,u,l,c,f=n(14),h=n(46).f,d=n(47),p=n(167).set,y=n(82),m=f.MutationObserver||f.WebKitMutationObserver,v=f.process,g=f.Promise,b="process"==d(v),_=h(f,"queueMicrotask"),w=_&&_.value;w||(r=function(){var e,t;for(b&&(e=v.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},b?a=function(){v.nextTick(r)}:m&&!/(iphone|ipod|ipad).*applewebkit/i.test(y)?(s=!0,u=document.createTextNode(""),new m(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):g&&g.resolve?(l=g.resolve(void 0),c=l.then,a=function(){c.call(l,r)}):a=function(){p.call(f,r)}),e.exports=w||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},function(e,t,n){var r=n(14);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var r=n(5),i=n(42),o=n(166),a=n(48),s=n(88),u=n(168),l=n(41);r({target:"Promise",proto:!0,real:!0},{finally:function(e){var t=s(this,a("Promise")),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",a("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(5),i=n(77).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(5),i=n(15),o=n(123),a=n(25),s=n(124),u="".endsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("endsWith")},{endsWith:function(e){var t=String(a(this));o(e);var n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:l(i(n),r),c=String(e);return u?u.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){var r=n(5),i=n(61),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(5),i=n(123),o=n(25);r({target:"String",proto:!0,forced:!n(124)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(172).end;r({target:"String",proto:!0,forced:n(174)},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(5),i=n(172).start;r({target:"String",proto:!0,forced:n(174)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(5),i=n(28),o=n(15);r({target:"String",stat:!0},{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){n(5)({target:"String",proto:!0},{repeat:n(173)})},function(e,t,n){"use strict";var r=n(92),i=n(24),o=n(25),a=n(164),s=n(94);r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),u=String(this),l=o.lastIndex;a(l,0)||(o.lastIndex=0);var c=s(o,u);return a(o.lastIndex,l)||(o.lastIndex=l),null===c?-1:c.index}]}))},function(e,t,n){"use strict";var r=n(92),i=n(91),o=n(24),a=n(25),s=n(88),u=n(93),l=n(15),c=n(94),f=n(90),h=n(11),d=[].push,p=Math.min,y=!h((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,u,l,c=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,y=new RegExp(e.source,h+"g");(s=f.call(y,r))&&!((u=y.lastIndex)>p&&(c.push(r.slice(p,s.index)),s.length>1&&s.index<r.length&&d.apply(c,s.slice(1)),l=s[0].length,p=u,c.length>=o));)y.lastIndex===s.index&&y.lastIndex++;return p===r.length?!l&&y.test("")||c.push(""):c.push(r.slice(p)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),h=String(this),d=s(f,RegExp),m=f.unicode,v=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(y?"y":"g"),g=new d(y?f:"^(?:"+f.source+")",v),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===h.length)return null===c(g,h)?[h]:[];for(var _=0,w=0,T=[];w<h.length;){g.lastIndex=y?w:0;var S,E=c(g,y?h:h.slice(w));if(null===E||(S=p(l(g.lastIndex+(y?0:w)),h.length))===_)w=u(h,w,m);else{if(T.push(h.slice(_,w)),T.length===b)return T;for(var C=1;C<=E.length-1;C++)if(T.push(E[C]),T.length===b)return T;w=_=S}}return T.push(h.slice(_)),T}]}),!y)},function(e,t,n){"use strict";var r=n(5),i=n(15),o=n(123),a=n(25),s=n(124),u="".startsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("startsWith")},{startsWith:function(e){var t=String(a(this));o(e);var n=i(l(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return u?u.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(5),i=n(95).trim;r({target:"String",proto:!0,forced:n(126)("trim")},{trim:function(){return i(this)}})},function(e,t,n){"use strict";var r=n(5),i=n(95).end,o=n(126)("trimEnd"),a=o?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,forced:o},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(5),i=n(95).start,o=n(126)("trimStart"),a=o?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,forced:o},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("anchor")},{anchor:function(e){return i(this,"a","name",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("big")},{big:function(){return i(this,"big","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("blink")},{blink:function(){return i(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("bold")},{bold:function(){return i(this,"b","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("fontcolor")},{fontcolor:function(e){return i(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("fontsize")},{fontsize:function(e){return i(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("italics")},{italics:function(){return i(this,"i","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("link")},{link:function(e){return i(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("small")},{small:function(){return i(this,"small","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("strike")},{strike:function(){return i(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("sub")},{sub:function(){return i(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(30);r({target:"String",proto:!0,forced:n(31)("sup")},{sup:function(){return i(this,"sup","","")}})},function(e,t,n){"use strict";var r=n(5),i=n(17),o=n(64),a=n(83),s=n(62),u=n(26),l=n(59),c=n(50),f=n(29),h=n(24),d=n(35),p=d.set,y=d.getterFor("AggregateError"),m=function(e,t){var n=this;if(!(n instanceof m))return new m(e,t);a&&(n=a(new Error(t),o(n)));var r=[];return c(e,r.push,r),i?p(n,{errors:r,type:"AggregateError"}):n.errors=r,void 0!==t&&f(n,"message",String(t)),n};m.prototype=s(Error.prototype,{constructor:l(5,m),message:l(5,""),name:l(5,"AggregateError"),toString:l(5,(function(){var e=h(this).name;e=void 0===e?"AggregateError":String(e);var t=this.message;return e+": "+(t=void 0===t?"":String(t))}))}),i&&u.f(m.prototype,"errors",{get:function(){return y(this).errors},configurable:!0}),r({global:!0},{AggregateError:m})},function(e,t,n){"use strict";var r=n(17),i=n(39),o=n(21),a=n(15),s=n(26).f;r&&!("lastIndex"in[])&&(s(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?0:t-1}}),i("lastIndex"))},function(e,t,n){"use strict";var r=n(17),i=n(39),o=n(21),a=n(15),s=n(26).f;r&&!("lastItem"in[])&&(s(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?void 0:e[t-1]},set:function(e){var t=o(this),n=a(t.length);return t[0==n?0:n-1]=e}}),i("lastItem"))},function(e,t,n){n(316)},function(e,t,n){"use strict";var r=n(5),i=n(34),o=n(76),a=n(89),s=n(50);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=o.f(t),r=n.resolve,u=n.reject,l=a((function(){var n=i(t.resolve),o=[],a=0,u=1;s(e,(function(e){var i=a++,s=!1;o.push(void 0),u++,n.call(t,e).then((function(e){s||(s=!0,o[i]={status:"fulfilled",value:e},--u||r(o))}),(function(e){s||(s=!0,o[i]={status:"rejected",reason:e},--u||r(o))}))})),--u||r(o)}));return l.error&&u(l.value),n.promise}})},function(e,t,n){"use strict";var r=n(5),i=n(34),o=n(48),a=n(76),s=n(89),u=n(50);r({target:"Promise",stat:!0},{any:function(e){var t=this,n=a.f(t),r=n.resolve,l=n.reject,c=s((function(){var n=i(t.resolve),a=[],s=0,c=1,f=!1;u(e,(function(e){var i=s++,u=!1;a.push(void 0),c++,n.call(t,e).then((function(e){u||f||(f=!0,r(e))}),(function(e){u||f||(u=!0,a[i]=e,--c||l(new(o("AggregateError"))(a,"No one promise resolved")))}))})),--c||l(new(o("AggregateError"))(a,"No one promise resolved"))}));return c.error&&l(c.value),n.promise}})},function(e,t,n){"use strict";var r=n(5),i=n(76),o=n(89);r({target:"Promise",stat:!0},{try:function(e){var t=i.f(this),n=o(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},function(e,t,n){"use strict";var r=n(5),i=n(77).charAt;r({target:"String",proto:!0},{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(5),i=n(120),o=n(25),a=n(35),s=n(77),u=s.codeAt,l=s.charAt,c=a.set,f=a.getterFor("String Iterator"),h=i((function(e){c(this,{type:"String Iterator",string:e,index:0})}),"String",(function(){var e,t=f(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=l(n,r),t.index+=e.length,{value:{codePoint:u(e,0),position:r},done:!1})}));r({target:"String",proto:!0},{codePoints:function(){return new h(String(o(this)))}})},function(e,t,n){n(322)},function(e,t,n){"use strict";var r=n(5),i=n(120),o=n(25),a=n(15),s=n(34),u=n(24),l=n(116),c=n(91),f=n(122),h=n(29),d=n(11),p=n(16),y=n(88),m=n(93),v=n(35),g=n(42),b=p("matchAll"),_=v.set,w=v.getterFor("RegExp String Iterator"),T=RegExp.prototype,S=T.exec,E="".matchAll,C=!!E&&!d((function(){"a".matchAll(/./)})),k=i((function(e,t,n,r){_(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=w(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=function(e,t){var n,r=e.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(e,t)))throw TypeError("Incorrect exec result");return n}return S.call(e,t)}(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""==String(r[0])&&(t.lastIndex=m(n,a(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),x=function(e){var t,n,r,i,o,s,l=u(this),c=String(e);return t=y(l,RegExp),void 0===(n=l.flags)&&l instanceof RegExp&&!("flags"in T)&&(n=f.call(l)),r=void 0===n?"":String(n),i=new t(t===RegExp?l.source:l,r),o=!!~r.indexOf("g"),s=!!~r.indexOf("u"),i.lastIndex=a(l.lastIndex),new k(i,c,o,s)};r({target:"String",proto:!0,forced:C},{matchAll:function(e){var t,n,r,i=o(this);if(null!=e){if(c(e)&&!~String(o("flags"in T?e.flags:f.call(e))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(C)return E.apply(i,arguments);if(void 0===(n=e[b])&&g&&"RegExp"==l(e)&&(n=x),null!=n)return s(n).call(e,i)}else if(C)return E.apply(i,arguments);return t=String(i),r=new RegExp(e,"g"),g?x.call(r,t):r[b](t)}}),g||b in T||h(T,b,x)},function(e,t,n){"use strict";var r=n(5),i=n(25),o=n(91),a=n(122),s=n(16),u=n(42),l=s("replace"),c=RegExp.prototype;r({target:"String",proto:!0},{replaceAll:function e(t,n){var r,s,f,h,d,p,y,m=i(this);if(null!=t){if((r=o(t))&&!~String(i("flags"in c?t.flags:a.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(s=t[l]))return s.call(t,m,n);if(u&&r)return String(m).replace(t,n)}if(f=String(m),""===(h=String(t)))return e.call(f,/(?:)/g,n);if(d=f.split(h),"function"!=typeof n)return d.join(String(n));for(p=d[0],y=1;y<d.length;y++)p+=String(n(h,y-1,f)),p+=d[y];return p}})},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function f(){}function h(){}function d(){}var p={};p[i]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==t&&n.call(m,i)&&(p=m);var v=d.prototype=f.prototype=Object.create(p);function g(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=v.constructor=d,d.constructor=h,h.displayName=s(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){},function(e,t,n){"use strict";
|
|
22
|
-
/** @license React v16.11.0
|
|
23
|
-
* react.production.min.js
|
|
24
|
-
*
|
|
25
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
26
|
-
*
|
|
27
|
-
* This source code is licensed under the MIT license found in the
|
|
28
|
-
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/var r=n(178),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.forward_ref"):60112,d=i?Symbol.for("react.suspense"):60113;i&&Symbol.for("react.suspense_list");var p=i?Symbol.for("react.memo"):60115,y=i?Symbol.for("react.lazy"):60116;i&&Symbol.for("react.fundamental"),i&&Symbol.for("react.responder"),i&&Symbol.for("react.scope");var m="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function _(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||g}function w(){}function T(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||g}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=_.prototype;var S=T.prototype=new w;S.constructor=T,r(S,_.prototype),S.isPureReactComponent=!0;var E={current:null},C={current:null},k=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:C.current}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var R=/\/+/g,A=[];function j(e,t,n,r){if(A.length){var i=A.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function I(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>A.length&&A.push(e)}function L(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case a:u=!0}}if(u)return r(i,t,""===n?"."+D(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var l=0;l<t.length;l++){var c=n+D(s=t[l],l);u+=e(s,c,r,i)}else if(null===t||"object"!=typeof t?c=null:c="function"==typeof(c=m&&t[m]||t["@@iterator"])?c:null,"function"==typeof c)for(t=c.call(t),l=0;!(s=t.next()).done;)u+=e(s=s.value,c=n+D(s,l++),r,i);else if("object"===s)throw r=""+t,Error(v(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return u}(e,"",t,n)}function D(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function M(e,t){e.func.call(e.context,t,e.count++)}function N(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?B(e,r,n,(function(e){return e})):null!=e&&(P(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(R,"$&/")+"/")+n)),r.push(e))}function B(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(R,"$&/")+"/"),L(e,N,t=j(t,o,r,i)),I(t)}function U(){var e=E.current;if(null===e)throw Error(v(321));return e}var F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return B(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;L(e,M,t=j(null,null,t,n)),I(t)},count:function(e){return L(e,(function(){return null}),null)},toArray:function(e){var t=[];return B(e,t,null,(function(e){return e})),t},only:function(e){if(!P(e))throw Error(v(143));return e}},createRef:function(){return{current:null}},Component:_,PureComponent:T,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:h,render:e}},lazy:function(e){return{$$typeof:y,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return U().useCallback(e,t)},useContext:function(e,t){return U().useContext(e,t)},useEffect:function(e,t){return U().useEffect(e,t)},useImperativeHandle:function(e,t,n){return U().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return U().useLayoutEffect(e,t)},useMemo:function(e,t){return U().useMemo(e,t)},useReducer:function(e,t,n){return U().useReducer(e,t,n)},useRef:function(e){return U().useRef(e)},useState:function(e){return U().useState(e)},Fragment:s,Profiler:l,StrictMode:u,Suspense:d,createElement:O,cloneElement:function(e,t,n){if(null==e)throw Error(v(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=C.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)k.call(t,c)&&!x.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var f=0;f<c;f++)l[f]=arguments[f+2];i.children=l}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},createFactory:function(e){var t=O.bind(null,e);return t.type=e,t},isValidElement:P,version:"16.11.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:E,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:C,IsSomeRendererActing:{current:!1},assign:r}},V={default:F},H=V&&F||V;e.exports=H.default||H},function(e,t){},function(e,t,n){var r=n(329).default,i=n(7);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t,n){var r=n(101),i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function o(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function s(){this.values=i(null)}function u(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length)t(a[0],a[1])}}function l(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new o(o.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=i(),l(),"--\x3e"!==e.substr(0,3))throw new o(o.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),l(),t.endTime=i(),l(),function(e,t){var r=new s;u(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}o.prototype=i(Error.prototype),o.prototype.constructor=o,o.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var c=r.createElement&&r.createElement("textarea"),f={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},d={v:"title",lang:"lang"},p={rt:"ruby"};function y(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e,t){return!p[t.localName]||p[t.localName]===e.localName}function i(t,n){var r=f[t];if(!r)return null;var i=e.document.createElement(r),o=d[t];return o&&n&&(i[o]=n.trim()),i}for(var o,s,u=e.document.createElement("div"),l=u,y=[];null!==(o=n());)if("<"!==o[0])l.appendChild(e.document.createTextNode((s=o,c.innerHTML=s,s=c.textContent,c.textContent="",s)));else{if("/"===o[1]){y.length&&y[y.length-1]===o.substr(2).replace(">","")&&(y.pop(),l=l.parentNode);continue}var m,v=a(o.substr(1,o.length-2));if(v){m=e.document.createProcessingInstruction("timestamp",v),l.appendChild(m);continue}var g=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!g)continue;if(!(m=i(g[1],g[3])))continue;if(!r(l,m))continue;if(g[2]){var b=g[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var r=t?"background-color":"color",i=h[n];m.style[r]=i}})),m.className=b.join(" ")}y.push(g[1]),l.appendChild(m),l=m}return u}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<m.length;t++){var n=m[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function g(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var o=n.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var o=0;o<n.length;o++)if(v(n.charCodeAt(o)))return"rtl";return"ltr"}function b(){}function _(e,t,n){b.call(this),this.cue=t,this.cueDiv=y(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:g(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function w(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function T(e,t,n,r){var i=new w(t),o=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(o),s=[];if(o.snapToLines){var u;switch(o.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var l=i.lineHeight,c=l*Math.round(a),f=n[u]+l,h=s[0];Math.abs(c)>f&&(c=c<0?-1:1,c*=Math.ceil(f/l)*l),a<0&&(c+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(h,c)}else{var d=i.lineHeight/n.height*100;switch(o.lineAlign){case"center":a-=d/2;break;case"end":a-=d}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new w(t)}var p=function(e,t){for(var i,o=new w(e),a=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var u=e.intersectPercentage(n);a>u&&(i=new w(e),a=u),e=new w(o)}return i||o}(i,s);t.move(p.toCSSCompatValues(n))}function S(){}b.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=i(b.prototype),_.prototype.constructor=_,w.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},w.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},w.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},w.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},w.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},w.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},w.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},w.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},S.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},S.convertCueToDOMTree=function(e,t){return e&&t?y(e,t):null};S.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],o=w.getSimpleBoxPosition(r),a={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var n,s,u=0;u<t.length;u++)s=t[u],n=new _(e,s,a),r.appendChild(n.div),T(0,n,o,i),s.displayState=n.div,i.push(w.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},S.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},S.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof o))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){e.match(/X-TIMESTAMP-MAP/)?u(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new s;u(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",a(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):u(e,(function(e,n){switch(e){case"Region":!function(e){var n=new s;if(u(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var c=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new o(o.Errors.BadSignature);t.state="HEADER"}for(var f=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(f?f=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{l(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||h&&(f=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new o(o.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=S},function(e,t){},function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function o(e,t,r){this.hasBeenReset=!1;var o="",a=!1,s=e,u=t,l=r,c=null,f="",h=!0,d="auto",p="start",y="auto",m="auto",v=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return o},set:function(e){o=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");s=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return l},set:function(e){l=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return f},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");f=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");d=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=i(e);t?(p=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=i(e);t?(m=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,o=100,a=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");o=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):u=t}}})}},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r,i,o,a,s;r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var o=s.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):t;var a=s.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var u=i.exec(a.path);a.netLoc=u[1],a.path=u[2]}a.netLoc&&!a.path&&(a.path="/");var l={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(l.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var c=a.path,f=c.substring(0,c.lastIndexOf("/")+1)+o.path;l.path=s.normalizePath(f)}else l.path=a.path,o.params||(l.params=a.params,o.query||(l.query=a.query));return null===l.path&&(l.path=n.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(l)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(o,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},function(e,t,n){"use strict";(function(e){
|
|
30
|
-
/*!
|
|
31
|
-
* The buffer module from node.js, for the browser.
|
|
32
|
-
*
|
|
33
|
-
* @author Feross Aboukhadijeh <http://feross.org>
|
|
34
|
-
* @license MIT
|
|
35
|
-
*/
|
|
36
|
-
var r=n(339),i=n(340),o=n(341);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(e,o+h)!==l(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function _(e,t,n,r){return H(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function T(e,t,n,r){return w(e,t,n,r)}function S(e,t,n,r){return H(V(t),e,n,r)}function E(e,t,n,r){return H(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,l=e[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(r,i),c=e.slice(t,n),f=0;f<s;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=U(e[o]);return i}function R(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,o){return o||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||j(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||j(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=u.isBuffer(e)?e:F(new u(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function V(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(32))},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),a=r[0],s=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(c(e,a,a+16383>s?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
|
|
37
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
38
|
-
t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=l}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+d]=255&a,d+=p,a/=256,l-=8);e[n+d-p]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function a(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function s(e,t,n,r,i,o){for(var a,s=++t,u=0;;){var l=e.charAt(s);switch(l){case"=":if(1===u)a=e.slice(t,s),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(o.warning('attribute value must after "="'),a=e.slice(t,s)),t=s+1,!((s=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");c=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,c,t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');c=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,c,t),o.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=s+1,u=5}break;case"/":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:u=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==u&&n.setTagName(e.slice(t,s)),s;case">":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:break;case 4:case 1:"/"===(c=e.slice(t,s)).slice(-1)&&(n.closed=!0,c=c.slice(0,-1));case 2:2===u&&(c=a),4==u?(o.warning('attribute "'+c+'" missed quot(")!!'),n.add(a,c.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&c.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),n.add(c,c,t));break;case 3:throw new Error("attribute value missed!!")}return s;case"":l=" ";default:if(l<=" ")switch(u){case 0:n.setTagName(e.slice(t,s)),u=6;break;case 1:a=e.slice(t,s),u=2;break;case 4:var c=e.slice(t,s).replace(/&#?\w+;/g,i);o.warning('attribute "'+c+'" missed quot(")!!'),n.add(a,c,t);case 5:u=6}else switch(u){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,t),t=s,u=1;break;case 5:o.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=s;break;case 3:u=4,t=s;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function u(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var a=e[o],s=a.qName,u=a.value;if((d=s.indexOf(":"))>0)var l=a.prefix=s.slice(0,d),c=s.slice(d+1),h="xmlns"===l&&c;else c=s,l=null,h="xmlns"===s&&"";a.localName=c,!1!==h&&(null==i&&(i={},f(n,n={})),n[h]=i[h]=u,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(o=e.length;o--;){(l=(a=e[o]).prefix)&&("xml"===l&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(a.uri=n[l||""]))}var d;(d=r.indexOf(":"))>0?(l=e.prefix=r.slice(0,d),c=e.localName=r.slice(d+1)):(l=null,c=e.localName=r);var p=e.uri=n[l||""];if(t.startElement(p,c,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,c,r),i)for(l in i)t.endPrefixMapping(l)}function l(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function c(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function f(e,t){for(var n in e)t[n]=e[n]}function h(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var o=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=a>3&&/^public$/i.test(o[2][0])&&o[3][0],l=a>4&&o[4][0],c=o[a-1];return n.startDTD(s,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function d(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function p(e){}function y(e,t){return e.__proto__=t,e}o.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,i){function o(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function f(t){if(t>T){var n=e.substring(T,t).replace(/&#?\w+;/g,o);b&&y(T),r.characters(n,0,t-T),T=t}}function y(t,n){for(;t>=v&&(n=g.exec(e));)m=n.index,v=m+n[0].length,b.lineNumber++;b.columnNumber=t-m+1}var m=0,v=0,g=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,_=[{currentNSMap:t}],w={},T=0;for(;;){try{var S=e.indexOf("<",T);if(S<0){if(!e.substr(T).match(/^\s*$/)){var E=r.doc,C=E.createTextNode(e.substr(T));E.appendChild(C),r.currentElement=C}return}switch(S>T&&f(S),e.charAt(S+1)){case"/":var k=e.indexOf(">",S+3),x=e.substring(S+2,k),O=_.pop();k<0?(x=e.substring(S+2).replace(/[\s<].*/,""),i.error("end tag name: "+x+" is not complete:"+O.tagName),k=S+1+x.length):x.match(/\s</)&&(x=x.replace(/[\s<].*/,""),i.error("end tag name: "+x+" maybe not complete"),k=S+1+x.length);var P=O.localNSMap,R=O.tagName==x;if(R||O.tagName&&O.tagName.toLowerCase()==x.toLowerCase()){if(r.endElement(O.uri,O.localName,x),P)for(var A in P)r.endPrefixMapping(A);R||i.fatalError("end tag name: "+x+" is not match the current start tagName:"+O.tagName)}else _.push(O);k++;break;case"?":b&&y(S),k=d(e,S,r);break;case"!":b&&y(S),k=h(e,S,r,i);break;default:b&&y(S);var j=new p,I=_[_.length-1].currentNSMap,L=(k=s(e,S,j,I,o,i),j.length);if(!j.closed&&c(e,k,j.tagName,w)&&(j.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&L){for(var D=a(b,{}),M=0;M<L;M++){var N=j[M];y(N.offset),N.locator=a(b,{})}r.locator=D,u(j,r,I)&&_.push(j),r.locator=b}else u(j,r,I)&&_.push(j);"http://www.w3.org/1999/xhtml"!==j.uri||j.closed?k++:k=l(e,k,j.tagName,o,r)}}catch(e){i.error("element parse error: "+e),k=-1}k>T?T=k:f(Math.max(S,T)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},p.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},y({},y.prototype)instanceof y||(y=function(e,t){function n(){}for(t in n.prototype=t,n=new n,e)n[t]=e[t];return n}),t.XMLReader=o},function(e,t,n){"use strict";var r=n(344),i=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},o=function(e){var t,n;o.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=i(e.dts,n),e.pts=i(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};o.prototype=new r,e.exports={TimestampRolloverStream:o,handleRollover:i}},function(e,t,n){"use strict";var r=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};r.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},r.prototype.push=function(e){this.trigger("data",e)},r.prototype.flush=function(e){this.trigger("done",e)},r.prototype.partialFlush=function(e){this.trigger("partialdone",e)},r.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},r.prototype.reset=function(e){this.trigger("reset",e)},e.exports=r},function(e,t,n){"use strict";var r=n(180),i=function(e){var t=31&e[1];return t<<=8,t|=e[2]},o=function(e){return!!(64&e[1])},a=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},s=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};e.exports={parseType:function(e,t){var n=i(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=o(e),n=4+a(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=o(e),r=4+a(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var s=12+((15&e[r+10])<<8|e[r+11]);s<i;){var u=r+s;t[(31&e[u+1])<<8|e[u+2]]=e[u],s+=5+((15&e[u+3])<<8|e[u+4])}return t}},parsePayloadUnitStartIndicator:o,parsePesType:function(e,t){switch(t[i(e)]){case r.H264_STREAM_TYPE:return"video";case r.ADTS_STREAM_TYPE:return"audio";case r.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!o(e))return null;var t=4+a(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+a(e),n=e.subarray(t),r=0,i=0,o=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),o}}},function(e,t,n){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},o=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=i(e,t),o(e,t))},a=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={isLikelyAacData:function(e){var t=o(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:i,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return r[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=a(e.subarray(10,14)));do{if((n=a(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i))){var o=r.subarray(i+1),s=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return s*=4,s+=3&o[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}}},function(e,t,n){var r=n(96).toUnsigned,i=n(181),o=function(e,t){var n,a,s,u,l,c=[];if(!t.length)return null;for(n=0;n<e.byteLength;)a=r(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),s=i(e.subarray(n+4,n+8)),u=a>1?n+a:e.byteLength,s===t[0]&&(1===t.length?c.push(e.subarray(n+8,u)):(l=o(e.subarray(n+8,u),t.slice(1))).length&&(c=c.concat(l))),n=u;return c};e.exports=o},function(e,t){e.exports=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r}},function(e,t,n){var r=n(350);e.exports=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),o=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],u=2&n.flags[1],l=4&n.flags[1],c=8&n.flags[1],f=i.getUint32(4),h=8;for(o&&(n.dataOffset=i.getInt32(h),h+=4),a&&f&&(t={flags:r(e.subarray(h,h+4))},h+=4,s&&(t.duration=i.getUint32(h),h+=4),u&&(t.size=i.getUint32(h),h+=4),c&&(1===n.version?t.compositionTimeOffset=i.getInt32(h):t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t),f--);f--;)t={},s&&(t.duration=i.getUint32(h),h+=4),u&&(t.size=i.getUint32(h),h+=4),l&&(t.flags=r(e.subarray(h,h+4)),h+=4),c&&(1===n.version?t.compositionTimeOffset=i.getInt32(h):t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t);return n}},function(e,t){e.exports=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}},function(e,t,n){var r=n(96).toUnsigned;e.exports=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:r(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=r(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(14),i=n(177),o=n(153),a=n(29);for(var s in i){var u=r[s],l=u&&u.prototype;if(l&&l.forEach!==o)try{a(l,"forEach",o)}catch(e){l.forEach=o}}},function(e,t,n){var r=n(5),i=n(361);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(e,t,n){var r=n(14),i=n(95).trim,o=n(125),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");e.exports=u?function(e,t){var n=i(String(e));return a(n,t>>>0||(s.test(n)?16:10))}:a},function(e,t,n){"use strict";var r,i=n(14),o=n(86),a=n(54),s=n(161),u=n(363),l=n(18),c=n(35).enforce,f=n(141),h=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},y=e.exports=s("WeakMap",p,u,!0,!0);if(f&&h){r=u.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0;var m=y.prototype,v=m.delete,g=m.has,b=m.get,_=m.set;o(m,{delete:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),g.call(this,e)||t.frozen.has(e)}return g.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),g.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var n=c(this);n.frozen||(n.frozen=new r),g.call(this,e)?_.call(this,e,t):n.frozen.set(e,t)}else _.call(this,e,t);return this}})}},function(e,t,n){"use strict";var r=n(86),i=n(54).getWeakData,o=n(24),a=n(18),s=n(85),u=n(50),l=n(43),c=n(33),f=n(35),h=f.set,d=f.getterFor,p=l.find,y=l.findIndex,m=0,v=function(e){return e.frozen||(e.frozen=new g)},g=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};g.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=y(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,l){var f=e((function(e,r){s(e,f,t),h(e,{type:t,id:m++,frozen:void 0}),null!=r&&u(r,e[l],e,n)})),p=d(t),y=function(e,t,n){var r=p(e),a=i(o(t),!0);return!0===a?v(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?v(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?v(t).has(e):n&&c(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=p(this);if(a(e)){var n=i(e);return!0===n?v(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),f}}},function(e,t,n){var r=n(17),i=n(26).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";
|
|
39
|
-
/** @license React v16.11.0
|
|
40
|
-
* react-dom.production.min.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var r=n(1),i=n(178),o=n(391);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=null,u={};function l(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!f[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in f[n]=t,n=t.eventTypes){var i=void 0,o=n[r],l=t,d=r;if(h.hasOwnProperty(d))throw Error(a(99,d));h[d]=o;var p=o.phasedRegistrationNames;if(p){for(i in p)p.hasOwnProperty(i)&&c(p[i],l,d);i=!0}else o.registrationName?(c(o.registrationName,l,d),i=!0):i=!1;if(!i)throw Error(a(98,r,e))}}}}function c(e,t,n){if(d[e])throw Error(a(100,e));d[e]=t,p[e]=t.eventTypes[n].dependencies}var f=[],h={},d={},p={};function y(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var m=!1,v=null,g=!1,b=null,_={onError:function(e){m=!0,v=e}};function w(e,t,n,r,i,o,a,s,u){m=!1,v=null,y.apply(_,arguments)}var T=null,S=null,E=null;function C(e,t,n){var r=e.type||"unknown-event";e.currentTarget=E(n),function(e,t,n,r,i,o,s,u,l){if(w.apply(this,arguments),m){if(!m)throw Error(a(198));var c=v;m=!1,v=null,g||(g=!0,b=c)}}(r,t,void 0,e),e.currentTarget=null}function k(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function x(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var O=null;function P(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)C(e,t[r],n[r]);else t&&C(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function R(e){if(null!==e&&(O=k(O,e)),e=O,O=null,e){if(x(e,P),O)throw Error(a(95));if(g)throw e=b,g=!1,b=null,e}}var A={injectEventPluginOrder:function(e){if(s)throw Error(a(101));s=Array.prototype.slice.call(e),l()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!u.hasOwnProperty(t)||u[t]!==r){if(u[t])throw Error(a(102,t));u[t]=r,n=!0}}n&&l()}};function j(e,t){var n=e.stateNode;if(!n)return null;var r=T(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var I=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;I.hasOwnProperty("ReactCurrentDispatcher")||(I.ReactCurrentDispatcher={current:null}),I.hasOwnProperty("ReactCurrentBatchConfig")||(I.ReactCurrentBatchConfig={suspense:null});var L=/^(.*)[\\\/]/,D="function"==typeof Symbol&&Symbol.for,M=D?Symbol.for("react.element"):60103,N=D?Symbol.for("react.portal"):60106,B=D?Symbol.for("react.fragment"):60107,U=D?Symbol.for("react.strict_mode"):60108,F=D?Symbol.for("react.profiler"):60114,V=D?Symbol.for("react.provider"):60109,H=D?Symbol.for("react.context"):60110,z=D?Symbol.for("react.concurrent_mode"):60111,q=D?Symbol.for("react.forward_ref"):60112,W=D?Symbol.for("react.suspense"):60113,$=D?Symbol.for("react.suspense_list"):60120,G=D?Symbol.for("react.memo"):60115,K=D?Symbol.for("react.lazy"):60116;D&&Symbol.for("react.fundamental"),D&&Symbol.for("react.responder"),D&&Symbol.for("react.scope");var Y="function"==typeof Symbol&&Symbol.iterator;function X(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Y&&e[Y]||e["@@iterator"])?e:null}function Q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case B:return"Fragment";case N:return"Portal";case F:return"Profiler";case U:return"StrictMode";case W:return"Suspense";case $:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case H:return"Context.Consumer";case V:return"Context.Provider";case q:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case G:return Q(e.type);case K:if(e=1===e._status?e._result:null)return Q(e)}return null}function J(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=Q(e.type);n=null,r&&(n=Q(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(L,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}var Z=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),ee=null,te=null,ne=null;function re(e){if(e=S(e)){if("function"!=typeof ee)throw Error(a(280));var t=T(e.stateNode);ee(e.stateNode,e.type,t)}}function ie(e){te?ne?ne.push(e):ne=[e]:te=e}function oe(){if(te){var e=te,t=ne;if(ne=te=null,re(e),t)for(e=0;e<t.length;e++)re(t[e])}}function ae(e,t){return e(t)}function se(e,t,n,r){return e(t,n,r)}function ue(){}var le=ae,ce=!1,fe=!1;function he(){null===te&&null===ne||(ue(),oe())}new Map;var de=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pe=Object.prototype.hasOwnProperty,ye={},me={};function ve(e,t,n,r,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){ge[e]=new ve(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];ge[t]=new ve(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){ge[e]=new ve(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){ge[e]=new ve(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){ge[e]=new ve(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){ge[e]=new ve(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){ge[e]=new ve(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){ge[e]=new ve(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){ge[e]=new ve(e,5,!1,e.toLowerCase(),null,!1)}));var be=/[\-:]([a-z])/g;function _e(e){return e[1].toUpperCase()}function we(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Te(e,t,n,r){var i=ge.hasOwnProperty(t)?ge[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!pe.call(me,e)||!pe.call(ye,e)&&(de.test(e)?me[e]=!0:(ye[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function Se(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ee(e){e._valueTracker||(e._valueTracker=function(e){var t=Se(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ce(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Se(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ke(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function xe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=we(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Oe(e,t){null!=(t=t.checked)&&Te(e,"checked",t,!1)}function Pe(e,t){Oe(e,t);var n=we(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ae(e,t.type,we(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Ae(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function je(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Ie(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+we(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function De(e,t){var n=t.value;if(null==n){if(n=t.defaultValue,null!=(t=t.children)){if(null!=n)throw Error(a(92));if(Array.isArray(t)){if(!(1>=t.length))throw Error(a(93));t=t[0]}n=t}null==n&&(n="")}e._wrapperState={initialValue:we(n)}}function Me(e,t){var n=we(t.value),r=we(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ne(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(be,_e);ge[t]=new ve(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(be,_e);ge[t]=new ve(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(be,_e);ge[t]=new ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){ge[e]=new ve(e,1,!1,e.toLowerCase(),null,!1)})),ge.xlinkHref=new ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){ge[e]=new ve(e,1,!1,e.toLowerCase(),null,!0)}));var Be="http://www.w3.org/1999/xhtml",Ue="http://www.w3.org/2000/svg";function Fe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ve(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Fe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var He,ze=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==Ue||"innerHTML"in e)e.innerHTML=t;else{for((He=He||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=He.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function qe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function We(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var $e={animationend:We("Animation","AnimationEnd"),animationiteration:We("Animation","AnimationIteration"),animationstart:We("Animation","AnimationStart"),transitionend:We("Transition","TransitionEnd")},Ge={},Ke={};function Ye(e){if(Ge[e])return Ge[e];if(!$e[e])return e;var t,n=$e[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ke)return Ge[e]=n[t];return e}Z&&(Ke=document.createElement("div").style,"AnimationEvent"in window||(delete $e.animationend.animation,delete $e.animationiteration.animation,delete $e.animationstart.animation),"TransitionEvent"in window||delete $e.transitionend.transition);var Xe=Ye("animationend"),Qe=Ye("animationiteration"),Je=Ye("animationstart"),Ze=Ye("transitionend"),et="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" ");function tt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function nt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function rt(e){if(tt(e)!==e)throw Error(a(188))}function it(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=tt(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return rt(i),e;if(o===r)return rt(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var ot,at,st,ut=!1,lt=[],ct=null,ft=null,ht=null,dt=new Map,pt=new Map,yt=[],mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),vt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function gt(e,t,n,r){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:r}}function bt(e,t){switch(e){case"focus":case"blur":ct=null;break;case"dragenter":case"dragleave":ft=null;break;case"mouseover":case"mouseout":ht=null;break;case"pointerover":case"pointerout":dt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pt.delete(t.pointerId)}}function _t(e,t,n,r,i){return null===e||e.nativeEvent!==i?(e=gt(t,n,r,i),null!==t&&(null!==(t=lr(t))&&at(t)),e):(e.eventSystemFlags|=r,e)}function wt(e){var t=ur(e.target);if(null!==t){var n=tt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=nt(n)))return e.blockedOn=t,void o.unstable_runWithPriority(e.priority,(function(){st(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Tt(e){if(null!==e.blockedOn)return!1;var t=An(e.topLevelType,e.eventSystemFlags,e.nativeEvent);if(null!==t){var n=lr(t);return null!==n&&at(n),e.blockedOn=t,!1}return!0}function St(e,t,n){Tt(e)&&n.delete(t)}function Et(){for(ut=!1;0<lt.length;){var e=lt[0];if(null!==e.blockedOn){null!==(e=lr(e.blockedOn))&&ot(e);break}var t=An(e.topLevelType,e.eventSystemFlags,e.nativeEvent);null!==t?e.blockedOn=t:lt.shift()}null!==ct&&Tt(ct)&&(ct=null),null!==ft&&Tt(ft)&&(ft=null),null!==ht&&Tt(ht)&&(ht=null),dt.forEach(St),pt.forEach(St)}function Ct(e,t){e.blockedOn===t&&(e.blockedOn=null,ut||(ut=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Et)))}function kt(e){function t(t){return Ct(t,e)}if(0<lt.length){Ct(lt[0],e);for(var n=1;n<lt.length;n++){var r=lt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ct&&Ct(ct,e),null!==ft&&Ct(ft,e),null!==ht&&Ct(ht,e),dt.forEach(t),pt.forEach(t),n=0;n<yt.length;n++)(r=yt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<yt.length&&null===(n=yt[0]).blockedOn;)wt(n),null===n.blockedOn&&yt.shift()}function xt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function Ot(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Pt(e,t,n){(t=j(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=k(n._dispatchListeners,t),n._dispatchInstances=k(n._dispatchInstances,e))}function Rt(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Ot(t);for(t=n.length;0<t--;)Pt(n[t],"captured",e);for(t=0;t<n.length;t++)Pt(n[t],"bubbled",e)}}function At(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=j(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=k(n._dispatchListeners,t),n._dispatchInstances=k(n._dispatchInstances,e))}function jt(e){e&&e.dispatchConfig.registrationName&&At(e._targetInst,null,e)}function It(e){x(e,Rt)}function Lt(){return!0}function Dt(){return!1}function Mt(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Lt:Dt,this.isPropagationStopped=Dt,this}function Nt(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Bt(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Ut(e){e.eventPool=[],e.getPooled=Nt,e.release=Bt}i(Mt.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Lt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Lt)},persist:function(){this.isPersistent=Lt},isPersistent:Dt,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Dt,this._dispatchInstances=this._dispatchListeners=null}}),Mt.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Mt.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,Ut(n),n},Ut(Mt);var Ft=Mt.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Vt=Mt.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ht=Mt.extend({view:null,detail:null}),zt=Ht.extend({relatedTarget:null});function qt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Wt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$t={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Gt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kt(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Gt[e])&&!!t[e]}function Yt(){return Kt}for(var Xt=Ht.extend({key:function(e){if(e.key){var t=Wt[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=qt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?$t[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Yt,charCode:function(e){return"keypress"===e.type?qt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?qt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Qt=0,Jt=0,Zt=!1,en=!1,tn=Ht.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Yt,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Qt;return Qt=e.screenX,Zt?"mousemove"===e.type?e.screenX-t:0:(Zt=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Jt;return Jt=e.screenY,en?"mousemove"===e.type?e.screenY-t:0:(en=!0,0)}}),nn=tn.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),rn=tn.extend({dataTransfer:null}),on=Ht.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Yt}),an=Mt.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),sn=tn.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),un=[["blur","blur",0],["cancel","cancel",0],["click","click",0],["close","close",0],["contextmenu","contextMenu",0],["copy","copy",0],["cut","cut",0],["auxclick","auxClick",0],["dblclick","doubleClick",0],["dragend","dragEnd",0],["dragstart","dragStart",0],["drop","drop",0],["focus","focus",0],["input","input",0],["invalid","invalid",0],["keydown","keyDown",0],["keypress","keyPress",0],["keyup","keyUp",0],["mousedown","mouseDown",0],["mouseup","mouseUp",0],["paste","paste",0],["pause","pause",0],["play","play",0],["pointercancel","pointerCancel",0],["pointerdown","pointerDown",0],["pointerup","pointerUp",0],["ratechange","rateChange",0],["reset","reset",0],["seeked","seeked",0],["submit","submit",0],["touchcancel","touchCancel",0],["touchend","touchEnd",0],["touchstart","touchStart",0],["volumechange","volumeChange",0],["drag","drag",1],["dragenter","dragEnter",1],["dragexit","dragExit",1],["dragleave","dragLeave",1],["dragover","dragOver",1],["mousemove","mouseMove",1],["mouseout","mouseOut",1],["mouseover","mouseOver",1],["pointermove","pointerMove",1],["pointerout","pointerOut",1],["pointerover","pointerOver",1],["scroll","scroll",1],["toggle","toggle",1],["touchmove","touchMove",1],["wheel","wheel",1],["abort","abort",2],[Xe,"animationEnd",2],[Qe,"animationIteration",2],[Je,"animationStart",2],["canplay","canPlay",2],["canplaythrough","canPlayThrough",2],["durationchange","durationChange",2],["emptied","emptied",2],["encrypted","encrypted",2],["ended","ended",2],["error","error",2],["gotpointercapture","gotPointerCapture",2],["load","load",2],["loadeddata","loadedData",2],["loadedmetadata","loadedMetadata",2],["loadstart","loadStart",2],["lostpointercapture","lostPointerCapture",2],["playing","playing",2],["progress","progress",2],["seeking","seeking",2],["stalled","stalled",2],["suspend","suspend",2],["timeupdate","timeUpdate",2],[Ze,"transitionEnd",2],["waiting","waiting",2]],ln={},cn={},fn=0;fn<un.length;fn++){var hn=un[fn],dn=hn[0],pn=hn[1],yn=hn[2],mn="on"+(pn[0].toUpperCase()+pn.slice(1)),vn={phasedRegistrationNames:{bubbled:mn,captured:mn+"Capture"},dependencies:[dn],eventPriority:yn};ln[pn]=vn,cn[dn]=vn}var gn={eventTypes:ln,getEventPriority:function(e){return void 0!==(e=cn[e])?e.eventPriority:2},extractEvents:function(e,t,n,r){var i=cn[e];if(!i)return null;switch(e){case"keypress":if(0===qt(n))return null;case"keydown":case"keyup":e=Xt;break;case"blur":case"focus":e=zt;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=tn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=rn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=on;break;case Xe:case Qe:case Je:e=Ft;break;case Ze:e=an;break;case"scroll":e=Ht;break;case"wheel":e=sn;break;case"copy":case"cut":case"paste":e=Vt;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=nn;break;default:e=Mt}return It(t=e.getPooled(i,t,n,r)),t}},bn=o.unstable_UserBlockingPriority,_n=o.unstable_runWithPriority,wn=gn.getEventPriority,Tn=[];function Sn(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=ur(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=xt(e.nativeEvent);r=e.topLevelType;for(var o=e.nativeEvent,a=e.eventSystemFlags,s=null,u=0;u<f.length;u++){var l=f[u];l&&(l=l.extractEvents(r,t,o,i,a))&&(s=k(s,l))}R(s)}}var En=!0;function Cn(e,t){kn(t,e,!1)}function kn(e,t,n){switch(wn(t)){case 0:var r=xn.bind(null,t,1);break;case 1:r=On.bind(null,t,1);break;default:r=Rn.bind(null,t,1)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function xn(e,t,n){ce||ue();var r=Rn,i=ce;ce=!0;try{se(r,e,t,n)}finally{(ce=i)||he()}}function On(e,t,n){_n(bn,Rn.bind(null,e,t,n))}function Pn(e,t,n,r){if(Tn.length){var i=Tn.pop();i.topLevelType=e,i.eventSystemFlags=t,i.nativeEvent=n,i.targetInst=r,e=i}else e={topLevelType:e,eventSystemFlags:t,nativeEvent:n,targetInst:r,ancestors:[]};try{if(t=Sn,n=e,fe)t(n,void 0);else{fe=!0;try{le(t,n,void 0)}finally{fe=!1,he()}}}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,Tn.length<10&&Tn.push(e)}}function Rn(e,t,n){if(En)if(0<lt.length&&-1<mt.indexOf(e))e=gt(null,e,t,n),lt.push(e);else{var r=An(e,t,n);null===r?bt(e,n):-1<mt.indexOf(e)?(e=gt(r,e,t,n),lt.push(e)):function(e,t,n,r){switch(t){case"focus":return ct=_t(ct,e,t,n,r),!0;case"dragenter":return ft=_t(ft,e,t,n,r),!0;case"mouseover":return ht=_t(ht,e,t,n,r),!0;case"pointerover":var i=r.pointerId;return dt.set(i,_t(dt.get(i)||null,e,t,n,r)),!0;case"gotpointercapture":return i=r.pointerId,pt.set(i,_t(pt.get(i)||null,e,t,n,r)),!0}return!1}(r,e,t,n)||(bt(e,n),Pn(e,t,n,null))}}function An(e,t,n){var r=xt(n);if(null!==(r=ur(r))){var i=tt(r);if(null===i)r=null;else{var o=i.tag;if(13===o){if(null!==(r=nt(i)))return r;r=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Pn(e,t,n,r),null}function jn(e){if(!Z)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var In=new("function"==typeof WeakMap?WeakMap:Map);function Ln(e){var t=In.get(e);return void 0===t&&(t=new Set,In.set(e,t)),t}function Dn(e,t,n){if(!n.has(e)){switch(e){case"scroll":kn(t,"scroll",!0);break;case"focus":case"blur":kn(t,"focus",!0),kn(t,"blur",!0),n.add("blur"),n.add("focus");break;case"cancel":case"close":jn(e)&&kn(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===et.indexOf(e)&&Cn(e,t)}n.add(e)}}var Mn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nn=["Webkit","ms","Moz","O"];function Bn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Mn.hasOwnProperty(e)&&Mn[e]?(""+t).trim():t+"px"}function Un(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Bn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Mn).forEach((function(e){Nn.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mn[t]=Mn[e]}))}));var Fn=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Vn(e,t){if(t){if(Fn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function Hn(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function zn(e,t){var n=Ln(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=p[t];for(var r=0;r<t.length;r++)Dn(t[r],e,n)}function qn(){}function Wn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gn(e,t){var n,r=$n(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=$n(r)}}function Kn(){for(var e=window,t=Wn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Wn((e=t.contentWindow).document)}return t}function Yn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var Xn=null,Qn=null;function Jn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Zn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var er="function"==typeof setTimeout?setTimeout:void 0,tr="function"==typeof clearTimeout?clearTimeout:void 0;function nr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function rr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ir=Math.random().toString(36).slice(2),or="__reactInternalInstance$"+ir,ar="__reactEventHandlers$"+ir,sr="__reactContainere$"+ir;function ur(e){var t=e[or];if(t)return t;for(var n=e.parentNode;n;){if(t=n[sr]||n[or]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=rr(e);null!==e;){if(n=e[or])return n;e=rr(e)}return t}n=(e=n).parentNode}return null}function lr(e){return!(e=e[or]||e[sr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function cr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function fr(e){return e[ar]||null}var hr=null,dr=null,pr=null;function yr(){if(pr)return pr;var e,t,n=dr,r=n.length,i="value"in hr?hr.value:hr.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return pr=i.slice(e,1<t?1-t:void 0)}var mr=Mt.extend({data:null}),vr=Mt.extend({data:null}),gr=[9,13,27,32],br=Z&&"CompositionEvent"in window,_r=null;Z&&"documentMode"in document&&(_r=document.documentMode);var wr=Z&&"TextEvent"in window&&!_r,Tr=Z&&(!br||_r&&8<_r&&11>=_r),Sr=String.fromCharCode(32),Er={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Cr=!1;function kr(e,t){switch(e){case"keyup":return-1!==gr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function xr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Or=!1;var Pr={eventTypes:Er,extractEvents:function(e,t,n,r){var i;if(br)e:{switch(e){case"compositionstart":var o=Er.compositionStart;break e;case"compositionend":o=Er.compositionEnd;break e;case"compositionupdate":o=Er.compositionUpdate;break e}o=void 0}else Or?kr(e,n)&&(o=Er.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=Er.compositionStart);return o?(Tr&&"ko"!==n.locale&&(Or||o!==Er.compositionStart?o===Er.compositionEnd&&Or&&(i=yr()):(dr="value"in(hr=r)?hr.value:hr.textContent,Or=!0)),o=mr.getPooled(o,t,n,r),i?o.data=i:null!==(i=xr(n))&&(o.data=i),It(o),i=o):i=null,(e=wr?function(e,t){switch(e){case"compositionend":return xr(t);case"keypress":return 32!==t.which?null:(Cr=!0,Sr);case"textInput":return(e=t.data)===Sr&&Cr?null:e;default:return null}}(e,n):function(e,t){if(Or)return"compositionend"===e||!br&&kr(e,t)?(e=yr(),pr=dr=hr=null,Or=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tr&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=vr.getPooled(Er.beforeInput,t,n,r)).data=e,It(t)):t=null,null===i?t:null===t?i:[i,t]}},Rr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rr[e.type]:"textarea"===t}var jr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Ir(e,t,n){return(e=Mt.getPooled(jr.change,e,t,n)).type="change",ie(n),It(e),e}var Lr=null,Dr=null;function Mr(e){R(e)}function Nr(e){if(Ce(cr(e)))return e}function Br(e,t){if("change"===e)return t}var Ur=!1;function Fr(){Lr&&(Lr.detachEvent("onpropertychange",Vr),Dr=Lr=null)}function Vr(e){if("value"===e.propertyName&&Nr(Dr))if(e=Ir(Dr,e,xt(e)),ce)R(e);else{ce=!0;try{ae(Mr,e)}finally{ce=!1,he()}}}function Hr(e,t,n){"focus"===e?(Fr(),Dr=n,(Lr=t).attachEvent("onpropertychange",Vr)):"blur"===e&&Fr()}function zr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Nr(Dr)}function qr(e,t){if("click"===e)return Nr(t)}function Wr(e,t){if("input"===e||"change"===e)return Nr(t)}Z&&(Ur=jn("input")&&(!document.documentMode||9<document.documentMode));var $r,Gr={eventTypes:jr,_isInputEventSupported:Ur,extractEvents:function(e,t,n,r){var i=t?cr(t):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=Br;else if(Ar(i))if(Ur)a=Wr;else{a=zr;var s=Hr}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=qr);if(a&&(a=a(e,t)))return Ir(a,n,r);s&&s(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&Ae(i,"number",i.value)}},Kr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Yr={eventTypes:Kr,extractEvents:function(e,t,n,r,i){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&0==(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?ur(t):null)&&(t!==(o=tt(t))||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var s=tn,u=Kr.mouseLeave,l=Kr.mouseEnter,c="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=nn,u=Kr.pointerLeave,l=Kr.pointerEnter,c="pointer");if(e=null==a?i:cr(a),i=null==t?i:cr(t),(u=s.getPooled(u,a,n,r)).type=c+"leave",u.target=e,u.relatedTarget=i,(r=s.getPooled(l,t,n,r)).type=c+"enter",r.target=i,r.relatedTarget=e,c=t,(s=a)&&c)e:{for(e=c,a=0,t=l=s;t;t=Ot(t))a++;for(t=0,i=e;i;i=Ot(i))t++;for(;0<a-t;)l=Ot(l),a--;for(;0<t-a;)e=Ot(e),t--;for(;a--;){if(l===e||l===e.alternate)break e;l=Ot(l),e=Ot(e)}l=null}else l=null;for(e=l,l=[];s&&s!==e&&(null===(a=s.alternate)||a!==e);)l.push(s),s=Ot(s);for(s=[];c&&c!==e&&(null===(a=c.alternate)||a!==e);)s.push(c),c=Ot(c);for(c=0;c<l.length;c++)At(l[c],"bubbled",u);for(c=s.length;0<c--;)At(s[c],"captured",r);return n===$r?($r=null,[u]):($r=n,[u,r])}};var Xr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Qr=Object.prototype.hasOwnProperty;function Jr(e,t){if(Xr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Qr.call(t,n[r])||!Xr(e[n[r]],t[n[r]]))return!1;return!0}var Zr=Z&&"documentMode"in document&&11>=document.documentMode,ei={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ti=null,ni=null,ri=null,ii=!1;function oi(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return ii||null==ti||ti!==Wn(n)?null:("selectionStart"in(n=ti)&&Yn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},ri&&Jr(ri,n)?null:(ri=n,(e=Mt.getPooled(ei.select,ni,e,t)).type="select",e.target=ti,It(e),e))}var ai={eventTypes:ei,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=Ln(o),i=p.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?cr(t):window,e){case"focus":(Ar(o)||"true"===o.contentEditable)&&(ti=o,ni=t,ri=null);break;case"blur":ri=ni=ti=null;break;case"mousedown":ii=!0;break;case"contextmenu":case"mouseup":case"dragend":return ii=!1,oi(n,r);case"selectionchange":if(Zr)break;case"keydown":case"keyup":return oi(n,r)}return null}};A.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),T=fr,S=lr,E=cr,A.injectEventPluginsByName({SimpleEventPlugin:gn,EnterLeaveEventPlugin:Yr,ChangeEventPlugin:Gr,SelectEventPlugin:ai,BeforeInputEventPlugin:Pr}),new Set;var si=[],ui=-1;function li(e){0>ui||(e.current=si[ui],si[ui]=null,ui--)}function ci(e,t){ui++,si[ui]=e.current,e.current=t}var fi={},hi={current:fi},di={current:!1},pi=fi;function yi(e,t){var n=e.type.contextTypes;if(!n)return fi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function mi(e){return null!=(e=e.childContextTypes)}function vi(e){li(di),li(hi)}function gi(e){li(di),li(hi)}function bi(e,t,n){if(hi.current!==fi)throw Error(a(168));ci(hi,t),ci(di,n)}function _i(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,Q(t)||"Unknown",o));return i({},n,{},r)}function wi(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||fi,pi=hi.current,ci(hi,t),ci(di,di.current),!0}function Ti(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(t=_i(e,t,pi),r.__reactInternalMemoizedMergedChildContext=t,li(di),li(hi),ci(hi,t)):li(di),ci(di,n)}var Si=o.unstable_runWithPriority,Ei=o.unstable_scheduleCallback,Ci=o.unstable_cancelCallback,ki=o.unstable_shouldYield,xi=o.unstable_requestPaint,Oi=o.unstable_now,Pi=o.unstable_getCurrentPriorityLevel,Ri=o.unstable_ImmediatePriority,Ai=o.unstable_UserBlockingPriority,ji=o.unstable_NormalPriority,Ii=o.unstable_LowPriority,Li=o.unstable_IdlePriority,Di={},Mi=void 0!==xi?xi:function(){},Ni=null,Bi=null,Ui=!1,Fi=Oi(),Vi=1e4>Fi?Oi:function(){return Oi()-Fi};function Hi(){switch(Pi()){case Ri:return 99;case Ai:return 98;case ji:return 97;case Ii:return 96;case Li:return 95;default:throw Error(a(332))}}function zi(e){switch(e){case 99:return Ri;case 98:return Ai;case 97:return ji;case 96:return Ii;case 95:return Li;default:throw Error(a(332))}}function qi(e,t){return e=zi(e),Si(e,t)}function Wi(e,t,n){return e=zi(e),Ei(e,t,n)}function $i(e){return null===Ni?(Ni=[e],Bi=Ei(Ri,Ki)):Ni.push(e),Di}function Gi(){if(null!==Bi){var e=Bi;Bi=null,Ci(e)}Ki()}function Ki(){if(!Ui&&null!==Ni){Ui=!0;var e=0;try{var t=Ni;qi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ni=null}catch(t){throw null!==Ni&&(Ni=Ni.slice(e+1)),Ei(Ri,Gi),t}finally{Ui=!1}}}var Yi=3;function Xi(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Qi(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Ji={current:null},Zi=null,eo=null,to=null;function no(){to=eo=Zi=null}function ro(e,t){var n=e.type._context;ci(Ji,n._currentValue),n._currentValue=t}function io(e){var t=Ji.current;li(Ji),e.type._context._currentValue=t}function oo(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ao(e,t){Zi=e,to=eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Va=!0),e.firstContext=null)}function so(e,t){if(to!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(to=e,t=1073741823),t={context:e,observedBits:t,next:null},null===eo){if(null===Zi)throw Error(a(308));eo=t,Zi.dependencies={expirationTime:0,firstContext:t,responders:null}}else eo=eo.next=t;return e._currentValue}var uo=!1;function lo(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function co(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function fo(e,t){return{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function ho(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function po(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=lo(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=lo(e.memoizedState),i=n.updateQueue=lo(n.memoizedState)):r=e.updateQueue=co(i):null===i&&(i=n.updateQueue=co(r));null===i||r===i?ho(r,t):null===r.lastUpdate||null===i.lastUpdate?(ho(r,t),ho(i,t)):(ho(r,t),i.lastUpdate=t)}function yo(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=lo(e.memoizedState):mo(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function mo(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=co(t)),t}function vo(e,t,n,r,o,a){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(a,r,o):e;case 3:e.effectTag=-4097&e.effectTag|64;case 0:if(null==(o="function"==typeof(e=n.payload)?e.call(a,r,o):e))break;return i({},r,o);case 2:uo=!0}return r}function go(e,t,n,r,i){uo=!1;for(var o=(t=mo(e,t)).baseState,a=null,s=0,u=t.firstUpdate,l=o;null!==u;){var c=u.expirationTime;c<i?(null===a&&(a=u,o=l),s<c&&(s=c)):(fu(c,u.suspenseConfig),l=vo(e,0,u,l,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(c=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f<i?(null===c&&(c=u,null===a&&(o=l)),s<f&&(s=f)):(l=vo(e,0,u,l,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=l),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,hu(s),e.expirationTime=s,e.memoizedState=l}function bo(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),_o(t.firstEffect,n),t.firstEffect=t.lastEffect=null,_o(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function _o(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;if("function"!=typeof n)throw Error(a(191,n));n.call(r)}e=e.nextEffect}}var wo=I.ReactCurrentBatchConfig,To=(new r.Component).refs;function So(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var Eo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&tt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Js(),i=wo.suspense;(i=fo(r=Zs(r,e,i),i)).payload=t,null!=n&&(i.callback=n),po(e,i),eu(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Js(),i=wo.suspense;(i=fo(r=Zs(r,e,i),i)).tag=1,i.payload=t,null!=n&&(i.callback=n),po(e,i),eu(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Js(),r=wo.suspense;(r=fo(n=Zs(n,e,r),r)).tag=2,null!=t&&(r.callback=t),po(e,r),eu(e,n)}};function Co(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Jr(n,r)||!Jr(i,o))}function ko(e,t,n){var r=!1,i=fi,o=t.contextType;return"object"==typeof o&&null!==o?o=so(o):(i=mi(t)?pi:hi.current,o=(r=null!=(r=t.contextTypes))?yi(e,i):fi),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Eo,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function xo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Eo.enqueueReplaceState(t,t.state,null)}function Oo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=To;var o=t.contextType;"object"==typeof o&&null!==o?i.context=so(o):(o=mi(t)?pi:hi.current,i.context=yi(e,o)),null!==(o=e.updateQueue)&&(go(e,o,n,i,r),i.state=e.memoizedState),"function"==typeof(o=t.getDerivedStateFromProps)&&(So(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Eo.enqueueReplaceState(i,i.state,null),null!==(o=e.updateQueue)&&(go(e,o,n,i,r),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var Po=Array.isArray;function Ro(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===To&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ao(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function jo(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return(e=ju(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Du(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Ro(e,t,n),r.return=e,r):((r=Iu(n.type,n.key,n.props,null,e.mode,r)).ref=Ro(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Mu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Lu(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Du(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case M:return(n=Iu(t.type,t.key,t.props,null,e.mode,n)).ref=Ro(e,null,t),n.return=e,n;case N:return(t=Mu(t,e.mode,n)).return=e,t}if(Po(t)||X(t))return(t=Lu(t,e.mode,n,null)).return=e,t;Ao(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case M:return n.key===i?n.type===B?f(e,t,n.props.children,r,i):l(e,t,n,r):null;case N:return n.key===i?c(e,t,n,r):null}if(Po(n)||X(n))return null!==i?null:f(e,t,n,r,null);Ao(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case M:return e=e.get(null===r.key?n:r.key)||null,r.type===B?f(t,e,r.props.children,i,r.key):l(t,e,r,i);case N:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Po(r)||X(r))return f(t,e=e.get(n)||null,r,i,null);Ao(t,r)}return null}function y(i,a,s,u){for(var l=null,c=null,f=a,y=a=0,m=null;null!==f&&y<s.length;y++){f.index>y?(m=f,f=null):m=f.sibling;var v=d(i,f,s[y],u);if(null===v){null===f&&(f=m);break}e&&f&&null===v.alternate&&t(i,f),a=o(v,a,y),null===c?l=v:c.sibling=v,c=v,f=m}if(y===s.length)return n(i,f),l;if(null===f){for(;y<s.length;y++)null!==(f=h(i,s[y],u))&&(a=o(f,a,y),null===c?l=f:c.sibling=f,c=f);return l}for(f=r(i,f);y<s.length;y++)null!==(m=p(f,i,y,s[y],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?y:m.key),a=o(m,a,y),null===c?l=m:c.sibling=m,c=m);return e&&f.forEach((function(e){return t(i,e)})),l}function m(i,s,u,l){var c=X(u);if("function"!=typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var f=c=null,y=s,m=s=0,v=null,g=u.next();null!==y&&!g.done;m++,g=u.next()){y.index>m?(v=y,y=null):v=y.sibling;var b=d(i,y,g.value,l);if(null===b){null===y&&(y=v);break}e&&y&&null===b.alternate&&t(i,y),s=o(b,s,m),null===f?c=b:f.sibling=b,f=b,y=v}if(g.done)return n(i,y),c;if(null===y){for(;!g.done;m++,g=u.next())null!==(g=h(i,g.value,l))&&(s=o(g,s,m),null===f?c=g:f.sibling=g,f=g);return c}for(y=r(i,y);!g.done;m++,g=u.next())null!==(g=p(y,i,m,g.value,l))&&(e&&null!==g.alternate&&y.delete(null===g.key?m:g.key),s=o(g,s,m),null===f?c=g:f.sibling=g,f=g);return e&&y.forEach((function(e){return t(i,e)})),c}return function(e,r,o,u){var l="object"==typeof o&&null!==o&&o.type===B&&null===o.key;l&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case M:e:{for(c=o.key,l=r;null!==l;){if(l.key===c){if(7===l.tag?o.type===B:l.elementType===o.type){n(e,l.sibling),(r=i(l,o.type===B?o.props.children:o.props)).ref=Ro(e,l,o),r.return=e,e=r;break e}n(e,l);break}t(e,l),l=l.sibling}o.type===B?((r=Lu(o.props.children,e.mode,u,o.key)).return=e,e=r):((u=Iu(o.type,o.key,o.props,null,e.mode,u)).ref=Ro(e,r,o),u.return=e,e=u)}return s(e);case N:e:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Mu(o,e.mode,u)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Du(o,e.mode,u)).return=e,e=r),s(e);if(Po(o))return y(e,r,o,u);if(X(o))return m(e,r,o,u);if(c&&Ao(e,o),void 0===o&&!l)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Io=jo(!0),Lo=jo(!1),Do={},Mo={current:Do},No={current:Do},Bo={current:Do};function Uo(e){if(e===Do)throw Error(a(174));return e}function Fo(e,t){ci(Bo,t),ci(No,e),ci(Mo,Do);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ve(null,"");break;default:t=Ve(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}li(Mo),ci(Mo,t)}function Vo(e){li(Mo),li(No),li(Bo)}function Ho(e){Uo(Bo.current);var t=Uo(Mo.current),n=Ve(t,e.type);t!==n&&(ci(No,e),ci(Mo,n))}function zo(e){No.current===e&&(li(Mo),li(No))}var qo={current:0};function Wo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function $o(e,t){return{responder:e,props:t}}var Go=I.ReactCurrentDispatcher,Ko=I.ReactCurrentBatchConfig,Yo=0,Xo=null,Qo=null,Jo=null,Zo=null,ea=null,ta=null,na=0,ra=null,ia=0,oa=!1,aa=null,sa=0;function ua(){throw Error(a(321))}function la(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xr(e[n],t[n]))return!1;return!0}function ca(e,t,n,r,i,o){if(Yo=o,Xo=t,Jo=null!==e?e.memoizedState:null,Go.current=null===Jo?Pa:Ra,t=n(r,i),oa){do{oa=!1,sa+=1,Jo=null!==e?e.memoizedState:null,ta=Zo,ra=ea=Qo=null,Go.current=Ra,t=n(r,i)}while(oa);aa=null,sa=0}if(Go.current=Oa,(e=Xo).memoizedState=Zo,e.expirationTime=na,e.updateQueue=ra,e.effectTag|=ia,e=null!==Qo&&null!==Qo.next,Yo=0,ta=ea=Zo=Jo=Qo=Xo=null,na=0,ra=null,ia=0,e)throw Error(a(300));return t}function fa(){Go.current=Oa,Yo=0,ta=ea=Zo=Jo=Qo=Xo=null,na=0,ra=null,ia=0,oa=!1,aa=null,sa=0}function ha(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===ea?Zo=ea=e:ea=ea.next=e,ea}function da(){if(null!==ta)ta=(ea=ta).next,Jo=null!==(Qo=Jo)?Qo.next:null;else{if(null===Jo)throw Error(a(310));var e={memoizedState:(Qo=Jo).memoizedState,baseState:Qo.baseState,queue:Qo.queue,baseUpdate:Qo.baseUpdate,next:null};ea=null===ea?Zo=e:ea.next=e,Jo=Qo.next}return ea}function pa(e,t){return"function"==typeof t?t(e):t}function ya(e){var t=da(),n=t.queue;if(null===n)throw Error(a(311));if(n.lastRenderedReducer=e,0<sa){var r=n.dispatch;if(null!==aa){var i=aa.get(n);if(void 0!==i){aa.delete(n);var o=t.memoizedState;do{o=e(o,i.action),i=i.next}while(null!==i);return Xr(o,t.memoizedState)||(Va=!0),t.memoizedState=o,t.baseUpdate===n.last&&(t.baseState=o),n.lastRenderedState=o,[o,r]}}return[t.memoizedState,r]}r=n.last;var s=t.baseUpdate;if(o=t.baseState,null!==s?(null!==r&&(r.next=null),r=s.next):r=null!==r?r.next:null,null!==r){var u=i=null,l=r,c=!1;do{var f=l.expirationTime;f<Yo?(c||(c=!0,u=s,i=o),f>na&&hu(na=f)):(fu(f,l.suspenseConfig),o=l.eagerReducer===e?l.eagerState:e(o,l.action)),s=l,l=l.next}while(null!==l&&l!==r);c||(u=s,i=o),Xr(o,t.memoizedState)||(Va=!0),t.memoizedState=o,t.baseUpdate=u,t.baseState=i,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]}function ma(e){var t=ha();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:pa,lastRenderedState:e}).dispatch=xa.bind(null,Xo,e),[t.memoizedState,e]}function va(e){return ya(pa)}function ga(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===ra?(ra={lastEffect:null}).lastEffect=e.next=e:null===(t=ra.lastEffect)?ra.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,ra.lastEffect=e),e}function ba(e,t,n,r){var i=ha();ia|=e,i.memoizedState=ga(t,n,void 0,void 0===r?null:r)}function _a(e,t,n,r){var i=da();r=void 0===r?null:r;var o=void 0;if(null!==Qo){var a=Qo.memoizedState;if(o=a.destroy,null!==r&&la(r,a.deps))return void ga(0,n,o,r)}ia|=e,i.memoizedState=ga(t,n,o,r)}function wa(e,t){return ba(516,192,e,t)}function Ta(e,t){return _a(516,192,e,t)}function Sa(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ea(){}function Ca(e,t){return ha().memoizedState=[e,void 0===t?null:t],e}function ka(e,t){var n=da();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&la(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xa(e,t,n){if(!(25>sa))throw Error(a(301));var r=e.alternate;if(e===Xo||null!==r&&r===Xo)if(oa=!0,e={expirationTime:Yo,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===aa&&(aa=new Map),void 0===(n=aa.get(t)))aa.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{var i=Js(),o=wo.suspense;o={expirationTime:i=Zs(i,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var s=t.last;if(null===s)o.next=o;else{var u=s.next;null!==u&&(o.next=u),s.next=o}if(t.last=o,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var l=t.lastRenderedState,c=r(l,n);if(o.eagerReducer=r,o.eagerState=c,Xr(c,l))return}catch(e){}eu(e,i)}}var Oa={readContext:so,useCallback:ua,useContext:ua,useEffect:ua,useImperativeHandle:ua,useLayoutEffect:ua,useMemo:ua,useReducer:ua,useRef:ua,useState:ua,useDebugValue:ua,useResponder:ua,useDeferredValue:ua,useTransition:ua},Pa={readContext:so,useCallback:Ca,useContext:so,useEffect:wa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ba(4,36,Sa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ba(4,36,e,t)},useMemo:function(e,t){var n=ha();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ha();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=xa.bind(null,Xo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ha().memoizedState=e},useState:ma,useDebugValue:Ea,useResponder:$o,useDeferredValue:function(e,t){var n=ma(e),r=n[0],i=n[1];return wa((function(){o.unstable_next((function(){var n=Ko.suspense;Ko.suspense=void 0===t?null:t;try{i(e)}finally{Ko.suspense=n}}))}),[e,t]),r},useTransition:function(e){var t=ma(!1),n=t[0],r=t[1];return[Ca((function(t){r(!0),o.unstable_next((function(){var n=Ko.suspense;Ko.suspense=void 0===e?null:e;try{r(!1),t()}finally{Ko.suspense=n}}))}),[e,n]),n]}},Ra={readContext:so,useCallback:ka,useContext:so,useEffect:Ta,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,_a(4,36,Sa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _a(4,36,e,t)},useMemo:function(e,t){var n=da();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&la(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:ya,useRef:function(){return da().memoizedState},useState:va,useDebugValue:Ea,useResponder:$o,useDeferredValue:function(e,t){var n=va(),r=n[0],i=n[1];return Ta((function(){o.unstable_next((function(){var n=Ko.suspense;Ko.suspense=void 0===t?null:t;try{i(e)}finally{Ko.suspense=n}}))}),[e,t]),r},useTransition:function(e){var t=va(),n=t[0],r=t[1];return[ka((function(t){r(!0),o.unstable_next((function(){var n=Ko.suspense;Ko.suspense=void 0===e?null:e;try{r(!1),t()}finally{Ko.suspense=n}}))}),[e,n]),n]}},Aa=null,ja=null,Ia=!1;function La(e,t){var n=Ru(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Da(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ma(e){if(Ia){var t=ja;if(t){var n=t;if(!Da(e,t)){if(!(t=nr(n.nextSibling))||!Da(e,t))return e.effectTag=-1025&e.effectTag|2,Ia=!1,void(Aa=e);La(Aa,n)}Aa=e,ja=nr(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ia=!1,Aa=e}}function Na(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Aa=e}function Ba(e){if(e!==Aa)return!1;if(!Ia)return Na(e),Ia=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Zn(t,e.memoizedProps))for(t=ja;t;)La(e,t),t=nr(t.nextSibling);if(Na(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ja=nr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ja=null}}else ja=Aa?nr(e.stateNode.nextSibling):null;return!0}function Ua(){ja=Aa=null,Ia=!1}var Fa=I.ReactCurrentOwner,Va=!1;function Ha(e,t,n,r){t.child=null===e?Lo(t,null,n,r):Io(t,e.child,n,r)}function za(e,t,n,r,i){n=n.render;var o=t.ref;return ao(t,i),r=ca(e,t,n,r,o,i),null===e||Va?(t.effectTag|=1,Ha(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),os(e,t,i))}function qa(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||Au(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Iu(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Wa(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Jr)(i,r)&&e.ref===t.ref)?os(e,t,o):(t.effectTag|=1,(e=ju(a,r)).ref=t.ref,e.return=t,t.child=e)}function Wa(e,t,n,r,i,o){return null!==e&&Jr(e.memoizedProps,r)&&e.ref===t.ref&&(Va=!1,i<o)?os(e,t,o):Ga(e,t,n,r,o)}function $a(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ga(e,t,n,r,i){var o=mi(n)?pi:hi.current;return o=yi(t,o),ao(t,i),n=ca(e,t,n,r,o,i),null===e||Va?(t.effectTag|=1,Ha(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),os(e,t,i))}function Ka(e,t,n,r,i){if(mi(n)){var o=!0;wi(t)}else o=!1;if(ao(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),ko(t,n,r),Oo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;"object"==typeof l&&null!==l?l=so(l):l=yi(t,l=mi(n)?pi:hi.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==l)&&xo(t,a,r,l),uo=!1;var h=t.memoizedState;u=a.state=h;var d=t.updateQueue;null!==d&&(go(t,d,r,a,i),u=t.memoizedState),s!==r||h!==u||di.current||uo?("function"==typeof c&&(So(t,n,c,r),u=t.memoizedState),(s=uo||Co(t,n,s,r,h,u,l))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,s=t.memoizedProps,a.props=t.type===t.elementType?s:Qi(t.type,s),u=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=so(l):l=yi(t,l=mi(n)?pi:hi.current),(f="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==l)&&xo(t,a,r,l),uo=!1,u=t.memoizedState,h=a.state=u,null!==(d=t.updateQueue)&&(go(t,d,r,a,i),h=t.memoizedState),s!==r||u!==h||di.current||uo?("function"==typeof c&&(So(t,n,c,r),h=t.memoizedState),(c=uo||Co(t,n,s,r,u,h,l))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Ya(e,t,n,r,o,i)}function Ya(e,t,n,r,i,o){$a(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&Ti(t,n,!1),os(e,t,o);r=t.stateNode,Fa.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Io(t,e.child,null,o),t.child=Io(t,null,s,o)):Ha(e,t,s,o),t.memoizedState=r.state,i&&Ti(t,n,!0),t.child}function Xa(e){var t=e.stateNode;t.pendingContext?bi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(0,t.context,!1),Fo(e,t.containerInfo)}var Qa,Ja,Za,es={dehydrated:null,retryTime:0};function ts(e,t,n){var r,i=t.mode,o=t.pendingProps,a=qo.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),ci(qo,1&a),null===e){if(void 0!==o.fallback&&Ma(t),s){if(s=o.fallback,(o=Lu(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Lu(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=es,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=Lo(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=ju(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=ju(i,o,i.expirationTime)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=es,t.child=n,i}return n=Io(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=Lu(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Lu(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=es,t.child=o,n}return t.memoizedState=null,t.child=Io(t,e,o.children,n)}function ns(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),oo(e.return,t)}function rs(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function is(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ha(e,t,r.children,n),0!=(2&(r=qo.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ci(qo,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Wo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rs(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Wo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rs(t,!0,n,null,o,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function os(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&hu(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=ju(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ju(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function as(e){e.effectTag|=4}function ss(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function us(e){switch(e.tag){case 1:mi(e.type)&&vi();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Vo(),gi(),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return zo(e),null;case 13:return li(qo),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return li(qo),null;case 4:return Vo(),null;case 10:return io(e),null;default:return null}}function ls(e,t){return{value:e,source:t,stack:J(t)}}Qa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ja=function(e,t,n,r,o){var a=e.memoizedProps;if(a!==r){var s,u,l=t.stateNode;switch(Uo(Mo.current),e=null,n){case"input":a=ke(l,a),r=ke(l,r),e=[];break;case"option":a=je(l,a),r=je(l,r),e=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":a=Le(l,a),r=Le(l,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(l.onclick=qn)}for(s in Vn(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in l=a[s])l.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(d.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var c=r[s];if(l=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&c!==l&&(null!=c||null!=l))if("style"===s)if(l){for(u in l)!l.hasOwnProperty(u)||c&&c.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in c)c.hasOwnProperty(u)&&l[u]!==c[u]&&(n||(n={}),n[u]=c[u])}else n||(e||(e=[]),e.push(s,n)),n=c;else"dangerouslySetInnerHTML"===s?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(e=e||[]).push(s,""+c)):"children"===s?l===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(s,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(d.hasOwnProperty(s)?(null!=c&&zn(o,s),e||l===c||(e=[])):(e=e||[]).push(s,c))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&as(t)}},Za=function(e,t,n,r){n!==r&&as(t)};var cs="function"==typeof WeakSet?WeakSet:Set;function fs(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=J(n)),null!==n&&Q(n.type),t=t.value,null!==e&&1===e.tag&&Q(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function hs(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Eu(e,t)}else t.current=null}function ds(e,t){switch(t.tag){case 0:case 11:case 15:ps(2,0,t);break;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}function ps(e,t,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var r=n=n.next;do{if(0!=(r.tag&e)){var i=r.destroy;r.destroy=void 0,void 0!==i&&i()}0!=(r.tag&t)&&(i=r.create,r.destroy=i()),r=r.next}while(r!==n)}}function ys(e,t,n){switch("function"==typeof Ou&&Ou(t),t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;qi(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(e){Eu(i,e)}}e=e.next}while(e!==r)}))}break;case 1:hs(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Eu(e,t)}}(t,n);break;case 5:hs(t);break;case 4:bs(e,t,n)}}function ms(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,null!==t&&ms(t)}function vs(e){return 5===e.tag||3===e.tag||4===e.tag}function gs(e){e:{for(var t=e.return;null!==t;){if(vs(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(qe(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||vs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){var o=5===i.tag||6===i.tag;if(o){var s=o?i.stateNode:i.stateNode.instance;if(n)if(r){var u=s;s=n,8===(o=t).nodeType?o.parentNode.insertBefore(u,s):o.insertBefore(u,s)}else t.insertBefore(s,n);else r?(8===(u=t).nodeType?(o=u.parentNode).insertBefore(s,u):(o=u).appendChild(s),null!=(u=u._reactRootContainer)||null!==o.onclick||(o.onclick=qn)):t.appendChild(s)}else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function bs(e,t,n){for(var r,i,o=t,s=!1;;){if(!s){s=o.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===o.tag||6===o.tag){e:for(var u=e,l=o,c=n,f=l;;)if(ys(u,f,c),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===l)break;for(;null===f.sibling;){if(null===f.return||f.return===l)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}i?(u=r,l=o.stateNode,8===u.nodeType?u.parentNode.removeChild(l):u.removeChild(l)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(ys(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function _s(e,t){switch(t.tag){case 0:case 11:case 14:case 15:ps(4,8,t);break;case 1:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[ar]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Oe(n,r),Hn(e,i),t=Hn(e,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?Un(n,u):"dangerouslySetInnerHTML"===s?ze(n,u):"children"===s?qe(n,u):Te(n,s,u,t)}switch(e){case"input":Pe(n,r);break;case"textarea":Me(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Ie(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Ie(n,!!r.multiple,r.defaultValue,!0):Ie(n,!!r.multiple,r.multiple?[]:"",!1))}}}break;case 6:if(null===t.stateNode)throw Error(a(162));t.stateNode.nodeValue=t.memoizedProps;break;case 3:(t=t.stateNode).hydrate&&(t.hydrate=!1,kt(t.containerInfo));break;case 12:break;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Fs=Vi()),null!==n)e:for(e=n;;){if(5===e.tag)o=e.stateNode,r?"function"==typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,o.style.display=Bn("display",i));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(o=e.child.sibling).return=e,e=o;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break e;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}ws(t);break;case 19:ws(t);break;case 17:case 20:case 21:break;default:throw Error(a(163))}}function ws(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new cs),t.forEach((function(t){var r=ku.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var Ts="function"==typeof WeakMap?WeakMap:Map;function Ss(e,t,n){(n=fo(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hs||(Hs=!0,zs=r),fs(e,t)},n}function Es(e,t,n){(n=fo(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return fs(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===qs?qs=new Set([this]):qs.add(this),fs(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Cs,ks=Math.ceil,xs=I.ReactCurrentDispatcher,Os=I.ReactCurrentOwner,Ps=0,Rs=null,As=null,js=0,Is=0,Ls=null,Ds=1073741823,Ms=1073741823,Ns=null,Bs=0,Us=!1,Fs=0,Vs=null,Hs=!1,zs=null,qs=null,Ws=!1,$s=null,Gs=90,Ks=null,Ys=0,Xs=null,Qs=0;function Js(){return 0!=(48&Ps)?1073741821-(Vi()/10|0):0!==Qs?Qs:Qs=1073741821-(Vi()/10|0)}function Zs(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Hi();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Ps))return js;if(null!==n)e=Xi(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Xi(e,150,100);break;case 97:case 96:e=Xi(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Rs&&e===js&&--e,e}function eu(e,t){if(50<Ys)throw Ys=0,Xs=null,Error(a(185));if(null!==(e=tu(e,t))){var n=Hi();1073741823===t?0!=(8&Ps)&&0==(48&Ps)?ou(e):(ru(e),0===Ps&&Gi()):ru(e),0==(4&Ps)||98!==n&&99!==n||(null===Ks?Ks=new Map([[e,t]]):(void 0===(n=Ks.get(e))||n>t)&&Ks.set(e,t))}}function tu(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(Rs===i&&(hu(t),4===Is&&Uu(i,js)),Fu(i,t)),i}function nu(e){var t=e.lastExpiredTime;return 0!==t?t:Bu(e,t=e.firstPendingTime)?(t=e.lastPingedTime)>(e=e.nextKnownPendingLevel)?t:e:t}function ru(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=$i(ou.bind(null,e));else{var t=nu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Js();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==Di&&Ci(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?$i(ou.bind(null,e)):Wi(r,iu.bind(null,e),{timeout:10*(1073741821-t)-Vi()}),e.callbackNode=t}}}function iu(e,t){if(Qs=0,t)return Vu(e,t=Js()),ru(e),null;var n=nu(e);if(0!==n){if(t=e.callbackNode,0!=(48&Ps))throw Error(a(327));if(wu(),e===Rs&&n===js||uu(e,n),null!==As){var r=Ps;Ps|=16;for(var i=cu();;)try{pu();break}catch(t){lu(e,t)}if(no(),Ps=r,xs.current=i,1===Is)throw t=Ls,uu(e,n),Uu(e,n),ru(e),t;if(null===As)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Is,Rs=null,r){case 0:case 1:throw Error(a(345));case 2:Vu(e,2<n?2:n);break;case 3:if(Uu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=vu(i)),1073741823===Ds&&10<(i=Fs+500-Vi())){if(Us){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,uu(e,n);break}}if(0!==(o=nu(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=er(gu.bind(null,e),i);break}gu(e);break;case 4:if(Uu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=vu(i)),Us&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,uu(e,n);break}if(0!==(i=nu(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ms?r=10*(1073741821-Ms)-Vi():1073741823===Ds?r=0:(r=10*(1073741821-Ds)-5e3,0>(r=(i=Vi())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ks(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=er(gu.bind(null,e),r);break}gu(e);break;case 5:if(1073741823!==Ds&&null!==Ns){o=Ds;var s=Ns;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Vi()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Uu(e,n),e.timeoutHandle=er(gu.bind(null,e),r);break}}gu(e);break;default:throw Error(a(329))}if(ru(e),e.callbackNode===t)return iu.bind(null,e)}}return null}function ou(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,e.finishedExpirationTime===t)gu(e);else{if(0!=(48&Ps))throw Error(a(327));if(wu(),e===Rs&&t===js||uu(e,t),null!==As){var n=Ps;Ps|=16;for(var r=cu();;)try{du();break}catch(t){lu(e,t)}if(no(),Ps=n,xs.current=r,1===Is)throw n=Ls,uu(e,t),Uu(e,t),ru(e),n;if(null!==As)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Rs=null,gu(e),ru(e)}}return null}function au(e,t){var n=Ps;Ps|=1;try{return e(t)}finally{0===(Ps=n)&&Gi()}}function su(e,t){var n=Ps;Ps&=-2,Ps|=8;try{return e(t)}finally{0===(Ps=n)&&Gi()}}function uu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,tr(n)),null!==As)for(n=As.return;null!==n;){var r=n;switch(r.tag){case 1:var i=r.type.childContextTypes;null!=i&&vi();break;case 3:Vo(),gi();break;case 5:zo(r);break;case 4:Vo();break;case 13:case 19:li(qo);break;case 10:io(r)}n=n.return}Rs=e,As=ju(e.current,null),js=t,Is=0,Ls=null,Ms=Ds=1073741823,Ns=null,Bs=0,Us=!1}function lu(e,t){for(;;){try{if(no(),fa(),null===As||null===As.return)return Is=1,Ls=t,null;e:{var n=e,r=As.return,i=As,o=t;if(t=js,i.effectTag|=2048,i.firstEffect=i.lastEffect=null,null!==o&&"object"==typeof o&&"function"==typeof o.then){var a=o,s=0!=(1&qo.current),u=r;do{var l;if(l=13===u.tag){var c=u.memoizedState;if(null!==c)l=null!==c.dehydrated;else{var f=u.memoizedProps;l=void 0!==f.fallback&&(!0!==f.unstable_avoidThisFallback||!s)}}if(l){var h=u.updateQueue;if(null===h){var d=new Set;d.add(a),u.updateQueue=d}else h.add(a);if(0==(2&u.mode)){if(u.effectTag|=64,i.effectTag&=-2981,1===i.tag)if(null===i.alternate)i.tag=17;else{var p=fo(1073741823,null);p.tag=2,po(i,p)}i.expirationTime=1073741823;break e}o=void 0,i=t;var y=n.pingCache;if(null===y?(y=n.pingCache=new Ts,o=new Set,y.set(a,o)):void 0===(o=y.get(a))&&(o=new Set,y.set(a,o)),!o.has(i)){o.add(i);var m=Cu.bind(null,n,a,i);a.then(m,m)}u.effectTag|=4096,u.expirationTime=t;break e}u=u.return}while(null!==u);o=Error((Q(i.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+J(i))}5!==Is&&(Is=2),o=ls(o,i),u=r;do{switch(u.tag){case 3:a=o,u.effectTag|=4096,u.expirationTime=t,yo(u,Ss(u,a,t));break e;case 1:a=o;var v=u.type,g=u.stateNode;if(0==(64&u.effectTag)&&("function"==typeof v.getDerivedStateFromError||null!==g&&"function"==typeof g.componentDidCatch&&(null===qs||!qs.has(g)))){u.effectTag|=4096,u.expirationTime=t,yo(u,Es(u,a,t));break e}}u=u.return}while(null!==u)}As=mu(As)}catch(e){t=e;continue}break}}function cu(){var e=xs.current;return xs.current=Oa,null===e?Oa:e}function fu(e,t){e<Ds&&2<e&&(Ds=e),null!==t&&e<Ms&&2<e&&(Ms=e,Ns=t)}function hu(e){e>Bs&&(Bs=e)}function du(){for(;null!==As;)As=yu(As)}function pu(){for(;null!==As&&!ki();)As=yu(As)}function yu(e){var t=Cs(e.alternate,e,js);return e.memoizedProps=e.pendingProps,null===t&&(t=mu(e)),Os.current=null,t}function mu(e){As=e;do{var t=As.alternate;if(e=As.return,0==(2048&As.effectTag)){e:{var n=t,r=js,o=(t=As).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:mi(t.type)&&vi();break;case 3:Vo(),gi(),(o=t.stateNode).pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(null===n||null===n.child)&&Ba(t)&&as(t);break;case 5:zo(t),r=Uo(Bo.current);var s=t.type;if(null!==n&&null!=t.stateNode)Ja(n,t,s,o,r),n.ref!==t.ref&&(t.effectTag|=128);else if(o){var u=Uo(Mo.current);if(Ba(t)){var l=(o=t).stateNode;n=o.type;var c=o.memoizedProps,f=r;switch(l[or]=o,l[ar]=c,s=void 0,r=l,n){case"iframe":case"object":case"embed":Cn("load",r);break;case"video":case"audio":for(l=0;l<et.length;l++)Cn(et[l],r);break;case"source":Cn("error",r);break;case"img":case"image":case"link":Cn("error",r),Cn("load",r);break;case"form":Cn("reset",r),Cn("submit",r);break;case"details":Cn("toggle",r);break;case"input":xe(r,c),Cn("invalid",r),zn(f,"onChange");break;case"select":r._wrapperState={wasMultiple:!!c.multiple},Cn("invalid",r),zn(f,"onChange");break;case"textarea":De(r,c),Cn("invalid",r),zn(f,"onChange")}for(s in Vn(n,c),l=null,c)c.hasOwnProperty(s)&&(u=c[s],"children"===s?"string"==typeof u?r.textContent!==u&&(l=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(l=["children",""+u]):d.hasOwnProperty(s)&&null!=u&&zn(f,s));switch(n){case"input":Ee(r),Re(r,c,!0);break;case"textarea":Ee(r),Ne(r);break;case"select":case"option":break;default:"function"==typeof c.onClick&&(r.onclick=qn)}s=l,o.updateQueue=s,(o=null!==s)&&as(t)}else{n=t,f=s,c=o,l=9===r.nodeType?r:r.ownerDocument,u===Be&&(u=Fe(f)),u===Be?"script"===f?((c=l.createElement("div")).innerHTML="<script><\/script>",l=c.removeChild(c.firstChild)):"string"==typeof c.is?l=l.createElement(f,{is:c.is}):(l=l.createElement(f),"select"===f&&(f=l,c.multiple?f.multiple=!0:c.size&&(f.size=c.size))):l=l.createElementNS(u,f),(c=l)[or]=n,c[ar]=o,Qa(c,t),t.stateNode=c;var h=r,p=Hn(f=s,n=o);switch(f){case"iframe":case"object":case"embed":Cn("load",c),r=n;break;case"video":case"audio":for(r=0;r<et.length;r++)Cn(et[r],c);r=n;break;case"source":Cn("error",c),r=n;break;case"img":case"image":case"link":Cn("error",c),Cn("load",c),r=n;break;case"form":Cn("reset",c),Cn("submit",c),r=n;break;case"details":Cn("toggle",c),r=n;break;case"input":xe(c,n),r=ke(c,n),Cn("invalid",c),zn(h,"onChange");break;case"option":r=je(c,n);break;case"select":c._wrapperState={wasMultiple:!!n.multiple},r=i({},n,{value:void 0}),Cn("invalid",c),zn(h,"onChange");break;case"textarea":De(c,n),r=Le(c,n),Cn("invalid",c),zn(h,"onChange");break;default:r=n}Vn(f,r),l=void 0,u=f;var y=c,m=r;for(l in m)if(m.hasOwnProperty(l)){var v=m[l];"style"===l?Un(y,v):"dangerouslySetInnerHTML"===l?null!=(v=v?v.__html:void 0)&&ze(y,v):"children"===l?"string"==typeof v?("textarea"!==u||""!==v)&&qe(y,v):"number"==typeof v&&qe(y,""+v):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(d.hasOwnProperty(l)?null!=v&&zn(h,l):null!=v&&Te(y,l,v,p))}switch(f){case"input":Ee(c),Re(c,n,!1);break;case"textarea":Ee(c),Ne(c);break;case"option":null!=n.value&&c.setAttribute("value",""+we(n.value));break;case"select":(r=c).multiple=!!n.multiple,null!=(c=n.value)?Ie(r,!!n.multiple,c,!1):null!=n.defaultValue&&Ie(r,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof r.onClick&&(c.onclick=qn)}(o=Jn(s,o))&&as(t)}null!==t.ref&&(t.effectTag|=128)}else if(null===t.stateNode)throw Error(a(166));break;case 6:if(n&&null!=t.stateNode)Za(0,t,n.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(a(166));r=Uo(Bo.current),Uo(Mo.current),Ba(t)?(s=(o=t).stateNode,r=o.memoizedProps,s[or]=o,(o=s.nodeValue!==r)&&as(t)):(s=t,(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[or]=s,t.stateNode=o)}break;case 11:break;case 13:if(li(qo),o=t.memoizedState,0!=(64&t.effectTag)){t.expirationTime=r;break e}o=null!==o,s=!1,null===n?void 0!==t.memoizedProps.fallback&&Ba(t):(s=null!==(r=n.memoizedState),o||null===r||null!==(r=n.child.sibling)&&(null!==(c=t.firstEffect)?(t.firstEffect=r,r.nextEffect=c):(t.firstEffect=t.lastEffect=r,r.nextEffect=null),r.effectTag=8)),o&&!s&&0!=(2&t.mode)&&(null===n&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&qo.current)?0===Is&&(Is=3):(0!==Is&&3!==Is||(Is=4),0!==Bs&&null!==Rs&&(Uu(Rs,js),Fu(Rs,Bs)))),(o||s)&&(t.effectTag|=4);break;case 7:case 8:case 12:break;case 4:Vo();break;case 10:io(t);break;case 9:case 14:break;case 17:mi(t.type)&&vi();break;case 19:if(li(qo),null===(o=t.memoizedState))break;if(s=0!=(64&t.effectTag),null===(c=o.rendering)){if(s)ss(o,!1);else if(0!==Is||null!==n&&0!=(64&n.effectTag))for(n=t.child;null!==n;){if(null!==(c=Wo(n))){for(t.effectTag|=64,ss(o,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.effectTag|=4),null===o.lastEffect&&(t.firstEffect=null),t.lastEffect=o.lastEffect,o=r,s=t.child;null!==s;)n=o,(r=s).effectTag&=2,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,null===(c=r.alternate)?(r.childExpirationTime=0,r.expirationTime=n,r.child=null,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null):(r.childExpirationTime=c.childExpirationTime,r.expirationTime=c.expirationTime,r.child=c.child,r.memoizedProps=c.memoizedProps,r.memoizedState=c.memoizedState,r.updateQueue=c.updateQueue,n=c.dependencies,r.dependencies=null===n?null:{expirationTime:n.expirationTime,firstContext:n.firstContext,responders:n.responders}),s=s.sibling;ci(qo,1&qo.current|2),t=t.child;break e}n=n.sibling}}else{if(!s)if(null!==(n=Wo(c))){if(t.effectTag|=64,s=!0,null!==(r=n.updateQueue)&&(t.updateQueue=r,t.effectTag|=4),ss(o,!0),null===o.tail&&"hidden"===o.tailMode){null!==(t=t.lastEffect=o.lastEffect)&&(t.nextEffect=null);break}}else Vi()>o.tailExpiration&&1<r&&(t.effectTag|=64,s=!0,ss(o,!1),t.expirationTime=t.childExpirationTime=r-1);o.isBackwards?(c.sibling=t.child,t.child=c):(null!==(r=o.last)?r.sibling=c:t.child=c,o.last=c)}if(null!==o.tail){0===o.tailExpiration&&(o.tailExpiration=Vi()+500),r=o.tail,o.rendering=r,o.tail=r.sibling,o.lastEffect=t.lastEffect,r.sibling=null,o=qo.current,ci(qo,o=s?1&o|2:1&o),t=r;break e}break;case 20:case 21:break;default:throw Error(a(156,t.tag))}t=null}if(o=As,1===js||1!==o.childExpirationTime){for(s=0,r=o.child;null!==r;)(n=r.expirationTime)>s&&(s=n),(c=r.childExpirationTime)>s&&(s=c),r=r.sibling;o.childExpirationTime=s}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=As.firstEffect),null!==As.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=As.firstEffect),e.lastEffect=As.lastEffect),1<As.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=As:e.firstEffect=As,e.lastEffect=As))}else{if(null!==(t=us(As)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=As.sibling))return t;As=e}while(null!==As);return 0===Is&&(Is=5),null}function vu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function gu(e){var t=Hi();return qi(99,bu.bind(null,e,t)),null}function bu(e,t){if(wu(),0!=(48&Ps))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=vu(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Rs&&(As=Rs=null,js=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Ps;Ps|=32,Os.current=null,Xn=En;var s=Kn();if(Yn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var l=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(l&&0!==l.rangeCount){u=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{u.nodeType,f.nodeType}catch(e){u=null;break e}var h=0,d=-1,p=-1,y=0,m=0,v=s,g=null;t:for(;;){for(var b;v!==u||0!==c&&3!==v.nodeType||(d=h+c),v!==f||0!==l&&3!==v.nodeType||(p=h+l),3===v.nodeType&&(h+=v.nodeValue.length),null!==(b=v.firstChild);)g=v,v=b;for(;;){if(v===s)break t;if(g===u&&++y===c&&(d=h),g===f&&++m===l&&(p=h),null!==(b=v.nextSibling))break;g=(v=g).parentNode}v=b}u=-1===d||-1===p?null:{start:d,end:p}}else u=null}u=u||{start:0,end:0}}else u=null;Qn={focusedElem:s,selectionRange:u},En=!1,Vs=i;do{try{_u()}catch(e){if(null===Vs)throw Error(a(330));Eu(Vs,e),Vs=Vs.nextEffect}}while(null!==Vs);Vs=i;do{try{for(s=e,u=t;null!==Vs;){var _=Vs.effectTag;if(16&_&&qe(Vs.stateNode,""),128&_){var w=Vs.alternate;if(null!==w){var T=w.ref;null!==T&&("function"==typeof T?T(null):T.current=null)}}switch(1038&_){case 2:gs(Vs),Vs.effectTag&=-3;break;case 6:gs(Vs),Vs.effectTag&=-3,_s(Vs.alternate,Vs);break;case 1024:Vs.effectTag&=-1025;break;case 1028:Vs.effectTag&=-1025,_s(Vs.alternate,Vs);break;case 4:_s(Vs.alternate,Vs);break;case 8:bs(s,c=Vs,u),ms(c)}Vs=Vs.nextEffect}}catch(e){if(null===Vs)throw Error(a(330));Eu(Vs,e),Vs=Vs.nextEffect}}while(null!==Vs);if(T=Qn,w=Kn(),_=T.focusedElem,u=T.selectionRange,w!==_&&_&&_.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(_.ownerDocument.documentElement,_)){null!==u&&Yn(_)&&(w=u.start,void 0===(T=u.end)&&(T=w),"selectionStart"in _?(_.selectionStart=w,_.selectionEnd=Math.min(T,_.value.length)):(T=(w=_.ownerDocument||document)&&w.defaultView||window).getSelection&&(T=T.getSelection(),c=_.textContent.length,s=Math.min(u.start,c),u=void 0===u.end?s:Math.min(u.end,c),!T.extend&&s>u&&(c=u,u=s,s=c),c=Gn(_,s),f=Gn(_,u),c&&f&&(1!==T.rangeCount||T.anchorNode!==c.node||T.anchorOffset!==c.offset||T.focusNode!==f.node||T.focusOffset!==f.offset)&&((w=w.createRange()).setStart(c.node,c.offset),T.removeAllRanges(),s>u?(T.addRange(w),T.extend(f.node,f.offset)):(w.setEnd(f.node,f.offset),T.addRange(w))))),w=[];for(T=_;T=T.parentNode;)1===T.nodeType&&w.push({element:T,left:T.scrollLeft,top:T.scrollTop});for("function"==typeof _.focus&&_.focus(),_=0;_<w.length;_++)(T=w[_]).element.scrollLeft=T.left,T.element.scrollTop=T.top}Qn=null,En=!!Xn,Xn=null,e.current=n,Vs=i;do{try{for(_=r;null!==Vs;){var S=Vs.effectTag;if(36&S){var E=Vs.alternate;switch(T=_,(w=Vs).tag){case 0:case 11:case 15:ps(16,32,w);break;case 1:var C=w.stateNode;if(4&w.effectTag)if(null===E)C.componentDidMount();else{var k=w.elementType===w.type?E.memoizedProps:Qi(w.type,E.memoizedProps);C.componentDidUpdate(k,E.memoizedState,C.__reactInternalSnapshotBeforeUpdate)}var x=w.updateQueue;null!==x&&bo(0,x,C);break;case 3:var O=w.updateQueue;if(null!==O){if(s=null,null!==w.child)switch(w.child.tag){case 5:s=w.child.stateNode;break;case 1:s=w.child.stateNode}bo(0,O,s)}break;case 5:var P=w.stateNode;null===E&&4&w.effectTag&&Jn(w.type,w.memoizedProps)&&P.focus();break;case 6:case 4:case 12:break;case 13:if(null===w.memoizedState){var R=w.alternate;if(null!==R){var A=R.memoizedState;if(null!==A){var j=A.dehydrated;null!==j&&kt(j)}}}break;case 19:case 17:case 20:case 21:break;default:throw Error(a(163))}}if(128&S){w=void 0;var I=Vs.ref;if(null!==I){var L=Vs.stateNode;switch(Vs.tag){case 5:w=L;break;default:w=L}"function"==typeof I?I(w):I.current=w}}Vs=Vs.nextEffect}}catch(e){if(null===Vs)throw Error(a(330));Eu(Vs,e),Vs=Vs.nextEffect}}while(null!==Vs);Vs=null,Mi(),Ps=o}else e.current=n;if(Ws)Ws=!1,$s=e,Gs=t;else for(Vs=i;null!==Vs;)t=Vs.nextEffect,Vs.nextEffect=null,Vs=t;if(0===(t=e.firstPendingTime)&&(qs=null),1073741823===t?e===Xs?Ys++:(Ys=0,Xs=e):Ys=0,"function"==typeof xu&&xu(n.stateNode,r),ru(e),Hs)throw Hs=!1,e=zs,zs=null,e;return 0!=(8&Ps)||Gi(),null}function _u(){for(;null!==Vs;){var e=Vs.effectTag;0!=(256&e)&&ds(Vs.alternate,Vs),0==(512&e)||Ws||(Ws=!0,Wi(97,(function(){return wu(),null}))),Vs=Vs.nextEffect}}function wu(){if(90!==Gs){var e=97<Gs?97:Gs;return Gs=90,qi(e,Tu)}}function Tu(){if(null===$s)return!1;var e=$s;if($s=null,0!=(48&Ps))throw Error(a(331));var t=Ps;for(Ps|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:ps(128,0,n),ps(0,64,n)}}catch(t){if(null===e)throw Error(a(330));Eu(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Ps=t,Gi(),!0}function Su(e,t,n){po(e,t=Ss(e,t=ls(n,t),1073741823)),null!==(e=tu(e,1073741823))&&ru(e)}function Eu(e,t){if(3===e.tag)Su(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Su(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===qs||!qs.has(r))){po(n,e=Es(n,e=ls(t,e),1073741823)),null!==(n=tu(n,1073741823))&&ru(n);break}}n=n.return}}function Cu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Rs===e&&js===n?4===Is||3===Is&&1073741823===Ds&&Vi()-Fs<500?uu(e,js):Us=!0:Bu(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,e.finishedExpirationTime===n&&(e.finishedExpirationTime=0,e.finishedWork=null),ru(e)))}function ku(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Zs(t=Js(),e,null)),null!==(e=tu(e,t))&&ru(e)}Cs=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||di.current)Va=!0;else{if(r<n){switch(Va=!1,t.tag){case 3:Xa(t),Ua();break;case 5:if(Ho(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:mi(t.type)&&wi(t);break;case 4:Fo(t,t.stateNode.containerInfo);break;case 10:ro(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?ts(e,t,n):(ci(qo,1&qo.current),null!==(t=os(e,t,n))?t.sibling:null);ci(qo,1&qo.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return is(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),ci(qo,qo.current),!r)return null}return os(e,t,n)}Va=!1}}else Va=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=yi(t,hi.current),ao(t,n),i=ca(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,fa(),mi(r)){var o=!0;wi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var s=r.getDerivedStateFromProps;"function"==typeof s&&So(t,r,s,e),i.updater=Eo,t.stateNode=i,i._reactInternalFiber=t,Oo(t,r,e,n),t=Ya(null,t,r,!0,o,n)}else t.tag=0,Ha(null,t,i,n),t=t.child;return t;case 16:if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,o=t.tag=function(e){if("function"==typeof e)return Au(e)?1:0;if(null!=e){if((e=e.$$typeof)===q)return 11;if(e===G)return 14}return 2}(i),e=Qi(i,e),o){case 0:t=Ga(null,t,i,e,n);break;case 1:t=Ka(null,t,i,e,n);break;case 11:t=za(null,t,i,e,n);break;case 14:t=qa(null,t,i,Qi(i.type,e),r,n);break;default:throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ga(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ka(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 3:if(Xa(t),null===(r=t.updateQueue))throw Error(a(282));if(i=null!==(i=t.memoizedState)?i.element:null,go(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===i)Ua(),t=os(e,t,n);else{if((i=t.stateNode.hydrate)&&(ja=nr(t.stateNode.containerInfo.firstChild),Aa=t,i=Ia=!0),i)for(n=Lo(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ha(e,t,r,n),Ua();t=t.child}return t;case 5:return Ho(t),null===e&&Ma(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Zn(r,i)?s=null:null!==o&&Zn(r,o)&&(t.effectTag|=16),$a(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ha(e,t,s,n),t=t.child),t;case 6:return null===e&&Ma(t),null;case 13:return ts(e,t,n);case 4:return Fo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Io(t,null,r,n):Ha(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,za(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 7:return Ha(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ha(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,ro(t,o=i.value),null!==s){var u=s.value;if(0===(o=Xr(u,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!di.current){t=os(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var l=u.dependencies;if(null!==l){s=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===u.tag&&((c=fo(n,null)).tag=2,po(u,c)),u.expirationTime<n&&(u.expirationTime=n),null!==(c=u.alternate)&&c.expirationTime<n&&(c.expirationTime=n),oo(u.return,n),l.expirationTime<n&&(l.expirationTime=n);break}c=c.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}}Ha(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,ao(t,n),r=r(i=so(i,o.unstable_observedBits)),t.effectTag|=1,Ha(e,t,r,n),t.child;case 14:return o=Qi(i=t.type,t.pendingProps),qa(e,t,i,o=Qi(i.type,o),r,n);case 15:return Wa(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Qi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,mi(r)?(e=!0,wi(t)):e=!1,ao(t,n),ko(t,r,i),Oo(t,r,i,n),Ya(null,t,r,!0,e,n);case 19:return is(e,t,n)}throw Error(a(156,t.tag))};var xu=null,Ou=null;function Pu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Ru(e,t,n,r){return new Pu(e,t,n,r)}function Au(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ju(e,t){var n=e.alternate;return null===n?((n=Ru(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Iu(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Au(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case B:return Lu(n.children,i,o,t);case z:s=8,i|=7;break;case U:s=8,i|=1;break;case F:return(e=Ru(12,n,t,8|i)).elementType=F,e.type=F,e.expirationTime=o,e;case W:return(e=Ru(13,n,t,i)).type=W,e.elementType=W,e.expirationTime=o,e;case $:return(e=Ru(19,n,t,i)).elementType=$,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case V:s=10;break e;case H:s=9;break e;case q:s=11;break e;case G:s=14;break e;case K:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ru(s,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function Lu(e,t,n,r){return(e=Ru(7,e,r,t)).expirationTime=n,e}function Du(e,t,n){return(e=Ru(6,e,null,t)).expirationTime=n,e}function Mu(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Nu(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Bu(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Uu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Fu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Vu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Hu(e,t,n,r){var i=t.current,o=Js(),s=wo.suspense;o=Zs(o,i,s);e:if(n){t:{if(tt(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(mi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var l=n.type;if(mi(l)){n=_i(n,l,u);break e}}n=u}else n=fi;return null===t.context?t.context=n:t.pendingContext=n,(t=fo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),po(i,t),eu(i,o),o}function zu(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function qu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Wu(e,t){qu(e,t),(e=e.alternate)&&qu(e,t)}function $u(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:N,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Gu(e,t,n){var r=new Nu(e,t,n=null!=n&&!0===n.hydrate),i=Ru(3,null,null,2===t?7:1===t?3:0);r.current=i,i.stateNode=r,e[sr]=r.current,n&&0!==t&&function(e){var t=Ln(e);mt.forEach((function(n){Dn(n,e,t)})),vt.forEach((function(n){Dn(n,e,t)}))}(9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Ku(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Yu(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=zu(a);s.call(e)}}Hu(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Gu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"==typeof i){var u=i;i=function(){var e=zu(a);u.call(e)}}su((function(){Hu(t,a,e,i)}))}return zu(a)}function Xu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ku(t))throw Error(a(200));return $u(e,t,null,n)}ot=function(e){if(13===e.tag){var t=Xi(Js(),150,100);eu(e,t),Wu(e,t)}},at=function(e){if(13===e.tag){Js();var t=Yi++;eu(e,t),Wu(e,t)}},st=function(e){if(13===e.tag){var t=Js();eu(e,t=Zs(t,e,null)),Wu(e,t)}},ee=function(e,t,n){switch(t){case"input":if(Pe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=fr(r);if(!i)throw Error(a(90));Ce(r),Pe(r,i)}}}break;case"textarea":Me(e,n);break;case"select":null!=(t=n.value)&&Ie(e,!!n.multiple,t,!1)}},Gu.prototype.render=function(e,t){Hu(e,this._internalRoot,null,void 0===t?null:t)},Gu.prototype.unmount=function(e){Hu(null,this._internalRoot,null,void 0===e?null:e)},ae=au,se=function(e,t,n,r){var i=Ps;Ps|=4;try{return qi(98,e.bind(null,t,n,r))}finally{0===(Ps=i)&&Gi()}},ue=function(){0==(49&Ps)&&(function(){if(null!==Ks){var e=Ks;Ks=null,e.forEach((function(e,t){Vu(t,e),ru(t)})),Gi()}}(),wu())},le=function(e,t){var n=Ps;Ps|=2;try{return e(t)}finally{0===(Ps=n)&&Gi()}};var Qu,Ju,Zu={createPortal:Xu,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=it(t))?null:e.stateNode},hydrate:function(e,t,n){if(!Ku(t))throw Error(a(200));return Yu(null,e,t,!0,n)},render:function(e,t,n){if(!Ku(t))throw Error(a(200));return Yu(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){if(!Ku(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Yu(e,t,n,!1,r)},unmountComponentAtNode:function(e){if(!Ku(e))throw Error(a(40));return!!e._reactRootContainer&&(su((function(){Yu(null,null,e,!1,(function(){e._reactRootContainer=null}))})),!0)},unstable_createPortal:function(){return Xu.apply(void 0,arguments)},unstable_batchedUpdates:au,flushSync:function(e,t){if(0!=(48&Ps))throw Error(a(187));var n=Ps;Ps|=1;try{return qi(99,e.bind(null,t))}finally{Ps=n,Gi()}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[lr,cr,fr,A.injectEventPluginsByName,h,It,function(e){x(e,jt)},ie,oe,Rn,R,wu,{current:!1}]}};Ju=(Qu={findFiberByHostInstance:ur,bundleType:0,version:"16.11.0",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);xu=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Ou=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(i({},Qu,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=it(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Ju?Ju(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}));var el={default:Zu},tl=el&&Zu||el;e.exports=tl.default||tl},function(e,t,n){"use strict";e.exports=n(392)},function(e,t,n){"use strict";
|
|
47
|
-
/** @license React v0.17.0
|
|
48
|
-
* scheduler.production.min.js
|
|
49
|
-
*
|
|
50
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
51
|
-
*
|
|
52
|
-
* This source code is licensed under the MIT license found in the
|
|
53
|
-
* LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/var r,i,o,a,s;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,l=null,c=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(c,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(c,0))},i=function(e,t){l=setTimeout(e,t)},o=function(){clearTimeout(l)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var h=window.performance,d=window.Date,p=window.setTimeout,y=window.clearTimeout,m=window.requestAnimationFrame,v=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof m&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof h&&"function"==typeof h.now)t.unstable_now=function(){return h.now()};else{var g=d.now();t.unstable_now=function(){return d.now()-g}}var b=!1,_=null,w=-1,T=5,S=0;a=function(){return t.unstable_now()>=S},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):T=0<e?Math.floor(1e3/e):33.33};var E=new MessageChannel,C=E.port2;E.port1.onmessage=function(){if(null!==_){var e=t.unstable_now();S=e+T;try{_(!0,e)?C.postMessage(null):(b=!1,_=null)}catch(e){throw C.postMessage(null),e}}else b=!1},r=function(e){_=e,b||(b=!0,C.postMessage(null))},i=function(e,n){w=p((function(){e(t.unstable_now())}),n)},o=function(){y(w),w=-1}}function k(e,t){var n=e.length;e.push(t);e:for(;;){var r=Math.floor((n-1)/2),i=e[r];if(!(void 0!==i&&0<P(i,t)))break e;e[r]=t,e[n]=i,n=r}}function x(e){return void 0===(e=e[0])?null:e}function O(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,u=e[s];if(void 0!==a&&0>P(a,n))void 0!==u&&0>P(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var R=[],A=[],j=1,I=null,L=3,D=!1,M=!1,N=!1;function B(e){for(var t=x(A);null!==t;){if(null===t.callback)O(A);else{if(!(t.startTime<=e))break;O(A),t.sortIndex=t.expirationTime,k(R,t)}t=x(A)}}function U(e){if(N=!1,B(e),!M)if(null!==x(R))M=!0,r(F);else{var t=x(A);null!==t&&i(U,t.startTime-e)}}function F(e,n){M=!1,N&&(N=!1,o()),D=!0;var r=L;try{for(B(n),I=x(R);null!==I&&(!(I.expirationTime>n)||e&&!a());){var s=I.callback;if(null!==s){I.callback=null,L=I.priorityLevel;var u=s(I.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?I.callback=u:I===x(R)&&O(R),B(n)}else O(R);I=x(R)}if(null!==I)var l=!0;else{var c=x(A);null!==c&&i(U,c.startTime-n),l=!1}return l}finally{I=null,L=r,D=!1}}function V(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var H=s;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},t.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?s+u:s,a="number"==typeof a.timeout?a.timeout:V(e)}else a=V(e),u=s;return e={id:j++,callback:n,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(e.sortIndex=u,k(A,e),null===x(R)&&e===x(A)&&(N?o():N=!0,i(U,u-s))):(e.sortIndex=a,k(R,e),M||D||(M=!0,r(F))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_shouldYield=function(){var e=t.unstable_now();B(e);var n=x(R);return n!==I&&null!==I&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<I.expirationTime||a()},t.unstable_requestPaint=H,t.unstable_continueExecution=function(){M||D||(M=!0,r(F))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return x(R)},t.unstable_Profiling=null},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r;
|
|
55
|
-
/*!
|
|
56
|
-
* jQuery JavaScript Library v3.4.1
|
|
57
|
-
* https://jquery.com/
|
|
58
|
-
*
|
|
59
|
-
* Includes Sizzle.js
|
|
60
|
-
* https://sizzlejs.com/
|
|
61
|
-
*
|
|
62
|
-
* Copyright JS Foundation and other contributors
|
|
63
|
-
* Released under the MIT license
|
|
64
|
-
* https://jquery.org/license
|
|
65
|
-
*
|
|
66
|
-
* Date: 2019-05-01T21:04Z
|
|
67
|
-
*/!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],a=n.document,s=Object.getPrototypeOf,u=o.slice,l=o.concat,c=o.push,f=o.indexOf,h={},d=h.toString,p=h.hasOwnProperty,y=p.toString,m=y.call(Object),v={},g=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},b=function(e){return null!=e&&e===e.window},_={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||a).createElement("script");if(o.text=e,t)for(r in _)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[d.call(e)]||"object":typeof e}var S=function(e,t){return new S.fn.init(e,t)},E=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function C(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!g(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}S.fn=S.prototype={jquery:"3.4.1",constructor:S,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+("3.4.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==d.call(e))&&(!(t=s(e))||"function"==typeof(n=p.call(t,"constructor")&&t.constructor)&&y.call(n)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){w(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(C(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(E,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?S.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:f.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return l.apply([],a)},guid:1,support:v}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=o[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){h["[object "+t+"]"]=t.toLowerCase()}));var k=
|
|
68
|
-
/*!
|
|
69
|
-
* Sizzle CSS Selector Engine v2.3.4
|
|
70
|
-
* https://sizzlejs.com/
|
|
71
|
-
*
|
|
72
|
-
* Copyright JS Foundation and other contributors
|
|
73
|
-
* Released under the MIT license
|
|
74
|
-
* https://js.foundation/
|
|
75
|
-
*
|
|
76
|
-
* Date: 2019-04-08
|
|
77
|
-
*/
|
|
78
|
-
function(e){var t,n,r,i,o,a,s,u,l,c,f,h,d,p,y,m,v,g,b,_="sizzle"+1*new Date,w=e.document,T=0,S=0,E=ue(),C=ue(),k=ue(),x=ue(),O=function(e,t){return e===t&&(f=!0),0},P={}.hasOwnProperty,R=[],A=R.pop,j=R.push,I=R.push,L=R.slice,D=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",N="[\\x20\\t\\r\\n\\f]",B="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",U="\\["+N+"*("+B+")(?:"+N+"*([*^$|!~]?=)"+N+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+B+"))|)"+N+"*\\]",F=":("+B+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+U+")*)|.*)\\)|)",V=new RegExp(N+"+","g"),H=new RegExp("^"+N+"+|((?:^|[^\\\\])(?:\\\\.)*)"+N+"+$","g"),z=new RegExp("^"+N+"*,"+N+"*"),q=new RegExp("^"+N+"*([>+~]|"+N+")"+N+"*"),W=new RegExp(N+"|>"),$=new RegExp(F),G=new RegExp("^"+B+"$"),K={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+U),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+N+"*(even|odd|(([+-]|)(\\d*)n|)"+N+"*(?:([+-]|)"+N+"*(\\d+)|))"+N+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+N+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+N+"*((?:-\\d)?\\d*)"+N+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+N+"?|("+N+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},ae=_e((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{I.apply(R=L.call(w.childNodes),w.childNodes),R[w.childNodes.length].nodeType}catch(e){I={apply:R.length?function(e,t){j.apply(e,L.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,f,p,v,g=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&h(t),t=t||d,y)){if(11!==T&&(f=Z.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(g&&(l=g.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return I.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return I.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!x[e+" "]&&(!m||!m.test(e))&&(1!==T||"object"!==t.nodeName.toLowerCase())){if(v=e,g=t,1===T&&W.test(e)){for((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=_),s=(p=a(e)).length;s--;)p[s]="#"+c+" "+be(p[s]);v=p.join(","),g=ee.test(e)&&ve(t.parentNode)||t}try{return I.apply(r,g.querySelectorAll(v)),r}catch(t){x(e,!0)}finally{c===_&&t.removeAttribute("id")}}}return u(e.replace(H,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[_]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ye(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(p=(d=a).documentElement,y=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(d.getElementsByClassName),n.getById=ce((function(e){return p.appendChild(e).id=_,!d.getElementsByName||!d.getElementsByName(_).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&y){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&y){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&y)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=J.test(d.querySelectorAll))&&(ce((function(e){p.appendChild(e).innerHTML="<a id='"+_+"'></a><select id='"+_+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+N+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+N+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+_+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+N+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=J.test(g=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=g.call(e,"*"),g.call(e,"[s!='']:x"),v.push("!=",F)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=J.test(p.compareDocumentPosition),b=t||J.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},O=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&b(w,e)?-1:t===d||t.ownerDocument===w&&b(w,t)?1:c?D(c,e)-D(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?D(c,e)-D(c,t):0;if(i===o)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?he(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&h(e),n.matchesSelector&&y&&!x[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=g.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){x(t,!0)}return se(t,d,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!==d&&h(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==d&&h(e);var i=r.attrHandle[t.toLowerCase()],o=i&&P.call(r.attrHandle,t.toLowerCase())?i(e,t,!y):void 0;return void 0!==o?o:n.attributes||!y?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(O),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+N+")"+e+"("+N+"|$)"))&&E(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(V," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,h,d,p,y=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),g=!u&&!s,b=!1;if(m){if(o){for(;y;){for(h=t;h=h[y];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=y="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&g){for(b=(d=(l=(c=(f=(h=m)[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],h=d&&m.childNodes[d];h=++d&&h&&h[y]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){c[e]=[T,d,b];break}}else if(g&&(b=d=(l=(c=(f=(h=t)[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===b)for(;(h=++d&&h&&h[y]||(b=d=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(g&&((c=(f=h[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[T,b]),h!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[_]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=D(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(H,"$1"));return r[_]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return G.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=y?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ye(!1),disabled:ye(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return X.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,n){return[n<0?n+t:n]})),even:me((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:me((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:me((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:me((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=de(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ge(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function _e(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=S++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,h=[T,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[_]||(t[_]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return h[2]=l[2];if(c[o]=h,h[2]=e(t,n,u))return!0}return!1}}function we(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Se(e,t,n,r,i,o){return r&&!r[_]&&(r=Se(r)),i&&!i[_]&&(i=Se(i,o)),le((function(o,a,s,u){var l,c,f,h=[],d=[],p=a.length,y=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?y:Te(y,h,e,s,u),v=n?i||(o?e:p||r)?[]:a:m;if(n&&n(m,v,s,u),r)for(l=Te(v,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(v[d[c]]=!(m[d[c]]=f));if(o){if(i||e){if(i){for(l=[],c=v.length;c--;)(f=v[c])&&l.push(m[c]=f);i(null,v=[],l,u)}for(c=v.length;c--;)(f=v[c])&&(l=i?D(o,f):h[c])>-1&&(o[l]=!(a[l]=f))}}else v=Te(v===a?v.splice(p,v.length):v),i?i(null,a,v,u):I.apply(a,v)}))}function Ee(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=_e((function(e){return e===t}),s,!0),f=_e((function(e){return D(t,e)>-1}),s,!0),h=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])h=[_e(we(h),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[_]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return Se(u>1&&we(h),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(H,"$1"),n,u<i&&Ee(e.slice(u,i)),i<o&&Ee(e=e.slice(i)),i<o&&be(e))}h.push(n)}return we(h)}return ge.prototype=r.filters=r.pseudos,r.setFilters=new ge,a=se.tokenize=function(e,t){var n,i,o,a,s,u,l,c=C[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(i=z.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=q.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(H," ")}),s=s.slice(n.length)),r.filter)!(i=K[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):C(e,u).slice(0)},s=se.compile=function(e,t){var n,i=[],o=[],s=k[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=Ee(t[n]))[_]?i.push(s):o.push(s);(s=k(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,p,m,v=0,g="0",b=o&&[],_=[],w=l,S=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,C=S.length;for(c&&(l=a===d||a||c);g!==C&&null!=(f=S[g]);g++){if(i&&f){for(p=0,a||f.ownerDocument===d||(h(f),s=!y);m=e[p++];)if(m(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!m&&f)&&v--,o&&b.push(f))}if(v+=g,n&&g!==v){for(p=0;m=t[p++];)m(b,_,a,s);if(o){if(v>0)for(;g--;)b[g]||_[g]||(_[g]=A.call(u));_=Te(_)}I.apply(u,_),c&&!o&&_.length>0&&v+t.length>1&&se.uniqueSort(u)}return c&&(T=E,l=w),b};return n?le(o):o}(o,i))).selector=e}return s},u=se.select=function(e,t,n,i){var o,u,l,c,f,h="function"==typeof e&&e,d=!i&&a(e=h.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&y&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=K.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ve(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&be(u)))return I.apply(n,i),n;break}}return(h||s(e,d))(i,t,!y,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=_.split("").sort(O).join("")===_,n.detectDuplicates=!!f,h(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||fe("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||fe("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||fe(M,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(n);S.find=k,S.expr=k.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=k.uniqueSort,S.text=k.getText,S.isXMLDoc=k.isXML,S.contains=k.contains,S.escapeSelector=k.escape;var x=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},O=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},P=S.expr.match.needsContext;function R(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?S.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?S.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?S.grep(e,(function(e){return f.call(t,e)>-1!==n})):S.filter(t,e,n)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,(function(e){return 1===e.nodeType})))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter((function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return r>1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&P.test(e)?S(e):e||[],!1).length}});var I,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||I,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:a,!0)),A.test(r[1])&&S.isPlainObject(t))for(r in t)g(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,I=S(a);var D=/^(?:parents|prev(?:Until|All))/,M={children:!0,contents:!0,next:!0,prev:!0};function N(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!P.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?f.call(S(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t,n){return x(e,"parentNode",n)},next:function(e){return N(e,"nextSibling")},prev:function(e){return N(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,n){return x(e,"nextSibling",n)},prevUntil:function(e,t,n){return x(e,"previousSibling",n)},siblings:function(e){return O((e.parentNode||{}).firstChild,e)},children:function(e){return O(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(R(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},(function(e,t){S.fn[e]=function(n,r){var i=S.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=S.filter(r,i)),this.length>1&&(M[e]||S.uniqueSort(i),D.test(e)&&i.reverse()),this.pushStack(i)}}));var B=/[^\x20\t\r\n\f]+/g;function U(e){return e}function F(e){throw e}function V(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(B)||[],(function(e,n){t[n]=!0})),t}(e):S.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){S.each(n,(function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==T(r)&&t(r)}))}(arguments),n&&!t&&u()),this},remove:function(){return S.each(arguments,(function(e,t){for(var n;(n=S.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?S.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return S.Deferred((function(n){S.each(t,(function(t,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,u=arguments,l=function(){var n,l;if(!(e<o)){if((n=r.apply(s,u))===t.promise())throw new TypeError("Thenable self-resolution");l=n&&("object"==typeof n||"function"==typeof n)&&n.then,g(l)?i?l.call(n,a(o,t,U,i),a(o,t,F,i)):(o++,l.call(n,a(o,t,U,i),a(o,t,F,i),a(o,t,U,t.notifyWith))):(r!==U&&(s=void 0,u=[n]),(i||t.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(n){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(n,c.stackTrace),e+1>=o&&(r!==F&&(s=void 0,u=[n]),t.rejectWith(s,u))}};e?c():(S.Deferred.getStackHook&&(c.stackTrace=S.Deferred.getStackHook()),n.setTimeout(c))}}return S.Deferred((function(n){t[0][3].add(a(0,n,g(i)?i:U,n.notifyWith)),t[1][3].add(a(0,n,g(e)?e:U)),t[2][3].add(a(0,n,g(r)?r:F))})).promise()},promise:function(e){return null!=e?S.extend(e,i):i}},o={};return S.each(t,(function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=u.call(arguments),o=S.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?u.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(V(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)V(i[n],a(n),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&H.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){n.setTimeout((function(){throw e}))};var z=S.Deferred();function q(){a.removeEventListener("DOMContentLoaded",q),n.removeEventListener("load",q),S.ready()}S.fn.ready=function(e){return z.then(e).catch((function(e){S.readyException(e)})),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||z.resolveWith(a,[S]))}}),S.ready.then=z.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(S.ready):(a.addEventListener("DOMContentLoaded",q),n.addEventListener("load",q));var W=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===T(n))for(s in i=!0,n)W(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},$=/^-ms-/,G=/-([a-z])/g;function K(e,t){return t.toUpperCase()}function Y(e){return e.replace($,"ms-").replace(G,K)}var X=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=S.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},X(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[Y(t)]=n;else for(r in t)i[Y(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Y(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(Y):(t=Y(t))in r?[t]:t.match(B)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var J=new Q,Z=new Q,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}Z.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Z.hasData(e)||J.hasData(e)},data:function(e,t,n){return Z.access(e,t,n)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Z.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=Y(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Z.set(this,e)})):W(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=Z.get(o,e))||void 0!==(n=ne(o,e))?n:void 0;this.each((function(){Z.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){S.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:S.Callbacks("once memory").add((function(){J.remove(e,[t+"queue",n])}))})}}),S.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?S.queue(this[0],e):void 0===t?this:this.each((function(){var n=S.queue(this,e,t);S._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&S.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){S.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=a.documentElement,se=function(e){return S.contains(e.ownerDocument,e)},ue={composed:!0};ae.getRootNode&&(se=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(ue)===e.ownerDocument});var le=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===S.css(e,"display")},ce=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};function fe(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&ie.exec(S.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var he={};function de(e){var t,n=e.ownerDocument,r=e.nodeName,i=he[r];return i||(t=n.body.appendChild(n.createElement(r)),i=S.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),he[r]=i,i)}function pe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&le(r)&&(i[o]=de(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}S.fn.extend({show:function(){return pe(this,!0)},hide:function(){return pe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){le(this)?S(this).show():S(this).hide()}))}});var ye=/^(?:checkbox|radio)$/i,me=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ve=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&R(e,t)?S.merge([e],n):n}function _e(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var we,Te,Se=/<|&#?\w+;/;function Ee(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),h=[],d=0,p=e.length;d<p;d++)if((o=e[d])||0===o)if("object"===T(o))S.merge(h,o.nodeType?[o]:o);else if(Se.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(me.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;S.merge(h,a.childNodes),(a=f.firstChild).textContent=""}else h.push(t.createTextNode(o));for(f.textContent="",d=0;o=h[d++];)if(r&&S.inArray(o,r)>-1)i&&i.push(o);else if(l=se(o),a=be(f.appendChild(o),"script"),l&&_e(a),n)for(c=0;o=a[c++];)ve.test(o.type||"")&&n.push(o);return f}we=a.createDocumentFragment().appendChild(a.createElement("div")),(Te=a.createElement("input")).setAttribute("type","radio"),Te.setAttribute("checked","checked"),Te.setAttribute("name","t"),we.appendChild(Te),v.checkClone=we.cloneNode(!0).cloneNode(!0).lastChild.checked,we.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!we.cloneNode(!0).lastChild.defaultValue;var Ce=/^key/,ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xe=/^([^.]*)(?:\.(.+)|)/;function Oe(){return!0}function Pe(){return!1}function Re(e,t){return e===function(){try{return a.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Pe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each((function(){S.event.add(this,t,i,r,n)}))}function je(e,t,n){n?(J.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=J.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=u.call(arguments),J.set(this,t,o),r=n(this,t),this[t](),o!==(i=J.get(this,t))||r?J.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(J.set(this,t,{value:S.event.trigger(S.extend(o[0],S.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===J.get(e,t)&&S.event.add(e,t,Oe)}S.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d,p,y,m=J.get(e);if(m)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(ae,i),n.guid||(n.guid=S.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(B)||[""]).length;l--;)d=y=(s=xe.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:y,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[d])||((h=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),S.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d,p,y,m=J.hasData(e)&&J.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(B)||[""]).length;l--;)if(d=y=(s=xe.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),d){for(f=S.event.special[d]||{},h=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&y!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(e,c));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(e,p,m.handle)||S.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=S.event.fix(e),u=new Array(arguments.length),l=(J.get(this,"events")||{})[s.type]||[],c=S.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=S.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?S(i,this).index(l)>-1:S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ye.test(t.type)&&t.click&&R(t,"input")&&je(t,"click",Oe),!1},trigger:function(e){var t=this||e;return ye.test(t.type)&&t.click&&R(t,"input")&&je(t,"click"),!0},_default:function(e){var t=e.target;return ye.test(t.type)&&t.click&&R(t,"input")&&J.get(t,"click")||R(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Oe:Pe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Pe,isPropagationStopped:Pe,isImmediatePropagationStopped:Pe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Oe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Oe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Oe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ce.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&ke.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},(function(e,t){S.event.special[e]={setup:function(){return je(this,e,Re),!1},trigger:function(){return je(this,e),!0},delegateType:t}})),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||S.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),S.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Pe),this.each((function(){S.event.remove(this,e,n,t)}))}});var Ie=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ne(e,t){return R(e,"table")&&R(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ue(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)S.event.add(t,i,l[i][n]);Z.hasData(e)&&(s=Z.access(e),u=S.extend({},s),Z.set(t,u))}}function Ve(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ye.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function He(e,t,n,r){t=l.apply([],t);var i,o,a,s,u,c,f=0,h=e.length,d=h-1,p=t[0],y=g(p);if(y||h>1&&"string"==typeof p&&!v.checkClone&&De.test(p))return e.each((function(i){var o=e.eq(i);y&&(t[0]=p.call(this,i,o.html())),He(o,t,n,r)}));if(h&&(o=(i=Ee(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=S.map(be(i,"script"),Be)).length;f<h;f++)u=i,f!==d&&(u=S.clone(u,!0,!0),s&&S.merge(a,be(u,"script"))),n.call(e[f],u,f);if(s)for(c=a[a.length-1].ownerDocument,S.map(a,Ue),f=0;f<s;f++)u=a[f],ve.test(u.type||"")&&!J.access(u,"globalEval")&&S.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):w(u.textContent.replace(Me,""),u,c))}return e}function ze(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(be(r)),r.parentNode&&(n&&se(r)&&_e(be(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e.replace(Ie,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=se(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=be(s),r=0,i=(o=be(e)).length;r<i;r++)Ve(o[r],a[r]);if(t)if(n)for(o=o||be(e),a=a||be(s),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,s);return(a=be(s,"script")).length>0&&_e(a,!u&&be(e,"script")),s},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(X(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),S.fn.extend({detach:function(e){return ze(this,e,!0)},remove:function(e){return ze(this,e)},text:function(e){return W(this,(function(e){return void 0===e?S.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return He(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ne(this,e).appendChild(e)}))},prepend:function(){return He(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ne(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return He(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return He(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return S.clone(this,e,t)}))},html:function(e){return W(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!ge[(me.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(be(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return He(this,arguments,(function(t){var n=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(be(this)),n&&n.replaceChild(t,this))}),e)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){S.fn[e]=function(e){for(var n,r=[],i=S(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),S(i[a])[t](n),c.apply(r,n.get());return this.pushStack(r)}}));var qe=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),We=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},$e=new RegExp(oe.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=e.style;return(n=n||We(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||se(e)||(a=S.style(e,t)),!v.pixelBoxStyles()&&qe.test(a)&&$e.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Ke(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(l).appendChild(c);var e=n.getComputedStyle(c);r="1%"!==e.top,u=12===t(e.marginLeft),c.style.right="60%",s=36===t(e.right),i=36===t(e.width),c.style.position="absolute",o=12===t(c.offsetWidth/3),ae.removeChild(l),c=null}}function t(e){return Math.round(parseFloat(e))}var r,i,o,s,u,l=a.createElement("div"),c=a.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===c.style.backgroundClip,S.extend(v,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),o}}))}();var Ye=["Webkit","Moz","ms"],Xe=a.createElement("div").style,Qe={};function Je(e){var t=S.cssProps[e]||Qe[e];return t||(e in Xe?e:Qe[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ye.length;n--;)if((e=Ye[n]+t)in Xe)return e}(e)||e)}var Ze=/^(none|table(?!-c[ea]).+)/,et=/^--/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+oe[a]+"Width",!0,i))):(u+=S.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=S.css(e,"border"+oe[a]+"Width",!0,i):s+=S.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function ot(e,t,n){var r=We(e),i=(!v.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(qe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=Y(t),u=et.test(t),l=e.style;if(u||(t=Je(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=fe(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=Y(t);return et.test(t)||(t=Je(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],(function(e,t){S.cssHooks[t]={get:function(e,n,r){if(n)return!Ze.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,t,r):ce(e,tt,(function(){return ot(e,t,r)}))},set:function(e,n,r){var i,o=We(e),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===S.css(e,"boxSizing",!1,o),u=r?it(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-it(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),rt(0,n,u)}}})),S.cssHooks.marginLeft=Ke(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-ce(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),S.each({margin:"",padding:"",border:"Width"},(function(e,t){S.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(S.cssHooks[e+t].set=rt)})),S.fn.extend({css:function(e,t){return W(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=We(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)}),e,t,arguments.length>1)}}),S.Tween=at,at.prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}},at.prototype.init.prototype=at.prototype,at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Je(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}},at.propHooks.scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=at.prototype.init,S.fx.step={};var st,ut,lt=/^(?:toggle|show|hide)$/,ct=/queueHooks$/;function ft(){ut&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ft):n.setTimeout(ft,S.fx.interval),S.fx.tick())}function ht(){return n.setTimeout((function(){st=void 0})),st=Date.now()}function dt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(e,t,n){var r,i,o=0,a=yt.prefilters.length,s=S.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=st||ht(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},n),originalProperties:t,originalOptions:n,startTime:st||ht(),duration:n.duration,tweens:[],createTween:function(t,n){var r=S.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=Y(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=yt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return S.map(c,pt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return fe(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(B);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,h=this,d={},p=e.style,y=e.nodeType&&le(e),m=J.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],lt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(y?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;y=!0}d[r]=m&&m[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=m&&m.display)&&(l=J.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(pe([e],!0),l=e.style.display||l,c=S.css(e,"display"),pe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(h.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,d)u||(m?"hidden"in m&&(y=m.hidden):m=J.access(e,"fxshow",{display:l}),o&&(m.hidden=!y),y&&pe([e],!0),h.done((function(){for(r in y||pe([e]),J.remove(e,"fxshow"),d)S.style(e,r,d[r])}))),u=pt(y?m[r]:0,r,h),r in m||(m[r]=u.start,y&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(le).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=S.isEmptyObject(e),o=S.speed(t,n,r),a=function(){var t=yt(this,S.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=S.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ct.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||S.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=S.timers,a=r?r.length:0;for(n.finish=!0,S.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),S.each(["toggle","show","hide"],(function(e,t){var n=S.fn[t];S.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(dt(t,!0),e,r,i)}})),S.each({slideDown:dt("show"),slideUp:dt("hide"),slideToggle:dt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){S.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),st=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){ut||(ut=!0,ft())},S.fx.stop=function(){ut=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(e,t){return e=S.fx&&S.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}}))},function(){var e=a.createElement("input"),t=a.createElement("select").appendChild(a.createElement("option"));e.type="checkbox",v.checkOn=""!==e.value,v.optSelected=t.selected,(e=a.createElement("input")).value="t",e.type="radio",v.radioValue="t"===e.value}();var mt,vt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return W(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){S.removeAttr(this,e)}))}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&R(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(B);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=vt[t]||S.find.attr;vt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=vt[a],vt[a]=i,i=null!=n(e,t,r)?a:null,vt[a]=o),i}}));var gt=/^(?:input|select|textarea|button)$/i,bt=/^(?:a|area)$/i;function _t(e){return(e.match(B)||[]).join(" ")}function wt(e){return e.getAttribute&&e.getAttribute("class")||""}function Tt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(B)||[]}S.fn.extend({prop:function(e,t){return W(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[S.propFix[e]||e]}))}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){S.propFix[this.toLowerCase()]=this})),S.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each((function(t){S(this).addClass(e.call(this,t,wt(this)))}));if((t=Tt(e)).length)for(;n=this[u++];)if(i=wt(n),r=1===n.nodeType&&" "+_t(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=_t(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each((function(t){S(this).removeClass(e.call(this,t,wt(this)))}));if(!arguments.length)return this.attr("class","");if((t=Tt(e)).length)for(;n=this[u++];)if(i=wt(n),r=1===n.nodeType&&" "+_t(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=_t(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each((function(n){S(this).toggleClass(e.call(this,n,wt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=S(this),a=Tt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=wt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+_t(wt(n))+" ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g;S.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=g(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,S(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=S.map(i,(function(e){return null==e?"":e+""}))),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(St,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:_t(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!R(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=S.makeArray(t),a=i.length;a--;)((r=i[a]).selected=S.inArray(S.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],(function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},v.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),v.focusin="onfocusin"in n;var Et=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,r,i){var o,s,u,l,c,f,h,d,y=[r||a],m=p.call(e,"type")?e.type:e,v=p.call(e,"namespace")?e.namespace.split("."):[];if(s=d=u=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!Et.test(m+S.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[S.expando]?e:new S.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:S.makeArray(t,[e]),h=S.event.special[m]||{},i||!h.trigger||!1!==h.trigger.apply(r,t))){if(!i&&!h.noBubble&&!b(r)){for(l=h.delegateType||m,Et.test(l+m)||(s=s.parentNode);s;s=s.parentNode)y.push(s),u=s;u===(r.ownerDocument||a)&&y.push(u.defaultView||u.parentWindow||n)}for(o=0;(s=y[o++])&&!e.isPropagationStopped();)d=s,e.type=o>1?l:h.bindType||m,(f=(J.get(s,"events")||{})[e.type]&&J.get(s,"handle"))&&f.apply(s,t),(f=c&&s[c])&&f.apply&&X(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(y.pop(),t)||!X(r)||c&&g(r[m])&&!b(r)&&((u=r[c])&&(r[c]=null),S.event.triggered=m,e.isPropagationStopped()&&d.addEventListener(m,Ct),r[m](),e.isPropagationStopped()&&d.removeEventListener(m,Ct),S.event.triggered=void 0,u&&(r[c]=u)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each((function(){S.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),v.focusin||S.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){S.event.simulate(t,e.target,S.event.fix(e))};S.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}}));var kt=n.location,xt=Date.now(),Ot=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var Pt=/\[\]$/,Rt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function It(e,t,n,r){var i;if(Array.isArray(t))S.each(t,(function(t,i){n||Pt.test(e)?r(e,i):It(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==T(t))r(e,t);else for(i in t)It(e+"["+i+"]",t[i],n,r)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,(function(){i(this.name,this.value)}));else for(n in e)It(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&jt.test(this.nodeName)&&!At.test(e)&&(this.checked||!ye.test(e))})).map((function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,(function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}})):{name:t.name,value:n.replace(Rt,"\r\n")}})).get()}});var Lt=/%20/g,Dt=/#.*$/,Mt=/([?&])_=[^&]*/,Nt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:GET|HEAD)$/,Ut=/^\/\//,Ft={},Vt={},Ht="*/".concat("*"),zt=a.createElement("a");function qt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(B)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Wt(e,t,n,r){var i={},o=e===Vt;function a(s){var u;return i[s]=!0,S.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}zt.href=kt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:kt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(kt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ht,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:qt(Ft),ajaxTransport:qt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,u,l,c,f,h,d,p=S.ajaxSetup({},t),y=p.context||p,m=p.context&&(y.nodeType||y.jquery)?S(y):S.event,v=S.Deferred(),g=S.Callbacks("once memory"),b=p.statusCode||{},_={},w={},T="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Nt.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||T;return r&&r.abort(t),C(0,t),this}};if(v.promise(E),p.url=((e||p.url||kt.href)+"").replace(Ut,kt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(B)||[""],null==p.crossDomain){l=a.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=zt.protocol+"//"+zt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=S.param(p.data,p.traditional)),Wt(Ft,p,t,E),c)return E;for(h in(f=S.event&&p.global)&&0==S.active++&&S.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Bt.test(p.type),i=p.url.replace(Dt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Lt,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Ot.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Mt,"$1"),d=(Ot.test(i)?"&":"?")+"_="+xt+++d),p.url=i+d),p.ifModified&&(S.lastModified[i]&&E.setRequestHeader("If-Modified-Since",S.lastModified[i]),S.etag[i]&&E.setRequestHeader("If-None-Match",S.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ht+"; q=0.01":""):p.accepts["*"]),p.headers)E.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(y,E,p)||c))return E.abort();if(T="abort",g.add(p.complete),E.done(p.success),E.fail(p.error),r=Wt(Vt,p,t,E)){if(E.readyState=1,f&&m.trigger("ajaxSend",[E,p]),c)return E;p.async&&p.timeout>0&&(u=n.setTimeout((function(){E.abort("timeout")}),p.timeout));try{c=!1,r.send(_,C)}catch(e){if(c)throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,a,s){var l,h,d,_,w,T=t;c||(c=!0,u&&n.clearTimeout(u),r=void 0,o=s||"",E.readyState=e>0?4:0,l=e>=200&&e<300||304===e,a&&(_=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,E,a)),_=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(p,_,E,l),l?(p.ifModified&&((w=E.getResponseHeader("Last-Modified"))&&(S.lastModified[i]=w),(w=E.getResponseHeader("etag"))&&(S.etag[i]=w)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=_.state,h=_.data,l=!(d=_.error))):(d=T,!e&&T||(T="error",e<0&&(e=0))),E.status=e,E.statusText=(t||T)+"",l?v.resolveWith(y,[h,T,E]):v.rejectWith(y,[E,T,d]),E.statusCode(b),b=void 0,f&&m.trigger(l?"ajaxSuccess":"ajaxError",[E,p,l?h:d]),g.fireWith(y,[E,T]),f&&(m.trigger("ajaxComplete",[E,p]),--S.active||S.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],(function(e,t){S[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:i,data:n,success:r},S.isPlainObject(e)&&e))}})),S._evalUrl=function(e,t){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return g(e)?this.each((function(t){S(this).wrapInner(e.call(this,t))})):this.each((function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=g(e);return this.each((function(n){S(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){S(this).replaceWith(this.childNodes)})),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Kt=S.ajaxSettings.xhr();v.cors=!!Kt&&"withCredentials"in Kt,v.ajax=Kt=!!Kt,S.ajaxTransport((function(e){var t,r;if(v.cors||Kt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Gt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),S.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),S.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=S("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),a.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Yt,Xt=[],Qt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+xt++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",(function(e,t,r){var i,o,a,s=!1!==e.jsonp&&(Qt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=g(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Qt,"$1"+i):!1!==e.jsonp&&(e.url+=(Ot.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||S.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always((function(){void 0===o?S(n).removeProp(i):n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0})),"script"})),v.createHTMLDocument=((Yt=a.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Yt.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=a.implementation.createHTMLDocument("")).createElement("base")).href=a.location.href,t.head.appendChild(r)):t=a),o=!n&&[],(i=A.exec(e))?[t.createElement(i[1])]:(i=Ee([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=_t(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){S.fn[t]=function(e){return this.on(t,e)}})),S.expr.pseudos.animated=function(e){return S.grep(S.timers,(function(t){return e===t.elem})).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){S.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||ae}))}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;S.fn[e]=function(r){return W(this,(function(e,r,i){var o;if(b(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),S.each(["top","left"],(function(e,t){S.cssHooks[t]=Ke(v.pixelPosition,(function(e,n){if(n)return n=Ge(e,t),qe.test(n)?S(e).position()[t]+"px":n}))})),S.each({Height:"height",Width:"width"},(function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){S.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return W(this,(function(t,n,i){var o;return b(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?S.css(t,n,s):S.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){S.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),S.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=u.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(u.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=R,S.isFunction=g,S.isWindow=b,S.camelCase=Y,S.type=T,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},void 0===(r=function(){return S}.apply(t,[]))||(e.exports=r);var Jt=n.jQuery,Zt=n.$;return S.noConflict=function(e){return n.$===S&&(n.$=Zt),e&&n.jQuery===S&&(n.jQuery=Jt),S},i||(n.jQuery=n.$=S),S}))},function(e,t,n){e.exports=function(e,t){"use strict";e="default"in e?e.default:e,t="default"in t?t.default:t;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r=t.Radio,i=t.Radio={};i.VERSION="2.0.0",i.noConflict=function(){return t.Radio=r,this},i.DEBUG=!1,i._debugText=function(e,t,n){return e+(n?" on the "+n+" channel":"")+': "'+t+'"'},i.debugLog=function(e,t,n){i.DEBUG&&console&&console.warn&&console.warn(i._debugText(e,t,n))};var o=/\s+/;function a(e,t,n,r){var i=e[t];if(!(n&&n!==i.callback&&n!==i.callback._callback||r&&r!==i.context))return delete e[t],!0}i._eventsApi=function(t,r,i,a){if(!i)return!1;var s={};if("object"===(void 0===i?"undefined":n(i))){for(var u in i){var l=t[r].apply(t,[u,i[u]].concat(a));o.test(u)?e.extend(s,l):s[u]=l}return s}if(o.test(i)){for(var c=i.split(o),f=0,h=c.length;f<h;f++)s[c[f]]=t[r].apply(t,[c[f]].concat(a));return s}return!1},i._callHandler=function(e,t,n){var r=n[0],i=n[1],o=n[2];switch(n.length){case 0:return e.call(t);case 1:return e.call(t,r);case 2:return e.call(t,r,i);case 3:return e.call(t,r,i,o);default:return e.apply(t,n)}};var s,u,l={};function c(t){return l[t]||(l[t]=e.bind(i.log,i,t))}function f(t){return e.isFunction(t)?t:function(){return t}}e.extend(i,{log:function(t,n){if("undefined"!=typeof console){var r=e.toArray(arguments).slice(2);console.log("["+t+'] "'+n+'"',r)}},tuneIn:function(e){var t=i.channel(e);return t._tunedIn=!0,t.on("all",c(e)),this},tuneOut:function(e){var t=i.channel(e);return t._tunedIn=!1,t.off("all",c(e)),delete l[e],this}}),i.Requests={request:function(t){var n=e.toArray(arguments).slice(1),r=i._eventsApi(this,"request",t,n);if(r)return r;var o=this.channelName,a=this._requests;if(o&&this._tunedIn&&i.log.apply(this,[o,t].concat(n)),a&&(a[t]||a.default)){var s=a[t]||a.default;return n=a[t]?n:arguments,i._callHandler(s.callback,s.context,n)}i.debugLog("An unhandled request was fired",t,o)},reply:function(e,t,n){return i._eventsApi(this,"reply",e,[t,n])||(this._requests||(this._requests={}),this._requests[e]&&i.debugLog("A request was overwritten",e,this.channelName),this._requests[e]={callback:f(t),context:n||this}),this},replyOnce:function(t,n,r){if(i._eventsApi(this,"replyOnce",t,[n,r]))return this;var o=this,a=e.once((function(){return o.stopReplying(t),f(n).apply(this,arguments)}));return this.reply(t,a,r)},stopReplying:function(t,n,r){return i._eventsApi(this,"stopReplying",t)||(t||n||r?function(t,n,r,i){t||(t={});for(var o=n?[n]:e.keys(t),s=!1,u=0,l=o.length;u<l;u++)t[n=o[u]]&&a(t,n,r,i)&&(s=!0);return s}(this._requests,t,n,r)||i.debugLog("Attempted to remove the unregistered request",t,this.channelName):delete this._requests),this}},i._channels={},i.channel=function(e){if(!e)throw new Error("You must provide a name for the channel.");return i._channels[e]?i._channels[e]:i._channels[e]=new i.Channel(e)},i.Channel=function(e){this.channelName=e},e.extend(i.Channel.prototype,t.Events,i.Requests,{reset:function(){return this.off(),this.stopListening(),this.stopReplying(),this}});var h=[t.Events,i.Requests];return e.each(h,(function(t){e.each(t,(function(t,n){i[n]=function(t){return u=e.toArray(arguments).slice(1),(s=this.channel(t))[n].apply(s,u)}}))})),i.reset=function(t){var n=t?[this._channels[t]]:this._channels;e.each(n,(function(e){e.reset()}))},i}(n(3),n(10))},function(e,t,n){"use strict";var r=n(399);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n,r,i,o){var a=r||"<<anonymous>>",s=o||n;if(null==t[n])return new Error("The "+i+" `"+s+"` is required to make `"+a+"` accessible for users of assistive technologies such as screen readers.");for(var u=arguments.length,l=Array(u>5?u-5:0),c=5;c<u;c++)l[c-5]=arguments[c];return e.apply(void 0,[t,n,r,i,o].concat(l))}},e.exports=t.default},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(217),n(221),n(222),n(224),n(225),n(150),n(227),n(228),n(229),n(230),n(152),n(231),n(233),n(234),n(235),n(118),n(237),n(238),n(240),n(241),n(159),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(255),n(162),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(165),n(280),n(281),n(284),n(169),n(285),n(286),n(287),n(288),n(170),n(171),n(289),n(290),n(291),n(292),n(175),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(317),n(318),n(319),n(320),n(321),n(323),n(176),n(324),n(325);var r=n(1),i=n.n(r),o=n(0),a=n.n(o),s=n(4),u=n.n(s),l=n(56),c=n.n(l),f=n(7),h=n.n(f),d=(n(328),n(330),n(6)),p=n.n(d),y=n(205),m=n.n(y),v=n(9),g=n.n(v),b=n(131),_=n.n(b),w=n(132),T=n.n(w),S=n(206),E=n.n(S),C=n(207),k=n.n(C),x=n(68),O=n.n(x),P=n(104),R=n.n(P),A=n(102),j=n.n(A),I=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return p()(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(R.a),L=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},D=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}p()(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void r.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"totalduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void r.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"byterange"},t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),void r.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var o=L(t[1]);if(o.URI&&(n.uri=o.URI),o.BYTERANGE){var a=o.BYTERANGE.split("@"),s=a[0],u=a[1];n.byterange={},s&&(n.byterange.length=parseInt(s,10)),u&&(n.byterange.offset=parseInt(u,10))}}r.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=L(t[1]),n.attributes.RESOLUTION){var l=n.attributes.RESOLUTION.split("x"),c={};l[0]&&(c.width=parseInt(l[0],10)),l[1]&&(c.height=parseInt(l[1],10)),n.attributes.RESOLUTION=c}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}r.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=L(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))r.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=L(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void r.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=L(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);r.trigger("data",{type:"tag",data:e.slice(4)})}}}else r.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,i=e.dataParser,o=e.segment;"function"!=typeof i&&(i=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:i(e),customType:r,segment:o}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(R.a),M=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new I,t.parseStream=new D,t.lineStream.pipe(t.parseStream);var n,r,i=h()(t),o=[],a={},s=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},l=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var f=0;return t.parseStream.on("data",(function(e){var t,h;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(a.byterange=t,t.length=e.length,"offset"in e||(e.offset=f)),"offset"in e&&(a.byterange=t,t.offset=e.offset),f=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:j()(e.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,l=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes?(a.attributes||(a.attributes={}),c()(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(h={default:/yes/i.test(e.attributes.DEFAULT)}).default?h.autoselect=!0:h.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(h.language=e.attributes.LANGUAGE),e.attributes.URI&&(h.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(h.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(h.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(h.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=h}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){l+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),a.dateTimeString=e.dateTimeString,a.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data}}[e.tagType]||s).call(i)},uri:function(){a.uri=e.uri,o.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),r&&(a.key=r),a.timeline=l,n&&(a.map=n),a={}},comment:function(){},custom:function(){e.segment?(a.custom=a.custom||{},a.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}p()(t,e);var n=t.prototype;return n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(R.a),N=n(133),B=n(55),U=n.n(B),F=n(208),V=function(e){return!!e&&"object"==typeof e},H=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return"object"!=typeof n||Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):V(t[r])&&V(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},z=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},q=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},W="INVALID_NUMBER_OF_PERIOD",G="DASH_EMPTY_MANIFEST",K="DASH_INVALID_XML",Y="NO_BASE_URL",X="SEGMENT_TIME_UNSPECIFIED",Q="UNSUPPORTED_UTC_TIMING_SCHEME",J=function(e){var t=e.baseUrl,n=void 0===t?"":t,r=e.source,i=void 0===r?"":r,o=e.range,a=void 0===o?"":o,s=e.indexRange,u=void 0===s?"":s,l={uri:i,resolvedUri:O()(n||"",i)};if(a||u){var c=(a||u).split("-"),f=parseInt(c[0],10),h=parseInt(c[1],10);l.byterange={length:h-f+1,offset:f}}return l},Z={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration;return{start:0,end:Math.ceil(i/(t/r))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,o=void 0===i?1:i,a=e.duration,s=e.start,u=void 0===s?0:s,l=e.minimumUpdatePeriod,c=void 0===l?0:l,f=e.timeShiftBufferDepth,h=void 0===f?1/0:f,d=(t+n)/1e3,p=r+u,y=d+c-p,m=Math.ceil(y*o/a),v=Math.floor((d-p-h)*o/a),g=Math.floor((d-p)*o/a);return{start:Math.max(0,v),end:Math.min(m,g)}}},ee=function(e){var t=e.type,n=void 0===t?"static":t,r=e.duration,i=e.timescale,o=void 0===i?1:i,a=e.sourceDuration,s=Z[n](e),u=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}(s.start,s.end).map(function(e){return function(t,n){var r=e.duration,i=e.timescale,o=void 0===i?1:i,a=e.periodIndex,s=e.startNumber;return{number:(void 0===s?1:s)+t,duration:r/o,timeline:a,time:n*r}}}(e));if("static"===n){var l=u.length-1;u[l].duration=a-r/o*l}return u},te=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,o=e.indexRange,a=void 0===o?"":o,s=e.duration;if(!t)throw new Error(Y);var u=J({baseUrl:t,source:r.sourceURL,range:r.range}),l=J({baseUrl:t,source:t,indexRange:a});if(l.map=u,s){var c=ee(e);c.length&&(l.duration=c[0].duration,l.timeline=c[0].timeline)}else i&&(l.duration=i,l.timeline=0);return l.number=0,[l]},ne=function(e,t,n){for(var r=e.sidx.map?e.sidx.map:null,i=e.sidx.duration,o=e.timeline||0,a=e.sidx.byterange,s=a.offset+a.length,u=t.timescale,l=t.references.filter((function(e){return 1!==e.referenceType})),c=[],f=s+t.firstOffset,h=0;h<l.length;h++){var d=t.references[h],p=d.referencedSize,y=d.subsegmentDuration,m=te({baseUrl:n,timescale:u,timeline:o,periodIndex:o,duration:y,sourceDuration:i,indexRange:f+"-"+(f+p-1)})[0];r&&(m.map=r),c.push(m),f+=p}return e.segments=c,e},re=function(e){var t;return(t=e.reduce((function(e,t){var n,r=t.attributes.id+(t.attributes.lang||"");return e[r]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(n=e[r].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[r].attributes.contentProtection=t.attributes.contentProtection)):e[r]=t,e}),{}),Object.keys(t).map((function(e){return t[e]}))).map((function(e){var t,n;return e.discontinuityStarts=(t=e.segments,n="discontinuity",t.reduce((function(e,t,r){return t[n]&&e.push(r),e}),[])),e}))},ie=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e){var r=e[n];if(r.sidx){var i=r.sidx.uri+"-"+(a=r.sidx.byterange,s=void 0,s=a.offset+a.length-1,a.offset+"-"+s),o=t[i]&&t[i].sidx;r.sidx&&o&&ne(r,o,r.sidx.resolvedUri)}}var a,s;return e},oe=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,o={attributes:(t={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},ae=function(e){var t,n=e.attributes,r=e.segments;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var i=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(i.CODECS=n.codecs),{attributes:i,uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1}},se=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,o={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},ue=function(e,t,n){var r;if(void 0===n&&(n={}),!e.length)return{};var i=e[0].attributes,o=i.sourceDuration,a=i.type,s=void 0===a?"static":a,u=i.suggestedPresentationDelay,l=i.minimumUpdatePeriod,c=re(e.filter((function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType}))).map(se),f=re(e.filter((function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType}))),h=e.filter((function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType})),d={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:o,playlists:ie(c,n)};return l>=0&&(d.minimumUpdatePeriod=1e3*l),t&&(d.locations=t),"dynamic"===s&&(d.suggestedPresentationDelay=u),f.length&&(d.mediaGroups.AUDIO.audio=function(e,t){var n;void 0===t&&(t={});var r=e.reduce((function(e,r){var i=r.attributes.role&&r.attributes.role.value||"",o=r.attributes.lang||"",a="main";if(o){var s=i?" ("+i+")":"";a=""+r.attributes.lang+s}return e[a]&&e[a].playlists[0].attributes.BANDWIDTH>r.attributes.bandwidth||(e[a]={language:o,autoselect:!0,default:"main"===i,playlists:ie([oe(r)],t),uri:""},void 0===n&&"main"===i&&((n=r).default=!0)),e}),{});n||(r[Object.keys(r)[0]].default=!0);return r}(f,n)),h.length&&(d.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:ie([ae(n)],t),uri:""}),e}),{})}(h,n)),d},le=function(e,t,n){var r=e.NOW,i=e.clientOffset,o=e.availabilityStartTime,a=e.timescale,s=void 0===a?1:a,u=e.start,l=void 0===u?0:u,c=e.minimumUpdatePeriod,f=(r+i)/1e3+(void 0===c?0:c)-(o+l);return Math.ceil((f*s-t)/n)},ce=function(e,t){for(var n=e.type,r=void 0===n?"static":n,i=e.minimumUpdatePeriod,o=void 0===i?0:i,a=e.media,s=void 0===a?"":a,u=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,f=e.startNumber,h=void 0===f?1:f,d=e.periodIndex,p=[],y=-1,m=0;m<t.length;m++){var v=t[m],g=v.d,b=v.r||0,_=v.t||0;y<0&&(y=_),_&&_>y&&(y=_);var w=void 0;if(b<0){var T=m+1;w=T===t.length?"dynamic"===r&&o>0&&s.indexOf("$Number$")>0?le(e,y,g):(u*c-y)/g:(t[T].t-y)/g}else w=b+1;for(var S=h+p.length+w,E=h+p.length;E<S;)p.push({number:E,duration:g/c,time:y,timeline:d}),y+=g,E++}return p},fe=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,he=function(e,t){return e.replace(fe,function(e){return function(t,n,r,i){if("$$"===t)return"$";if(void 0===e[n])return t;var o=""+e[n];return"RepresentationID"===n?o:(i=r?parseInt(i,10):1,o.length>=i?o:""+new Array(i-o.length+1).join("0")+o)}}(t))},de=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,i=void 0===r?{sourceURL:"",range:""}:r,o=J({baseUrl:e.baseUrl,source:he(i.sourceURL,n),range:i.range});return function(e,t){return e.duration||t?e.duration?ee(e):ce(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t).map((function(t){n.Number=t.number,n.Time=t.time;var r=he(e.media||"",n);return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:O()(e.baseUrl||"",r),map:o,number:t.number}}))},pe=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r;if(!n&&!t||n&&t)throw new Error(X);var o,a=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,o=J({baseUrl:n,source:i.sourceURL,range:i.range}),a=J({baseUrl:n,source:t.media,range:t.mediaRange});return a.map=o,a}(e,t)}));return n&&(o=ee(e)),t&&(o=ce(e,t)),o.map((function(e,t){if(a[t]){var n=a[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}})).filter((function(e){return e}))},ye=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=de,t=H(r,i.template)):i.base?(n=te,t=H(r,i.base)):i.list&&(n=pe,t=H(r,i.list));var o={attributes:r};if(!n)return o;var a=n(t,i.timeline);if(t.duration){var s=t,u=s.duration,l=s.timescale,c=void 0===l?1:l;t.duration=u/c}else a.length?t.duration=a.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return o.attributes=t,o.segments=a,i.base&&t.indexRange&&(o.sidx=a[0],o.segments=[]),o},me=function(e,t){return q(e.childNodes).filter((function(e){return e.tagName===t}))},ve=function(e){return e.textContent.trim()},ge=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(o||0)+3600*parseFloat(a||0)+60*parseFloat(s||0)+parseFloat(u||0)},be={mediaPresentationDuration:function(e){return ge(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return ge(e)},suggestedPresentationDelay:function(e){return ge(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return ge(e)},start:function(e){return ge(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?ge(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},_e=function(e){return e&&e.attributes?q(e.attributes).reduce((function(e,t){var n=be[t.name]||be.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},we={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"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:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},Te=function(e,t){return t.length?z(e.map((function(e){return t.map((function(t){return O()(e,ve(t))}))}))):e},Se=function(e){var t=me(e,"SegmentTemplate")[0],n=me(e,"SegmentList")[0],r=n&&me(n,"SegmentURL").map((function(e){return H({tag:"SegmentURL"},_e(e))})),i=me(e,"SegmentBase")[0],o=n||t,a=o&&me(o,"SegmentTimeline")[0],s=n||i||t,u=s&&me(s,"Initialization")[0],l=t&&_e(t);l&&u?l.initialization=u&&_e(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:a&&me(a,"S").map((function(e){return _e(e)})),list:n&&H(_e(n),{segmentUrls:r,initialization:_e(u)}),base:i&&H(_e(i),{initialization:_e(u)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},Ee=function(e,t,n){return function(r){var i=_e(r),o=Te(t,me(r,"BaseURL")),a=me(r,"Role")[0],s={role:_e(a)},u=H(e,i,s),l=me(r,"ContentProtection").reduce((function(e,t){var n=_e(t),r=we[n.schemeIdUri];if(r){e[r]={attributes:n};var i=me(t,"cenc:pssh")[0];if(i){var o=ve(i),a=o&&j()(o);e[r].pssh=a}}return e}),{});Object.keys(l).length&&(u=H(u,{contentProtection:l}));var c=Se(r),f=me(r,"Representation"),h=H(n,c);return z(f.map(function(e,t,n){return function(r){var i=me(r,"BaseURL"),o=Te(t,i),a=H(e,_e(r)),s=Se(r);return o.map((function(e){return{segmentInfo:H(n,s),attributes:H(a,{baseUrl:e})}}))}}(u,o,h)))}},Ce=function(e,t){return function(n,r){var i=Te(t,me(n,"BaseURL")),o=_e(n),a=parseInt(o.id,10),s=U.a.isNaN(a)?r:a,u=H(e,{periodIndex:s}),l=me(n,"AdaptationSet"),c=Se(n);return z(l.map(Ee(u,i,c)))}},ke=function(e){if(""===e)throw new Error(G);var t,n,r=new F.DOMParser;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(K);return n},xe=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,o=n.NOW,a=void 0===o?Date.now():o,s=n.clientOffset,u=void 0===s?0:s,l=me(e,"Period");if(!l.length)throw new Error(W);var c=me(e,"Location"),f=_e(e),h=Te([i],me(e,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=a,f.clientOffset=u,c.length&&(f.locations=c.map(ve)),{locations:f.locations,representationInfo:z(l.map(Ce(f,h)))}}(ke(e),t),r=n.representationInfo.map(ye);return ue(r,n.locations,t.sidxMapping)},Oe=function(e){return function(e){var t=me(e,"UTCTiming")[0];if(!t)return null;var n=_e(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;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":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Q)}return n}(ke(e))},Pe=ne,Re=n(209),Ae=n.n(Re),je=n(58),Ie=n(105),Le=n(210),De=n.n(Le),Me=n(57),Ne=n(134),Be=n.n(Ne),Ue=n(20),Fe=[];var Ve=function e(t){var n,r="info",i=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",r,t)};return n=function(e,t){return function(n,r,i){var o=t.levels[r],s=new RegExp("^("+o+")$");if("log"!==n&&i.unshift(n.toUpperCase()+":"),i.unshift(e+":"),Fe){Fe.push([].concat(i));var u=Fe.length-1e3;Fe.splice(0,u>0?u:0)}if(a.a.console){var l=a.a.console[n];l||"debug"!==n||(l=a.a.console.info||a.a.console.log),l&&o&&s.test(n)&&l[Array.isArray(i)?"apply":"call"](a.a.console,i)}}}(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(i.history=function(){return Fe?[].concat(Fe):[]}).filter=function(e){return(Fe||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){Fe&&(Fe.length=0)},i.history.disable=function(){null!==Fe&&(Fe.length=0,Fe=null)},i.history.enable=function(){null===Fe&&(Fe=[])},i.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",r,t)},i.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",r,t)},i.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",r,t)},i}("VIDEOJS"),He=Ve.createLogger,ze=Object.prototype.toString,qe=function(e){return Ge(e)?Object.keys(e):[]};function We(e,t){qe(e).forEach((function(n){return t(e[n],n)}))}function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?c.a.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&We(t,(function(t,n){e[n]=t}))})),e)}function Ge(e){return!!e&&"object"==typeof e}function Ke(e){return Ge(e)&&"[object Object]"===ze.call(e)&&e.constructor===Object}function Ye(e,t){if(!e||!t)return"";if("function"==typeof a.a.getComputedStyle){var n=a.a.getComputedStyle(e);return n?n.getPropertyValue(t)||n[t]:""}return""}function Xe(e){return"string"==typeof e&&Boolean(e.trim())}function Qe(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Je(){return u.a===a.a.document}function Ze(e){return Ge(e)&&1===e.nodeType}function et(){try{return a.a.parent!==a.a.self}catch(e){return!0}}function tt(e){return function(t,n){if(!Xe(t))return u.a[e](null);Xe(n)&&(n=u.a.querySelector(n));var r=Ze(n)?n:u.a;return r[e]&&r[e](t)}}function nt(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=u.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Ve.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),i.setAttribute(e,n)):"textContent"===e?rt(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&Tt(i,r),i}function rt(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function it(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ot(e,t){return Qe(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function at(e,t){return e.classList?e.classList.add(t):ot(e,t)||(e.className=(e.className+" "+t).trim()),e}function st(e,t){return e.classList?e.classList.remove(t):(Qe(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function ut(e,t,n){var r=ot(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?at(e,t):st(e,t),e}function lt(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function ct(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var o=r[i].name,a=r[i].value;"boolean"!=typeof e[o]&&-1===n.indexOf(","+o+",")||(a=null!==a),t[o]=a}return t}function ft(e,t){return e.getAttribute(t)}function ht(e,t,n){e.setAttribute(t,n)}function dt(e,t){e.removeAttribute(t)}function pt(){u.a.body.focus(),u.a.onselectstart=function(){return!1}}function yt(){u.a.onselectstart=function(){return!0}}function mt(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(Ye(e,"height"))),n.width||(n.width=parseFloat(Ye(e,"width"))),n}}function vt(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};var t=e.offsetWidth,n=e.offsetHeight,r=0,i=0;do{r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent}while(e);return{left:r,top:i,width:t,height:n}}function gt(e,t){var n={},r=vt(t.target),i=vt(e),o=i.width,a=i.height,s=t.offsetY-(i.top-r.top),u=t.offsetX-(i.left-r.left);return t.changedTouches&&(u=t.changedTouches[0].pageX-i.left,s=t.changedTouches[0].pageY+i.top),n.y=1-Math.max(0,Math.min(1,s/a)),n.x=Math.max(0,Math.min(1,u/o)),n}function bt(e){return Ge(e)&&3===e.nodeType}function _t(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function wt(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),Ze(e)||bt(e)?e:"string"==typeof e&&/\S/.test(e)?u.a.createTextNode(e):void 0})).filter((function(e){return e}))}function Tt(e,t){return wt(t).forEach((function(t){return e.appendChild(t)})),e}function St(e,t){return Tt(_t(e),t)}function Et(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var Ct,kt=tt("querySelector"),xt=tt("querySelectorAll"),Ot=Object.freeze({__proto__:null,isReal:Je,isEl:Ze,isInFrame:et,createEl:nt,textContent:rt,prependTo:it,hasClass:ot,addClass:at,removeClass:st,toggleClass:ut,setAttributes:lt,getAttributes:ct,getAttribute:ft,setAttribute:ht,removeAttribute:dt,blockTextSelection:pt,unblockTextSelection:yt,getBoundingClientRect:mt,findPosition:vt,getPointerPosition:gt,isTextNode:bt,emptyEl:_t,normalizeContent:wt,appendContent:Tt,insertContent:St,isSingleLeftClick:Et,$:kt,$$:xt}),Pt=!1,Rt=function(){if(Je()&&!1!==Ct.options.autoSetup){var e=Array.prototype.slice.call(u.a.getElementsByTagName("video")),t=Array.prototype.slice.call(u.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(u.a.getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,o=r.length;i<o;i++){var a=r[i];if(!a||!a.getAttribute){At(1);break}void 0===a.player&&null!==a.getAttribute("data-setup")&&Ct(a)}else Pt||At(1)}};function At(e,t){t&&(Ct=t),a.a.setTimeout(Rt,e)}function jt(){Pt=!0,a.a.removeEventListener("load",jt)}Je()&&("complete"===u.a.readyState?jt():a.a.addEventListener("load",jt));var It,Lt=function(e){var t=u.a.createElement("style");return t.className=e,t},Dt=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Mt=3;function Nt(){return Mt++}a.a.WeakMap||(It=function(){function e(){this.vdata="vdata"+Math.floor(a.a.performance&&a.a.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||Nt();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];Ve("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var Bt,Ut=a.a.WeakMap?new WeakMap:new It;function Ft(e,t){if(Ut.has(e)){var n=Ut.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Ut.delete(e)}}function Vt(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function Ht(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||a.a.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||u.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=u.a.documentElement,s=u.a.body;e.pageX=e.clientX+(o&&o.scrollLeft||s&&s.scrollLeft||0)-(o&&o.clientLeft||s&&s.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||s&&s.scrollTop||0)-(o&&o.clientTop||s&&s.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var zt=["touchstart","touchmove"];function qt(e,t,n){if(Array.isArray(t))return Vt(qt,e,t,n);Ut.has(e)||Ut.set(e,{});var r=Ut.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=Nt()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=Ht(t);var i=r.handlers[t.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a<s&&!t.isImmediatePropagationStopped();a++)try{o[a].call(e,t,n)}catch(e){Ve.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;(function(){if("boolean"!=typeof Bt){Bt=!1;try{var e=Object.defineProperty({},"passive",{get:function(){Bt=!0}});a.a.addEventListener("test",null,e),a.a.removeEventListener("test",null,e)}catch(e){}}return Bt})()&&zt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function Wt(e,t,n){if(Ut.has(e)){var r=Ut.get(e);if(r.handlers){if(Array.isArray(t))return Vt(Wt,e,t,n);var i=function(e,t){r.handlers[t]=[],Ft(e,t)};if(void 0!==t){var o=r.handlers[t];if(o)if(n){if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);Ft(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function $t(e,t,n){var r=Ut.has(e)?Ut.get(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Ht(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)$t.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){Ut.has(t.target)||Ut.set(t.target,{});var o=Ut.get(t.target);t.target[t.type]&&(o.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),o.disabled=!1)}return!t.defaultPrevented}function Gt(e,t,n){if(Array.isArray(t))return Vt(Gt,e,t,n);var r=function r(){Wt(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Nt(),qt(e,t,r)}function Kt(e,t,n){var r=function r(){Wt(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Nt(),qt(e,t,r)}var Yt,Xt=Object.freeze({__proto__:null,fixEvent:Ht,on:qt,off:Wt,trigger:$t,one:Gt,any:Kt}),Qt=function(e,t,n){t.guid||(t.guid=Nt());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},Jt=function(e,t){var n=a.a.performance.now();return function(){var r=a.a.performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},Zt=function(){};Zt.prototype.allowedEvents_={},Zt.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},qt(this,e,t),this.addEventListener=n},Zt.prototype.addEventListener=Zt.prototype.on,Zt.prototype.off=function(e,t){Wt(this,e,t)},Zt.prototype.removeEventListener=Zt.prototype.off,Zt.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Gt(this,e,t),this.addEventListener=n},Zt.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Kt(this,e,t),this.addEventListener=n},Zt.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Ht(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),$t(this,e)},Zt.prototype.dispatchEvent=Zt.prototype.trigger,Zt.prototype.queueTrigger=function(e){var t=this;Yt||(Yt=new Map);var n=e.type||e,r=Yt.get(this);r||(r=new Map,Yt.set(this,r));var i=r.get(n);r.delete(n),a.a.clearTimeout(i);var o=a.a.setTimeout((function(){0===r.size&&(r=null,Yt.delete(t)),t.trigger(e)}),0);r.set(n,o)};var en=function(e){return e instanceof Zt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},tn=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},nn=function(e){if(!e.nodeName&&!en(e))throw new Error("Invalid target; must be a DOM node or evented object.")},rn=function(e){if(!tn(e))throw new Error("Invalid event type; must be a non-empty string or array.")},on=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},an=function(e,t){var n,r,i,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return o?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],i=t[1]):(n=t[0],r=t[1],i=t[2]),nn(n),rn(r),on(i),{isTargetingSelf:o,target:n,type:r,listener:i=Qt(e,i)}},sn=function(e,t,n,r){nn(e),e.nodeName?Xt[t](e,n,r):e[t](n,r)},un={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=an(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(sn(a,"on",s,u),!o){var l=function(){return e.off(a,s,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,sn(this,"on","dispose",l),sn(a,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=an(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)sn(a,"one",s,u);else{var l=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,sn(a,"one",s,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=an(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)sn(a,"any",s,u);else{var l=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,sn(a,"any",s,l)}},off:function(e,t,n){if(!e||tn(e))Wt(this.eventBusEl_,e,t);else{var r=e,i=t;nn(r),rn(i),on(n),n=Qt(this,n),this.off("dispose",n),r.nodeName?(Wt(r,i,n),Wt(r,"dispose",n)):en(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){return $t(this.eventBusEl_,e,t)}};function ln(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=nt("span",{className:"vjs-event-bus"});return $e(e,un),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),a.a.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var cn={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),We(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&en(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function fn(e,t){return $e(e,cn),e.state=$e({},e.state,t),"function"==typeof e.handleStateChanged&&en(e)&&e.on("statechanged",e.handleStateChanged),e}var hn=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},dn=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function pn(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&We(t,(function(t,n){Ke(t)?(Ke(e[n])||(e[n]={}),e[n]=pn(e[n],t)):e[n]=t}))})),e}var yn=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},e}(),mn=a.a.Map?a.a.Map:yn,vn=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var n in this.set_)e.call(t,n,n,this)},e}(),gn=a.a.Set?a.a.Set:vn,bn=function(){function e(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=pn({},this.options_),t=this.options_=pn(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+Nt()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(ln(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),fn(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new gn,this.setIntervalIds_=new gn,this.rafIds_=new gn,this.namedRafs_=new mn,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Ut.has(this.el_)&&Ut.delete(this.el_),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=pn(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return nt(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[e]?u=o[e]:s&&s[e]&&(u=s[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),u},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var i,o;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof t){o=dn(t);var a=n.componentClass||o;n.name=o;var s=e.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=t;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(o=o||i.name&&dn(i.name()))&&(this.childNameIndex_[o]=i,this.childNameIndex_[hn(o)]=i),"function"==typeof i.el&&i.el()){var u=null;this.children_[r+1]&&(this.children_[r+1].el_?u=this.children_[r+1].el_:Ze(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[dn(e.name())]=null,this.childNameIndex_[hn(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,o=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r,i;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||dn(t.name));return n&&!o.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var o=t.addChild(n,r);o&&(t[n]=o)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return kt(e,t||this.contentEl())},t.$$=function(e,t){return xt(e,t||this.contentEl())},t.hasClass=function(e){return ot(this.el_,e)},t.addClass=function(e){at(this.el_,e)},t.removeClass=function(e){st(this.el_,e)},t.toggleClass=function(e,t){ut(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return ft(this.el_,e)},t.setAttribute=function(e,t){ht(this.el_,e,t)},t.removeAttribute=function(e){dt(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+dn(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=Ye(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+dn(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=a.a.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,i=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===e)&&(a.a.performance.now()-t<200&&(r.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Qt(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,r=this;return e=Qt(this,e),this.clearTimersOnDispose_(),n=a.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),a.a.clearTimeout(e)),e},t.setInterval=function(e,t){e=Qt(this,e),this.clearTimersOnDispose_();var n=a.a.setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),a.a.clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Qt(this,e),t=a.a.requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Qt(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),a.a.cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r,i=e.getComponent("Tech"),o=i&&i.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(o||!a)throw r=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+r+".");t=dn(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var u=s.players,l=Object.keys(u);if(u&&l.length>0&&l.map((function(e){return u[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[hn(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();bn.prototype.supportsRaf_="function"==typeof a.a.requestAnimationFrame&&"function"==typeof a.a.cancelAnimationFrame,bn.registerComponent("Component",bn);var _n,wn=a.a.navigator&&a.a.navigator.userAgent||"",Tn=/AppleWebKit\/([\d.]+)/i.exec(wn),Sn=Tn?parseFloat(Tn.pop()):null,En=/iPod/i.test(wn),Cn=(_n=wn.match(/OS (\d+)_/i))&&_n[1]?_n[1]:null,kn=/Android/i.test(wn),xn=function(){var e=wn.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),On=kn&&xn<5&&Sn<537,Pn=/Firefox/i.test(wn),Rn=/Edg/i.test(wn),An=!Rn&&(/Chrome/i.test(wn)||/CriOS/i.test(wn)),jn=function(){var e=wn.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),In=function(){var e=/MSIE\s(\d+)\.\d/.exec(wn),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(wn)&&/rv:11.0/.test(wn)&&(t=11),t}(),Ln=/Safari/i.test(wn)&&!An&&!kn&&!Rn,Dn=/Windows/i.test(wn),Mn=Boolean(Je()&&("ontouchstart"in a.a||a.a.navigator.maxTouchPoints||a.a.DocumentTouch&&a.a.document instanceof a.a.DocumentTouch)),Nn=/iPad/i.test(wn)||Ln&&Mn&&!/iPhone/i.test(wn),Bn=/iPhone/i.test(wn)&&!Nn,Un=Bn||Nn||En,Fn=(Ln||Un)&&!An,Vn=Object.freeze({__proto__:null,IS_IPOD:En,IOS_VERSION:Cn,IS_ANDROID:kn,ANDROID_VERSION:xn,IS_NATIVE_ANDROID:On,IS_FIREFOX:Pn,IS_EDGE:Rn,IS_CHROME:An,CHROME_VERSION:jn,IE_VERSION:In,IS_SAFARI:Ln,IS_WINDOWS:Dn,TOUCH_ENABLED:Mn,IS_IPAD:Nn,IS_IPHONE:Bn,IS_IOS:Un,IS_ANY_SAFARI:Fn});function Hn(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function zn(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Hn.bind(null,"start",0,e),end:Hn.bind(null,"end",1,e)}}function qn(e,t){return Array.isArray(e)?zn(e):void 0===e||void 0===t?zn():zn([[e,t]])}function Wn(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=qn(0,0));for(var o=0;o<e.length;o++)n=e.start(o),(r=e.end(o))>t&&(r=t),i+=r-n;return i/t}for(var $n,Gn={prefixed:!0},Kn=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Yn=Kn[0],Xn=0;Xn<Kn.length;Xn++)if(Kn[Xn][1]in u.a){$n=Kn[Xn];break}if($n){for(var Qn=0;Qn<$n.length;Qn++)Gn[Yn[Qn]]=$n[Qn];Gn.prefixed=$n[0]!==Yn[0]}function Jn(e){if(e instanceof Jn)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:Ge(e)&&("number"==typeof e.code&&(this.code=e.code),$e(this,e)),this.message||(this.message=Jn.defaultMessages[this.code]||"")}Jn.prototype.code=0,Jn.prototype.message="",Jn.prototype.status=null,Jn.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Jn.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Zn=0;Zn<Jn.errorTypes.length;Zn++)Jn[Jn.errorTypes[Zn]]=Zn,Jn.prototype[Jn.errorTypes[Zn]]=Zn;function er(e){return null!=e&&"function"==typeof e.then}function tr(e){er(e)&&e.then(null,(function(e){}))}var nr=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},rr=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=nr(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(nr))},ir=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},or=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=nt("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=nt("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),rt(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),St(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),_t(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=u.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),g.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(g.a.isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}u.a.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof a.a.HTMLAnchorElement||e instanceof a.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof a.a.HTMLInputElement||e instanceof a.a.HTMLSelectElement||e instanceof a.a.HTMLTextAreaElement||e instanceof a.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof a.a.HTMLIFrameElement||e instanceof a.a.HTMLObjectElement||e instanceof a.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(bn);or.prototype.options_={pauseOnOpen:!0,temporary:!0},bn.registerComponent("ModalDialog",or);var ar=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(h()(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}p()(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},en(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(Zt);for(var sr in ar.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},ar.prototype.allowedEvents_)ar.prototype["on"+sr]=null;var ur=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},lr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){ur(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}p()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&ur(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,ur(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(ar),cr=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},fr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){cr(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(h()(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}p()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&cr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,cr(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(ar),hr=function(e){function t(){return e.apply(this,arguments)||this}p()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(ar),dr=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),pr=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),yr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},mr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},vr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},gr={disabled:"disabled",hidden:"hidden",showing:"showing"},br=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+Nt(),kind:t.kind||"",language:t.language||""},i=t.label||"",o=function(e){Object.defineProperty(h()(n),e,{get:function(){return r[e]},set:function(){}})};for(var a in r)o(a);return Object.defineProperty(h()(n),"label",{get:function(){return i},set:function(e){e!==i&&(i=e,this.trigger("labelchange"))}}),n}return p()(t,e),t}(Zt),_r=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=u.a.createElement("a");n.href=e;var r,i=""===n.host&&"file:"!==n.protocol;i&&((r=u.a.createElement("div")).innerHTML='<a href="'+e+'"></a>',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),u.a.body.appendChild(r));for(var o={},s=0;s<t.length;s++)o[t[s]]=n[t[s]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=a.a.location.protocol),i&&u.a.body.removeChild(r),o},wr=function(e){if(!e.match(/^https?:\/\//)){var t=u.a.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},Tr=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},Sr=function(e,t){void 0===t&&(t=a.a.location);var n=_r(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Er=Object.freeze({__proto__:null,parseUrl:_r,getAbsoluteURL:wr,getFileExtension:Tr,isCrossOrigin:Sr}),Cr=function(e,t){var n=new a.a.WebVTT.Parser(a.a,a.a.vttjs,a.a.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(a.a.console&&a.a.console.groupCollapsed&&a.a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return Ve.error(e)})),a.a.console&&a.a.console.groupEnd&&a.a.console.groupEnd()),n.flush()},kr=function(e,t){var n={uri:e},r=Sr(e);r&&(n.cors=r);var i="use-credentials"===t.tech_.crossOrigin();i&&(n.withCredentials=i),_()(n,Qt(this,(function(e,n,r){if(e)return Ve.error(e,n);t.loaded_=!0,"function"!=typeof a.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return Cr(r,t);Ve.error("vttjs failed to load, stopping trying to process "+t.src)})):Cr(r,t)})))},xr=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=pn(t,{kind:vr[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=gr[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var a=new pr(n.cues_),s=new pr(n.activeCues_),u=!1,l=Qt(h()(n),(function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)}));return"disabled"!==i&&n.tech_.ready((function(){n.tech_.on("timeupdate",l)}),!0),Object.defineProperties(h()(n),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return i},set:function(e){var t=this;gr[e]&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||kr(this.src,this),"disabled"!==i?this.tech_.ready((function(){t.tech_.on("timeupdate",l)}),!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=e&&i.endTime>=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var o=0;o<t.length;o++)-1===this.activeCues_.indexOf(t[o])&&(u=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||o||"subtitles"!==r.kind&&"captions"!==r.kind)&&kr(n.src,h()(n))):n.loaded_=!0,n}p()(t,e);var n=t.prototype;return n.addCue=function(e){var t=e;if(a.a.vttjs&&!(e instanceof a.a.vttjs.VTTCue)){for(var n in t=new a.a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(br);xr.prototype.allowedEvents_={cuechange:"cuechange"};var Or=function(e){function t(t){var n;void 0===t&&(t={});var r=pn(t,{kind:mr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(h()(n),"enabled",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return p()(t,e),t}(br),Pr=function(e){function t(t){var n;void 0===t&&(t={});var r=pn(t,{kind:yr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(h()(n),"selected",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return p()(t,e),t}(br),Rr=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new xr(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(h()(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:h()(n)})})),n}return p()(t,e),t}(Zt);Rr.prototype.allowedEvents_={load:"load"},Rr.NONE=0,Rr.LOADING=1,Rr.LOADED=2,Rr.ERROR=3;var Ar={audio:{ListClass:lr,TrackClass:Or,capitalName:"Audio"},video:{ListClass:fr,TrackClass:Pr,capitalName:"Video"},text:{ListClass:hr,TrackClass:xr,capitalName:"Text"}};Object.keys(Ar).forEach((function(e){Ar[e].getterName=e+"Tracks",Ar[e].privateName=e+"Tracks_"}));var jr={remoteText:{ListClass:hr,TrackClass:xr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:dr,TrackClass:Rr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ir=c()({},Ar,jr);jr.names=Object.keys(jr),Ar.names=Object.keys(Ar),Ir.names=[].concat(jr.names).concat(Ar.names);var Lr=function(e){function t(t,n){var r;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(r=e.call(this,null,t,n)||this).hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Ir.names.forEach((function(e){var n=Ir[e];t&&t[n.getterName]&&(r[n.privateName]=t[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==t.preloadTextTracks,r.autoRemoteTextTracks_=new Ir.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}p()(t,e);var n=t.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Qt(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return qn(0,0)},n.bufferedPercent=function(){return Wn(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(Ar.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new Jn(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?qn(0,0):qn()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Ar.names.forEach((function(t){var n=Ar[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var e=this;if(!a.a.WebVTT)if(u.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&Ke(T.a)&&Object.keys(T.a).length>0)return void this.trigger("vttjsloaded");var t=u.a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),a.a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return e.trigger("texttrackchange")},a=function(){o();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",o)}}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var o=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var a=new Ir.text.TrackClass(i);return o.addTrack(a),a}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=pn(e,{tech:this});return new jr.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(Ve.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||a.a.Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=dn(e),t.techs_[e]=n,t.techs_[hn(e)]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=dn(e),a.a&&a.a.videojs&&a.a.videojs[e]?(Ve.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),a.a.videojs[e]):void 0)},t}(bn);Ir.names.forEach((function(e){var t=Ir[e];Lr.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Lr.prototype.featuresVolumeControl=!0,Lr.prototype.featuresMuteControl=!0,Lr.prototype.featuresFullscreenResize=!1,Lr.prototype.featuresPlaybackRate=!1,Lr.prototype.featuresProgressEvents=!1,Lr.prototype.featuresSourceset=!1,Lr.prototype.featuresTimeupdateEvents=!1,Lr.prototype.featuresNativeTextTracks=!1,Lr.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:Ve.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},bn.registerComponent("Tech",Lr),Lr.registerTech("Tech",Lr),Lr.defaultTechOrder_=[];var Dr={},Mr={},Nr={};function Br(e,t,n){e.setTimeout((function(){return function e(t,n,r,i,o,a){void 0===t&&(t={});void 0===n&&(n=[]);void 0===o&&(o=[]);void 0===a&&(a=!1);var s=n,u=s[0],l=s.slice(1);if("string"==typeof u)e(t,Dr[u],r,i,o,a);else if(u){var c=function(e,t){var n=Mr[e.id()],r=null;if(null==n)return r=t(e),Mr[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1];a===t&&(r=s)}null===r&&(r=t(e),n.push([t,r]));return r}(i,u);if(!c.setSource)return o.push(c),e(t,l,r,i,o,a);c.setSource($e({},t),(function(n,s){if(n)return e(t,l,r,i,o,a);o.push(c),e(s,t.type===s.type?l:Dr[s.type],r,i,o,a)}))}else l.length?e(t,l,r,i,o,a):a?r(t,o):e(t,Dr["*"],r,i,o,!0)}(t,Dr[t.type],n,e)}),1)}function Ur(e,t,n,r){void 0===r&&(r=null);var i="call"+dn(n),o=e.reduce(zr(i),r),a=o===Nr,s=a?null:t[n](o);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var o=e[i];o[t]&&o[t](r,n)}}(e,n,s,a),s}var Fr={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},Vr={setCurrentTime:1,setMuted:1,setVolume:1},Hr={play:1,pause:1};function zr(e){return function(t,n){return t===Nr?Nr:n[e]?n[e](t):t}}var qr={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Wr=function(e){void 0===e&&(e="");var t=Tr(e);return qr[t.toLowerCase()]||""};function $r(e){if(!e.type){var t=Wr(e.src);t&&(e.type=t)}return e}var Gr=function(e){function t(t,n,r){var i,o=pn({createEl:!1},n);if(i=e.call(this,t,o,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var a=0,s=n.playerOptions.techOrder;a<s.length;a++){var u=dn(s[a]),l=Lr.getTech(u);if(u||(l=bn.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return i}return p()(t,e),t}(bn);bn.registerComponent("MediaLoader",Gr);var Kr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).emitTapEvents(),r.enable(),r}p()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n=$e({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&Ve.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=$e({role:"button"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=nt("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,rt(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver),this.off("mouseout",this.handleMouseOut),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){g.a.isEventKey(t,"Space")||g.a.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(bn);bn.registerComponent("ClickableComponent",Kr);var Yr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),t.on("posterchange",Qt(h()(r),r.update)),r}p()(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},n.createEl=function(){return nt("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(In||Rn)&&t||this.player_.tech(!0).focus(),this.player_.paused()?tr(this.player_.play()):this.player_.pause()}},t}(Kr);bn.registerComponent("PosterImage",Yr);var Xr={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Qr(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Jr(e,t,n){try{e.style[t]=n}catch(e){return}}var Zr=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=Qt(h()(i),i.updateDisplay);return t.on("loadstart",Qt(h()(i),i.toggleDisplay)),t.on("texttrackchange",o),t.on("loadedmetadata",Qt(h()(i),i.preselectTrack)),t.ready(Qt(h()(i),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",o),t.on("playerresize",o),a.a.addEventListener("orientationchange",o),t.on("dispose",(function(){return a.a.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),i}p()(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),o=this.player_.cache_.selectedLanguage,a=0;a<i.length;a++){var s=i[a];o&&o.enabled&&o.language&&o.language===s.language&&s.kind in r?s.kind===o.kind?n=s:n||(n=s):o&&!o.enabled?(n=null,e=null,t=null):s.default&&("descriptions"!==s.kind||e?s.kind in r&&!t&&(t=s):e=s)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof a.a.WebVTT&&a.a.WebVTT.processCues(a.a,[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var o=null,a=null,s=e.length;s--;){var u=e[s];"showing"===u.mode&&("descriptions"===u.kind?o=u:a=u)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):o&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(o))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.color&&(o.firstChild.style.color=t.color),t.textOpacity&&Jr(o.firstChild,"color",Qr(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(o.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Jr(o.firstChild,"backgroundColor",Qr(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Jr(o,"backgroundColor",Qr(t.windowColor,t.windowOpacity)):o.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){var s=a.a.parseFloat(o.style.fontSize);o.style.fontSize=s*t.fontPercent+"px",o.style.height="auto",o.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Xr[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof a.a.WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],i=0;i<r.activeCues.length;++i)t.push(r.activeCues[i]);a.a.WebVTT.processCues(a.a,t,this.el_);for(var o=0;o<e.length;++o){for(var s=e[o],u=0;u<s.activeCues.length;++u){var l=s.activeCues[u].displayState;at(l,"vjs-text-track-cue"),at(l,"vjs-text-track-cue-"+(s.language?s.language:o))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},t}(bn);bn.registerComponent("TextTrackDisplay",Zr);var ei=function(e){function t(){return e.apply(this,arguments)||this}return p()(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=nt("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(bn);bn.registerComponent("LoadingSpinner",ei);var ti=function(e){function t(){return e.apply(this,arguments)||this}p()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=$e({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=$e({type:"button"},n);var r=bn.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return Ve.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),bn.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){g.a.isEventKey(t,"Space")||g.a.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Kr);bn.registerComponent("Button",ti);var ni=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return tr(t),void(!this.player_.tech(!0)||(In||Rn)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var o=function(){return i.focus()};er(t)?t.then(o,(function(){})):this.setTimeout(o,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(ti);ni.prototype.controlText_="Play Video",bn.registerComponent("BigPlayButton",ni);var ri=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){g.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(ti);bn.registerComponent("CloseButton",ri);var ii=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",r.handlePlay),r.on(t,"pause",r.handlePause),n.replay&&r.on(t,"ended",r.handleEnded),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(ti);ii.prototype.controlText_="Play",bn.registerComponent("PlayToggle",ii);var oi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},ai=oi;function si(e,t){return void 0===t&&(t=e),ai(e,t)}var ui=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],r.updateContent),r.updateTextNode_(),r}p()(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=nt("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=si(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&!t.contentEl_.contains(e)&&(e=null,Ve.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=u.a.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(bn);ui.prototype.labelText_="Time",ui.prototype.controlText_="Time",bn.registerComponent("TimeDisplay",ui);var li=function(e){function t(){return e.apply(this,arguments)||this}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(ui);li.prototype.labelText_="Current Time",li.prototype.controlText_="Current Time",bn.registerComponent("CurrentTimeDisplay",li);var ci=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.updateContent),r.on(t,"loadstart",r.updateContent),r.on(t,"loadedmetadata",r.updateContent),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(ui);ci.prototype.labelText_="Duration",ci.prototype.controlText_="Duration",bn.registerComponent("DurationDisplay",ci);var fi=function(e){function t(){return e.apply(this,arguments)||this}return p()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(bn);bn.registerComponent("TimeDivider",fi);var hi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.updateContent),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return t.insertBefore(nt("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(ui);hi.prototype.labelText_="Remaining Time",hi.prototype.controlText_="Remaining Time",bn.registerComponent("RemainingTimeDisplay",hi);var di=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}p()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=nt("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(bn);bn.registerComponent("LiveDisplay",di);var pi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus),r}p()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=nt("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,e.prototype.dispose.call(this)},t}(ti);pi.prototype.controlText_="Seek to live, currently playing live",bn.registerComponent("SeekToLive",pi);var yi=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},mi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}p()(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=$e({tabIndex:0},n),r=$e({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||An||e.preventDefault(),pt(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;yt(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(yi(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=gt(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){g.a.isEventKey(t,"Left")||g.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):g.a.isEventKey(t,"Right")||g.a.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(bn);bn.registerComponent("Slider",mi);var vi=function(e,t){return yi(e/t*100,0,100).toFixed(2)+"%"},gi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",r.update),r}p()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=nt("span",{className:"vjs-control-text"}),r=nt("span",{textContent:this.localize("Loaded")}),i=u.a.createTextNode(": ");return this.percentageEl_=nt("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),o=t.partEls_,a=vi(i,r);t.percent_!==a&&(t.el_.style.width=a,rt(t.percentageEl_,a),t.percent_=a);for(var s=0;s<n.length;s++){var u=n.start(s),l=n.end(s),c=o[s];c||(c=t.el_.appendChild(nt()),o[s]=c),c.dataset.start===u&&c.dataset.end===l||(c.dataset.start=u,c.dataset.end=l,c.style.left=vi(u,i),c.style.width=vi(l-u,i))}for(var f=o.length;f>n.length;f--)t.el_.removeChild(o[f-1]);o.length=n.length}))},t}(bn);bn.registerComponent("LoadProgressBar",gi);var bi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Jt(Qt(h()(r),r.update),30),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=vt(this.el_),i=mt(this.player_.el()),o=e.width*t;if(i&&r){var a=e.left-i.left+o,s=e.width-o+(i.right-e.right),u=r.width/2;a<u?u+=u-a:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){rt(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var o,a=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-t*s;o=(u<1?"":"-")+si(u,s)}else o=si(n,a);i.update(e,t,o),r&&r()}))},t}(bn);bn.registerComponent("TimeTooltip",bi);var _i=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Jt(Qt(h()(r),r.update),30),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(bn);_i.prototype.options_={children:[]},Un||kn||_i.prototype.options_.children.push("timeTooltip"),bn.registerComponent("PlayProgressBar",_i);var wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Jt(Qt(h()(r),r.update),30),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(bn);wi.prototype.options_={children:["timeTooltip"]},bn.registerComponent("MouseTimeDisplay",wi);var Ti=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}p()(t,e);var n=t.prototype;return n.setEventHandlers_=function(){this.update_=Qt(this,this.update),this.update=Jt(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in u.a&&"visibilityState"in u.a&&this.on(u.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){u.a.hidden?this.disableInterval_(e):(this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this,r=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[si(e,i),si(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(mt(n.el()),n.getProgress())})),r},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){Et(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e){if(Et(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var i=r.seekableStart(),o=r.liveCurrentTime();if((t=i+n*r.liveWindow())>=o&&(t=o),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?tr(this.player_.play()):this.update_()},n.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},n.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){if(g.a.isEventKey(t,"Space")||g.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(g.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);else if(g.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(g()(t))){t.preventDefault(),t.stopPropagation();var n=10*(g.a.codes[g()(t)]-g.a.codes[0])/100;this.player_.currentTime(this.player_.duration()*n)}else g.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):g.a.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in u.a&&"visibilityState"in u.a&&this.off(u.a,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(mi);Ti.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Un||kn||Ti.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),bn.registerComponent("SeekBar",Ti);var Si=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=Jt(Qt(h()(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=Jt(Qt(h()(r),r.handleMouseSeek),30),r.enable(),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(n||r){var i=t.el(),o=vt(i),a=gt(i,e).x;a=yi(a,0,1),r&&r.update(o,a),n&&n.update(o,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(bn);Si.prototype.options_={children:["seekBar"]},bn.registerComponent("ProgressControl",Si);var Ei=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],r.handlePictureInPictureChange),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],r.handlePictureInPictureEnabledChange),r.disable(),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){u.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(ti);Ei.prototype.controlText_="Picture-in-Picture",bn.registerComponent("PictureInPictureToggle",Ei);var Ci=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",r.handleFullscreenChange),!1===u.a[t.fsApi_.fullscreenEnabled]&&r.disable(),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(ti);Ci.prototype.controlText_="Fullscreen",bn.registerComponent("FullscreenToggle",Ci);var ki=function(e){function t(){return e.apply(this,arguments)||this}return p()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(bn);bn.registerComponent("VolumeLevel",ki);var xi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",r.updateLastVolume_),r.on(t,"volumechange",r.updateARIAAttributes),t.ready((function(){return r.updateARIAAttributes()})),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){Et(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){Et(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(mi);xi.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},xi.prototype.playerEvent="volumechange",bn.registerComponent("VolumeBar",xi);var Oi=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||Ke(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(h()(r),t),r.throttledHandleMouseMove=Jt(Qt(h()(r),r.handleMouseMove),30),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}p()(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(bn);Oi.prototype.options_={children:["volumeBar"]},bn.registerComponent("VolumeControl",Oi);var Pi=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(h()(r),t),r.on(t,["loadstart","volumechange"],r.update),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;Un&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)st(this.el_,"vjs-vol-"+n);at(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(ti);Pi.prototype.controlText_="Mute",bn.registerComponent("MuteToggle",Pi);var Ri=function(e){function t(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||Ke(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).on(t,["loadstart"],r.volumePanelState_),r.on(r.muteToggle,"keyup",r.handleKeyPress),r.on(r.volumeControl,"keyup",r.handleVolumeControlKeyUp),r.on("keydown",r.handleKeyPress),r.on("mouseover",r.handleMouseOver),r.on("mouseout",r.handleMouseOut),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}p()(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){g.a.isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),qt(u.a,"keyup",Qt(this,this.handleKeyPress))},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),Wt(u.a,"keyup",Qt(this,this.handleKeyPress))},n.handleKeyPress=function(e){g.a.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(bn);Ri.prototype.options_={children:["muteToggle","volumeControl"]},bn.registerComponent("VolumePanel",Ri);var Ai=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyDown),r.boundHandleBlur_=Qt(h()(r),r.handleBlur),r.boundHandleTapClick_=Qt(h()(r),r.handleTapClick),r}p()(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof bn&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof bn&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=nt(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),qt(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||u.a.activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){g.a.isEventKey(e,"Left")||g.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(g.a.isEventKey(e,"Right")||g.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(bn);bn.registerComponent("Menu",Ai);var ji=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new ti(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=ti.prototype.buildCSSClass();return r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0,r.on(r.menuButton_,"tap",r.handleClick),r.on(r.menuButton_,"click",r.handleClick),r.on(r.menuButton_,"keydown",r.handleKeyDown),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),qt(u.a,"keyup",Qt(h()(r),r.handleMenuKeyUp))})),r.on("mouseleave",r.handleMouseLeave),r.on("keydown",r.handleSubmenuKeyDown),r}p()(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},n.createMenu=function(){var e=new Ai(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=nt("li",{className:"vjs-menu-title",innerHTML:dn(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new bn(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+ti.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},n.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},n.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(e){this.removeClass("vjs-hover"),Wt(u.a,"keyup",Qt(this,this.handleMenuKeyUp))},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){g.a.isEventKey(e,"Esc")||g.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),g.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(g.a.isEventKey(e,"Up")||g.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(g.a.isEventKey(e,"Esc")||g.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(g.a.isEventKey(e,"Esc")||g.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),g.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Un&&et())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(bn);bn.registerComponent("MenuButton",ji);var Ii=function(e){function t(t,n){var r,i=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!i)return h()(r);var o=Qt(h()(r),r.update);return i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),i.addEventListener("labelchange",o),r.player_.on("ready",o),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o),i.removeEventListener("labelchange",o)})),r}return p()(t,e),t}(ji);bn.registerComponent("TrackButton",Ii);var Li=["Tab","Esc","Up","Down","Right","Left"],Di=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}p()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",$e({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},n.handleKeyDown=function(t){Li.some((function(e){return g.a.isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Kr);bn.registerComponent("MenuItem",Di);var Mi=function(e){function t(t,n){var r,i=n.track,o=t.textTracks();n.label=i.label||i.language||"Unknown",n.selected="showing"===i.mode,(r=e.call(this,t,n)||this).track=i,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var s,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(h()(r),t)},c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply(h()(r),t)};(t.on(["loadstart","texttrackchange"],l),o.addEventListener("change",l),o.addEventListener("selectedlanguagechange",c),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],l),o.removeEventListener("change",l),o.removeEventListener("selectedlanguagechange",c)})),void 0===o.onchange)&&r.on(["tap","click"],(function(){if("object"!=typeof a.a.Event)try{s=new a.a.Event("change")}catch(e){}s||(s=u.a.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(s)}));return r.handleTracksChange(),r}p()(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,r=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var o=r[i];-1!==this.kinds.indexOf(o.kind)&&(o===n?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Di);bn.registerComponent("TextTrackMenuItem",Mi);var Ni=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}p()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Mi);bn.registerComponent("OffTextTrackMenuItem",Ni);var Bi=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return p()(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Mi),this.label_&&(n=this.label_+" off"),e.push(new Ni(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new t(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+o.kind+"-menu-item"),e.push(a)}}return e},t}(Ii);bn.registerComponent("TextTrackButton",Bi);var Ui=function(e){function t(t,n){var r,i=n.track,o=n.cue,a=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=a&&a<o.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=o,i.addEventListener("cuechange",Qt(h()(r),r.update)),r}p()(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(Di);bn.registerComponent("ChaptersTrackMenuItem",Ui);var Fi=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(dn(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new Ui(this.player_,{track:this.track_,cue:i});e.push(o)}return e},t}(Bi);Fi.prototype.kind_="chapters",Fi.prototype.controlText_="Chapters",bn.registerComponent("ChaptersButton",Fi);var Vi=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=t.textTracks(),a=Qt(h()(i),i.handleTracksChange);return o.addEventListener("change",a),i.on("dispose",(function(){o.removeEventListener("change",a)})),i}p()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var o=t[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Bi);Vi.prototype.kind_="descriptions",Vi.prototype.controlText_="Descriptions",bn.registerComponent("DescriptionsButton",Vi);var Hi=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Bi);Hi.prototype.kind_="subtitles",Hi.prototype.controlText_="Subtitles",bn.registerComponent("SubtitlesButton",Hi);var zi=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return p()(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Mi);bn.registerComponent("CaptionSettingsMenuItem",zi);var qi=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new zi(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Bi);qi.prototype.kind_="captions",qi.prototype.controlText_="Captions",bn.registerComponent("CaptionsButton",qi);var Wi=function(e){function t(){return e.apply(this,arguments)||this}return p()(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,$e({innerHTML:i},n),r)},t}(Mi);bn.registerComponent("SubsCapsMenuItem",Wi);var $i=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(dn(r.label_)),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new zi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Wi)},t}(Bi);$i.prototype.kinds_=["captions","subtitles"],$i.prototype.controlText_="Subtitles",bn.registerComponent("SubsCapsButton",$i);var Gi=function(e){function t(t,n){var r,i=n.track,o=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(h()(r),t)};return o.addEventListener("change",a),r.on("dispose",(function(){o.removeEventListener("change",a)})),r}p()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,$e({innerHTML:i},n),r)},n.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Di);bn.registerComponent("AudioTrackMenuItem",Gi);var Ki=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new Gi(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(Ii);Ki.prototype.controlText_="Audio Track",bn.registerComponent("AudioTrackButton",Ki);var Yi=function(e){function t(t,n){var r,i=n.rate,o=parseFloat(i,10);return n.label=i,n.selected=1===o,n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=o,r.on(t,"ratechange",r.update),r}p()(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Di);Yi.prototype.contentElType="button",bn.registerComponent("PlaybackRateMenuItem",Yi);var Xi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateVisibility(),r.updateLabel(),r.on(t,"loadstart",r.updateVisibility),r.on(t,"ratechange",r.updateLabel),r}p()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=nt("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createMenu=function(){var e=new Ai(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new Yi(this.player(),{rate:t[n]+"x"}));return e},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(ji);Xi.prototype.controlText_="Playback Rate",bn.registerComponent("PlaybackRateMenuButton",Xi);var Qi=function(e){function t(){return e.apply(this,arguments)||this}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(bn);bn.registerComponent("Spacer",Qi);var Ji=function(e){function t(){return e.apply(this,arguments)||this}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Qi);bn.registerComponent("CustomControlSpacer",Ji);var Zi=function(e){function t(){return e.apply(this,arguments)||this}return p()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(bn);Zi.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in u.a&&Zi.prototype.options_.children.splice(Zi.prototype.options_.children.length-1,0,"pictureInPictureToggle"),bn.registerComponent("ControlBar",Zi);var eo=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",r.open),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(or);eo.prototype.options_=c()({},or.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),bn.registerComponent("ErrorDisplay",eo);var to=["#000","Black"],no=["#00F","Blue"],ro=["#0FF","Cyan"],io=["#0F0","Green"],oo=["#F0F","Magenta"],ao=["#F00","Red"],so=["#FFF","White"],uo=["#FF0","Yellow"],lo=["1","Opaque"],co=["0.5","Semi-Transparent"],fo=["0","Transparent"],ho={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[to,so,ao,io,no,uo,oo,ro]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[lo,co,fo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[so,to,ao,io,no,uo,oo,ro]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[lo,co]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[fo,co,lo]}};function po(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}ho.windowColor.options=ho.backgroundColor.options;var yo=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=Qt(h()(r),r.updateDisplay),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=nt("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),We(ho,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}p()(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=ho[e],o=i.id.replace("%s",this.id_),a=[t,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(i.options.map((function(e){var t=o+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return nt("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return nt("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return nt("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,o,a=(i=r.$(t.selector),o=t.parser,po(i.options[i.options.selectedIndex].value,o));return void 0!==a&&(e[n]=a),e},void 0===(n={})&&(n=0),qe(e=ho).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;We(ho,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(po(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},n.setDefaults=function(){var e=this;We(ho,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(a.a.localStorage.getItem("vjs-text-track-settings"))}catch(e){Ve.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?a.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e)):a.a.localStorage.removeItem("vjs-text-track-settings")}catch(e){Ve.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(or);bn.registerComponent("TextTrackSettings",yo);var mo=function(e){function t(t,n){var r,i=n.ResizeObserver||a.a.ResizeObserver;null===n.ResizeObserver&&(i=!1);var o=pn({createEl:!i,reportTouchActivity:!1},n);return(r=e.call(this,t,o)||this).ResizeObserver=n.ResizeObserver||a.a.ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var i;void 0===r&&(r=a.a);var o=function(){var o=this,a=arguments,s=function(){i=null,s=null,n||e.apply(o,a)};!i&&n&&e.apply(o,a),r.clearTimeout(i),i=r.setTimeout(s,t)};return o.cancel=function(){r.clearTimeout(i),i=null},o}((function(){r.resizeHandler()}),100,!1,h()(r)),i?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(t.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){Wt(this,"resize",e),Wt(this,"unload",t),t=null};qt(r.el_.contentWindow,"unload",t),qt(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(bn);bn.registerComponent("ResizeManager",mo);var vo={trackingThreshold:30,liveTolerance:15},go=function(e){function t(t,n){var r,i=pn(vo,n,{createEl:!1});return(r=e.call(this,t,i)||this).reset_(),r.on(r.player_,"durationchange",r.handleDurationchange),In&&"hidden"in u.a&&"visibilityState"in u.a&&r.on(u.a,"visibilitychange",r.handleVisibilityChange),r}p()(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(u.a.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(a.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),i=this.player_.currentTime(),o=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-i)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked):(this.one(this.player_,"play",this.handlePlay),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&e>2,this.skipNextSeeked_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),this.off(this.player_,"seeked",this.handleSeeked),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate),this.off(this.player_,"timeupdate",this.seekToLiveEdge)},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(u.a,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),e.prototype.dispose.call(this)},t}(bn);bn.registerComponent("LiveTracker",go);var bo,_o=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o<n.length;o++){var a=n[o].src;a&&-1===r.indexOf(a)&&r.push(a)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},wo=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=u.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=u.a.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",a.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),To=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},So=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return To([e.el(),a.a.HTMLMediaElement.prototype,a.a.Element.prototype,wo],"innerHTML")}(e),i=function(n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=n.apply(t,i);return _o(e),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=i(n[e]))})),Object.defineProperty(t,"innerHTML",pn(r,{set:i(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},Eo=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?wr(a.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return a.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Co=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return To([e.el(),a.a.HTMLMediaElement.prototype,Eo],"src")}(e),r=t.setAttribute,i=t.load;Object.defineProperty(t,"src",pn(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var o=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),o},t.load=function(){var n=i.call(t);return _o(e)||(e.triggerSourceset(""),So(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):_o(e)||So(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=i,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},ko=function(e,t,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},o={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(o.set=i),Object.defineProperty(e,t,o)},xo=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,o=!1;if(i&&(r.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var a=r.el_.childNodes,s=a.length,u=[];s--;){var l=a[s];"track"===l.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(l),r.remoteTextTracks().addTrack(l.track),r.textTracks().addTrack(l.track),o||r.el_.hasAttribute("crossorigin")||!Sr(l.src)||(o=!0)):u.push(l))}for(var c=0;c<u.length;c++)r.el_.removeChild(u[c])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&Ve.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(Mn||Bn||On)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}p()(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){Co(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=Ar[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[jr.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=o,Object.keys(o).forEach((function(e){var n=o[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",a),this.on("dispose",(function(e){return t.off("loadstart",a)}))}},n.proxyNativeTracks_=function(){var e=this;Ar.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=u.a.createElement("video");var r=pn({},this.options_.tag&&ct(this.options_.tag));Mn&&!0===this.options_.nativeControlsForTouch||delete r.controls,lt(e,$e(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&ht(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],o=0;o<i.length;o++){var a=i[o],s=this.options_[a];void 0!==s&&(s?ht(e,a,a):dt(e,a),e[a]=s)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Fn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){Ve(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&kn&&An&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=a.a.navigator&&a.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)tr(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=u.a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),a.a.performance&&"function"==typeof a.a.performance.now?e.creationTime=a.a.performance.now():a.a.performance&&a.a.performance.timing&&"number"==typeof a.a.performance.timing.navigationStart&&(e.creationTime=a.a.Date.now()-a.a.performance.timing.navigationStart),e},t}(Lr);ko(xo,"TEST_VID",(function(){if(Je()){var e=u.a.createElement("video"),t=u.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),xo.isSupported=function(){try{xo.TEST_VID.volume=.5}catch(e){return!1}return!(!xo.TEST_VID||!xo.TEST_VID.canPlayType)},xo.canPlayType=function(e){return xo.TEST_VID.canPlayType(e)},xo.canPlaySource=function(e,t){return xo.canPlayType(e.type)},xo.canControlVolume=function(){try{var e=xo.TEST_VID.volume;return xo.TEST_VID.volume=e/2+.1,e!==xo.TEST_VID.volume}catch(e){return!1}},xo.canMuteVolume=function(){try{var e=xo.TEST_VID.muted;return xo.TEST_VID.muted=!e,xo.TEST_VID.muted?ht(xo.TEST_VID,"muted","muted"):dt(xo.TEST_VID,"muted"),e!==xo.TEST_VID.muted}catch(e){return!1}},xo.canControlPlaybackRate=function(){if(kn&&An&&jn<58)return!1;try{var e=xo.TEST_VID.playbackRate;return xo.TEST_VID.playbackRate=e/2+.1,e!==xo.TEST_VID.playbackRate}catch(e){return!1}},xo.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(u.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(u.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(u.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(u.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},xo.supportsNativeTextTracks=function(){return Fn||Un&&An},xo.supportsNativeVideoTracks=function(){return!(!xo.TEST_VID||!xo.TEST_VID.videoTracks)},xo.supportsNativeAudioTracks=function(){return!(!xo.TEST_VID||!xo.TEST_VID.audioTracks)},xo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],n=e[1];ko(xo.prototype,t,(function(){return xo[n]()}),!0)})),xo.prototype.movingMediaElementInDOM=!Un,xo.prototype.featuresFullscreenResize=!0,xo.prototype.featuresProgressEvents=!0,xo.prototype.featuresTimeupdateEvents=!0,xo.patchCanPlayType=function(){xn>=4&&!Pn&&!An&&(bo=xo.TEST_VID&&xo.TEST_VID.constructor.prototype.canPlayType,xo.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":bo.call(this,e)})},xo.unpatchCanPlayType=function(){var e=xo.TEST_VID.constructor.prototype.canPlayType;return bo&&(xo.TEST_VID.constructor.prototype.canPlayType=bo),e},xo.patchCanPlayType(),xo.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},xo.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){xo.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){xo.prototype["set"+dn(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){xo.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){xo.prototype["set"+dn(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){xo.prototype[e]=function(){return this.el_[e]()}})),Lr.withSourceHandlers(xo),xo.nativeSourceHandler={},xo.nativeSourceHandler.canPlayType=function(e){try{return xo.TEST_VID.canPlayType(e)}catch(e){return""}},xo.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return xo.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Tr(e.src);return xo.nativeSourceHandler.canPlayType("video/"+n)}return""},xo.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},xo.nativeSourceHandler.dispose=function(){},xo.registerSourceHandler(xo.nativeSourceHandler),Lr.registerTech("Html5",xo);var Oo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Po={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Ro=["tiny","xsmall","small","medium","large","xlarge","huge"],Ao={};Ro.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Ao[e]="vjs-layout-"+t}));var jo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Io=function(e){function t(n,r,i){var o;if(n.id=n.id||r.id||"vjs_video_"+Nt(),(r=$e(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var a=n.closest("[lang]");a&&a.getAttribute&&(r.language=a.getAttribute("lang"))}else for(var s=n;s&&1===s.nodeType;){if(ct(s).hasOwnProperty("lang")){r.language=s.getAttribute("lang");break}s=s.parentNode}if((o=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=Qt(h()(o),o.documentFullscreenChange_),o.boundFullWindowOnEscKey_=Qt(h()(o),o.fullWindowOnEscKey),o.isFullscreen_=!1,o.log=He(o.id_),o.fsApi_=Gn,o.isPosterFromTech_=!1,o.queuedCallbacks_=[],o.isReady_=!1,o.hasStarted_=!1,o.userActive_=!1,o.debugEnabled_=!1,!o.options_||!o.options_.techOrder||!o.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(o.tag=n,o.tagAttributes=n&&ct(n),o.language(o.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(e){l[e.toLowerCase()]=r.languages[e]})),o.languages_=l}else o.languages_=t.prototype.options_.languages;o.resetCache_(),o.poster_=r.poster||"",o.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),o.changingSrc_=!1,o.playCallbacks_=[],o.playTerminatedQueue_=[],n.hasAttribute("autoplay")?o.autoplay(!0):o.autoplay(o.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!=typeof o[e])throw new Error('plugin "'+e+'" does not exist')})),o.scrubbing_=!1,o.el_=o.createEl(),ln(h()(o),{eventBusKey:"el_"}),o.fsApi_.requestFullscreen&&(qt(u.a,o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_),o.on(o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_)),o.fluid_&&o.on(["playerreset","resize"],o.updateStyleEl_);var c=pn(o.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){o[e](r.plugins[e])})),r.debug&&o.debug(!0),o.options_.playerOptions=c,o.middleware_=[],o.initChildren(),o.isAudio("audio"===n.nodeName.toLowerCase()),o.controls()?o.addClass("vjs-controls-enabled"):o.addClass("vjs-controls-disabled"),o.el_.setAttribute("role","region"),o.isAudio()?o.el_.setAttribute("aria-label",o.localize("Audio Player")):o.el_.setAttribute("aria-label",o.localize("Video Player")),o.isAudio()&&o.addClass("vjs-audio"),o.flexNotSupported_()&&o.addClass("vjs-no-flex"),Mn&&o.addClass("vjs-touch-enabled"),Un||o.addClass("vjs-workinghover"),t.players[o.id_]=h()(o);var f="7.11.2".split(".")[0];return o.addClass("vjs-v"+f),o.userActive(!0),o.reportUserActivity(),o.one("play",o.listenForUserActivity_),o.on("stageclick",o.handleStageClick_),o.on("keydown",o.handleKeyDown),o.on("languagechange",o.handleLanguagechange),o.breakpoints(o.options_.breakpoints),o.responsive(o.options_.responsive),o}p()(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),Wt(u.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Wt(u.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Mr[this.id()]=null,Ir.names.forEach((function(e){var t=Ir[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this)},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:i||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=ct(n);if(i){for(t=this.el_=n,n=this.tag=u.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);ot(t,"video-js")||at(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),o.tabindex="-1",(In||An&&Dn)&&(n.setAttribute("role","application"),o.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){i&&"class"===e||t.setAttribute(e,o[e]),i&&n.setAttribute(e,o[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Lt("vjs-styles-dimensions");var s=kt(".vjs-styles-defaults"),l=kt("head");l.insertBefore(this.styleEl_,s?s.nextSibling:l.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var c=n.getElementsByTagName("a"),f=0;f<c.length;f++){var h=c.item(f);at(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),it(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):Ve.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?Ve.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){var t,n,r=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,en(this)&&this.off(["playerreset","resize"],this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.updateStyleEl_)},en(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Dt(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")}else{var o="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(o>=0&&(u.width=o),s>=0&&(u.height=s))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=dn(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Lr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Ir.names.forEach((function(e){var t=Ir[e];o[t.getterName]=n[t.privateName]})),$e(o,this.options_[r]),$e(o,this.options_[i]),$e(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var a=Lr.getTech(e);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(o),this.tech_.ready(Qt(this,this.handleTechReady_),!0),ir(this.textTracksJson_||[],this.tech_),Oo.forEach((function(e){n.on(n.tech_,e,n["handleTech"+dn(e)+"_"])})),Object.keys(Po).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Po[e]+"_"].bind(n),event:t}):n["handleTech"+Po[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||it(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Ir.names.forEach((function(t){var n=Ir[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=rr(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&Ve.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(er(r))return r.catch(n)};if("any"===e&&!0!==this.muted()?er(n=this.play())&&(n=n.catch(r)):n="muted"===e&&!0!==this.muted()?r():this.play(),er(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===t)return o.type}return Wr(t)}(this,t)),this.cache_.source=pn({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],o=this.$$("source"),a=[],s=0;s<o.length;s++){var u=ct(o[s]);i.push(u),u.src&&u.src===t&&a.push(u.src)}a.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(Ve.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){Et(e)&&this.controls_&&(this.paused()?tr(this.play()):this.pause())},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=u.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in Vr)return function(e,t,n,r){return t[n](e.reduce(zr(n),r))}(this.middleware_,this.tech_,e,t);if(e in Hr)return Ur(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw Ve(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Fr)return function(e,t,n){return e.reduceRight(zr(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Hr)return Ur(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Ve("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Ve("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Ve(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||a.a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=tr),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!Fn&&!Un||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||qn(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.applyInitTime_),void this.one("canplay",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=qn(0,0)),e},n.bufferedPercent=function(){return Wn(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(e){var t=this.options_.Promise||a.a.Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",a),n.off("fullscreenchange",o)}function o(){i(),t()}function a(e,t){i(),r(t)}n.one("fullscreenchange",o),n.one("fullscreenerror",a);var s=n.requestFullscreenHelper_(e);if(s)return s.then(i,i),s}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||a.a.Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",o),t.off("fullscreenchange",i)}function i(){r(),e()}function o(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",o);var a=t.exitFullscreenHelper_();if(a)return a.then(r,r),a}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=u.a[this.fsApi_.exitFullscreen]();return t&&t.then((function(){return e.isFullscreen(!1)})),t}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=u.a.documentElement.style.overflow,qt(u.a,"keydown",this.boundFullWindowOnEscKey_),u.a.documentElement.style.overflow="hidden",at(u.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){g.a.isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Wt(u.a,"keydown",this.boundFullWindowOnEscKey_),u.a.documentElement.style.overflow=this.docOrigOverflow,st(u.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in u.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in u.a)return u.a.exitPictureInPicture()},n.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return g.a.isEventKey(e,"f")}:n,i=t.muteKey,o=void 0===i?function(e){return g.a.isEventKey(e,"m")}:i,a=t.playPauseKey,s=void 0===a?function(e){return g.a.isEventKey(e,"k")||g.a.isEventKey(e,"Space")}:a;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var l=bn.getComponent("FullscreenToggle");!1!==u.a[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else if(o.call(this,e)){e.preventDefault(),e.stopPropagation(),bn.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation(),bn.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=Lr.getTech(i);if(o||(o=bn.getComponent(i)),o){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else Ve.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n=this,r=this.options_.techOrder.map((function(e){return[e,Lr.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(Ve.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},o=function(e,t){var r=e[0];if(e[1].canPlaySource(t,n.options_[r.toLowerCase()]))return{source:t,tech:r}};return(this.options_.sourceOrder?i(e,r,(t=o,function(e,n){return t(n,e)})):i(r,e,o))||!1},n.src=function(e){var t=this;if(void 0===e)return this.cache_.src||"";var n=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):Ge(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[$r({src:t})]:Ge(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[$r(t)]:[];return t}(e);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Br(this,n[0],(function(e,r){var i,o;if(t.middleware_=r,t.cache_.sources=n,t.updateSourceCaches_(e),t.src_(e))return n.length>1?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());i=r,o=t.tech_,i.forEach((function(e){return e.setTech&&e.setTech(o)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,dn(t)!==dn(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||a.a.Promise;this.paused()||!t?this.doReset_():tr(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),en(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Jn(e),this.addClass("vjs-error"),Ve.error("(CODE:"+this.error_.code+" "+Jn.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,r=Qt(this,this.reportUserActivity),i=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var o,a=this.getChild("controlBar");!a||Un||kn||(a.on("mouseenter",(function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var e=this.options_.inactivityTimeout;e<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),en(this)&&this.trigger("languagechange"))},n.languages=function(){return pn(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=pn(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=pn(r)).player=void 0,e.tracks[n]=r}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new or(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<Ro.length;n++){var r=Ro[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(Ao[e]),this.addClass(Ao[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=$e({},jo,e),this.updateCurrentBreakpoint_()),$e(this.breakpoints_)},n.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Ao[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=pn(e);var r=this.cache_.media,i=r.artwork,o=r.poster,a=r.src,s=r.textTracks;!i&&o&&(this.cache_.media.artwork=[{src:o,type:Wr(o)}]),a&&this.src(a),o&&this.poster(o),Array.isArray(s)&&s.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:Wr(t.poster)}]),t}return pn(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=ct(e),r=n["data-setup"];if(ot(e,"vjs-fill")&&(n.fill=!0),ot(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=m()(r||"{}"),o=i[0],a=i[1];o&&Ve.error(o),$e(n,a)}if($e(t,n),e.hasChildNodes())for(var s=e.childNodes,u=0,l=s.length;u<l;u++){var c=s[u],f=c.nodeName.toLowerCase();"source"===f?t.sources.push(ct(c)):"track"===f&&t.tracks.push(ct(c))}return t},n.flexNotSupported_=function(){var e=u.a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},t}(bn);Ir.names.forEach((function(e){var t=Ir[e];Io.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Io.prototype.crossorigin=Io.prototype.crossOrigin,Io.players={};var Lo=a.a.navigator;Io.prototype.options_={techOrder:Lr.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Lo&&(Lo.languages&&Lo.languages[0]||Lo.userLanguage||Lo.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Io.prototype[e]=function(){return this.techGet_(e)}})),Oo.forEach((function(e){Io.prototype["handleTech"+dn(e)+"_"]=function(){return this.trigger(e)}})),bn.registerComponent("Player",Io);var Do={},Mo=function(e){return Do.hasOwnProperty(e)},No=function(e){return Mo(e)?Do[e]:void 0},Bo=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},Uo=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},Fo=function(e,t){return t.prototype.name=e,function(){Uo(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=E()(t,[this].concat(r));return this[e]=function(){return o},Uo(this,o.getEventHash()),o}},Vo=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),ln(this),delete this.trigger,fn(this,this.constructor.defaultState),Bo(t,this.name),this.dispose=Qt(this,this.dispose),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),$t(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=Fo(e,Do[e])},e.isBasic=function(t){var n="string"==typeof t?No(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Mo(t))Ve.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Io.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return Do[t]=n,"plugin"!==t&&(e.isBasic(n)?Io.prototype[t]=function(e,t){var n=function(){Uo(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Bo(this,e),Uo(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):Io.prototype[t]=Fo(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");Mo(e)&&(delete Do[e],delete Io.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(Do)),e.forEach((function(e){var n=No(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=No(e);return t&&t.VERSION||""},e}();Vo.getPlugin=No,Vo.BASE_PLUGIN_NAME="plugin",Vo.registerPlugin("plugin",Vo),Io.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Io.prototype.hasPlugin=function(e){return!!Mo(e)};var Ho=function(e){return 0===e.indexOf("#")?e.slice(1):e};function zo(e,t,n){var r=zo.getPlayer(e);if(r)return t&&Ve.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?kt("#"+Ho(e)):e;if(!Ze(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||Ve.warn("The element supplied is not included in the DOM"),t=t||{},zo.hooks("beforesetup").forEach((function(e){var n=e(i,pn(t));Ge(n)&&!Array.isArray(n)?t=pn(t,n):Ve.error("please return an object in beforesetup hooks")}));var o=bn.getComponent("Player");return r=new o(i,t,n),zo.hooks("setup").forEach((function(e){return e(r)})),r}if(zo.hooks_={},zo.hooks=function(e,t){return zo.hooks_[e]=zo.hooks_[e]||[],t&&(zo.hooks_[e]=zo.hooks_[e].concat(t)),zo.hooks_[e]},zo.hook=function(e,t){zo.hooks(e,t)},zo.hookOnce=function(e,t){zo.hooks(e,[].concat(t).map((function(t){return function n(){return zo.removeHook(e,n),t.apply(void 0,arguments)}})))},zo.removeHook=function(e,t){var n=zo.hooks(e).indexOf(t);return!(n<=-1)&&(zo.hooks_[e]=zo.hooks_[e].slice(),zo.hooks_[e].splice(n,1),!0)},!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE&&Je()){var qo=kt(".vjs-styles-defaults");if(!qo){qo=Lt("vjs-styles-defaults");var Wo=kt("head");Wo&&Wo.insertBefore(qo,Wo.firstChild),Dt(qo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}At(1,zo),zo.VERSION="7.11.2",zo.options=Io.prototype.options_,zo.getPlayers=function(){return Io.players},zo.getPlayer=function(e){var t,n=Io.players;if("string"==typeof e){var r=Ho(e),i=n[r];if(i)return i;t=kt("#"+r)}else t=e;if(Ze(t)){var o=t,a=o.player,s=o.playerId;if(a||n[s])return a||n[s]}},zo.getAllPlayers=function(){return Object.keys(Io.players).map((function(e){return Io.players[e]})).filter(Boolean)},zo.players=Io.players,zo.getComponent=bn.getComponent,zo.registerComponent=function(e,t){Lr.isTech(t)&&Ve.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),bn.registerComponent.call(bn,e,t)},zo.getTech=Lr.getTech,zo.registerTech=Lr.registerTech,zo.use=function(e,t){Dr[e]=Dr[e]||[],Dr[e].push(t)},Object.defineProperty(zo,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(zo.middleware,"TERMINATOR",{value:Nr,writeable:!1,enumerable:!0}),zo.browser=Vn,zo.TOUCH_ENABLED=Mn,zo.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},r={};for(var i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),k()(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},zo.mergeOptions=pn,zo.bind=Qt,zo.registerPlugin=Vo.registerPlugin,zo.deregisterPlugin=Vo.deregisterPlugin,zo.plugin=function(e,t){return Ve.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Vo.registerPlugin(e,t)},zo.getPlugins=Vo.getPlugins,zo.getPlugin=Vo.getPlugin,zo.getPluginVersion=Vo.getPluginVersion,zo.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),zo.options.languages=pn(zo.options.languages,((n={})[e]=t,n)),zo.options.languages[e]},zo.log=Ve,zo.createLogger=He,zo.createTimeRange=zo.createTimeRanges=qn,zo.formatTime=si,zo.setFormatTime=function(e){ai=e},zo.resetFormatTime=function(){ai=oi},zo.parseUrl=_r,zo.isCrossOrigin=Sr,zo.EventTarget=Zt,zo.on=qt,zo.one=Gt,zo.off=Wt,zo.trigger=$t,zo.xhr=_.a,zo.TextTrack=xr,zo.AudioTrack=Or,zo.VideoTrack=Pr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){zo[e]=function(){return Ve.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Ot[e].apply(null,arguments)}})),zo.computedStyle=Ye,zo.dom=Ot,zo.url=Er,zo.defineLazyProperty=ko;
|
|
79
|
-
/*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */
|
|
80
|
-
var $o,Go=O.a,Ko=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},Yo=zo.log,Xo=function(e,t){return e+"-"+t},Qo=function(e){var t=e.manifestString,n=e.customTagParsers,r=void 0===n?[]:n,i=e.customTagMappers,o=void 0===i?[]:i,a=new M;return r.forEach((function(e){return a.addParser(e)})),o.forEach((function(e){return a.addTagMapper(e)})),a.push(t),a.end(),a.manifest},Jo=function(e,t){["AUDIO","SUBTITLES"].forEach((function(n){for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var o=e.mediaGroups[n][r][i];t(o,n,r,i)}}))},Zo=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,n&&(t.uri=n),t.attributes=t.attributes||{}},ea=function(e,t){e.uri=t;for(var n=0;n<e.playlists.length;n++)if(!e.playlists[n].uri){var r="placeholder-uri-"+n;e.playlists[n].uri=r}Jo(e,(function(t,n,r,i){if(t.playlists&&t.playlists.length&&!t.playlists[0].uri){var o="placeholder-uri-"+n+"-"+r+"-"+i,a=Xo(0,o);t.playlists[0].uri=o,t.playlists[0].id=a,e.playlists[a]=t.playlists[0],e.playlists[o]=t.playlists[0]}})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];Zo({playlist:n,id:Xo(t,n.uri)}),n.resolvedUri=Go(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||Yo.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Jo(e,(function(t){t.uri&&(t.resolvedUri=Go(e.uri,t.uri))}))}(e)},ta=zo.mergeOptions,na=zo.EventTarget,ra=function(e,t){e.resolvedUri||(e.resolvedUri=Go(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Go(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Go(t,e.map.uri))},ia=function(e,t){var n=ta(e,{}),r=n.playlists[t.id];if(!r)return null;if(r.segments&&t.segments&&r.segments.length===t.segments.length&&r.endList===t.endList&&r.mediaSequence===t.mediaSequence)return null;var i=ta(r,t);r.segments&&(i.segments=function(e,t,n){var r=t.slice();n=n||0;for(var i=Math.min(e.length,t.length+n),o=n;o<i;o++)r[o-n]=ta(e[o],r[o-n]);return r}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)),i.segments.forEach((function(e){ra(e,i.resolvedUri)}));for(var o=0;o<n.playlists.length;o++)n.playlists[o].id===t.id&&(n.playlists[o]=i);return n.playlists[t.id]=i,n.playlists[t.uri]=i,n},oa=function(e,t){var n=e.segments[e.segments.length-1];return t&&n&&n.duration?1e3*n.duration:500*(e.targetDuration||10)},aa=function(e){function t(t,n,r){var i;if(void 0===r&&(r={}),i=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");var o=r,a=o.withCredentials,s=void 0!==a&&a,u=o.handleManifestRedirects,l=void 0!==u&&u;i.src=t,i.vhs_=n,i.withCredentials=s,i.handleManifestRedirects=l;var c=n.options_;return i.customTagParsers=c&&c.customTagParsers||[],i.customTagMappers=c&&c.customTagMappers||[],i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.vhs_.xhr({uri:Go(i.master.uri,i.media().uri),withCredentials:i.withCredentials},(function(e,t){if(i.request)return e?i.playlistRequestError(i.request,i.media(),"HAVE_METADATA"):void i.haveMetadata({playlistString:i.request.responseText,url:i.media().uri,id:i.media().id})})))})),i}p()(t,e);var n=t.prototype;return n.playlistRequestError=function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.haveMetadata=function(e){var t=this,n=e.playlistString,r=e.playlistObject,i=e.url,o=e.id;this.request=null,this.state="HAVE_METADATA";var s=r||Qo({manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers});s.lastRequest=Date.now(),Zo({playlist:s,uri:i,id:o});var u=ia(this.master,s);this.targetDuration=s.targetDuration,u?(this.master=u,this.media_=this.master.playlists[o]):this.trigger("playlistunchanged"),this.media().endList||(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=a.a.setTimeout((function(){t.trigger("mediaupdatetimeout")}),oa(this.media(),!!u))),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(a.a.clearTimeout(this.finalRenditionTimeout),t){var r=e.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=a.a.setTimeout(this.media.bind(this,e,!1),r)}else{var i=this.state,o=!this.media_||e.id!==this.media_.id;if(this.master.playlists[e.id].endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),"HAVE_MASTER"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(o){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Ko(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,i);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===i?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;a.a.clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=a.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Ko(e.handleManifestRedirects,e.src,n);var r=Qo({manifestString:n.responseText,customTagParsers:e.customTagParsers,customTagMappers:e.customTagMappers});e.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,ea(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments&&e.segments.forEach((function(t){ra(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||a.a.location.href;this.master=function(e,t){var n=Xo(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:a.a.location.href,resolvedUri:a.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(na),sa=function(e,t){var n,r=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&r.push([e.start(n),e.end(n)]);return zo.createTimeRanges(r)},ua=function(e,t){return sa(e,(function(e,n){return e-.1<=t&&n+.1>=t}))},la=function(e,t){return sa(e,(function(e){return e-1/30>=t}))},ca=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},fa=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},ha=zo.createTimeRange,da=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(r.precise)return r.result;var i=function(e,t){for(var n,r=0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(n=e.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=n.duration,void 0!==n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return i.precise?i.result:r.result+n},pa=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return a.a.Infinity}return da(e,t,n)},ya=function(e,t,n){var r=0;if(t>n){var i=[n,t];t=i[0],n=i[1]}if(t<0){for(var o=t;o<Math.min(0,n);o++)r+=e.targetDuration;t=0}for(var a=t;a<n;a++)r+=e.segments[a].duration;return r},ma=function(e,t){if(!e.segments.length)return 0;var n=e.segments.length,r=e.segments[n-1].duration||e.targetDuration,i="number"==typeof t?t:r+2*e.targetDuration;if(0===i)return n;for(var o=0;n--&&!((o+=e.segments[n].duration)>=i););return Math.max(0,n)},va=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return pa(e);if(null===t)return null;t=t||0;var i=n?ma(e,r):e.segments.length;return da(e,e.mediaSequence+i,t)},ga=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},ba=function(e){return e.excludeUntil&&e.excludeUntil===1/0},_a=function(e){var t=ga(e);return!e.disabled&&!t},wa=function(e,t){return t.attributes&&t.attributes[e]},Ta=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!_a(e)&&(e.attributes.BANDWIDTH||0)<n})).length},Sa={duration:pa,seekable:function(e,t,n){var r=t||0,i=va(e,t,!0,n);return null===i?ha():ha(r,i)},safeLiveIndex:ma,getMediaInfoForTime:function(e,t,n,r){var i,o=e.segments.length,a=t-r;if(a<0){if(n>0)for(i=n-1;i>=0;i--)if((a+=e.segments[i].duration+1/30)>0)return{mediaIndex:i,startTime:r-ya(e,n,i)};return{mediaIndex:0,startTime:t}}if(n<0){for(i=n;i<0;i++)if((a-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};n=0}for(i=n;i<o;i++)if((a-=e.segments[i].duration+1/30)<0)return{mediaIndex:i,startTime:r+ya(e,n,i)};return{mediaIndex:o-1,startTime:t}},isEnabled:_a,isDisabled:function(e){return e.disabled},isBlacklisted:ga,isIncompatible:ba,playlistEnd:va,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:wa,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),wa("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:Ta},Ea=zo.xhr,Ca=zo.mergeOptions,ka=function(e,t,n,r){var i="arraybuffer"===e.responseType?e.response:e.responseText;!t&&i&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=i.byteLength||i.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(i||e.responseText)))),r(t,e)},xa=function(){return function e(t,n){t=Ca({timeout:45e3},t);var r=e.beforeRequest||zo.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var o=Ea(t,(function(e,t){return ka(o,e,t,n)})),a=o.abort;return o.abort=function(){return o.aborted=!0,a.apply(o,arguments)},o.uri=t.uri,o.requestTime=Date.now(),o}},Oa=function(e){var t,n,r={};return e.byterange&&(r.Range=(t=e.byterange,n=t.offset+t.length-1,"bytes="+t.offset+"-"+n)),r},Pa=function(e,t){return e.start(t)+"-"+e.end(t)},Ra=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Aa=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},ja=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];ArrayBuffer.isView(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},Ia=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},La=function(e){return e.resolvedUri},Da=function(e){for(var t=Array.prototype.slice.call(e),n="",r=0;r<t.length/16;r++)n+=t.slice(16*r,16*r+16).map(Ra).join("")+" "+t.slice(16*r,16*r+16).map(Aa).join("")+"\n";return n},Ma=Object.freeze({__proto__:null,createTransferableMessage:ja,initSegmentId:Ia,segmentKeyId:La,hexDump:Da,tagDump:function(e){var t=e.bytes;return Da(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=Pa(e,t)+" ";return n}}),Na=function(e){var t=e.playlist,n=e.time,r=void 0===n?void 0:n,i=e.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var o=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,r=0,i=0;i<t.segments.length&&!(e<=(r=(n=t.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration));i++);var o=t.segments[t.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*o.duration)return null;n=o}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!o)return i({message:"valid programTime was not found"});if("estimate"===o.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:o.estimatedStart});var a={mediaSeconds:r},s=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,o.segment);return s&&(a.programDateTime=s.toISOString()),i(null,a)},Ba=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,o=void 0===i?2:i,a=t.seekTo,s=t.pauseAfterSeek,u=void 0===s||s,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!a)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++){if(!e.segments[t].dateTimeObject)return!1}return!0}(r))return c({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var f=function(e,t){var n;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1;i++){if(r=t.segments[i],n<t.segments[i+1].dateTimeObject)break}var o,a=t.segments[t.segments.length-1],s=a.dateTimeObject,u=a.videoTimingInfo?(o=a.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:a.duration+.25*a.duration;return n>new Date(s.getTime()+1e3*u)?null:(n>s&&(r=a),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Sa.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!f)return c({message:n+" was not found in the stream"});var h=f.segment,d=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(e){}var i=n.getTime();return(r.getTime()-i)/1e3}(h.dateTimeObject,n);if("estimate"===f.type)return 0===o?c({message:n+" is not buffered yet. Try again"}):(a(f.estimatedStart+d),void l.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:o-1,seekTo:a,pauseAfterSeek:u,tech:l,callback:c})})));var p=h.start+d;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),a(p)},Ua=function(e,t){if(4===e.readyState)return t()},Fa=zo.EventTarget,Va=zo.mergeOptions,Ha=function(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+"-"+e.byterange.offset+"-"+t},za=function(e,t){var n,r,i={};for(var o in e){var a=e[o].sidx;if(a){var s=Ha(a);if(!t[s])break;var u=t[s].sidxInfo;n=u,r=a,(Boolean(!n.map&&!r.map)||Boolean(n.map&&r.map&&n.map.byterange.offset===r.map.byterange.offset&&n.map.byterange.length===r.map.byterange.length))&&n.uri===r.uri&&n.byterange.offset===r.byterange.offset&&n.byterange.length===r.byterange.length&&(i[s]=t[s])}}return i},qa=function(e){function t(t,n,r,i){var o;void 0===r&&(r={}),(o=e.call(this)||this).masterPlaylistLoader_=i||h()(o),i||(o.isMaster_=!0);var a=r,s=a.withCredentials,u=void 0!==s&&s,l=a.handleManifestRedirects,c=void 0!==l&&l;if(o.vhs_=n,o.withCredentials=u,o.handleManifestRedirects=c,!t)throw new Error("A non-empty playlist URL or object is required");return o.on("minimumUpdatePeriod",(function(){o.refreshXml_()})),o.on("mediaupdatetimeout",(function(){o.refreshMedia_(o.media().id)})),o.state="HAVE_NOTHING",o.loadedPlaylists_={},o.isMaster_?(o.masterPlaylistLoader_.srcUrl=t,o.masterPlaylistLoader_.sidxMapping_={}):o.childPlaylist_=t,o}p()(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var r=this,i=e.sidx&&Ha(e.sidx);if(e.sidx&&i&&!this.masterPlaylistLoader_.sidxMapping_[i]){var o=Ko(this.handleManifestRedirects,e.sidx.resolvedUri),s=this.masterPlaylistLoader_.sidxMapping_;s[i]={sidxInfo:e.sidx};var u=function(o,a){if(!r.requestErrored_(o,a,t)){var u=Ae()(Object(Ie.toUint8)(a.response).subarray(8));return s[i].sidx=u,Pe(e,u,e.sidx.resolvedUri),n(!0)}};this.request=function(e,t,n){var r,i=[],o=!1,a=function(e,t,r,i){return t.abort(),o=!0,n(e,t,r,i)},s=function(e,t){if(!o){if(e)return a(e,t,"",i);var n=t.responseText.substring(i&&i.byteLength||0,t.responseText.length);if(i=Object(Ie.concatTypedArrays)(i,Object(Ie.stringToBytes)(n,!0)),r=r||Object(je.getId3Offset)(i),i.length<10||r&&i.length<r+2)return Ua(t,(function(){return a(e,t,"",i)}));var s=Object(je.detectContainerForBytes)(i);return"ts"===s&&i.length<188||!s&&i.length<376?Ua(t,(function(){return a(e,t,"",i)})):a(null,t,s,i)}},u=t({uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){t.total,t.loaded;return ka(e,null,{statusCode:e.status},s)}))}},(function(e,t){return ka(u,e,t,s)}));return u}(o,this.vhs_.xhr,(function(t,n,i,a){if(t)return u(t,n);if(!i||"mp4"!==i)return u({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+o,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var s=e.sidx.byterange,l=s.offset,c=s.length;if(a.length>=c+l)return u(t,{response:a.subarray(l,l+c),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:o,responseType:"arraybuffer",headers:Oa({byterange:e.sidx.byterange})},u)}))}else this.mediaRequest_=a.a.setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},a.a.clearTimeout(this.minimumUpdatePeriodTimeout_),a.a.clearTimeout(this.mediaRequest_),a.a.clearTimeout(this.mediaUpdateTimeout),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.minimumUpdatePeriodTimeout_);var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=a.a.setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!t.requestErrored_(n,r)){var i=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Ko(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),i?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,i)}))):e(r,i)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=Oe(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Go(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(r)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var o;o="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):t.masterLoaded_:Date.parse(i.responseText),t.masterPlaylistLoader_.clientOffset_=o-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,r,i,o,a=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},t=e.masterXml,n=e.srcUrl,r=e.clientOffset,i=e.sidxMapping,o=xe(t,{manifestUri:n,clientOffset:r,sidxMapping:i}),ea(o,n),o),s=this.masterPlaylistLoader_.master;s&&(a=function(e,t,n){for(var r=!0,i=Va(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),o=0;o<t.playlists.length;o++){var a=t.playlists[o];if(a.sidx){var s=Ha(a.sidx);n&&n[s]&&Pe(a,n[s].sidx,a.sidx.resolvedUri)}var u=ia(i,a);u&&(i=u,r=!1)}return Jo(t,(function(e,t,n,o){if(e.playlists&&e.playlists.length){var a=e.playlists[0].id,s=ia(i,e.playlists[0]);s&&((i=s).mediaGroups[t][n][o].playlists[0]=i.playlists[a],r=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:i}(s,a,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=a||s;var u=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return u&&u!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=u),(!s||a&&s.minimumUpdatePeriod!==a.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(a)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this;a.a.clearTimeout(this.minimumUpdatePeriodTimeout_);var t=function t(n){e.minimumUpdatePeriodTimeout_=a.a.setTimeout((function(){e.trigger("minimumUpdatePeriod"),t(n)}),n)},n=this.masterPlaylistLoader_.master&&this.masterPlaylistLoader_.master.minimumUpdatePeriod;n>0?t(n):0===n&&(this.media()?t(1e3*this.media().targetDuration):this.one("loadedplaylist",(function(){t(1e3*e.media().targetDuration)})))},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var r,i,o;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,i=e.masterPlaylistLoader_.sidxMapping_,o=za(r.playlists,i),Jo(r,(function(e,t,n,r){if(e.playlists&&e.playlists.length){var a=e.playlists;o=Va(o,za(a,i))}})),o),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[e];r?this.media_=n[e]:this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=a.a.setTimeout((function(){t.trigger("mediaupdatetimeout")}),oa(this.media(),Boolean(r)))),this.trigger("loadedplaylist")},t}(Fa),Wa={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},$a=function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer},Ga=[],Ka=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,o=e.isPartial,a=e.remux,s=e.onData,u=e.onTrackInfo,l=e.onAudioTimingInfo,c=e.onVideoTimingInfo,f=e.onVideoSegmentTimingInfo,h=e.onAudioSegmentTimingInfo,d=e.onId3,p=e.onCaptions,y=e.onDone,m={isPartial:o,buffer:[]};if(t.onmessage=function(e){$o&&("data"===e.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,o=r.initSegment,a=r.captions,s=r.captionStreams,u=r.metadata,l=r.videoFrameDtsTime,c=r.videoFramePtsTime;t.buffer.push({captions:a,captionStreams:s,metadata:u});var f=e.data.segment.boxes||{data:e.data.segment.data},h={type:i,data:new Uint8Array(f.data,f.data.byteOffset,f.data.byteLength),initSegment:new Uint8Array(o.data,o.byteOffset,o.byteLength)};void 0!==l&&(h.videoFrameDtsTime=l),void 0!==c&&(h.videoFramePtsTime=c),n(h)}(e,m,s),"trackinfo"===e.data.action&&u(e.data.trackInfo),"gopInfo"===e.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(e,m),"audioTimingInfo"===e.data.action&&l(e.data.audioTimingInfo),"videoTimingInfo"===e.data.action&&c(e.data.videoTimingInfo),"videoSegmentTimingInfo"===e.data.action&&f(e.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===e.data.action&&h(e.data.audioSegmentTimingInfo),"id3Frame"===e.data.action&&d([e.data.id3Frame],e.data.id3Frame.dispatchType),"caption"===e.data.action&&p(e.data.caption),"transmuxed"===e.data.type&&(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:m,callback:y}),Ya()))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),void 0!==a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var v=n instanceof ArrayBuffer?n:n.buffer,g=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:v,byteOffset:g,byteLength:n.byteLength},[v])}t.postMessage({action:o?"partialFlush":"flush"})},Ya=function(){$o=null,Ga.length&&("function"==typeof($o=Ga.shift())?$o():Ka($o))},Xa=function(e,t){e.postMessage({action:t}),Ya()},Qa=function(e,t){if(!$o)return $o=e,void Xa(t,e);Ga.push(Xa.bind(null,t,e))},Ja=function(e){if(!$o)return $o=e,void Ka(e);Ga.push(e)},Za=function(e){Qa("reset",e)},es=function(){$o=null,Ga.length=0},ts=function(e){Qa("endTimeline",e)},ns=2,rs=-101,is=-102,os=function(e){e.forEach((function(e){e.abort()}))},as=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:rs,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:is,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:ns,xhr:t}:null},ss=function(e){var t=e.segment,n=e.bytes,r=e.isPartial,i=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.dataFn,f=e.doneFn,h=t.map&&t.map.tracks||{},d=Boolean(h.audio&&h.video),p=o.bind(null,t,"audio","start"),y=o.bind(null,t,"audio","end"),m=o.bind(null,t,"video","start"),v=o.bind(null,t,"video","end");if(!r&&!t.lastReachedChar){var g=function(e,t){var n=De.a.inspect(e,t*Me.ONE_SECOND_IN_TS);if(!n)return null;var r={hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1};return r.hasVideo&&(r.videoStart=n.video[0].ptsTime),r.hasAudio&&(r.audioStart=n.audio[0].ptsTime),r}(n,t.baseStartTime);g&&(i(t,{hasAudio:g.hasAudio,hasVideo:g.hasVideo,isMuxed:d}),i=null,g.hasAudio&&!d&&p(g.audioStart),g.hasVideo&&m(g.videoStart),p=null,m=null)}Ja({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,isPartial:r,remux:d,onData:function(e){e.type="combined"===e.type?"video":e.type,c(t,e)},onTrackInfo:function(e){i&&(d&&(e.isMuxed=!0),i(t,e))},onAudioTimingInfo:function(e){p&&void 0!==e.start&&(p(e.start),p=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:function(e){m&&void 0!==e.start&&(m(e.start),m=null),v&&void 0!==e.end&&v(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){s(e)},onId3:function(e,n){u(t,e,n)},onCaptions:function(e){l(t,[e])},onDone:function(e){f&&!r&&(e.type="combined"===e.type?"video":e.type,f(null,t,e))}})},us=function(e){var t=e.segment,n=e.bytes,r=e.isPartial,i=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.dataFn,f=e.doneFn,h=new Uint8Array(n);if(Object(je.isLikelyFmp4MediaSegment)(h)){t.isFmp4=!0;var d=t.map.tracks,p={isFmp4:!0,hasVideo:!!d.video,hasAudio:!!d.audio};d.audio&&d.audio.codec&&"enca"!==d.audio.codec&&(p.audioCodec=d.audio.codec),d.video&&d.video.codec&&"encv"!==d.video.codec&&(p.videoCodec=d.video.codec),d.video&&d.audio&&(p.isMuxed=!0),i(t,p);var y=Be.a.startTime(t.map.timescales,h);p.hasAudio&&!p.isMuxed&&o(t,"audio","start",y),p.hasVideo&&o(t,"video","start",y);var m=function(e){c(t,{data:n,type:p.hasAudio&&!p.isMuxed?"audio":"video"}),e&&e.length&&l(t,e),f(null,t,{})};if(!d.video||!n.byteLength||!t.transmuxer)return void m();var v=n instanceof ArrayBuffer?n:n.buffer,g=n instanceof ArrayBuffer?0:n.byteOffset;return t.transmuxer.addEventListener("message",(function e(r){if("mp4Captions"===r.data.action){t.transmuxer.removeEventListener("message",e);var i=r.data.data;t.bytes=n=new Uint8Array(i,i.byteOffset||0,i.byteLength),m(r.data.captions)}})),void t.transmuxer.postMessage({action:"pushMp4Captions",timescales:t.map.timescales,trackIds:[d.video.id],data:v,byteOffset:g,byteLength:n.byteLength},[v])}if(t.transmuxer){if(void 0===t.container&&(t.container=Object(je.detectContainerForBytes)(h)),"ts"!==t.container&&"aac"!==t.container)return i(t,{hasAudio:!1,hasVideo:!1}),void f(null,t,{});ss({segment:t,bytes:n,isPartial:r,trackInfoFn:i,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:u,captionsFn:l,dataFn:c,doneFn:f})}else f(null,t,{})},ls=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,i=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.dataFn,c=e.doneFn,f=0,h=!1;return function(e,d){if(!h){if(e)return h=!0,os(t),c(e,d);if((f+=1)===t.length){if(d.endOfAllRequests=Date.now(),d.encryptedBytes)return function(e){var t,n=e.decryptionWorker,r=e.segment,i=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.dataFn,f=e.doneFn;n.addEventListener("message",(function e(t){if(t.data.source===r.requestId){n.removeEventListener("message",e);var h=t.data.decrypted;r.bytes=new Uint8Array(h.bytes,h.byteOffset,h.byteLength),us({segment:r,bytes:r.bytes,isPartial:!1,trackInfoFn:i,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:u,captionsFn:l,dataFn:c,doneFn:f})}})),t=r.key.bytes.slice?r.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.key.bytes)),n.postMessage(ja({source:r.requestId,encrypted:r.encryptedBytes,key:t,iv:r.key.iv}),[r.encryptedBytes.buffer,t.buffer])}({decryptionWorker:n,segment:d,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,dataFn:l,doneFn:c});us({segment:d,bytes:d.bytes,isPartial:!1,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,dataFn:l,doneFn:c})}}}},cs=function(e){var t=e.segment,n=e.progressFn,r=e.trackInfoFn,i=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.dataFn,c=e.handlePartialData;return function(e){var f=e.target;if(!f.aborted){if(c&&!t.key&&f.responseText&&f.responseText.length>=8){var h=$a(f.responseText.substring(t.lastReachedChar||0));!t.lastReachedChar&&Object(je.isLikelyFmp4MediaSegment)(new Uint8Array(h))||(t.lastReachedChar=f.responseText.length,us({segment:t,bytes:h,isPartial:!0,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,dataFn:l}))}return t.stats=zo.mergeOptions(t.stats,function(e){var t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}}},fs=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,i=e.segment,o=e.abortFn,a=e.progressFn,s=e.trackInfoFn,u=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,f=e.id3Fn,h=e.captionsFn,d=e.dataFn,p=e.doneFn,y=e.handlePartialData,m=[],v=ls({activeXhrs:m,decryptionWorker:r,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:f,captionsFn:h,dataFn:d,doneFn:p});if(i.key&&!i.key.bytes){var g=t(zo.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),function(e,t){return function(n,r){var i=r.response,o=as(n,r);if(o)return t(o,e);if(16!==i.byteLength)return t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:ns,xhr:r},e);var a=new DataView(i);return e.key.bytes=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),t(null,e)}}(i,v));m.push(g)}if(i.map&&!i.map.bytes){var b=t(zo.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Oa(i.map)}),function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var i=r.response,o=as(e,r);if(o)return n(o,t);if(0===i.byteLength)return n({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:ns,xhr:r},t);t.map.bytes=new Uint8Array(r.response);var a=Object(je.detectContainerForBytes)(t.map.bytes);return"mp4"!==a?n({status:r.status,message:"Found unsupported "+(a||"unknown")+" container for initialization segment at URL: "+r.uri,code:ns,internal:!0,xhr:r},t):(Be.a.tracks(t.map.bytes).forEach((function(e){t.map.tracks=t.map.tracks||{},t.map.tracks[e.type]||(t.map.tracks[e.type]=e,"number"==typeof e.id&&e.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[e.id]=e.timescale))})),n(null,t))}}({segment:i,finishProcessingFn:v}));m.push(b)}var _=zo.mergeOptions(n,{uri:i.resolvedUri,responseType:"arraybuffer",headers:Oa(i)});y&&(_.responseType="text",_.beforeSend=function(e){e.overrideMimeType("text/plain; charset=x-user-defined")});var w=t(_,function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,i){var o=i.response,a=as(e,i);if(a)return n(a,t);var s="arraybuffer"!==r&&i.responseText?$a(i.responseText.substring(t.lastReachedChar||0)):i.response;return 0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:ns,xhr:i},t):(t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),t.key?t.encryptedBytes=new Uint8Array(s):t.bytes=new Uint8Array(s),n(null,t))}}({segment:i,finishProcessingFn:v,responseType:_.responseType}));w.addEventListener("progress",cs({segment:i,progressFn:a,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:f,captionsFn:h,dataFn:d,handlePartialData:y})),m.push(w);var T={};return m.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:T,abortFn:o}))})),function(){return os(m)}},hs="undefined"!=typeof window?window:{},ds="undefined"==typeof Symbol?"__target":Symbol(),ps=hs.BlobBuilder||hs.WebKitBlobBuilder||hs.MozBlobBuilder||hs.MSBlobBuilder,ys=hs.URL||hs.webkitURL||ys&&ys.msURL,ms=hs.Worker;function vs(e,t){return function(n){var r=this;if(!t)return new ms(e);if(ms&&!n){var i=ws(t.toString().replace(/^function.+?{/,"").slice(0,-1));return this[ds]=new ms(i),function(e,t){if(!e||!t)return;var n=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&ys.revokeObjectURL(e.objURL),n.call(e)}}(this[ds],i),this[ds]}var o={postMessage:function(e){r.onmessage&&setTimeout((function(){r.onmessage({data:e,target:o})}))}};t.call(o),this.postMessage=function(e){setTimeout((function(){o.onmessage({data:e,target:r})}))},this.isThisThread=!0}}if(ms){var gs,bs=ws("self.onmessage = function () {}"),_s=new Uint8Array(1);try{(gs=new ms(bs)).postMessage(_s,[_s.buffer])}catch(e){ms=null}finally{ys.revokeObjectURL(bs),gs&&gs.terminate()}}function ws(e){try{return ys.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new ps;return t.append(e),ys.createObjectURL(t.getBlob(type))}}var Ts=new vs("./transmuxer-worker.worker.js",(function(e,t){var n=this;
|
|
81
|
-
/*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */!function(){var e=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,r,i,o,a,s,u,l,c,f,h,d,p,y,m,v,g,b,_,w,T,S,E,C,k,x,O,P,R,A,j,I,L,D,M,N,B,U,F,V,H=e,z=Math.pow(2,32)-1;!function(){var e;if(S={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),k=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),C=new Uint8Array([0,0,0,1]),x=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]),O=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]),P={video:x,audio:O},j=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0]),I=new Uint8Array([0,0,0,0,0,0,0,0]),L=I,D=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=I,R=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},r=function(){return t(S.dinf,t(S.dref,j))},i=function(e){return t(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},m=function(e){return t(S.hdlr,P[e])},y=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(n[12]=e.samplerate>>>24&255,n[13]=e.samplerate>>>16&255,n[14]=e.samplerate>>>8&255,n[15]=255&e.samplerate),t(S.mdhd,n)},p=function(e){return t(S.mdia,y(e),m(e.type),s(e))},a=function(e){return t(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},s=function(e){return t(S.minf,"video"===e.type?t(S.vmhd,R):t(S.smhd,A),r(),g(e))},u=function(e,n){for(var r=[],i=n.length;i--;)r[i]=_(n[i]);return t.apply(null,[S.moof,a(e)].concat(r))},l=function(e){for(var n=e.length,r=[];n--;)r[n]=h(e[n]);return t.apply(null,[S.moov,f(4294967295)].concat(r).concat(c(e)))},c=function(e){for(var n=e.length,r=[];n--;)r[n]=w(e[n]);return t.apply(null,[S.mvex].concat(r))},f=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,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]);return t(S.mvhd,n)},v=function(e){var n,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(S.sdtp,o)},g=function(e){return t(S.stbl,b(e),t(S.stts,M),t(S.stsc,L),t(S.stsz,D),t(S.stco,I))},b=function(e){return t(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?N(e):B(e))},N=function(e){var n,r,i=e.sps||[],o=e.pps||[],a=[],s=[];for(n=0;n<i.length;n++)a.push((65280&i[n].byteLength)>>>8),a.push(255&i[n].byteLength),a=a.concat(Array.prototype.slice.call(i[n]));for(n=0;n<o.length;n++)s.push((65280&o[n].byteLength)>>>8),s.push(255&o[n].byteLength),s=s.concat(Array.prototype.slice.call(o[n]));if(r=[S.avc1,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,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,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]),t(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],a,[o.length],s))),t(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],l=e.sarRatio[1];r.push(t(S.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return t.apply(null,r)},B=function(e){return t(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},d=function(e){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(S.tkhd,n)},_=function(e){var n,r,i,o,a,s;return n=t(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/(z+1)),s=Math.floor(e.baseMediaDecodeTime%(z+1)),r=t(S.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===e.type?(i=T(e,92),t(S.traf,n,r,i)):(o=v(e),i=T(e,o.length+92),t(S.traf,n,r,i,o))},h=function(e){return e.duration=e.duration||4294967295,t(S.trak,d(e),p(e))},w=function(e){var n=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(n[n.length-1]=0),t(S.trex,n)},V=function(e,t){var n=0,r=0,i=0,o=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(o=8)),[0,0,n|r|i|o,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,n){var r,i,o,a,s,u;for(n+=20+16*(a=e.samples||[]).length,o=V(a,n),(i=new Uint8Array(o.length+16*a.length)).set(o),r=o.length,u=0;u<a.length;u++)s=a[u],i[r++]=(4278190080&s.duration)>>>24,i[r++]=(16711680&s.duration)>>>16,i[r++]=(65280&s.duration)>>>8,i[r++]=255&s.duration,i[r++]=(4278190080&s.size)>>>24,i[r++]=(16711680&s.size)>>>16,i[r++]=(65280&s.size)>>>8,i[r++]=255&s.size,i[r++]=s.flags.isLeading<<2|s.flags.dependsOn,i[r++]=s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,i[r++]=61440&s.flags.degradationPriority,i[r++]=15&s.flags.degradationPriority,i[r++]=(4278190080&s.compositionTimeOffset)>>>24,i[r++]=(16711680&s.compositionTimeOffset)>>>16,i[r++]=(65280&s.compositionTimeOffset)>>>8,i[r++]=255&s.compositionTimeOffset;return t(S.trun,i)},U=function(e,n){var r,i,o,a,s,u;for(n+=20+8*(a=e.samples||[]).length,o=V(a,n),(r=new Uint8Array(o.length+8*a.length)).set(o),i=o.length,u=0;u<a.length;u++)s=a[u],r[i++]=(4278190080&s.duration)>>>24,r[i++]=(16711680&s.duration)>>>16,r[i++]=(65280&s.duration)>>>8,r[i++]=255&s.duration,r[i++]=(4278190080&s.size)>>>24,r[i++]=(16711680&s.size)>>>16,r[i++]=(65280&s.size)>>>8,r[i++]=255&s.size;return t(S.trun,r)},T=function(e,t){return"audio"===e.type?U(e,t):F(e,t)};o=function(){return t(S.ftyp,E,C,E,k)};var q,W,$,G,K,Y,X,Q,J=function(e){return t(S.mdat,e)},Z=u,ee=function(e){var t,n=o(),r=l(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t},te=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},ne=function(e){var t,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r),i},re=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},ie=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},oe=function(e,t){var n,r,i,o,a,s=t||0,u=[];for(n=0;n<e.length;n++)for(o=e[n],r=0;r<o.length;r++)a=o[r],s+=(i=te(a,s)).size,u.push(i);return u},ae=function(e){var t,n,r,i,o,a,s=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),f=new DataView(c.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(o=i[n],r=0;r<o.length;r++)a=o[r],f.setUint32(s,a.data.byteLength),s+=4,c.set(a.data,s),s+=a.data.byteLength;return c},se=function(e,t){var n,r=[];return n=te(e,t||0),r.push(n),r},ue=function(e){var t,n,r=0,i=e.byteLength,o=e.length,a=new Uint8Array(i+4*o),s=new DataView(a.buffer);for(t=0;t<e.length;t++)n=e[t],s.setUint32(r,n.data.byteLength),r+=4,a.set(n.data,r),r+=n.data.byteLength;return a},le=[33,16,5,32,164,27],ce=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],fe=function(e){for(var t=[];e--;)t.push(0);return t},he=function(){if(!q){var e={96e3:[le,[227,64],fe(154),[56]],88200:[le,[231],fe(170),[56]],64e3:[le,[248,192],fe(240),[56]],48e3:[le,[255,192],fe(268),[55,148,128],fe(54),[112]],44100:[le,[255,192],fe(268),[55,163,128],fe(84),[112]],32e3:[le,[255,192],fe(268),[55,234],fe(226),[112]],24e3:[le,[255,192],fe(268),[55,255,128],fe(268),[111,112],fe(126),[224]],16e3:[le,[255,192],fe(268),[55,255,128],fe(268),[111,255],fe(269),[223,108],fe(195),[1,192]],12e3:[ce,fe(268),[3,127,248],fe(268),[6,255,240],fe(268),[13,255,224],fe(268),[27,253,128],fe(259),[56]],11025:[ce,fe(268),[3,127,248],fe(268),[6,255,240],fe(268),[13,255,224],fe(268),[27,255,192],fe(268),[55,175,128],fe(108),[112]],8e3:[ce,fe(268),[3,121,16],fe(47),[7]]};t=e,q=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return q};Y=function(e,t){return W(K(e,t))},X=function(e,t){return $(G(e),t)},Q=function(e,t,n){return G(n?e:e-t)};var de=9e4,pe=W=function(e){return 9e4*e},ye=($=function(e,t){return e*t},G=function(e){return e/9e4}),me=(K=function(e,t){return e/t},Y),ve=X,ge=Q,be=function(e,t,n,r){var i,o,a,s,u,l=0,c=0,f=0;if(t.length&&(i=me(e.baseMediaDecodeTime,e.samplerate),o=Math.ceil(de/(e.samplerate/1024)),n&&r&&(l=i-Math.max(n,r),f=(c=Math.floor(l/o))*o),!(c<1||f>de/2))){for((a=he()[e.samplerate])||(a=t[0].data),s=0;s<c;s++)u=t[0],t.splice(0,0,{data:a,dts:u.dts-o,pts:u.pts-o});return e.baseMediaDecodeTime-=Math.floor(ve(f,e.samplerate)),f}},_e=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},we=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r},Te=function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i},Se=de,Ee=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Ce=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/Se,n=Math.floor(n)),n},ke=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},xe=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}n.payload=void 0}t+=i,r=0,i=0}return n},Oe=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Pe=function(e,t){var n,r,i,o,a=[];if(!(64&t[0]))return a;for(r=31&t[0],n=0;n<r;n++)o={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(o.ccData=t[i+3]<<8|t[i+4],a.push(o));return a},Re=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},Ae=4,je=function e(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new He(0,0),new He(0,1),new He(1,0),new He(1,1)],this.cc708Stream_=new Ne,this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done"))};(je.prototype=new H).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=xe(e.escapedRBSP)).payload&&t.payloadType===Ae&&(n=Oe(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=Pe(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},je.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},je.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},je.prototype.flush=function(){return this.flushStream("flush")},je.prototype.partialFlush=function(){return this.flushStream("partialFlush")},je.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},je.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},je.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},je.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},je.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},je.prototype.dispatchCea708Packet=function(e){this.cc708Stream_.push(e)};var Ie={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Le=function(e){return 32<=e&&e<=127||160<=e&&e<=255},De=function(e){this.windowNum=e,this.reset()};De.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},De.prototype.getText=function(){return this.rows.join("\n")},De.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},De.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},De.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},De.prototype.addText=function(e){this.rows[this.rowIdx]+=e},De.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Me=function(e){this.serviceNum=e,this.text="",this.currentWindow=new De(-1),this.windows=[]};Me.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new De(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},Me.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};var Ne=function e(){e.prototype.init.call(this);var t=this;this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(t.new708Packet(),t.add708Bytes(e)):(null===t.current708Packet&&t.new708Packet(),t.add708Bytes(e))}};Ne.prototype=new H,Ne.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ne.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},Ne.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,o=t[i++];for(e.seq=o>>6,e.sizeCode=63&o;i<t.length;i++)r=31&(o=t[i++]),7===(n=o>>5)&&r>0&&(n=o=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},Ne.prototype.pushServiceBlock=function(e,t,n){var r,i=t,o=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,i));i<t+n&&i<o.length;i++)r=o[i],Le(r)?i=this.handleText(i,a):16===r?i=this.extendedCommands(i,a):128<=r&&r<=135?i=this.setCurrentWindow(i,a):152<=r&&r<=159?i=this.defineWindow(i,a):136===r?i=this.clearWindows(i,a):140===r?i=this.deleteWindows(i,a):137===r?i=this.displayWindows(i,a):138===r?i=this.hideWindows(i,a):139===r?i=this.toggleWindows(i,a):151===r?i=this.setWindowAttributes(i,a):144===r?i=this.setPenAttributes(i,a):145===r?i=this.setPenColor(i,a):146===r?i=this.setPenLocation(i,a):143===r?a=this.reset(i,a):8===r?a.currentWindow.backspace():12===r?a.currentWindow.clearText():13===r?a.currentWindow.pendingNewLine=!0:14===r?a.currentWindow.clearText():141===r&&i++},Ne.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return Le(n)&&(e=this.handleText(e,t,!0)),e},Ne.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Ne.prototype.initService=function(e,t){var n=this;return this.services[e]=new Me(e),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Ne.prototype.handleText=function(e,t,n){var r,i,o=this.current708Packet.data[e],a=(i=Ie[r=(n?4096:0)|o]||r,4096&r&&r===i?"":String.fromCharCode(i)),s=t.currentWindow;return s.pendingNewLine&&!s.isEmpty()&&s.newLine(this.getPts(e)),s.pendingNewLine=!1,s.addText(a),e},Ne.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},Ne.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,r=n[e],i=7&r;t.setCurrentWindow(i);var o=t.currentWindow;return r=n[++e],o.visible=(32&r)>>5,o.rowLock=(16&r)>>4,o.columnLock=(8&r)>>3,o.priority=7&r,r=n[++e],o.relativePositioning=(128&r)>>7,o.anchorVertical=127&r,r=n[++e],o.anchorHorizontal=r,r=n[++e],o.anchorPoint=(240&r)>>4,o.rowCount=15&r,r=n[++e],o.columnCount=63&r,r=n[++e],o.windowStyle=(56&r)>>3,o.penStyle=7&r,o.virtualRowCount=o.rowCount+1,e},Ne.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.winAttr;return r=n[++e],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++e],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++e],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++e],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,e},Ne.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Ne.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Ne.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=1);return e},Ne.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=0);return e},Ne.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible^=1);return e},Ne.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].clearText();return e},Ne.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].reset();return e},Ne.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penAttr;return r=n[++e],i.textTag=(240&r)>>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++e],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,e},Ne.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penColor;return r=n[++e],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++e],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++e],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,e},Ne.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=n[++e],i.row=15&r,r=n[++e],i.column=63&r,e},Ne.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var Be={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ue=function(e){return null===e?"":(e=Be[e]||e,String.fromCharCode(e))},Fe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ve=function(){for(var e=[],t=15;t--;)e.push("");return e},He=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,o;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ve();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ve();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ve()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))o=Ue((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),o=Ue((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=Fe.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),o=Ue(r),o+=Ue(i),this[this.mode_](e.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};He.prototype=new H,He.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}})).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},He.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ve(),this.nonDisplayed_=Ve(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},He.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},He.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},He.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},He.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},He.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},He.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},He.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},He.prototype.isNormalChar=function(e){return e>=32&&e<=127},He.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ve(),this.displayed_=Ve()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},He.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},He.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},He.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},He.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},He.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},He.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var ze={CaptionStream:je,Cea608Stream:He,Cea708Stream:Ne},qe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},We=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},$e=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=We(e.dts,r),e.pts=We(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};$e.prototype=new H;var Ge,Ke=$e,Ye=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},Xe=function(e,t,n){return decodeURIComponent(Ye(e,t,n))},Qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Je={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Xe(e.data,1,t),e.value=Xe(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Xe(e.data,1,t),e.url=Xe(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(Ye(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Ge=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,i=[],o=0;if(Ge.prototype.init.call(this),this.dispatchType=qe.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,a,s,u,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(o=0,i.length=0),0===i.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))n.debug&&console.log("Skipping unrecognized metadata packet");else if(i.push(e),o+=e.data.byteLength,1===i.length&&(r=Qe(e.data.subarray(6,10)),r+=10),!(o<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)t.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,o-=i[0].data.byteLength,i.shift();a=10,64&t.data[5]&&(a+=4,a+=Qe(t.data.subarray(10,14)),r-=Qe(t.data.subarray(16,20)));do{if((s=Qe(t.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[a],t.data[a+1],t.data[a+2],t.data[a+3]),data:t.data.subarray(a+10,a+s+10)}).key=u.id,Je[u.id]&&(Je[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var c=u.data,f=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;f*=4,f+=3&c[7],u.timeStamp=f,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),a+=10,a+=s}while(a<r);this.trigger("data",t)}}}).prototype=new H;var Ze,et,tt,nt=Ge,rt=Ke;(Ze=function(){var e=new Uint8Array(188),t=0;Ze.prototype.init.call(this),this.push=function(n){var r,i=0,o=188;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;o<r.byteLength;)71!==r[i]||71!==r[o]?(i++,o++):(this.trigger("data",r.subarray(i,o)),i+=188,o+=188);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new H,(et=function(){var e,t,n,r;et.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var o=e[i],a=(31&e[i+1])<<8|e[i+2];o===qe.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=a:o===qe.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=a:o===qe.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][a]=o),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=qe.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=qe.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new H,et.STREAM_TYPES={h264:27,adts:15},(tt=function(){var e,t=this,n={data:[],size:0},r={data:[],size:0},i={data:[],size:0},o=function(e,n,r){var i,o,a=new Uint8Array(e.size),s={type:n},u=0,l=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,u=0;u<e.data.length;u++)o=e.data[u],a.set(o.data,l),l+=o.data.byteLength;var c,f,h;c=a,(f=s).packetLength=6+(c[4]<<8|c[5]),f.dataAlignmentIndicator=0!=(4&c[6]),192&(h=c[7])&&(f.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,f.pts*=4,f.pts+=(6&c[13])>>>1,f.dts=f.pts,64&h&&(f.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,f.dts*=4,f.dts+=(6&c[18])>>>1)),f.data=c.subarray(9+c[8]),i="video"===n||s.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",s)}};tt.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,t;switch(a.streamType){case qe.H264_STREAM_TYPE:e=n,t="video";break;case qe.ADTS_STREAM_TYPE:e=r,t="audio";break;case qe.METADATA_STREAM_TYPE:e=i,t="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=a.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}})[a.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(n,"video"),o(r,"audio"),o(i,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new H;var it={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Ze,TransportParseStream:et,ElementaryStream:tt,TimestampRolloverStream:rt,CaptionStream:ze.CaptionStream,Cea608Stream:ze.Cea608Stream,Cea708Stream:ze.Cea708Stream,MetadataStream:nt};for(var ot in qe)qe.hasOwnProperty(ot)&&(it[ot]=qe[ot]);var at,st=it,ut=de,lt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(at=function(e){var t,n=0;at.prototype.init.call(this),this.push=function(r){var i,o,a,s,u,l,c=0;if(e||(n=0),"audio"===r.type)for(t?(s=t,(t=new Uint8Array(s.byteLength+r.data.byteLength)).set(s),t.set(r.data,s.byteLength)):t=r.data;c+5<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(o=2*(1&~t[c+1]),i=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(u=1024*(1+(3&t[c+6])))*ut/lt[(60&t[c+2])>>>2],a=c+i,t.byteLength<a)return;if(this.trigger("data",{pts:r.pts+n*l,dts:r.dts+n*l,sampleCount:u,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:lt[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+o,a)}),n++,t.byteLength===a)return void(t=void 0);t=t.subarray(a)}else c++},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new H;var ct,ft,ht,dt=at,pt=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,o=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");o.set(e.subarray(i,i+a)),n=new DataView(o.buffer).getUint32(0),r=8*a,t-=a},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),o=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?o<<i|this.readBits(i):o},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(ft=function(){var e,t,n=0;ft.prototype.init.call(this),this.push=function(r){var i;t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;for(var o=t.byteLength;n<o-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<o;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<o);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new H,ht={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(ct=function(){var e,t,n,r,i,o,a,s=new ft;ct.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,s.push(e))},s.on("data",(function(a){var s={trackId:t,pts:n,dts:r,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(a.subarray(1)),s.config=o(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",s)})),s.on("done",(function(){e.trigger("done")})),s.on("partialdone",(function(){e.trigger("partialdone")})),s.on("reset",(function(){e.trigger("reset")})),s.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){s.flush()},this.partialFlush=function(){s.partialFlush()},this.reset=function(){s.reset()},this.endTimeline=function(){s.endTimeline()},a=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},o=function(e){var t,n,r,i,o,s,u,l,c,f,h,d,p,y=0,m=0,v=0,g=0,b=1;if(n=(t=new pt(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ht[n]&&(3===(o=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==o?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(f=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(y=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:d=[1,1];break;case 2:d=[12,11];break;case 3:d=[10,11];break;case 4:d=[16,11];break;case 5:d=[40,33];break;case 6:d=[24,11];break;case 7:d=[20,11];break;case 8:d=[32,11];break;case 9:d=[80,33];break;case 10:d=[18,11];break;case 11:d=[15,11];break;case 12:d=[64,33];break;case 13:d=[160,99];break;case 14:d=[4,3];break;case 15:d=[3,2];break;case 16:d=[2,1];break;case 255:d=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}d&&(b=d[0]/d[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(l+1)-2*y-2*m)*b),height:(2-f)*(c+1)*16-2*v-2*g,sarRatio:d}}}).prototype=new H;var yt,mt={H264Stream:ct,NalByteStream:ft},vt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},gt=function(e){var t=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=vt(t,n))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},bt=vt,_t=function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n};(yt=function(){var e=new Uint8Array,t=0;yt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,o,a,s=0,u=0;for(e.length?(a=e.length,(e=new Uint8Array(n.byteLength+a)).set(e.subarray(0,a)),e.set(n,a)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(s=_t(e,u))>e.length)break;o={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",o),u+=s}else{if(e.length-u<10)break;if(u+(s=bt(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+s)},this.trigger("data",i),u+=s}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new H;var wt,Tt,St,Et,Ct=yt,kt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],xt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ot=mt.H264Stream,Pt=gt,Rt=de,At=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},jt=function(e,t,n,r,i,o){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:o,baseMediaDecodeTime:e}};(Tt=function(e,t){var n=[],r=0,i=0,o=0,a=1/0;t=t||{},Tt.prototype.init.call(this),this.push=function(t){ke(e,t),e&&kt.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(e){i=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){o=e},this.flush=function(){var s,u,l,c,f,h,d;0!==n.length?(s=_e(n,e,i),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),d=be(e,s,o,a),e.samples=we(s),l=J(Te(s)),n=[],u=Z(r,[e]),c=new Uint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),Ee(e),f=Math.ceil(1024*Rt/e.samplerate),s.length&&(h=s.length*f,this.trigger("segmentTimingInfo",jt(me(e.baseMediaDecodeTime,e.samplerate),s[0].dts,s[0].pts,s[0].dts+h,s[0].pts+h,d||0)),this.trigger("timingInfo",{start:s[0].pts,end:s[0].pts+h})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Ee(e),n=[],this.trigger("reset")}}).prototype=new H,(wt=function(e,t){var n,r,i=0,o=[],a=[];t=t||{},wt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){ke(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],xt.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),o.push(t)},this.flush=function(){for(var n,r,s,u,l,c,f,h,d=0;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=ne(o),(s=re(n))[0][0].keyFrame||((r=this.getGopForFusion_(o[0],e))?(d=r.duration,s.unshift(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.pts=r.pts,s.dts=r.dts,s.duration+=r.duration):s=ie(s)),a.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Ee(e),s=p}ke(e,s),e.samples=oe(s),l=J(ae(s)),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),f=s[0],h=s[s.length-1],this.trigger("segmentTimingInfo",jt(e.baseMediaDecodeTime,f.dts,f.pts,h.dts+h.duration,h.pts+h.duration,d)),this.trigger("timingInfo",{start:s[0].pts,end:s[s.length-1].pts+s[s.length-1].duration}),this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=Z(i,[e]),c=new Uint8Array(u.byteLength+l.byteLength),i++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),o=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){Ee(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,r,i,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)i=(o=this.gopCache_[a]).gop,e.pps&&At(e.pps[0],o.pps[0])&&e.sps&&At(e.sps[0],o.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=o,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,o,s,u,l;for(o=e.byteLength,s=e.nalCount,u=e.duration,t=n=0;t<a.length&&n<e.length&&(r=a[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,o-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=o,l.duration=u,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,r,i,o,s,u;for(t=a.length-1,n=e.length-1,o=null,s=!1;t>=0&&n>=0;){if(r=a[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===a.length-1&&(o=n),n--)}if(!s&&null===o)return null;if(0===(u=s?n:o))return e;var l=e.slice(u),c=l.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){a=e}}).prototype=new H,(Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new H,Et.prototype.flush=function(e){var t,n,r,i,o=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,xt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,kt.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=ee(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)a.data.set(this.pendingBoxes[i],o),o+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(t=this.pendingCaptions[i]).startTime=ge(t.startPts,s,this.keepOriginalTimestamps),t.endTime=ge(t.endPts,s,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=ge(n.pts,s,this.keepOriginalTimestamps),a.metadata.push(n);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),i=0;i<a.captions.length;i++)t=a.captions[i],this.trigger("caption",t);for(i=0;i<a.metadata.length;i++)n=a.metadata[i],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},(St=function(e){var t,n,r=this,i=!0;St.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new st.MetadataStream,i.aacStream=new Ct,i.audioTimestampRolloverStream=new st.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new st.TimestampRolloverStream("timed-metadata"),i.adtsStream=new dt,i.coalesceStream=new Et(e,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(e){i.aacStream.setTimestamp(e.timeStamp)})),i.aacStream.on("data",(function(o){"timed-metadata"!==o.type&&"audio"!==o.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Tt(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new st.MetadataStream,i.packetStream=new st.TransportPacketStream,i.parseStream=new st.TransportParseStream,i.elementaryStream=new st.ElementaryStream,i.timestampRolloverStream=new st.TimestampRolloverStream,i.adtsStream=new dt,i.h264Stream=new Ot,i.captionStream=new st.CaptionStream,i.coalesceStream=new Et(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)t||"video"!==o.tracks[a].type?n||"audio"!==o.tracks[a].type||((n=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new wt(t,e),i.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Tt(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Ee(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Ee(t),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=Pt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new H;var It={Transmuxer:St,VideoSegmentStream:wt,AudioSegmentStream:Tt,AUDIO_PROPERTIES:kt,VIDEO_PROPERTIES:xt,generateSegmentTimingInfo:jt},Lt={Adts:dt,h264:mt},Dt=de,Mt=function e(t,n){var r=[],i=0,o=0,a=0,s=1/0,u=null,l=null;n=n||{},e.prototype.init.call(this),this.push=function(e){ke(t,e),t&&kt.forEach((function(n){t[n]=e[n]})),r.push(e)},this.setEarliestDts=function(e){o=e},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.processFrames_=function(){var e,c,f,h,d;0!==r.length&&0!==(e=_e(r,t,o)).length&&(t.baseMediaDecodeTime=Ce(t,n.keepOriginalTimestamps),be(t,e,a,s),t.samples=we(e),f=J(Te(e)),r=[],c=Z(i,[t]),i++,t.initSegment=ee([t]),(h=new Uint8Array(c.byteLength+f.byteLength)).set(c),h.set(f,c.byteLength),Ee(t),null===u&&(l=u=e[0].pts),l+=e.length*(1024*Dt/t.samplerate),d={start:u},this.trigger("timingInfo",d),this.trigger("data",{track:t,boxes:h}))},this.flush=function(){this.processFrames_(),this.trigger("timingInfo",{start:u,end:l}),this.resetTiming_(),this.trigger("done","AudioSegmentStream")},this.partialFlush=function(){this.processFrames_(),this.trigger("partialdone","AudioSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","AudioSegmentStream")},this.resetTiming_=function(){Ee(t),u=null,l=null},this.reset=function(){this.resetTiming_(),r=[],this.trigger("reset")}};Mt.prototype=new H;var Nt=Mt,Bt=function e(t,n){var r,i,o,a=0,s=[],u=[],l=null,c=null,f=!0;n=n||{},e.prototype.init.call(this),this.push=function(e){ke(t,e),void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),"seq_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.config,t.sps=[e.data],xt.forEach((function(e){t[e]=r[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||i||(i=e.data,t.pps=[e.data]),s.push(e)},this.processNals_=function(e){var r;for(s=u.concat(s);s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0!==s.length){var i=ne(s);if(i.length)if(u=i[i.length-1],e&&(i.pop(),i.duration-=u.duration,i.nalCount-=u.length,i.byteLength-=u.byteLength),i.length){if(this.trigger("timelineStartInfo",t.timelineStartInfo),f){if(!(o=re(i))[0][0].keyFrame){if(!(o=ie(o))[0][0].keyFrame)return s=[].concat.apply([],i).concat(u),void(u=[]);(i=[].concat.apply([],o)).duration=o.duration}f=!1}for(null===l&&(l=i[0].pts,c=l),c+=i.duration,this.trigger("timingInfo",{start:l,end:c}),r=0;r<i.length;r++){var h=i[r];t.samples=se(h);var d=J(ue(h));Ee(t),ke(t,h),t.baseMediaDecodeTime=Ce(t,n.keepOriginalTimestamps);var p=Z(a,[t]);a++,t.initSegment=ee([t]);var y=new Uint8Array(p.byteLength+d.byteLength);y.set(p),y.set(d,p.byteLength),this.trigger("data",{track:t,boxes:y,sequence:a,videoFrameDts:h.dts,videoFramePts:h.pts})}s=[]}else s=[]}},this.resetTimingAndConfig_=function(){r=void 0,i=void 0,l=null,c=null},this.partialFlush=function(){this.processNals_(!0),this.trigger("partialdone","VideoSegmentStream")},this.flush=function(){this.processNals_(!1),this.resetTimingAndConfig_(),this.trigger("done","VideoSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","VideoSegmentStream")},this.reset=function(){this.resetTimingAndConfig_(),u=[],s=[],f=!0,this.trigger("reset")}};Bt.prototype=new H;var Ut=Bt,Ft=gt,Vt=function(e){return e.prototype=new H,e.prototype.init.call(e),e},Ht=function(e,t){e.on("data",t.trigger.bind(t,"data")),e.on("done",t.trigger.bind(t,"done")),e.on("partialdone",t.trigger.bind(t,"partialdone")),e.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),e.on("audioTimingInfo",t.trigger.bind(t,"audioTimingInfo")),e.on("videoTimingInfo",t.trigger.bind(t,"videoTimingInfo")),e.on("trackinfo",t.trigger.bind(t,"trackinfo")),e.on("id3Frame",(function(n){n.dispatchType=e.metadataStream.dispatchType,n.cueTime=ye(n.pts),t.trigger("id3Frame",n)})),e.on("caption",(function(e){t.trigger("caption",e)}))},zt=function e(t){var n=null,r=!0;t=t||{},e.prototype.init.call(this),t.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.push=function(e){if(r){var i=Ft(e);!i||n&&"aac"===n.type?i||n&&"ts"===n.type||(n=function(e){var t={type:"ts",tracks:{audio:null,video:null},packet:new st.TransportPacketStream,parse:new st.TransportParseStream,elementary:new st.ElementaryStream,timestampRollover:new st.TimestampRolloverStream,adts:new Lt.Adts,h264:new Lt.h264.H264Stream,captionStream:new st.CaptionStream,metadataStream:new st.MetadataStream};return t.headOfPipeline=t.packet,t.packet.pipe(t.parse).pipe(t.elementary).pipe(t.timestampRollover),t.timestampRollover.pipe(t.h264),t.h264.pipe(t.captionStream),t.timestampRollover.pipe(t.metadataStream),t.timestampRollover.pipe(t.adts),t.elementary.on("data",(function(n){if("metadata"===n.type){for(var r=0;r<n.tracks.length;r++)t.tracks[n.tracks[r].type]||(t.tracks[n.tracks[r].type]=n.tracks[r],t.tracks[n.tracks[r].type].timelineStartInfo.baseMediaDecodeTime=e.baseMediaDecodeTime);t.tracks.video&&!t.videoSegmentStream&&(t.videoSegmentStream=new Ut(t.tracks.video,e),t.videoSegmentStream.on("timelineStartInfo",(function(n){t.tracks.audio&&!e.keepOriginalTimestamps&&t.audioSegmentStream.setEarliestDts(n.dts-e.baseMediaDecodeTime)})),t.videoSegmentStream.on("timingInfo",t.trigger.bind(t,"videoTimingInfo")),t.videoSegmentStream.on("data",(function(e){t.trigger("data",{type:"video",data:e})})),t.videoSegmentStream.on("done",t.trigger.bind(t,"done")),t.videoSegmentStream.on("partialdone",t.trigger.bind(t,"partialdone")),t.videoSegmentStream.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),t.h264.pipe(t.videoSegmentStream)),t.tracks.audio&&!t.audioSegmentStream&&(t.audioSegmentStream=new Nt(t.tracks.audio,e),t.audioSegmentStream.on("data",(function(e){t.trigger("data",{type:"audio",data:e})})),t.audioSegmentStream.on("done",t.trigger.bind(t,"done")),t.audioSegmentStream.on("partialdone",t.trigger.bind(t,"partialdone")),t.audioSegmentStream.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),t.audioSegmentStream.on("timingInfo",t.trigger.bind(t,"audioTimingInfo")),t.adts.pipe(t.audioSegmentStream)),t.trigger("trackinfo",{hasAudio:!!t.tracks.audio,hasVideo:!!t.tracks.video})}})),t.captionStream.on("data",(function(n){var r;r=t.tracks.video&&t.tracks.video.timelineStartInfo.pts||0,n.startTime=ge(n.startPts,r,e.keepOriginalTimestamps),n.endTime=ge(n.endPts,r,e.keepOriginalTimestamps),t.trigger("caption",n)})),(t=Vt(t)).metadataStream.on("data",t.trigger.bind(t,"id3Frame")),t}(t),Ht(n,this)):(n=function(e){var t={type:"aac",tracks:{audio:null},metadataStream:new st.MetadataStream,aacStream:new Ct,audioRollover:new st.TimestampRolloverStream("audio"),timedMetadataRollover:new st.TimestampRolloverStream("timed-metadata"),adtsStream:new dt(!0)};return t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioRollover).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataRollover).pipe(t.metadataStream),t.metadataStream.on("timestamp",(function(e){t.aacStream.setTimestamp(e.timeStamp)})),t.aacStream.on("data",(function(n){"timed-metadata"!==n.type&&"audio"!==n.type||t.audioSegmentStream||(t.tracks.audio=t.tracks.audio||{timelineStartInfo:{baseMediaDecodeTime:e.baseMediaDecodeTime},codec:"adts",type:"audio"},t.audioSegmentStream=new Nt(t.tracks.audio,e),t.audioSegmentStream.on("data",(function(e){t.trigger("data",{type:"audio",data:e})})),t.audioSegmentStream.on("partialdone",t.trigger.bind(t,"partialdone")),t.audioSegmentStream.on("done",t.trigger.bind(t,"done")),t.audioSegmentStream.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),t.audioSegmentStream.on("timingInfo",t.trigger.bind(t,"audioTimingInfo")),t.adtsStream.pipe(t.audioSegmentStream),t.trigger("trackinfo",{hasAudio:!!t.tracks.audio,hasVideo:!!t.tracks.video}))})),(t=Vt(t)).metadataStream.on("data",t.trigger.bind(t,"id3Frame")),t}(t),Ht(n,this)),r=!1}n.headOfPipeline.push(e)},this.flush=function(){n&&(r=!0,n.headOfPipeline.flush())},this.partialFlush=function(){n&&n.headOfPipeline.partialFlush()},this.endTimeline=function(){n&&n.headOfPipeline.endTimeline()},this.reset=function(){n&&n.headOfPipeline.reset()},this.setBaseMediaDecodeTime=function(e){t.keepOriginalTimestamps||(t.baseMediaDecodeTime=e),n&&(n.tracks.audio&&(n.tracks.audio.timelineStartInfo.dts=void 0,n.tracks.audio.timelineStartInfo.pts=void 0,Ee(n.tracks.audio),n.audioRollover&&n.audioRollover.discontinuity()),n.tracks.video&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),n.tracks.video.timelineStartInfo.dts=void 0,n.tracks.video.timelineStartInfo.pts=void 0,Ee(n.tracks.video)),n.timestampRollover&&n.timestampRollover.discontinuity())},this.setRemux=function(e){t.remux=e,n&&n.coalesceStream&&n.coalesceStream.setRemux(e)},this.setAudioAppendStart=function(e){n&&n.tracks.audio&&n.audioSegmentStream&&n.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){}};zt.prototype=new H;var qt=zt,Wt=function(e){return e>>>0},$t=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Gt=Wt,Kt=function e(t,n){var r,i,o,a,s,u=[];if(!n.length)return null;for(r=0;r<t.byteLength;)i=Gt(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),o=$t(t.subarray(r+4,r+8)),a=i>1?r+i:t.byteLength,o===n[0]&&(1===n.length?u.push(t.subarray(r+8,a)):(s=e(t.subarray(r+8,a),n.slice(1))).length&&(u=u.concat(s))),r=a;return u},Yt=Wt,Xt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Yt(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Yt(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},Qt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Jt=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],o=4&n.flags[2],a=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),f=8;for(i&&(n.dataOffset=r.getInt32(f),f+=4),o&&c&&(t={flags:Qt(e.subarray(f,f+4))},f+=4,a&&(t.duration=r.getUint32(f),f+=4),s&&(t.size=r.getUint32(f),f+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(f):t.compositionTimeOffset=r.getUint32(f),f+=4),n.samples.push(t),c--);c--;)t={},a&&(t.duration=r.getUint32(f),f+=4),s&&(t.size=r.getUint32(f),f+=4),u&&(t.flags=Qt(e.subarray(f,f+4)),f+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(f):t.compositionTimeOffset=r.getUint32(f),f+=4),n.samples.push(t);return n},Zt=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r},en=Re,tn=ze.CaptionStream,nn=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},rn=function(e,t){var n=Kt(e,["moof","traf"]),r=Kt(e,["mdat"]),i={},o=[];return r.forEach((function(e,t){var r=n[t];o.push({mdat:e,traf:r})})),o.forEach((function(e){var n,r=e.mdat,o=e.traf,a=Kt(o,["tfhd"]),s=Zt(a[0]),u=s.trackId,l=Kt(o,["tfdt"]),c=l.length>0?Xt(l[0]).baseMediaDecodeTime:0,f=Kt(o,["trun"]);t===u&&f.length>0&&(n=function(e,t,n){var r,i,o,a,s=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(i=0;i+4<e.length;i+=o)if(o=s.getUint32(i),i+=4,!(o<=0))switch(31&e[i]){case 6:var l=e.subarray(i+1,i+1+o),c=nn(i,t);if(r={nalUnitType:"sei_rbsp",size:o,data:l,escapedRBSP:en(l),trackId:n},c)r.pts=c.pts,r.dts=c.dts,a=c;else{if(!a){console.log("We've encountered a nal unit without data. See mux.js#233.");break}r.pts=a.pts,r.dts=a.dts}u.push(r)}return u}(r,function(e,t,n){var r=t,i=n.defaultSampleDuration||0,o=n.defaultSampleSize||0,a=n.trackId,s=[];return e.forEach((function(e){var t=Jt(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=o),e.trackId=a,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration})),s=s.concat(t)})),s}(f,c,s),u),i[u]||(i[u]=[]),i[u]=i[u].concat(n))})),i},on=function(){var e,t,n,r,i,o,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new tn,a=!0,o=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(n!==e[0]||r!==t[n])},this.parse=function(e,o,a){var s;if(!this.isInitialized())return null;if(!o||!a)return null;if(this.isNewInit(o,a))n=o[0],r=a[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,o,a)}return null!==(s=function(e,t,n){return null===t?null:{seiNals:rn(e,t)[t],timescale:n}}(e,n,r))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;o?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},an=function(e){return"AudioSegmentStream"===e?"audio":"VideoSegmentStream"===e?"video":""},sn=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=this.options.handlePartialData?new qt(this.options):new It.Transmuxer(this.options),this.options.handlePartialData?function(e,t){t.on("data",(function(t){var n={data:t.data.track.initSegment.buffer,byteOffset:t.data.track.initSegment.byteOffset,byteLength:t.data.track.initSegment.byteLength},r={boxes:{data:t.data.boxes.buffer,byteOffset:t.data.boxes.byteOffset,byteLength:t.data.boxes.byteLength},initSegment:n,type:t.type,sequence:t.data.sequence};void 0!==t.data.videoFrameDts&&(r.videoFrameDtsTime=ye(t.data.videoFrameDts)),void 0!==t.data.videoFramePts&&(r.videoFramePtsTime=ye(t.data.videoFramePts)),e.postMessage({action:"data",segment:r},[r.boxes.data,r.initSegment.data])})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("done",(function(t){e.postMessage({action:"done",type:an(t)})})),t.on("partialdone",(function(t){e.postMessage({action:"partialdone",type:an(t)})})),t.on("endedsegment",(function(t){e.postMessage({action:"endedSegment",type:an(t)})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){if(null!==t.start){var n={start:ye(t.start)};t.end&&(n.end=ye(t.end)),e.postMessage({action:"audioTimingInfo",audioTimingInfo:n})}else e.postMessage({action:"audioTimingInfo",audioTimingInfo:t})})),t.on("videoTimingInfo",(function(t){var n={start:ye(t.start)};t.end&&(n.end=ye(t.end)),e.postMessage({action:"videoTimingInfo",videoTimingInfo:n})}))}(this.self,this.transmuxer):function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:ye(t.start.dts),presentation:ye(t.start.pts)},end:{decode:ye(t.end.dts),presentation:ye(t.end.pts)},baseMediaDecodeTime:ye(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ye(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:ye(t.start.dts),presentation:ye(t.start.pts)},end:{decode:ye(t.end.dts),presentation:ye(t.end.pts)},baseMediaDecodeTime:ye(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ye(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ye(t.start),end:ye(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ye(t.start),end:ye(t.end)}})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new on,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],data:t.buffer},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(pe(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(pe(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),n.postMessage({action:"done",type:"transmuxed"})},t.partialFlush=function(e){this.transmuxer.partialFlush(),n.postMessage({action:"partialdone",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),n.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();new function(e){e.onmessage=function(t){"init"===t.data.action&&t.data.options?this.messageHandlers=new sn(e,t.data.options):(this.messageHandlers||(this.messageHandlers=new sn(e)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(n)}()})),Ss=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Es=function(e,t){var n=t.attributes||{},r=function(e){var t=e.attributes||{};if(t.CODECS)return Object(Ue.parseCodecs)(t.CODECS)}(t)||{};if(Ss(e,t)&&!r.audio&&!function(e,t){if(!Ss(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(e,t)){var i=Object(Ue.codecsFromDefault)(e,n.AUDIO);i&&(r.audio=i.audio)}var o={};return r.video&&(o.video=Object(Ue.translateLegacyCodec)(""+r.video.type+r.video.details)),r.audio&&(o.audio=Object(Ue.translateLegacyCodec)(""+r.audio.type+r.audio.details)),r.text&&(o.text=r.text.type),r.unknown&&(o.unknown=r.unknown),o},Cs=function(e){return zo.log.debug?zo.log.debug.bind(zo,"VHS:",e+" >"):function(){}},ks=Cs("PlaylistSelector"),xs=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Os=function(e,t){if(!e)return"";var n=a.a.getComputedStyle(e);return n?n[t]:""},Ps=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},Rs=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||a.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||a.a.Number.MAX_VALUE)},As=function(e,t,n,r,i){if(e){var o={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:i},s=e.playlists.map((function(e){var t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes.BANDWIDTH||a.a.Number.MAX_VALUE,width:t,height:n,playlist:e}}));Ps(s,(function(e,t){return e.bandwidth-t.bandwidth}));var u=(s=s.filter((function(e){return!Sa.isIncompatible(e.playlist)}))).filter((function(e){return Sa.isEnabled(e.playlist)}));u.length||(u=s.filter((function(e){return!Sa.isDisabled(e.playlist)})));var l=u.filter((function(e){return e.bandwidth*Wa.BANDWIDTH_VARIANCE<t})),c=l[l.length-1],f=l.filter((function(e){return e.bandwidth===c.bandwidth}))[0];if(!1===i){var h=f||u[0]||s[0];if(h&&h.playlist){var d="sortedPlaylistReps";return f&&(d="bandwidthBestRep"),u[0]&&(d="enabledPlaylistReps"),ks("choosing "+xs(h)+" using "+d+" with options",o),h.playlist}return ks("could not choose a playlist with options",o),null}var p=l.filter((function(e){return e.width&&e.height}));Ps(p,(function(e,t){return e.width-t.width}));var y=p.filter((function(e){return e.width===n&&e.height===r}));c=y[y.length-1];var m,v,g,b=y.filter((function(e){return e.bandwidth===c.bandwidth}))[0];b||(v=(m=p.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===m[0].width&&e.height===m[0].height})),c=v[v.length-1],g=v.filter((function(e){return e.bandwidth===c.bandwidth}))[0]);var _=g||b||f||u[0]||s[0];if(_&&_.playlist){var w="sortedPlaylistReps";return g?w="resolutionPlusOneRep":b?w="resolutionBestRep":f?w="bandwidthBestRep":u[0]&&(w="enabledPlaylistReps"),ks("choosing "+xs(_)+" using "+w+" with options",o),_.playlist}return ks("could not choose a playlist with options",o),null}},js=function(){var e=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return As(this.playlists.master,this.systemBandwidth,parseInt(Os(this.tech_.el(),"width"),10)*e,parseInt(Os(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions)},Is=function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,i=e.videoDuration;if(n){var o=a.a.WebKitDataCue||a.a.VTTCue,s=t.metadataTrack_;if(s&&(n.forEach((function(e){var t=e.cueTime+r;!("number"!=typeof t||a.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new o(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return zo.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return zo.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return zo.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),s.addCue(n)}))})),s.cues&&s.cues.length)){for(var u=s.cues,l=[],c=0;c<u.length;c++)u[c]&&l.push(u[c]);var f=l.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),h=Object.keys(f).sort((function(e,t){return Number(e)-Number(t)}));h.forEach((function(e,t){var n=f[e],r=Number(h[t+1])||i;n.forEach((function(e){e.endTime=r}))}))}}},Ls=function(e,t,n){var r,i;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime>=e&&i.endTime<=t&&n.removeCue(i)},Ds=function(e){return"number"==typeof e&&isFinite(e)},Ms=function(e){return e+"TimingInfo"},Ns=function(e){var t=e.segmentTimeline,n=e.currentTimeline,r=e.startOfSegment,i=e.buffered;return e.overrideCheck||t!==n?t<n?r:i.length?i.end(i.length-1):r:null},Bs=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,o=e.audioDisabled;if(n===r)return!1;if("audio"===i){var a=t.lastTimelineChange({type:"main"});return!a||a.to!==r}if("main"===i&&o){var s=t.pendingTimelineChange({type:"audio"});return!s||s.to!==r}return!1},Us=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+1/30},Fs=function(e,t){if("hls"!==t)return null;var n,r,i,o,a=(n=e.audioTimingInfo,r=e.videoTimingInfo,i=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,o=r&&"number"==typeof r.start&&"number"==typeof r.end?r.end-r.start:0,Math.max(i,o));if(!a)return null;var s=e.playlist.targetDuration,u=Us({segmentDuration:a,maxDuration:2*s}),l=Us({segmentDuration:a,maxDuration:s}),c="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+a+" when the reported duration is "+e.duration+" and the target duration is "+s+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return u||l?{severity:u?"warn":"info",message:c}:null},Vs=function(e){function t(t,n){var r;if(r=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=t.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.hasPlayed_=t.hasPlayed,r.currentTime_=t.currentTime,r.seekable_=t.seekable,r.seeking_=t.seeking,r.duration_=t.duration,r.mediaSource_=t.mediaSource,r.vhs_=t.vhs,r.loaderType_=t.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=t.segmentMetadataTrack,r.goalBufferLength_=t.goalBufferLength,r.sourceType_=t.sourceType,r.sourceUpdater_=t.sourceUpdater,r.inbandTextTracks_=t.inbandTextTracks,r.state_="INIT",r.handlePartialData_=t.handlePartialData,r.timelineChangeController_=t.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=zo.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=Cs("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(h()(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}p()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){var e=new Ts;return e.postMessage({action:"init",options:{remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,handlePartialData:this.handlePartialData_}}),e},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&(this.transmuxer_.terminate(),es()),this.resetStats_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_)},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Za(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return zo.createTimeRanges();if("main"===this.loaderType_){var e=this.startingMediaInfo_,t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Ia(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=La(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0});var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return(null!==this.mediaIndex||this.handlePartialData_)&&this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var o=e.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+o+"]"),null!==this.mediaIndex&&(this.mediaIndex-=o),r&&(r.mediaIndex-=o,r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&Za(this.transmuxer_),this.mediaIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n){if(void 0===n&&(n=function(){}),t===1/0&&(t=this.duration_()),this.sourceUpdater_&&this.currentMediaInfo_){var r=1,i=function(){0===--r&&n()};for(var o in this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,i)),"main"===this.loaderType_&&this.currentMediaInfo_&&this.currentMediaInfo_.hasVideo&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*Me.ONE_SECOND_IN_TS),o=Math.ceil((n-r)*Me.ONE_SECOND_IN_TS),a=e.slice(),s=e.length;s--&&!(e[s].pts<=o););if(-1===s)return a;for(var u=s+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),a.splice(u,s-u+1),a}(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,i)),this.inbandTextTracks_)Ls(e,t,this.inbandTextTracks_[o]);Ls(e,t,this.segmentMetadataTrack_),i()}},n.monitorBuffer_=function(){this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.buffered_(),t=this.checkBuffer_(e,this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);t&&(t.timestampOffset=Ns({segmentTimeline:t.timeline,currentTimeline:this.currentTimeline_,startOfSegment:t.startOfSegment,buffered:e,overrideCheck:this.isPendingTimestampOffset_}),this.isPendingTimestampOffset_=!1,"number"==typeof t.timestampOffset&&this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),this.loadSegment_(t))}},n.isEndOfStream_=function(e,t){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),!t||!this.mediaSource_)return!1;var n=e+1===t.segments.length;return t.endList&&"open"===this.mediaSource_.readyState&&n},n.checkBuffer_=function(e,t,n,r,i,o){var a=0;e.length&&(a=e.end(e.length-1));var s=Math.max(0,a-i);if(!t.segments.length)return null;if(s>=this.goalBufferLength_())return null;if(!r&&s>=1)return null;var u,l=null,c=!1;if(null===o)l=this.getSyncSegmentCandidate_(t),c=!0;else if(null!==n){var f=t.segments[n];u=f&&f.end?f.end:a,l=n+1}else if(this.fetchAtBuffer_){var h=Sa.getMediaInfoForTime(t,a,o.segmentIndex,o.time);l=h.mediaIndex,u=h.startTime}else{var d=Sa.getMediaInfoForTime(t,i,o.segmentIndex,o.time);l=d.mediaIndex,u=d.startTime}var p=this.generateSegmentInfo_(t,l,u,c);return!p||this.mediaSource_&&this.playlist_&&p.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?void 0:(this.logger_("checkBuffer_ returning "+p.uri,{segmentInfo:p,playlist:t,currentMediaIndex:n,nextMediaIndex:l,startOfSegment:u,isSyncRequest:c}),p)},n.getSyncSegmentCandidate_=function(e){var t=this;if(-1===this.currentTimeline_)return 0;var n=e.segments.map((function(e,t){return{timeline:e.timeline,segmentIndex:t}})).filter((function(e){return e.timeline===t.currentTimeline_}));return n.length?n[Math.min(n.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)},n.generateSegmentInfo_=function(e,t,n,r){if(t<0||t>=e.segments.length)return null;var i,o,a=e.segments[t],s=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();return s.length&&(i=s.end(s.length-1)-this.sourceUpdater_.audioTimestampOffset()),u.length&&(o=function(e,t,n){if(null==t||!e.length)return[];var r,i=Math.ceil((t-n+3)*Me.ONE_SECOND_IN_TS);for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),{requestId:"segment-loader-"+Math.random(),uri:a.resolvedUri,mediaIndex:t,isSyncRequest:r,startOfSegment:n,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:a.timeline,duration:a.duration,segment:a,byteLength:0,transmuxer:this.transmuxer_,audioAppendStart:i,gopsToAlignWith:o}},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=Sa.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),o=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(i<=o)){var a=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,i=e.duration,o=e.segmentDuration,a=e.timeUntilRebuffer,s=e.currentTimeline,u=e.syncController,l=t.playlists.filter((function(e){return!Sa.isIncompatible(e)})),c=l.filter(Sa.isEnabled);c.length||(c=l.filter((function(e){return!Sa.isDisabled(e)})));var f=c.filter(Sa.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=u.getSyncPoint(e,i,s,n)?1:2;return{playlist:e,rebufferingImpact:Sa.estimateSegmentRequestTime(o,r,e)*t-a}})),h=f.filter((function(e){return e.rebufferingImpact<=0}));return Ps(h,(function(e,t){return Rs(t.playlist,e.playlist)})),h.length?h[0]:(Ps(f,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),f[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var s=i-o-a.rebufferingImpact,u=.5;o<=1/30&&(u=1),!a.playlist||a.playlist.uri===this.playlist_.uri||s<u||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Wa.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(){this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var o=n[i];if(o!==r[i])return!1;if(e[o]!==t[o])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var i=this.pendingSegment_,o=Ms(t);i[o]=i[o]||{},i[o][n]=r,this.logger_("timinginfo: "+t+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),i={};t.forEach((function(e){i[e.stream]=i[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=i[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)})),Object.keys(i).forEach((function(e){var t=i[e],o=t.startTime,s=t.endTime,u=t.captions,l=n.inbandTextTracks_;n.logger_("adding cues from "+o+" -> "+s+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=t.textTracks().getTrackById(n);e[n]=r||t.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(l,n.vhs_.tech_,e),Ls(o,s,l[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var i=a.a.WebKitDataCue||a.a.VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new i(e.startTime+r,e.endTime+r,e.text))}))}}({captionArray:u,inbandTextTracks:l,timestampOffset:r})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),Is({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.currentMediaInfo_||!Bs({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;var e=this.pendingSegment_;if(!e||!e.trackInfo)return!1;if(!this.handlePartialData_){var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed;if(r&&!e.videoTimingInfo)return!1;if(n&&!this.audioDisabled_&&!i&&!e.audioTimingInfo)return!1}return!Bs({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[Ms(t.type)].start;else{var r,i="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo;i&&(r=this.handlePartialData_?t.videoFramePtsTime:n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:i,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var o=Ia(r);if(this.activeInitSegmentId_===o)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=o}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!!r,this.activeInitSegmentId_=null,n):null},n.appendToSourceBuffer_=function(e){var t=this,n=e.segmentInfo,r=e.type,i=e.initSegment,o=e.data,a=[o],s=o.byteLength;i&&(a.unshift(i),s+=i.byteLength);var u,l,c,f=(c=0,(u={bytes:s,segments:a}).bytes&&(l=new Uint8Array(u.bytes),u.segments.forEach((function(e){l.set(e,c),c+=e.byteLength}))),l);this.sourceUpdater_.appendBuffer({segmentInfo:n,type:r,bytes:f},(function(e){e&&(t.error(r+" append of "+f.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),t.trigger("appenderror"))}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=e+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=t.buffered_();"number"==typeof e.timestampOffset&&(e.timestampOffset=Ns({segmentTimeline:e.timeline,currentTimeline:t.currentTimeline_,startOfSegment:e.startOfSegment,buffered:n,overrideCheck:!0})),delete e.audioAppendStart;var r=t.sourceUpdater_.audioBuffered();r.length&&(e.audioAppendStart=r.end(r.length-1)-t.sourceUpdater_.audioTimestampOffset()),t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var t=this.createSimplifiedSegmentObj_(e);e.abortRequests=fs({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,handlePartialData:this.handlePartialData_,abortFn:this.handleAbort_.bind(this),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-Wa.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith},r=e.playlist.segments[e.mediaIndex-1];if(r&&r.timeline===t.timeline&&(r.videoTimingInfo?n.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(n.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),t.key){var i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);n.key=this.segmentKey(t.key),n.key.iv=i}return t.map&&(n.map=this.initSegmentForMap(t.map)),n},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+1/60):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===is)return;return this.pause(),e.code===rs?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING";var i=this.isEndOfStream_(r.mediaIndex,r.playlist),o=null!==this.mediaIndex,a=r.timeline!==this.currentTimeline_&&r.timeline>0;!r.isFmp4&&(i||o&&a)&&ts(this.transmuxer_),this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,o=e.currentVideoTimestampOffset,a=e.useVideoTimingInfo,s=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!a)return u.start;var l=n.segments[r-1];return 0!==r&&l&&void 0!==l.start&&l.end===i+o?s.start:i},n.waitForAppendsToComplete_=function(e){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed,o="main"===this.loaderType_&&r,a=!this.audioDisabled_&&n&&!i;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);o&&e.waitingOnAppends++,a&&e.waitingOnAppends++,o&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.currentMediaInfo_,e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_(function(e){var t=e.segment,n=t.start,r=t.end,i=e.playlist,o=i.mediaSequence,a=i.id,s=i.segments,u=void 0===s?[]:s,l=e.mediaIndex,c=e.timeline;return["appending ["+l+"] of ["+o+", "+(o+u.length)+"] from playlist ["+a+"]","["+n+" => "+r+"] in timeline ["+c+"]"].join(" ")}(e));var t=Fs(e,this.sourceType_);if(t&&("warn"===t.severity?zo.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest)this.trigger("syncinfoupdate");else{this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment;if(n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration)this.resetEverything();else null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.isEndOfStream_(e.mediaIndex,e.playlist)&&this.endOfStream(),this.trigger("appended"),this.paused()||this.monitorBuffer_()}},n.recordThroughput_=function(e){if(e.duration<1/60)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(Ds(n)&&Ds(r)){Ls(n,r,this.segmentMetadataTrack_);var i=a.a.WebKitDataCue||a.a.VTTCue,o={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:r},s=new i(n,r,JSON.stringify(o));s.value=o,this.segmentMetadataTrack_.addCue(s)}}},t}(zo.EventTarget);function Hs(){}var zs,qs=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Ws=["video","audio"],$s=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},Gs=function e(t,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!$s(t,n)){if(i.type!==t){if(null===(r=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("mediaSource"===r.type)return null;if(r.type===e)return n}return null}(t,n.queue)))return;i=n.queue[r]}n.queue.splice(r,1),i.action(t,n),i.doneFn?n.queuePending[t]=i:e(t,n)}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),i.action(n),i.doneFn&&i.doneFn(),e("audio",n),e("video",n))}},Ks=function(e,t){var n=t[e+"Buffer"],r=qs(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},Ys=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},Xs=function(e,t){return function(n,r){var i=r[n+"Buffer"];Ys(r.mediaSource,i)&&(r.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+n+"Buffer"),i.appendBuffer(e))}},Qs=function(e,t){return function(n,r){var i=r[n+"Buffer"];Ys(r.mediaSource,i)&&(r.logger_("Removing "+e+" to "+t+" from "+n+"Buffer"),i.remove(e,t))}},Js=function(e){return function(t,n){var r=n[t+"Buffer"];Ys(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},Zs=function(e){return function(t,n){e()}},eu=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){zo.log.warn("Failed to call media source endOfStream",e)}}}},tu=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(e){zo.log.warn("Failed to set media source duration",e)}}},nu=function(){return function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(Ys(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){zo.log.warn("Failed to abort on "+e+"Buffer",t)}}}}},ru=function(e,t){return function(n){var r=qs(e),i=Object(Ue.getMimeForCodec)(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var o=n.mediaSource.addSourceBuffer(i);o.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),o.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=o}},iu=function(e){return function(t){var n=t[e+"Buffer"];if(Ks(e,t),Ys(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){zo.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},ou=function(e){return function(t,n){var r=n[t+"Buffer"],i=Object(Ue.getMimeForCodec)(e);Ys(n.mediaSource,r)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),r.changeType(i),n.codecs[t]=e)}},au=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,i=e.doneFn,o=e.name;n.queue.push({type:t,action:r,doneFn:i,name:o}),Gs(t,n)},su=function(e,t){return function(n){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}Gs(e,t)}},uu=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return Gs("mediaSource",h()(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=Cs("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=su("video",h()(n)),n.onAudioUpdateEnd_=su("audio",h()(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}p()(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){au({type:"mediaSource",sourceUpdater:this,action:ru(e,t),name:"addSourceBuffer"})},n.abort=function(e){au({type:e,sourceUpdater:this,action:nu(e),name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?au({type:"mediaSource",sourceUpdater:this,action:iu(e),name:"removeSourceBuffer"}):zo.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!zo.browser.IE_VERSION&&!zo.browser.IS_FIREFOX&&a.a.MediaSource&&a.a.MediaSource.prototype&&"function"==typeof a.a.MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return a.a.SourceBuffer&&a.a.SourceBuffer.prototype&&"function"==typeof a.a.SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?au({type:e,sourceUpdater:this,action:ou(t),name:"changeType"}):zo.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(n){var r=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,r);t.canChangeType()&&t.changeType(n,r)}))},n.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,i=e.type,o=e.bytes;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+o.length+" until video append");if(au({type:i,sourceUpdater:this,action:Xs(o,r||{mediaIndex:-1}),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var a=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+a.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,a.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return Ys(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:zo.createTimeRange()},n.videoBuffered=function(){return Ys(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:zo.createTimeRange()},n.buffered=function(){var e=Ys(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Ys(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,r=null,i=0,o=[],a=[];if(!(e&&e.length&&t&&t.length))return zo.createTimeRange();for(var s=e.length;s--;)o.push({time:e.start(s),type:"start"}),o.push({time:e.end(s),type:"end"});for(s=t.length;s--;)o.push({time:t.start(s),type:"start"}),o.push({time:t.end(s),type:"end"});for(o.sort((function(e,t){return e.time-t.time})),s=0;s<o.length;s++)"start"===o[s].type?2===++i&&(n=o[s].time):"end"===o[s].type&&1===--i&&(r=o[s].time),null!==n&&null!==r&&(a.push([n,r]),n=null,r=null);return zo.createTimeRanges(a)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=Hs),au({type:"mediaSource",sourceUpdater:this,action:tu(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=Hs),"string"!=typeof e&&(e=void 0),au({type:"mediaSource",sourceUpdater:this,action:eu(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=Hs),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?au({type:"audio",sourceUpdater:this,action:Qs(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=Hs),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?au({type:"video",sourceUpdater:this,action:Qs(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!$s("audio",this)&&!$s("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(au({type:"audio",sourceUpdater:this,action:Js(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(au({type:"video",sourceUpdater:this,action:Js(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&au({type:"audio",sourceUpdater:this,action:Zs(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&au({type:"video",sourceUpdater:this,action:Zs(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),Ws.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return Ks(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(zo.EventTarget),lu=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},cu=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),fu=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).handlePartialData_=!1,r.mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.shouldSaveSegmentTimingInfo_=!1,r}p()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return zo.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return zo.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Ia(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=cu.byteLength+e.bytes.byteLength,o=new Uint8Array(i);o.set(e.bytes),o.set(cu,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return r||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){Ls(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t=this.skipEmptySegments_(t)){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===rs&&this.handleTimeout_(),e.code===is?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),this.state="APPENDING",this.trigger("appending");var o=i.segment;if(o.map&&(o.map.bytes=t.map.bytes),i.bytes=t.bytes,"function"!=typeof a.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var s,u=function(){r.subtitlesTrack_.tech_.off("vttjsloaded",s),r.stopForError({message:"Error loading vtt.js"})};return s=function(){r.subtitlesTrack_.tech_.off("vttjserror",u),r.segmentRequestFinished_(e,t,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",s),void this.subtitlesTrack_.tech_.one("vttjserror",u)}o.requested=!0;try{this.parseVTTCues_(i)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,i.cues.forEach((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new a.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var r=[],i=0,o=0;o<t.length;o++)t[n].startTime===t[o].startTime&&t[n].endTime===t[o].endTime&&t[n].text===t[o].text&&++i>1&&r.push(t[o]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;"function"==typeof a.a.TextDecoder?t=new a.a.TextDecoder("utf8"):(t=a.a.WebVTT.StringDecoder(),n=!0);var r=new a.a.WebVTT.Parser(a.a,a.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){zo.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var i=e.segment.map.bytes;n&&(i=lu(i)),r.parse(i)}var o=e.bytes;n&&(o=lu(o)),r.parse(o),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,o=i.MPEGTS/Me.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=o,e.endTime+=o})),!n.syncInfo){var a=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(a,s-r.duration)}}}else r.empty=!0},t}(Vs),hu=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},du=[{name:"VOD",run:function(e,t,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!e.datetimeToDisplayTime)return null;var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var l=o[u];if(l.dateTimeObject){var c=l.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,f=Math.abs(i-c);if(null!==s&&(0===f||s<f))break;s=f,a={time:c,segmentIndex:u}}}return a}},{name:"Segment",run:function(e,t,n,r,i){var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var l=o[u];if(l.timeline===r&&void 0!==l.start){var c=Math.abs(i-l.start);if(null!==s&&s<c)break;(!a||null===s||s>=c)&&(s=c,a={time:l.start,segmentIndex:u})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var o=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var a=null,s=0;s<t.discontinuityStarts.length;s++){var u=t.discontinuityStarts[s],l=t.discontinuitySequence+s+1,c=e.discontinuities[l];if(c){var f=Math.abs(i-c.time);if(null!==a&&a<f)break;(!o||null===a||a>=f)&&(a=f,o={time:c.time,segmentIndex:u})}}return o}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],pu=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.datetimeToDisplayTime=null,n.logger_=Cs("SyncController"),n}p()(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+ya(e,r.segmentIndex,0))},n.runStrategies_=function(e,t,n,r){for(var i=[],o=0;o<du.length;o++){var a=du[o],s=a.run(this,e,t,n,r);s&&(s.strategy=a.name,i.push({strategy:a.name,syncPoint:s}))}return i},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,o=1;o<e.length;o++){var a=Math.abs(e[o].syncPoint[t.key]-t.value);a<r&&(r=a,n=e[o].syncPoint,i=e[o].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n},n.saveExpiredSegmentInfo=function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMapping=function(e){if(!this.datetimeToDisplayTime&&e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping;this.calculateSegmentTimeMapping_(t,t.timingInfo,n)&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:t.segment.start}))},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var r=e.segment,i=this.timelines[e.timeline];if(null!==e.timestampOffset)i={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=i,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+i.time+"] [mapping: "+i.mapping+"]")),r.start=e.startOfSegment,r.end=t.end+i.mapping;else{if(!i)return!1;r.start=t.start+i.mapping,r.end=t.end+i.mapping}return!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],o=t.discontinuitySequence+r+1,a=i-e.mediaIndex,s=Math.abs(a);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>s){var u=void 0;u=a<0?n.start-ya(t,e.mediaIndex,i):n.end+ya(t,e.mediaIndex+1,i),this.discontinuities[o]={time:u,accuracy:s}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(zo.EventTarget),yu=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}p()(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(zo.EventTarget),mu=new vs("./decrypter-worker.worker.js",(function(e,t){var n=this;
|
|
82
|
-
/*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */!function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var t=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t};var r=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t},i=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();
|
|
83
|
-
/*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */
|
|
84
|
-
/*! @name aes-decrypter @version 3.1.0 @license Apache-2.0 */
|
|
85
|
-
var o=null,a=function(){function e(e){var t,n,r;o||(o=function(){var e,t,n,r,i,o,a,s,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],c=u[1],f=l[4],h=c[4],d=[],p=[];for(e=0;e<256;e++)p[(d[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!f[t];t^=r||1,n=p[n]||1)for(o=(o=n^n<<1^n<<2^n<<3^n<<4)>>8^255&o^99,f[t]=o,h[o]=t,s=16843009*d[i=d[r=d[t]]]^65537*i^257*r^16843008*t,a=257*d[o]^16843008*o,e=0;e<4;e++)l[e][t]=a=a<<24^a>>>8,c[e][o]=s=s<<24^s>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}()),this._tables=[[o[0][0].slice(),o[0][1].slice(),o[0][2].slice(),o[0][3].slice(),o[0][4].slice()],[o[1][0].slice(),o[1][1].slice(),o[1][2].slice(),o[1][3].slice(),o[1][4].slice()]];var i=this._tables[0][4],a=this._tables[1],s=e.length,u=1;if(4!==s&&6!==s&&8!==s)throw new Error("Invalid aes key size");var l=e.slice(0),c=[];for(this._key=[l,c],t=s;t<4*s+28;t++)r=l[t-1],(t%s==0||8===s&&t%s==4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],t%s==0&&(r=r<<8^r>>>24^u<<24,u=u<<1^283*(u>>7))),l[t]=l[t-s]^r;for(n=0;t;n++,t--)r=l[3&n?t:t-4],c[n]=t<=4||n<4?r:a[0][i[r>>>24]]^a[1][i[r>>16&255]]^a[2][i[r>>8&255]]^a[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,o){var a,s,u,l,c=this._key[1],f=e^c[0],h=r^c[1],d=n^c[2],p=t^c[3],y=c.length/4-2,m=4,v=this._tables[1],g=v[0],b=v[1],_=v[2],w=v[3],T=v[4];for(l=0;l<y;l++)a=g[f>>>24]^b[h>>16&255]^_[d>>8&255]^w[255&p]^c[m],s=g[h>>>24]^b[d>>16&255]^_[p>>8&255]^w[255&f]^c[m+1],u=g[d>>>24]^b[p>>16&255]^_[f>>8&255]^w[255&h]^c[m+2],p=g[p>>>24]^b[f>>16&255]^_[h>>8&255]^w[255&d]^c[m+3],m+=4,f=a,h=s,d=u;for(l=0;l<4;l++)i[(3&-l)+o]=T[f>>>24]<<24^T[h>>16&255]<<16^T[d>>8&255]<<8^T[255&p]^c[m++],a=f,f=h,h=d,d=p,p=a},e}(),s=function(e){function t(){var t;return(t=e.call(this,i)||this).jobs=[],t.delay=1,t.timeout_=null,t}r(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(i),u=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},l=function(){function e(t,n,r,i){var o=e.STEP,a=new Int32Array(t.buffer),l=new Uint8Array(t.byteLength),c=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(a.subarray(c,c+o),n,r,l)),c=o;c<a.length;c+=o)r=new Uint32Array([u(a[c-4]),u(a[c-3]),u(a[c-2]),u(a[c-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(c,c+o),n,r,l));this.asyncStream_.push((function(){
|
|
86
|
-
/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
|
|
87
|
-
var e;i(null,(e=l).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=function(e,t,n){var r,i,o,s,l,c,f,h,d,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),y=new a(Array.prototype.slice.call(t)),m=new Uint8Array(e.byteLength),v=new Int32Array(m.buffer);for(r=n[0],i=n[1],o=n[2],s=n[3],d=0;d<p.length;d+=4)l=u(p[d]),c=u(p[d+1]),f=u(p[d+2]),h=u(p[d+3]),y.decrypt(l,c,f,h,v,d),v[d]=u(v[d]^r),v[d+1]=u(v[d+1]^i),v[d+2]=u(v[d+2]^o),v[d+3]=u(v[d+3]^s),r=l,i=c,o=f,s=h;return m}(e,t,n);r.set(i,e.byteOffset)}},t(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();new function(e){e.onmessage=function(t){var n=t.data,r=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),i=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),o=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new l(r,i,o,(function(t,r){var i,o;e.postMessage((i={source:n.source,decrypted:r},o={},Object.keys(i).forEach((function(e){var t=i[e];ArrayBuffer.isView(t)?o[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:o[e]=t})),o),[r.buffer])}))}}(n)}()})),vu=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},gu=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},bu=function(e,t){t.activePlaylistLoader=e,e.load()},_u={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;gu(n,r);var o=r.activeTrack(),a=r.activeGroup(),s=(a.filter((function(e){return e.default}))[0]||a[0]).id,u=r.tracks[s];if(o!==u){for(var l in zo.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];zo.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),gu(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},wu={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",_u[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),o.track(a.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",_u[e](e,n))}},Tu={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],o=t.requestOptions,a=t.master,s=a.mediaGroups,u=a.playlists,l=t.mediaTypes[e],c=l.groups,f=l.tracks,h=t.masterPlaylistLoader;s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}});var d=function(i){c[i]||(c[i]=[]);var a=u.filter((function(t){return t.attributes[e]===i})),l=function(u){var l=s[e][i][u];!a.filter((function(e){return e.resolvedUri!==l.resolvedUri})).length&&a.length&&delete l.resolvedUri;var d=void 0;if(d="vhs-json"===r&&l.playlists?new aa(l.playlists[0],n,o):l.resolvedUri?new aa(l.resolvedUri,n,o):l.playlists&&"dash"===r?new qa(l.playlists[0],n,o,h):null,l=zo.mergeOptions({id:u,playlistLoader:d},l),wu[e](e,l.playlistLoader,t),c[i].push(l),void 0===f[u]){var p=new zo.AudioTrack({id:u,kind:vu(l),enabled:!1,language:l.language,default:l.default,label:u});f[u]=p}};for(var d in s[e][i])l(d)};for(var p in s[e])d(p);i.on("error",_u[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,o=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,f=t.masterPlaylistLoader;for(var h in s[e])for(var d in l[h]||(l[h]=[]),s[e][h])if(!s[e][h][d].forced){var p=s[e][h][d],y=void 0;if("hls"===i)y=new aa(p.resolvedUri,r,a);else if("dash"===i){if(!p.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;y=new qa(p.playlists[0],r,a,f)}else"vhs-json"===i&&(y=new aa(p.playlists?p.playlists[0]:p.resolvedUri,r,a));if(p=zo.mergeOptions({id:d,playlistLoader:y},p),wu[e](e,p.playlistLoader,t),l[h].push(p),void 0===c[d]){var m=n.addRemoteTextTrack({id:d,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:d},!1).track;c[d]=m}}o.on("error",_u[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],o=i.groups,a=i.tracks;for(var s in r[e])for(var u in o[s]||(o[s]=[]),r[e][s]){var l=r[e][s][u];if(l.instreamId.match(/CC\d/)&&(o[s].push(zo.mergeOptions({id:u},l)),void 0===a[u])){var c=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;a[u]=c}}}},Su={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},Eu=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Tu[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,o=r.media();if(!o)return null;var a=null;return o.attributes[e]&&(a=i[o.attributes[e]]),a=a||i.main,void 0===n?a:null===n?null:a.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=Su[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;gu(r,o),s&&(s.playlistLoader?(r.resyncLoader(),bu(s.playlistLoader,o)):u&&i.resetEverything())}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;if(gu(r,o),s){if("AUDIO"===e){if(!s.playlistLoader)return i.setAudio(!0),void i.resetEverything();r.setAudio(!0),i.setAudio(!1)}u!==s.playlistLoader?(r.track&&r.track(a),r.resetEverything(),bu(s.playlistLoader,o)):bu(s.playlistLoader,o)}}}(n,e)}));var o=t.AUDIO.activeGroup();if(o){var a=(o.filter((function(e){return e.default}))[0]||o[0]).id;t.AUDIO.tracks[a].enabled=!0,t.AUDIO.onTrackChanged()}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var s=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var u in r.audioTracks().addEventListener("change",s),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",s),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[u])},Cu=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],ku=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},xu=function(e){function t(t){var n;n=e.call(this)||this;var r,i=t.src,o=t.handleManifestRedirects,s=t.withCredentials,u=t.tech,l=t.bandwidth,c=t.externVhs,f=t.useCueTags,d=t.blacklistDuration,p=t.enableLowInitialPlaylist,y=t.sourceType,m=t.cacheEncryptionKeys,v=t.handlePartialData,g=t.experimentalBufferBasedABR;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");zs=c,n.experimentalBufferBasedABR=Boolean(g),n.withCredentials=s,n.tech_=u,n.vhs_=u.vhs,n.sourceType_=y,n.useCueTags_=f,n.blacklistDuration=d,n.enableLowInitialPlaylist=p,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:s,handleManifestRedirects:o,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=(r={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Hs,activeTrack:Hs,onGroupChanged:Hs,onTrackChanged:Hs}})),r),n.mediaSource=new a.a.MediaSource,n.handleDurationChange_=n.handleDurationChange_.bind(h()(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(h()(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(h()(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=zo.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new pu(t),n.segmentMetadataTrack_=u.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new mu,n.sourceUpdater_=new uu(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new yu;var b={vhs:n.vhs_,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:l,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:m,handlePartialData:v,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_};return n.masterPlaylistLoader_="dash"===n.sourceType_?new qa(i,n.vhs_,n.requestOptions_):new aa(i,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new Vs(zo.mergeOptions(b,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new Vs(zo.mergeOptions(b,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new fu(zo.mergeOptions(b,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),Cu.forEach((function(e){n[e+"_"]=ku.bind(h()(n),e)})),n.logger_=Cs("MPC"),n.triggeredFmp4Usage=!1,n.masterPlaylistLoader_.load(),n}p()(t,e);var n=t.prototype;return n.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.masterPlaylistLoader_.media(e)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=a.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(a.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ta(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),Eu({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.masterPlaylistLoader_.media(e.initialMedia_),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ta(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),e.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var o in n.AUDIO)for(var a in n.AUDIO[o]){n.AUDIO[o][a].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),zs.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media(),n=this.tech_.buffered();return function(e){var t=e.currentPlaylist,n=e.nextPlaylist,r=e.forwardBuffer,i=e.bufferLowWaterLine,o=e.bufferHighWaterLine,a=e.duration,s=e.experimentalBufferBasedABR,u=e.log;if(!n)return zo.log.warn("We received no playlist to switch to. Please check your stream."),!1;var l="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t||!t.endList)return u(l+" as current playlist "+(t?"is live":"is not set")),!0;if(n.id===t.id)return!1;var c=s?Wa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Wa.MAX_BUFFER_LOW_WATER_LINE;if(a<c)return u(l+" as duration < max low water line ("+a+" < "+c+")"),!0;var f=n.attributes.BANDWIDTH,h=t.attributes.BANDWIDTH;if(f<h&&(!s||r<o)){var d=l+" as next bandwidth < current bandwidth ("+f+" < "+h+")";return s&&(d+=" and forwardBuffer < bufferHighWaterLine ("+r+" < "+o+")"),u(d),!0}if((!s||f>h)&&r>=i){var p=l+" as forwardBuffer >= bufferLowWaterLine ("+r+" >= "+i+")";return s&&(p+=" and next bandwidth > current bandwidth ("+f+" > "+h+")"),u(p),!0}return u("not "+l+" as no switching criteria met"),!1}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:n.length?n.end(n.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetEverything((function(){zo.browser.IE_VERSION||zo.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())})))},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(zo.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=zs.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=.1;var o=i.end(i.length-1);return o-r<=.1&&n-o<=.1},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var r=this.masterPlaylistLoader_.master.playlists,i=r.filter(_a),o=1===i.length&&i[0]===n;if(1===r.length&&t!==1/0)return zo.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(o);if(o){var a=!1;r.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(a=!0,delete e.excludeUntil)}})),a&&(zo.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}n.excludeUntil=Date.now()+1e3*t,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var s=this.selectPlaylist();if(!s)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:zo.log.warn,l=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+l+" Switching to playlist "+s.id+"."),s.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),s.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var c=s.targetDuration/2*1e3||5e3,f="number"==typeof s.lastRequest&&Date.now()-s.lastRequest<=c;return this.masterPlaylistLoader_.media(s,o||f)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var o=[];(i||"audio"===e)&&o.push("AUDIO"),(i||"subtitle"===e)&&(o.push("CLOSED-CAPTIONS"),o.push("SUBTITLES")),o.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=ua(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:zs.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master.suggestedPresentationDelay,i=zs.Playlist.seekable(t,n,r);if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=zs.Playlist.seekable(t,n,r)).length)return}var o,a;this.seekable_&&this.seekable_.length&&(o=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=zo.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===o&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+ca(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=zs.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};t.video=t.main;var n=Es(this.master(),this.media()),r={},i=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=n.video||t.main.videoCodec||Ue.DEFAULT_VIDEO_CODEC),t.main.isMuxed&&(r.video+=","+(n.audio||t.main.audioCodec||Ue.DEFAULT_AUDIO_CODEC)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||i)&&(r.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||Ue.DEFAULT_AUDIO_CODEC,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var o,a={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,s=r[e],!(i?Object(Ue.browserSupportsCodec)(s):Object(Ue.muxerSupportsCodec)(s)))){var n=t[e].isFmp4?"browser":"muxer";a[n]=a[n]||[],a[n].push(r[e]),"audio"===e&&(o=n)}var i,s})),i&&o&&this.media().attributes.AUDIO){var s=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===s&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+s+" as "+o+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=(Object(Ue.parseCodecs)(e.sourceUpdater_.codecs[t]||"")[t]||{}).type,i=(Object(Ue.parseCodecs)(r[t]||"")[t]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&u.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')})),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var l=Object.keys(a).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+a[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:l,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var o=Es(e.master,i),a=[];!o.audio||Object(Ue.muxerSupportsCodec)(o.audio)||Object(Ue.browserSupportsCodec)(o.audio)||(i.excludeUntil=1/0,a.push("audio codec "+o.audio)),!o.video||Object(Ue.muxerSupportsCodec)(o.video)||Object(Ue.browserSupportsCodec)(o.video)||(i.excludeUntil=1/0,a.push("video codec "+o.video)),o.text&&"stpp.ttml.im1t"===o.text&&(i.excludeUntil=1/0,a.push("text codec "+o.text)),a.length&&e.logger_("excluding "+i.id+" as codecs "+a.join(", ")+" are unsupported")}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=Object(Ue.parseCodecs)(e),r=Object.keys(n).length;this.master().playlists.forEach((function(e){if(e.excludeUntil!==1/0){var i={},o=2,a=[],s=Es(t.masterPlaylistLoader_.master,e);if(s.audio||s.video){var u=[s.video,s.audio].filter(Boolean).join(",");i=Object(Ue.parseCodecs)(u),o=Object.keys(i).length}o!==r&&(a.push('codec count "'+o+'" !== "'+r+'"'),e.excludeUntil=1/0),t.sourceUpdater_.canChangeType()||(i.video&&n.video&&i.video.type.toLowerCase()!==n.video.type.toLowerCase()&&(a.push('video codec "'+i.video.type+'" !== "'+n.video.type+'"'),e.excludeUntil=1/0),i.audio&&n.audio&&i.audio.type.toLowerCase()!==n.audio.type.toLowerCase()&&(e.excludeUntil=1/0,a.push('audio codec "'+i.audio.type+'" !== "'+n.audio.type+'"'))),a.length&&t.logger_("blacklisting "+e.id+": "+a.join(" && "))}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,i=n,o=0;o<e.segments.length;o++){var s=e.segments[o];if(r||(r=hu(t,i+s.duration/2)),r){if("cueIn"in s){r.endTime=i,r.adEndTime=i,i+=s.duration,r=null;continue}if(i<r.endTime){i+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new a.a.VTTCue(i,i+s.duration,s.cueOut)).adStartTime=i,r.adEndTime=i+parseFloat(s.cueOut),t.addCue(r)),"cueOutCont"in s){var u=s.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(r=new a.a.VTTCue(i,i+s.duration,"")).adStartTime=i-l,r.adEndTime=r.adStartTime+c,t.addCue(r)}i+=s.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Wa.GOAL_BUFFER_LENGTH,n=Wa.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Wa.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Wa.BUFFER_LOW_WATER_LINE,n=Wa.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Wa.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,Wa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return Wa.BUFFER_HIGH_WATER_LINE},t}(zo.EventTarget),Ou=function(e,t,n){var r,i,o,a=e.masterPlaylistController_,s=a[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(a);if(t.attributes.RESOLUTION){var u=t.attributes.RESOLUTION;this.width=u.width,this.height=u.height}this.bandwidth=t.attributes.BANDWIDTH,this.codecs=Es(a.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,o=s,function(e){var t=r.master.playlists[i],n=ba(t),a=_a(t);return void 0===e?a:(e?delete t.disabled:t.disabled=!0,e===a||n||(o(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},Pu=["seeking","seeked","pause","playing","error"],Ru=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Cs("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.techWaiting_()},i=function(){return t.cancelTimer_()},o=function(){return t.fixesBadSeeks_()},s=this.masterPlaylistController_,u=["main","subtitle","audio"],l={};u.forEach((function(e){l[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},s[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),t.tech_.on(["seeked","seeking"],l[e].reset)})),this.tech_.on("seekablechanged",o),this.tech_.on("waiting",r),this.tech_.on(Pu,i),this.tech_.on("canplay",n),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",o),t.tech_.off("waiting",r),t.tech_.off(Pu,i),t.tech_.off("canplay",n),u.forEach((function(e){s[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),t.tech_.off(["seeked","seeking"],l[e].reset)})),t.checkCurrentTimeTimeout_&&a.a.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&a.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=a.a.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:fa(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:.1)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+ca(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;var i=this.tech_.buffered();return!!function(e){var t=e.buffered,n=e.targetDuration,r=e.currentTime;return!!t.length&&(!(t.end(0)-t.start(0)<2*n)&&(!(r>t.start(0))&&t.start(0)-r<n))}({buffered:i,targetDuration:this.media().targetDuration,currentTime:n})&&(e=i.start(0)+.1,this.logger_("Buffered region starts ("+i.start(0)+") just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=ua(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var o=la(i,t);if(o.length>0){var a=o.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+o.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+.1;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var o=ua(t,r-3),a=ua(t,r),s=ua(n,r);s.length&&!a.length&&o.length&&(i={start:o.end(0),end:s.end(0)})}else{la(t,r).length||(i=this.gapFromVideoUnderflow_(t,r))}return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=la(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+1/30),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return zo.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return zo.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),o=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:o}}return null},e}(),Au={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},ju=function(e){!function e(t,n){var r=0,i=0,o=zo.mergeOptions(Au,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){i&&t.currentTime(i)},s=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*o.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):o.getSource&&"function"==typeof o.getSource?(r=Date.now(),o.getSource.call(t,s)):void zo.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",a),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}}(this,e)},Iu={PlaylistLoader:aa,Playlist:Sa,utils:Ma,STANDARD_PLAYLIST_SELECTOR:js,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Sa.isEnabled);return Ps(t,(function(e,t){return Rs(e,t)})),t.filter((function(t){return!!Es(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:js,movingAverageBandwidthSelector:function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var n=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,As(this.playlists.master,t,parseInt(Os(this.tech_.el(),"width"),10)*n,parseInt(Os(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:Rs,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||a.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||a.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:xa()};Object.keys(Wa).forEach((function(e){Object.defineProperty(Iu,e,{get:function(){return zo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Wa[e]},set:function(t){zo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?zo.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Wa[e]=t}})}));var Lu=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};Iu.canPlaySource=function(){return zo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Du=function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var r=t.reduce((function(e,t){var r=n.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e}),{});return Object.keys(r).length&&e.push(r),e}),[])}(r?i.concat([r]):i,Object.keys(n)),a=[],s=[];return o.forEach((function(e){s.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),a.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(a),Promise.race(s)])},Mu=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var r={video:t&&t.attributes&&t.attributes.CODECS,audio:n&&n.attributes&&n.attributes.CODECS};!r.audio&&r.video&&r.video.split(",").length>1&&r.video.split(",").forEach((function(e){e=e.trim(),Object(Ue.isAudioCodec)(e)?r.audio=e:Object(Ue.isVideoCodec)(e)&&(r.video=e)}));var i=r.video?'video/mp4;codecs="'+r.video+'"':null,o=r.audio?'audio/mp4;codecs="'+r.audio+'"':null,a={};for(var s in e)a[s]={audioContentType:o,videoContentType:i},t.contentProtection&&t.contentProtection[s]&&t.contentProtection[s].pssh&&(a[s].pssh=t.contentProtection[s].pssh),"string"==typeof e[s]&&(a[s].url=e[s]);return zo.mergeOptions(e,a)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(zo.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Nu=function(){if(!a.a.localStorage)return null;var e=a.a.localStorage.getItem("videojs-vhs");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};Iu.supportsNativeHls=function(){if(!u.a||!u.a.createElement)return!1;var e=u.a.createElement("video");if(!zo.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Iu.supportsNativeDash=!!(u.a&&u.a.createElement&&zo.getTech("Html5").isSupported())&&/maybe|probably/i.test(u.a.createElement("video").canPlayType("application/dash+xml")),Iu.supportsTypeNatively=function(e){return"hls"===e?Iu.supportsNativeHls:"dash"===e&&Iu.supportsNativeDash},Iu.isSupported=function(){return zo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Bu=function(e){function t(t,n,r){var i;if(i=e.call(this,n,zo.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&zo.log.warn("Using hls options is deprecated. Use vhs instead."),i.logger_=Cs("VhsHandler"),n.options_&&n.options_.playerId){var o=zo(n.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return zo.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),h()(i)},configurable:!0}),o.hasOwnProperty("vhs")||Object.defineProperty(o,"vhs",{get:function(){return zo.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),h()(i)},configurable:!0}),o.hasOwnProperty("dash")||Object.defineProperty(o,"dash",{get:function(){return zo.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),h()(i)},configurable:!0}),i.player_=o}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(u.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=u.a.fullscreenElement||u.a.webkitFullscreenElement||u.a.mozFullScreenElement||u.a.msFullscreenElement;t&&t.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}p()(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.handlePartialData=this.options_.handlePartialData||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=Nu();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Wa.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Wa.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","handlePartialData","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=Iu,this.options_.sourceType=Object(N.simpleTypeFromSourceType)(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new xu(this.options_);var i=zo.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new Ru(i),this.masterPlaylistController_.on("error",(function(){var e=zo.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var o=this.options_.experimentalBufferBasedABR?Iu.movingAverageBandwidthSelector(.55):Iu.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Iu.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){zo.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return fa(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return fa(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!a.a.localStorage)return!1;var t=Nu();t=t?zo.mergeOptions(t,e):e;try{a.a.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e,t;t=(e=n).playlists,e.representations=function(){return t&&t.master&&t.master.playlists?t.master.playlists.filter((function(e){return!ba(e)})).map((function(t,n){return new Ou(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=a.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=Mu({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});11!==zo.browser.IE_VERSION&&n?(this.logger_("waiting for EME key session creation"),Du({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=zo.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),Lu(t,n.playlists)})),this.playlists.on("mediachange",(function(){Lu(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":"2.4.2","mux.js":"5.8.0","mpd-parser":"0.15.0","m3u8-parser":"4.5.0","aes-decrypter":"3.1.0"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return uu.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&a.a.URL.revokeObjectURL&&(a.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return Na({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),Ba({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(zo.getComponent("Component")),Uu={name:"videojs-http-streaming",VERSION:"2.4.2",canHandleSource:function(e,t){void 0===t&&(t={});var n=zo.mergeOptions(zo.options,t);return Uu.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=zo.mergeOptions(zo.options,n);return t.vhs=new Bu(e,t,r),zo.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return zo.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=xa(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=zo.mergeOptions(zo.options,t).vhs.overrideNative,r=void 0===n?!zo.browser.IS_ANY_SAFARI:n,i=Object(N.simpleTypeFromSourceType)(e);return i&&(!Iu.supportsTypeNatively(i)||r)?"maybe":""}};Object(Ue.browserSupportsCodec)("avc1.4d400d,mp4a.40.2")&&zo.getTech("Html5").registerSourceHandler(Uu,0),zo.VhsHandler=Bu,Object.defineProperty(zo,"HlsHandler",{get:function(){return zo.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Bu},configurable:!0}),zo.VhsSourceHandler=Uu,Object.defineProperty(zo,"HlsSourceHandler",{get:function(){return zo.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Uu},configurable:!0}),zo.Vhs=Iu,Object.defineProperty(zo,"Hls",{get:function(){return zo.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Iu},configurable:!0}),zo.use||(zo.registerComponent("Hls",Iu),zo.registerComponent("Vhs",Iu)),zo.options.vhs=zo.options.vhs||{},zo.options.hls=zo.options.hls||{},zo.registerPlugin?zo.registerPlugin("reloadSourceOnError",ju):zo.plugin("reloadSourceOnError",ju);var Fu=zo,Vu=n(101),Hu=n.n(Vu);function zu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var qu=function e(t){var n=this;if(Fu.browser.IS_IE8)for(var r in n=Hu.a.createElement("custom"),e.prototype)"constructor"!==r&&(n[r]=e.prototype[r]);return n.id=t.id,n.label=n.id,n.width=t.width,n.height=t.height,n.bitrate=t.bandwidth,n.enabled_=t.enabled,Object.defineProperty(n,"enabled",{get:function(){return n.enabled_()},set:function(e){n.enabled_(e)}}),n},Wu=function(e){
|
|
88
|
-
/*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */
|
|
89
|
-
var t,n;function r(){var t,n=zu(zu(t=e.call(this)||this));if(Fu.browser.IS_IE8)for(var i in n=Hu.a.createElement("custom"),r.prototype)"constructor"!==i&&(n[i]=r.prototype[i]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||zu(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new qu(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},i.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},i.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},i.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(Fu.EventTarget);for(var $u in Wu.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},Wu.prototype.allowedEvents_)Wu.prototype["on"+$u]=null;var Gu=Fu.registerPlugin||Fu.plugin,Ku=function(e){return t=this,Fu.mergeOptions({},e),n=t.qualityLevels,r=new Wu,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION="2.0.9",r;var t,n,r};Gu("qualityLevels",Ku),Ku.VERSION="2.0.9";var Yu=n(211),Xu="cv-persisttest",Qu=function(){try{return window.localStorage.setItem(Xu,"cv-player-storage-test"),window.localStorage.removeItem(Xu),!0}catch(e){return!1}},Ju=function(e){return window.localStorage.getItem(e)},Zu=function(e,t){window.localStorage.setItem(e,t)},el=function(e){window.localStorage.removeItem(e)};function tl(e){return(tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rl(e,t){return(rl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function il(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=al(e);if(t){var i=al(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ol(this,n)}}function ol(e,t){if(t&&("object"===tl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function al(e){return(al=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sl=Fu.getPlugin("plugin"),ul="cvplayer-mute",ll=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rl(e,t)}(o,e);var t,n,r,i=il(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).player.ready((function(){return t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){var e=this;if(Qu()){this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.one("dispose",(function(){e.player.off("volumechange",e.saveVolumeState)}));var t=Ju("cvplayer-volume"),n=Ju(ul);t&&this.player.volume(+t),n&&this.player.muted("true"===n)}}},{key:"saveVolumeState",value:function(){Zu("cvplayer-volume",this.player.volume().toString()),Zu(ul,this.player.muted().toString())}}])&&nl(t.prototype,n),r&&nl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(sl);function cl(e){return(cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hl(e,t){return(hl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ml(e);if(t){var i=ml(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pl(this,n)}}function pl(e,t){if(t&&("object"===cl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yl(e)}function yl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ml(e){return(ml=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistVolumePlugin",ll);var vl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hl(e,t)}(o,e);var t,n,r,i=dl(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).hasScreenOrientation()&&t.player.supportsFullScreen()?(t.onRotate=t.onRotate.bind(yl(t)),t.onFullscreenChange=t.onFullscreenChange.bind(yl(t)),t.player.ready((function(){return t.initialize()})),t):pl(t)}return t=o,(n=[{key:"initialize",value:function(){var e=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.one("dispose",(function(){window.removeEventListener("orientationchange",e.onRotate),e.hasScreenLock()&&e.player.off("fullscreenchange",e.onFullscreenChange)}))}},{key:"onFullscreenChange",value:function(){!this.getAngle()&&this.player.isFullscreen()?window.screen.orientation.lock("portrait-primary"):window.screen.orientation.unlock()}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"hasScreenLock",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&fl(t.prototype,n),r&&fl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("fullscreenOnRotatePlugin",vl);var gl="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n";n(352);function bl(e){return(bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wl(e,t){return(wl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Cl(e);if(t){var i=Cl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sl(this,n)}}function Sl(e,t){if(t&&("object"===bl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return El(e)}function El(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cl(e){return(Cl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wl(e,t)}(o,e);var t,n,r,i=Tl(o);function o(e,t){var n,r,a,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update=(r=n.update.bind(El(n)),a=1e3,s=window.performance.now(),function(){var e=window.performance.now();e-s>=a&&(r.apply(void 0,arguments),s=e)}),e.on("timeupdate",n.update),e.one("dispose",(function(){e.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return t=o,(n=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:gl,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=Fu.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&_l(t.prototype,n),r&&_l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function xl(e){return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pl(e,t){return(Pl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jl(e);if(t){var i=jl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Al(this,n)}}function Al(e,t){if(t&&("object"===xl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jl(e){return(jl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}kl.prototype.controlText_="Open in ClickView",Fu.registerComponent("OpenExternallyButton",kl);var Il=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pl(e,t)}(o,e);var t,n,r,i=Rl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&Ol(t.prototype,n),r&&Ol(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("openExternallyPlugin",Il);n(353);function Ll(e){return(Ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ml(){return(Ml="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Nl(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Nl(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vl(e)););return e}function Bl(e,t){return(Bl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ul(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vl(e);if(t){var i=Vl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fl(this,n)}}function Fl(e,t){if(t&&("object"===Ll(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vl(e){return(Vl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bl(e,t)}(o,e);var t,n,r,i=Ul(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Ml(Vl(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ml(Vl(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Dl(t.prototype,n),r&&Dl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("component"));function zl(e){return(zl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ql(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wl(){return(Wl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=$l(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function $l(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xl(e)););return e}function Gl(e,t){return(Gl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xl(e);if(t){var i=Xl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yl(this,n)}}function Yl(e,t){if(t&&("object"===zl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xl(e){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TouchControls",Hl);var Ql=Fu.getPlugin("plugin"),Jl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gl(e,t)}(o,e);var t,n,r,i=Kl(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).doubleTouchCount=0,t.seekStartTime=0,t.directionModifier=0,t.bindFunctions(),t.player.ready((function(){return t.initialize()})),t}return t=o,(n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){e.player.off("ready",e.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.on(this.tech,"touchstart",this.onTouchStart),this.on(this.tech,"touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&(this.off(this.tech,"touchstart",this.onTouchStart),this.off(this.tech,"touchend",this.onTouchEnd))}},{key:"dispose",value:function(){Wl(Xl(o.prototype),"dispose",this).call(this),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&ql(t.prototype,n),r&&ql(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ql);function Zl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("touchControls",Jl);var ec=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)}var t,n,r;return t=e,(n=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&Zl(t.prototype,n),r&&Zl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function tc(e){return(tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rc(e,t){return(rc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ac(e);if(t){var i=ac(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oc(this,n)}}function oc(e,t){if(t&&("object"===tc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ac(e){return(ac=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rc(e,t)}(o,e);var t,n,r,i=ic(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options_=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources)}},{key:"currentSource",get:function(){return this._currentSource}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();return this._currentSource=n,this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"sortSources",value:function(e){return e.sort((function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1}))}},{key:"populateSources",value:function(e){var t=this,n=null;(e=this.sortSources(e)).forEach((function(e){t.qualityLevels.addQualityLevel(new ec(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),e.default&&(n=e)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}])&&nc(t.prototype,n),r&&nc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function uc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("progressiveFiles",sc);var lc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},cc=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)}var t,n,r;return t=e,(n=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return lc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new AbortController,n=setTimeout((function(){return t.abort()}),1e3),e.prev=3,e.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,clearTimeout(n),e.abrupt("return","PONG"===i);case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})))}}])&&uc(t.prototype,n),r&&uc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var hc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var s=r-1;s>0;s--){var u=n[s],l=e.getQualityLevelById(u);if(l)return l}}return null}}],(n=null)&&fc(t.prototype,n),r&&fc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},yc=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=Fu.log.createLogger("localcache")}var t,n,r;return t=e,(n=[{key:"setSource",value:function(e,t){return pc(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.next=5;break}return n.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 5:t(null,e);case 6:case"end":return n.stop()}}),n,this)})))}}])&&dc(t.prototype,n),r&&dc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();Fu.use("*",(function(e){return new yc(e)}));n(354);function mc(e){return(mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gc(){return(gc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=bc(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function bc(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ec(e)););return e}function _c(e,t){return(_c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ec(e);if(t){var i=Ec(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tc(this,n)}}function Tc(e,t){if(t&&("object"===mc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sc(e)}function Sc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ec(e){return(Ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},kc='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',xc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)}(o,e);var t,n,r,i=wc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(Sc(n)),e.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"createEl",value:function(){return gc(Ec(o.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(kc,"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return Cc(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.localCachePlugin.getActiveLocalCache();case 2:e.sent?this.show():this.hide();case 4:case"end":return e.stop()}}),e,this)})))}}])&&vc(t.prototype,n),r&&vc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Oc(e){return(Oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rc(){return(Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ac(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ac(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Mc(e)););return e}function jc(e,t){return(jc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mc(e);if(t){var i=Mc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lc(this,n)}}function Lc(e,t){if(t&&("object"===Oc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dc(e)}function Dc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mc(e){return(Mc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("localCacheIndicator",xc);var Nc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Bc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jc(e,t)}(o,e);var t,n,r,i=Ic(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).logger_=Fu.log.createLogger("localcache"),void 0===t)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(Dc(n)),n.localCaches_=t.localCacheAddresses.map((function(e){return new cc(e)})),n.player.ready((function(){n.initialize(),t.enabled&&n.enable()})),n}return t=o,(n=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"dispose",value:function(){this.player.off("error",this.onPlayerError),Rc(Mc(o.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.player.on("error",this.onPlayerError),this.player.controlBar.addChild("localCacheIndicator")}},{key:"onPlayerError",value:function(){var e;(null===(e=this.player.error())||void 0===e?void 0:e.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return Nc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n=function(e){return Nc(i,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.ping();case 2:if(!n.sent){n.next=4;break}t.push(e);case 4:case"end":return n.stop()}}),n)})))},e.next=4,Promise.all(this.localCaches_.map((function(e){return n(e)})));case 4:if(!(t.length>0)){e.next=8;break}return r=t[0],this.onLocalCacheChange(r),e.abrupt("return",r);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),hc.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}])&&Pc(t.prototype,n),r&&Pc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function Uc(e){return(Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vc(e,t){return(Vc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qc(e);if(t){var i=qc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zc(this,n)}}function zc(e,t){if(t&&("object"===Uc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function qc(e){return(qc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("localCache",Bc);var Wc=Fu.getPlugin("plugin"),$c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vc(e,t)}(o,e);var t,n,r,i=Hc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var e=!!this.options.showSubtitles,t=this.safeGet("cvplayer-show-subtitles");if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(e){if(Qu())return Ju(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++){var n=e[t];if("showing"===n.mode)return Zu("cvplayer-show-subtitles","true"),void Zu("cvplayer-selected-language",n.language)}Zu("cvplayer-show-subtitles","false"),el("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var e=this;Qu()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();Zu("cvplayer-subtitle-size",e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),s=0;s<a.length;s++){var u=a[s],l=this.getLanguageParts(u.language),c=l.language,f=l.country;if(c===i&&(e=u,f||(t=u),f===o))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}}])&&Fc(t.prototype,n),r&&Fc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Wc);function Gc(e){return(Gc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yc(e,t){return(Yc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jc(e);if(t){var i=Jc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qc(this,n)}}function Qc(e,t){if(t&&("object"===Gc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jc(e){return(Jc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistSubtitleSettingsPlugin",$c);var Zc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ef=Fu.getPlugin("plugin"),tf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yc(e,t)}(o,e);var t,n,r,i=Xc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){return Zc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveLocalCache();case 2:if(t=e.sent,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),Qu()&&(r=Ju(this.getStorageKey(!!t)))&&(n=r),i=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||hc.enableProfileOrNextBest(i,n),Qu()){e.next=10;break}return e.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 13:case"end":return e.stop()}}),e,this)})))}},{key:"onQualityLevelsChange",value:function(){return Zc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:t=e.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],Zu(this.getStorageKey(t),r.id);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return Zc(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.player.localCache().getActiveLocalCache();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&Kc(t.prototype,n),r&&Kc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ef);Fu.registerPlugin("persistQualitySettingsPlugin",tf);n(355);function nf(e){return(nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rf(e){return function(e){if(Array.isArray(e))return of(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return of(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return of(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function of(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function af(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uf(e,t,n){return t&&sf(e.prototype,t),n&&sf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cf(e,t)}function cf(e,t){return(cf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ff(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=df(e);if(t){var i=df(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hf(this,n)}}function hf(e,t){if(t&&("object"===nf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function df(e){return(df=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pf=Fu.getComponent("Component"),yf=function(e){lf(n,e);var t=ff(n);function n(e,r){return af(this,n),t.call(this,e,r)}return uf(n,[{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var e=this.options_.event,t=this.player_.duration(),n=(e.end.time-e.start.time)/t;this.el_.style.width=100*n+"%";var r=e.start.time/t;this.el_.style.left=100*r+"%"}}]),n}(pf),mf=function(e){lf(n,e);var t=ff(n);function n(){var e;return af(this,n),(e=t.apply(this,arguments)).events_=[],e}return uf(n,[{key:"update",value:function(){for(var e=this,t=this.children(),n=t.length;n>0;n--)this.removeChild(t[n]);this.events_.forEach((function(t){var n=new yf(e.player(),{event:t});e.addChild(n),n.update()}))}},{key:"addEvents",value:function(e){var t;(t=this.events_).push.apply(t,rf(e)),this.update()}},{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-progress-reporter-display"})}}]),n}(pf);function vf(e){return(vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _f(e,t){return(_f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sf(e);if(t){var i=Sf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tf(this,n)}}function Tf(e,t){if(t&&("object"===vf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sf(e){return(Sf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ef=Fu.getPlugin("plugin"),Cf="play",kf="playing",xf="pause",Of="seeking",Pf="seekstart",Rf="seekend",Af="ended",jf="pausedseek",If="timeupdate",Lf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_f(e,t)}(o,e);var t,n,r,i=wf(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var e,t=this,n=(gf(e={},Cf,(function(){return t.onPlay()})),gf(e,xf,(function(){return t.onPause()})),gf(e,If,(function(){return t.onTimeUpdate()})),gf(e,Of,(function(){return t.onSeeking()})),gf(e,Af,(function(){return t.onEnded()})),gf(e,kf,(function(){return t.onPlaying()})),e),r=Object.keys(n);r.forEach((function(e){return t.player.on(e,n[e])})),this.one("dispose",(function(){r.forEach((function(e){return t.player.off(e,n[e])}))}))}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;this.interval=window.setInterval((function(){return e.flushBuffer()}),t),this.player.one("dispose",(function(){return window.clearInterval(e.interval)}))}},{key:"addEasterEgg",value:function(){var e,t,n=this,r="",i=function(t){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=t.key)&&n.addDisplay(),window.clearTimeout(e),e=window.setTimeout((function(){r=""}),500)},o=!1,a=function(){o=!0,t=window.setTimeout((function(){o&&n.addDisplay()}),1e4)};function s(){o=!1,window.clearTimeout(t)}this.player.el().addEventListener("keyup",i);var u=this.player.getChild("Collapserator").getChild("PlayToggle");u.on("touchstart",a),u.on("touchend",s),this.player.one("dispose",(function(){var e,t;null===(t=null===(e=n.player)||void 0===e?void 0:e.el())||void 0===t||t.removeEventListener("keyup",i),u.off("touchstart",a),u.off("touchend",s)}))}},{key:"addDisplay",value:function(){var e=this;this.progressReporterDisplay||(this.progressReporterDisplay=new mf(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){e.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(Rf),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(Cf)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(xf),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Cf)),this.isPlaying&&!this.isSeeking&&this.logEvent(kf)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(jf),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Pf))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Af)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===Pf&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===kf||e===Cf)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===kf||e===xf}},{key:"shouldClearCarriedOverTime",value:function(e){return e===Af||e===jf}},{key:"flushBuffer",value:function(){for(var e,t,n=[],r={};this.eventBuffer.length;){var i=this.eventBuffer.shift();this.shouldClearCarriedOverTime(i.type)?delete this.lastPlayingTime:r.start?i.type===kf&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(i.type)&&(this.lastPlayingTime=i.time),r.end=i,n.push(r),r={}):(this.shouldUseCarriedOverTime(i.type)&&(i.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=i)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(e=this.player)||void 0===e||e.trigger("progressflush"),null===(t=this.progressReporterDisplay)||void 0===t||t.addEvents(n))}},{key:"validateEvents",value:function(e){var t=0;e.forEach((function(e){t+=e.end.time-e.start.time}));var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),t<n}}])&&bf(t.prototype,n),r&&bf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ef);Fu.registerPlugin("progressReporterPlugin",Lf);n(356);function Df(e){return(Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bf(e,t){return(Bf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vf(e);if(t){var i=Vf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ff(this,n)}}function Ff(e,t){if(t&&("object"===Df(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vf(e){return(Vf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bf(e,t)}(o,e);var t,n,r,i=Uf(o);function o(){return Mf(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&Nf(t.prototype,n),r&&Nf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component")),zf=["top","left","right","bottom"],qf={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(357);function Wf(e){return(Wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kf(e,t,n){return t&&Gf(e.prototype,t),n&&Gf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yf(){return(Yf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Xf(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Xf(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=th(e)););return e}function Qf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jf(e,t)}function Jf(e,t){return(Jf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=th(e);if(t){var i=th(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eh(this,n)}}function eh(e,t){if(t&&("object"===Wf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function th(e){return(th=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nh=Fu.getComponent("Component"),rh=function(e){Qf(n,e);var t=Zf(n);function n(e,r){var i;return $f(this,n),(i=t.call(this,e,r)).bindEventListeners(),i}return Kf(n,[{key:"createEl",value:function(){return Yf(th(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",(function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)}))}}]),n}(nh),ih=function(e){Qf(n,e);var t=Zf(n);function n(e,r){var i;return $f(this,n),(i=t.call(this,e,r)).addChildren(),i}return Kf(n,[{key:"addChildren",value:function(){var e=this;zf.forEach((function(t){e.addChild(new rh(e.player_,{side:t}))}))}}]),n}(nh);function oh(e){return(oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ah(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sh(){return(sh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=uh(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function uh(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hh(e)););return e}function lh(e,t){return(lh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ch(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=hh(e);if(t){var i=hh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fh(this,n)}}function fh(e,t){if(t&&("object"===oh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function hh(e){return(hh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lh(e,t)}(o,e);var t,n,r,i=ch(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(e){var t=this;sh(hh(o.prototype),"handleClick",this).call(this,e),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])&&ah(t.prototype,n),r&&ah(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function ph(e){return(ph="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mh(e,t){return(mh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bh(e);if(t){var i=bh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gh(this,n)}}function gh(e,t){if(t&&("object"===ph(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function bh(e){return(bh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mh(e,t)}(o,e);var t,n,r,i=vh(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&yh(t.prototype,n),r&&yh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function wh(e){return(wh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Th(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eh(){return(Eh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ch(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ch(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ph(e)););return e}function kh(e,t){return(kh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ph(e);if(t){var i=Ph(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Oh(this,n)}}function Oh(e,t){if(t&&("object"===wh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ph(e){return(Ph=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rh=Fu.getComponent("MenuButton"),Ah=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kh(e,t)}(o,e);var t,n,r,i=xh(o);function o(){var e;return Th(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new dh(this.player_,{label:"Video Controls"})];return zf.forEach((function(r){n.push(new _h(e.player_,{side:r,label:qf[r],selectable:!0,multiSelectable:!1,selected:r===t}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Eh(Ph(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return qf[e]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Rh.prototype.handleClick.apply(this)}}])&&Sh(t.prototype,n),r&&Sh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Rh);n(358);function jh(e){return(jh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ih(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lh(e,t){return(Lh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nh(e);if(t){var i=Nh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mh(this,n)}}function Mh(e,t){if(t&&("object"===jh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Nh(e){return(Nh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bh="cv-whiteboard-side",Uh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lh(e,t)}(o,e);var t,n,r,i=Dh(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).side="bottom",t.player.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){if(Qu()){var e=Ju(Bh);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}},{key:"initCollapserator",value:function(){var e=this,t=this.player.getChild("collapserator"),n=new Hf(this.player);this.button=new Ah(this.player),t.addChild(n),t.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){t.el().setAttribute("draggable","true")},i=function(){t.el().setAttribute("draggable","false")},o=function(t){e.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle")},a=function(){e.player.removeClass("cv-dragging"),t.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",i),t.el().addEventListener("dragstart",o),t.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",i),t.el().removeEventListener("dragstart",o),t.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new ih(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){e.player.off("fullscreenchange",e.update)}))}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),Qu()&&Zu(Bh,e),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),Fu.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),Fu.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}])&&Ih(t.prototype,n),r&&Ih(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("whiteboardModePlugin",Uh);n(359);var Fh=n(106),Vh=n.n(Fh),Hh=(n(360),n(362),n(135)),zh=n.n(Hh),qh=n(136),Wh=n.n(qh),$h=n(212),Gh=n.n($h),Kh=n(213),Yh=(n(364),null),Xh=null;function Qh(){if(null===Yh){if("undefined"==typeof document)return Yh=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),Yh=n}return Yh}Vh.a&&window.addEventListener("resize",(function(){Xh!==window.devicePixelRatio&&(Xh=window.devicePixelRatio,Yh=null)}));var Jh=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function Zh(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function ed(e){return e&&e.ownerDocument?e.ownerDocument:document}var td=function(){function e(t,n){var r=this;this.onScroll=function(){var e=Zh(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=ed(r.el),n=Zh(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=zh()(this.recalculate.bind(this),64),this.onMouseMove=zh()(this.onMouseMove.bind(this),64),this.hideScrollbars=Wh()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Wh()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=Gh()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=999;var a=e.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=ed(e),r=Zh(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),Vh.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=Zh(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||Kh.a;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=Zh(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>l-c,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.axis[t].scrollbar,a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=ed(this.el),r=Zh(this.el),i=this.axis[t].scrollbar,o="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=o-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=Zh(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function e(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=a,i)),r.requestAnimationFrame(e)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[t].offsetAttr]=a,o)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Qh()}catch(e){return Qh()}},t.removeListeners=function(){var e=this,t=Zh(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();td.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},td.instances=new WeakMap,td.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||td.instances.has(e)||new td(e,Jh(e.attributes))}))},td.removeObserver=function(){this.globalObserver.disconnect()},td.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(td.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},td.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!td.instances.has(e)&&new td(e,Jh(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||td.instances.has(e)||new td(e,Jh(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?td.instances.has(e)&&td.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){td.instances.has(e)&&td.instances.get(e).unMount()})))}))}))},td.getOptions=Jh,Vh.a&&td.initHtmlApi();var nd=td;function rd(e){return(rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function id(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function od(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ad(){return(ad="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=sd(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function sd(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fd(e)););return e}function ud(e,t){return(ud=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ld(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fd(e);if(t){var i=fd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return cd(this,n)}}function cd(e,t){if(t&&("object"===rd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fd(e){return(fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hd=Fu.getComponent("Menu"),dd=hd.prototype,pd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ud(e,t)}(o,e);var t,n,r,i=ld(o);function o(){return id(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){var e=ad(fd(o.prototype),"createEl",this).call(this);return this.simpleBar=new nd(this.contentEl(),{autoHide:!1}),e}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():ad(fd(o.prototype),"contentEl",this).call(this)}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),ad(fd(o.prototype),"dispose",this).call(this)}},{key:"addItem",value:function(e){ad(fd(o.prototype),"addItem",this).call(this,e),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){ad(fd(o.prototype),"lockShowing",this).call(this),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||dd.handleBlur.call(this,e)}}])&&od(t.prototype,n),r&&od(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(hd);function yd(e){return(yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function md(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gd(e,t){return(gd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wd(e);if(t){var i=wd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _d(this,n)}}function _d(e,t){if(t&&("object"===yd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wd(e){return(wd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}hd.prototype=pd.prototype,Fu.registerComponent("Menu",pd);var Td=Fu.getComponent("Component"),Sd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gd(e,t)}(o,e);var t,n,r,i=bd(o);function o(){return md(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createMenu",value:function(){var e,t=new pd(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=Fu.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new Td(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t}}])&&vd(t.prototype,n),r&&vd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuButton"));Fu.registerComponent("MenuButton",Sd);n(365);function Ed(e){return(Ed="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xd(){return(xd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Od(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Od(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jd(e)););return e}function Pd(e,t){return(Pd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jd(e);if(t){var i=jd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ad(this,n)}}function Ad(e,t){if(t&&("object"===Ed(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jd(e){return(jd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Id=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pd(e,t)}(o,e);var t,n,r,i=Rd(o);function o(){return Cd(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(xd(jd(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return xd(jd(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&kd(t.prototype,n),r&&kd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Id.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},Fu.registerComponent("TimeWrapper",Id);n(366);function Ld(e){return(Ld="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Md(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nd(e,t,n){return t&&Md(e.prototype,t),n&&Md(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bd(){return(Bd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ud(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ud(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qd(e)););return e}function Fd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vd(e,t)}function Vd(e,t){return(Vd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qd(e);if(t){var i=qd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zd(this,n)}}function zd(e,t){if(t&&("object"===Ld(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function qd(e){return(qd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wd=function(e){Fd(n,e);var t=Hd(n);function n(e,r){return Dd(this,n),t.call(this,e,r)}return Nd(n,[{key:"handleClick",value:function(e){var t=this;Bd(qd(n.prototype),"handleClick",this).call(this,e),this.requestAnimationFrame((function(){t.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,t,r){if(!this.options_.item)return Bd(qd(n.prototype),"createEl",this).call(this,e,t,r);var i=this.options_.item.getCollabsibleName(),o=this.options_.item.getCollabsibleValue(),a='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=Fu.dom.createEl("span",{innerHTML:o});var s=Bd(qd(n.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item ".concat(o?"cv-has-cog-value":""),innerHTML:a},r);return s.appendChild(this.valueHolder_),s}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}]),n}(Fu.getComponent("MenuItem")),$d=function(e){Fd(n,e);var t=Hd(n);function n(e,r){return Dd(this,n),t.call(this,e,r)}return Nd(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(Bd(qd(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Bd(qd(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.menu.children_.forEach((function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()})),Bd(qd(n.prototype),"pressButton",this).call(this)}},{key:"createItems",value:function(){for(var e,t=this,n=[],r=0;r<this.options_.items.length;r++){var i=this.options_.items[r];i.isCollabsible&&(i.showInCollabsibleMenu()&&i.isCollapsed&&n.push(new Wd(this.player_,{item:i})))}return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&this.additionalItems.forEach((function(e){var r,i=new e.ctor(t.player_,Object.assign(Object.assign({},t.options_),null!==(r=e.options)&&void 0!==r?r:{}));n.splice(e.index,0,i)})),n}},{key:"update",value:function(){Bd(qd(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(t){return t.name===e.name}))||(this.additionalItems.push(e),this.update())}}]),n}(Fu.getComponent("MenuButton"));function Gd(e){return(Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kd(){return(Kd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Yd(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Yd(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rp(e)););return e}function Xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jd(e,t,n){return t&&Qd(e.prototype,t),n&&Qd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ep(e,t)}function ep(e,t){return(ep=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rp(e);if(t){var i=rp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return np(this,n)}}function np(e,t){if(t&&("object"===Gd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function rp(e){return(rp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("cogButton",$d);var ip=Fu.getComponent("MenuItem"),op=Fu.getComponent("MenuButton"),ap=["large","medium","small"],sp=function(e){Zd(n,e);var t=tp(n);function n(e,r){return Xd(this,n),t.call(this,e,r)}return Jd(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(ip),up=function(e){Zd(n,e);var t=tp(n);function n(e,r){var i;return Xd(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.player_.ready((function(){i.update()})),i}return Jd(n,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new dh(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return ap.map((function(t){r.push(new sp(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Kd(rp(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){op.prototype.handleClick.apply(this)}}]),n}(op);function lp(e,t,n,r){e.kind===t&&(n&&e.label!==n||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}Fu.registerComponent("SubtitleSizeButton",up);var cp=function(e,t,n,r){var i=function(e){lp(e.track,t,n,r)},o=e.textTracks(),a=function(e,t,n){if(e.length)for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.kind===t){if(n&&i.label!==n)continue;return i}}}(o,t,n);a?lp(a,t,n,r):(o.addEventListener("addtrack",i),e.one("dispose",(function(){o.removeEventListener("addtrack",i)})))},fp=function(e){if(!e)return null;for(var t=e.textTracks(),n=0;n<t.length;n++){var r=t[n];if("showing"===r.mode)return r}return null};function hp(e){return(hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pp(e,t){return(pp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vp(e);if(t){var i=vp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mp(this,n)}}function mp(e,t){if(t&&("object"===hp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vp(e){return(vp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pp(e,t)}(o,e);var t,n,r,i=yp(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach((function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&dp(t.prototype,n),r&&dp(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function bp(e){return(bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wp(){return(wp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Tp(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Tp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xp(e)););return e}function Sp(e,t){return(Sp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ep(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xp(e);if(t){var i=xp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cp(this,n)}}function Cp(e,t){if(t&&("object"===bp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return kp(e)}function kp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xp(e){return(xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Op=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sp(e,t)}(o,e);var t,n,r,i=Ep(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onChange=function(e,t,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){o.clearTimeout(r),r=null},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var l=function(){r=null,l=null,n||e.apply(this,s)};!r&&n&&e.apply(i,s),o.clearTimeout(r),r=o.setTimeout(l,t)};return s.cancel=a,s}(n.onChange,100,!1,kp(n)),n.bindEventListeners(),n}return t=o,(n=[{key:"createEl",value:function(){return wp(xp(o.prototype),"createEl",this).call(this,"li",{innerHTML:'\n <div class="cv-subtitle-search-input">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="Search" type="text" autocomplete="off" spellcheck="false" aria-label="Search" />\n </div>\n '})}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",(function(t){e.options_.menuButton.menu.handleBlur(t)}))}},{key:"onChange",value:function(e){var t=e.target;this.options_.menuButton.search(t.value)}}])&&_p(t.prototype,n),r&&_p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));n(367);function Pp(e){return(Pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ap(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jp(e,t,n){return t&&Ap(e.prototype,t),n&&Ap(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ip(){return(Ip="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Lp(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Lp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Fp(e)););return e}function Dp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mp(e,t)}function Mp(e,t){return(Mp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Np(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fp(e);if(t){var i=Fp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bp(this,n)}}function Bp(e,t){if(t&&("object"===Pp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Up(e)}function Up(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fp(e){return(Fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vp=Fu.getComponent("MenuItem"),Hp=Fu.getComponent("MenuButton"),zp=function(e){Dp(n,e);var t=Np(n);function n(){return Rp(this,n),t.apply(this,arguments)}return jp(n,[{key:"createEl",value:function(e,t,r){return Ip(Fp(n.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(Vp),qp=function(e){Dp(n,e);var t=Np(n);function n(e,r){var i;return Rp(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(Up(i)),i.player_.textTracks().addEventListener("selectedlanguagechange",i.update),i}return jp(n,[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.update)}))}},{key:"createItems",value:function(){var e,t=fp(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new Op(this.player_,{menuButton:this})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new gp(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new zp(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=fp(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],s=void 0;s=r.exec(o);)a.push(s.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)}))}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Ip(Fp(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){Ip(Fp(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Ip(Fp(n.prototype),"pressButton",this).call(this);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Hp.prototype.handleClick.apply(this)}}]),n}(Hp);Fu.registerComponent("subtitleSearchButton",qp);n(368);function Wp(e){return(Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $p(){return($p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Gp(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Gp(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ty(e)););return e}function Kp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xp(e,t,n){return t&&Yp(e.prototype,t),n&&Yp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jp(e,t)}function Jp(e,t){return(Jp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ty(e);if(t){var i=ty(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ey(this,n)}}function ey(e,t){if(t&&("object"===Wp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ty(e){return(ty=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ny=Fu.getComponent("MenuItem"),ry=Fu.getComponent("MenuButton"),iy=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"}],oy=function(e){Qp(n,e);var t=Zp(n);function n(e,r){return Kp(this,n),t.call(this,e,r)}return Xp(n,[{key:"createEl",value:function(){return Fu.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(e){switch(e){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">⇑</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">⇓</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}]),n}(ny),ay=function(e){Qp(n,e);var t=Zp(n);function n(){var e;return Kp(this,n),(e=t.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return Xp(n,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new dh(this.player_,{label:"Keyboard Shortcuts"})),iy.forEach((function(n){t.push(new oy(e.player_,n))})),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat($p(ty(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){ry.prototype.handleClick.apply(this)}}]),n}(ry);Fu.registerComponent("KeyboardShortcutsButton",ay);n(369),n(370);function sy(e){return(sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ly(){return(ly="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=cy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function cy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yy(e)););return e}function fy(e,t){return(fy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yy(e);if(t){var i=yy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dy(this,n)}}function dy(e,t){if(t&&("object"===sy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return py(e)}function py(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yy(e){return(yy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var my=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fy(e,t)}(o,e);var t,n,r,i=hy(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(py(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update)})),n}return t=o,(n=[{key:"togglehidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.el().getBoundingClientRect();0!==e.width&&(this.addClass("cv-collapsorator-ready"),this.togglehidden(e.width<600))}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(ly(yy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return ly(yy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&uy(t.prototype,n),r&&uy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function vy(e){return(vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function by(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _y(e,t){return(_y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sy(e);if(t){var i=Sy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ty(this,n)}}function Ty(e,t){if(t&&("object"===vy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sy(e){return(Sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}my.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},Fu.registerComponent("collapserator",my);var Ey=Fu.getComponent("SeekBar"),Cy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_y(e,t)}(o,e);var t,n,r,i=wy(o);function o(){return gy(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleMouseDown",value:function(e){Ey.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback")}},{key:"handleMouseUp",value:function(e){var t=this;Ey.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&by(t.prototype,n),r&&by(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ey);function ky(e){for(var t=e.buffered(),n=e.currentTime(),r=0,i=0;i<t.length;i++){var o=t.start(i),a=t.end(i);if(o<=n&&a>=n){r=a;break}}return r}Fu.registerComponent("SeekBar",Cy);n(371);function xy(e){return(xy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Py(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ry(){return(Ry="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Ay(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Ay(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Dy(e)););return e}function jy(e,t){return(jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Iy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Dy(e);if(t){var i=Dy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ly(this,n)}}function Ly(e,t){if(t&&("object"===xy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Dy(e){return(Dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var My=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jy(e,t)}(o,e);var t,n,r,i=Iy(o);function o(){return Oy(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Ry(Dy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ry(Dy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach((function(t){t.updateBuffered(ky(e.player_))}))}}])&&Py(t.prototype,n),r&&Py(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Ny(e){return(Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fy(){return(Fy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Vy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Vy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wy(e)););return e}function Hy(e,t){return(Hy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wy(e);if(t){var i=Wy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qy(this,n)}}function qy(e,t){if(t&&("object"===Ny(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Wy(e){return(Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hy(e,t)}(o,e);var t,n,r,i=zy(o);function o(){return By(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Fy(Wy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Fy(Wy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Uy(t.prototype,n),r&&Uy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Gy(e){return(Gy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ky(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xy(){return(Xy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Qy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Qy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=tm(e)););return e}function Jy(e,t){return(Jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tm(e);if(t){var i=tm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return em(this,n)}}function em(e,t){if(t&&("object"===Gy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function tm(e){return(tm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jy(e,t)}(o,e);var t,n,r,i=Zy(o);function o(){return Ky(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Xy(tm(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Xy(tm(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&Yy(t.prototype,n),r&&Yy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function rm(e){return(rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function im(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function om(){return(om="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=am(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function am(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cm(e)););return e}function sm(e,t){return(sm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function um(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cm(e);if(t){var i=cm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lm(this,n)}}function lm(e,t){if(t&&("object"===rm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cm(e){return(cm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sm(e,t)}(o,e);var t,n,r,i=um(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playProgress=new nm(n.player_),n.addChild(n.playProgress),n.loadProgress=new $y(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(om(cm(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return om(cm(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])&&im(t.prototype,n),r&&im(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function hm(e){return(hm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pm(){return(pm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=ym(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function ym(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_m(e)););return e}function mm(e,t){return(mm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_m(e);if(t){var i=_m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gm(this,n)}}function gm(e,t){if(t&&("object"===hm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bm(e)}function bm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _m(e){return(_m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mm(e,t)}(o,e);var t,n,r,i=vm(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onDurationChange=n.onDurationChange.bind(bm(n)),n.createChapterItems=n.createChapterItems.bind(bm(n)),n.updateBuffered=n.updateBuffered.bind(bm(n)),cp(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return t=o,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),pm(_m(o.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar")})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=pm(_m(o.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_=e);var r=new My(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,s=o.endTime,u=this.player_.duration();u&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(s=this.player_.duration()),s>u&&(s=u));var l=new fm(this.player_,{startTime:a,endTime:s});if(r.addChild(l),u&&s===u)break}else r.addChild(new fm(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&dm(t.prototype,n),r&&dm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("SeekBar"));wm.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||wm.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("ChapterSeekBar",wm);n(372);function Tm(e){return(Tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Em(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cm(){return(Cm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=km(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function km(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rm(e)););return e}function xm(e,t){return(xm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Om(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rm(e);if(t){var i=Rm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pm(this,n)}}function Pm(e,t){if(t&&("object"===Tm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Rm(e){return(Rm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Am=Fu.getComponent("ProgressControl"),jm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xm(e,t)}(o,e);var t,n,r,i=Om(o);function o(){var e;return Sm(this,o),(e=i.apply(this,arguments)).seekBarName_="seekBar",e}return t=o,(n=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())==="seekBar".toLowerCase()&&(e=this.seekBarName_),Cm(Rm(o.prototype),"getChild",this).call(this,e)}}])&&Em(t.prototype,n),r&&Em(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Am);function Im(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}jm.prototype.options_={children:[]},Fu.registerComponent("ProgressControl",jm);n(373);function Lm(e){return(Lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mm(){return(Mm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Nm(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Nm(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vm(e)););return e}function Bm(e,t){return(Bm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Um(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vm(e);if(t){var i=Vm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fm(this,n)}}function Fm(e,t){if(t&&("object"===Lm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vm(e){return(Vm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bm(e,t)}(o,e);var t,n,r,i=Um(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hasCustomChapterText=!1,cp(n.player_,"chapters",!1,(function(e){n.track_=e})),n}return t=o,(n=[{key:"createEl",value:function(){var e=Mm(Vm(o.prototype),"createEl",this).call(this);return this.chapter_=Fu.dom.createEl("div"),e.appendChild(this.chapter_),this.time_=Fu.dom.createEl("div"),e.appendChild(this.time_),e}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(Fu.dom.textContent(this.time_,Im(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=r.endTime||t;if(r.startTime<=e&&i>=e)return void Fu.dom.textContent(this.chapter_,r.text)}Fu.dom.textContent(this.chapter_,"")}}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,Fu.dom.textContent(this.chapter_,null!=e?e:"")}}])&&Dm(t.prototype,n),r&&Dm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("TimeTooltip"));Fu.registerComponent("TimeTooltip",Hm);n(374);function zm(e){return(zm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wm(){return(Wm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=$m(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function $m(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xm(e)););return e}function Gm(e,t){return(Gm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Km(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xm(e);if(t){var i=Xm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ym(this,n)}}function Ym(e,t){if(t&&("object"===zm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xm(e){return(Xm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gm(e,t)}(o,e);var t,n,r,i=Km(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e=Wm(Xm(o.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=Fu.dom.createEl("img"),e.appendChild(this.img_),e}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var s=r,u=s.src,l=s.w,c=s.h,f=s.x,h=s.y,d=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-h+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(d,")"),this.el_.style.width=l+"px",this.el_.style.height=c+"px"}else this.disable()}}}])&&qm(t.prototype,n),r&&qm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Qm.prototype.options_={scaleFactor:1},Fu.registerComponent("ThumbnailDisplay",Qm);n(375);function Jm(e){return(Jm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ev(e,t){return(ev=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=iv(e);if(t){var i=iv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nv(this,n)}}function nv(e,t){if(t&&("object"===Jm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rv(e)}function rv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iv(e){return(iv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ov=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ev(e,t)}(o,e);var t,n,r,i=tv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),cp(n.player_,"metadata","thumbnails",(function(e){n.getChild("ThumbnailDisplay").setTrack(e)})),n.update=n.update.bind(rv(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return t=o,(n=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=t*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var i=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-i.width/2+"px";var o=e.width*t;o<i.width/2?n.el_.style.left=i.width/2+"px":o>e.width-i.width/2?n.el_.style.left=e.width-i.width/2+"px":n.el_.style.left=e.width*t+"px"}))}},{key:"forceShow",value:function(){this.addClass("cv-mouse-time-display-force-show")}},{key:"removeForceShow",value:function(){this.removeClass("cv-mouse-time-display-force-show")}}])&&Zm(t.prototype,n),r&&Zm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MouseTimeDisplay"));ov.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},Fu.registerComponent("MouseTimeDisplay",ov);n(376);function av(e){return(av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uv(){return(uv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lv(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function lv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dv(e)););return e}function cv(e,t){return(cv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dv(e);if(t){var i=dv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hv(this,n)}}function hv(e,t){if(t&&("object"===av(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dv(e){return(dv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pv=Fu.getComponent("ChaptersTrackMenuItem"),yv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cv(e,t)}(o,e);var t,n,r,i=fv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).nonIconControl=!1,n.thumbnailDisplay=new Qm(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),cp(n.player_,"metadata","thumbnails",(function(e){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(e),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return t=o,(n=[{key:"update",value:function(){this.player_&&pv.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,t,n){return this.nonIconControl=!0,uv(dv(o.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},t),n)}},{key:"getInnerHTML",value:function(){var e=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Im(this.options_.cue.startTime,e),")</p>")+"</span>"}}])&&sv(t.prototype,n),r&&sv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(pv);n(377);function mv(e){return(mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gv(){return(gv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=bv(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function bv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ev(e)););return e}function _v(e,t){return(_v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ev(e);if(t){var i=Ev(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tv(this,n)}}function Tv(e,t){if(t&&("object"===mv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sv(e)}function Sv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ev(e){return(Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_v(e,t)}(o,e);var t,n,r,i=wv(o);function o(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e,t,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(Sv(r)),r.player_.on("cv-whiteboard-change",r.update),r.player_.on("fullscreenchange",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-whiteboard-change",r.update),r.player_.off("fullscreenchange",r.update)})),r}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(gv(Ev(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(gv(Ev(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new yv(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var t=this;gv(Ev(o.prototype),"setTrack",this).call(this,e),this.track_&&"chapters"===this.track_.kind&&e.one("loadeddata",(function(){t.update()}))}},{key:"update",value:function(e){gv(Ev(o.prototype),"update",this).call(this,e)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&vv(t.prototype,n),r&&vv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("ChaptersButton"));function kv(e){return(kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ov(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pv(){return(Pv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Rv(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Rv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Lv(e)););return e}function Av(e,t){return(Av=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lv(e);if(t){var i=Lv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Iv(this,n)}}function Iv(e,t){if(t&&("object"===kv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Lv(e){return(Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("ChaptersButton",Cv);var Dv=Fu.getComponent("OffTextTrackMenuItem"),Mv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Av(e,t)}(o,e);var t,n,r,i=jv(o);function o(){return xv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){Dv.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,t,n){return Pv(Lv(o.prototype),"createEl",this).call(this,"li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},t),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n)}}])&&Ov(t.prototype,n),r&&Ov(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Dv);function Nv(e){return(Nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fv(e,t){return(Fv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zv(e);if(t){var i=zv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Hv(this,n)}}function Hv(e,t){if(t&&("object"===Nv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function zv(e){return(zv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("OffTextTrackMenuItem",Mv);var qv=Fu.getComponent("TextTrackButton"),Wv=Fu.getComponent("TextTrackMenuItem"),$v=Fu.getComponent("OffTextTrackMenuItem"),Gv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fv(e,t)}(o,e);var t,n,r,i=Vv(o);function o(){return Bv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wv;this.label_&&(e="".concat(this.label_," off")),t.push(new $v(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),t.push(a)}}return t}}])&&Uv(t.prototype,n),r&&Uv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(qv);function Kv(e){return(Kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qv(e,t){return(Qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=eg(e);if(t){var i=eg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zv(this,n)}}function Zv(e,t){if(t&&("object"===Kv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function eg(e){return(eg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TextTrackButton",Gv);var tg=Fu.getComponent("SubsCapsMenuItem"),ng=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qv(e,t)}(o,e);var t,n,r,i=Jv(o);function o(){return Yv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){tg.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&Xv(t.prototype,n),r&&Xv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(tg);function rg(e){return(rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ig(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function og(e,t){return(og=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ag(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ug(e);if(t){var i=ug(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sg(this,n)}}function sg(e,t){if(t&&("object"===rg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ug(e){return(ug=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&og(e,t)}(o,e);var t,n,r,i=ag(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};return n.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-divider-after-menu-item"),t.addClass("cv-subtitle-size-menu-item"),t.controlText(", opens subtitle size settings"),t}return t=o,(n=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&ig(t.prototype,n),r&&ig(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("TextTrackMenuItem"));function cg(e){return(cg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hg(e,t){return(hg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mg(e);if(t){var i=mg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pg(this,n)}}function pg(e,t){if(t&&("object"===cg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yg(e)}function yg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mg(e){return(mg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hg(e,t)}(o,e);var t,n,r,i=dg(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};n.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-subtitle-search-menu-item"),t.controlText(", opens subtitle search"),t.toggleEnabled=t.toggleEnabled.bind(yg(t));var r=t.player_.textTracks();return r.addEventListener("selectedlanguagechange",t.toggleEnabled),t.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",t.toggleEnabled)})),t.toggleEnabled(),t}return t=o,(n=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=fp(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.toggleEnabled)}))}},{key:"handleClick",value:function(){var e,t=this,n=fp(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&fg(t.prototype,n),r&&fg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("TextTrackMenuItem"));n(378);function gg(e){return(gg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wg(){return(wg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Tg(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Tg(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kg(e)););return e}function Sg(e,t){return(Sg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kg(e);if(t){var i=kg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cg(this,n)}}function Cg(e,t){if(t&&("object"===gg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function kg(e){return(kg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xg=Fu.getComponent("TextTrackButton"),Og=Fu.getComponent("SubsCapsButton"),Pg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sg(e,t)}(o,e);var t,n,r,i=Eg(o);function o(){var e;return bg(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(wg(kg(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[new vg(this.player_),new lg(this.player_)];return this.hideThreshold_=this.hideThreshold_+2,xg.prototype.createItems.call(this,e,ng)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Og.prototype.handleClick.apply(this)}}])&&_g(t.prototype,n),r&&_g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Og);function Rg(e){return(Rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ag(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jg(e,t){return(jg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ig(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mg(e);if(t){var i=Mg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lg(this,n)}}function Lg(e,t){if(t&&("object"===Rg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Dg(e)}function Dg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mg(e){return(Mg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("SubsCapsButton",Pg);var Ng=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Bg="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(kc,"</span>"),Ug=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jg(e,t)}(o,e);var t,n,r,i=Ig(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).qualityId=t.qualityId;var r=e.qualityLevels(),a=n.handleQualityChange.bind(Dg(n));return r.on("change",a),e.one("dispose",(function(){r.off("change",a)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(Dg(n)),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var e;null===(e=n.player_)||void 0===e||e.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return t=o,(n=[{key:"handleLocalCacheChange",value:function(){return Ng(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player_.localCache(),e.next=3,t.getActiveLocalCache();case 3:if(null==(n=e.sent)?void 0:n.playbackProfile){e.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Bg);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Ag(t.prototype,n),r&&Ag(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));n(379);function Fg(e){return(Fg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hg(){return(Hg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=zg(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function zg(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Kg(e)););return e}function qg(e,t){return(qg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Kg(e);if(t){var i=Kg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $g(this,n)}}function $g(e,t){if(t&&("object"===Fg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Gg(e)}function Gg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(e){return(Kg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yg={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},Xg=Fu.getComponent("MenuButton"),Qg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qg(e,t)}(o,e);var t,n,r,i=Wg(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(Gg(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),e.one("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Hg(Kg(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Hg(Kg(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new dh(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var i=Yg[r.id];i&&e.push(new Ug(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?Yg[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){Xg.prototype.handleClick.apply(this)}}])&&Vg(t.prototype,n),r&&Vg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Xg);Fu.registerComponent("QualityButton",Qg);n(380);function Jg(e){return(Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tb(){return(tb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=nb(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function nb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ab(e)););return e}function rb(e,t){return(rb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ib(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ab(e);if(t){var i=ab(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ob(this,n)}}function ob(e,t){if(t&&("object"===Jg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ab(e){return(ab=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sb=Fu.getComponent("Menu"),ub=Fu.getComponent("MenuButton"),lb=Fu.getComponent("PlaybackRateMenuItem"),cb=Fu.getComponent("PlaybackRateMenuButton"),fb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rb(e,t)}(o,e);var t,n,r,i=ib(o);function o(){var e;return Zg(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ub.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(tb(ab(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=new sb(this.player(),{menuButton:this});e.addItem(new dh(this.player_,{label:"Playback Speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new lb(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ub.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=cb.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=Fu.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&eb(t.prototype,n),r&&eb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(cb);function hb(e){return(hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function db(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yb(e,t){return(yb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gb(e);if(t){var i=gb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vb(this,n)}}function vb(e,t){if(t&&("object"===hb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gb(e){return(gb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("PlaybackRateMenuButton",fb);var bb=Fu.getComponent("TextTrackSettings"),_b={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},wb={small:_b,medium:Object.assign(Object.assign({},_b),{fontPercent:1.5}),large:Object.assign(Object.assign({},_b),{fontPercent:2})},Tb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yb(e,t)}(o,e);var t,n,r,i=mb(o);function o(){return db(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setSizeSetting",value:function(e){this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay(),this.player_.getChild("collapserator").getChild("subtitleSizeButton").update(),this.player_.trigger("resizemenus"),this.player_.trigger("changesubtitlesize",this.size_)}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return wb[this.size_]?wb[this.size_]:_b}}])&&pb(t.prototype,n),r&&pb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(bb);Fu.registerComponent("TextTrackSettings",Tb);n(381);function Sb(e){return(Sb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Eb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kb(){return(kb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=xb(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function xb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ab(e)););return e}function Ob(e,t){return(Ob=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ab(e);if(t){var i=Ab(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Rb(this,n)}}function Rb(e,t){if(t&&("object"===Sb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ab(e){return(Ab=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jb=window.navigator&&window.navigator.userAgent||"",Ib=(/iPod/i.test(jb),/Android/i.test(jb),Fu.getComponent("Player")),Lb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ob(e,t)}(o,e);var t,n,r,i=Pb(o);function o(){return Eb(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,t){var n=this;if("number"!=typeof e||!this.callback_||t)return kb(Ab(o.prototype),"currentTime",this).call(this,e);this.callback_((function(){n.unlock(),n.currentTime(e)}))}},{key:"play",value:function(){var e=this;if(!this.callback_)return kb(Ab(o.prototype),"play",this).call(this);this.callback_((function(){e.unlock(),e.play()}))}},{key:"updateStyleEl_",value:function(){if(Ib.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;Ib.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",(function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0})),t.on("mouseleave",(function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout}))}}])&&Cb(t.prototype,n),r&&Cb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ib);Lb.prototype.options_=Object.assign(Object.assign({},Ib.prototype.options_),{setMaxHeight:!0}),Fu.registerComponent("player",Lb);n(382);function Db(e){return(Db="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nb(e,t){return(Nb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vb(e);if(t){var i=Vb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ub(this,n)}}function Ub(e,t){if(t&&("object"===Db(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Fb(e)}function Fb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vb(e){return(Vb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nb(e,t)}(o,e);var t,n,r,i=Bb(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(Fb(n)),n.player_.one("firstplay",n.onFirstPlay),n}return t=o,(n=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout((function(){e.player_.isDisposed()||e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Mb(t.prototype,n),r&&Mb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Fu.registerComponent("PlayPauseFeedback",Hb);n(383);function zb(e){return(zb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $b(e,t){return($b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yb(e);if(t){var i=Yb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kb(this,n)}}function Kb(e,t){if(t&&("object"===zb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Yb(e){return(Yb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xb=Fu.getComponent("PlayToggle"),Qb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$b(e,t)}(o,e);var t,n,r,i=Gb(o);function o(){return qb(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){var t=this;Xb.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Wb(t.prototype,n),r&&Wb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Xb);Fu.registerComponent("PlayToggle",Qb);var Jb;n(384),n(385),n(386),n(387),n(388);function Zb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e_(e){e.paused()?e.play():e.pause()}function t_(e,t){e.currentTime(e.currentTime()+t)}function n_(e,t){e.volume(e.volume()+t)}var r_=(Zb(Jb={},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),Zb(Jb,"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),Zb(Jb,"k",e_),Zb(Jb,"space",e_),Zb(Jb,"left",(function(e){return t_(e,-5)})),Zb(Jb,"right",(function(e){return t_(e,5)})),Zb(Jb,"j",(function(e){return t_(e,-10)})),Zb(Jb,"l",(function(e){return t_(e,10)})),Zb(Jb,"up",(function(e){return n_(e,.05)})),Zb(Jb,"down",(function(e){return n_(e,-.05)})),Jb);function i_(e){var t=g()(e);r_[t]&&(["space"].includes(t)&&(e.preventDefault(),e.stopPropagation()),r_[t](this,e))}function o_(e){return(o_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s_(e,t){if(t&&("object"===o_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u_(e){var t="function"==typeof Map?new Map:void 0;return(u_=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l_(e,arguments,h_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f_(r,e)})(e)}function l_(e,t,n){return(l_=c_()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f_(i,n.prototype),i}).apply(null,arguments)}function c_(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function f_(e,t){return(f_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h_(e){return(h_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f_(e,t)}(s,e);var t,n,r,i,o,a=(t=s,n=c_(),function(){var e,r=h_(t);if(n){var i=h_(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return s_(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e)).url=t,n}return r=s,i&&a_(r.prototype,i),o&&a_(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(u_(Error));function p_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y_,m_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},v_=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}}var t,n,r;return t=e,(n=[{key:"get",value:function(e,t){return m_(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 3:return n.t1=n.sent,n.next=6,n.t0.parseResponse.call(n.t0,n.t1);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"delete",value:function(e,t){return m_(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(e,t,n){return m_(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"put",value:function(e,t,n){return m_(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return m_(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=4;break}throw new d_("Ajax error",e.url);case 4:return t.next=6,e.json();case 6:return n=t.sent,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))}}])&&p_(t.prototype,n),r&&p_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());function g_(e){return(g_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b_(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&__(e,t)}function __(e,t){return(__=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S_(e);if(t){var i=S_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return T_(this,n)}}function T_(e,t){if(t&&("object"===g_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S_(e){return(S_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k_(e,t,n){return t&&C_(e.prototype,t),n&&C_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}!function(e){e.LocalStorage="localStorage",e.SessionStorage="sessionStorage"}(y_||(y_={}));var x_=function(){function e(t){if(E_(this,e),this.cachePrefix="_cv:",this.expireTime=3600,this.hasSupport=this.hasBrowserSupport(),this.type=t.type,this.hasSupport)try{this.storage=window[this.type]}catch(e){}}return k_(e,[{key:"get",value:function(e){if(this.hasSupport){var t=this.storage.getItem(e);try{return JSON.parse(t)}catch(e){return t}}}},{key:"set",value:function(e,t){if(this.hasSupport)try{return this.storage.removeItem(e),"string"!=typeof t?(this.storage.setItem(e,JSON.stringify(t)),!0):(this.storage.setItem(e,t),!0)}catch(e){return!1}}},{key:"remove",value:function(e){if(this.hasSupport)return this.storage.removeItem(e)}},{key:"length",value:function(){if(this.hasSupport)return this.storage.length}},{key:"clear",value:function(){if(this.hasSupport)return this.storage.clear()}},{key:"cacheSet",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.expireTime;this.cacheClean();var r={time:this.getCurrentTime()+1e3*n,data:null!=t&&t};return this.set("".concat(this.cachePrefix).concat(e),r)}},{key:"cacheGet",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return n?this.isExpired(n)?(this.remove(t),null):n.data:null}},{key:"cacheExists",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return!!n&&(!this.isExpired(n)||(this.remove(t),!1))}},{key:"cacheRemove",value:function(e){return this.remove("".concat(this.cachePrefix).concat(e))}},{key:"cacheFlush",value:function(){this.cacheClean()}},{key:"cacheClean",value:function(){if(this.hasSupport)for(var e=0;e<this.storage.length;e++){var t=this.storage.key(e);if(0===t.indexOf(this.cachePrefix)){var n=this.get(t);n&&n.time&&this.isExpired(n)&&this.remove(t)}}}},{key:"isExpired",value:function(e){return e.time<this.getCurrentTime()}},{key:"getCurrentTime",value:function(){return(new Date).getTime()}},{key:"hasBrowserSupport",value:function(){try{return this.type in window&&null!==window[this.type]}catch(e){return!1}}}]),e}(),O_=function(e){b_(n,e);var t=w_(n);function n(){return E_(this,n),t.apply(this,arguments)}return k_(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:y_.LocalStorage}))}}]),n}(x_),P_=function(e){b_(n,e);var t=w_(n);function n(){return E_(this,n),t.apply(this,arguments)}return k_(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:y_.SessionStorage}))}}]),n}(x_),R_=O_.Instance,A_=(P_.Instance,"URLSearchParams"in self),j_="Symbol"in self&&"iterator"in Symbol,I_="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),L_="FormData"in self,D_="ArrayBuffer"in self;if(D_)var M_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],N_=ArrayBuffer.isView||function(e){return e&&M_.indexOf(Object.prototype.toString.call(e))>-1};function B_(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function U_(e){return"string"!=typeof e&&(e=String(e)),e}function F_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return j_&&(t[Symbol.iterator]=function(){return t}),t}function V_(e){this.map={},e instanceof V_?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function H_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function z_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function q_(e){var t=new FileReader,n=z_(t);return t.readAsArrayBuffer(e),n}function W_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function $_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:I_&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:L_&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:A_&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():D_&&I_&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=W_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):D_&&(ArrayBuffer.prototype.isPrototypeOf(e)||N_(e))?this._bodyArrayBuffer=W_(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):A_&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},I_&&(this.blob=function(){var e=H_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?H_(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(q_)}),this.text=function(){var e,t,n,r=H_(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=z_(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},L_&&(this.formData=function(){return this.text().then(Y_)}),this.json=function(){return this.text().then(JSON.parse)},this}V_.prototype.append=function(e,t){e=B_(e),t=U_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},V_.prototype.delete=function(e){delete this.map[B_(e)]},V_.prototype.get=function(e){return e=B_(e),this.has(e)?this.map[e]:null},V_.prototype.has=function(e){return this.map.hasOwnProperty(B_(e))},V_.prototype.set=function(e,t){this.map[B_(e)]=U_(t)},V_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},V_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),F_(e)},V_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),F_(e)},V_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),F_(e)},j_&&(V_.prototype[Symbol.iterator]=V_.prototype.entries);var G_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function K_(e,t){var n,r,i=(t=t||{}).body;if(e instanceof K_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new V_(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new V_(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),G_.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function Y_(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function X_(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new V_(t.headers),this.url=t.url||"",this._initBody(e)}K_.prototype.clone=function(){return new K_(this,{body:this._bodyInit})},$_.call(K_.prototype),$_.call(X_.prototype),X_.prototype.clone=function(){return new X_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new V_(this.headers),url:this.url})},X_.error=function(){var e=new X_(null,{status:0,statusText:""});return e.type="error",e};var Q_=[301,302,303,307,308];X_.redirect=function(e,t){if(-1===Q_.indexOf(t))throw new RangeError("Invalid status code");return new X_(null,{status:t,headers:{location:e}})};var J_=self.DOMException;try{new J_}catch(e){(J_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),J_.prototype.constructor=J_}function Z_(e,t){return new Promise((function(n,r){var i=new K_(e,t);if(i.signal&&i.signal.aborted)return r(new J_("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new V_,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new X_(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new J_("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&self.location.href?self.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(I_?o.responseType="blob":D_&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Z_.polyfill=!0,self.fetch||(self.fetch=Z_,self.Headers=V_,self.Request=K_,self.Response=X_);var ew=n(214),tw=n.n(ew),nw=n(215);function rw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return iw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ow={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function aw(e,t,n){var r=rw(t.exec(n)||[],1)[0];return r||(r="Unknown"),{name:e,version:r}}function sw(e,t,n){if(!t)return{name:e,version:"Unknown"};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():"Unknown"}}var uw=function(){var e=window.navigator.userAgent;return ow.android.test(e)?sw("Android",ow.androidVersion,e):ow.iphone.test(e)||ow.ipad.test(e)?sw("iOS",ow.iosVersion,e):ow.linux.test(e)?sw("Linux",null,e):ow.unix.test(e)?sw("Unix",null,e):ow.mac.test(e)?sw("Macintosh",ow.osxVersion,e):ow.windows.test(e)?function(e,t){var n={name:e,version:null};return ow.win2000.test(t)&&(n.version="2000"),ow.winXP.test(t)&&(n.version="XP"),ow.winVista.test(t)&&(n.version="Vista"),ow.win7.test(t)&&(n.version="7"),ow.win8.test(t)&&(n.version="8"),ow.win81.test(t)&&(n.version="8.1"),ow.win10.test(t)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",e):ow.blackberry.test(e)?sw("BlackBerry",ow.blackberryVersion,e):ow.windowsPhone.test(e)?sw("Windows Phone",ow.windowsPhoneVersion,e):{name:"Unknown",version:"Unknown"}},lw=function(){var e=window.navigator.userAgent;return ow.chrome.test(e)?aw("Chrome",ow.generalVersion,e):ow.firefox.test(e)?aw("Firefox",ow.generalVersion,e):ow.safari.test(e)?aw("Safari",ow.generalVersion,e):ow.ie.test(e)?aw("Internet Explorer",ow.ieVersion,e):ow.edge.test(e)?aw("Edge",ow.edgeVersion,e):ow.opera.test(e)?aw("Opera",ow.operaVersion,e):{name:"Unknown",version:"Unknown"}};function cw(e){return(cw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fw,hw=function(e){var t=cw(e);return"function"===t||"object"===t&&!!e},dw=function(e){return"function"==typeof e},pw=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},yw=n(97);!function(e){e.CvApSoutheast1="cv-ap-southeast-1",e.CvApSoutheast2="cv-ap-southeast-2",e.CvEuWest1="cv-eu-west-1",e.CvNaWest1="cv-na-west-1"}(fw||(fw={}));var mw={CvApSoutheast1:{systemName:fw.CvApSoutheast1},CvApSoutheast2:{systemName:fw.CvApSoutheast2},CvEuWest1:{systemName:fw.CvEuWest1},CvNaWest1:{systemName:fw.CvNaWest1}};function vw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gw=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},bw=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Array.isArray(e)){t.next=2;break}return t.abrupt("return",this.logBulk(e));case 2:if(this.shouldLog(e)){t.next=4;break}return t.abrupt("return");case 4:return this.validateEvent(e),t.t0=this,t.next=8,this.formatData(e);case 8:return t.t1=t.sent,t.next=11,t.t0.postData.call(t.t0,t.t1);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"logBulk",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.filter((function(e){return i.shouldLog(e)}))).length){t.next=3;break}return t.abrupt("return");case 3:return n.forEach((function(e){return i.validateEvent(e)})),t.next=6,Promise.all(n.map((function(e){return i.formatData(e)})));case 6:return r=t.sent,t.next=9,this.postData(r);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"validateOptions",value:function(){if(!dw(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(e){return!dw(this.options.shouldLog)||this.options.shouldLog(e)}},{key:"postData",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=t.sent,r=JSON.stringify(e),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=pw(n,"/v1/ingest"),Array.isArray(e)&&(o=pw(o,"/bulk")),t.prev=7,t.next=10,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 10:(a=t.sent).ok||this.logError(new Error("CollectionApiClient failed to log event. Status: ".concat(a.status," ").concat(a.statusText))),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(7),this.logError(t.t0);case 17:case"end":return t.stop()}}),t,this,[[7,14]])})))}},{key:"getSignatureHeader",value:function(e){var t=new tw.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(t.getHash("B64"))}}},{key:"getRegionalUrl",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegion();case 2:n=t.sent,t.t0=n.systemName,t.next=t.t0===fw.CvEuWest1?6:t.t0===fw.CvApSoutheast2?7:t.t0===fw.CvNaWest1?8:(t.t0,fw.CvApSoutheast1,9);break;case 6:return t.abrupt("return",e.cvEuWest1);case 7:return t.abrupt("return",e.cvApSoutheast2);case 8:return t.abrupt("return",e.cvNaWest1);case 9:return t.abrupt("return",e.cvApSoutheast1);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"validateEvent",value:function(e){"string"!=typeof e.type&&this.logError(new Error("Event type is required."),!0),hw(e.actionContext)||this.logError(new Error("Event actionContext is required."),!0),e.actionContext.entity||this.logError(new Error("Event actionContext entity is required."),!0)}},{key:"formatData",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.type,t.next=3,this.getEventData(e);case 3:return t.t1=t.sent,t.t2=this.getEventMetadata(e),t.abrupt("return",{type:t.t0,data:t.t1,metadata:t.t2});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getEventData",value:function(e){return gw(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a,s,u=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.actionContext,t.next=3,this.getUserData();case 3:return r=t.sent,i={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},o=this.extractData(e),a=Object.keys(i).map((function(e){return e.toLowerCase()})),s=Object.keys(o).map((function(e){return e.toLowerCase()})),a.forEach((function(e){s.includes(e)&&u.logError(new Error("".concat(e," is a reserved key.")),!0)})),t.abrupt("return",Object.assign(Object.assign({},i),o));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"extractData",value:function(e){return dw(this.options.formatData)?this.options.formatData(e):(t={},n=e.actionContext.entity,r=e.data,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);var t,n,r}},{key:"getUserData",value:function(){var e,t;return gw(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.options.getUser();case 3:if(null==(r=n.sent)?void 0:r.id){n.next=6;break}return n.abrupt("return");case 6:return n.t0=r.id,n.t1=(null===(e=r.role)||void 0===e?void 0:e.toLowerCase())||"unknown",n.t2=(null===(t=r.userGroup)||void 0===t?void 0:t.toLowerCase())||yw.a.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=17,this.getRegion();case 17:return n.t9=n.sent,n.t10={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:!1},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t10});case 22:n.prev=22,n.t11=n.catch(0),this.logError(n.t11);case 25:case"end":return n.stop()}}),n,this,[[0,22]])})))}},{key:"getRegion",value:function(){return gw(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.regionName,e.prev=1,e.next=4,this.options.getUser();case 4:(null==(n=e.sent)?void 0:n.instanceRegion)&&(t=n.instanceRegion),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.logError(e.t0);case 11:return t||this.logError(new Error("RegionName is not set."),!0),e.abrupt("return",this.getRegionByName(t.toLowerCase()));case 13:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"getPlatformMetadata",value:function(){return{browser:lw(),os:uw(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(e){return{client:{name:"".concat(this.name,".ts"),version:nw.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:e.eventVersion}}},{key:"getRegionByName",value:function(e){var t;return Object.values(mw).forEach((function(n){n.systemName===e&&(t=n)})),t}},{key:"normalizeYearGroup",value:function(e){return e?e.toLowerCase().split(" ").join("_"):"unknown"}},{key:"logError",value:function(e,t){if(this.options.logError&&this.options.logError(e),t)throw e}}])&&vw(t.prototype,n),r&&vw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),_w=n(2),ww=function(){return!0},Tw=function(){return!1};var Sw,Ew,Cw,kw,xw=function(e){return e},Ow={getUploadData:function(e,t){var n=t.actionContext.entity;if(n===_w.EntityType.Video)return Ow.formatVideoUpload(e,t);if(n===_w.EntityType.Resource||n===_w.EntityType.Subtitle)return Ow.formatResourceUpload(e);if(n===_w.EntityType.Banner||n===_w.EntityType.Thumbnail)return e;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(e,t){var n=t.actionContext.workflowPhase;return n===_w.WorkflowPhase.Start?Ow.getStartVideoUploadData(e):n===_w.WorkflowPhase.Discard?Ow.getDiscardVideoUploadData(e):n===_w.WorkflowPhase.Complete?Ow.getCompleteUploadData(e):void 0},getStartVideoUploadData:function(e){return e&&e.length?(e instanceof FileList&&(e=Array.from(e)),e.map((function(t){return{fileName:t.name,size:t.size,type:t.type,count:e.length}}))):[]},getDiscardVideoUploadData:function(e){var t=function(t){var n=t.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(e)?e.length:1,type:r,status:o};return t.progress&&(s.progress=t.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(e)?e.map((function(e){return t(e)})):[t(e)]},getCompleteUploadData:function(e){return e&&e.length?e.map((function(t){return{fileName:t.fileName,libraryId:t.libraryId,folderId:t.folderId,autoCaption:t.autoCaption,count:e.length}})):[]},formatResourceUpload:function(e){var t={id:e.id,name:e.name};return hw(e.metadata)&&(t.type=e.metadata.type),t}},Pw=function(e){var t,n,r,i,o={id:e.id};return(null===(t=e.video)||void 0===t?void 0:t.id)&&(o.video={id:e.video.id}),(null===(n=e.clip)||void 0===n?void 0:n.id)&&(o.clip={id:e.clip.id},(null===(r=e.clip.video)||void 0===r?void 0:r.id)&&(o.video={id:null===(i=e.clip.video)||void 0===i?void 0:i.id})),void 0!==e.shareCount&&(o.shareCount=e.shareCount),e.embedDetails&&(o.embedDetails=o.embedDetails),o};function Rw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Aw=(Rw(Sw={},_w.UserAction.Navigate,Tw),Rw(Sw,_w.UserAction.Click,ww),Rw(Sw,_w.UserAction.Search,ww),Rw(Sw,_w.UserAction.InstantSearch,ww),Rw(Sw,_w.UserAction.Play,ww),Rw(Sw,_w.UserAction.Stream,ww),Rw(Sw,_w.UserAction.WebPlayerStream,ww),Rw(Sw,_w.UserAction.StreamProgress,ww),Rw(Sw,_w.UserAction.Rename,ww),Rw(Sw,_w.UserAction.Move,ww),Rw(Sw,_w.UserAction.Create,ww),Rw(Sw,_w.UserAction.Delete,ww),Rw(Sw,_w.UserAction.Associate,ww),Rw(Sw,_w.UserAction.Dissociate,ww),Rw(Sw,_w.UserAction.Filter,ww),Rw(Sw,_w.UserAction.Sort,ww),Rw(Sw,_w.UserAction.Approve,ww),Rw(Sw,_w.UserAction.Reject,ww),Rw(Sw,_w.UserAction.Disable,ww),Rw(Sw,_w.UserAction.Upload,ww),Rw(Sw,_w.UserAction.Download,Tw),Rw(Sw,_w.UserAction.SetAccess,ww),Rw(Sw,_w.UserAction.AddToLocalCache,Tw),Rw(Sw,_w.UserAction.Share,ww),Rw(Sw,_w.UserAction.Unshare,ww),Rw(Sw,_w.UserAction.Edit,ww),Rw(Sw,_w.UserAction.Suggest,ww),Rw(Sw,_w.UserAction.Favourite,ww),Rw(Sw,_w.UserAction.ResolveWarning,ww),Rw(Sw,_w.UserAction.DismissWarning,ww),Rw(Sw,_w.UserAction.EditAssoc,ww),Rw(Sw,_w.UserAction.Follow,ww),Rw(Sw,_w.UserAction.Print,ww),Rw(Sw,_w.UserAction.Copy,ww),Rw(Sw,_w.UserAction.Activate,ww),Rw(Sw,_w.UserAction.VerifyEmail,ww),Rw(Sw,_w.UserAction.ChangePassword,ww),Rw(Sw,_w.UserAction.Export,ww),Rw(Sw,_w.UserAction.SendEmail,ww),Rw(Sw,_w.UserAction.Publish,ww),Rw(Sw,_w.UserAction.Answer,ww),Rw(Sw,_w.UserAction.Complete,ww),Rw(Sw,_w.UserAction.Archive,ww),Rw(Sw,_w.UserAction.Promote,ww),Rw(Sw,_w.UserAction.Demote,ww),Sw),jw=(Rw(Ew={},_w.UserAction.Search,xw),Rw(Ew,_w.UserAction.InstantSearch,xw),Rw(Ew,_w.UserAction.Play,xw),Rw(Ew,_w.UserAction.Stream,xw),Rw(Ew,_w.UserAction.StreamProgress,xw),Rw(Ew,_w.UserAction.Click,xw),Rw(Ew,_w.UserAction.Filter,xw),Rw(Ew,_w.UserAction.Sort,xw),Rw(Ew,_w.UserAction.SetAccess,xw),Rw(Ew,_w.UserAction.Approve,xw),Rw(Ew,_w.UserAction.Reject,xw),Rw(Ew,_w.UserAction.Create,xw),Rw(Ew,_w.UserAction.Delete,xw),Rw(Ew,_w.UserAction.Rename,xw),Rw(Ew,_w.UserAction.Move,xw),Rw(Ew,_w.UserAction.Edit,xw),Rw(Ew,_w.UserAction.Share,Pw),Rw(Ew,_w.UserAction.Disable,xw),Rw(Ew,_w.UserAction.Suggest,xw),Rw(Ew,_w.UserAction.Upload,Ow.getUploadData),Rw(Ew,_w.UserAction.ResolveWarning,xw),Rw(Ew,_w.UserAction.DismissWarning,xw),Rw(Ew,_w.UserAction.Follow,xw),Rw(Ew,_w.UserAction.Print,xw),Rw(Ew,_w.UserAction.Copy,xw),Ew),Iw=(Rw(Cw={},_w.UserAction.Search,(function(){return"search"})),Rw(Cw,_w.UserAction.InstantSearch,(function(){return"search"})),Rw(Cw,_w.UserAction.Filter,(function(){return"filter"})),Rw(Cw,_w.UserAction.Stream,(function(){return _w.EntityType.Video})),Cw),Lw={user:"target_user"},Dw=(Rw(kw={},_w.UserAction.StreamProgress,!0),Rw(kw,_w.UserAction.WebPlayerStream,!0),kw),Mw={shouldLog:function(e){return!!Aw[e.type](e)},formatData:function(e){var t=jw[e.type],n=dw(t)?t(e.data,e):e.data;if(Dw[e.type])return n;var r=e.actionContext.entity;return dw(Iw[e.type])&&(r=Iw[e.type](e)),Lw[r]&&(r=Lw[r]),Rw({},r,n)}};function Nw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Bw=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Uw=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);R_.cacheExists(e)||(this.collectionApiClient.log({type:_w.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:_w.EventVersion.V2}),R_&&R_.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map((function(e){return{type:_w.UserAction.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:_w.EventVersion.V1}})))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:{productArea:t.productArea,location:this.getLocationContext(),entity:t.entity,descriptor:t.descriptor,workflowPhase:t.workflowPhase},eventVersion:_w.EventVersion.V1})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===_w.EntityType.Interactive?e.interactive={id:+this.options.mediaId}:t===_w.EntityType.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new bw({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:Mw.shouldLog,formatData:Mw.formatData})}},{key:"getCurrentUser",value:function(){return Bw(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?_w.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return _w.EntityType.Video;case"MasterInteractive":return _w.EntityType.Interactive;case"MasterClip":return _w.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return _w.LocationContext.Player;case"interactive-player":return _w.LocationContext.InteractivePlayer;case"create-clip-player":return _w.LocationContext.CreateClipPlayer}}}])&&Nw(t.prototype,n),r&&Nw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Fw(e){return(Fw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hw(){return(Hw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=zw(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function zw(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gw(e)););return e}function qw(e,t){return(qw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ww(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gw(e);if(t){var i=Gw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $w(this,n)}}function $w(e,t){if(t&&("object"===Fw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Gw(e){return(Gw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qw(e,t)}(o,e);var t,n,r,i=Ww(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return Hw(Gw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n);var i=this.buildSeasonEpisodeString();return i?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(i,"</div>")+r,Hw(Gw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,Hw(Gw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&Vw(t.prototype,n),r&&Vw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function Yw(e){return(Yw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qw(){return(Qw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=Jw(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function Jw(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=nT(e)););return e}function Zw(e,t){return(Zw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nT(e);if(t){var i=nT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return tT(this,n)}}function tT(e,t){if(t&&("object"===Yw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function nT(e){return(nT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zw(e,t)}(o,e);var t,n,r,i=eT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(Qw(nT(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){var r=Qw(nT(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return r;var i=this.mapCodeToColourClass(this.options_.ratingCode);return r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(i),innerHTML:this.options_.ratingCode})),this.options_.warning&&r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),r}},{key:"mapCodeToColourClass",value:function(e){switch(e){case"E":return"bg-purple";case"G":return"bg-green";case"PG":return"bg-info";case"M":return"bg-red";case"MA15+":return"bg-pink";case"R18+":return"bg-yellow"}}}])&&Xw(t.prototype,n),r&&Xw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function iT(e){return(iT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aT(e,t){return(aT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lT(e);if(t){var i=lT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return uT(this,n)}}function uT(e,t){if(t&&("object"===iT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function lT(e){return(lT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aT(e,t)}(o,e);var t,n,r,i=sT(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){var e=Fu.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&e.appendChild(new Kw(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),e.appendChild(new rT(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),e}}])&&oT(t.prototype,n),r&&oT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));n(389);function fT(e){return(fT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dT(){return(dT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=pT(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function pT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=gT(e)););return e}function yT(e,t){return(yT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gT(e);if(t){var i=gT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vT(this,n)}}function vT(e,t){if(t&&("object"===fT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gT(e){return(gT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yT(e,t)}(o,e);var t,n,r,i=mT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild(new cT(n.player_,n.options_)),n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(gl,"</div>")),dT(gT(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&hT(t.prototype,n),r&&hT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function _T(e){return function(e){if(Array.isArray(e))return wT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return wT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wT(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ST,ET=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},CT=Fu.getComponent("Player"),kT=450,xT=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=Fu.mergeOptions({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){r._configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.fetch().catch((function(e){r.player.error(e.message),r.options.onError&&r.options.onError(e)}))}))}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=Fu(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){var e=CT.prototype.options_.children;return e=e.filter((function(e){return"bigPlayButton"!==e&&"posterImage"!==e})),{controls:this.options.controls,fluid:!this.options.embed,fill:!!this.options.embed,inactivityTimeout:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(_T(e),["collapserator","playPauseFeedback"]),userActions:{hotkeys:i_},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio}}},{key:"fetch",value:function(){var e,t,n;return ET(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,s=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.options.fetch,void 0===this.options.fetch&&(i=function(e){var t="".concat(s.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return v_.get(t)}),this.options.viewKey){r.next=4;break}throw new Error("Please specify a viewKey or a fetch function");case 4:return r.next=6,i(this.options.viewKey);case 6:if(o=r.sent){r.next=9;break}throw new Error("Error fetching playback object");case 9:o.chapters.list.length>0&&(a=this.player.addTextTrack("chapters"),o.chapters.list.forEach((function(e){a.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),a.trigger({type:"loadeddata",target:a})),this.player.localCache({localCacheAddresses:o.localCacheAddresses,enabled:null===(e=this.options.enableLocalCache)||void 0===e||e}),this.player.progressiveFiles({sources:o.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),o.subtitles.list.length>0&&(o.subtitles.list.forEach((function(e){"text/vtt"===e.mimeType&&s.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=o.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=o.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault})),o.posterUrl&&this.player.poster(o.posterUrl),this.options.autoplay||this.setupSplash(o),this.additionalSetup(o),this.options.autoplay&&this.player.ready((function(){s.player.play().catch((function(){s.setupSplash(o)}))})),this.options.startTime&&this.player.currentTime(this.options.startTime);case 18:case"end":return r.stop()}}),r,this)})))}},{key:"fetchConfig",value:function(){var e=this;if(!ST&&!this.options.fetch){var t="".concat(this.options.playerApi.origin,"/api/config");v_.get(t).then((function(t){ST=t,e.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(e){var t,n,r,i=this;this.player.persistQualitySettingsPlugin({playbackProfile:null===(t=e.settings)||void 0===t?void 0:t.playbackProfile,playbackProfileLocalCache:null===(n=e.settings)||void 0===n?void 0:n.playbackProfileLocalCache}),this.player.whiteboardModePlugin();var o=this.options.enableLocalCache&&!!(null===(r=e.localCacheAddresses)||void 0===r?void 0:r.length);ST?this.setupAnalyticsService(e,o):this.one("config:loaded",(function(){return i.setupAnalyticsService(e,o)}))}},{key:"setupAnalyticsService",value:function(e,t){this.analyticsService=new Uw({collectionApiUrls:ST.collectionApi.urls,collectionApiClientId:ST.collectionApi.clientId,productVersion:Yu.a,videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:!!this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e),regionName:e.instanceRegion||this.options.sharerInstanceRegion||fw.CvApSoutheast1}),this.on("timeupdate",this.logStream)}},{key:"getAdditionalAnalyticsData",value:function(e){return{}}},{key:"logStream",value:function(){this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=Fu.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=Fu.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"duration",value:function(){return this.player.duration()}},{key:"bindEventListeners",value:function(){var e=this,t=function(){return e.configureMenuDimensions()};if(this.player.ready(t),this.on("resize",t),this.on("fullscreenchange",t),this.one("play",t),this.on("resizemenus",t),this.player.one("dispose",(function(){e.off("resize",t),e.off("fullscreenchange",t),e.off("resizemenus",t)})),this.options.hotkeyElQuerySelector){var n=Fu.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){var t=this.player.addChild("posterImage");this.player.addChild("bigPlayButton");var n=new bT(this.player,{embed:this.options.embed,posterUrl:e.posterUrl,title:e.title,ratingCode:e.ratingCode,seriesName:e.seriesName,seasonNumber:e.seasonNumber,episodeNumber:e.episodeNumber});t.addChild(n),t.show()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var e=this;if(this.player.isFullscreen()){var t=this.player.whiteboardModePlugin().side;if("top"===t){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},i),this.player.trigger("volumechange")}else{var o=this.player.getChild("collapserator"),a=o.getChild("volumePanel"),s=o.children_.indexOf(a);o.removeChild(a),o.addChild("volumePanel",{inline:!0},s),this.player.trigger("volumechange")}if("left"===t||"right"===t||"top"===t){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(u,"px - 4em)")}))}}var l=this.player.currentWidth(),c=this.player.currentHeight()/l*100,f=this.player.el().querySelector(".cv-collapsorator"),h=this.player.el().querySelectorAll(".vjs-menu"),d=f&&f.offsetHeight;d?("CreateClipSeekBar"===this.getSeekBarName()&&(d+=22),h&&h.length&&h.forEach((function(t){t.style.paddingTop="calc(".concat(c,"% - ").concat(d,"px)"),t.style.marginBottom="".concat(d,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(l<=kT?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))}))):this.one("play",(function(){return e.configureMenuDimensions()}))}}])&&TT(t.prototype,n),r&&TT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function OT(e){return(OT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function RT(){return(RT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=AT(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function AT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=MT(e)););return e}function jT(e,t){return(jT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=MT(e);if(t){var i=MT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LT(this,n)}}function LT(e,t){if(t&&("object"===OT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return DT(e)}function DT(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MT(e){return(MT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xT.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0};var NT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jT(e,t)}(o,e);var t,n,r,i=IT(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e),void 0===t.startTime)throw Error("Invalid clip start");if(void 0===t.endTime)throw Error("Invalid clip end");if(t.startTime>t.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(t.startTime.toPrecision(4)),n._clipEnd=parseFloat(t.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(e),n.playerDurationFn=n.player.duration.bind(e),n.playerCurrentTimeFn=n.player.currentTime.bind(e),n.playerbufferedFn=n.player.buffered.bind(e),n.player.ended=n.ended.bind(DT(n)),n.player.duration=n.duration.bind(DT(n)),n.player.currentTime=n.currentTime.bind(DT(n)),n.player.buffered=n.buffered.bind(DT(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return t=o,(n=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),RT(MT(o.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return void 0!==e&&this.playerDurationFn(e),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if(void 0===e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn.apply(this,[t].concat(r))}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return Fu.createTimeRanges(t)}}])&&PT(t.prototype,n),r&&PT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("clipPlugin",NT);var BT=n(37),UT=n.n(BT);function FT(e){return(FT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zT(e,t,n){return t&&HT(e.prototype,t),n&&HT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qT(){return(qT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=WT(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function WT(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=XT(e)););return e}function $T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&>(e,t)}function GT(e,t){return(GT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function KT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=XT(e);if(t){var i=XT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return YT(this,n)}}function YT(e,t){if(t&&("object"===FT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function XT(e){return(XT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var QT=function(e){$T(n,e);var t=KT(n);function n(e,r){return VT(this,n),t.call(this,e,r)}return zT(n,[{key:"dispose",value:function(){UT.a.unmountComponentAtNode(this.el()),qT(XT(n.prototype),"dispose",this).call(this)}}]),n}(Fu.getComponent("Component")),JT={tagName:"div"};function ZT(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JT;if(!e)throw new Error("componentCtor is required");var n=function(n){$T(i,n);var r=KT(i);function i(){return VT(this,i),r.apply(this,arguments)}return zT(i,[{key:"createEl",value:function(){var n=Fu.dom.createEl(t.tagName,t.properties,t.attributes);return UT.a.render(e(this.player_,this.options_),n),n}}]),i}(QT);return n}n(393);function eS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nS(e){var t,n=r.useRef(e.player.duration()-e.player.currentTime()),i=eS(r.useState(n.current),2),o=i[0],a=i[1];function s(){var t=e.player.duration()-e.player.currentTime();a(t),t>n.current&&(n.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",s),function(){e.player.off("timeupdate",s)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var u=Math.ceil(o),l=1===u?"second":"seconds";return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-up-next-container"},r.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),r.createElement("div",{className:"cv-up-next-heading"},"Up next in ",u," ",l,":"),r.createElement("div",{className:"cv-up-next-image cursor-pointer",onClick:e.onPlayNext,style:{backgroundImage:"url(".concat(null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function rS(e){return(rS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function iS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oS(){return(oS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=aS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function aS(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cS(e)););return e}function sS(e,t){return(sS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cS(e);if(t){var i=cS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lS(this,n)}}function lS(e,t){if(t&&("object"===rS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cS(e){return(cS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("UpNext",ZT((function(e,t){return r.createElement(nS,Object.assign({player:e},t))})));var fS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sS(e,t)}(o,e);var t,n,r,i=uS(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=o,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,Fu.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,Fu.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Fu.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=oS(cS(o.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&iS(t.prototype,n),r&&iS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function hS(e){return(hS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pS(){return(pS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=yS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function yS(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_S(e)););return e}function mS(e,t){return(mS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_S(e);if(t){var i=_S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gS(this,n)}}function gS(e,t){if(t&&("object"===hS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bS(e)}function bS(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _S(e){return(_S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("NextVideoMenuItem",fS);var wS=Fu.getPlugin("plugin"),TS=(Fu.getComponent("MenuItem"),Fu.getComponent("NextVideoMenuItem")),SS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mS(e,t)}(o,e);var t,n,r,i=vS(o);function o(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(bS(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(bS(t)),t.setChapterTrack=t.setChapterTrack.bind(bS(t)),t.onTimeUpdate=t.onTimeUpdate.bind(bS(t)),t.hasLocalStorage=t.testHasLocalStorage(),t.shouldPlayNextVideo=!1,t.hasLocalStorage){var n=window.localStorage.getItem("cv-play-next-video");t.shouldPlayNextVideo="true"===n}return e.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){this.player.isDisposed()||(cp(this.player,"chapters",null,this.setChapterTrack),this.bindListeners())}},{key:"setNextVideo",value:function(e,t,n){var r;this.player.isDisposed()||(this.nextVideo=e,this.callback=n,t&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:TS,name:"NextVideoMenuItem"}))}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem("cv-play-next-video",e.toString())}},{key:"setChapterTrack",value:function(e){this.chapterTrack=e}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),pS(_S(o.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var e,t,n,r;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint||("credits"===(null===(r=null===(n=(null===(t=null===(e=this.chapterTrack)||void 0===e?void 0:e.activeCues)||void 0===t?void 0:t.length)&&this.chapterTrack.activeCues[0])||void 0===n?void 0:n.text)||void 0===r?void 0:r.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext())}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&this.player.removeChild(e)}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem("cv-persisttest","persistPlayNext"),window.localStorage.removeItem("cv-persisttest"),!0}catch(e){return!1}}}])&&dS(t.prototype,n),r&&dS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(wS);Fu.registerPlugin("nextVideoPlugin",SS);n(394);function ES(e){return(ES="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xS(){return(xS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=OS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function OS(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jS(e)););return e}function PS(e,t){return(PS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function RS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jS(e);if(t){var i=jS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return AS(this,n)}}function AS(e,t){if(t&&("object"===ES(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jS(e){return(jS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var IS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PS(e,t)}(o,e);var t,n,r,i=RS(o);function o(){var e;return CS(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){xS(jS(o.prototype),"handleClick",this).call(this,null)}}])&&kS(t.prototype,n),r&&kS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function LS(e){return(LS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function MS(e,t){return(MS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function NS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=US(e);if(t){var i=US(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return BS(this,n)}}function BS(e,t){if(t&&("object"===LS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function US(e){return(US=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}IS.prototype.controlText_="Create Clip",Fu.registerComponent("CreateClipButton",IS);var FS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MS(e,t)}(o,e);var t,n,r,i=NS(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&DS(t.prototype,n),r&&DS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("createClipButtonPlugin",FS);var VS,HS=n(3),zS=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},qS=n(98),WS=n(38),$S=n(12);function GS(e){return(GS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function XS(e,t){return(XS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ZS(e);if(t){var i=ZS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}function JS(e,t){if(t&&("object"===GS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ZS(e){return(ZS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.Analytics="AnalyticsService",e.Context="ContextService"}(VS||(VS={}));var eE,tE=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XS(e,t)}(o,e);var t,n,r,i=QS(o);function o(){var e;return KS(this,o),(e=i.apply(this,arguments)).contextHistory=[],e}return t=o,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"name",get:function(){return VS.Context}},{key:"initialize",value:function(){this.listenTo($S.a.SHELL,qS.EventNames.ROUTE,this.setContext)}},{key:"setContext",value:function(e){this.contextHistory.length>=5&&this.contextHistory.unshift(),this.contextHistory.push({pageLoad:!this.contextHistory.length,appLink:e})}},{key:"getCurrentContext",value:function(){if(this.contextHistory.length)return this.contextHistory[this.contextHistory.length-1]}},{key:"fromPageLoad",value:function(){return 1===this.contextHistory.length}}])&&YS(t.prototype,n),r&&YS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(qS.Service)),nE=n(10);!function(e){e.Inlet="event:inlet",e.Outlet="event:outlet"}(eE||(eE={}));var rE="global:analytics";function iE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var oE=_w.EventVersion.V1,aE=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.data=n,this.actionContext=r,this.eventVersion=i||oE}var t,n,r;return t=e,(n=[{key:"isType",value:function(e){return e===this.type}},{key:"enrich",value:function(e,t){this.validateKey(e),this[e]=t}},{key:"get",value:function(e){if(e&&this[e])return this[e]}},{key:"validateKey",value:function(e){"type"!==e&&"data"!==e||qS.ErrorHelper.throw(new WS.a("".concat(e," is not a valid key"))),this[e]&&qS.ErrorHelper.throw(new WS.a("Event already contains an enrichment named ".concat(e)))}}])&&iE(t.prototype,n),r&&iE(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),sE=function(e,t,n,r){nE.Radio.channel(rE).trigger(eE.Inlet,new aE(e,t,n,r))};function uE(){var e=tE.getCurrentContext().appLink;return HS.isObject(e)||qS.ErrorHelper.throw(new WS.a("Applink does not exist. Check current context.")),e.application.replace(":","-")}function lE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.location,n=e.entity,r=e.workflowPhase,i=void 0===r?null:r,o=e.descriptor,a=void 0===o?null:o;return t||qS.ErrorHelper.throw(new WS.a("location must be set.")),n||qS.ErrorHelper.throw(new WS.a("entity must be set.")),{productArea:uE(),location:t,entity:n,descriptor:a,workflowPhase:i}}function cE(){return qS.LocationUtils.GetCurrentPath()+qS.LocationUtils.GetCurrentQueryString()}var fE={logUserAction:function(e,t){if(function(e){return!(!HS.isArray(e)||!HS.every(e,(function(e){return HS.isObject(e)})))||!!HS.isObject(e)}(e)&&HS.isObject(t)){var n=fE.buildUserActionEvent(t),r=n.userAction,i=n.action,o=n.eventVersion;sE(r,e,i,o)}},logNavigate:function(e,t){var n=Object.assign({currentLocation:cE(),appLink:e},t);sE(_w.UserAction.Navigate,n)},mergeOptions:function(e,t){return HS.extend({},e,t)},buildActionContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return lE(e)},buildUserActionEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionType,n=e.eventVersion,r=t,i=lE(e);return{userAction:r,action:i,eventVersion:n}},buildCurrentLocation:function(){return cE()},buildSearchEvent:function(e,t){return{data:{query:e},action:lE({entity:_w.EntityType.Video,location:_w.LocationContext.SearchBar,descriptor:t})}},buildInstantSearchEvent:function(e,t,n){var r;n===_w.SearchQueryType.Series&&(r=_w.EntityType.Series),n===_w.SearchQueryType.Folder&&(r=_w.EntityType.Folder),n===_w.SearchQueryType.Tags&&(r=_w.EntityType.Tag),n===_w.SearchQueryType.Video&&(r=_w.EntityType.Video),n===_w.SearchQueryType.Subjects&&(r=_w.EntityType.Classification);var i={instant:{},query:e};return t.id&&(i.instant.selectedId=t.id),t.name&&(i.instant.selectedName=t.name),{data:i,action:lE({entity:r,location:_w.LocationContext.SearchBar})}},mapInteractionType:function(e){switch(e){case _w.InteractionType.DragDrop:return _w.InteractionTypeDescriptor.DragDrop;case _w.InteractionType.FileSelect:return _w.InteractionTypeDescriptor.FileSelect;default:return}}};function hE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return dE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var pE={isEmpty:function(e){return HS.isEmpty(e)},values:function(e){return HS.values(e)},keys:function(e){return HS.keys(e)},deepClone:function(e){return(HS.isArray(e)?HS.map:HS.mapObject)(e,(function(e){return HS.isObject(e)||HS.isArray(e)?pE.deepClone(e):e}))},getEnumKeys:function(e){return Object.keys(e).filter((function(e){return!(parseInt(e)>=0)}))},isObject:function(e){return HS.isObject(e)},isEqual:function(e,t){return HS.isEqual(e,t)},omit:function(e,t){return HS.omit(e,t)},removeEmptyKeys:function(e){return Object.entries(e).filter((function(e){return null!==hE(e,2)[1]})).reduce((function(e,t){var n=hE(t,2),r=n[0],i=n[1];return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,i))}),{})}};function yE(e,t){if(!e)throw new Error("Invariant failed")}function mE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vE(){return(vE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function gE(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var bE=new Map,_E=new Map,wE=new Map,TE=0;function SE(e,t,n){void 0===n&&(n={}),n.threshold||(n.threshold=0);var r=n,i=r.root,o=r.rootMargin,a=r.threshold;if(bE.has(e)&&yE(!1),e){var s=function(e){return e?wE.has(e)?wE.get(e):(TE+=1,wE.set(e,TE.toString()),wE.get(e)+"_"):""}(i)+(o?a.toString()+"_"+o:a.toString()),u=_E.get(s);u||(u=new IntersectionObserver(CE,n),s&&_E.set(s,u));var l={callback:t,element:e,inView:!1,observerId:s,observer:u,thresholds:u.thresholds||(Array.isArray(a)?a:[a])};return bE.set(e,l),u.observe(e),l}}function EE(e){if(e){var t=bE.get(e);if(t){var n=t.observerId,r=t.observer,i=r.root;r.unobserve(e);var o=!1,a=!1;n&&bE.forEach((function(t,r){r!==e&&(t.observerId===n&&(o=!0,a=!0),t.observer.root===i&&(a=!0))})),!a&&i&&wE.delete(i),r&&!o&&r.disconnect(),bE.delete(e)}}}function CE(e){e.forEach((function(e){var t=e.isIntersecting,n=e.intersectionRatio,r=e.target,i=bE.get(r);if(i&&n>=0){var o=i.thresholds.some((function(e){return i.inView?n>e:n>=e}));void 0!==t&&(o=o&&t),i.inView=o,i.callback(o,e)}}))}var kE=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mE(gE(t=e.call.apply(e,[this].concat(r))||this),"state",{inView:!1,entry:void 0}),mE(gE(t),"node",null),mE(gE(t),"handleNode",(function(e){t.node&&EE(t.node),t.node=e||null,t.observeNode()})),mE(gE(t),"handleChange",(function(e,n){(e!==t.state.inView||e)&&t.setState({inView:e,entry:n}),t.props.onChange&&t.props.onChange(e,n)})),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=i.prototype;return o.componentDidMount=function(){this.node||yE(!1)},o.componentDidUpdate=function(e,t){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold||(EE(this.node),this.observeNode()),t.inView!==this.state.inView&&this.state.inView&&this.props.triggerOnce&&(EE(this.node),this.node=null)},o.componentWillUnmount=function(){this.node&&(EE(this.node),this.node=null)},o.observeNode=function(){if(this.node){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin;SE(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r})}},o.render=function(){var e=this.state,t=e.inView,n=e.entry;if(!function(e){return"function"!=typeof e.children}(this.props))return this.props.children({inView:t,entry:n,ref:this.handleNode});var i=this.props,o=i.children,a=i.as,s=i.tag,u=(i.triggerOnce,i.threshold,i.root,i.rootMargin,i.onChange,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(i,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange"]));return Object(r.createElement)(a||s||"div",vE({ref:this.handleNode},u),o)},i}(r.Component);function xE(e){void 0===e&&(e={});var t=Object(r.useRef)(),n=Object(r.useState)({inView:!1,entry:void 0}),i=n[0],o=n[1],a=Object(r.useCallback)((function(n){t.current&&EE(t.current),n&&SE(n,(function(t,r){o({inView:t,entry:r}),t&&e.triggerOnce&&EE(n)}),e),t.current=n}),[e.threshold,e.root,e.rootMargin,e.triggerOnce]);return Object(r.useDebugValue)(i.inView),[a,i.inView,i.entry]}mE(kE,"displayName","InView"),mE(kE,"defaultProps",{threshold:0,triggerOnce:!1});function OE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return PE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var RE=n(137),AE=n.n(RE);function jE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return IE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var LE,DE,ME,NE,BE,UE,FE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},VE=r.memo((function(e){var t=e.forceLoad,n=e.extraClasses,i=void 0===n?"":n,o=e.errorFallbackImageSrc,a=e.src,s=FE(e,["forceLoad","extraClasses","errorFallbackImageSrc","src"]),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.prevent,n=e.rootMargin,r=e.triggerOnce,i=void 0===r||r,o=xE({triggerOnce:i,rootMargin:n}),a=OE(o,3),s=a[0],u=a[1],l=a[2];return!0!==t&&void 0!==window.IntersectionObserver||(u=!0,s=null),{ref:s,inView:u,initialized:!!l}}({rootMargin:"500px"}),l=u.ref,c=u.inView,f=jE(r.useState(!1),2),h=f[0],d=f[1];function p(){return h&&o?o:e.src}if(r.useEffect((function(){if(t||c){var e=new Image;return e.onerror=function(){d(!0),o&&(e.src=o)},e.src=a,function(){return e.onerror=null}}}),[c]),h&&!o)return r.createElement(r.Fragment,null);if(!l)return r.createElement("img",Object.assign({className:"".concat(AE.a.image," ").concat(i),alt:"",src:p()},s));var y=Object.assign(Object.assign({alt:""},s),c||t?{src:p()}:{});return t||(y.ref=l),r.createElement("img",Object.assign({className:"".concat(AE.a.image," ").concat(i)},y))}));function HE(e){var t=e.appLink,n=e.appLinkOptions,i=e.className,o=e.style,a=e.children,s=e.disabled,u=e.tag,l=void 0===u?"a":u;if(!t)return r.createElement("span",{className:i||""},a);var c=qS.AppLinkHelper.getHref(t),f={onClick:function(r){var i;r.preventDefault(),e.disabled||(null===(i=e.onClick)||void 0===i||i.call(e,r),e.analyticsData&&e.analyticsOptions&&fE.logUserAction(Object.assign({href:c},e.analyticsData),e.analyticsOptions),e.openInNewTab?qS.LocationUtils.PageLoad(c,!0):qS.AppLinkHelper.trigger(t,n))},href:c,className:i,style:o,disabled:s};return e.title&&(f.title=e.title),r.createElement(l,Object.assign({},f),a)}function zE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}HE.defaultProps={appLinkOptions:{}},function(e){e.Small="small",e.Medium="medium",e.Large="large"}(LE||(LE={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners",e[e.Pdf=8]="Pdf",e[e.Link=9]="Link",e[e.None=99999]="None"}(DE||(DE={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(ME||(ME={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(NE||(NE={})),function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(UE||(UE={}));var qE,WE=(zE(BE={},DE.Banners,UE.Banner),zE(BE,DE.Thumbnails,UE.Thumbnail),BE),$E=function(e){return"/v1/category-map/".concat(e)},GE={createUrl:function(e,t){return GE._createUrl(e,t)},createBannerUrl:function(e,t,n){return e&&e.url?GE._createUrl(e.url,n):GE._createCategoryMappedUrl(t,n)},createResourceImage:function(e,t,n){return GE._createUrl(e,Object.assign({url:t},n))},Rfc3986EncodeURIComponent:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)},_createCategoryMappedUrl:function(e,t){var n=e.fallbackBaseUrl,r=e.fallbackCategoryName,i=e.type,o=zS(n,"".concat($E(WE[i]))),a=Object.assign({name:GE.Rfc3986EncodeURIComponent(r)},t);return GE._createUrl(o,a)},_createUrl:function(e,t){if(e){if(pE.isEmpty(t))return e;var n=$.param(t),r=-1===e.indexOf("?")?"?":"&",i=e;return i.endsWith("/")&&(i=i.slice(0,-1)),i+"".concat(r).concat(n)}},legacyCreateThumbnailUrl:function(e,t){if(!e)return"";var n;if(e&&(n=e instanceof qS.Model?e.get("url"):"string"==typeof e?e:e.url)){var r=Object.assign({size:LE.Small,bgColor:"000"},t);return GE._createUrl(n,r)}},getDisplayImageFromObject:function(e){var t,n,r,i,o,a,s,u;return"tallPoster"in e&&(null===(t=e.tallPoster)||void 0===t?void 0:t.url)?e.tallPoster:"cover"in e&&(null===(n=e.cover)||void 0===n?void 0:n.url)?e.cover:"thumbnail"in e&&(null===(r=e.thumbnail)||void 0===r?void 0:r.url)?e.thumbnail:"video"in e&&(null===(o=null===(i=e.video)||void 0===i?void 0:i.thumbnail)||void 0===o?void 0:o.url)?e.video.thumbnail:"clip"in e&&(null===(u=null===(s=null===(a=e.clip)||void 0===a?void 0:a.video)||void 0===s?void 0:s.thumbnail)||void 0===u?void 0:u.url)?e.clip.video.thumbnail:null}},KE=n(45),YE=n.n(KE);function XE(e){var t=YE.a.image,n="";return e.imageType===DE.Thumbnails&&(n="thumbnail ".concat(YE.a.thumbnail)),e.imageType===DE.TallPosters&&(n=YE.a.tallPoster),e.imageType===DE.Covers&&(n=YE.a.cover),e.imageType===DE.Banners&&(n=YE.a.banner),e.imageType===DE.Posters&&(n=YE.a.poster),e.imageType===DE.Pdf&&(n=YE.a.pdf),e.imageType===DE.Link&&(n=YE.a.link),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function QE(e){var t=e.data,n=e.imageOptions,i=e.appLink,o=e.preload,a=e.analyticsOptions,s=e.analyticsData,u=e.imageClassName,l="";"string"==typeof t?l=t:pE.isObject(t)&&(l=t.url);var c=l&&n?GE.createUrl(l,n):l;return r.createElement("div",{className:XE(e),style:e.imageStyle},i?r.createElement(HE,{appLink:i,analyticsData:s,analyticsOptions:a},e.children,c&&r.createElement(VE,{src:c,forceLoad:o,extraClasses:u,errorFallbackImageSrc:e.errorFallbackImageSrc})):r.createElement(r.Fragment,null,e.children,c&&r.createElement(VE,{src:c,forceLoad:o,extraClasses:u,errorFallbackImageSrc:e.errorFallbackImageSrc})))}function JE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ZE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eC(e){var t=JE(Object(r.useState)(window.matchMedia(e).matches),2),n=t[0],i=t[1];return Object(r.useEffect)((function(){var t=window.matchMedia(e);t.matches!==n&&i(t.matches);var r=function(){return i(t.matches)};return t.addListener(r),function(){return t.removeListener(r)}}),[e]),n}function tC(){return(tC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function nC(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function rC(e,t){return(rC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iC(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rC(e,t)}function oC(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}function aC(){var e=Object(r.useRef)(!0),t=Object(r.useRef)((function(){return e.current}));return Object(r.useEffect)((function(){return function(){e.current=!1}}),[]),t.current}function sC(e){var t,n,i=(t=e,(n=Object(r.useRef)(t)).current=t,n);Object(r.useEffect)((function(){return function(){return i.current()}}),[])}!function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(qE||(qE={}));var uC=Math.pow(2,31)-1;function lC(){var e=aC(),t=Object(r.useRef)();return sC((function(){return clearTimeout(t.current)})),Object(r.useMemo)((function(){var n=function(){return clearTimeout(t.current)};return{set:function(r,i){void 0===i&&(i=0),e()&&(n(),i<=uC?t.current=setTimeout(r,i):function e(t,n,r){var i=r-Date.now();t.current=i<=uC?setTimeout(n,i):setTimeout((function(){return e(t,n,r)}),uC)}(t,r,Date.now()+i))},clear:n}}),[])}function cC(e){return e&&"setState"in e?UT.a.findDOMNode(e):null!=e?e:null}var fC=n(129),hC=n.n(fC);n(130);function dC(e,t,n){var i=Object(r.useRef)(void 0!==e),o=Object(r.useState)(t),a=o[0],s=o[1],u=void 0!==e,l=i.current;return i.current=u,!u&&l&&a!==t&&s(t),[u?e:a,Object(r.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n&&n.apply(void 0,[e].concat(r)),s(e)}),[n])]}function pC(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function yC(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function mC(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}pC.__suppressDeprecationWarning=!0,yC.__suppressDeprecationWarning=!0,mC.__suppressDeprecationWarning=!0;var vC=n(66),gC=n.n(vC),bC=n(19),_C=n.n(bC);function wC(){return Object(r.useState)(null)}var TC=function(e){return e&&"function"!=typeof e?function(t){e.current=t}:e};var SC=function(e,t){return Object(r.useMemo)((function(){return function(e,t){var n=TC(e),r=TC(t);return function(e){n&&n(e),r&&r(e)}}(e,t)}),[e,t])},EC="top",CC="bottom",kC="right",xC="left",OC=[EC,CC,kC,xC],PC=OC.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),RC=[].concat(OC,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),AC=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];var jC=function(e){var t=aC();return[e[0],Object(r.useCallback)((function(n){if(t())return e[1](n)}),[t,e[1]])]};function IC(e){return e.split("-")[0]}function LC(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function DC(e){return e instanceof LC(e).Element||e instanceof Element}function MC(e){return e instanceof LC(e).HTMLElement||e instanceof HTMLElement}function NC(e){return"undefined"!=typeof ShadowRoot&&(e instanceof LC(e).ShadowRoot||e instanceof ShadowRoot)}var BC=Math.max,UC=Math.min,FC=Math.round;function VC(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(MC(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(r=FC(n.width)/a||1),o>0&&(i=FC(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function HC(e){var t=VC(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function zC(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&NC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qC(e){return e?(e.nodeName||"").toLowerCase():null}function WC(e){return LC(e).getComputedStyle(e)}function $C(e){return["table","td","th"].indexOf(qC(e))>=0}function GC(e){return((DC(e)?e.ownerDocument:e.document)||window.document).documentElement}function KC(e){return"html"===qC(e)?e:e.assignedSlot||e.parentNode||(NC(e)?e.host:null)||GC(e)}function YC(e){return MC(e)&&"fixed"!==WC(e).position?e.offsetParent:null}function XC(e){for(var t=LC(e),n=YC(e);n&&$C(n)&&"static"===WC(n).position;)n=YC(n);return n&&("html"===qC(n)||"body"===qC(n)&&"static"===WC(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&MC(e)&&"fixed"===WC(e).position)return null;var n=KC(e);for(NC(n)&&(n=n.host);MC(n)&&["html","body"].indexOf(qC(n))<0;){var r=WC(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function QC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function JC(e,t,n){return BC(e,UC(t,n))}function ZC(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ek(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var tk={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=IC(n.placement),u=QC(s),l=[xC,kC].indexOf(s)>=0?"height":"width";if(o&&a){var c=function(e,t){return ZC("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ek(e,OC))}(i.padding,n),f=HC(o),h="y"===u?EC:xC,d="y"===u?CC:kC,p=n.rects.reference[l]+n.rects.reference[u]-a[u]-n.rects.popper[l],y=a[u]-n.rects.reference[u],m=XC(o),v=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,g=p/2-y/2,b=c[h],_=v-f[l]-c[d],w=v/2-f[l]/2+g,T=JC(b,w,_),S=u;n.modifiersData[r]=((t={})[S]=T,t.centerOffset=T-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&zC(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function nk(e){return e.split("-")[1]}var rk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ik(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,f=e.isFixed,h=a.x,d=void 0===h?0:h,p=a.y,y=void 0===p?0:p,m="function"==typeof c?c({x:d,y:y}):{x:d,y:y};d=m.x,y=m.y;var v=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=xC,_=EC,w=window;if(l){var T=XC(n),S="clientHeight",E="clientWidth";if(T===LC(n)&&"static"!==WC(T=GC(n)).position&&"absolute"===s&&(S="scrollHeight",E="scrollWidth"),T=T,i===EC||(i===xC||i===kC)&&"end"===o)_=CC,y-=(f&&T===w&&w.visualViewport?w.visualViewport.height:T[S])-r.height,y*=u?1:-1;if(i===xC||(i===EC||i===CC)&&"end"===o)b=kC,d-=(f&&T===w&&w.visualViewport?w.visualViewport.width:T[E])-r.width,d*=u?1:-1}var C,k=Object.assign({position:s},l&&rk),x=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:FC(t*r)/r||0,y:FC(n*r)/r||0}}({x:d,y:y}):{x:d,y:y};return d=x.x,y=x.y,u?Object.assign({},k,((C={})[_]=g?"0":"",C[b]=v?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+d+"px, "+y+"px)":"translate3d("+d+"px, "+y+"px, 0)",C)):Object.assign({},k,((t={})[_]=g?y+"px":"",t[b]=v?d+"px":"",t.transform="",t))}var ok={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,u=void 0===s||s,l={placement:IC(t.placement),variation:nk(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ik(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ik(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ak={passive:!0};var sk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,u=LC(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach((function(e){e.addEventListener("scroll",n.update,ak)})),s&&u.addEventListener("resize",n.update,ak),function(){o&&l.forEach((function(e){e.removeEventListener("scroll",n.update,ak)})),s&&u.removeEventListener("resize",n.update,ak)}},data:{}},uk={left:"right",right:"left",bottom:"top",top:"bottom"};function lk(e){return e.replace(/left|right|bottom|top/g,(function(e){return uk[e]}))}var ck={start:"end",end:"start"};function fk(e){return e.replace(/start|end/g,(function(e){return ck[e]}))}function hk(e){var t=LC(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function dk(e){return VC(GC(e)).left+hk(e).scrollLeft}function pk(e){var t=WC(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function yk(e,t){var n;void 0===t&&(t=[]);var r=function e(t){return["html","body","#document"].indexOf(qC(t))>=0?t.ownerDocument.body:MC(t)&&pk(t)?t:e(KC(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=LC(r),a=i?[o].concat(o.visualViewport||[],pk(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(yk(KC(a)))}function mk(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vk(e,t){return"viewport"===t?mk(function(e){var t=LC(e),n=GC(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+dk(e),y:s}}(e)):DC(t)?function(e){var t=VC(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):mk(function(e){var t,n=GC(e),r=hk(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=BC(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=BC(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+dk(e),u=-r.scrollTop;return"rtl"===WC(i||n).direction&&(s+=BC(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(GC(e)))}function gk(e,t,n){var r="clippingParents"===t?function(e){var t=yk(KC(e)),n=["absolute","fixed"].indexOf(WC(e).position)>=0&&MC(e)?XC(e):e;return DC(n)?t.filter((function(e){return DC(e)&&zC(e,n)&&"body"!==qC(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],a=i.reduce((function(t,n){var r=vk(e,n);return t.top=BC(r.top,t.top),t.right=UC(r.right,t.right),t.bottom=UC(r.bottom,t.bottom),t.left=BC(r.left,t.left),t}),vk(e,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function bk(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?IC(i):null,a=i?nk(i):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case EC:t={x:s,y:n.y-r.height};break;case CC:t={x:s,y:n.y+n.height};break;case kC:t={x:n.x+n.width,y:u};break;case xC:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var l=o?QC(o):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case"start":t[l]=t[l]-(n[c]/2-r[c]/2);break;case"end":t[l]=t[l]+(n[c]/2-r[c]/2)}}return t}function _k(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.boundary,a=void 0===o?"clippingParents":o,s=n.rootBoundary,u=void 0===s?"viewport":s,l=n.elementContext,c=void 0===l?"popper":l,f=n.altBoundary,h=void 0!==f&&f,d=n.padding,p=void 0===d?0:d,y=ZC("number"!=typeof p?p:ek(p,OC)),m="popper"===c?"reference":"popper",v=e.rects.popper,g=e.elements[h?m:c],b=gk(DC(g)?g:g.contextElement||GC(e.elements.popper),a,u),_=VC(e.elements.reference),w=bk({reference:_,element:v,strategy:"absolute",placement:i}),T=mk(Object.assign({},v,w)),S="popper"===c?T:_,E={top:b.top-S.top+y.top,bottom:S.bottom-b.bottom+y.bottom,left:b.left-S.left+y.left,right:S.right-b.right+y.right},C=e.modifiersData.offset;if("popper"===c&&C){var k=C[i];Object.keys(E).forEach((function(e){var t=[kC,CC].indexOf(e)>=0?1:-1,n=[EC,CC].indexOf(e)>=0?"y":"x";E[e]+=k[n]*t}))}return E}var wk={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,u=n.fallbackPlacements,l=n.padding,c=n.boundary,f=n.rootBoundary,h=n.altBoundary,d=n.flipVariations,p=void 0===d||d,y=n.allowedAutoPlacements,m=t.options.placement,v=IC(m),g=u||(v===m||!p?[lk(m)]:function(e){if("auto"===IC(e))return[];var t=lk(e);return[fk(e),t,fk(t)]}(m)),b=[m].concat(g).reduce((function(e,n){return e.concat("auto"===IC(n)?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,l=void 0===u?RC:u,c=nk(r),f=c?s?PC:PC.filter((function(e){return nk(e)===c})):OC,h=f.filter((function(e){return l.indexOf(e)>=0}));0===h.length&&(h=f);var d=h.reduce((function(t,n){return t[n]=_k(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[IC(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:c,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:y}):n)}),[]),_=t.rects.reference,w=t.rects.popper,T=new Map,S=!0,E=b[0],C=0;C<b.length;C++){var k=b[C],x=IC(k),O="start"===nk(k),P=[EC,CC].indexOf(x)>=0,R=P?"width":"height",A=_k(t,{placement:k,boundary:c,rootBoundary:f,altBoundary:h,padding:l}),j=P?O?kC:xC:O?CC:EC;_[R]>w[R]&&(j=lk(j));var I=lk(j),L=[];if(o&&L.push(A[x]<=0),s&&L.push(A[j]<=0,A[I]<=0),L.every((function(e){return e}))){E=k,S=!1;break}T.set(k,L)}if(S)for(var D=function(e){var t=b.find((function(t){var n=T.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},M=p?3:1;M>0;M--){if("break"===D(M))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Tk(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Sk(e){return[EC,kC,CC,xC].some((function(t){return e[t]>=0}))}var Ek={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=_k(t,{elementContext:"reference"}),s=_k(t,{altBoundary:!0}),u=Tk(a,r),l=Tk(s,i,o),c=Sk(u),f=Sk(l);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}};var Ck={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=RC.reduce((function(e,n){return e[n]=function(e,t,n){var r=IC(e),i=[xC,EC].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[xC,kC].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],u=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}};var kk={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=bk({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var xk={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,u=n.boundary,l=n.rootBoundary,c=n.altBoundary,f=n.padding,h=n.tether,d=void 0===h||h,p=n.tetherOffset,y=void 0===p?0:p,m=_k(t,{boundary:u,rootBoundary:l,padding:f,altBoundary:c}),v=IC(t.placement),g=nk(t.placement),b=!g,_=QC(v),w="x"===_?"y":"x",T=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,C="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,k="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(T){if(o){var P,R="y"===_?EC:xC,A="y"===_?CC:kC,j="y"===_?"height":"width",I=T[_],L=I+m[R],D=I-m[A],M=d?-E[j]/2:0,N="start"===g?S[j]:E[j],B="start"===g?-E[j]:-S[j],U=t.elements.arrow,F=d&&U?HC(U):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=V[R],z=V[A],q=JC(0,S[j],F[j]),W=b?S[j]/2-M-q-H-k.mainAxis:N-q-H-k.mainAxis,$=b?-S[j]/2+M+q+z+k.mainAxis:B+q+z+k.mainAxis,G=t.elements.arrow&&XC(t.elements.arrow),K=G?"y"===_?G.clientTop||0:G.clientLeft||0:0,Y=null!=(P=null==x?void 0:x[_])?P:0,X=I+$-Y,Q=JC(d?UC(L,I+W-Y-K):L,I,d?BC(D,X):D);T[_]=Q,O[_]=Q-I}if(s){var J,Z="x"===_?EC:xC,ee="x"===_?CC:kC,te=T[w],ne="y"===w?"height":"width",re=te+m[Z],ie=te-m[ee],oe=-1!==[EC,xC].indexOf(v),ae=null!=(J=null==x?void 0:x[w])?J:0,se=oe?re:te-S[ne]-E[ne]-ae+k.altAxis,ue=oe?te+S[ne]+E[ne]-ae-k.altAxis:ie,le=d&&oe?function(e,t,n){var r=JC(e,t,n);return r>n?n:r}(se,te,ue):JC(d?se:re,te,d?ue:ie);T[w]=le,O[w]=le-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]};function Ok(e,t,n){void 0===n&&(n=!1);var r,i,o=MC(t),a=MC(t)&&function(e){var t=e.getBoundingClientRect(),n=FC(t.width)/e.offsetWidth||1,r=FC(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=GC(t),u=VC(e,a),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==qC(t)||pk(s))&&(l=(r=t)!==LC(r)&&MC(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:hk(r)),MC(t)?((c=VC(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=dk(s))),{x:u.left+l.scrollLeft-c.x,y:u.top+l.scrollTop-c.y,width:u.width,height:u.height}}function Pk(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(r){if(!n.has(r)){var i=t.get(r);i&&e(i)}})),r.push(i)}(e)})),r}var Rk={placement:"bottom",modifiers:[],strategy:"absolute"};function Ak(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function jk(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?Rk:i;return function(e,t,n){void 0===n&&(n=o);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Rk,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},u=[],l=!1,c={state:s,setOptions:function(n){var i="function"==typeof n?n(s.options):n;f(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:DC(e)?yk(e):e.contextElement?yk(e.contextElement):[],popper:yk(t)};var a=function(e){var t=Pk(e);return AC.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=a.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:s,name:t,instance:c,options:r});u.push(o||function(){})}})),c.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(Ak(t,n)){s.rects={reference:Ok(t,XC(n),"fixed"===s.options.strategy),popper:HC(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var i=s.orderedModifiers[r],o=i.fn,a=i.options,u=void 0===a?{}:a,f=i.name;"function"==typeof o&&(s=o({state:s,options:u,name:f,instance:c})||s)}else s.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){c.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(i())}))}))),a}),destroy:function(){f(),l=!0}};if(!Ak(e,t))return c;function f(){u.forEach((function(e){return e()})),u=[]}return c.setOptions(n).then((function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var Ik=jk({defaultModifiers:[Ek,kk,ok,sk,Ck,wk,xk,tk]}),Lk=function(e){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},Dk={name:"applyStyles",enabled:!1},Mk={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(e){var t=e.state;return function(){var e=t.elements,n=e.reference,r=e.popper;if("removeAttribute"in n){var i=(n.getAttribute("aria-describedby")||"").split(",").filter((function(e){return e.trim()!==r.id}));i.length?n.setAttribute("aria-describedby",i.join(",")):n.removeAttribute("aria-describedby")}}},fn:function(e){var t,n=e.state.elements,r=n.popper,i=n.reference,o=null==(t=r.getAttribute("role"))?void 0:t.toLowerCase();if(r.id&&"tooltip"===o&&"setAttribute"in i){var a=i.getAttribute("aria-describedby");if(a&&-1!==a.split(",").indexOf(r.id))return;i.setAttribute("aria-describedby",a?a+","+r.id:r.id)}}},Nk=[];var Bk=function(e,t,n){var i=void 0===n?{}:n,o=i.enabled,a=void 0===o||o,s=i.placement,u=void 0===s?"bottom":s,l=i.strategy,c=void 0===l?"absolute":l,f=i.modifiers,h=void 0===f?Nk:f,d=nC(i,["enabled","placement","strategy","modifiers"]),p=Object(r.useRef)(),y=Object(r.useCallback)((function(){var e;null==(e=p.current)||e.update()}),[]),m=Object(r.useCallback)((function(){var e;null==(e=p.current)||e.forceUpdate()}),[]),v=jC(Object(r.useState)({placement:u,update:y,forceUpdate:m,attributes:{},styles:{popper:Lk(c),arrow:{}}})),g=v[0],b=v[1],_=Object(r.useMemo)((function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(e){var t=e.state,n={},r={};Object.keys(t.elements).forEach((function(e){n[e]=t.styles[e],r[e]=t.attributes[e]})),b({state:t,styles:n,attributes:r,update:y,forceUpdate:m,placement:t.placement})}}}),[y,m,b]);return Object(r.useEffect)((function(){p.current&&a&&p.current.setOptions({placement:u,strategy:c,modifiers:[].concat(h,[_,Dk])})}),[c,u,_,a]),Object(r.useEffect)((function(){if(a&&null!=e&&null!=t)return p.current=Ik(e,t,tC({},d,{placement:u,strategy:c,modifiers:[].concat(h,[Mk,_])})),function(){null!=p.current&&(p.current.destroy(),p.current=void 0,b((function(e){return tC({},e,{attributes:{},styles:{popper:Lk(c)}})})))}}),[a,e,t]),g},Uk=n(216),Fk=!1,Vk=!1;try{var Hk={get passive(){return Fk=!0},get once(){return Vk=Fk=!0}};Uk.a&&(window.addEventListener("test",Hk,Hk),window.removeEventListener("test",Hk,!0))}catch(e){}var zk=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!Vk){var i=r.once,o=r.capture,a=n;!Vk&&i&&(a=n.__once||function e(r){this.removeEventListener(t,e,o),n.call(this,r)},n.__once=a),e.addEventListener(t,a,Fk?r:o)}e.addEventListener(t,n,r)};var qk=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)};var Wk=function(e,t,n,r){return zk(e,t,n,r),function(){qk(e,t,n,r)}},$k=n(138),Gk=n(67),Kk=function(){};var Yk=function(e){return e&&("current"in e?e.current:e)};var Xk=function(e,t,n){var i=void 0===n?{}:n,o=i.disabled,a=i.clickTrigger,s=void 0===a?"click":a,u=Object(r.useRef)(!1),l=t||Kk,c=Object(r.useCallback)((function(t){var n,r=Yk(e);hC()(!!r,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),u.current=!(r&&(n=t,!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey))&&function(e){return 0===e.button}(t)&&!oC(r,t.target))}),[e]),f=Object($k.a)((function(e){u.current||l(e)})),h=Object($k.a)((function(e){27===e.keyCode&&l(e)}));Object(r.useEffect)((function(){if(!o&&null!=e){var t,n=window.event,r=(t=Yk(e),Object(Gk.a)(cC(t))),i=Wk(r,s,c,!0),a=Wk(r,s,(function(e){e!==n?f(e):n=void 0})),u=Wk(r,"keyup",(function(e){e!==n?h(e):n=void 0})),l=[];return"ontouchstart"in r.documentElement&&(l=[].slice.call(r.body.children).map((function(e){return Wk(e,"mousemove",Kk)}))),function(){i(),a(),u(),l.forEach((function(e){return e()}))}}}),[e,o,s,c,f,h])},Qk=function(e){var t;return"undefined"==typeof document?null:null==e?Object(Gk.a)().body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),null!=(t=e)&&t.nodeType&&e||null)};function Jk(e,t){var n=Object(r.useState)((function(){return Qk(e)})),i=n[0],o=n[1];if(!i){var a=Qk(e);a&&o(a)}return Object(r.useEffect)((function(){t&&i&&t(i)}),[t,i]),Object(r.useEffect)((function(){var t=Qk(e);t!==i&&o(t)}),[e,i]),i}function Zk(e){var t,n,r,i,o,a=e.enabled,s=e.enableEvents,u=e.placement,l=e.flip,c=e.offset,f=e.fixed,h=e.containerPadding,d=e.arrowElement,p=e.popperConfig,y=void 0===p?{}:p,m=function(e){var t={};return Array.isArray(e)?(null==e||e.forEach((function(e){t[e.name]=e})),t):e||t}(y.modifiers);return tC({},y,{placement:u,enabled:a,strategy:f?"fixed":y.strategy,modifiers:(o=tC({},m,{eventListeners:{enabled:s},preventOverflow:tC({},m.preventOverflow,{options:h?tC({padding:h},null==(t=m.preventOverflow)?void 0:t.options):null==(n=m.preventOverflow)?void 0:n.options}),offset:{options:tC({offset:c},null==(r=m.offset)?void 0:r.options)},arrow:tC({},m.arrow,{enabled:!!d,options:tC({},null==(i=m.arrow)?void 0:i.options,{element:d})}),flip:tC({enabled:!!l},m.flip)}),void 0===o&&(o={}),Array.isArray(o)?o:Object.keys(o).map((function(e){return o[e].name=e,o[e]})))})}var ex=i.a.forwardRef((function(e,t){var n=e.flip,o=e.offset,a=e.placement,s=e.containerPadding,u=void 0===s?5:s,l=e.popperConfig,c=void 0===l?{}:l,f=e.transition,h=wC(),d=h[0],p=h[1],y=wC(),m=y[0],v=y[1],g=SC(p,t),b=Jk(e.container),_=Jk(e.target),w=Object(r.useState)(!e.show),T=w[0],S=w[1],E=Bk(_,d,Zk({placement:a,enableEvents:!!e.show,containerPadding:u||5,flip:n,offset:o,arrowElement:m,popperConfig:c})),C=E.styles,k=E.attributes,x=nC(E,["styles","attributes"]);e.show?T&&S(!1):e.transition||T||S(!0);var O=e.show||f&&!T;if(Xk(d,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!O)return null;var P=e.children(tC({},x,{show:!!e.show,props:tC({},k.popper,{style:C.popper,ref:g}),arrowProps:tC({},k.arrow,{style:C.arrow,ref:v})}));if(f){var R=e.onExit,A=e.onExiting,j=e.onEnter,I=e.onEntering,L=e.onEntered;P=i.a.createElement(f,{in:e.show,appear:!0,onExit:R,onExiting:A,onExited:function(){S(!0),e.onExited&&e.onExited.apply(e,arguments)},onEnter:j,onEntering:I,onEntered:L},P)}return b?UT.a.createPortal(P,b):null}));ex.displayName="Overlay",ex.propTypes={show:_C.a.bool,placement:_C.a.oneOf(RC),target:_C.a.any,container:_C.a.any,flip:_C.a.bool,children:_C.a.func.isRequired,containerPadding:_C.a.number,popperConfig:_C.a.object,rootClose:_C.a.bool,rootCloseEvent:_C.a.oneOf(["click","mousedown"]),rootCloseDisabled:_C.a.bool,onHide:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;return e.rootClose?(i=_C.a.func).isRequired.apply(i,[e].concat(n)):_C.a.func.apply(_C.a,[e].concat(n))},transition:_C.a.elementType,onEnter:_C.a.func,onEntering:_C.a.func,onEntered:_C.a.func,onExit:_C.a.func,onExiting:_C.a.func,onExited:_C.a.func};var tx=ex,nx=n(107),rx=i.a.createContext({});rx.Consumer,rx.Provider;function ix(e,t){var n=Object(r.useContext)(rx);return e||n[t]||t}function ox(e){var t=window.getComputedStyle(e);return{top:parseFloat(t.marginTop)||0,right:parseFloat(t.marginRight)||0,bottom:parseFloat(t.marginBottom)||0,left:parseFloat(t.marginLeft)||0}}var ax=!1,sx=i.a.createContext(null),ux=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}iC(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[UT.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||ax?this.safeSetState({status:"entered"},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:"entering"},(function(){t.props.onEntering(o,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:UT.a.findDOMNode(this);t&&!ax?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:UT.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,nC(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.a.createElement(sx.Provider,{value:null},"function"==typeof n?n(e,r):i.a.cloneElement(i.a.Children.only(n),r))},t}(i.a.Component);function lx(){}ux.contextType=sx,ux.propTypes={},ux.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:lx,onEntering:lx,onEntered:lx,onExit:lx,onExiting:lx,onExited:lx},ux.UNMOUNTED="unmounted",ux.EXITED="exited",ux.ENTERING="entering",ux.ENTERED="entered",ux.EXITING="exiting";var cx=ux;function fx(e,t){return function(e){var t=Object(Gk.a)(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var hx=/([A-Z])/g;var dx=/^ms-/;function px(e){return function(e){return e.replace(hx,"-$1").toLowerCase()}(e).replace(dx,"-ms-")}var yx=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;var mx=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(px(t))||fx(e).getPropertyValue(px(t));Object.keys(t).forEach((function(i){var o=t[i];o||0===o?!function(e){return!(!e||!yx.test(e))}(i)?n+=px(i)+": "+o+";":r+=i+"("+o+") ":e.style.removeProperty(px(i))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};function vx(e,t,n){void 0===n&&(n=5);var r=!1,i=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)}),t+n),o=Wk(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(i),o()}}function gx(e,t,n,r){var i,o;null==n&&(i=mx(e,"transitionDuration")||"",o=-1===i.indexOf("ms")?1e3:1,n=parseFloat(i)*o||0);var a=vx(e,n,r),s=Wk(e,"transitionend",t);return function(){a(),s()}}function bx(e,t){var n=mx(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function _x(e,t){var n=bx(e,"transitionDuration"),r=bx(e,"transitionDelay"),i=gx(e,(function(n){n.target===e&&(i(),t(n))}),n+r)}var wx,Tx=["className","children"],Sx=((wx={}).entering="show",wx.entered="show",wx),Ex=i.a.forwardRef((function(e,t){var n=e.className,o=e.children,a=nC(e,Tx),s=Object(r.useCallback)((function(e){!function(e){e.offsetHeight}(e),a.onEnter&&a.onEnter(e)}),[a]);return i.a.createElement(cx,tC({ref:t,addEndListener:_x},a,{onEnter:s}),(function(e,t){return i.a.cloneElement(o,tC({},t,{className:gC()("fade",n,o.props.className,Sx[e])}))}))}));Ex.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},Ex.displayName="Fade";var Cx=Ex,kx=["children","transition","popperConfig"],xx=["props","arrowProps","show","update","forceUpdate","placement","state"],Ox={transition:Cx,rootClose:!1,show:!1,placement:"top"};function Px(e){var t,n,o,a,s,u=e.children,l=e.transition,c=e.popperConfig,f=void 0===c?{}:c,h=nC(e,kx),d=Object(r.useRef)({}),p=(t=Object(r.useRef)(null),n=Object(r.useRef)(null),o=Object(r.useRef)(null),a=ix(void 0,"popover"),s=ix(void 0,"dropdown-menu"),[Object(r.useCallback)((function(e){e&&(Object(nx.a)(e,a)||Object(nx.a)(e,s))&&(n.current=ox(e),e.style.margin="0",t.current=e)}),[a,s]),[Object(r.useMemo)((function(){return{name:"offset",options:{offset:function(e){var t=e.placement;if(!n.current)return[0,0];var r=n.current,i=r.top,o=r.left,a=r.bottom,s=r.right;switch(t.split("-")[0]){case"top":return[0,a];case"left":return[0,s];case"bottom":return[0,i];case"right":return[0,o];default:return[0,0]}}}}}),[n]),Object(r.useMemo)((function(){return{name:"arrow",options:{padding:function(){if(!o.current)return 0;var e=o.current,t=e.top,n=e.right,r=t||n;return{top:r,left:r,right:r,bottom:r}}}}}),[o]),Object(r.useMemo)((function(){return{name:"popoverArrowMargins",enabled:!0,phase:"main",requiresIfExists:["arrow"],effect:function(e){var n=e.state;if(t.current&&n.elements.arrow&&Object(nx.a)(t.current,a)){if(n.modifiersData["arrow#persistent"]){var r=ox(n.elements.arrow),i=r.top,s=r.right,u=i||s;n.modifiersData["arrow#persistent"].padding={top:u,left:u,right:u,bottom:u}}else o.current=ox(n.elements.arrow);return n.elements.arrow.style.margin="0",function(){n.elements.arrow&&(n.elements.arrow.style.margin="")}}}}}),[a])]]),y=p[0],m=p[1],v=!0===l?Cx:l||null;return i.a.createElement(tx,tC({},h,{ref:y,popperConfig:tC({},f,{modifiers:m.concat(f.modifiers||[])}),transition:v}),(function(e){var t,n=e.props,r=e.arrowProps,o=e.show,a=e.update,s=(e.forceUpdate,e.placement),c=e.state,f=nC(e,xx);!function(e,t){var n=e.ref,r=t.ref;e.ref=n.__wrapped||(n.__wrapped=function(e){return n(cC(e))}),t.ref=r.__wrapped||(r.__wrapped=function(e){return r(cC(e))})}(n,r);var h=Object.assign(d.current,{state:c,scheduleUpdate:a,placement:s,outOfBoundaries:(null==c||null==(t=c.modifiersData.hide)?void 0:t.isReferenceHidden)||!1});return"function"==typeof u?u(tC({},f,n,{placement:s,show:o},!l&&o&&{className:"show"},{popper:h,arrowProps:r})):i.a.cloneElement(u,tC({},f,n,{placement:s,arrowProps:r,popper:h,className:gC()(u.props.className,!l&&o&&"show"),style:tC({},u.props.style,n.style)}))}))}Px.defaultProps=Ox;var Rx=Px,Ax=["trigger","overlay","children","popperConfig","show","defaultShow","onToggle","delay","placement","flip"],jx=function(e){function t(){return e.apply(this,arguments)||this}return iC(t,e),t.prototype.render=function(){return this.props.children},t}(i.a.Component);function Ix(e,t,n){var r=t[0],i=r.currentTarget,o=r.relatedTarget||r.nativeEvent[n];o&&o===i||oC(i,o)||e.apply(void 0,t)}function Lx(e){var t=e.trigger,n=e.overlay,o=e.children,a=e.popperConfig,s=void 0===a?{}:a,u=e.show,l=e.defaultShow,c=void 0!==l&&l,f=e.onToggle,h=e.delay,d=e.placement,p=e.flip,y=void 0===p?d&&-1!==d.indexOf("auto"):p,m=nC(e,Ax),v=Object(r.useRef)(null),g=lC(),b=Object(r.useRef)(""),_=dC(u,c,f),w=_[0],T=_[1],S=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}}(h),E="function"!=typeof o?i.a.Children.only(o).props:{},C=E.onFocus,k=E.onBlur,x=E.onClick,O=Object(r.useCallback)((function(){return cC(v.current)}),[]),P=Object(r.useCallback)((function(){g.clear(),b.current="show",S.show?g.set((function(){"show"===b.current&&T(!0)}),S.show):T(!0)}),[S.show,T,g]),R=Object(r.useCallback)((function(){g.clear(),b.current="hide",S.hide?g.set((function(){"hide"===b.current&&T(!1)}),S.hide):T(!1)}),[S.hide,T,g]),A=Object(r.useCallback)((function(){P();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null==C||C.apply(void 0,t)}),[P,C]),j=Object(r.useCallback)((function(){R();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null==k||k.apply(void 0,t)}),[R,k]),I=Object(r.useCallback)((function(){T(!w),x&&x.apply(void 0,arguments)}),[x,T,w]),L=Object(r.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Ix(P,t,"fromElement")}),[P]),D=Object(r.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Ix(R,t,"toElement")}),[R]),M=null==t?[]:[].concat(t),N={};return-1!==M.indexOf("click")&&(N.onClick=I),-1!==M.indexOf("focus")&&(N.onFocus=A,N.onBlur=j),-1!==M.indexOf("hover")&&(N.onMouseOver=L,N.onMouseOut=D),i.a.createElement(i.a.Fragment,null,"function"==typeof o?o(tC({},N,{ref:v})):i.a.createElement(jx,{ref:v},Object(r.cloneElement)(o,N)),i.a.createElement(Rx,tC({},m,{show:w,onHide:R,flip:y,placement:d,popperConfig:s,target:O}),n))}Lx.defaultProps={defaultShow:!1,trigger:["hover","focus"]};var Dx=Lx,Mx=(n(400),["bsPrefix","placement","className","style","children","arrowProps","popper","show"]),Nx=i.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.placement,o=e.className,a=e.style,s=e.children,u=e.arrowProps,l=(e.popper,e.show,nC(e,Mx));n=ix(n,"tooltip");var c=((null==r?void 0:r.split("-"))||[])[0];return i.a.createElement("div",tC({ref:t,style:a,role:"tooltip","x-placement":c,className:gC()(o,n,"bs-tooltip-"+c)},l),i.a.createElement("div",tC({className:"arrow"},u)),i.a.createElement("div",{className:n+"-inner"},s))}));Nx.defaultProps={placement:"right"},Nx.displayName="Tooltip";var Bx,Ux,Fx=Nx,Vx=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return Math.floor(Math.random()*Math.floor(e))};function Hx(e){var t,n=e.title,i=e.placement,o=e.trigger,a=e.spanHack,s=e.children,u=e.disable;return a?r.createElement(Dx,{placement:i,overlay:r.createElement(Fx,{id:"".concat(n,"-").concat(Vx())},n),trigger:o,delay:u?Number.POSITIVE_INFINITY:void 0},r.createElement("span",{className:"".concat(null!==(t=e.spanHackClassName)&&void 0!==t?t:"d-flex justify-content-center align-items-center")},s)):r.createElement(Dx,{placement:i,overlay:r.createElement(Fx,{id:"".concat(n,"-").concat(Vx())},n),trigger:o,delay:u?Number.POSITIVE_INFINITY:void 0},r.createElement(r.Fragment,null,s))}Hx.defaultProps={trigger:["hover","click","focus"],placement:"top"},function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(Bx||(Bx={})),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup"}(Ux||(Ux={}));var zx=n(40),qx=n.n(zx),Wx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},$x={width:200};function Gx(e,t){var n,r=zS(e,"/v1/previews");return"metadata"in t?t.metadata.type===Bx.Pdf?GE.createResourceImage(r,t.url,$x):t.metadata.type===Bx.Image?GE.createUrl(t.url,{size:LE.Medium,resizeType:ME.Cover}):(null===(n=t.pdf)||void 0===n?void 0:n.url)?GE.createResourceImage(r,t.pdf.url,$x):t.metadata.type===Bx.Zip?GE.createUrl(zS(e,"/v2/thumbnails/BKnxEm"),{size:LE.Large}):GE.createUrl("".concat(e,"v2/thumbnails/BKnxEm"),{size:LE.Large}):GE.createResourceImage(r,t.url,Object.assign({},$x))}function Kx(e){var t;return"metadata"in e?e.metadata.type===Bx.Pdf?DE.Pdf:e.metadata.type===Bx.Image?DE.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?DE.Pdf:(e.metadata.type,Bx.Zip,DE.Thumbnails):DE.Link}function Yx(e){var t,n,r,o=null,a=0;"metadata"in e.data&&(o=e.data.metadata,a=null!==(r=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==r?r:0);var s="pt-3 px-3 rounded-lg d-flex flex-column align-items-center"+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return qx.a.atomGuide;case"student-activity":return qx.a.studentActivity;case"teacher-pack":return qx.a.teacherPack;case"additional-materials":return qx.a.additionalMaterials;default:return qx.a.userUploaded}}(null==o?void 0:o.resourceType)," ").concat(qx.a.background);return i.a.createElement("div",{className:s},i.a.createElement(Hx,{title:e.data.name},i.a.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat(qx.a.text)},i.a.createElement("span",{className:"clamp-1"},e.data.name))),i.a.createElement("div",{className:"w-75 overflow-hidden ".concat(qx.a.thumbnailContainer)},i.a.createElement(QE,{data:Gx(e.imageCdnUrl,e.data),imageType:Kx(e.data),imageStyle:{transform:"rotate(".concat(a,"deg)")},analyticsOptions:{location:_w.LocationContext.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,preload:!0})))}i.a.memo((function(e){var t,n,r,o,a,s,u,l=Wx(e,[]),c=(t=eC(qE.XS),n=eC(qE.SM),r=eC(qE.MD),o=eC(qE.LG),a=eC(qE.XL),s=eC(qE.XXL),u=qE.LG,t&&(u=qE.XS),n&&(u=qE.SM),r&&(u=qE.MD),o&&(u=qE.LG),a&&(u=qE.XL),s&&(u=qE.XXL),u),f=c===qE.SM||c===qE.XS,h=null;"metadata"in e.data&&(h=e.data.metadata.type);var d=Object.assign(Object.assign({},e.analyticsData),e.data),p=Object.assign(Object.assign({},e.analyticsOptions),{actionType:_w.UserAction.Click,entity:e.data.typeId===Ux.Resource?_w.EntityType.Resource:_w.EntityType.Link});function y(){fE.logUserAction(d,p)}return i.a.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(qx.a.item)},function(){if(!h)return i.a.createElement("a",{href:e.data.url,target:"_blank",className:"d-block",onClick:y},i.a.createElement(Yx,Object.assign({},l)));var t=!!e.data.pdf||h===Bx.Pdf||h===Bx.Image;return f||!t||h===Bx.Zip?i.a.createElement("a",{href:e.data.url,className:"d-block",onClick:y},i.a.createElement(Yx,Object.assign({},l))):i.a.createElement(HE,{appLink:e.getAppLink(e.data),className:"d-block no-decoration",analyticsData:d,analyticsOptions:p},i.a.createElement(Yx,Object.assign({},l)))}())})),n(401);function Xx(e){return(Xx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jx(e,t){return(Jx=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zx(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tO(e);if(t){var i=tO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eO(this,n)}}function eO(e,t){if(t&&("object"===Xx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function tO(e){return(tO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nO(e){return i.a.createElement("div",{className:"cv-resource-item"},i.a.createElement(Yx,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var rO=ZT((function(e,t){return i.a.createElement(nO,Object.assign({},t))})),iO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jx(e,t)}(o,e);var t,n,r,i=Zx(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t);var r=new rO(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&Qx(t.prototype,n),r&&Qx(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("ClickableComponent"));n(402);function oO(e){return(oO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uO(){return(uO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lO(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function lO(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dO(e)););return e}function cO(e,t){return(cO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fO(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dO(e);if(t){var i=dO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hO(this,n)}}function hO(e,t){if(t&&("object"===oO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dO(e){return(dO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cO(e,t)}(o,e);var t,n,r,i=fO(o);function o(){var e;return aO(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(uO(dO(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(uO(dO(o.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){uO(dO(o.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",uO(dO(o.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new iO(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=Fu.dom.createEl("iframe"),this.downloadIframe.style.display="none",Fu.dom.appendContent(Fu.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){uO(dO(o.prototype),"handleClick",this).call(this,null)}}])&&sO(t.prototype,n),r&&sO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuButton"));function yO(e){return(yO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vO(e,t){return(vO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gO(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_O(e);if(t){var i=_O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bO(this,n)}}function bO(e,t){if(t&&("object"===yO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _O(e){return(_O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pO.prototype.controlText_="Resources",Fu.registerComponent("ResourcesButton",pO);var wO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vO(e,t)}(o,e);var t,n,r,i=gO(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&mO(t.prototype,n),r&&mO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("resourcesPlugin",wO);n(403);function TO(e){return(TO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function SO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function EO(){return(EO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=CO(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function CO(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=PO(e)););return e}function kO(e,t){return(kO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xO(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=PO(e);if(t){var i=PO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return OO(this,n)}}function OO(e,t){if(t&&("object"===TO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function PO(e){return(PO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var RO=Fu.getComponent("PlayToggle"),AO=Fu.getPlugin("plugin"),jO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kO(e,t)}(o,e);var t,n,r,i=xO(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).pictureInPictureEnabled=!1,n.options=t,n.bindFunctions(),n.player.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){var e=this;this.enablePictureInPicture(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}},{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var e=this.getToggleParentComponent();if(e){this.pictureInPictureEnabled=!0;var t=e.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===t&&(t=e.children().length-1),e.addChild("pictureInPictureToggle",{},t);var n=e.getChild("pictureInPictureToggle");null==n||n.enable()}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t)}}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new RO(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,EO(PO(o.prototype),"dispose",this).call(this)}}])&&SO(t.prototype,n),r&&SO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(AO);Fu.registerPlugin("pictureInPicture",jO);n(404);function IO(e){return(IO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function LO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function DO(e,t){return(DO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function MO(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=BO(e);if(t){var i=BO(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NO(this,n)}}function NO(e,t){if(t&&("object"===IO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function BO(e){return(BO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var UO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DO(e,t)}(o,e);var t,n,r,i=MO(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update(),n}return t=o,(n=[{key:"update",value:function(){this.options_.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"handleClick",value:function(){if(this.options_.isFavourited=!this.options_.isFavourited,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-favourite-button"}}])&&LO(t.prototype,n),r&&LO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function FO(e){return(FO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zO(e,t){return(zO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qO(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$O(e);if(t){var i=$O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return WO(this,n)}}function WO(e,t){if(t&&("object"===FO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $O(e){return($O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}UO.prototype.controlText_="Favourite";var GO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zO(e,t)}(o,e);var t,n,r,i=qO(o);function o(){return VO(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setFavourite",value:function(e,t){var n=this;e!==this.isFavourite&&(this.isFavourite=e,this.onClickFavourite=t,this.player.ready((function(){n.renderFavouriteButton()})))}},{key:"renderFavouriteButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new UO(this.player,{isFavourited:this.isFavourite,clickHandler:this.onClickFavourite}),this.player.addChild(this.button))}}])&&HO(t.prototype,n),r&&HO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function KO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("favouritePlugin",GO);var YO=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n,r;return t=e,(n=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}])&&KO(t.prototype,n),r&&KO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());n(405);function XO(e){return(XO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function JO(){return(JO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=ZO(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function ZO(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=iP(e)););return e}function eP(e,t){return(eP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tP(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=iP(e);if(t){var i=iP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nP(this,n)}}function nP(e,t){if(t&&("object"===XO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rP(e)}function rP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iP(e){return(iP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eP(e,t)}(o,e);var t,n,r,i=tP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=YO,n.pointOfInterest=t.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(rP(n)),n.onMouseLeave=n.onMouseLeave.bind(rP(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(rP(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(rP(n)),n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(JO(iP(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return JO(iP(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;t!==this.hasBuffered&&(this.hasBuffered=t,this.hasBuffered?this.addClass("cv-point-of-interest-indicator-buffered"):this.removeClass("cv-point-of-interest-indicator-buffered"))}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){e?this.removeClass("cv-point-of-interest-indicator-hidden"):this.addClass("cv-point-of-interest-indicator-hidden")}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=Fu.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&QO(t.prototype,n),r&&QO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));function aP(e){return(aP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uP(){return(uP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=lP(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function lP(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dP(e)););return e}function cP(e,t){return(cP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fP(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dP(e);if(t){var i=dP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hP(this,n)}}function hP(e,t){if(t&&("object"===aP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dP(e){return(dP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cP(e,t)}(o,e);var t,n,r,i=fP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).pointsOfInterestVisible=t.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return t=o,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){Fu.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){Fu.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Fu.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=uP(dP(o.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&sP(t.prototype,n),r&&sP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("MenuItem"));function yP(e){return(yP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vP(e,t){return(vP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gP(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wP(e);if(t){var i=wP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bP(this,n)}}function bP(e,t){if(t&&("object"===yP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _P(e)}function _P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wP(e){return(wP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("PointsOfInterestMenuItem",pP);var TP,SP=Fu.getPlugin("plugin"),EP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vP(e,t)}(o,e);var t,n,r,i=gP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==t?void 0:t.pointsOfInterest,n.initialize=n.initialize.bind(_P(n)),n.updateBuffered=n.updateBuffered.bind(_P(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(_P(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return t=o,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(Qu()&&"false"===Ju("cvplayer-points-of-interest")&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(e){Zu("cvplayer-points-of-interest",e.toString()),this.pointOfInterestIndicators.forEach((function(t){return t.toggleVisibility(e)}))}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})})),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach((function(e){var r=new oP(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:pP,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered(ky(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&mP(t.prototype,n),r&&mP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(SP);Fu.registerPlugin("pointsOfInterestPlugin",EP),function(e){e.None="None",e.Complete="Complete",e.Incomplete="Incomplete"}(TP||(TP={}));n(406);function CP(e){return(CP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xP(e,t){return(xP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function OP(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=RP(e);if(t){var i=RP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return PP(this,n)}}function PP(e,t){if(t&&("object"===CP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function RP(e){return(RP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var AP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xP(e,t)}(o,e);var t,n,r,i=OP(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update(),n}return t=o,(n=[{key:"update",value:function(){this.options_.activityStatus===TP.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.options_.activityStatus===TP.Complete?TP.Incomplete:TP.Complete,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}}])&&kP(t.prototype,n),r&&kP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Button"));function jP(e){return(jP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function DP(e,t){return(DP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function MP(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=BP(e);if(t){var i=BP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NP(this,n)}}function NP(e,t){if(t&&("object"===jP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function BP(e){return(BP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}AP.prototype.controlText_="ActivityStatus";var UP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DP(e,t)}(o,e);var t,n,r,i=MP(o);function o(){return IP(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new AP(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button))}}])&&LP(t.prototype,n),r&&LP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getPlugin("plugin"));function FP(e){return(FP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function HP(){return(HP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=zP(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function zP(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=GP(e)););return e}function qP(e,t){return(qP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function WP(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=GP(e);if(t){var i=GP(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $P(this,n)}}function $P(e,t){if(t&&("object"===FP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function GP(e){return(GP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("activityStatusPlugin",UP);var KP=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},YP=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qP(e,t)}(o,e);var t,n,r,i=WP(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"configurePlugins",value:function(){try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),this.options.pointsOfInterest&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var t=this,n=Object.create(null,{additionalSetup:{get:function(){return HP(GP(o.prototype),"additionalSetup",t)}}});return KP(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.next=7;break}if(null!==(r=e.additionalData)){t.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 7:case"end":return t.stop()}}),t,this)})))}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&VP(t.prototype,n),r&&VP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(xT),XP=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function QP(e){var t=e.className,n=void 0===t?"":t,r=e.playerApi,o=e.onReady,a=e.onDispose,s=XP(e,["className","playerApi","onReady","onDispose"]),u=i.a.useRef(),l=i.a.useRef();return i.a.useEffect((function(){var e;if(null===(e=l.current)||void 0===e||e.dispose(),u)return l.current=new YP(u.current,Object.assign(Object.assign({},s),{playerApi:r})),o&&l.current.ready((function(){o(l.current)})),a&&l.current.one("dispose",a),function(){var e;null===(e=l.current)||void 0===e||e.dispose()}}),[e.viewKey]),i.a.createElement("div",{ref:u,className:n})}function JP(e){return(JP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tR(){return(tR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=nR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function nR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=aR(e)););return e}function rR(e,t){return(rR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iR(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=aR(e);if(t){var i=aR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oR(this,n)}}function oR(e,t){if(t&&("object"===JP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function aR(e){return(aR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sR=Fu.getComponent("Component"),uR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rR(e,t)}(o,e);var t,n,r,i=iR(o);function o(){return ZP(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-clip-timepoint-handle ".concat(tR(aR(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return tR(aR(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:'<svg viewBox="0 0 5 14" pointer-events="none"><g id="Clips" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Clip-2" transform="translate(-835.000000, -632.000000)" fill="#FFFFFF"><g id="Video-Copy" transform="translate(275.000000, 96.000000)"><g id="Handles" transform="translate(560.000000, 536.000000)"><circle id="Oval" cx="1" cy="1" r="1"></circle><circle id="Oval-Copy-2" cx="1" cy="5" r="1"></circle><circle id="Oval-Copy-4" cx="1" cy="9" r="1"></circle><circle id="Oval-Copy-8" cx="1" cy="13" r="1"></circle><circle id="Oval-Copy" cx="4" cy="1" r="1"></circle><circle id="Oval-Copy-3" cx="4" cy="5" r="1"></circle><circle id="Oval-Copy-5" cx="4" cy="9" r="1"></circle><circle id="Oval-Copy-9" cx="4" cy="13" r="1"></circle></g></g></g></g></svg>'}),n)}},{key:"isEventTarget",value:function(e){return this.el().contains(e.target)}}])&&eR(t.prototype,n),r&&eR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(sR);n(407);function lR(e){return(lR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fR(){return(fR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=hR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function hR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mR(e)););return e}function dR(e,t){return(dR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pR(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mR(e);if(t){var i=mR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yR(this,n)}}function yR(e,t){if(t&&("object"===lR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function mR(e){return(mR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dR(e,t)}(o,e);var t,n,r,i=pR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).dragStartActive=!1,n.dragEndActive=!1,n.dragSliderActive=!1,n.dragSliderCurrentPosition=null,n.minDuration=Math.min(e.duration(),n.options_.minDuration),n.setStartTime(t.startTime,!1),n.setEndTime(t.endTime,!1),n.startHandle=new uR(n.player(),t),n.startHandle.addClass("cv-clip-start-handle"),n.addChild(n.startHandle),n.endHandle=new uR(n.player(),t),n.endHandle.addClass("cv-clip-end-handle"),n.addChild(n.endHandle),n.on(n.player(),"update:clip:start:time",(function(e){var t=e.time;return n.setStartTime(t)})),n.on(n.player(),"update:clip:end:time",(function(e){var t=e.time;return n.setEndTime(t)})),n.bindListeners(),n.update(),n}return t=o,(n=[{key:"createEl",value:function(){return fR(mR(o.prototype),"createEl",this).call(this,"div",{className:"cv-clip-timepoint-selector"},{})}},{key:"update",value:function(){var e=this;this.options_.onChangeStartTime(this.startTime),this.options_.onChangeEndTime(this.endTime),this.requestAnimationFrame((function(){e.setStartOffset(),e.setWidth()}))}},{key:"setStartTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.hasStartTime()&&this.hasEndTime()&&this.endTime-this.startTime,r=this.player().duration()-this.minDuration;if(e>r&&(e=r),e<0&&(e=0),this.startTime=e,this.endTime&&this.endTime-this.startTime<this.minDuration){var i="number"==typeof n?this.startTime+n:this.startTime+this.minDuration;this.setEndTime(i)}this.player().currentTime(this.startTime),t&&this.update()}}},{key:"setEndTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.hasStartTime()&&this.hasEndTime()&&this.endTime-this.startTime,r=this.minDuration;if(e<r&&(e=r),e>this.player().duration()&&(e=this.player().duration()),this.endTime=e,this.startTime&&this.endTime-this.startTime<this.minDuration){var i="number"==typeof n?this.endTime-n:this.endTime-this.minDuration;this.setStartTime(i)}t&&this.update()}}},{key:"bindListeners",value:function(){var e=this;this.onTimeupdate=this.onTimeupdate.bind(this),this.player().on("timeupdate",this.onTimeupdate),this.on("mousedown",this.dragStart),this.on("touchstart",this.dragStart),this.player().on("dispose",(function(){e.player().off("timeupdate",e.onTimeupdate),e.off("mousedown",e.dragStart),e.off("touchstart",e.dragStart)}))}},{key:"hasStartTime",value:function(){return"number"==typeof this.startTime}},{key:"hasEndTime",value:function(){return"number"==typeof this.endTime}},{key:"onTimeupdate",value:function(){var e=this.player().currentTime();e>this.endTime&&e<this.endTime+.5&&this.player().pause()}},{key:"dragStart",value:function(e){this.startHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragStartActive=!0),this.endHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragEndActive=!0),e.target===this.el()&&(e.stopImmediatePropagation(),this.dragSliderActive=!0,this.dragSliderCurrentPosition=this.getPosition(e));var t=this.el().ownerDocument;this.on(t,"mousemove",this.drag),this.on(t,"mouseup",this.dragEnd),this.on(t,"touchmove",this.drag),this.on(t,"touchend",this.dragEnd),this.drag(e)}},{key:"dragEnd",value:function(){this.dragStartActive=!1,this.dragEndActive=!1,this.dragSliderActive=!1,this.dragSliderCurrentPosition=null;var e=this.el().ownerDocument;this.off(e,"mousemove",this.drag),this.off(e,"mouseup",this.dragEnd),this.off(e,"touchmove",this.drag),this.off(e,"touchend",this.dragEnd)}},{key:"drag",value:function(e){if((this.dragStartActive||this.dragEndActive||this.dragSliderActive)&&Fu.dom.isSingleLeftClick(e)){var t=this.getPosition(e),n=t*this.player().duration();this.dragStartActive&&this.handleStartHandleDrag(n),this.dragEndActive&&this.handleEndHandleDrag(n),this.dragSliderActive&&this.handleSliderDrag(t)}}},{key:"handleStartHandleDrag",value:function(e){this.setStartTime(e)}},{key:"handleEndHandleDrag",value:function(e){this.setEndTime(e)}},{key:"handleSliderDrag",value:function(e){var t=(e-this.dragSliderCurrentPosition)*this.player().duration(),n=this.startTime+t,r=this.endTime+t;n<=0||r>=this.player().duration()||(this.dragSliderCurrentPosition=e,this.setStartTime(n),this.setEndTime(r))}},{key:"getPosition",value:function(e){return Fu.dom.getPointerPosition(this.el_.parentNode,e).x}},{key:"setStartOffset",value:function(){this.el_.style.marginLeft="".concat(this.getPercentage(this.startTime),"%")}},{key:"setWidth",value:function(){this.el_.style.width="".concat(this.getPercentage(this.endTime-this.startTime),"%")}},{key:"getPercentage",value:function(e){return+(e/this.player().duration()*100).toFixed(4)}}])&&cR(t.prototype,n),r&&cR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));n(408);function gR(e){return(gR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _R(){return(_R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=wR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function wR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=CR(e)););return e}function TR(e,t){return(TR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function SR(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CR(e);if(t){var i=CR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ER(this,n)}}function ER(e,t){if(t&&("object"===gR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function CR(e){return(CR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TR(e,t)}(o,e);var t,n,r,i=SR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).seekBar_=t.seekBar,n.playProgressBar_=t.playProgressBar,n.bindListeners(),n.player_.one("dispose",(function(){n.unbindListeners()})),n}return t=o,(n=[{key:"createEl",value:function(e,t,n){return _R(CR(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"cv-create-clip-progress-indicator"}),n)}},{key:"bindListeners",value:function(){this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown)}},{key:"unbindListeners",value:function(){var e=this.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp)}},{key:"handleMouseDown",value:function(e){if(Fu.dom.isSingleLeftClick(e)){e.stopPropagation(),"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Fu.browser.IS_CHROME||e.preventDefault(),this.player_.scrubbing(!0),this.videoWasPlaying_=!this.player_.paused(),this.player_.pause(),Fu.dom.blockTextSelection();var t=this.el_.ownerDocument;this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e),this.player_.addClass("cv-hide-mouse-time")}}},{key:"handleMouseMove",value:function(e){if(Fu.dom.isSingleLeftClick(e)){var t=Fu.dom.getPointerPosition(this.seekBar_.el_,e).x*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t),this.playProgressBar_.update()}}},{key:"handleMouseUp",value:function(e){Fu.dom.unblockTextSelection();var t=this.el_.ownerDocument;this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),null==e||e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying_&&this.player_.play(),this.seekBar_.update(),this.player_.removeClass("cv-hide-mouse-time")}}])&&bR(t.prototype,n),r&&bR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("Component"));Fu.registerComponent("CreateClipProgressIndicator",kR);n(409);function xR(e){return(xR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function PR(e,t){return(PR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function RR(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jR(e);if(t){var i=jR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return AR(this,n)}}function AR(e,t){if(t&&("object"===xR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jR(e){return(jR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var IR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PR(e,t)}(o,e);var t,n,r,i=RR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addClass("cv-create-clip-seek-bar"),n}return t=o,(n=[{key:"initialize",value:function(e){var t=new vR(this.player(),e);this.addChild(t);var n=this.getChild("playProgressBar"),r=new kR(this.player_,{seekBar:this,playProgressBar:n});n.addChild(r)}}])&&OR(t.prototype,n),r&&OR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fu.getComponent("SeekBar"));function LR(e){return(LR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function MR(){return(MR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=NR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function NR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=HR(e)););return e}function BR(e,t){return(BR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UR(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=HR(e);if(t){var i=HR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return FR(this,n)}}function FR(e,t){if(t&&("object"===LR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return VR(e)}function VR(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HR(e){return(HR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}IR.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||IR.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("CreateClipSeekBar",IR);var zR=Fu.getPlugin("plugin"),qR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BR(e,t)}(o,e);var t,n,r,i=UR(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,n.initCreateClipSeekBar=n.initCreateClipSeekBar.bind(VR(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initCreateClipSeekBar)})),n}return t=o,(n=[{key:"initCreateClipSeekBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");if(t){var n=!isNaN(this.options.startTime)&&this.options.startTime>=0?this.options.startTime:0,r=!isNaN(this.options.endTime)&&this.options.endTime<=this.player.duration()?this.options.endTime:this.player.duration(),i=Math.min(this.options.minDuration||5,this.player.duration());t.initialize({startTime:n,endTime:r,minDuration:i,onChangeStartTime:this.options.onChangeStartTime,onChangeEndTime:this.options.onChangeEndTime})}}},{key:"dispose",value:function(){this.player.off("loadedmetadata",this.initCreateClipSeekBar),MR(HR(o.prototype),"dispose",this).call(this)}}])&&DR(t.prototype,n),r&&DR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(zR);function WR(e){return(WR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function GR(){return(GR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=KR(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function KR(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=JR(e)););return e}function YR(e,t){return(YR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function XR(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=JR(e);if(t){var i=JR(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return QR(this,n)}}function QR(e,t){if(t&&("object"===WR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function JR(e){return(JR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("createClipPlugin",qR);var ZR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YR(e,t)}(o,e);var t,n,r,i=XR(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,Object.assign(Object.assign({},t),{playbackRates:null,enableLocalCache:!1}))}return t=o,(n=[{key:"getPlayerClassName",value:function(){return"cv-create-clip-player"}},{key:"configurePlugins",value:function(){var e=this.options,t=e.startTime,n=e.endTime,r=e.minDuration,i=e.onChangeStartTime,o=e.onChangeEndTime;this.player.createClipPlugin({startTime:t,endTime:n,minDuration:r,onChangeStartTime:i,onChangeEndTime:o})}},{key:"getPlayerOptions",value:function(){var e=GR(JR(o.prototype),"getPlayerOptions",this).call(this);return e.inactivityTimeout=0,e}},{key:"getSeekBarName",value:function(){return"CreateClipSeekBar"}},{key:"getAnalyticsPlayerType",value:function(){return"create-clip-player"}}])&&$R(t.prototype,n),r&&$R(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(xT);function eA(e){var t=i.a.useRef(),n=i.a.useRef();return i.a.useEffect((function(){n.current=new ZR(t.current,e)}),[]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:start:time",time:e.startTime})}),[e.startTime]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:end:time",time:e.endTime})}),[e.endTime]),i.a.createElement("div",{ref:t})}n.d(t,"ClickViewPlayer",(function(){return QP})),n.d(t,"ClickViewCreateClipPlayer",(function(){return eA})),n.d(t,"Player",(function(){return YP}))}])}));
|